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
|
|
|
|
|
|
|
// CLOOKS:
|
|
|
|
#define _SPIN_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
|
|
|
#include "basidesh.hxx"
|
|
|
|
|
2000-12-07 15:15:26 +00:00
|
|
|
#define _SOLAR__PRIVATE 1
|
2007-03-15 14:54:14 +00:00
|
|
|
#include <tools/diagnose_ex.h>
|
2012-06-29 08:30:14 +02:00
|
|
|
#include <basic/basmgr.hxx>
|
2000-09-29 10:02:42 +00:00
|
|
|
#include <basidesh.hrc>
|
2012-08-17 07:29:20 +02:00
|
|
|
#include "baside2.hxx"
|
|
|
|
#include "baside3.hxx"
|
2000-09-29 10:02:42 +00:00
|
|
|
#include <basdoc.hxx>
|
|
|
|
#include <basicbox.hxx>
|
2012-06-29 08:30:14 +02:00
|
|
|
#include <editeng/sizeitem.hxx>
|
2000-09-29 10:02:42 +00:00
|
|
|
#include <objdlg.hxx>
|
|
|
|
#include <tbxctl.hxx>
|
|
|
|
#include <iderdll2.hxx>
|
2001-10-10 15:23:05 +00:00
|
|
|
#include <basidectrlr.hxx>
|
2007-01-02 14:49:40 +00:00
|
|
|
#include <localizationmgr.hxx>
|
2012-06-29 08:30:14 +02:00
|
|
|
#include <sfx2/app.hxx>
|
|
|
|
#include <sfx2/dinfdlg.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <sfx2/minfitem.hxx>
|
|
|
|
#include <sfx2/objface.hxx>
|
|
|
|
#include <svl/aeitem.hxx>
|
|
|
|
#include <svl/intitem.hxx>
|
|
|
|
#include <svl/srchitem.hxx>
|
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
|
|
|
#define basctl_Shell
|
2000-09-29 10:02:42 +00:00
|
|
|
#define SFX_TYPEMAP
|
|
|
|
#include <idetemp.hxx>
|
2002-05-08 15:39:23 +00:00
|
|
|
#include <basslots.hxx>
|
2000-09-29 10:02:42 +00:00
|
|
|
#include <iderdll.hxx>
|
|
|
|
#include <svx/pszctrl.hxx>
|
|
|
|
#include <svx/insctrl.hxx>
|
2004-02-03 19:50:08 +00:00
|
|
|
#include <svx/srchdlg.hxx>
|
2005-02-24 15:58:54 +00:00
|
|
|
#include <svx/tbcontrl.hxx>
|
2001-11-02 12:45:10 +00:00
|
|
|
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
|
2010-03-02 12:39:31 +00:00
|
|
|
#include <com/sun/star/container/XContainer.hpp>
|
2004-08-31 11:20:31 +00:00
|
|
|
#include <svx/xmlsecctrl.hxx>
|
2011-11-06 21:21:30 -05:00
|
|
|
#include <sfx2/viewfac.hxx>
|
2011-11-21 23:33:54 -05:00
|
|
|
#include <vcl/msgbox.hxx>
|
2004-08-31 11:20:31 +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
|
|
|
namespace basctl
|
|
|
|
{
|
|
|
|
|
2001-03-28 10:26:43 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2010-03-02 12:39:31 +00:00
|
|
|
typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE;
|
|
|
|
|
|
|
|
class ContainerListenerImpl : public ContainerListenerBASE
|
|
|
|
{
|
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* mpShell;
|
2010-03-02 12:39:31 +00:00
|
|
|
public:
|
|
|
|
|
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
|
|
|
ContainerListenerImpl (Shell* pShell) : mpShell(pShell) { }
|
2010-03-02 12:39:31 +00:00
|
|
|
|
|
|
|
~ContainerListenerImpl()
|
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
|
|
|
{ }
|
2010-03-02 12:39:31 +00:00
|
|
|
|
2012-10-04 00:32:16 -03:00
|
|
|
void addContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName )
|
2010-03-02 12:39:31 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, false ), uno::UNO_QUERY );
|
2010-05-06 13:02:31 +01:00
|
|
|
if ( xContainer.is() )
|
2010-03-02 12:39:31 +00:00
|
|
|
{
|
|
|
|
uno::Reference< container::XContainerListener > xContainerListener( this );
|
|
|
|
xContainer->addContainerListener( xContainerListener );
|
|
|
|
}
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const uno::Exception& ) {}
|
2010-03-02 12:39:31 +00:00
|
|
|
}
|
2012-10-04 00:32:16 -03:00
|
|
|
void removeContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName )
|
2010-03-02 12:39:31 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, false ), uno::UNO_QUERY );
|
2010-05-06 13:02:31 +01:00
|
|
|
if ( xContainer.is() )
|
2010-03-02 12:39:31 +00:00
|
|
|
{
|
|
|
|
uno::Reference< container::XContainerListener > xContainerListener( this );
|
|
|
|
xContainer->removeContainerListener( xContainerListener );
|
|
|
|
}
|
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch(const uno::Exception& ) {}
|
2010-03-02 12:39:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// XEventListener
|
|
|
|
virtual void SAL_CALL disposing( const lang::EventObject& ) throw( uno::RuntimeException ) {}
|
|
|
|
|
|
|
|
// XContainerListener
|
|
|
|
virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event ) throw( uno::RuntimeException )
|
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
OUString sModuleName;
|
2010-03-02 12:39:31 +00:00
|
|
|
if( mpShell && ( Event.Accessor >>= sModuleName ) )
|
2012-07-27 10:35:28 +09:00
|
|
|
mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, true, false );
|
2010-03-02 12:39:31 +00:00
|
|
|
}
|
|
|
|
virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { }
|
|
|
|
virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException )
|
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
OUString sModuleName;
|
2010-03-02 12:39:31 +00:00
|
|
|
if( mpShell && ( Event.Accessor >>= sModuleName ) )
|
|
|
|
{
|
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
|
|
|
ModulWindow* pWin = mpShell->FindBasWin(mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, false, true);
|
2010-03-02 12:39:31 +00:00
|
|
|
if( pWin )
|
2012-07-31 10:14:06 +09:00
|
|
|
mpShell->RemoveWindow( pWin, true, true );
|
2010-03-02 12:39:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
2001-03-28 10:26:43 +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
|
|
|
TYPEINIT1( Shell, SfxViewShell );
|
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
|
|
|
SFX_IMPL_NAMED_VIEWFACTORY( Shell, "Default" )
|
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
|
|
|
SFX_VIEW_REGISTRATION( DocShell );
|
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
|
|
|
SFX_IMPL_INTERFACE( basctl_Shell, SfxViewShell, IDEResId( RID_STR_IDENAME ) )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
|
2001-11-14 09:53:42 +00:00
|
|
|
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_PROPERTYBROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER);
|
2001-10-17 09:17:18 +00:00
|
|
|
SFX_POPUPMENU_REGISTRATION( IDEResId( RID_POPUP_DLGED ) );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-02 16:21:08 +02:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
|
|
|
|
unsigned const ShellFlags = SFX_VIEW_CAN_PRINT | SFX_VIEW_NO_NEWWINDOW;
|
|
|
|
|
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2002-10-30 08:35:47 +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
|
|
|
unsigned Shell::nShellCount = 0;
|
2002-10-30 08:35:47 +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
|
|
|
Shell::Shell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell */ ) :
|
2012-09-02 16:21:08 +02:00
|
|
|
SfxViewShell( pFrame_, ShellFlags ),
|
2012-08-17 07:29:20 +02:00
|
|
|
m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ),
|
|
|
|
aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ),
|
|
|
|
aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ),
|
|
|
|
aScrollBarBox( &GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE ) ),
|
|
|
|
pLayout(0),
|
|
|
|
aObjectCatalog(&GetViewFrame()->GetWindow()),
|
|
|
|
m_bAppBasicModified( false ),
|
|
|
|
m_aNotifier( *this )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2010-03-02 12:39:31 +00:00
|
|
|
m_xLibListener = new ContainerListenerImpl( this );
|
2000-09-29 10:02:42 +00:00
|
|
|
Init();
|
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
|
|
|
nShellCount++;
|
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
|
|
|
void Shell::Init()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2001-07-17 13:58:43 +00:00
|
|
|
TbxControls::RegisterControl( SID_CHOOSE_CONTROLS );
|
2000-09-29 10:02:42 +00:00
|
|
|
SvxPosSizeStatusBarControl::RegisterControl();
|
|
|
|
SvxInsertStatusBarControl::RegisterControl();
|
2004-08-31 11:20:31 +00:00
|
|
|
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE );
|
2005-02-24 15:58:54 +00:00
|
|
|
SvxSimpleUndoRedoController::RegisterControl( SID_UNDO );
|
|
|
|
SvxSimpleUndoRedoController::RegisterControl( SID_REDO );
|
2004-08-31 11:20:31 +00:00
|
|
|
|
2012-08-07 08:36:40 +02:00
|
|
|
SvxSearchDialogWrapper::RegisterChildWindow(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
|
|
|
GetExtraData()->ShellInCriticalSection() = true;
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2012-10-04 00:32:16 -03:00
|
|
|
SetName( OUString( "BasicIDE" ) );
|
2000-09-29 10:02:42 +00:00
|
|
|
SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH );
|
|
|
|
|
|
|
|
LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR );
|
2007-01-02 14:49:40 +00:00
|
|
|
LanguageBoxControl::RegisterControl( SID_BASICIDE_CURRENT_LANG );
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
GetViewFrame()->GetWindow().SetBackground(
|
|
|
|
GetViewFrame()->GetWindow().GetSettings().GetStyleSettings().GetWindowColor()
|
|
|
|
);
|
2000-09-29 10:02:42 +00:00
|
|
|
|
|
|
|
pCurWin = 0;
|
2007-03-15 14:54:14 +00:00
|
|
|
m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
|
2012-08-02 10:21:00 +09:00
|
|
|
bCreatingWindow = false;
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2012-09-02 16:21:08 +02:00
|
|
|
pTabBar.reset(new TabBar(&GetViewFrame()->GetWindow()));
|
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
|
|
|
pTabBar->SetSplitHdl( LINK( this, Shell, TabBarSplitHdl ) );
|
2012-08-02 10:21:00 +09:00
|
|
|
bTabBarSplitted = false;
|
2000-09-29 10:02:42 +00:00
|
|
|
|
|
|
|
nCurKey = 100;
|
|
|
|
InitScrollBars();
|
|
|
|
InitTabBar();
|
|
|
|
|
2012-10-04 00:32:16 -03:00
|
|
|
SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", false, 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
|
|
|
ShellCreated(this);
|
2006-01-03 11:43:08 +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
|
|
|
GetExtraData()->ShellInCriticalSection() = false;
|
2001-06-20 08:27:37 +00:00
|
|
|
|
2008-04-04 13:05:06 +00:00
|
|
|
// It's enough to create the controller ...
|
|
|
|
// It will be public by using magic :-)
|
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
|
|
|
new Controller(this);
|
2008-04-04 13:05:06 +00:00
|
|
|
|
|
|
|
// Force updating the title ! Because it must be set to the controller
|
|
|
|
// it has to be called directly after creating those controller.
|
|
|
|
SetMDITitle ();
|
2001-10-10 15:23:05 +00:00
|
|
|
|
2001-06-20 08:27:37 +00:00
|
|
|
UpdateWindows();
|
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
|
|
|
Shell::~Shell()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-10-09 14:22:02 +00:00
|
|
|
m_aNotifier.dispose();
|
|
|
|
|
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
|
|
|
ShellDestroyed(this);
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2011-11-24 23:56:22 -08:00
|
|
|
// so that on a basic saving error, the shell doesn't pop right up again
|
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
|
|
|
GetExtraData()->ShellInCriticalSection() = true;
|
2000-09-29 10:02:42 +00:00
|
|
|
|
|
|
|
SetWindow( 0 );
|
|
|
|
SetCurWindow( 0 );
|
|
|
|
|
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
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2011-08-22 11:39:37 +02:00
|
|
|
// no store; does already happen when the BasicManagers are destroyed
|
2012-03-20 10:03:56 +02:00
|
|
|
delete it->second;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-08-17 07:29:20 +02:00
|
|
|
// Destroy all ContainerListeners for Basic Container.
|
|
|
|
if (ContainerListenerImpl* pListener = static_cast<ContainerListenerImpl*>(m_xLibListener.get()))
|
|
|
|
pListener->removeContainerListener(m_aCurDocument, m_aCurLibName);
|
2010-03-02 12:39:31 +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
|
|
|
GetExtraData()->ShellInCriticalSection() = false;
|
2002-10-30 08:35:47 +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
|
|
|
nShellCount--;
|
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
|
|
|
void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
2012-08-17 07:29:20 +02:00
|
|
|
if (pCurWin)
|
|
|
|
pCurWin->OnNewDocument();
|
2007-10-09 14:22:02 +00:00
|
|
|
UpdateWindows();
|
|
|
|
}
|
|
|
|
|
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 Shell::onDocumentOpened( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
2012-08-17 07:29:20 +02:00
|
|
|
if (pCurWin)
|
|
|
|
pCurWin->OnNewDocument();
|
2007-10-09 14:22:02 +00:00
|
|
|
UpdateWindows();
|
|
|
|
}
|
|
|
|
|
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 Shell::onDocumentSave( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
|
|
|
StoreAllWindowData();
|
|
|
|
}
|
|
|
|
|
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 Shell::onDocumentSaveDone( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
2011-02-17 10:48:27 +01:00
|
|
|
// #i115671: Update SID_SAVEDOC after saving is completed
|
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())
|
2011-02-17 10:48:27 +01:00
|
|
|
pBindings->Invalidate( SID_SAVEDOC );
|
2007-10-09 14:22:02 +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
|
|
|
void Shell::onDocumentSaveAs( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
|
|
|
StoreAllWindowData();
|
|
|
|
}
|
|
|
|
|
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 Shell::onDocumentSaveAsDone( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
|
|
|
// not interested in
|
|
|
|
}
|
|
|
|
|
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 Shell::onDocumentClosed( const ScriptDocument& _rDocument )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
|
|
|
if ( !_rDocument.isValid() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
bool bSetCurWindow = false;
|
2008-10-16 06:57:26 +00:00
|
|
|
bool bSetCurLib = ( _rDocument == m_aCurDocument );
|
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
|
|
|
std::vector<BaseWindow*> aDeleteVec;
|
2007-10-09 14:22:02 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// remove all windows which belong to this document
|
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
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
2007-10-09 14:22:02 +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
|
|
|
BaseWindow* pWin = it->second;
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( pWin->IsDocument( _rDocument ) )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( pWin->GetStatus() & (BASWIN_RUNNINGBASIC|BASWIN_INRESCHEDULE) )
|
2007-10-09 14:22:02 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
pWin->AddStatus( BASWIN_TOBEKILLED );
|
|
|
|
pWin->Hide();
|
|
|
|
StarBASIC::Stop();
|
|
|
|
// there's no notify
|
|
|
|
pWin->BasicStopped();
|
|
|
|
}
|
|
|
|
else
|
2012-03-20 10:03:56 +02:00
|
|
|
aDeleteVec.push_back( pWin );
|
2007-10-09 14:22:02 +00:00
|
|
|
}
|
|
|
|
}
|
2012-03-20 10:03:56 +02:00
|
|
|
// delete windows outside main loop so we don't invalidate the original iterator
|
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
|
|
|
for (std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it)
|
2012-03-20 10:03:56 +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
|
|
|
BaseWindow* pWin = *it;
|
2012-03-20 10:03:56 +02:00
|
|
|
pWin->StoreData();
|
|
|
|
if ( pWin == pCurWin )
|
|
|
|
bSetCurWindow = true;
|
2012-07-31 10:14:06 +09:00
|
|
|
RemoveWindow( pWin, true, false );
|
2012-03-20 10:03:56 +02:00
|
|
|
}
|
2007-10-09 14:22:02 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// remove lib info
|
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 (ExtraData* pData = GetExtraData())
|
2008-10-16 06:57:26 +00:00
|
|
|
pData->GetLibInfos().RemoveInfoFor( _rDocument );
|
|
|
|
|
2007-10-09 14:22:02 +00:00
|
|
|
if ( bSetCurLib )
|
2012-10-04 00:32:16 -03:00
|
|
|
SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", true, false );
|
2007-10-09 14:22:02 +00:00
|
|
|
else if ( bSetCurWindow )
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( FindApplicationWindow(), true );
|
2007-10-09 14:22:02 +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
|
|
|
void Shell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ )
|
2007-10-09 14:22:02 +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())
|
2012-08-07 08:36:40 +02:00
|
|
|
pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, true, false );
|
2007-10-09 14:22:02 +00:00
|
|
|
SetMDITitle();
|
|
|
|
}
|
|
|
|
|
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 Shell::onDocumentModeChanged( const ScriptDocument& _rDocument )
|
2007-10-09 14:22:02 +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
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
2007-10-09 14:22:02 +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
|
|
|
BaseWindow* pWin = it->second;
|
2007-10-09 14:22:02 +00:00
|
|
|
if ( pWin->IsDocument( _rDocument ) && _rDocument.isDocument() )
|
|
|
|
pWin->SetReadOnly( _rDocument.isReadOnly() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 Shell::StoreAllWindowData( bool bPersistent )
|
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
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
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
|
|
|
BaseWindow* pWin = it->second;
|
2000-09-29 10:02:42 +00:00
|
|
|
DBG_ASSERT( pWin, "PrepareClose: NULL-Pointer in Table?" );
|
|
|
|
if ( !pWin->IsSuspended() )
|
|
|
|
pWin->StoreData();
|
|
|
|
}
|
|
|
|
|
2001-03-28 10:26:43 +00:00
|
|
|
if ( bPersistent )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-03-15 14:54:14 +00:00
|
|
|
SFX_APP()->SaveBasicAndDialogContainer();
|
2012-08-07 08:36:40 +02:00
|
|
|
SetAppBasicModified(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())
|
2006-01-03 11:43:08 +00:00
|
|
|
{
|
|
|
|
pBindings->Invalidate( SID_SAVEDOC );
|
|
|
|
pBindings->Update( SID_SAVEDOC );
|
|
|
|
}
|
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
|
|
|
sal_uInt16 Shell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
(void)bForBrowsing;
|
|
|
|
|
2011-08-22 11:39:37 +02:00
|
|
|
// reset here because it's modified after printing etc. (DocInfo)
|
2012-08-07 08:36:40 +02:00
|
|
|
GetViewFrame()->GetObjectShell()->SetModified(false);
|
2000-09-29 10:02:42 +00:00
|
|
|
|
|
|
|
if ( StarBASIC::IsRunning() )
|
|
|
|
{
|
2002-11-01 10:42:47 +00:00
|
|
|
if( bUI )
|
|
|
|
{
|
|
|
|
Window *pParent = &GetViewFrame()->GetWindow();
|
2012-04-29 23:36:57 +01:00
|
|
|
InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute();
|
2002-11-01 10:42:47 +00:00
|
|
|
}
|
2012-08-07 08:36:40 +02:00
|
|
|
return false;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
bool bCanClose = true;
|
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
|
|
|
for (WindowTableIt it = aWindowTable.begin(); bCanClose && (it != aWindowTable.end()); ++it)
|
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
|
|
|
BaseWindow* pWin = it->second;
|
2010-11-08 03:57:20 -05:00
|
|
|
if ( !pWin->CanClose() )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2011-12-09 01:58:49 -05:00
|
|
|
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
|
2012-10-04 00:32:16 -03:00
|
|
|
SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false );
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( pWin, true );
|
2012-08-07 08:36:40 +02:00
|
|
|
bCanClose = false;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bCanClose )
|
2012-07-31 10:14:06 +09:00
|
|
|
StoreAllWindowData( false ); // don't write on the disk, that will be done later automatically
|
2000-09-29 10:02:42 +00:00
|
|
|
|
|
|
|
return bCanClose;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 Shell::InitScrollBars()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
aVScrollBar.SetLineSize( 300 );
|
|
|
|
aVScrollBar.SetPageSize( 2000 );
|
|
|
|
aHScrollBar.SetLineSize( 300 );
|
|
|
|
aHScrollBar.SetPageSize( 2000 );
|
|
|
|
aHScrollBar.Enable();
|
|
|
|
aVScrollBar.Enable();
|
|
|
|
aVScrollBar.Show();
|
|
|
|
aHScrollBar.Show();
|
|
|
|
aScrollBarBox.Show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Shell::InitTabBar()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
pTabBar->Enable();
|
|
|
|
pTabBar->Show();
|
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
|
|
|
pTabBar->SetSelectHdl( LINK( this, Shell, TabBarHdl ) );
|
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
|
|
|
Size Shell::GetOptimalSizePixel() const
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
return Size( 400, 300 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Shell::OuterResizePixel( const Point &rPos, const Size &rSize )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
AdjustPosSizePixel( rPos, rSize );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
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
|
|
|
IMPL_LINK_INLINE_START( Shell, TabBarSplitHdl, TabBar *, pTBar )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
(void)pTBar;
|
2012-08-02 10:21:00 +09:00
|
|
|
bTabBarSplitted = true;
|
2000-09-29 10:02:42 +00:00
|
|
|
ArrangeTabBar();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
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
|
|
|
IMPL_LINK_INLINE_END( Shell, TabBarSplitHdl, TabBar *, pTBar )
|
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
|
|
|
IMPL_LINK( Shell, TabBarHdl, TabBar *, pCurTabBar )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2011-01-14 11:16:25 +01:00
|
|
|
sal_uInt16 nCurId = pCurTabBar->GetCurPageId();
|
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* pWin = aWindowTable[ nCurId ];
|
2000-09-29 10:02:42 +00:00
|
|
|
DBG_ASSERT( pWin, "Eintrag in TabBar passt zu keinem Fenster!" );
|
|
|
|
SetCurWindow( pWin );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Shell::NextPage( bool bPrev )
|
2002-04-29 14:14:23 +00:00
|
|
|
{
|
2012-08-02 10:21:00 +09:00
|
|
|
bool bRet = false;
|
2011-01-14 11:16:25 +01:00
|
|
|
sal_uInt16 nPos = pTabBar->GetPagePos( pTabBar->GetCurPageId() );
|
2002-04-29 14:14:23 +00:00
|
|
|
|
|
|
|
if ( bPrev )
|
|
|
|
--nPos;
|
|
|
|
else
|
|
|
|
++nPos;
|
|
|
|
|
2007-01-16 15:29:49 +00:00
|
|
|
if ( nPos < pTabBar->GetPageCount() )
|
2002-04-29 14:14:23 +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
|
|
|
BaseWindow* pWin = aWindowTable[ pTabBar->GetPageId( nPos ) ];
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( pWin, true );
|
2012-08-02 10:21:00 +09:00
|
|
|
bRet = true;
|
2002-04-29 14:14:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Shell::ArrangeTabBar()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
long nBoxPos = aScrollBarBox.GetPosPixel().X() - 1;
|
|
|
|
long nPos = pTabBar->GetSplitSize();
|
|
|
|
if ( nPos <= nBoxPos )
|
|
|
|
{
|
|
|
|
Point aPnt( pTabBar->GetPosPixel() );
|
|
|
|
long nH = aHScrollBar.GetSizePixel().Height();
|
|
|
|
pTabBar->SetPosSizePixel( aPnt, Size( nPos, nH ) );
|
|
|
|
long nScrlStart = aPnt.X() + nPos;
|
|
|
|
aHScrollBar.SetPosSizePixel( Point( nScrlStart, aPnt.Y() ), Size( nBoxPos - nScrlStart + 2, nH ) );
|
|
|
|
aHScrollBar.Update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
::svl::IUndoManager* Shell::GetUndoManager()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2010-10-20 14:54:59 +02:00
|
|
|
::svl::IUndoManager* pMgr = NULL;
|
2000-09-29 10:02:42 +00:00
|
|
|
if( pCurWin )
|
|
|
|
pMgr = pCurWin->GetUndoManager();
|
|
|
|
|
|
|
|
return pMgr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Shell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
|
2000-09-29 10:02:42 +00:00
|
|
|
const SfxHint& rHint, const TypeId& )
|
|
|
|
{
|
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 (GetShell())
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-08-07 15:22:25 +02:00
|
|
|
if (SfxSimpleHint const* pSimpleHint = dynamic_cast<SfxSimpleHint const*>(&rHint))
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-08-07 14:33:56 +02:00
|
|
|
switch (pSimpleHint->GetId())
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2004-07-23 11:45:01 +00:00
|
|
|
case SFX_HINT_DYING:
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
EndListening( rBC, true /* log off all */ );
|
2012-08-17 07:29:20 +02:00
|
|
|
aObjectCatalog.UpdateEntries();
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
2004-07-23 11:45:01 +00:00
|
|
|
break;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
2004-07-23 11:45:01 +00:00
|
|
|
|
2012-08-07 15:22:25 +02:00
|
|
|
if (SbxHint const* pSbxHint = dynamic_cast<SbxHint const*>(&rHint))
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-08-07 14:33:56 +02:00
|
|
|
sal_uLong nHintId = pSbxHint->GetId();
|
2000-10-19 08:19:37 +00:00
|
|
|
if ( ( nHintId == SBX_HINT_BASICSTART ) ||
|
|
|
|
( nHintId == SBX_HINT_BASICSTOP ) )
|
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())
|
2006-01-03 11:43:08 +00:00
|
|
|
{
|
|
|
|
pBindings->Invalidate( SID_BASICRUN );
|
|
|
|
pBindings->Update( SID_BASICRUN );
|
|
|
|
pBindings->Invalidate( SID_BASICCOMPILE );
|
|
|
|
pBindings->Update( SID_BASICCOMPILE );
|
|
|
|
pBindings->Invalidate( SID_BASICSTEPOVER );
|
|
|
|
pBindings->Update( SID_BASICSTEPOVER );
|
|
|
|
pBindings->Invalidate( SID_BASICSTEPINTO );
|
|
|
|
pBindings->Update( SID_BASICSTEPINTO );
|
|
|
|
pBindings->Invalidate( SID_BASICSTEPOUT );
|
|
|
|
pBindings->Update( SID_BASICSTEPOUT );
|
|
|
|
pBindings->Invalidate( SID_BASICSTOP );
|
|
|
|
pBindings->Update( SID_BASICSTOP );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_TOGGLEBRKPNT );
|
|
|
|
pBindings->Update( SID_BASICIDE_TOGGLEBRKPNT );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_MANAGEBRKPNTS );
|
|
|
|
pBindings->Update( SID_BASICIDE_MANAGEBRKPNTS );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_MODULEDLG );
|
|
|
|
pBindings->Update( SID_BASICIDE_MODULEDLG );
|
|
|
|
pBindings->Invalidate( SID_BASICLOAD );
|
|
|
|
pBindings->Update( SID_BASICLOAD );
|
|
|
|
}
|
2000-10-19 08:19:37 +00:00
|
|
|
|
|
|
|
if ( nHintId == SBX_HINT_BASICSTOP )
|
|
|
|
{
|
2011-08-22 11:39:37 +02:00
|
|
|
// not only at error/break or explicit stoppage,
|
|
|
|
// if the update is turned off due to a programming bug
|
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
|
|
|
BasicStopped();
|
2012-08-17 07:29:20 +02:00
|
|
|
if (pLayout)
|
|
|
|
pLayout->UpdateDebug(true); // clear...
|
2007-01-02 14:49:40 +00:00
|
|
|
if( m_pCurLocalizationMgr )
|
|
|
|
m_pCurLocalizationMgr->handleBasicStopped();
|
|
|
|
}
|
|
|
|
else if( m_pCurLocalizationMgr )
|
|
|
|
{
|
|
|
|
m_pCurLocalizationMgr->handleBasicStarted();
|
2000-10-19 08:19:37 +00:00
|
|
|
}
|
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
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
2000-10-19 08:19:37 +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
|
|
|
BaseWindow* pWin = it->second;
|
2000-10-19 08:19:37 +00:00
|
|
|
if ( nHintId == SBX_HINT_BASICSTART )
|
|
|
|
pWin->BasicStarted();
|
2004-07-23 11:45:01 +00:00
|
|
|
else
|
2000-10-19 08:19:37 +00:00
|
|
|
pWin->BasicStopped();
|
|
|
|
}
|
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
|
|
|
void Shell::CheckWindows()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-07-27 10:35:28 +09:00
|
|
|
bool bSetCurWindow = false;
|
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
|
|
|
std::vector<BaseWindow*> aDeleteVec;
|
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
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
|
|
|
BaseWindow* pWin = it->second;
|
2000-09-29 10:02:42 +00:00
|
|
|
if ( pWin->GetStatus() & BASWIN_TOBEKILLED )
|
2012-03-20 10:03:56 +02:00
|
|
|
aDeleteVec.push_back( pWin );
|
|
|
|
}
|
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
|
|
|
for ( std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
|
2012-03-20 10:03:56 +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
|
|
|
BaseWindow* pWin = *it;
|
2012-03-20 10:03:56 +02:00
|
|
|
pWin->StoreData();
|
|
|
|
if ( pWin == pCurWin )
|
2012-07-27 10:35:28 +09:00
|
|
|
bSetCurWindow = true;
|
2012-07-31 10:14:06 +09:00
|
|
|
RemoveWindow( pWin, true, false );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
if ( bSetCurWindow )
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( FindApplicationWindow(), true );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-04 00:32:16 -03:00
|
|
|
void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-07-31 10:14:06 +09:00
|
|
|
bool bChangeCurWindow = pCurWin ? false : true;
|
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
|
|
|
std::vector<BaseWindow*> aDeleteVec;
|
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
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
|
|
|
BaseWindow* pWin = it->second;
|
2007-03-15 14:54:14 +00:00
|
|
|
if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName )
|
2012-03-20 10:03:56 +02:00
|
|
|
aDeleteVec.push_back( pWin );
|
|
|
|
}
|
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
|
|
|
for ( std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
|
2012-03-20 10:03:56 +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
|
|
|
BaseWindow* pWin = *it;
|
2012-03-20 10:03:56 +02:00
|
|
|
if ( pWin == pCurWin )
|
2012-07-31 10:14:06 +09:00
|
|
|
bChangeCurWindow = true;
|
2012-03-20 10:03:56 +02:00
|
|
|
pWin->StoreData();
|
2012-07-31 10:14:06 +09:00
|
|
|
RemoveWindow( pWin, bDestroy, false );
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
if ( bChangeCurWindow )
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( FindApplicationWindow(), true );
|
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
|
|
|
void Shell::UpdateWindows()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2011-08-22 11:39:37 +02:00
|
|
|
// remove all windows that may not be displayed
|
2012-07-31 10:14:06 +09:00
|
|
|
bool bChangeCurWindow = pCurWin ? false : true;
|
2011-12-09 01:58:49 -05:00
|
|
|
if ( !m_aCurLibName.isEmpty() )
|
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
|
|
|
std::vector<BaseWindow*> aDeleteVec;
|
|
|
|
for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
|
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
|
|
|
BaseWindow* pWin = it->second;
|
2007-03-15 14:54:14 +00:00
|
|
|
if ( !pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
if ( pWin == pCurWin )
|
2012-07-31 10:14:06 +09:00
|
|
|
bChangeCurWindow = true;
|
2000-09-29 10:02:42 +00:00
|
|
|
pWin->StoreData();
|
2011-08-22 11:39:37 +02:00
|
|
|
// The request of RUNNING prevents the crash when in reschedule.
|
|
|
|
// Window is frozen at first, later the windows should be changed
|
|
|
|
// anyway to be marked as hidden instead of being deleted.
|
2000-09-29 10:02:42 +00:00
|
|
|
if ( !(pWin->GetStatus() & ( BASWIN_TOBEKILLED | BASWIN_RUNNINGBASIC | BASWIN_SUSPENDED ) ) )
|
2012-03-20 10:03:56 +02:00
|
|
|
aDeleteVec.push_back( pWin );
|
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
|
|
|
for ( std::vector<BaseWindow*>::const_iterator it = aDeleteVec.begin(); it != aDeleteVec.end(); ++it )
|
2012-03-20 10:03:56 +02:00
|
|
|
{
|
2012-07-31 10:14:06 +09:00
|
|
|
RemoveWindow( *it, false, false );
|
2012-03-20 10:03:56 +02:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( bCreatingWindow )
|
|
|
|
return;
|
|
|
|
|
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* pNextActiveWindow = 0;
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2011-08-22 11:39:37 +02:00
|
|
|
// show all windows that are to be shown
|
2007-10-09 14:22:02 +00:00
|
|
|
ScriptDocuments aDocuments( ScriptDocument::getAllScriptDocuments( ScriptDocument::AllWithApplication ) );
|
2007-03-15 14:54:14 +00:00
|
|
|
for ( ScriptDocuments::const_iterator doc = aDocuments.begin();
|
|
|
|
doc != aDocuments.end();
|
|
|
|
++doc
|
|
|
|
)
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
StartListening( *doc->getBasicManager(), true /* log on only once */ );
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
// libraries
|
2012-10-04 00:32:16 -03:00
|
|
|
Sequence< OUString > aLibNames( doc->getLibraryNames() );
|
2007-03-15 14:54:14 +00:00
|
|
|
sal_Int32 nLibCount = aLibNames.getLength();
|
2012-10-04 00:32:16 -03:00
|
|
|
const OUString* pLibNames = aLibNames.getConstArray();
|
2001-09-03 10:56:10 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
OUString aLibName = pLibNames[ i ];
|
2004-07-23 11:45:01 +00:00
|
|
|
|
2011-12-09 01:58:49 -05:00
|
|
|
if ( m_aCurLibName.isEmpty() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) )
|
2007-03-15 14:54:14 +00:00
|
|
|
{
|
|
|
|
// check, if library is password protected and not verified
|
2012-07-31 10:14:06 +09:00
|
|
|
bool bProtected = false;
|
2007-03-15 14:54:14 +00:00
|
|
|
Reference< script::XLibraryContainer > xModLibContainer( doc->getLibraryContainer( E_SCRIPTS ) );
|
|
|
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-03-15 14:54:14 +00:00
|
|
|
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
|
|
|
|
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
2001-11-02 12:45:10 +00:00
|
|
|
{
|
2012-07-31 10:14:06 +09:00
|
|
|
bProtected = true;
|
2001-11-02 12:45:10 +00:00
|
|
|
}
|
2007-03-15 14:54:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( !bProtected )
|
|
|
|
{
|
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
|
|
|
LibInfos::Item const* pLibInfoItem = 0;
|
|
|
|
if (ExtraData* pData = GetExtraData())
|
|
|
|
pLibInfoItem = pData->GetLibInfos().GetInfo(*doc, aLibName);
|
2000-09-29 10:02:42 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
// modules
|
|
|
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
|
2001-09-03 10:56:10 +00:00
|
|
|
{
|
2007-03-15 14:54:14 +00:00
|
|
|
StarBASIC* pLib = doc->getBasicManager()->GetLib( aLibName );
|
|
|
|
if ( pLib )
|
|
|
|
ImplStartListening( pLib );
|
2001-09-03 10:56:10 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
try
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
Sequence< OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) );
|
2007-03-15 14:54:14 +00:00
|
|
|
sal_Int32 nModCount = aModNames.getLength();
|
2012-10-04 00:32:16 -03:00
|
|
|
const OUString* pModNames = aModNames.getConstArray();
|
2001-06-15 07:45:19 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
for ( sal_Int32 j = 0 ; j < nModCount ; j++ )
|
2001-11-02 12:45:10 +00:00
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
OUString aModName = pModNames[ j ];
|
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
|
|
|
ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, false );
|
2007-03-15 14:54:14 +00:00
|
|
|
if ( !pWin )
|
|
|
|
pWin = CreateBasWin( *doc, aLibName, aModName );
|
|
|
|
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName &&
|
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
|
|
|
pLibInfoItem->GetCurrentType() == TYPE_MODULE )
|
2004-07-23 11:45:01 +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
|
|
|
pNextActiveWindow = (BaseWindow*)pWin;
|
2004-07-23 11:45:01 +00:00
|
|
|
}
|
|
|
|
}
|
2001-03-28 10:26:43 +00:00
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch (const container::NoSuchElementException& )
|
2007-03-15 14:54:14 +00:00
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
}
|
2001-09-03 10:56:10 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
// dialogs
|
|
|
|
Reference< script::XLibraryContainer > xDlgLibContainer( doc->getLibraryContainer( E_DIALOGS ) );
|
|
|
|
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) )
|
|
|
|
{
|
|
|
|
try
|
2001-11-02 12:45:10 +00:00
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
Sequence< OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName );
|
2007-03-15 14:54:14 +00:00
|
|
|
sal_Int32 nDlgCount = aDlgNames.getLength();
|
2012-10-04 00:32:16 -03:00
|
|
|
const OUString* pDlgNames = aDlgNames.getConstArray();
|
2001-09-03 10:56:10 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ )
|
|
|
|
{
|
2012-10-04 00:32:16 -03:00
|
|
|
OUString aDlgName = pDlgNames[ j ];
|
2007-03-15 14:54:14 +00:00
|
|
|
// this find only looks for non-suspended windows;
|
|
|
|
// suspended windows are handled in CreateDlgWin
|
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* pWin = FindDlgWin( *doc, aLibName, aDlgName, false );
|
2007-03-15 14:54:14 +00:00
|
|
|
if ( !pWin )
|
|
|
|
pWin = CreateDlgWin( *doc, aLibName, aDlgName );
|
|
|
|
if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName &&
|
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
|
|
|
pLibInfoItem->GetCurrentType() == TYPE_DIALOG )
|
2004-07-23 11:45:01 +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
|
|
|
pNextActiveWindow = (BaseWindow*)pWin;
|
2004-07-23 11:45:01 +00:00
|
|
|
}
|
|
|
|
}
|
2007-03-15 14:54:14 +00:00
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch (const container::NoSuchElementException& )
|
2007-03-15 14:54:14 +00:00
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2001-11-02 12:45:10 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( bChangeCurWindow )
|
2004-07-23 11:45:01 +00:00
|
|
|
{
|
|
|
|
if ( !pNextActiveWindow )
|
2012-11-03 09:07:25 -05:00
|
|
|
{
|
2007-03-15 14:54:14 +00:00
|
|
|
pNextActiveWindow = FindApplicationWindow();
|
2012-11-03 09:07:25 -05:00
|
|
|
}
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( pNextActiveWindow, true );
|
2004-07-23 11:45:01 +00:00
|
|
|
}
|
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
|
|
|
void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChangeCurWindow )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" );
|
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
|
|
|
sal_uLong nKey = GetWindowId( pWindow_ );
|
2011-01-14 11:16:25 +01:00
|
|
|
pTabBar->RemovePage( (sal_uInt16)nKey );
|
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
|
|
|
aWindowTable.erase( nKey );
|
2007-01-16 15:29:49 +00:00
|
|
|
if ( pWindow_ == pCurWin )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
if ( bAllowChangeCurWindow )
|
2012-11-03 09:07:25 -05:00
|
|
|
{
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( FindApplicationWindow(), true );
|
2012-11-03 09:07:25 -05:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
else
|
2012-11-03 09:07:25 -05:00
|
|
|
{
|
2012-07-27 10:35:28 +09:00
|
|
|
SetCurWindow( NULL, false );
|
2012-11-03 09:07:25 -05:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
if ( bDestroy )
|
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
if ( !( pWindow_->GetStatus() & BASWIN_INRESCHEDULE ) )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
delete pWindow_;
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
pWindow_->AddStatus( BASWIN_TOBEKILLED );
|
|
|
|
pWindow_->Hide();
|
2010-03-02 12:39:31 +00:00
|
|
|
// In normal mode stop basic in windows to be deleted
|
|
|
|
// In VBA stop basic only if the running script is trying to delete
|
|
|
|
// its parent module
|
|
|
|
bool bStop = true;
|
|
|
|
if ( pWindow_->GetDocument().isInVBAMode() )
|
|
|
|
{
|
|
|
|
SbModule* pMod = StarBASIC::GetActiveModule();
|
2011-12-09 01:58:49 -05:00
|
|
|
if ( !pMod || ( pMod && ( !pMod->GetName().Equals(pWindow_->GetName()) ) ) )
|
2012-11-03 09:07:25 -05:00
|
|
|
{
|
2010-03-02 12:39:31 +00:00
|
|
|
bStop = false;
|
2012-11-03 09:07:25 -05:00
|
|
|
}
|
2010-03-02 12:39:31 +00:00
|
|
|
}
|
|
|
|
if ( bStop )
|
|
|
|
{
|
|
|
|
StarBASIC::Stop();
|
2011-08-22 11:39:37 +02:00
|
|
|
// there will be no notify...
|
2010-03-02 12:39:31 +00:00
|
|
|
pWindow_->BasicStopped();
|
|
|
|
}
|
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
|
|
|
aWindowTable[ nKey ] = pWindow_; // jump in again
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-01-16 15:29:49 +00:00
|
|
|
pWindow_->AddStatus( BASWIN_SUSPENDED );
|
|
|
|
pWindow_->Deactivating();
|
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
|
|
|
aWindowTable[ nKey ] = pWindow_; // jump in again
|
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
|
|
|
sal_uInt16 Shell::InsertWindowInTable( BaseWindow* pNewWin )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
|
|
|
nCurKey++;
|
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
|
|
|
aWindowTable[ nCurKey ] = pNewWin;
|
2000-09-29 10:02:42 +00:00
|
|
|
return nCurKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Shell::InvalidateBasicIDESlots()
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2011-08-22 11:39:37 +02:00
|
|
|
// only those that have an optic effect...
|
2000-10-10 08:38:57 +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 (GetShell())
|
2000-10-10 08:38:57 +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:43:08 +00:00
|
|
|
{
|
|
|
|
pBindings->Invalidate( SID_UNDO );
|
|
|
|
pBindings->Invalidate( SID_REDO );
|
|
|
|
pBindings->Invalidate( SID_SAVEDOC );
|
|
|
|
pBindings->Invalidate( SID_SIGNATURE );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_CHOOSEMACRO );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_MODULEDLG );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_OBJCAT );
|
|
|
|
pBindings->Invalidate( SID_BASICSTOP );
|
|
|
|
pBindings->Invalidate( SID_BASICRUN );
|
|
|
|
pBindings->Invalidate( SID_BASICCOMPILE );
|
|
|
|
pBindings->Invalidate( SID_BASICLOAD );
|
|
|
|
pBindings->Invalidate( SID_BASICSAVEAS );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_MATCHGROUP );
|
|
|
|
pBindings->Invalidate( SID_BASICSTEPINTO );
|
|
|
|
pBindings->Invalidate( SID_BASICSTEPOVER );
|
|
|
|
pBindings->Invalidate( SID_BASICSTEPOUT );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_TOGGLEBRKPNT );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_MANAGEBRKPNTS );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_ADDWATCH );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_REMOVEWATCH );
|
|
|
|
pBindings->Invalidate( SID_CHOOSE_CONTROLS );
|
|
|
|
pBindings->Invalidate( SID_PRINTDOC );
|
|
|
|
pBindings->Invalidate( SID_PRINTDOCDIRECT );
|
|
|
|
pBindings->Invalidate( SID_SETUPPRINTER );
|
|
|
|
pBindings->Invalidate( SID_DIALOG_TESTMODE );
|
|
|
|
|
|
|
|
pBindings->Invalidate( SID_DOC_MODIFIED );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_STAT_TITLE );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_STAT_POS );
|
|
|
|
pBindings->Invalidate( SID_ATTR_INSERT );
|
|
|
|
pBindings->Invalidate( SID_ATTR_SIZE );
|
|
|
|
}
|
2000-10-10 08:38:57 +00:00
|
|
|
}
|
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
|
|
|
void Shell::EnableScrollbars( bool bEnable )
|
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
|
|
|
aHScrollBar.Enable(bEnable);
|
|
|
|
aVScrollBar.Enable(bEnable);
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-10-04 00:32:16 -03:00
|
|
|
void Shell::SetCurLib( const ScriptDocument& rDocument, OUString aLibName, bool bUpdateWindows, bool bCheck )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2007-03-15 14:54:14 +00:00
|
|
|
if ( !bCheck || ( rDocument != m_aCurDocument || aLibName != m_aCurLibName ) )
|
2004-07-23 11:45:01 +00:00
|
|
|
{
|
2010-03-03 19:59:09 +00:00
|
|
|
ContainerListenerImpl* pListener = static_cast< ContainerListenerImpl* >( m_xLibListener.get() );
|
2010-03-02 12:39:31 +00:00
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
m_aCurDocument = rDocument;
|
2004-07-23 11:45:01 +00:00
|
|
|
m_aCurLibName = aLibName;
|
2010-03-03 18:23:05 +00:00
|
|
|
|
2011-04-28 00:59:28 +02:00
|
|
|
if ( pListener )
|
|
|
|
{
|
|
|
|
pListener->removeContainerListener( m_aCurDocument, m_aCurLibName );
|
|
|
|
pListener->addContainerListener( m_aCurDocument, aLibName );
|
|
|
|
}
|
|
|
|
|
2004-07-23 11:45:01 +00:00
|
|
|
if ( bUpdateWindows )
|
|
|
|
UpdateWindows();
|
|
|
|
|
2004-11-17 09:27:10 +00:00
|
|
|
SetMDITitle();
|
|
|
|
|
2007-03-15 14:54:14 +00:00
|
|
|
SetCurLibForLocalization( rDocument, aLibName );
|
2007-01-02 14:49:40 +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-01-02 14:49:40 +00:00
|
|
|
{
|
2004-07-23 11:45:01 +00:00
|
|
|
pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR );
|
2007-01-02 14:49:40 +00:00
|
|
|
pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
|
|
|
|
pBindings->Invalidate( SID_BASICIDE_MANAGE_LANG );
|
|
|
|
}
|
2004-07-23 11:45:01 +00:00
|
|
|
}
|
2000-09-29 10:02:42 +00:00
|
|
|
}
|
|
|
|
|
2012-10-04 00:32:16 -03:00
|
|
|
void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, OUString aLibName )
|
2007-01-02 14:49:40 +00:00
|
|
|
{
|
|
|
|
// Create LocalizationMgr
|
|
|
|
Reference< resource::XStringResourceManager > xStringResourceManager;
|
2007-08-03 08:58:04 +00:00
|
|
|
try
|
2007-01-02 14:49:40 +00:00
|
|
|
{
|
2011-12-09 01:58:49 -05:00
|
|
|
if( !aLibName.isEmpty() )
|
2007-08-03 08:58:04 +00:00
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
|
2007-08-03 08:58:04 +00:00
|
|
|
xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
|
|
|
|
}
|
2007-01-02 14:49:40 +00:00
|
|
|
}
|
2011-08-24 11:22:56 +09:00
|
|
|
catch (const container::NoSuchElementException& )
|
2007-08-03 08:58:04 +00:00
|
|
|
{}
|
2007-01-02 14:49:40 +00:00
|
|
|
|
2012-01-20 20:23:06 -05:00
|
|
|
m_pCurLocalizationMgr = boost::shared_ptr<LocalizationMgr>(new LocalizationMgr(this, rDocument, aLibName, xStringResourceManager));
|
2007-01-02 14:49:40 +00:00
|
|
|
m_pCurLocalizationMgr->handleTranslationbar();
|
|
|
|
}
|
|
|
|
|
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 Shell::ImplStartListening( StarBASIC* pBasic )
|
2000-09-29 10:02:42 +00:00
|
|
|
{
|
2012-08-07 08:36:40 +02:00
|
|
|
StartListening( pBasic->GetBroadcaster(), true /* log on only once */ );
|
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
|
|
|
} // namespace basctl
|
|
|
|
|
2010-10-12 15:57:08 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|