2010-10-12 15:57:08 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 17:02:47 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2011-11-21 23:33:54 -05:00
|
|
|
#include "basidesh.hrc"
|
|
|
|
#include "helpid.hrc"
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2011-11-21 23:33:54 -05:00
|
|
|
#include "accessibledialogwindow.hxx"
|
|
|
|
#include "baside3.hxx"
|
|
|
|
#include "basidesh.hxx"
|
|
|
|
#include "bastype2.hxx"
|
|
|
|
#include "dlged.hxx"
|
|
|
|
#include "dlgeddef.hxx"
|
|
|
|
#include "dlgedmod.hxx"
|
|
|
|
#include "dlgedview.hxx"
|
|
|
|
#include "iderdll.hxx"
|
|
|
|
#include "idetemp.hxx"
|
|
|
|
#include "localizationmgr.hxx"
|
|
|
|
#include "propbrw.hxx"
|
2012-08-17 07:29:20 +02:00
|
|
|
#include "objdlg.hxx"
|
2001-07-27 17:06:15 +00:00
|
|
|
|
2012-06-29 08:30:14 +02:00
|
|
|
#include <basic/basmgr.hxx>
|
2011-11-21 23:33:54 -05:00
|
|
|
#include <com/sun/star/resource/StringResourceWithLocation.hpp>
|
2012-05-29 17:17:28 +02:00
|
|
|
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
|
|
|
|
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
|
2011-11-21 23:33:54 -05:00
|
|
|
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
|
|
|
|
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
|
|
|
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
|
|
|
|
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
|
|
|
#include <comphelper/processfactory.hxx>
|
2012-06-29 08:30:14 +02:00
|
|
|
#include <sfx2/dinfdlg.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <sfx2/request.hxx>
|
|
|
|
#include <svl/aeitem.hxx>
|
2012-08-17 07:29:20 +02:00
|
|
|
#include <svl/visitem.hxx>
|
2012-06-29 08:30:14 +02:00
|
|
|
#include <svl/whiter.hxx>
|
2007-02-12 13:49:53 +00:00
|
|
|
#include <tools/diagnose_ex.h>
|
2007-06-26 15:51:32 +00:00
|
|
|
#include <tools/urlobj.hxx>
|
2011-11-21 23:33:54 -05:00
|
|
|
#include <vcl/msgbox.hxx>
|
2001-03-03 14:08:22 +00:00
|
|
|
#include <xmlscript/xmldlg_imexp.hxx>
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
namespace basctl
|
|
|
|
{
|
|
|
|
|
2001-03-03 14:08:22 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::com::sun::star::uno;
|
2007-06-26 15:51:32 +00:00
|
|
|
using namespace ::com::sun::star::ucb;
|
2001-03-19 11:42:53 +00:00
|
|
|
using namespace ::com::sun::star::io;
|
2007-06-26 15:51:32 +00:00
|
|
|
using namespace ::com::sun::star::resource;
|
|
|
|
using namespace ::com::sun::star::ui::dialogs;
|
|
|
|
|
2010-06-30 09:48:27 +02:00
|
|
|
#if defined(UNX)
|
2007-06-26 15:51:32 +00:00
|
|
|
#define FILTERMASK_ALL "*"
|
|
|
|
#else
|
|
|
|
#define FILTERMASK_ALL "*.*"
|
|
|
|
#endif
|
2001-03-03 14:08:22 +00:00
|
|
|
|
2007-06-29 15:33:32 +00:00
|
|
|
DBG_NAME( DialogWindow )
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
TYPEINIT1( DialogWindow, BaseWindow );
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
DialogWindow::DialogWindow (
|
|
|
|
DialogWindowLayout* pParent,
|
|
|
|
ScriptDocument const& rDocument,
|
|
|
|
rtl::OUString aLibName, rtl::OUString aName,
|
|
|
|
com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> const& xDialogModel
|
|
|
|
) :
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
BaseWindow(pParent, rDocument, aLibName, aName),
|
2012-08-17 07:29:20 +02:00
|
|
|
rLayout(*pParent),
|
|
|
|
pUndoMgr(0)
|
2001-03-03 14:08:22 +00:00
|
|
|
{
|
2012-08-02 10:21:00 +09:00
|
|
|
InitSettings( true, true, true );
|
2001-03-03 14:08:22 +00:00
|
|
|
|
2010-10-06 10:16:13 +01:00
|
|
|
pEditor = new DlgEditor( rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
|
2001-03-03 14:08:22 +00:00
|
|
|
pEditor->SetWindow( this );
|
|
|
|
pEditor->SetDialog( xDialogModel );
|
|
|
|
|
|
|
|
pUndoMgr = new SfxUndoManager;
|
|
|
|
|
|
|
|
Link aDummyLink;
|
|
|
|
aOldNotifyUndoActionHdl = pEditor->GetModel()->GetNotifyUndoActionHdl();
|
|
|
|
pEditor->GetModel()->SetNotifyUndoActionHdl(
|
|
|
|
LINK(this, DialogWindow, NotifyUndoActionHdl));
|
|
|
|
|
|
|
|
SetHelpId( HID_BASICIDE_DIALOGWINDOW );
|
2001-11-12 21:39:49 +00:00
|
|
|
|
|
|
|
// set readonly mode for readonly libraries
|
2007-03-15 14:53:05 +00:00
|
|
|
Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY );
|
2011-12-09 01:58:49 -05:00
|
|
|
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) )
|
2012-08-07 08:36:40 +02:00
|
|
|
SetReadOnly(true);
|
2001-11-12 21:39:49 +00:00
|
|
|
|
2007-03-15 14:53:05 +00:00
|
|
|
if ( rDocument.isDocument() && rDocument.isReadOnly() )
|
2012-08-07 08:36:40 +02:00
|
|
|
SetReadOnly(true);
|
2001-03-03 14:08:22 +00:00
|
|
|
}
|
|
|
|
|
2000-09-29 10:02:42 +00:00
|
|
|
DialogWindow::~DialogWindow()
|
|
|
|
{
|
|
|
|
delete pEditor;
|
|
|
|
delete pUndoMgr;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindow::LoseFocus()
|
|
|
|
{
|
2001-09-25 08:14:46 +00:00
|
|
|
if ( IsModified() )
|
2001-06-15 07:45:19 +00:00
|
|
|
StoreData();
|
2001-09-25 08:14:46 +00:00
|
|
|
|
2000-09-29 10:02:42 +00:00
|
|
|
Window::LoseFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DialogWindow::Paint( const Rectangle& rRect )
|
|
|
|
{
|
|
|
|
pEditor->Paint( rRect );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DialogWindow::Resize()
|
|
|
|
{
|
2001-02-26 10:14:44 +00:00
|
|
|
if ( GetHScrollBar() && GetVScrollBar() ) {
|
|
|
|
pEditor->SetScrollBars( GetHScrollBar(), GetVScrollBar() );
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DialogWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
pEditor->MouseButtonDown( rMEvt );
|
2001-11-14 09:53:42 +00:00
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DialogWindow::MouseButtonUp( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
pEditor->MouseButtonUp( rMEvt );
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if( (pEditor->GetMode() == DlgEditor::INSERT) && !pEditor->IsCreateOK() )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
pEditor->SetMode( DlgEditor::SELECT );
|
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_CHOOSE_CONTROLS );
|
|
|
|
}
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
{
|
|
|
|
pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
|
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
|
|
|
pBindings->Invalidate( SID_SAVEDOC );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DialogWindow::MouseMove( const MouseEvent& rMEvt )
|
|
|
|
{
|
|
|
|
pEditor->MouseMove( rMEvt );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DialogWindow::KeyInput( const KeyEvent& rKEvt )
|
|
|
|
{
|
|
|
|
if( rKEvt.GetKeyCode() == KEY_BACKSPACE )
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxDispatcher* pDispatcher = GetDispatcher())
|
2000-09-29 10:02:42 +00:00
|
|
|
pDispatcher->Execute( SID_BACKSPACE );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (rKEvt.GetKeyCode() == KEY_TAB)
|
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
|
|
|
pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
|
2008-01-28 13:03:36 +00:00
|
|
|
|
2000-09-29 10:02:42 +00:00
|
|
|
if( !pEditor->KeyInput( rKEvt ) )
|
|
|
|
{
|
|
|
|
if( !SfxViewShell::Current()->KeyInput( rKEvt ) )
|
|
|
|
Window::KeyInput( rKEvt );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindow::Command( const CommandEvent& rCEvt )
|
|
|
|
{
|
2010-11-13 00:33:43 -08:00
|
|
|
if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
|
|
|
|
( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
|
|
|
|
( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
HandleScrollCommand( rCEvt, GetHScrollBar(), GetVScrollBar() );
|
|
|
|
}
|
2001-10-17 09:17:18 +00:00
|
|
|
else if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxDispatcher* pDispatcher = GetDispatcher())
|
2002-11-05 07:59:43 +00:00
|
|
|
{
|
|
|
|
SdrView* pView = GetView();
|
2004-07-12 14:54:25 +00:00
|
|
|
if( !rCEvt.IsMouseEvent() && pView->AreObjectsMarked() )
|
2002-11-05 07:59:43 +00:00
|
|
|
{
|
|
|
|
Rectangle aMarkedRect( pView->GetMarkedRect() );
|
|
|
|
Point MarkedCenter( aMarkedRect.Center() );
|
|
|
|
Point PosPixel( LogicToPixel( MarkedCenter ) );
|
|
|
|
pDispatcher->ExecutePopup( IDEResId(RID_POPUP_DLGED), this, &PosPixel );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pDispatcher->ExecutePopup( IDEResId(RID_POPUP_DLGED) );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2001-10-17 09:17:18 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
else
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
BaseWindow::Command( rCEvt );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IMPL_LINK( DialogWindow, NotifyUndoActionHdl, SfxUndoAction *, pUndoAction )
|
|
|
|
{
|
2007-01-16 15:29:09 +00:00
|
|
|
(void)pUndoAction;
|
|
|
|
|
2000-09-29 10:02:42 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-11 22:45:31 +01:00
|
|
|
void DialogWindow::DoInit()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
GetHScrollBar()->Show();
|
|
|
|
GetVScrollBar()->Show();
|
|
|
|
pEditor->SetScrollBars( GetHScrollBar(), GetVScrollBar() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-11 22:45:31 +01:00
|
|
|
void DialogWindow::DoScroll( ScrollBar* pCurScrollBar )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
pEditor->DoScroll( pCurScrollBar );
|
|
|
|
}
|
|
|
|
|
2010-12-11 22:45:31 +01:00
|
|
|
void DialogWindow::GetState( SfxItemSet& rSet )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
SfxWhichIter aIter(rSet);
|
2011-12-05 09:56:17 +00:00
|
|
|
bool bIsCalc = false;
|
|
|
|
if ( GetDocument().isDocument() )
|
|
|
|
{
|
|
|
|
Reference< frame::XModel > xModel= GetDocument().getDocument();
|
|
|
|
if ( xModel.is() )
|
|
|
|
{
|
|
|
|
Reference< lang::XServiceInfo > xServiceInfo ( xModel, UNO_QUERY );
|
|
|
|
if ( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument") ) ) )
|
|
|
|
bIsCalc = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-14 11:16:25 +01:00
|
|
|
for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
switch ( nWh )
|
|
|
|
{
|
|
|
|
case SID_PASTE:
|
2001-10-17 09:17:18 +00:00
|
|
|
{
|
2001-11-12 21:39:49 +00:00
|
|
|
if ( !IsPasteAllowed() )
|
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
|
|
|
|
if ( IsReadOnly() )
|
2001-10-17 09:17:18 +00:00
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
break;
|
|
|
|
case SID_COPY:
|
2001-11-12 21:39:49 +00:00
|
|
|
{
|
|
|
|
// any object selected?
|
2004-07-12 14:54:25 +00:00
|
|
|
if ( !pEditor->GetView()->AreObjectsMarked() )
|
2001-11-12 21:39:49 +00:00
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_CUT:
|
2000-09-29 10:02:42 +00:00
|
|
|
case SID_DELETE:
|
|
|
|
case SID_BACKSPACE:
|
|
|
|
{
|
2001-10-17 09:17:18 +00:00
|
|
|
// any object selected?
|
2004-07-12 14:54:25 +00:00
|
|
|
if ( !pEditor->GetView()->AreObjectsMarked() )
|
2001-10-17 09:17:18 +00:00
|
|
|
rSet.DisableItem( nWh );
|
2001-11-12 21:39:49 +00:00
|
|
|
|
|
|
|
if ( IsReadOnly() )
|
|
|
|
rSet.DisableItem( nWh );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_REDO:
|
|
|
|
{
|
|
|
|
if ( !pUndoMgr->GetUndoActionCount() )
|
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_DIALOG_TESTMODE:
|
|
|
|
{
|
2011-08-22 11:39:37 +02:00
|
|
|
// is the IDE still active?
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
bool const bBool = GetShell()->GetFrame() &&
|
|
|
|
pEditor->GetMode() == DlgEditor::TEST;
|
2012-08-07 08:36:40 +02:00
|
|
|
rSet.Put(SfxBoolItem(SID_DIALOG_TESTMODE, bBool));
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_CHOOSE_CONTROLS:
|
|
|
|
{
|
2001-11-12 21:39:49 +00:00
|
|
|
if ( IsReadOnly() )
|
|
|
|
{
|
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
else
|
|
|
|
{
|
2001-11-12 21:39:49 +00:00
|
|
|
SfxAllEnumItem aItem( SID_CHOOSE_CONTROLS );
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if ( GetEditor()->GetMode() == DlgEditor::SELECT )
|
2001-11-12 21:39:49 +00:00
|
|
|
aItem.SetValue( SVX_SNAP_SELECT );
|
|
|
|
else
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2011-01-14 11:16:25 +01:00
|
|
|
sal_uInt16 nObj;
|
2001-11-12 21:39:49 +00:00
|
|
|
switch( pEditor->GetInsertObj() )
|
|
|
|
{
|
|
|
|
case OBJ_DLG_PUSHBUTTON: nObj = SVX_SNAP_PUSHBUTTON; break;
|
|
|
|
case OBJ_DLG_RADIOBUTTON: nObj = SVX_SNAP_RADIOBUTTON; break;
|
|
|
|
case OBJ_DLG_CHECKBOX: nObj = SVX_SNAP_CHECKBOX; break;
|
|
|
|
case OBJ_DLG_LISTBOX: nObj = SVX_SNAP_LISTBOX; break;
|
|
|
|
case OBJ_DLG_COMBOBOX: nObj = SVX_SNAP_COMBOBOX; break;
|
|
|
|
case OBJ_DLG_GROUPBOX: nObj = SVX_SNAP_GROUPBOX; break;
|
|
|
|
case OBJ_DLG_EDIT: nObj = SVX_SNAP_EDIT; break;
|
|
|
|
case OBJ_DLG_FIXEDTEXT: nObj = SVX_SNAP_FIXEDTEXT; break;
|
|
|
|
case OBJ_DLG_IMAGECONTROL: nObj = SVX_SNAP_IMAGECONTROL; break;
|
|
|
|
case OBJ_DLG_PROGRESSBAR: nObj = SVX_SNAP_PROGRESSBAR; break;
|
|
|
|
case OBJ_DLG_HSCROLLBAR: nObj = SVX_SNAP_HSCROLLBAR; break;
|
|
|
|
case OBJ_DLG_VSCROLLBAR: nObj = SVX_SNAP_VSCROLLBAR; break;
|
|
|
|
case OBJ_DLG_HFIXEDLINE: nObj = SVX_SNAP_HFIXEDLINE; break;
|
|
|
|
case OBJ_DLG_VFIXEDLINE: nObj = SVX_SNAP_VFIXEDLINE; break;
|
|
|
|
case OBJ_DLG_DATEFIELD: nObj = SVX_SNAP_DATEFIELD; break;
|
|
|
|
case OBJ_DLG_TIMEFIELD: nObj = SVX_SNAP_TIMEFIELD; break;
|
|
|
|
case OBJ_DLG_NUMERICFIELD: nObj = SVX_SNAP_NUMERICFIELD; break;
|
|
|
|
case OBJ_DLG_CURRENCYFIELD: nObj = SVX_SNAP_CURRENCYFIELD; break;
|
|
|
|
case OBJ_DLG_FORMATTEDFIELD: nObj = SVX_SNAP_FORMATTEDFIELD; break;
|
|
|
|
case OBJ_DLG_PATTERNFIELD: nObj = SVX_SNAP_PATTERNFIELD; break;
|
|
|
|
case OBJ_DLG_FILECONTROL: nObj = SVX_SNAP_FILECONTROL; break;
|
2011-11-29 10:26:33 +00:00
|
|
|
case OBJ_DLG_SPINBUTTON: nObj = SVX_SNAP_SPINBUTTON; break;
|
2007-07-03 12:02:16 +00:00
|
|
|
case OBJ_DLG_TREECONTROL: nObj = SVX_SNAP_TREECONTROL; break;
|
2001-11-12 21:39:49 +00:00
|
|
|
default: nObj = 0;
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
#ifdef DBG_UTIL
|
2001-11-12 21:39:49 +00:00
|
|
|
if( !nObj )
|
|
|
|
{
|
|
|
|
DBG_WARNING( "SID_CHOOSE_CONTROLS: Unbekannt!" );
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
#endif
|
2001-11-12 21:39:49 +00:00
|
|
|
aItem.SetValue( nObj );
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2001-11-12 21:39:49 +00:00
|
|
|
rSet.Put( aItem );
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-11-14 09:53:42 +00:00
|
|
|
|
|
|
|
case SID_SHOW_PROPERTYBROWSER:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
Shell* pShell = GetShell();
|
|
|
|
SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : NULL;
|
2004-07-12 14:54:25 +00:00
|
|
|
if ( pViewFrame && !pViewFrame->HasChildWindow( SID_SHOW_PROPERTYBROWSER ) && !pEditor->GetView()->AreObjectsMarked() )
|
2001-11-14 09:53:42 +00:00
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
|
|
|
|
if ( IsReadOnly() )
|
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
}
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_RADIO:
|
|
|
|
case SID_INSERT_FORM_CHECK:
|
|
|
|
case SID_INSERT_FORM_LIST:
|
|
|
|
case SID_INSERT_FORM_COMBO:
|
|
|
|
case SID_INSERT_FORM_VSCROLL:
|
|
|
|
case SID_INSERT_FORM_HSCROLL:
|
|
|
|
case SID_INSERT_FORM_SPIN:
|
2011-12-05 09:56:17 +00:00
|
|
|
{
|
|
|
|
if ( !bIsCalc || IsReadOnly() )
|
|
|
|
rSet.DisableItem( nWh );
|
|
|
|
}
|
|
|
|
break;
|
2012-08-17 07:29:20 +02:00
|
|
|
case SID_SHOWLINES:
|
|
|
|
{
|
|
|
|
// if this is not a module window hide the
|
|
|
|
// setting, doesn't make sense for example if the
|
|
|
|
// dialog editor is open
|
|
|
|
rSet.DisableItem(nWh);
|
|
|
|
rSet.Put(SfxVisibilityItem(nWh, false));
|
|
|
|
break;
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-12-11 22:45:31 +01:00
|
|
|
void DialogWindow::ExecuteCommand( SfxRequest& rReq )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
switch ( rReq.GetSlot() )
|
|
|
|
{
|
|
|
|
case SID_CUT:
|
2001-11-12 21:39:49 +00:00
|
|
|
if ( !IsReadOnly() )
|
|
|
|
{
|
|
|
|
GetEditor()->Cut();
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
2001-11-12 21:39:49 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
break;
|
|
|
|
case SID_DELETE:
|
2001-11-12 21:39:49 +00:00
|
|
|
if ( !IsReadOnly() )
|
|
|
|
{
|
|
|
|
GetEditor()->Delete();
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
2001-11-12 21:39:49 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
break;
|
|
|
|
case SID_COPY:
|
|
|
|
GetEditor()->Copy();
|
|
|
|
break;
|
|
|
|
case SID_PASTE:
|
2001-11-12 21:39:49 +00:00
|
|
|
if ( !IsReadOnly() )
|
|
|
|
{
|
|
|
|
GetEditor()->Paste();
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
2001-11-12 21:39:49 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_RADIO:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMRADIO );
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_CHECK:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMCHECK );
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_LIST:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMLIST );
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_COMBO:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMCOMBO );
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_SPIN:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMSPIN );
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_VSCROLL:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMVSCROLL );
|
|
|
|
break;
|
2012-01-06 09:43:42 +00:00
|
|
|
case SID_INSERT_FORM_HSCROLL:
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-12-05 09:56:17 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMHSCROLL );
|
|
|
|
break;
|
2000-09-29 10:02:42 +00:00
|
|
|
case SID_CHOOSE_CONTROLS:
|
|
|
|
{
|
|
|
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
|
|
|
DBG_ASSERT( pArgs, "Nix Args" );
|
|
|
|
|
|
|
|
const SfxAllEnumItem& rItem = (SfxAllEnumItem&)pArgs->Get( SID_CHOOSE_CONTROLS );
|
|
|
|
switch( rItem.GetValue() )
|
|
|
|
{
|
|
|
|
case SVX_SNAP_PUSHBUTTON:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2000-09-29 10:02:42 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_PUSHBUTTON );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_RADIOBUTTON:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2000-09-29 10:02:42 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_RADIOBUTTON );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_CHECKBOX:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2000-09-29 10:02:42 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_CHECKBOX);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_LISTBOX:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2000-09-29 10:02:42 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_LISTBOX );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_COMBOBOX:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2000-09-29 10:02:42 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_COMBOBOX );
|
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_GROUPBOX:
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_GROUPBOX );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_EDIT:
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_EDIT );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_FIXEDTEXT:
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FIXEDTEXT );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_IMAGECONTROL:
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_IMAGECONTROL );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_PROGRESSBAR:
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_PROGRESSBAR );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_HSCROLLBAR:
|
2001-05-14 07:48:49 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_HSCROLLBAR );
|
2001-05-14 07:48:49 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_VSCROLLBAR:
|
2001-05-14 07:48:49 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-08-17 13:03:07 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_VSCROLLBAR );
|
2001-05-14 07:48:49 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_HFIXEDLINE:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-05-14 07:48:49 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_HFIXEDLINE );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_VFIXEDLINE:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-05-14 07:48:49 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_VFIXEDLINE );
|
|
|
|
}
|
|
|
|
break;
|
2001-09-17 10:24:18 +00:00
|
|
|
case SVX_SNAP_DATEFIELD:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_DATEFIELD );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_TIMEFIELD:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_TIMEFIELD );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_NUMERICFIELD:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_NUMERICFIELD );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_CURRENCYFIELD:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_CURRENCYFIELD );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_FORMATTEDFIELD:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FORMATTEDFIELD );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_PATTERNFIELD:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_PATTERNFIELD );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SVX_SNAP_FILECONTROL:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2001-09-17 10:24:18 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_FILECONTROL );
|
|
|
|
}
|
|
|
|
break;
|
2011-11-29 10:26:33 +00:00
|
|
|
case SVX_SNAP_SPINBUTTON:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2011-11-29 10:26:33 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_SPINBUTTON );
|
|
|
|
}
|
|
|
|
break;
|
2007-07-03 12:02:16 +00:00
|
|
|
case SVX_SNAP_TREECONTROL:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::INSERT );
|
2007-07-03 12:02:16 +00:00
|
|
|
GetEditor()->SetInsertObj( OBJ_DLG_TREECONTROL );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-08-17 13:03:07 +00:00
|
|
|
case SVX_SNAP_SELECT:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
GetEditor()->SetMode( DlgEditor::SELECT );
|
2001-08-17 13:03:07 +00:00
|
|
|
}
|
|
|
|
break;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2002-04-24 13:52:16 +00:00
|
|
|
if ( rReq.GetModifier() & KEY_MOD1 )
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if ( GetEditor()->GetMode() == DlgEditor::INSERT )
|
2002-04-24 13:52:16 +00:00
|
|
|
GetEditor()->CreateDefaultObject();
|
|
|
|
}
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_DIALOG_TESTMODE:
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
DlgEditor::Mode eOldMode = GetEditor()->GetMode();
|
|
|
|
GetEditor()->SetMode( DlgEditor::TEST );
|
2000-09-29 10:02:42 +00:00
|
|
|
GetEditor()->SetMode( eOldMode );
|
|
|
|
rReq.Done();
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2006-01-03 11:42:40 +00:00
|
|
|
pBindings->Invalidate( SID_DIALOG_TESTMODE );
|
2000-09-29 10:02:42 +00:00
|
|
|
return;
|
|
|
|
}
|
2007-06-26 15:51:32 +00:00
|
|
|
case SID_EXPORT_DIALOG:
|
|
|
|
SaveDialog();
|
|
|
|
break;
|
2009-11-03 18:12:19 +01:00
|
|
|
|
|
|
|
case SID_IMPORT_DIALOG:
|
|
|
|
ImportDialog();
|
|
|
|
break;
|
2012-08-17 07:29:20 +02:00
|
|
|
|
|
|
|
case SID_BASICIDE_DELETECURRENT:
|
|
|
|
if (QueryDelDialog(m_aName, this))
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (RemoveDialog(m_aDocument, m_aLibName, m_aName))
|
2012-08-17 07:29:20 +02:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
MarkDocumentModified(m_aDocument);
|
|
|
|
GetShell()->RemoveWindow(this, true);
|
2012-08-17 07:29:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
rReq.Done();
|
|
|
|
}
|
|
|
|
|
2001-06-15 07:45:19 +00:00
|
|
|
Reference< container::XNameContainer > DialogWindow::GetDialog() const
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2001-06-15 07:45:19 +00:00
|
|
|
return pEditor->GetDialog();
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-08-01 10:05:20 +09:00
|
|
|
bool DialogWindow::RenameDialog( const ::rtl::OUString& rNewName )
|
2001-06-15 07:45:19 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if ( !basctl::RenameDialog( this, GetDocument(), GetLibName(), GetName(), rNewName ) )
|
2012-08-01 10:05:20 +09:00
|
|
|
return false;
|
2000-09-29 10:02:42 +00:00
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (SfxBindings* pBindings = GetBindingsPtr())
|
2007-03-15 14:53:05 +00:00
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2012-08-01 10:05:20 +09:00
|
|
|
return true;
|
2001-06-15 07:45:19 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
|
|
|
|
void DialogWindow::DisableBrowser()
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
Shell* pShell = GetShell();
|
|
|
|
SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : 0;
|
|
|
|
SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow(SID_SHOW_PROPERTYBROWSER) : 0;
|
2000-09-29 10:02:42 +00:00
|
|
|
if( pChildWin )
|
2008-03-06 18:11:59 +00:00
|
|
|
((PropBrw*)(pChildWin->GetWindow()))->Update( NULL );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindow::UpdateBrowser()
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
Shell* pShell = GetShell();
|
|
|
|
SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : 0;
|
|
|
|
SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow(SID_SHOW_PROPERTYBROWSER) : 0;
|
2000-09-29 10:02:42 +00:00
|
|
|
if( pChildWin )
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
((PropBrw*)(pChildWin->GetWindow()))->Update( pShell );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2010-11-08 04:27:22 -05:00
|
|
|
static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
|
2007-06-26 15:51:32 +00:00
|
|
|
|
2012-07-24 17:46:32 +09:00
|
|
|
bool DialogWindow::SaveDialog()
|
2007-06-26 15:51:32 +00:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( DialogWindow, 0 );
|
2012-07-24 17:46:32 +09:00
|
|
|
bool bDone = false;
|
2007-06-26 15:51:32 +00:00
|
|
|
|
|
|
|
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
|
|
|
|
Reference < XFilePicker > xFP;
|
|
|
|
if( xMSF.is() )
|
|
|
|
{
|
|
|
|
Sequence <Any> aServiceType(1);
|
|
|
|
aServiceType[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
|
|
|
|
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
|
|
|
|
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
|
2012-08-07 08:36:40 +02:00
|
|
|
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
|
2007-06-26 15:51:32 +00:00
|
|
|
Any aValue;
|
2012-08-07 08:36:40 +02:00
|
|
|
aValue <<= sal_True;
|
2007-06-26 15:51:32 +00:00
|
|
|
xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
|
|
|
|
|
2011-12-09 01:58:49 -05:00
|
|
|
if ( !aCurPath.isEmpty() )
|
2007-06-26 15:51:32 +00:00
|
|
|
xFP->setDisplayDirectory ( aCurPath );
|
|
|
|
|
|
|
|
xFP->setDefaultName( ::rtl::OUString( GetName() ) );
|
|
|
|
|
2012-04-29 23:36:57 +01:00
|
|
|
::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
|
2007-06-26 15:51:32 +00:00
|
|
|
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
|
|
|
|
xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
|
2012-04-29 23:36:57 +01:00
|
|
|
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
|
2007-06-26 15:51:32 +00:00
|
|
|
xFltMgr->setCurrentFilter( aDialogStr );
|
|
|
|
|
|
|
|
if( xFP->execute() == RET_OK )
|
|
|
|
{
|
|
|
|
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
|
|
|
|
aCurPath = aPaths[0];
|
|
|
|
|
|
|
|
// export dialog model to xml
|
|
|
|
Reference< container::XNameContainer > xDialogModel = GetDialog();
|
|
|
|
Reference< XComponentContext > xContext;
|
|
|
|
Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
|
|
|
|
OSL_ASSERT( xProps.is() );
|
|
|
|
OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
|
2010-10-06 10:16:13 +01:00
|
|
|
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
|
2007-06-26 15:51:32 +00:00
|
|
|
Reference< XInputStream > xInput( xISP->createInputStream() );
|
|
|
|
|
2012-05-29 17:17:28 +02:00
|
|
|
Reference< XSimpleFileAccess2 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
|
2007-06-26 15:51:32 +00:00
|
|
|
|
|
|
|
Reference< XOutputStream > xOutput;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if( xSFI->exists( aCurPath ) )
|
|
|
|
xSFI->kill( aCurPath );
|
|
|
|
xOutput = xSFI->openFileWrite( aCurPath );
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const Exception& )
|
2007-06-26 15:51:32 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
if( xOutput.is() )
|
|
|
|
{
|
|
|
|
Sequence< sal_Int8 > bytes;
|
|
|
|
sal_Int32 nRead = xInput->readBytes( bytes, xInput->available() );
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
if( nRead )
|
|
|
|
xOutput->writeBytes( bytes );
|
|
|
|
|
|
|
|
nRead = xInput->readBytes( bytes, 1024 );
|
|
|
|
if (! nRead)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
bDone = true;
|
|
|
|
|
|
|
|
// With resource?
|
|
|
|
Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
|
|
|
|
Reference< resource::XStringResourceResolver > xStringResourceResolver;
|
|
|
|
if( xDialogModelPropSet.is() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Any aResourceResolver = xDialogModelPropSet->getPropertyValue( aResourceResolverPropName );
|
|
|
|
aResourceResolver >>= xStringResourceResolver;
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const beans::UnknownPropertyException& )
|
2007-06-26 15:51:32 +00:00
|
|
|
{}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool bResource = false;
|
|
|
|
if( xStringResourceResolver.is() )
|
|
|
|
{
|
|
|
|
Sequence< lang::Locale > aLocaleSeq = xStringResourceResolver->getLocales();
|
|
|
|
sal_Int32 nLocaleCount = aLocaleSeq.getLength();
|
|
|
|
if( nLocaleCount > 0 )
|
|
|
|
bResource = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bResource )
|
|
|
|
{
|
|
|
|
INetURLObject aURLObj( aCurPath );
|
|
|
|
aURLObj.removeExtension();
|
|
|
|
::rtl::OUString aDialogName( aURLObj.getName() );
|
|
|
|
aURLObj.removeSegment();
|
|
|
|
::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
|
2012-08-07 08:36:40 +02:00
|
|
|
bool bReadOnly = false;
|
2010-11-08 04:27:22 -05:00
|
|
|
::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " ));
|
2007-06-26 15:51:32 +00:00
|
|
|
aComment += aDialogName;
|
2010-11-08 04:27:22 -05:00
|
|
|
aComment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " strings" ));
|
2007-06-26 15:51:32 +00:00
|
|
|
Reference< task::XInteractionHandler > xDummyHandler;
|
|
|
|
|
|
|
|
// Remove old properties files in case of overwriting Dialog files
|
|
|
|
if( xSFI->isFolder( aURL ) )
|
|
|
|
{
|
|
|
|
Sequence< ::rtl::OUString > aContentSeq = xSFI->getFolderContents( aURL, false );
|
|
|
|
|
|
|
|
::rtl::OUString aDialogName_( aDialogName );
|
2010-11-08 04:27:22 -05:00
|
|
|
aDialogName_ += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_" ));
|
2007-06-26 15:51:32 +00:00
|
|
|
sal_Int32 nCount = aContentSeq.getLength();
|
|
|
|
const ::rtl::OUString* pFiles = aContentSeq.getConstArray();
|
|
|
|
for( int i = 0 ; i < nCount ; i++ )
|
|
|
|
{
|
|
|
|
::rtl::OUString aCompleteName = pFiles[i];
|
|
|
|
rtl::OUString aPureName;
|
|
|
|
rtl::OUString aExtension;
|
|
|
|
sal_Int32 iDot = aCompleteName.lastIndexOf( '.' );
|
|
|
|
sal_Int32 iSlash = aCompleteName.lastIndexOf( '/' );
|
|
|
|
if( iDot != -1 )
|
|
|
|
{
|
|
|
|
sal_Int32 iCopyFrom = (iSlash != -1) ? iSlash + 1 : 0;
|
|
|
|
aPureName = aCompleteName.copy( iCopyFrom, iDot-iCopyFrom );
|
|
|
|
aExtension = aCompleteName.copy( iDot + 1 );
|
|
|
|
}
|
|
|
|
|
2012-04-06 19:49:53 +02:00
|
|
|
if( aExtension == "properties" || aExtension == "default" )
|
2007-06-26 15:51:32 +00:00
|
|
|
{
|
|
|
|
if( aPureName.indexOf( aDialogName_ ) == 0 )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
xSFI->kill( aCompleteName );
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const uno::Exception& )
|
2007-06-26 15:51:32 +00:00
|
|
|
{}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XStringResourceWithLocation > xStringResourceWithLocation =
|
|
|
|
StringResourceWithLocation::create( xContext, aURL, bReadOnly,
|
|
|
|
xStringResourceResolver->getDefaultLocale(), aDialogName, aComment, xDummyHandler );
|
|
|
|
|
|
|
|
// Add locales
|
|
|
|
Sequence< lang::Locale > aLocaleSeq = xStringResourceResolver->getLocales();
|
|
|
|
const lang::Locale* pLocales = aLocaleSeq.getConstArray();
|
|
|
|
sal_Int32 nLocaleCount = aLocaleSeq.getLength();
|
|
|
|
for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
|
|
|
|
{
|
|
|
|
const lang::Locale& rLocale = pLocales[ iLocale ];
|
|
|
|
xStringResourceWithLocation->newLocale( rLocale );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XStringResourceManager > xTargetStringResourceManager( xStringResourceWithLocation, uno::UNO_QUERY );
|
|
|
|
|
|
|
|
LocalizationMgr::copyResourceForDialog( xDialogModel,
|
|
|
|
xStringResourceResolver, xTargetStringResourceManager );
|
|
|
|
|
|
|
|
xStringResourceWithLocation->store();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2012-04-29 23:36:57 +01:00
|
|
|
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_COULDNTWRITE)).Execute();
|
2007-06-26 15:51:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
|
2009-11-03 18:12:19 +01:00
|
|
|
extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
|
|
|
|
const ::com::sun::star::lang::Locale& rLocaleRight );
|
|
|
|
|
|
|
|
std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq
|
|
|
|
( Sequence< lang::Locale > aFirstSeq, Sequence< lang::Locale > aSecondSeq )
|
|
|
|
{
|
|
|
|
std::vector< lang::Locale > avRet;
|
|
|
|
|
|
|
|
const lang::Locale* pFirst = aFirstSeq.getConstArray();
|
|
|
|
const lang::Locale* pSecond = aSecondSeq.getConstArray();
|
|
|
|
sal_Int32 nFirstCount = aFirstSeq.getLength();
|
|
|
|
sal_Int32 nSecondCount = aSecondSeq.getLength();
|
|
|
|
|
|
|
|
for( sal_Int32 iFirst = 0 ; iFirst < nFirstCount ; iFirst++ )
|
|
|
|
{
|
|
|
|
const lang::Locale& rFirstLocale = pFirst[ iFirst ];
|
|
|
|
|
|
|
|
bool bAlsoContainedInSecondSeq = false;
|
|
|
|
for( sal_Int32 iSecond = 0 ; iSecond < nSecondCount ; iSecond++ )
|
|
|
|
{
|
|
|
|
const lang::Locale& rSecondLocale = pSecond[ iSecond ];
|
|
|
|
|
|
|
|
bool bMatch = localesAreEqual( rFirstLocale, rSecondLocale );
|
|
|
|
if( bMatch )
|
|
|
|
{
|
|
|
|
bAlsoContainedInSecondSeq = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !bAlsoContainedInSecondSeq )
|
|
|
|
avRet.push_back( rFirstLocale );
|
|
|
|
}
|
|
|
|
|
|
|
|
return avRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class NameClashQueryBox : public MessBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NameClashQueryBox( Window* pParent,
|
|
|
|
const XubString& rTitle, const XubString& rMessage );
|
|
|
|
};
|
|
|
|
|
|
|
|
NameClashQueryBox::NameClashQueryBox( Window* pParent,
|
|
|
|
const XubString& rTitle, const XubString& rMessage )
|
|
|
|
: MessBox( pParent, 0, rTitle, rMessage )
|
|
|
|
{
|
|
|
|
if ( rTitle.Len() )
|
|
|
|
SetText( rTitle );
|
|
|
|
|
|
|
|
maMessText = rMessage;
|
|
|
|
|
2012-04-29 23:36:57 +01:00
|
|
|
AddButton( IDE_RESSTR(RID_STR_DLGIMP_CLASH_RENAME), RET_YES,
|
2009-11-03 18:12:19 +01:00
|
|
|
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
|
2012-04-29 23:36:57 +01:00
|
|
|
AddButton( IDE_RESSTR(RID_STR_DLGIMP_CLASH_REPLACE), RET_NO, 0 );
|
2009-11-03 18:12:19 +01:00
|
|
|
AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
|
|
|
|
|
2010-11-13 00:33:43 -08:00
|
|
|
SetImage( QueryBox::GetStandardImage() );
|
2009-11-03 18:12:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class LanguageMismatchQueryBox : public MessBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LanguageMismatchQueryBox( Window* pParent,
|
|
|
|
const XubString& rTitle, const XubString& rMessage );
|
|
|
|
};
|
|
|
|
|
|
|
|
LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
|
|
|
|
const XubString& rTitle, const XubString& rMessage )
|
|
|
|
: MessBox( pParent, 0, rTitle, rMessage )
|
|
|
|
{
|
|
|
|
if ( rTitle.Len() )
|
|
|
|
SetText( rTitle );
|
|
|
|
|
|
|
|
maMessText = rMessage;
|
2012-04-29 23:36:57 +01:00
|
|
|
AddButton( IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_ADD), RET_YES,
|
2009-11-03 18:12:19 +01:00
|
|
|
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
|
2012-04-29 23:36:57 +01:00
|
|
|
AddButton( IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_OMIT), RET_NO, 0 );
|
2009-11-03 18:12:19 +01:00
|
|
|
AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
|
|
|
|
AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 4 );
|
|
|
|
|
2010-11-13 00:33:43 -08:00
|
|
|
SetImage( QueryBox::GetStandardImage() );
|
2009-11-03 18:12:19 +01:00
|
|
|
}
|
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
|
2012-07-24 17:46:32 +09:00
|
|
|
bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName )
|
2009-11-03 18:12:19 +01:00
|
|
|
{
|
2012-07-24 17:46:32 +09:00
|
|
|
bool bDone = false;
|
2009-11-03 18:12:19 +01:00
|
|
|
|
|
|
|
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
|
|
|
|
Reference < XFilePicker > xFP;
|
|
|
|
if( xMSF.is() )
|
|
|
|
{
|
|
|
|
Sequence <Any> aServiceType(1);
|
|
|
|
aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
|
|
|
|
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
|
|
|
|
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
|
2012-08-07 08:36:40 +02:00
|
|
|
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
|
2009-11-03 18:12:19 +01:00
|
|
|
Any aValue;
|
2012-08-07 08:36:40 +02:00
|
|
|
aValue <<= sal_True;
|
2009-11-03 18:12:19 +01:00
|
|
|
xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
|
|
|
|
|
2011-12-09 01:58:49 -05:00
|
|
|
::rtl::OUString aCurPath( rCurPath );
|
|
|
|
if ( !aCurPath.isEmpty() )
|
2009-11-03 18:12:19 +01:00
|
|
|
xFP->setDisplayDirectory ( aCurPath );
|
|
|
|
|
2012-04-29 23:36:57 +01:00
|
|
|
::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
|
2009-11-03 18:12:19 +01:00
|
|
|
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
|
|
|
|
xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
|
2012-04-29 23:36:57 +01:00
|
|
|
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FILTERMASK_ALL ) ) );
|
2009-11-03 18:12:19 +01:00
|
|
|
xFltMgr->setCurrentFilter( aDialogStr );
|
|
|
|
|
|
|
|
if( xFP->execute() == RET_OK )
|
|
|
|
{
|
|
|
|
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
|
|
|
|
aCurPath = aPaths[0];
|
|
|
|
|
|
|
|
::rtl::OUString aBasePath;
|
|
|
|
::rtl::OUString aOUCurPath( aCurPath );
|
|
|
|
sal_Int32 iSlash = aOUCurPath.lastIndexOf( '/' );
|
|
|
|
if( iSlash != -1 )
|
|
|
|
aBasePath = aOUCurPath.copy( 0, iSlash + 1 );
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// create dialog model
|
|
|
|
Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
|
|
|
|
( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY_THROW );
|
|
|
|
|
2012-05-29 17:17:28 +02:00
|
|
|
Reference< XSimpleFileAccess2 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
|
2009-11-03 18:12:19 +01:00
|
|
|
|
|
|
|
Reference< XInputStream > xInput;
|
|
|
|
if( xSFI->exists( aCurPath ) )
|
|
|
|
xInput = xSFI->openFileRead( aCurPath );
|
|
|
|
|
|
|
|
Reference< XComponentContext > xContext;
|
|
|
|
Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
|
|
|
|
OSL_ASSERT( xProps.is() );
|
|
|
|
OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
|
2010-10-06 10:16:13 +01:00
|
|
|
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
|
2009-11-03 18:12:19 +01:00
|
|
|
|
2011-12-09 01:58:49 -05:00
|
|
|
::rtl::OUString aXmlDlgName;
|
2009-11-03 18:12:19 +01:00
|
|
|
Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
|
|
|
|
if( xDialogModelPropSet.is() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME );
|
|
|
|
::rtl::OUString aOUXmlDialogName;
|
|
|
|
aXmlDialogNameAny >>= aOUXmlDialogName;
|
|
|
|
aXmlDlgName = aOUXmlDialogName;
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const beans::UnknownPropertyException& )
|
2009-11-03 18:12:19 +01:00
|
|
|
{}
|
|
|
|
}
|
2011-12-09 01:58:49 -05:00
|
|
|
bool bValidName = !aXmlDlgName.isEmpty();
|
2009-11-03 18:12:19 +01:00
|
|
|
OSL_ASSERT( bValidName );
|
|
|
|
if( !bValidName )
|
|
|
|
return bDone;
|
|
|
|
|
|
|
|
bool bDialogAlreadyExists = rDocument.hasDialog( aLibName, aXmlDlgName );
|
|
|
|
|
2011-12-09 01:58:49 -05:00
|
|
|
::rtl::OUString aNewDlgName = aXmlDlgName;
|
2009-11-03 18:12:19 +01:00
|
|
|
enum NameClashMode
|
|
|
|
{
|
|
|
|
NO_CLASH,
|
|
|
|
CLASH_OVERWRITE_DIALOG,
|
|
|
|
CLASH_RENAME_DIALOG,
|
|
|
|
};
|
|
|
|
NameClashMode eNameClashMode = NO_CLASH;
|
|
|
|
if( bDialogAlreadyExists )
|
|
|
|
{
|
2012-04-29 23:36:57 +01:00
|
|
|
::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TITLE));
|
|
|
|
::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
|
2012-03-08 00:49:32 +01:00
|
|
|
aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName);
|
2009-11-03 18:12:19 +01:00
|
|
|
|
|
|
|
NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
|
2011-01-14 11:16:25 +01:00
|
|
|
sal_uInt16 nRet = aQueryBox.Execute();
|
2009-11-03 18:12:19 +01:00
|
|
|
if( RET_YES == nRet )
|
|
|
|
{
|
|
|
|
// RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox
|
|
|
|
eNameClashMode = CLASH_RENAME_DIALOG;
|
|
|
|
|
|
|
|
aNewDlgName = rDocument.createObjectName( E_DIALOGS, aLibName );
|
|
|
|
}
|
|
|
|
else if( RET_NO == nRet )
|
|
|
|
{
|
|
|
|
// RET_NO == Replace, see NameClashQueryBox::NameClashQueryBox
|
|
|
|
eNameClashMode = CLASH_OVERWRITE_DIALOG;
|
|
|
|
}
|
|
|
|
else if( RET_CANCEL == nRet )
|
|
|
|
{
|
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
Shell* pShell = GetShell();
|
|
|
|
if (!pShell)
|
2009-11-03 18:12:19 +01:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
OSL_ASSERT(pShell);
|
2009-11-03 18:12:19 +01:00
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Resource?
|
|
|
|
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
|
|
|
|
Reference< task::XInteractionHandler > xDummyHandler;
|
|
|
|
bool bReadOnly = true;
|
|
|
|
Reference< XStringResourceWithLocation > xImportStringResource =
|
|
|
|
StringResourceWithLocation::create( xContext, aBasePath, bReadOnly,
|
|
|
|
aLocale, aXmlDlgName, ::rtl::OUString(), xDummyHandler );
|
|
|
|
|
|
|
|
Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales();
|
|
|
|
sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength();
|
|
|
|
|
2012-08-07 08:36:40 +02:00
|
|
|
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
|
2009-11-03 18:12:19 +01:00
|
|
|
Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
|
|
|
|
sal_Int32 nLibLocaleCount = 0;
|
|
|
|
Sequence< lang::Locale > aLibLocaleSeq;
|
|
|
|
if( xLibStringResourceManager.is() )
|
|
|
|
{
|
|
|
|
aLibLocaleSeq = xLibStringResourceManager->getLocales();
|
|
|
|
nLibLocaleCount = aLibLocaleSeq.getLength();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check language matches
|
|
|
|
std::vector< lang::Locale > aOnlyInImportLanguages =
|
|
|
|
implGetLanguagesOnlyContainedInFirstSeq( aImportLocaleSeq, aLibLocaleSeq );
|
|
|
|
int nOnlyInImportLanguageCount = aOnlyInImportLanguages.size();
|
|
|
|
|
|
|
|
// For now: Keep languages from lib
|
|
|
|
bool bLibLocalized = (nLibLocaleCount > 0);
|
|
|
|
bool bImportLocalized = (nImportLocaleCount > 0);
|
|
|
|
|
|
|
|
bool bAddDialogLanguagesToLib = false;
|
|
|
|
if( nOnlyInImportLanguageCount > 0 )
|
|
|
|
{
|
2012-04-29 23:36:57 +01:00
|
|
|
::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE));
|
|
|
|
::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT));
|
2009-11-03 18:12:19 +01:00
|
|
|
LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
|
2011-01-14 11:16:25 +01:00
|
|
|
sal_uInt16 nRet = aQueryBox.Execute();
|
2009-11-03 18:12:19 +01:00
|
|
|
if( RET_YES == nRet )
|
|
|
|
{
|
|
|
|
// RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
|
|
|
|
bAddDialogLanguagesToLib = true;
|
|
|
|
}
|
|
|
|
// RET_NO == Omit, see LanguageMismatchQueryBox::LanguageMismatchQueryBox
|
|
|
|
// -> nothing to do here
|
|
|
|
//else if( RET_NO == nRet )
|
|
|
|
//{
|
|
|
|
//}
|
|
|
|
else if( RET_CANCEL == nRet )
|
|
|
|
{
|
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bImportLocalized )
|
|
|
|
{
|
|
|
|
bool bCopyResourcesForDialog = true;
|
|
|
|
if( bAddDialogLanguagesToLib )
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
boost::shared_ptr<LocalizationMgr> pCurMgr = pShell->GetCurLocalizationMgr();
|
2009-11-03 18:12:19 +01:00
|
|
|
|
|
|
|
lang::Locale aFirstLocale;
|
|
|
|
aFirstLocale = aOnlyInImportLanguages[0];
|
|
|
|
if( nOnlyInImportLanguageCount > 1 )
|
|
|
|
{
|
|
|
|
// Check if import default belongs to only import languages and use it then
|
|
|
|
lang::Locale aImportDefaultLocale = xImportStringResource->getDefaultLocale();
|
|
|
|
lang::Locale aTmpLocale;
|
|
|
|
for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i )
|
|
|
|
{
|
|
|
|
aTmpLocale = aOnlyInImportLanguages[i];
|
|
|
|
if( localesAreEqual( aImportDefaultLocale, aTmpLocale ) )
|
|
|
|
{
|
|
|
|
aFirstLocale = aImportDefaultLocale;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Sequence< lang::Locale > aFirstLocaleSeq( 1 );
|
|
|
|
aFirstLocaleSeq[0] = aFirstLocale;
|
|
|
|
pCurMgr->handleAddLocales( aFirstLocaleSeq );
|
|
|
|
|
|
|
|
if( nOnlyInImportLanguageCount > 1 )
|
|
|
|
{
|
|
|
|
Sequence< lang::Locale > aRemainingLocaleSeq( nOnlyInImportLanguageCount - 1 );
|
|
|
|
lang::Locale aTmpLocale;
|
|
|
|
int iSeq = 0;
|
|
|
|
for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i )
|
|
|
|
{
|
|
|
|
aTmpLocale = aOnlyInImportLanguages[i];
|
|
|
|
if( !localesAreEqual( aFirstLocale, aTmpLocale ) )
|
|
|
|
aRemainingLocaleSeq[iSeq++] = aTmpLocale;
|
|
|
|
}
|
|
|
|
pCurMgr->handleAddLocales( aRemainingLocaleSeq );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( !bLibLocalized )
|
|
|
|
{
|
|
|
|
Reference< resource::XStringResourceManager > xImportStringResourceManager( xImportStringResource, UNO_QUERY );
|
|
|
|
LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResourceManager );
|
|
|
|
bCopyResourcesForDialog = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bCopyResourcesForDialog )
|
|
|
|
{
|
|
|
|
Reference< resource::XStringResourceResolver > xImportStringResourceResolver( xImportStringResource, UNO_QUERY );
|
|
|
|
LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName,
|
|
|
|
xLibStringResourceManager, xImportStringResourceResolver );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if( bLibLocalized )
|
|
|
|
{
|
|
|
|
LocalizationMgr::setResourceIDsForDialog( xDialogModel, xLibStringResourceManager );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LocalizationMgr::setStringResourceAtDialog( rDocument, aLibName, aNewDlgName, xDialogModel );
|
|
|
|
|
|
|
|
if( eNameClashMode == CLASH_OVERWRITE_DIALOG )
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
if (basctl::RemoveDialog( rDocument, aLibName, aNewDlgName ) )
|
2009-11-03 18:12:19 +01:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
BaseWindow* pDlgWin = pShell->FindDlgWin( rDocument, aLibName, aNewDlgName, false, true );
|
2009-11-03 18:12:19 +01:00
|
|
|
if( pDlgWin != NULL )
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
pShell->RemoveWindow( pDlgWin, true );
|
|
|
|
MarkDocumentModified( rDocument );
|
2009-11-03 18:12:19 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// TODO: Assertion?
|
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( eNameClashMode == CLASH_RENAME_DIALOG )
|
|
|
|
{
|
|
|
|
bool bRenamed = false;
|
|
|
|
if( xDialogModelPropSet.is() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Any aXmlDialogNameAny;
|
|
|
|
aXmlDialogNameAny <<= ::rtl::OUString( aNewDlgName );
|
|
|
|
xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, aXmlDialogNameAny );
|
|
|
|
bRenamed = true;
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const beans::UnknownPropertyException& )
|
2009-11-03 18:12:19 +01:00
|
|
|
{}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( bRenamed )
|
|
|
|
{
|
|
|
|
LocalizationMgr::renameStringResourceIDs( rDocument, aLibName, aNewDlgName, xDialogModel );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// TODO: Assertion?
|
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-06 10:16:13 +01:00
|
|
|
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
|
2009-11-03 18:12:19 +01:00
|
|
|
bool bSuccess = rDocument.insertDialog( aLibName, aNewDlgName, xISP );
|
|
|
|
if( bSuccess )
|
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
DialogWindow* pNewDlgWin = pShell->CreateDlgWin( rDocument, aLibName, aNewDlgName );
|
|
|
|
pShell->SetCurWindow( pNewDlgWin, true );
|
2009-11-03 18:12:19 +01:00
|
|
|
}
|
|
|
|
|
2012-07-24 17:46:32 +09:00
|
|
|
bDone = true;
|
2009-11-03 18:12:19 +01:00
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const Exception& )
|
2009-11-03 18:12:19 +01:00
|
|
|
{}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bDone;
|
|
|
|
}
|
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
|
2012-07-24 17:46:32 +09:00
|
|
|
bool DialogWindow::ImportDialog()
|
2009-11-03 18:12:19 +01:00
|
|
|
{
|
|
|
|
DBG_CHKTHIS( DialogWindow, 0 );
|
|
|
|
|
|
|
|
const ScriptDocument& rDocument = GetDocument();
|
2011-12-09 01:58:49 -05:00
|
|
|
::rtl::OUString aLibName = GetLibName();
|
2012-07-24 17:46:32 +09:00
|
|
|
return implImportDialog( this, aCurPath, rDocument, aLibName );
|
2009-11-03 18:12:19 +01:00
|
|
|
}
|
|
|
|
|
2003-03-26 11:48:08 +00:00
|
|
|
DlgEdModel* DialogWindow::GetModel() const
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2003-03-26 11:48:08 +00:00
|
|
|
return pEditor ? pEditor->GetModel() : NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
DlgEdPage* DialogWindow::GetPage() const
|
|
|
|
{
|
|
|
|
return pEditor ? pEditor->GetPage() : NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
DlgEdView* DialogWindow::GetView() const
|
|
|
|
{
|
|
|
|
return pEditor ? pEditor->GetView() : NULL;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-08-07 08:36:40 +02:00
|
|
|
bool DialogWindow::IsModified()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2001-06-15 07:45:19 +00:00
|
|
|
return pEditor->IsModified();
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2011-03-09 16:20:50 -06:00
|
|
|
::svl::IUndoManager* DialogWindow::GetUndoManager()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
return pUndoMgr;
|
|
|
|
}
|
|
|
|
|
2011-12-09 01:58:49 -05:00
|
|
|
::rtl::OUString DialogWindow::GetTitle()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2001-09-25 08:14:46 +00:00
|
|
|
return GetName();
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
EntryDescriptor DialogWindow::CreateEntryDescriptor()
|
2004-07-23 11:01:59 +00:00
|
|
|
{
|
2007-03-15 14:53:05 +00:00
|
|
|
ScriptDocument aDocument( GetDocument() );
|
2011-12-09 01:58:49 -05:00
|
|
|
::rtl::OUString aLibName( GetLibName() );
|
|
|
|
::rtl::OUString aLibSubName;
|
2007-03-15 14:53:05 +00:00
|
|
|
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG );
|
2004-07-23 11:01:59 +00:00
|
|
|
}
|
|
|
|
|
2012-08-07 08:36:40 +02:00
|
|
|
void DialogWindow::SetReadOnly (bool bReadOnly)
|
2001-11-12 21:39:49 +00:00
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
if (pEditor)
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
pEditor->SetMode(bReadOnly ? DlgEditor::READONLY : DlgEditor::SELECT);
|
2001-11-12 21:39:49 +00:00
|
|
|
}
|
|
|
|
|
2012-08-07 08:36:40 +02:00
|
|
|
bool DialogWindow::IsReadOnly ()
|
2001-11-12 21:39:49 +00:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
return pEditor && pEditor->GetMode() == DlgEditor::READONLY;
|
2001-11-12 21:39:49 +00:00
|
|
|
}
|
|
|
|
|
2012-08-07 08:36:40 +02:00
|
|
|
bool DialogWindow::IsPasteAllowed()
|
2001-11-12 21:39:49 +00:00
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
return pEditor && pEditor->IsPasteAllowed();
|
2001-11-12 21:39:49 +00:00
|
|
|
}
|
|
|
|
|
2000-09-29 10:02:42 +00:00
|
|
|
void DialogWindow::StoreData()
|
|
|
|
{
|
2001-09-25 08:14:46 +00:00
|
|
|
if ( IsModified() )
|
2001-03-03 14:08:22 +00:00
|
|
|
{
|
2001-06-15 07:45:19 +00:00
|
|
|
try
|
2001-03-03 14:08:22 +00:00
|
|
|
{
|
2007-03-15 14:53:05 +00:00
|
|
|
Reference< container::XNameContainer > xLib = GetDocument().getLibrary( E_DIALOGS, GetLibName(), true );
|
2001-03-03 14:08:22 +00:00
|
|
|
|
2001-06-15 07:45:19 +00:00
|
|
|
if( xLib.is() )
|
|
|
|
{
|
|
|
|
Reference< container::XNameContainer > xDialogModel = pEditor->GetDialog();
|
2001-03-03 14:08:22 +00:00
|
|
|
|
2001-06-15 07:45:19 +00:00
|
|
|
if( xDialogModel.is() )
|
|
|
|
{
|
2001-09-20 08:07:32 +00:00
|
|
|
Reference< XComponentContext > xContext;
|
|
|
|
Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
|
|
|
|
OSL_ASSERT( xProps.is() );
|
|
|
|
OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
|
2010-10-06 10:16:13 +01:00
|
|
|
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
|
2007-03-15 14:53:05 +00:00
|
|
|
xLib->replaceByName( ::rtl::OUString( GetName() ), makeAny( xISP ) );
|
2001-06-15 07:45:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch (const uno::Exception& )
|
2001-06-15 07:45:19 +00:00
|
|
|
{
|
2007-02-12 13:49:53 +00:00
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2001-03-03 14:08:22 +00:00
|
|
|
}
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
MarkDocumentModified( GetDocument() );
|
2007-02-12 13:49:53 +00:00
|
|
|
pEditor->ClearModifyFlag();
|
2001-03-03 14:08:22 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
void DialogWindow::Activating ()
|
|
|
|
{
|
|
|
|
UpdateBrowser();
|
|
|
|
Show();
|
|
|
|
}
|
|
|
|
|
2000-09-29 10:02:42 +00:00
|
|
|
void DialogWindow::Deactivating()
|
|
|
|
{
|
2012-08-17 07:29:20 +02:00
|
|
|
Hide();
|
2001-09-25 08:14:46 +00:00
|
|
|
if ( IsModified() )
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
MarkDocumentModified( GetDocument() );
|
2012-08-17 07:29:20 +02:00
|
|
|
DisableBrowser();
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2009-05-19 11:32:44 +00:00
|
|
|
sal_Int32 DialogWindow::countPages( Printer* pPrinter )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2009-05-19 11:32:44 +00:00
|
|
|
return pEditor->countPages( pPrinter );
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindow::printPage( sal_Int32 nPage, Printer* pPrinter )
|
|
|
|
{
|
|
|
|
pEditor->printPage( nPage, pPrinter, CreateQualifiedName() );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt )
|
|
|
|
{
|
|
|
|
if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
|
|
|
|
{
|
2012-08-02 10:21:00 +09:00
|
|
|
InitSettings( true, true, true );
|
2000-09-29 10:02:42 +00:00
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
else
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
BaseWindow::DataChanged( rDCEvt );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-08-02 10:21:00 +09:00
|
|
|
void DialogWindow::InitSettings(bool bFont, bool bForeground, bool bBackground)
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
|
|
if( bFont )
|
|
|
|
{
|
|
|
|
Font aFont;
|
|
|
|
aFont = rStyleSettings.GetFieldFont();
|
|
|
|
SetPointFont( aFont );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bForeground || bFont )
|
|
|
|
{
|
|
|
|
SetTextColor( rStyleSettings.GetFieldTextColor() );
|
|
|
|
SetTextFillColor();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bBackground )
|
|
|
|
SetBackground( rStyleSettings.GetFieldColor() );
|
|
|
|
}
|
2003-03-26 11:48:08 +00:00
|
|
|
|
2003-04-24 17:19:40 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > DialogWindow::CreateAccessible()
|
2003-03-26 11:48:08 +00:00
|
|
|
{
|
2003-04-24 17:19:40 +00:00
|
|
|
return (::com::sun::star::accessibility::XAccessible*) new AccessibleDialogWindow( this );
|
2003-03-26 11:48:08 +00:00
|
|
|
}
|
2010-10-12 15:57:08 +02:00
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
char const* DialogWindow::GetHid () const
|
|
|
|
{
|
|
|
|
return HID_BASICIDE_DIALOGWINDOW;
|
|
|
|
}
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
ItemType DialogWindow::GetType () const
|
2012-08-17 07:29:20 +02:00
|
|
|
{
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
return TYPE_DIALOG;
|
2012-08-17 07:29:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// DialogWindowLayout
|
|
|
|
// ==================
|
|
|
|
//
|
|
|
|
|
|
|
|
DialogWindowLayout::DialogWindowLayout (Window* pParent, ObjectCatalog& rObjectCatalog_) :
|
|
|
|
Layout(pParent),
|
|
|
|
pChild(0),
|
|
|
|
rObjectCatalog(rObjectCatalog_)
|
|
|
|
{ }
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
void DialogWindowLayout::Activating (BaseWindow& rChild)
|
2012-08-17 07:29:20 +02:00
|
|
|
{
|
|
|
|
assert(dynamic_cast<DialogWindow*>(&rChild));
|
|
|
|
pChild = &static_cast<DialogWindow&>(rChild);
|
|
|
|
rObjectCatalog.SetLayoutWindow(this);
|
|
|
|
rObjectCatalog.UpdateEntries();
|
|
|
|
rObjectCatalog.Show();
|
|
|
|
Layout::Activating(rChild);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindowLayout::Deactivating ()
|
|
|
|
{
|
|
|
|
Layout::Deactivating();
|
|
|
|
rObjectCatalog.Hide();
|
|
|
|
pChild = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindowLayout::GetState (SfxItemSet& rSet, unsigned nWhich)
|
|
|
|
{
|
|
|
|
switch (nWhich)
|
|
|
|
{
|
|
|
|
case SID_BASICIDE_CHOOSEMACRO:
|
|
|
|
rSet.Put(SfxVisibilityItem(nWhich, false));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogWindowLayout::OnFirstSize (int const nWidth, int const nHeight)
|
|
|
|
{
|
|
|
|
AddToLeft(&rObjectCatalog, Size(nWidth * 0.2, nHeight));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace basctl
|
|
|
|
|
2010-10-12 15:57:08 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|