diff options
Diffstat (limited to 'framework')
58 files changed, 709 insertions, 517 deletions
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx index e9d7f0bd4b..84574282e8 100644 --- a/framework/inc/classes/fwktabwindow.hxx +++ b/framework/inc/classes/fwktabwindow.hxx @@ -125,6 +125,7 @@ public: ~FwkTabWindow(); void AddEventListener( const Link& rEventListener ); + void RemoveEventListener( const Link& rEventListener ); FwkTabPage* AddTabPage( sal_Int32 nIndex, const css::uno::Sequence< css::beans::NamedValue >& rProperties ); void ActivatePage( sal_Int32 nIndex ); void RemovePage( sal_Int32 nIndex ); diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx index d51f5ea3cc..e50fa55e2c 100644 --- a/framework/inc/classes/protocolhandlercache.hxx +++ b/framework/inc/classes/protocolhandlercache.hxx @@ -194,6 +194,7 @@ class HandlerCFGAccess : public ::utl::ConfigItem void setCache(HandlerCache* pCache) {m_pCache = pCache;}; virtual void Notify(const css::uno::Sequence< rtl::OUString >& lPropertyNames); + virtual void Commit(); }; } // namespace framework diff --git a/framework/inc/dispatch/basedispatcher.hxx b/framework/inc/dispatch/basedispatcher.hxx index f74efb05ca..d435eab3b6 100644 --- a/framework/inc/dispatch/basedispatcher.hxx +++ b/framework/inc/dispatch/basedispatcher.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ #include <cppuhelper/weakref.hxx> #include <cppuhelper/interfacecontainer.h> /*DRAFT -#include <svtools/historyoptions.hxx> +#include <unotools/historyoptions.hxx> */ //_________________________________________________________________________________________________________________ diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc index 068bdd0802..f7d9152ba5 100644 --- a/framework/inc/framework.hrc +++ b/framework/inc/framework.hrc @@ -31,7 +31,7 @@ #ifndef _FRAMEWORK_HRC #define _FRAMEWORK_HRC -#include "svtools/solar.hrc" +#include "svl/solar.hrc" #define RID_FWK_START 260 diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx index 435b87a4f2..1bd908b266 100644 --- a/framework/inc/helper/mischelper.hxx +++ b/framework/inc/helper/mischelper.hxx @@ -36,7 +36,7 @@ #include <com/sun/star/frame/XFrame.hpp>
#include <i18npool/lang.h>
-#include <svtools/languageoptions.hxx>
+#include <svl/languageoptions.hxx>
namespace framework
{
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx index cc141f37ae..f29cbe4377 100644 --- a/framework/inc/helper/persistentwindowstate.hxx +++ b/framework/inc/helper/persistentwindowstate.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,7 +53,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <cppuhelper/weak.hxx> //_________________________________________________________________________________________________________________ @@ -85,7 +85,7 @@ namespace framework{ @base OWeakObject implements ref counting for this class. - + @devstatus ready @threadsafe yes @modified 06.08.2004 08:41, as96863 @@ -105,13 +105,13 @@ class PersistentWindowState : // interfaces /// may we need an uno service manager to create own services css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; - + /// reference to the frame which was created by the office himself css::uno::WeakReference< css::frame::XFrame > m_xFrame; - + /// we call SetWindowState one times only for the same frame! sal_Bool m_bWindowStateAlreadySet; - + //________________________________ // interface @@ -150,79 +150,79 @@ class PersistentWindowState : // interfaces //____________________________ /** @short identify the application module, which is used behind the component of our frame. - + @param xSMGR needed to create needed uno resources. - + @param xFrame contains the component, wich must be identified. - + @return [string] a module identifier for the current frame component. */ static ::rtl::OUString implst_identifyModule(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , const css::uno::Reference< css::frame::XFrame >& xFrame); - + //____________________________ /** @short retrieve the window state from the configuration. - + @param xSMGR needed to create the configuration access. - + @param sModuleName identifies the application module, where the information should be getted for. - + @return [string] contains the information about position and size. */ static ::rtl::OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , const ::rtl::OUString& sModuleName); - + //____________________________ /** @short retrieve the window state from the container window. - + @param xWindow must point to the container window of the frame. We use it VCL part here - because the toolkit doesnt provide the right functionality! - + @return [string] contains the information about position and size. */ static ::rtl::OUString implst_getWindowStateFromWindow(const css::uno::Reference< css::awt::XWindow >& xWindow); - + //____________________________ /** @short restore the position and size on the container window. - + @param xSMGR needed to create the configuration access. - + @param sModuleName identifies the application module, where the information should be setted on. - + @param sWindowState contains the information about position and size. */ static void implst_setWindowStateOnConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , const ::rtl::OUString& sModuleName , const ::rtl::OUString& sWindowState ); - + //____________________________ /** @short restore the position and size on the container window. - + @param xWindow must point to the container window of the frame. We use it VCL part here - because the toolkit doesnt provide the right functionality! - + @param sWindowState contains the information about position and size. */ static void implst_setWindowStateOnWindow(const css::uno::Reference< css::awt::XWindow >& xWindow , const ::rtl::OUString& sWindowState); - + }; // class PersistentWindowState } // namespace framework diff --git a/framework/inc/helper/titlebarupdate.hxx b/framework/inc/helper/titlebarupdate.hxx index 96549bfe30..5a6538409a 100644 --- a/framework/inc/helper/titlebarupdate.hxx +++ b/framework/inc/helper/titlebarupdate.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -93,7 +93,7 @@ //_________________________________________________________________________________________________________________ #ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #endif #ifndef _CPPUHELPER_WEAK_HXX_ @@ -137,7 +137,7 @@ class TitleBarUpdate : // interfaces // structs, types private: - + struct TModuleInfo { /// internal id of this module @@ -155,10 +155,10 @@ class TitleBarUpdate : // interfaces /// may we need an uno service manager to create own services css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; - + /// reference to the frame which was created by the office himself css::uno::WeakReference< css::frame::XFrame > m_xFrame; - + //________________________________ // interface @@ -189,7 +189,7 @@ class TitleBarUpdate : // interfaces // XTitleChangeListener virtual void SAL_CALL titleChanged(const css::frame::TitleChangedEvent& aEvent) throw (css::uno::RuntimeException); - + //____________________________ // XEventListener virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) @@ -199,53 +199,53 @@ class TitleBarUpdate : // interfaces // helper private: - + //____________________________ /** @short identify the application module, which is used behind the component of our frame. - + @param xFrame contains the component, wich must be identified. - + @param rInfo describe the module in its details. Is set only if return value is true. - + @return [sal_Bool] TRUE in casee module could be identified and all needed values could be read. FALSE otherwise. */ ::sal_Bool implst_getModuleInfo(const css::uno::Reference< css::frame::XFrame >& xFrame, TModuleInfo& rInfo ); - + //____________________________ /** @short set a new icon and title on the title bar of our connected frame window. - + @descr It does not check if an update is realy needed. That has to be done outside. It retrieves all needed informations and update the title bar - nothing less - nothing more. */ void impl_forceUpdate(); - + //____________________________ /** @short identify the current component (inside the connected frame) and set the right module icon on the title bar. - + @param xFrame the frame which contains the component and where the icon must be set on the window title bar. */ void impl_updateIcon(const css::uno::Reference< css::frame::XFrame >& xFrame); - + //____________________________ /** @short gets the current title from the frame and set it on the window. - + @param xFrame the frame which contains the component and where the title must be set on the window title bar. */ void impl_updateTitle(const css::uno::Reference< css::frame::XFrame >& xFrame); - + }; // class TitleBarUpdate } // namespace framework diff --git a/framework/inc/helpid.hrc b/framework/inc/helpid.hrc index 89e80a40ed..71f5253833 100644 --- a/framework/inc/helpid.hrc +++ b/framework/inc/helpid.hrc @@ -32,7 +32,7 @@ // include ------------------------------------------------------------------ -#include <svtools/solar.hrc> +#include <svl/solar.hrc> // Help-Ids ----------------------------------------------------------------- diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx index eaffedbc0e..fd211dd81e 100644 --- a/framework/inc/pch/precompiled_framework.hxx +++ b/framework/inc/pch/precompiled_framework.hxx @@ -380,32 +380,32 @@ #include "sot/storage.hxx" #include "svtools/acceleratorexecute.hxx" -#include "svtools/cmdoptions.hxx" +#include "unotools/cmdoptions.hxx" #include "svtools/colorcfg.hxx" #include "svtools/ctrltool.hxx" -#include "svtools/dynamicmenuoptions.hxx" +#include "unotools/dynamicmenuoptions.hxx" #include "svtools/filter.hxx" #include "svtools/framestatuslistener.hxx" #include "svtools/helpopt.hxx" -#include "svtools/historyoptions.hxx" -#include "svtools/imageitm.hxx" +#include "unotools/historyoptions.hxx" +#include "svl/imageitm.hxx" #include "svtools/imgdef.hxx" -#include "svtools/inettype.hxx" -#include "svtools/internaloptions.hxx" -#include "svtools/lstner.hxx" +#include "svl/inettype.hxx" +#include "unotools/internaloptions.hxx" +#include "svl/lstner.hxx" #include "svtools/menuoptions.hxx" #include "svtools/miscopt.hxx" -#include "svtools/moduleoptions.hxx" -#include "svtools/pathoptions.hxx" +#include "unotools/moduleoptions.hxx" +#include "unotools/pathoptions.hxx" #include "svtools/sfxecode.hxx" -#include "svtools/smplhint.hxx" -#include "svtools/solar.hrc" +#include "svl/smplhint.hxx" +#include "svl/solar.hrc" #include "svtools/statusbarcontroller.hxx" -#include "svtools/svarray.hxx" +#include "svl/svarray.hxx" #include "svtools/svmedit.hxx" #include "svtools/toolboxcontroller.hxx" #include "svtools/transfer.hxx" -#include "svtools/urihelper.hxx" +#include "svl/urihelper.hxx" #include "svtools/xtextedt.hxx" #include "toolkit/awt/vclxmenu.hxx" diff --git a/framework/inc/services/autorecovery.hxx b/framework/inc/services/autorecovery.hxx index ab249fc5ba..55efef2335 100644 --- a/framework/inc/services/autorecovery.hxx +++ b/framework/inc/services/autorecovery.hxx @@ -239,7 +239,8 @@ class AutoRecovery : public css::lang::XTypeProvider E_SESSION_SAVE = 64, E_SESSION_RESTORE = 128, E_DISABLE_AUTORECOVERY = 256, - E_SET_AUTOSAVE_STATE = 512 + E_SET_AUTOSAVE_STATE = 512, + E_SESSION_QUIET_QUIT = 1024 }; //--------------------------------------- @@ -884,6 +885,10 @@ class AutoRecovery : public css::lang::XTypeProvider //--------------------------------------- // TODO document me + void implts_doSessionQuietQuit(const DispatchParams& aParams); + + //--------------------------------------- + // TODO document me void implts_doSessionRestore(const DispatchParams& aParams); //--------------------------------------- diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx index 3e3fffaa7f..b8839a8c2f 100644 --- a/framework/inc/services/desktop.hxx +++ b/framework/inc/services/desktop.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,7 +80,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <cppuhelper/propshlp.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weak.hxx> @@ -181,80 +181,80 @@ class Desktop : // interfaces //--------------------------------------------------------------------- /** @interface XDesktop - + @short try to shutdown these desktop environment. - + @descr Will try to close all frames. If at least one frame could not be closed successfully termination will be stopped. - + Registered termination listener will be taken into account also. As special feature some of our registered listener are well known by it's UNO implementation name. They are handled different to all other listener. - + Btw: Desktop.terminate() was designed in the past to be used within an UI based envrionment. So it's allowed e.g. to call XController.suspend() here. If UI isnt an option ... please use XCloseable.close() at these desktop implementation. ... if it will be supported in the future .-)) - + @seealso XTerminateListener @seealso XTerminateListener2 - + @return true if all open frames could be closed and no listener throwed a veto exception; false otherwise. - + @onerror False will be returned. @threadsafe yes */ virtual ::sal_Bool SAL_CALL terminate() throw( css::uno::RuntimeException ); - + //--------------------------------------------------------------------- /** @interface XDesktop - + @short add a listener for termination events - + @descr Additional to adding normal listener these method was implemented special. Every listener will be asked for it's uno implementation name. Some of them are well known ... and the corresponding listener wont be added to the container of "normal listener". Those listener will be set as special member. see e.g. member m_xSfxTerminator - + @seealso terminate() - + @param xListener the listener for registration. - + @threadsafe yes */ virtual void SAL_CALL addTerminateListener( const css::uno::Reference< css::frame::XTerminateListener >& xListener ) throw( css::uno::RuntimeException ); - + //--------------------------------------------------------------------- /** @interface XDesktop - + @short remove a listener from this container. - + @descr Additional to removing normal listener these method was implemented special. Every listener will be asked for it's uno implementation name. Some of them are well known ... and the corresponding listener was set as special member. Now those special member will be reseted also. see e.g. member m_xSfxTerminator - + @seealso terminate() - + @param xListener the listener for deregistration. - + @threadsafe yes */ virtual void SAL_CALL removeTerminateListener( const css::uno::Reference< css::frame::XTerminateListener >& xListener ) throw( css::uno::RuntimeException ); - + virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getComponents ( ) throw( css::uno::RuntimeException ); virtual css::uno::Reference< css::lang::XComponent > SAL_CALL getCurrentComponent ( ) throw( css::uno::RuntimeException ); virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getCurrentFrame ( ) throw( css::uno::RuntimeException ); @@ -327,21 +327,21 @@ class Desktop : // interfaces virtual ::sal_Int32 SAL_CALL leaseNumber( const css::uno::Reference< css::uno::XInterface >& xComponent ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ); - + // css.frame.XUntitledNumbers virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ); - + // css.frame.XUntitledNumbers virtual void SAL_CALL releaseNumberForComponent( const css::uno::Reference< css::uno::XInterface >& xComponent ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ); - + // css.frame.XUntitledNumbers virtual ::rtl::OUString SAL_CALL getUntitledPrefix() throw (css::uno::RuntimeException); - + //------------------------------------------------------------------------------------------------------------- // protected methods //------------------------------------------------------------------------------------------------------------- @@ -367,7 +367,7 @@ class Desktop : // interfaces css::uno::Reference< css::lang::XComponent > impl_getFrameComponent ( const css::uno::Reference< css::frame::XFrame >& xFrame ) const; static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor( ); - + //--------------------------------------------------------------------- /** calls queryTermination() on every registered termination listener. * @@ -388,9 +388,9 @@ class Desktop : // interfaces */ void impl_sendQueryTerminationEvent(TTerminateListenerList& lCalledListener, ::sal_Bool& bVeto ); - + //--------------------------------------------------------------------- - /** calls cancelTermination() on every termination listener + /** calls cancelTermination() on every termination listener * where queryTermination() was called before. * * Note: Only normal termination listener (registered in list m_aListenerContainer @@ -404,7 +404,7 @@ class Desktop : // interfaces * @see impl_sendQueryTerminationEvent() */ void impl_sendCancelTerminationEvent(const TTerminateListenerList& lCalledListener); - + //--------------------------------------------------------------------- /** calls notifyTermination() on every registered termination listener. * @@ -413,7 +413,7 @@ class Desktop : // interfaces * has to be handled explicitly ! */ void impl_sendNotifyTerminationEvent(); - + //--------------------------------------------------------------------- /** try to close all open frames. * @@ -467,13 +467,13 @@ class Desktop : // interfaces ::rtl::OUString m_sName ; ::rtl::OUString m_sTitle ; css::uno::Reference< css::frame::XDispatchRecorderSupplier > m_xDispatchRecorderSupplier ; - + //--------------------------------------------------------------------- /** special terminate listener to close pipe and block external requests * during/after termination process is/was running */ css::uno::Reference< css::frame::XTerminateListener > m_xPipeTerminator; - + //--------------------------------------------------------------------- /** special terminate listener shown inside system tray (quick starter) * Will hinder the office on shutdown ... but wish to allow closing @@ -481,7 +481,7 @@ class Desktop : // interfaces * it has to be handled special .-) */ css::uno::Reference< css::frame::XTerminateListener > m_xQuickLauncher; - + //--------------------------------------------------------------------- /** special terminate listener which loads images asynchronous for current open documents. * Because internaly it uses blocking system APIs ... it cant be guaranteed that @@ -491,7 +491,7 @@ class Desktop : // interfaces * So these implementation must be a special terminate listener too .-( */ css::uno::Reference< css::frame::XTerminateListener > m_xSWThreadManager; - + //--------------------------------------------------------------------- /** special terminate listener shuting down the SfxApplication. * Because these desktop instance closes documents and informs listener diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx index 48402d5720..b63e76ed0e 100644 --- a/framework/inc/services/frame.hxx +++ b/framework/inc/services/frame.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,7 +87,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weak.hxx> #include <rtl/string.hxx> @@ -318,13 +318,13 @@ class Frame : // interfaces //--------------------------------------------------------------------------------------------------------- virtual ::rtl::OUString SAL_CALL getTitle( ) throw (css::uno::RuntimeException); virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (css::uno::RuntimeException); - + //--------------------------------------------------------------------------------------------------------- // XTitleChangeBroadcaster //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL addTitleChangeListener ( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException); virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListenr ) throw (css::uno::RuntimeException); - + //--------------------------------------------------------------------------------------------------------- // PropertySetHelper => XPropertySet, XPropertySetInfo //--------------------------------------------------------------------------------------------------------- diff --git a/framework/inc/services/licensedlg.hxx b/framework/inc/services/licensedlg.hxx index 7731455a50..a2a833ec9d 100644 --- a/framework/inc/services/licensedlg.hxx +++ b/framework/inc/services/licensedlg.hxx @@ -42,7 +42,7 @@ #include <vcl/dialog.hxx> #include <vcl/scrbar.hxx> #include <svtools/svmedit.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> namespace framework { diff --git a/framework/inc/services/pluginframe.hxx b/framework/inc/services/pluginframe.hxx index 46a8281c17..a8b13b682d 100644 --- a/framework/inc/services/pluginframe.hxx +++ b/framework/inc/services/pluginframe.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ #ifndef _VCL_ATOM_HXX #include <vcl/threadex.hxx> #endif -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> //_________________________________________________________________________________________________________________ @@ -358,7 +358,7 @@ class cIMPL_MainThreadExecutor //------------------------------------------------------------------------------------------------------------- public: static void execute( cIMPL_MainThreadExecutorRequest* pRequest ); - + /*-****************************************************************************************************//** @short - @descr - diff --git a/framework/inc/services/sessionlistener.hxx b/framework/inc/services/sessionlistener.hxx index b78a0547b4..bc35993b79 100644 --- a/framework/inc/services/sessionlistener.hxx +++ b/framework/inc/services/sessionlistener.hxx @@ -49,7 +49,7 @@ #include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/frame/XSessionManagerListener.hpp> +#include <com/sun/star/frame/XSessionManagerListener2.hpp> #include <com/sun/star/frame/XSessionManagerClient.hpp> #include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/frame/FeatureStateEvent.hpp> @@ -98,7 +98,7 @@ namespace framework{ class SessionListener : // interfaces public css::lang::XTypeProvider, public css::lang::XInitialization, - public css::frame::XSessionManagerListener, + public css::frame::XSessionManagerListener2, public css::frame::XStatusListener, public css::lang::XServiceInfo, // baseclasses (order important for initialization!) @@ -119,7 +119,19 @@ class SessionListener : // interfaces // restore handling sal_Bool m_bRestored; + + sal_Bool m_bSessionStoreRequested; + + sal_Bool m_bAllowUserInteractionOnQuit; + sal_Bool m_bTerminated; + + // in case of synchronous call the caller should do saveDone() call himself! + void StoreSession( sal_Bool bAsync ); + + // let session quietly close the documents, remove lock files, store configuration and etc. + void QuitSessionQuietly(); + public: //--------------------------------------- @@ -146,7 +158,7 @@ class SessionListener : // interfaces SessionListener( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ); virtual ~SessionListener(); - + virtual void SAL_CALL disposing(const com::sun::star::lang::EventObject&) throw (css::uno::RuntimeException); @@ -163,6 +175,10 @@ class SessionListener : // interfaces virtual sal_Bool SAL_CALL doRestore() throw (css::uno::RuntimeException); + // XSessionManagerListener2 + virtual void SAL_CALL doQuit() + throw (::com::sun::star::uno::RuntimeException); + // XStatusListener virtual void SAL_CALL statusChanged(const com::sun::star::frame::FeatureStateEvent& event) throw (css::uno::RuntimeException); diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx index 675d16ceb3..0c891e6ffb 100644 --- a/framework/inc/services/substitutepathvars.hxx +++ b/framework/inc/services/substitutepathvars.hxx @@ -139,6 +139,7 @@ class SubstitutePathVariables_Impl : public utl::ConfigItem /** is called from the ConfigManager before application ends or from the PropertyChangeListener if the sub tree broadcasts changes. */ virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); + virtual void Commit(); private: // Wrapper methods for low-level functions diff --git a/framework/inc/services/tabwindowservice.hxx b/framework/inc/services/tabwindowservice.hxx index 198d84be0b..0614397e21 100644 --- a/framework/inc/services/tabwindowservice.hxx +++ b/framework/inc/services/tabwindowservice.hxx @@ -48,13 +48,13 @@ #include <macros/xinterface.hxx> #include <macros/xtypeprovider.hxx> #include <macros/xserviceinfo.hxx> -#include <general.h>
+#include <general.h> #include <stdtypes.h> -
+ //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ -
+ #include <com/sun/star/awt/XSimpleTabController.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -62,7 +62,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -
+ #include <cppuhelper/weak.hxx> #include <vcl/window.hxx> @@ -81,31 +81,31 @@ namespace framework{ //_________________________________________________________________________________________________________________ struct TTabPageInfo -{
- public:
+{ + public: - TTabPageInfo()
- : m_nIndex ( -1 )
- , m_bCreated (sal_False)
- , m_pPage ( NULL )
- , m_lProperties ( )
- {}
-
- TTabPageInfo(::sal_Int32 nID)
- : m_nIndex ( nID )
- , m_bCreated (sal_False)
- , m_pPage ( NULL )
- , m_lProperties ( )
- {}
-
- public:
+ TTabPageInfo() + : m_nIndex ( -1 ) + , m_bCreated (sal_False) + , m_pPage ( NULL ) + , m_lProperties ( ) + {} + + TTabPageInfo(::sal_Int32 nID) + : m_nIndex ( nID ) + , m_bCreated (sal_False) + , m_pPage ( NULL ) + , m_lProperties ( ) + {} + + public: - ::sal_Int32 m_nIndex;
+ ::sal_Int32 m_nIndex; ::sal_Bool m_bCreated; FwkTabPage* m_pPage; css::uno::Sequence< css::beans::NamedValue > m_lProperties; -};
-
+}; + typedef ::std::hash_map< ::sal_Int32 , TTabPageInfo , Int32HashCode , @@ -118,10 +118,11 @@ typedef ::std::hash_map< ::sal_Int32 , class TabWindowService : public css::lang::XTypeProvider , public css::lang::XServiceInfo , public css::awt::XSimpleTabController + , public css::lang::XComponent , public ThreadHelpBase , public TransactionBase - , public PropertySetHelper
- , public ::cppu::OWeakObject
+ , public PropertySetHelper + , public ::cppu::OWeakObject { //------------------------------------------------------------------------------------------------------------- // public methods @@ -132,7 +133,7 @@ class TabWindowService : public css::lang::XTypeProvider //--------------------------------------------------------------------------------------------------------- // constructor / destructor //--------------------------------------------------------------------------------------------------------- -
+ TabWindowService( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); virtual ~TabWindowService(); @@ -186,8 +187,8 @@ class TabWindowService : public css::lang::XTypeProvider DECL_DLLPRIVATE_LINK( EventListener, VclSimpleEvent * ); - void impl_checkTabIndex (::sal_Int32 nID) throw (css::lang::IndexOutOfBoundsException);
- TTabPageInfoHash::iterator impl_getTabPageInfo(::sal_Int32 nID) throw (css::lang::IndexOutOfBoundsException);
+ void impl_checkTabIndex (::sal_Int32 nID) throw (css::lang::IndexOutOfBoundsException); + TTabPageInfoHash::iterator impl_getTabPageInfo(::sal_Int32 nID) throw (css::lang::IndexOutOfBoundsException); FwkTabWindow* mem_TabWin (); /* ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); @@ -203,26 +204,26 @@ class TabWindowService : public css::lang::XTypeProvider private: /// reference to factory, which has created this instance - css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
-
+ css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory; + /// the tab window as XWindow ( to hold window* alive !) - css::uno::Reference< css::awt::XWindow > m_xTabWin;
-
- /// the VCL tab window
- FwkTabWindow* m_pTabWin;
-
- /// container of inserted tab pages
- TTabPageInfoHash m_lTabPageInfos;
-
+ css::uno::Reference< css::awt::XWindow > m_xTabWin; + + /// the VCL tab window + FwkTabWindow* m_pTabWin; + + /// container of inserted tab pages + TTabPageInfoHash m_lTabPageInfos; + /// container of the added TabListener ::cppu::OMultiTypeInterfaceContainerHelper m_lListener; -
+ /// counter of the tabpage indexes - ::sal_Int32 m_nPageIndexCounter;
-
+ ::sal_Int32 m_nPageIndexCounter; + /// index of the current active page ::sal_Int32 m_nCurrentPageIndex; -
+ /// title of the tabcontrolled window ::rtl::OUString m_sTitle; diff --git a/framework/inc/xml/eventsconfiguration.hxx b/framework/inc/xml/eventsconfiguration.hxx index 5431cf1d58..55f0dfe51f 100644 --- a/framework/inc/xml/eventsconfiguration.hxx +++ b/framework/inc/xml/eventsconfiguration.hxx @@ -31,7 +31,7 @@ #ifndef __FRAMEWORK_XML_EVENTSCONFIGURATION_HXX_ #define __FRAMEWORK_XML_EVENTSCONFIGURATION_HXX_ -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <tools/string.hxx> #include <tools/stream.hxx> #include <com/sun/star/uno/Sequence.hxx> diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/xml/imagesconfiguration.hxx index 624508d1b0..613636009d 100644 --- a/framework/inc/xml/imagesconfiguration.hxx +++ b/framework/inc/xml/imagesconfiguration.hxx @@ -31,7 +31,7 @@ #ifndef __FRAMEWORK_XML_IMAGESCONFIGURATION_HXX_ #define __FRAMEWORK_XML_IMAGESCONFIGURATION_HXX_ -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <tools/string.hxx> #include <tools/stream.hxx> #include <tools/color.hxx> diff --git a/framework/inc/xml/statusbarconfiguration.hxx b/framework/inc/xml/statusbarconfiguration.hxx index ac65225389..550d1fcbc2 100644 --- a/framework/inc/xml/statusbarconfiguration.hxx +++ b/framework/inc/xml/statusbarconfiguration.hxx @@ -1,7 +1,7 @@ #ifndef __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_ #define __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_ -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <tools/string.hxx> #include <tools/stream.hxx> #include <vcl/status.hxx> diff --git a/framework/inc/xml/toolboxconfiguration.hxx b/framework/inc/xml/toolboxconfiguration.hxx index 0c35c46687..f1f0949e4e 100644 --- a/framework/inc/xml/toolboxconfiguration.hxx +++ b/framework/inc/xml/toolboxconfiguration.hxx @@ -1,7 +1,7 @@ #ifndef __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ #define __FRAMEWORK_XML_TOOLBOXCONFIGURATION_HXX_ -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <vcl/bitmap.hxx> #include <tools/string.hxx> #include <com/sun/star/io/XInputStream.hpp> diff --git a/framework/qa/complex/api_internal/makefile.mk b/framework/qa/complex/api_internal/makefile.mk index 36556d6f03..2178f1eefb 100755 --- a/framework/qa/complex/api_internal/makefile.mk +++ b/framework/qa/complex/api_internal/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/api_internal #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar +JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar JAVAFILES = CheckAPI.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/broken_document/makefile.mk b/framework/qa/complex/broken_document/makefile.mk index 6f20fc5aa4..3fe22b6adb 100755 --- a/framework/qa/complex/broken_document/makefile.mk +++ b/framework/qa/complex/broken_document/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/broken_document #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = LoadDocument.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/contextMenuInterceptor/makefile.mk b/framework/qa/complex/contextMenuInterceptor/makefile.mk index b9cfad982d..e95e371911 100644 --- a/framework/qa/complex/contextMenuInterceptor/makefile.mk +++ b/framework/qa/complex/contextMenuInterceptor/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = contextMenuInterceptor #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = ContextMenuInterceptor.java CheckContextMenuInterceptor.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/disposing/makefile.mk b/framework/qa/complex/disposing/makefile.mk index 1dd1194db1..7f686ff5f6 100755 --- a/framework/qa/complex/disposing/makefile.mk +++ b/framework/qa/complex/disposing/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/disposing #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = $(TARGET).java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/framework/recovery/makefile.mk b/framework/qa/complex/framework/recovery/makefile.mk index fb08f74383..0b86efd4d0 100755 --- a/framework/qa/complex/framework/recovery/makefile.mk +++ b/framework/qa/complex/framework/recovery/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/framework$/recovery #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = RecoveryTest.java RecoveryTools.java CrashThread.java TimeoutThread.java KlickButtonThread.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/imageManager/interfaces/makefile.mk b/framework/qa/complex/imageManager/interfaces/makefile.mk index d9da36437e..49a28defb9 100755 --- a/framework/qa/complex/imageManager/interfaces/makefile.mk +++ b/framework/qa/complex/imageManager/interfaces/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = imageManager$/interfaces #----- compile .java files ----------------------------------------- -JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = _XComponent.java _XUIConfiguration.java _XImageManager.java \ _XUIConfigurationPersistence.java _XInitialization.java _XTypeProvider.java diff --git a/framework/qa/complex/imageManager/makefile.mk b/framework/qa/complex/imageManager/makefile.mk index eb52b2beba..8537d18abc 100755 --- a/framework/qa/complex/imageManager/makefile.mk +++ b/framework/qa/complex/imageManager/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = imageManager #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = CheckImageManager.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/path_settings/makefile.mk b/framework/qa/complex/path_settings/makefile.mk index 605c95a684..8f6ee0302f 100755 --- a/framework/qa/complex/path_settings/makefile.mk +++ b/framework/qa/complex/path_settings/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/path_settings #----- compile .java files ----------------------------------------- -JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar +JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar JAVAFILES = PathSettingsTest.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/path_substitution/makefile.mk b/framework/qa/complex/path_substitution/makefile.mk index 3ca7dadd99..453ae89d27 100755 --- a/framework/qa/complex/path_substitution/makefile.mk +++ b/framework/qa/complex/path_substitution/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/path_substitution #----- compile .java files ----------------------------------------- -JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar +JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar JAVAFILES = PathSubstitutionTest.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/framework/qa/complex/sequence/makefile.mk b/framework/qa/complex/sequence/makefile.mk index 97b9e7dbb2..959ea5cba5 100755 --- a/framework/qa/complex/sequence/makefile.mk +++ b/framework/qa/complex/sequence/makefile.mk @@ -40,7 +40,7 @@ PACKAGE = complex$/sequence #----- compile .java files ----------------------------------------- -JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar CheckSequenceOfEnum.jar +JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar CheckSequenceOfEnum.jar JAVAFILES = CheckSequenceOfEnum.java ENUMSEQUENCEIDL = com.sun.star.enumexample.XEnumSequence diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/classes/bmkmenu.cxx index 6bee8c399d..e17672b4a0 100644 --- a/framework/source/classes/bmkmenu.cxx +++ b/framework/source/classes/bmkmenu.cxx @@ -61,7 +61,7 @@ //_________________________________________________________________________________________________________________ #include <tools/config.hxx> #include <vcl/svapp.hxx> -#include <svtools/dynamicmenuoptions.hxx> +#include <unotools/dynamicmenuoptions.hxx> #include <svtools/menuoptions.hxx> #include <rtl/logfile.hxx> @@ -130,7 +130,7 @@ USHORT BmkMenu_Impl::GetMID() // ------------------------------------------------------------------------ -BmkMenu::BmkMenu( com::sun::star::uno::Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType, BmkMenu* pRoot ) +BmkMenu::BmkMenu( com::sun::star::uno::Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType, BmkMenu* pRoot ) :AddonMenu(xFrame) ,m_nType( nType ) { @@ -139,7 +139,7 @@ BmkMenu::BmkMenu( com::sun::star::uno::Reference< XFrame >& xFrame, BmkMenu::Bmk } BmkMenu::BmkMenu( Reference< XFrame >& xFrame, BmkMenu::BmkMenuType nType ) - :AddonMenu(xFrame) + :AddonMenu(xFrame) ,m_nType( nType ) { _pImp = new BmkMenu_Impl(); diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index 8ffa00a492..af8319c193 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -65,7 +65,6 @@ namespace framework { // class FwkTabControl --------------------------------------------------- - FwkTabControl::FwkTabControl( Window* pParent, const ResId& rResId ) : TabControl( pParent, rResId ) @@ -336,6 +335,11 @@ void FwkTabWindow::AddEventListener( const Link& rEventListener ) m_aTabCtrl.AddEventListener( rEventListener ); } +void FwkTabWindow::RemoveEventListener( const Link& rEventListener ) +{ + m_aTabCtrl.RemoveEventListener( rEventListener ); +} + // ----------------------------------------------------------------------- FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< beans::NamedValue >& rProperties ) diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index b245cff3ad..8928bf6ea7 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,8 +66,8 @@ #include <comphelper/extract.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/historyoptions.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/historyoptions.hxx> +#include <unotools/pathoptions.hxx> #include <unotools/localfilehelper.hxx> #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ @@ -140,11 +140,11 @@ const ::rtl::OUString aSpecialWindowCommand( RTL_CONSTASCII_USTRINGPARAM( "Windo const ::rtl::OUString UNO_COMMAND( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); // #110897# -MenuManager::MenuManager( +MenuManager::MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) + REFERENCE< XFRAME >& rFrame, Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) : // #110897# - ThreadHelpBase( &Application::GetSolarMutex() ), + ThreadHelpBase( &Application::GetSolarMutex() ), mxServiceFactory(xServiceFactory) { m_bActive = sal_False; @@ -191,13 +191,13 @@ MenuManager::MenuManager( aItemCommand == aSlotSpecialToolsMenu ) && AddonMenuManager::HasAddonMenuElements() ) { - USHORT nCount = 0; + USHORT nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { if ( pPopupMenu->GetItemType( nCount-1 ) != MENUITEM_SEPARATOR ) pPopupMenu->InsertSeparator(); - + // Use resource to load popup menu title String aAddonsStrRes = String( FwkResId( STR_MENU_ADDONS )); pPopupMenu->InsertItem( ITEMID_ADDONLIST, aAddonsStrRes ); @@ -208,7 +208,7 @@ MenuManager::MenuManager( aItemCommand = aSlotString; aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)ITEMID_ADDONLIST ); pPopupMenu->SetItemCommand( ITEMID_ADDONLIST, aItemCommand ); - + // #110897# // MenuManager* pSubMenuManager = new MenuManager( rFrame, pSubMenu, sal_True, sal_False ); AddMenu(pSubMenu,::rtl::OUString(),nItemId,sal_True,sal_False); @@ -248,7 +248,7 @@ MenuManager::MenuManager( if ( pMenu->GetItemText( nItemId ).Len() == 0 ) aQueryLabelItemIdVector.push_back( nItemId ); #endif - + if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId )) { Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); @@ -273,7 +273,7 @@ MenuManager::MenuManager( if ( pMenu->GetItemText( nItemId ).Len() == 0 ) aQueryLabelItemIdVector.push_back( nItemId ); #endif - + if ( m_bShowMenuImages && !pMenu->GetItemImage( nItemId )) { Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); @@ -290,7 +290,7 @@ MenuManager::MenuManager( // Add-Ons uses a images from different places Image aImage; rtl::OUString aImageId; - + MenuConfiguration::Attributes* pMenuAttributes = (MenuConfiguration::Attributes*)pMenu->GetUserValue( nItemId ); @@ -306,7 +306,7 @@ MenuManager::MenuManager( if ( !aImage ) aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE, m_bWasHiContrast ); } - + if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -317,7 +317,7 @@ MenuManager::MenuManager( pMenu->SetItemImage( nItemId, aImage ); } } - + REFERENCE< XDISPATCH > aXDispatchRef; m_aMenuItemHandlerVector.push_back( new MenuItemHandler( nItemId, NULL, aXDispatchRef )); #if 0 @@ -355,11 +355,11 @@ MenuManager::MenuManager( } // #110897# -MenuManager::MenuManager( +MenuManager::MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, - REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) + REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ) : // #110897# - ThreadHelpBase( &Application::GetSolarMutex() ), + ThreadHelpBase( &Application::GetSolarMutex() ), mxServiceFactory(xServiceFactory) { m_bActive = sal_False; @@ -788,7 +788,7 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XMultiSe { Reference< XFrame > xFrame; xList->getByIndex(i) >>= xFrame; - + if (xFrame.is()) { if ( xFrame == xCurrentFrame ) @@ -1033,7 +1033,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) { Reference< XFrame > xFrame; xList->getByIndex(i) >>= xFrame; - + if ( xFrame.is() && nTaskId == nCurItemId ) { Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); @@ -1096,7 +1096,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFac void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren) { MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), m_xFrame, _pPopupMenu, _bDelete, _bDeleteChildren ); - + // store menu item command as we later have to know which menu is active (see Activate handler) pSubMenuManager->m_aMenuItemCommand = _sItemCommand; @@ -1158,7 +1158,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, FALSE, bIsHiContrast ); if ( !aImage ) aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, FALSE, bIsHiContrast ); - + _pMenu->SetItemImage( nId, aImage ); } } diff --git a/framework/source/classes/protocolhandlercache.cxx b/framework/source/classes/protocolhandlercache.cxx index 3a1c4131c5..150cae4f0a 100644 --- a/framework/source/classes/protocolhandlercache.cxx +++ b/framework/source/classes/protocolhandlercache.cxx @@ -357,4 +357,8 @@ void HandlerCFGAccess::Notify(const css::uno::Sequence< rtl::OUString >& /*lProp } } +void HandlerCFGAccess::Commit() +{ +} + } // namespace framework diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index b49c29e2c8..4652b768e1 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <vos/mutex.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> //_______________________________________________ // namespace @@ -394,7 +394,7 @@ IMPL_LINK( CloseDispatcher, impl_asyncCallback, void*, EMPTYARG ) // on mac close down, quickstarter keeps the process alive // however if someone has shut down the quickstarter // behave as any other platform - + bool bQuickstarterRunning = false; // get quickstart service try @@ -429,7 +429,7 @@ IMPL_LINK( CloseDispatcher, impl_asyncCallback, void*, EMPTYARG ) if (xController.is()) xController->suspend(sal_False); } - + // inform listener sal_Int16 nState = css::frame::DispatchResultState::FAILURE; if (bSuccess) @@ -469,7 +469,7 @@ sal_Bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Referenc // Frame already dead ... so this view is closed ... is closed ... is ... .-) if (! xFrame.is()) return sal_True; - + // Close all views to the same document ... if forced to do so. // But dont touch our own frame here! // We must do so ... because the may be following controller->suspend() @@ -481,7 +481,7 @@ sal_Bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Referenc css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; aReadLock.unlock(); // <- SAFE ---------------------------------- - + css::uno::Reference< css::frame::XFramesSupplier > xDesktop(xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY_THROW); FrameListAnalyzer aCheck(xDesktop, xFrame, FrameListAnalyzer::E_ALL); @@ -614,14 +614,14 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig return xFrame; OSL_ENSURE((sTarget.getLength() < 1), "CloseDispatch used for unexpected target. Magic things will happen now .-)"); - + css::uno::Reference< css::frame::XFrame > xTarget = xFrame; while(sal_True) { // a) top frames wil be closed if (xTarget->isTop()) return xTarget; - + // b) even child frame containing top level windows (e.g. query designer of database) will be closed css::uno::Reference< css::awt::XWindow > xWindow = xTarget->getContainerWindow(); css::uno::Reference< css::awt::XTopWindow > xTopWindowCheck(xWindow, css::uno::UNO_QUERY); @@ -640,14 +640,14 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig ) return xTarget; } - + // c) try to find better results on parent frame // If no parent frame exists (because this frame is used outside the desktop tree) // the given frame must be used directly. css::uno::Reference< css::frame::XFrame > xParent(xTarget->getCreator(), css::uno::UNO_QUERY); if ( ! xParent.is()) return xTarget; - + // c1) check parent frame inside next loop ... xTarget = xParent; } diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx index def4f785be..9326181c64 100644 --- a/framework/source/dispatch/startmoduledispatcher.cxx +++ b/framework/source/dispatch/startmoduledispatcher.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <vos/mutex.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> //_______________________________________________ // namespace diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 1db613237d..962bbbf0f1 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -371,6 +371,12 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra { WorkWindow* pWorkWindow = (WorkWindow*)pWindow; pWorkWindow->SetIcon( (sal_uInt16)nIcon ); + + css::uno::Reference< css::frame::XModel > xModel = xController->getModel(); + rtl::OUString aURL; + if( xModel.is() ) + aURL = xModel->getURL(); + pWorkWindow->SetRepresentedURL( aURL ); } aSolarLock.clear(); diff --git a/framework/source/helper/titlehelper.cxx b/framework/source/helper/titlehelper.cxx index 2eb1707ae3..3dd9467ef2 100644 --- a/framework/source/helper/titlehelper.cxx +++ b/framework/source/helper/titlehelper.cxx @@ -616,7 +616,7 @@ void TitleHelper::impl_appendModuleName (::rtl::OUStringBuffer& sTitle) } //***************************************************************************************************************** -#ifndef PRODUCT +#ifdef DBG_UTIL void TitleHelper::impl_appendDebugVersion (::rtl::OUStringBuffer& sTitle) { ::rtl::OUString sDefault ; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 03b9b02e66..4d5f3c4b00 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -101,7 +101,7 @@ #include <comphelper/mediadescriptor.hxx> #include <comphelper/uno3.hxx> #include <rtl/logfile.hxx> -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <algorithm> #include <boost/bind.hpp> @@ -314,7 +314,7 @@ static void impl_setDockingWindowVisibility( const css::uno::Reference< css::lan { const ::rtl::OUString aDockWinPrefixCommand( RTL_CONSTASCII_USTRINGPARAM( "DockingWindow" )); css::uno::WeakReference< css::frame::XDispatchHelper > xDispatchHelper; - + sal_Int32 nID = rDockingWindowName.toInt32(); sal_Int32 nIndex = nID - DOCKWIN_ID_BASE; @@ -323,9 +323,9 @@ static void impl_setDockingWindowVisibility( const css::uno::Reference< css::lan { ::rtl::OUString aDockWinCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:" )); ::rtl::OUString aDockWinArgName( aDockWinPrefixCommand ); - + aDockWinArgName += ::rtl::OUString::valueOf( nIndex ); - + css::uno::Sequence< css::beans::PropertyValue > aArgs(1); aArgs[0].Name = aDockWinArgName; aArgs[0].Value = css::uno::makeAny( bVisible ); @@ -419,7 +419,7 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM m_pMiscOptions = new SvtMiscOptions(); - m_pMiscOptions->AddListener( LINK( this, LayoutManager, OptionsChanged ) ); + m_pMiscOptions->AddListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); m_eSymbolsSize = m_pMiscOptions->GetSymbolsSize(); m_eSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); @@ -442,7 +442,7 @@ LayoutManager::~LayoutManager() Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); if ( m_pMiscOptions ) { - m_pMiscOptions->RemoveListener( LINK( this, LayoutManager, OptionsChanged ) ); + m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); delete m_pMiscOptions; m_pMiscOptions = 0; } @@ -2262,7 +2262,7 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea nLastPos = rElement.m_aDockedData.m_aPos.X() + aPosSize.Width; - + rRowColumnWindowData.aRowColumnWindowSizes.push_back( css::awt::Rectangle( rElement.m_aDockedData.m_aPos.X(), rElement.m_aDockedData.m_aPos.Y(), @@ -2280,7 +2280,7 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea rRowColumnWindowData.nSpace += nSpace; else nSpace = 0; - + nLastPos = rElement.m_aDockedData.m_aPos.Y() + aPosSize.Height; rRowColumnWindowData.aRowColumnWindowSizes.push_back( @@ -4253,7 +4253,7 @@ throw (RuntimeException) else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) { aWriteLock.unlock(); - + // The docking window is created by a factory method located in the sfx2 library. CreateDockingWindow( xFrame, aElementName ); } @@ -5283,7 +5283,7 @@ throw (RuntimeException) ReadGuard aReadGuard( m_aLock ); css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); aReadGuard.unlock(); - + return IsDockingWindowVisible( xFrame, aElementName ); } } @@ -5726,7 +5726,7 @@ void LayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockin sal_Int32 nSpace = rRowColumnWindowData.aRowColumnSpace[i]; if ( nSpace >= -nDiff ) { - + if (( nDockingArea == DockingArea_DOCKINGAREA_TOP ) || ( nDockingArea == DockingArea_DOCKINGAREA_BOTTOM )) { @@ -7191,7 +7191,7 @@ throw( RuntimeException ) Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); if ( m_pMiscOptions ) { - m_pMiscOptions->RemoveListener( LINK( this, LayoutManager, OptionsChanged ) ); + m_pMiscOptions->RemoveListenerLink( LINK( this, LayoutManager, OptionsChanged ) ); delete m_pMiscOptions; m_pMiscOptions = 0; } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index d131a3b6e8..9fb939e9db 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -106,7 +106,7 @@ #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> #endif -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <svtools/sfxecode.hxx> #include <unotools/processfactory.hxx> #include <comphelper/configurationhelper.hxx> @@ -252,7 +252,7 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const if ( pIt != lModelDescriptor.end() ) lDescriptor[::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()] = pIt->second; } - + return lDescriptor; } @@ -1363,7 +1363,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // frame we referr to any hidden frame also (but as fallback only). css::uno::Reference< css::frame::XFrame > xHiddenTask; css::uno::Reference< css::frame::XFrame > xTask; - + sal_Int32 count = xTaskList->getCount(); for (sal_Int32 i=0; i<count; ++i) { @@ -1410,7 +1410,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() xTask.clear (); continue; } - + // Hidden frames are special. // They will be used as "last chance" if there is no visible frame pointing to the same model. // Safe the result but continue with current loop might be looking for other visible frames. @@ -1424,7 +1424,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() xTask.clear (); continue; } - + // We found a visible task pointing to the right model ... // Break search. break; @@ -1441,7 +1441,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() else if (xHiddenTask.is()) xResult = xHiddenTask; - + if (xResult.is()) { // Now we are shure, that this task includes the searched document. @@ -1449,11 +1449,11 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // if an optional jumpmark is given too. if (m_aURL.Mark.getLength()) impl_jumpToMark(xResult, m_aURL); - + // bring it to front and make sure it's visible... impl_makeFrameWindowVisible(xResult->getContainerWindow(), sal_True); } - + aReadLock.unlock(); // <- SAFE @@ -1604,7 +1604,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() m_bReactivateControllerOnError = bReactivateOldControllerOnError; aWriteLock.unlock(); // <- SAFE .................................. - + // bring it to front ... impl_makeFrameWindowVisible(xTask->getContainerWindow(), sal_True); @@ -1738,7 +1738,7 @@ void LoadEnv::impl_reactForLoadingState() 16.01.2005 13:04 -----------------------------------------------*/ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::XWindow >& xWindow , - sal_Bool bForceToFront) + sal_Bool bForceToFront) { // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index ca7b94f2c5..c8731b0af5 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,7 +80,7 @@ #include <comphelper/configurationhelper.hxx> #include <comphelper/mediadescriptor.hxx> #include <vcl/svapp.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <tools/link.hxx> #include <tools/string.hxx> #include <unotools/tempfile.hxx> @@ -91,7 +91,7 @@ #include <osl/file.hxx> #include <unotools/bootstrap.hxx> #include <unotools/configmgr.hxx> -#include <svtools/documentlockfile.hxx> +#include <svl/documentlockfile.hxx> #include <tools/urlobj.hxx> @@ -170,6 +170,7 @@ static const ::rtl::OUString CMD_DO_RECOVERY = ::rtl::OUString:: static const ::rtl::OUString CMD_DO_ENTRY_BACKUP = ::rtl::OUString::createFromAscii("/doEntryBackup" ); // try to store a temp or original file to a user defined location static const ::rtl::OUString CMD_DO_ENTRY_CLEANUP = ::rtl::OUString::createFromAscii("/doEntryCleanUp" ); // remove the specified entry from the recovery cache static const ::rtl::OUString CMD_DO_SESSION_SAVE = ::rtl::OUString::createFromAscii("/doSessionSave" ); // save all open documents if e.g. a window manager closes an user session +static const ::rtl::OUString CMD_DO_SESSION_QUIET_QUIT = ::rtl::OUString::createFromAscii("/doSessionQuietQuit" ); // let the current session be quietly closed ( the saving should be done using doSessionSave previously ) if e.g. a window manager closes an user session static const ::rtl::OUString CMD_DO_SESSION_RESTORE = ::rtl::OUString::createFromAscii("/doSessionRestore" ); // restore a saved user session from disc static const ::rtl::OUString CMD_DO_DISABLE_RECOVERY = ::rtl::OUString::createFromAscii("/disableRecovery" ); // disable recovery and auto save (!) temp. for this office session static const ::rtl::OUString CMD_DO_SET_AUTOSAVE_STATE = ::rtl::OUString::createFromAscii("/setAutoSaveState" ); // disable/enable auto save (not crash save) for this office session @@ -725,6 +726,16 @@ void AutoRecovery::implts_dispatch(const DispatchParams& aParams) } else if ( + ((eJob & AutoRecovery::E_SESSION_QUIET_QUIT ) == AutoRecovery::E_SESSION_QUIET_QUIT ) && + ((eJob & AutoRecovery::E_DISABLE_AUTORECOVERY) != AutoRecovery::E_DISABLE_AUTORECOVERY) + ) + { + LOG_RECOVERY("... do session quiet quit ...") + bAllowAutoSaveReactivation = sal_False; + implts_doSessionQuietQuit(aParams); + } + else + if ( ((eJob & AutoRecovery::E_SESSION_RESTORE ) == AutoRecovery::E_SESSION_RESTORE ) && ((eJob & AutoRecovery::E_DISABLE_AUTORECOVERY) != AutoRecovery::E_DISABLE_AUTORECOVERY) ) @@ -1916,7 +1927,7 @@ void AutoRecovery::implts_markDocumentAsSaved(const css::uno::Reference< css::fr ::comphelper::MediaDescriptor lDescriptor(rInfo.Document->getArgs()); rInfo.RealFilter = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_FILTERNAME(), ::rtl::OUString()); - + css::uno::Reference< css::frame::XTitle > xDocTitle(xDocument, css::uno::UNO_QUERY); if (xDocTitle.is ()) rInfo.Title = xDocTitle->getTitle (); @@ -1987,6 +1998,30 @@ void AutoRecovery::implts_changeAllDocVisibility(sal_Bool bVisible) } //----------------------------------------------- +/* Currently the document is not closed in case of crash, + so the lock file must be removed explicitly +*/ +void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo) +{ + if ( rInfo.Document.is() ) + { + try + { + css::uno::Reference< css::frame::XStorable > xStore(rInfo.Document, css::uno::UNO_QUERY_THROW); + ::rtl::OUString aURL = xStore->getLocation(); + if ( aURL.getLength() ) + { + ::svt::DocumentLockFile aLockFile( aURL ); + aLockFile.RemoveFile(); + } + } + catch( const css::uno::Exception& ) + {} + } +} + + +//----------------------------------------------- void AutoRecovery::implts_prepareSessionShutdown() { LOG_RECOVERY("AutoRecovery::implts_prepareSessionShutdown() starts ...") @@ -2004,6 +2039,10 @@ void AutoRecovery::implts_prepareSessionShutdown() { AutoRecovery::TDocumentInfo& rInfo = *pIt; + // WORKAROUND... Since the documents are not closed the lock file must be removed explicitly + // it is not done on documents saving since shutdown can be cancelled + lc_removeLockFile( rInfo ); + // Prevent us from deregistration of these documents. // Because we close these documents by ourself (see XClosable below) ... // it's fact, that we reach our deregistration method. There we @@ -2014,31 +2053,38 @@ void AutoRecovery::implts_prepareSessionShutdown() // reset modified flag of these documents (ignoring the notification about it!) // Otherwise a message box is shown on closing these models. implts_stopModifyListeningOnDoc(rInfo); - css::uno::Reference< css::util::XModifiable > xModify(rInfo.Document, css::uno::UNO_QUERY); - if (xModify.is()) - xModify->setModified(sal_False); - // close the model. - css::uno::Reference< css::util::XCloseable > xClose(rInfo.Document, css::uno::UNO_QUERY); - if (xClose.is()) + // if the session save is still running the documents should not be thrown away, + // actually that would be a bad sign, that means that the SessionManager tryes + // to kill the session before the saving is ready + if ((m_eJob & AutoRecovery::E_SESSION_SAVE) != AutoRecovery::E_SESSION_SAVE) { - try + css::uno::Reference< css::util::XModifiable > xModify(rInfo.Document, css::uno::UNO_QUERY); + if (xModify.is()) + xModify->setModified(sal_False); + + // close the model. + css::uno::Reference< css::util::XCloseable > xClose(rInfo.Document, css::uno::UNO_QUERY); + if (xClose.is()) { - xClose->close(sal_False); - } - /* - catch(const css::lang::DisposedException&) + try { - // closed ... disposed ... always the same .-) - } - */ - catch(const css::uno::Exception&) - { - // At least it's only a try to close these documents before anybody else it does. - // So it seams to be possible to ignore any error here .-) + xClose->close(sal_False); } + /* + catch(const css::lang::DisposedException&) + { + // closed ... disposed ... always the same .-) + } + */ + catch(const css::uno::Exception&) + { + // At least it's only a try to close these documents before anybody else it does. + // So it seams to be possible to ignore any error here .-) + } - rInfo.Document.clear(); + rInfo.Document.clear(); + } } } @@ -2047,30 +2093,6 @@ void AutoRecovery::implts_prepareSessionShutdown() } //----------------------------------------------- -/* Currently the document is not closed in case of crash, - so the lock file must be removed explicitly -*/ -void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo) -{ - if ( rInfo.Document.is() ) - { - try - { - css::uno::Reference< css::frame::XStorable > xStore(rInfo.Document, css::uno::UNO_QUERY_THROW); - ::rtl::OUString aURL = xStore->getLocation(); - if ( aURL.getLength() ) - { - ::svt::DocumentLockFile aLockFile( aURL ); - aLockFile.RemoveFile(); - } - } - catch( const css::uno::Exception& ) - {} - } -} - - -//----------------------------------------------- /* TODO WORKAROUND: #i64599# @@ -2311,7 +2333,7 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString& // #i66598# use special handling of property "DocumentBaseURL" (it must be an empty string!) // for make hyperlinks working lNewArgs[::comphelper::MediaDescriptor::PROP_DOCUMENTBASEURL()] <<= ::rtl::OUString(); - + // try to save this document as a new temp file everytimes. // Mark AutoSave state as "INCOMPLETE" if it failed. // Because the last temp file is to old and does not include all changes. @@ -2750,6 +2772,9 @@ void AutoRecovery::implts_informListener( sal_Int32 eJ if ((eJob & AutoRecovery::E_SESSION_SAVE) == AutoRecovery::E_SESSION_SAVE) sFeature.append(CMD_DO_SESSION_SAVE); else + if ((eJob & AutoRecovery::E_SESSION_QUIET_QUIT) == AutoRecovery::E_SESSION_QUIET_QUIT) + sFeature.append(CMD_DO_SESSION_QUIET_QUIT); + else if ((eJob & AutoRecovery::E_SESSION_RESTORE) == AutoRecovery::E_SESSION_RESTORE) sFeature.append(CMD_DO_SESSION_RESTORE); else @@ -2792,6 +2817,9 @@ sal_Int32 AutoRecovery::implst_classifyJob(const css::util::URL& aURL) if (aURL.Path.equals(CMD_DO_SESSION_SAVE)) return AutoRecovery::E_SESSION_SAVE; else + if (aURL.Path.equals(CMD_DO_SESSION_QUIET_QUIT)) + return AutoRecovery::E_SESSION_QUIET_QUIT; + else if (aURL.Path.equals(CMD_DO_SESSION_RESTORE)) return AutoRecovery::E_SESSION_RESTORE; else @@ -2926,10 +2954,10 @@ void AutoRecovery::implts_doEmergencySave(const DispatchParams& aParams) // Of course following recovery session must be started without // any "handle" state ... implts_resetHandleStates(sal_False); - + // flush config cached back to disc. impl_flushALLConfigChanges(); - + // try to make sure next time office will be started user wont be // notified about any other might be running office instance // remove ".lock" file from disc ! @@ -2968,14 +2996,6 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams) { LOG_RECOVERY("AutoRecovery::implts_doSessionSave()") - // try to make sure next time office will be started user wont be - // notified about any other might be running office instance - // remove ".lock" file from disc ! - // it is done as a first action for session save since Gnome sessions - // do not provide enough time for shutdown, and the dialog looks to be - // confusing for the user - AutoRecovery::st_impl_removeLockFile(); - // Be sure to know all open documents realy .-) implts_verifyCacheAgainstDesktopDocumentList(); @@ -2991,7 +3011,8 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams) AutoRecovery::ETimerType eSuggestedTimer = AutoRecovery::E_DONT_START_TIMER; do { - eSuggestedTimer = implts_saveDocs(bAllowUserIdleLoop, sal_True, &aParams); + // do not remove lock files of the documents, it will be done on session quit + eSuggestedTimer = implts_saveDocs(bAllowUserIdleLoop, sal_False, &aParams); } while(eSuggestedTimer == AutoRecovery::E_CALL_ME_BACK); @@ -3002,6 +3023,23 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams) // any "handle" state ... implts_resetHandleStates(sal_False); + // flush config cached back to disc. + impl_flushALLConfigChanges(); +} + +//----------------------------------------------- +void AutoRecovery::implts_doSessionQuietQuit(const DispatchParams& /*aParams*/) +{ + LOG_RECOVERY("AutoRecovery::implts_doSessionQuietQuit()") + + // try to make sure next time office will be started user wont be + // notified about any other might be running office instance + // remove ".lock" file from disc ! + // it is done as a first action for session save since Gnome sessions + // do not provide enough time for shutdown, and the dialog looks to be + // confusing for the user + AutoRecovery::st_impl_removeLockFile(); + // reset all modified documents, so the dont show any UI on closing ... // and close all documents, so we can shutdown the OS! implts_prepareSessionShutdown(); @@ -3015,11 +3053,12 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams) CFG_ENTRY_SESSIONDATA, css::uno::makeAny(sal_True), ::comphelper::ConfigurationHelper::E_STANDARD); - + // flush config cached back to disc. impl_flushALLConfigChanges(); } + //----------------------------------------------- void AutoRecovery::implts_doSessionRestore(const DispatchParams& aParams) { @@ -3505,10 +3544,10 @@ void AutoRecovery::impl_flushALLConfigChanges() css::uno::Reference< css::uno::XInterface > xRecoveryCfg(m_xRecoveryCFG, css::uno::UNO_QUERY); aReadLock.unlock(); // <- SAFE - + if (xRecoveryCfg.is()) ::comphelper::ConfigurationHelper::flush(xRecoveryCfg); - + // SOLAR SAFE -> ::vos::OGuard aGuard( Application::GetSolarMutex() ); ::utl::ConfigManager* pCfgMgr = ::utl::ConfigManager::GetConfigManager(); @@ -3541,12 +3580,12 @@ void AutoRecovery::st_impl_removeLockFile() { ::rtl::OUString sUserURL; ::utl::Bootstrap::locateUserInstallation( sUserURL ); - + ::rtl::OUStringBuffer sLockURLBuf; sLockURLBuf.append (sUserURL); sLockURLBuf.appendAscii("/.lock"); ::rtl::OUString sLockURL = sLockURLBuf.makeStringAndClear(); - + AutoRecovery::st_impl_removeFile(sLockURL); } catch(const css::uno::Exception&) diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index b769e0a89e..f1deffa53b 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -75,9 +75,9 @@ #include <rtl/ustrbuf.hxx> #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif -#include <svtools/urihelper.hxx> +#include <svl/urihelper.hxx> #include <osl/file.hxx> #include <unotools/configmgr.hxx> diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 4cdb6ce1ed..1c4324ef03 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,9 +43,9 @@ #include "tools/urlobj.hxx" -#include "svtools/dynamicmenuoptions.hxx" +#include "unotools/dynamicmenuoptions.hxx" #include "svtools/imagemgr.hxx" -#include "svtools/svtools.hrc" +#include "svl/svtools.hrc" #include "comphelper/processfactory.hxx" #include "comphelper/sequenceashashmap.hxx" @@ -104,7 +104,7 @@ void DecoToolBox::calcMinSize() aTbx.InsertItem( nId, GetItemImage( nId ) ); } aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT ); - maMinSize = aTbx.CalcWindowSizePixel(); + maMinSize = aTbx.CalcWindowSizePixel(); } Size DecoToolBox::getMinSize() @@ -145,7 +145,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) : mpAccExec( NULL ) { mnColumnWidth[0] = mnColumnWidth[1] = 0; - + // get icon images from vcl resource and set them on the appropriate buttons loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton ); loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton ); @@ -155,7 +155,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) : loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton ); loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton ); loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton ); - + BitmapEx aExtImage( FwkResId( BMP_BACKING_EXT ) ); String aExtHelpText( FwkResId( STR_BACKING_EXTHELP ) ); BitmapEx aRegImage( FwkResId( BMP_BACKING_REG ) ); @@ -164,20 +164,20 @@ BackingWindow::BackingWindow( Window* i_pParent ) : String aInfoHelpText( FwkResId( STR_BACKING_INFOHELP ) ); BitmapEx aTplRepImage( FwkResId( BMP_BACKING_TPLREP ) ); String aTplRepHelpText( FwkResId( STR_BACKING_TPLREP ) ); - + // clean up resource stack FreeResource(); - + maWelcome.SetPaintTransparent( TRUE ); maProduct.SetPaintTransparent( TRUE ); EnableChildTransparentMode(); - + SetStyle( GetStyle() | WB_DIALOGCONTROL ); - + // add some breathing space for the images maButtonImageSize.Width() += 12; maButtonImageSize.Height() += 12; - + // force tab cycling in toolbox maToolbox.SetStyle( maToolbox.GetStyle() | WB_FORCETABCYCLE ); @@ -193,13 +193,13 @@ BackingWindow::BackingWindow( Window* i_pParent ) : maToolbox.SetItemText( nItemId_Extensions, aExtHelpText ); maToolbox.SetItemCommand( nItemId_Extensions, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Extensions" ) ) ); maToolbox.ShowItem( nItemId_Extensions ); - + maToolbox.InsertItem( nItemId_Reg, Image( aRegImage ) ); maToolbox.SetQuickHelpText( nItemId_Reg, aRegHelpText ); maToolbox.SetItemText( nItemId_Reg, aRegHelpText ); maToolbox.SetItemCommand( nItemId_Reg, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Register" ) ) ); maToolbox.ShowItem( nItemId_Reg ); - + maToolbox.InsertItem( nItemId_Info, Image( aInfoImage ) ); maToolbox.SetItemText( nItemId_Info, aInfoHelpText ); maToolbox.SetQuickHelpText( nItemId_Info, aInfoHelpText ); @@ -210,7 +210,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) : mxDesktop = Reference<XDesktop>( comphelper::getProcessServiceFactory()->createInstance(SERVICENAME_DESKTOP ),UNO_QUERY ); if( mxDesktop.is() ) mxDesktopDispatchProvider = Reference< XDispatchProvider >( mxDesktop, UNO_QUERY ); - + maWriterButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:WriterButton" ) ) ) ); maCalcButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:CalcButton" ) ) ) ); maImpressButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:ImpressButton" ) ) ) ); @@ -220,7 +220,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) : maTemplateButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:TemplateButton" ) ) ) ); maOpenButton.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:OpenButton" ) ) ) ); maToolbox.SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Toolbox" ) ) ) ); - + // init background initBackground(); } @@ -259,7 +259,7 @@ void BackingWindow::DataChanged( const DataChangedEvent& rDCEvt ) void BackingWindow::initBackground() { SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() ); - + bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode(); maWelcomeTextColor = maLabelTextColor = bDark ? Color( COL_WHITE ) : Color( 0x26, 0x35, 0x42 ); Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE ); @@ -276,7 +276,7 @@ void BackingWindow::initBackground() // and scale it to previous size if( aMiddleSize.Width() && aMiddleSize.Height() ) maBackgroundMiddle.Scale( aMiddleSize ); - + if( GetSettings().GetLayoutRTL() ) { // replace images by RTL versions @@ -317,9 +317,9 @@ void BackingWindow::initControls() { if( mbInitControls ) return; - + mbInitControls = true; - + // calculate dialog size // begin with background bitmap maControlRect = Rectangle( Point(), maBackgroundLeft.GetSizePixel() ); @@ -327,7 +327,7 @@ void BackingWindow::initControls() maControlRect.Right() -= nShadowRight; maControlRect.Top() += nShadowTop; maControlRect.Bottom() -= nShadowBottom; - + long nYPos = 0; // set bigger welcome string maWelcome.SetText( maWelcomeString ); @@ -343,16 +343,16 @@ void BackingWindow::initControls() maWelcome.SetControlFont( maTextFont ); maWelcomeSize = Size( maWelcome.GetTextWidth( maWelcomeString ), maWelcome.GetTextHeight() ); maWelcomeSize.Width() = (maWelcomeSize.Width() * 20)/19; - + nYPos += (maWelcomeSize.Height()*3)/2; - + if( maControlRect.GetWidth() < nBtnPos + maWelcomeSize.Width() + 20 ) maControlRect.Right() = maControlRect.Left() + maWelcomeSize.Width() + nBtnPos + 20; maWelcome.Show(); - + nYPos += maWelcomeSize.Height(); - + // set product string maTextFont.SetSize( Size( 0, 30 ) ); maProduct.SetFont( maTextFont ); @@ -366,24 +366,24 @@ void BackingWindow::initControls() maProduct.SetText( maProductString ); maProductSize = Size( maProduct.GetTextWidth( maProductString ), maProduct.GetTextHeight() ); maProductSize.Width() = (maProductSize.Width() * 20)/19; - + if( maControlRect.GetWidth() < maProductSize.Width() + nBtnPos + 10 ) maControlRect.Right() = maControlRect.Left() + maProductSize.Width() + nBtnPos + 10; maProduct.Show(); - + nYPos += (maProductSize.Height()*3)/2; - + // set a slighly larger font than normal labels on the texts maTextFont.SetSize( Size( 0, 11 ) ); maTextFont.SetWeight( WEIGHT_NORMAL ); - + maCreateText.SetText( maCreateString ); maCreateText.SetFont( maTextFont ); maCreateText.SetControlFont( maTextFont ); maCreateSize = Size( maCreateText.GetTextWidth( maCreateString ), maCreateText.GetTextHeight() ); maCreateText.Show(); - + nYPos += (maCreateSize.Height()*3)/2; // collect the URLs of the entries in the File/New menu @@ -402,12 +402,12 @@ void BackingWindow::initControls() if ( sURL.getLength() ) aFileNewAppsAvailable.insert( sURL ); } - + // create mnemonics on the fly, preregister the mnemonics of the menu MnemonicGenerator aMnemns; maTemplateString = MnemonicGenerator::EraseAllMnemonicChars( maTemplateString ); maOpenString = MnemonicGenerator::EraseAllMnemonicChars( maOpenString ); - + SystemWindow* pSysWin = GetSystemWindow(); if( pSysWin ) { @@ -423,7 +423,7 @@ void BackingWindow::initControls() } } } - + // layout the buttons layoutButtonAndText( WRITER_URL, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SWRITER, @@ -445,7 +445,7 @@ void BackingWindow::initControls() layoutButtonAndText( MATH_URL, 1, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SMATH, maMathButton, maMathText, aMnemns ); - + nYPos += 3*maButtonImageSize.Height() / 2; layoutButtonAndText( NULL, -1, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SWRITER, @@ -456,18 +456,18 @@ void BackingWindow::initControls() aModuleOptions, SvtModuleOptions::E_SWRITER, maOpenButton, maOpenText, aMnemns, maOpenString ); nYPos += 10; - + DBG_ASSERT( nYPos < maControlRect.GetHeight(), "misformatting !" ); if( mnColumnWidth[0] + mnColumnWidth[1] + nBtnPos + 20 > maControlRect.GetWidth() ) maControlRect.Right() = maControlRect.Left() + mnColumnWidth[0] + mnColumnWidth[1] + nBtnPos + 20; - + maToolbox.SetSelectHdl( LINK( this, BackingWindow, ToolboxHdl ) ); maToolbox.Show(); - + // scale middle map to formatted width Size aMiddleSegmentSize( maControlRect.GetSize().Width() + nShadowLeft + nShadowRight, maBackgroundMiddle.GetSizePixel().Height() ); - + long nLW = maBackgroundLeft.GetSizePixel().Width(); long nRW = maBackgroundRight.GetSizePixel().Width(); if( aMiddleSegmentSize.Width() > nLW + nRW ) @@ -478,7 +478,7 @@ void BackingWindow::initControls() } else maBackgroundMiddle = BitmapEx(); - + Resize(); } @@ -510,7 +510,7 @@ void BackingWindow::layoutButtonAndText( { i_rBtn.Enable( FALSE ); } - + // setup text i_rText.SetFont( maTextFont ); i_rText.SetControlFont( maTextFont ); @@ -527,7 +527,7 @@ void BackingWindow::layoutButtonAndText( if( nTextWidth > mnColumnWidth[nColumn] ) mnColumnWidth[nColumn] = nTextWidth; } - + // show the controls i_rBtn.Show(); i_rText.Show(); @@ -536,14 +536,14 @@ void BackingWindow::layoutButtonAndText( void BackingWindow::Paint( const Rectangle& ) { bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode(); - + Color aBackColor( bDark ? COL_BLACK : COL_WHITE ); // fill control rect SetLineColor(); SetFillColor( aBackColor ); DrawRect( maControlRect ); - + // draw bitmap if( GetSettings().GetLayoutRTL() ) { @@ -584,7 +584,7 @@ long BackingWindow::Notify( NotifyEvent& rNEvt ) mpAccExec = svt::AcceleratorExecute::createAcceleratorHelper(); mpAccExec->init( comphelper::getProcessServiceFactory(), mxFrame); } - + const KeyEvent* pEvt = rNEvt.GetKeyEvent(); if( pEvt && mpAccExec->execute(pEvt->GetKeyCode()) ) return 1; @@ -606,7 +606,7 @@ void BackingWindow::Resize() maControlRect = Rectangle( Point( (aWindowSize.Width() - aControlSize.Width()) / 2, (aWindowSize.Height() - aControlSize.Height()) / 2 ), aControlSize ); - + maToolbox.calcMinSize(); Size aTBSize( maToolbox.getMinSize() ); Point aTBPos( maControlRect.Right() - aTBSize.Width() - 10, @@ -636,18 +636,18 @@ void BackingWindow::Resize() { nDiff++; } - + long nYPos = maControlRect.Top(); nYPos += nW2Delta - nDiff; maWelcome.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, (maWelcomeSize.Height()*20)/19 ) ); - nYPos += nWDelta - nDiff; + nYPos += nWDelta - nDiff; maProduct.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, (maProductSize.Height()*20)/19 ) ); nYPos += nPDelta - nDiff; - + maCreateText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, maCreateSize.Height() ) ); - + nYPos += nCDelta - nDiff; maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize ); @@ -686,7 +686,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG ) { const char* pNodePath = NULL; const char* pNode = NULL; - + switch( maToolbox.GetCurItemId() ) { case nItemId_Extensions: @@ -744,7 +744,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG ) //throws css::container::NoSuchElementException, css::lang::WrappedTargetException Any value( xNameAccess->getByName(rtl::OUString::createFromAscii(pNode)) ); sURL = value.get<rtl::OUString> (); - + Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ), @@ -758,7 +758,7 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG ) { } } - + return 0; } @@ -780,7 +780,7 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) else if( pButton == &maOpenButton ) { Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); - + Sequence< com::sun::star::beans::PropertyValue > aArgs(1); PropertyValue* pArg = aArgs.getArray(); pArg[0].Name = rtl::OUString::createFromAscii("Referer"); @@ -791,7 +791,7 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) else if( pButton == &maTemplateButton ) { Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); - + Sequence< com::sun::star::beans::PropertyValue > aArgs(1); PropertyValue* pArg = aArgs.getArray(); pArg[0].Name = rtl::OUString::createFromAscii("Referer"); @@ -805,7 +805,7 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) Window* BackingWindow::GetParentLabelFor( const Window* pLabel ) const { const Window* pRet = NULL; - + if( pLabel == &maWriterText ) pRet = &maWriterButton; else if( pLabel == &maCalcText ) @@ -822,14 +822,14 @@ Window* BackingWindow::GetParentLabelFor( const Window* pLabel ) const pRet = &maTemplateButton; else if( pLabel == &maOpenText ) pRet = &maOpenButton; - + return const_cast<Window*>(pRet); } Window* BackingWindow::GetParentLabeledBy( const Window* pLabeled ) const { const Window *pRet = NULL; - + if( pLabeled == &maWriterButton ) pRet = &maWriterText; else if( pLabeled == &maCalcButton ) @@ -846,7 +846,7 @@ Window* BackingWindow::GetParentLabeledBy( const Window* pLabeled ) const pRet = &maTemplateText; else if( pLabeled == &maOpenButton ) pRet = &maOpenText; - + return const_cast<Window*>(pRet); } @@ -855,7 +855,7 @@ struct ImplDelayedDispatch Reference< XDispatch > xDispatch; com::sun::star::util::URL aDispatchURL; Sequence< PropertyValue > aArgs; - + ImplDelayedDispatch( const Reference< XDispatch >& i_xDispatch, const com::sun::star::util::URL& i_rURL, const Sequence< PropertyValue >& i_rArgs ) @@ -877,10 +877,10 @@ static long implDispatchDelayed( void*, void* pArg ) catch( Exception ) { } - + // clean up delete pDispatch; - + return 0; } @@ -895,7 +895,7 @@ void BackingWindow::dispatchURL( const rtl::OUString& i_rURL, // check for dispatch provider if( !xProvider.is()) return; - + // get an URL transformer to clean up the URL com::sun::star::util::URL aDispatchURL; aDispatchURL.Complete = i_rURL; diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index e01a797267..e02206cf5f 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ #include "vcl/bitmapex.hxx" #include "vcl/toolbox.hxx" -#include "svtools/moduleoptions.hxx" +#include "unotools/moduleoptions.hxx" #include "svtools/acceleratorexecute.hxx" #include "com/sun/star/frame/XDispatchProvider.hpp" @@ -66,25 +66,25 @@ namespace framework class DecoToolBox : public ToolBox { Size maMinSize; - + using Window::ImplInit; public: DecoToolBox( Window* pParent, WinBits nStyle = 0 ); DecoToolBox( Window* pParent, const ResId& rResId ); - + void DataChanged( const DataChangedEvent& rDCEvt ); - + void calcMinSize(); Size getMinSize(); }; - + class BackingWindow : public Window { com::sun::star::uno::Reference<com::sun::star::frame::XDesktop> mxDesktop; com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider; com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame; com::sun::star::uno::Reference<com::sun::star::document::XEventBroadcaster> mxBroadcaster; - + FixedText maWelcome; Size maWelcomeSize; FixedText maProduct; @@ -107,32 +107,32 @@ namespace framework ImageButton maTemplateButton; FixedText maOpenText; ImageButton maOpenButton; - + DecoToolBox maToolbox; - + BitmapEx maBackgroundLeft; BitmapEx maBackgroundMiddle; BitmapEx maBackgroundRight; - + String maWelcomeString; String maProductString; String maCreateString; String maOpenString; String maTemplateString; - + Font maTextFont; Rectangle maControlRect; - + long mnColumnWidth[2]; Color maLabelTextColor; Color maWelcomeTextColor; - + Size maButtonImageSize; - + bool mbInitControls; svt::AcceleratorExecute* mpAccExec; - + static const long nBtnPos = 240; static const int nItemId_Extensions = 1; static const int nItemId_Reg = 2; @@ -142,31 +142,31 @@ namespace framework static const int nShadowLeft = 35; static const int nShadowRight = 45; static const int nShadowBottom = 50; - + void loadImage( const ResId& i_rId, ImageButton& i_rButton ); - + void layoutButtonAndText( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS, SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod, ImageButton& i_rBtn, FixedText& i_rText, MnemonicGenerator& i_rMnemonicGen, const String& i_rStr = String() ); - + void dispatchURL( const rtl::OUString& i_rURL, const rtl::OUString& i_rTarget = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ), const com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >& i_xProv = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >(), const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& = com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >() ); - + DECL_LINK( ClickHdl, Button* ); DECL_LINK( ToolboxHdl, void* ); - + void initControls(); void initBackground(); public: BackingWindow( Window* pParent ); ~BackingWindow(); - + virtual void Paint( const Rectangle& rRect ); virtual void Resize(); virtual long Notify( NotifyEvent& rNEvt ); diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 1d63a503b2..709bfb6bd0 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -106,7 +106,7 @@ #endif #include <toolkit/awt/vclxwindow.hxx> #include <comphelper/processfactory.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #ifdef ENABLE_ASSERTIONS #ifndef _RTL_STRBUF_HXX_ @@ -630,7 +630,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >& implts_startWindowListening(); impl_enablePropertySet(); - + // create WindowCommandDispatch; it is supposed to release itself at frame destruction (void)new WindowCommandDispatch(xSMGR, this); @@ -2297,7 +2297,7 @@ aEvent // Look for rejected calls. // Sometimes called during dispose() => soft exceptions TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS ); - + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ReadGuard aReadLock( m_aLock ); @@ -2652,7 +2652,7 @@ void SAL_CALL Frame::impl_setPropertyValue(const ::rtl::OUString& /*sProperty*/, css::uno::Reference< css::frame::XLayoutManager > xOldLayoutManager = m_xLayoutManager; css::uno::Reference< css::frame::XLayoutManager > xNewLayoutManager; aValue >>= xNewLayoutManager; - + if (xOldLayoutManager != xNewLayoutManager) { m_xLayoutManager = xNewLayoutManager; diff --git a/framework/source/services/mediatypedetectionhelper.cxx b/framework/source/services/mediatypedetectionhelper.cxx index b5b7cfe062..74087a50bb 100644 --- a/framework/source/services/mediatypedetectionhelper.cxx +++ b/framework/source/services/mediatypedetectionhelper.cxx @@ -36,7 +36,7 @@ //_________________________________________________________________________________________________________________ #include <services/mediatypedetectionhelper.hxx> #include <services.h> -#include <svtools/inettype.hxx> +#include <svl/inettype.hxx> #include <tools/string.hxx> #include <rtl/logfile.hxx> diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index 9bda14b891..eabcfcedf1 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,14 +60,15 @@ #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/util/URL.hpp> #include <osl/time.h> #include <comphelper/processfactory.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/internaloptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/internaloptions.hxx> #include <stdio.h> //_______________________________________________ // interface includes @@ -103,12 +104,13 @@ namespace framework{ //*********************************************** // XInterface, XTypeProvider, XServiceInfo -DEFINE_XINTERFACE_5( +DEFINE_XINTERFACE_6( SessionListener, OWeakObject, DIRECT_INTERFACE(css::lang::XTypeProvider), DIRECT_INTERFACE(css::lang::XInitialization), DIRECT_INTERFACE(css::frame::XSessionManagerListener), + DIRECT_INTERFACE(css::frame::XSessionManagerListener2), DIRECT_INTERFACE(css::frame::XStatusListener), DIRECT_INTERFACE(css::lang::XServiceInfo)) @@ -116,7 +118,7 @@ DEFINE_XTYPEPROVIDER_5( SessionListener, css::lang::XTypeProvider, css::lang::XInitialization, - css::frame::XSessionManagerListener, + css::frame::XSessionManagerListener2, css::frame::XStatusListener, css::lang::XServiceInfo) @@ -137,19 +139,79 @@ SessionListener::SessionListener(const css::uno::Reference< css::lang::XMultiSer : ThreadHelpBase (&Application::GetSolarMutex()) , OWeakObject ( ) , m_xSMGR (xSMGR ) - , m_bRestored( false ) + , m_bRestored( sal_False ) + , m_bSessionStoreRequested( sal_False ) + , m_bAllowUserInteractionOnQuit( sal_False ) + , m_bTerminated( sal_False ) { } SessionListener::~SessionListener() { - if (m_rSessionManager.is()) + if (m_rSessionManager.is()) { css::uno::Reference< XSessionManagerListener> me(this); m_rSessionManager->removeSessionManagerListener(me); } } +void SessionListener::StoreSession( sal_Bool bAsync ) +{ + ResetableGuard aGuard(m_aLock); + try + { + // xd create SERVICENAME_AUTORECOVERY -> XDispatch + // xd->dispatch("vnd.sun.star.autorecovery:/doSessionSave, async=bAsync + // on stop event m_rSessionManager->saveDone(this); in case of asynchronous call + // in case of synchronous call the caller should do saveDone() call himself! + + css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW); + css::uno::Reference< XURLTransformer > xURLTransformer(m_xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), UNO_QUERY_THROW); + URL aURL; + aURL.Complete = OUString::createFromAscii("vnd.sun.star.autorecovery:/doSessionSave"); + xURLTransformer->parseStrict(aURL); + + // in case of asynchronous call the notification will trigger saveDone() + if ( bAsync ) + xDispatch->addStatusListener(this, aURL); + + Sequence< PropertyValue > args(1); + args[0] = PropertyValue(OUString::createFromAscii("DispatchAsynchron"),-1,makeAny(bAsync),PropertyState_DIRECT_VALUE); + xDispatch->dispatch(aURL, args); + } catch (com::sun::star::uno::Exception& e) { + OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); + OSL_ENSURE(sal_False, aMsg.getStr()); + // save failed, but tell manager to go on if we havent yet dispatched the request + // in case of synchronous saving the notification is done by the caller + if ( bAsync && m_rSessionManager.is() ) + m_rSessionManager->saveDone(this); + } +} + +void SessionListener::QuitSessionQuietly() +{ + ResetableGuard aGuard(m_aLock); + try + { + // xd create SERVICENAME_AUTORECOVERY -> XDispatch + // xd->dispatch("vnd.sun.star.autorecovery:/doSessionQuietQuit, async=false + // it is done synchronously to avoid conflict with normal quit process + + css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW); + css::uno::Reference< XURLTransformer > xURLTransformer(m_xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), UNO_QUERY_THROW); + URL aURL; + aURL.Complete = OUString::createFromAscii("vnd.sun.star.autorecovery:/doSessionQuietQuit"); + xURLTransformer->parseStrict(aURL); + + Sequence< PropertyValue > args(1); + args[0] = PropertyValue(OUString::createFromAscii("DispatchAsynchron"),-1,makeAny(sal_False),PropertyState_DIRECT_VALUE); + xDispatch->dispatch(aURL, args); + } catch (com::sun::star::uno::Exception& e) { + OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); + OSL_ENSURE(sal_False, aMsg.getStr()); + } +} + void SAL_CALL SessionListener::disposing(const com::sun::star::lang::EventObject&) throw (RuntimeException) { } @@ -170,6 +232,8 @@ void SAL_CALL SessionListener::initialize(const Sequence< Any >& args) v.Value >>= aSMgr; else if (v.Name.equalsAscii("SessionManager")) v.Value >>= m_rSessionManager; + else if (v.Name.equalsAscii("AllowUserInteractionOnQuit")) + v.Value >>= m_bAllowUserInteractionOnQuit; } } } @@ -181,7 +245,7 @@ void SAL_CALL SessionListener::initialize(const Sequence< Any >& args) { m_rSessionManager->addSessionManagerListener(this); } -} +} void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event) throw (css::uno::RuntimeException) @@ -190,8 +254,8 @@ void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event) { if (event.FeatureDescriptor.compareToAscii("update")==0) m_bRestored = sal_True; // a document was restored - // if (event.FeatureDescriptor.compareToAscii("stop")==0) - + // if (event.FeatureDescriptor.compareToAscii("stop")==0) + } else if (event.FeatureURL.Complete.equalsAscii("vnd.sun.star.autorecovery:/doSessionSave")) { @@ -207,11 +271,11 @@ void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event) sal_Bool SAL_CALL SessionListener::doRestore() throw (RuntimeException) { - ResetableGuard aGuard(m_aLock); + ResetableGuard aGuard(m_aLock); m_bRestored = sal_False; try { css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW); - + URL aURL; aURL.Complete = OUString::createFromAscii("vnd.sun.star.autorecovery:/doSessionRestore"); css::uno::Reference< XURLTransformer > xURLTransformer(m_xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), UNO_QUERY_THROW); @@ -220,7 +284,7 @@ sal_Bool SAL_CALL SessionListener::doRestore() xDispatch->addStatusListener(this, aURL); xDispatch->dispatch(aURL, args); m_bRestored = sal_True; - + } catch (com::sun::star::uno::Exception& e) { OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); OSL_ENSURE(sal_False, aMsg.getStr()); @@ -235,46 +299,73 @@ void SAL_CALL SessionListener::doSave( sal_Bool bShutdown, sal_Bool /*bCancelabl { if (bShutdown) { - sal_Bool bDispatched = sal_False; - ResetableGuard aGuard(m_aLock); - try - { - // xd create SERVICENAME_AUTORECOVERY -> XDispatch - // xd->dispatch("vnd.sun.star.autorecovery:/doSessionSave, async=true - // on stop event m_rSessionManager->saveDone(this); - - css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW); - css::uno::Reference< XURLTransformer > xURLTransformer(m_xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), UNO_QUERY_THROW); - URL aURL; - aURL.Complete = OUString::createFromAscii("vnd.sun.star.autorecovery:/doSessionSave"); - xURLTransformer->parseStrict(aURL); - xDispatch->addStatusListener(this, aURL); - Sequence< PropertyValue > args(1); - args[0] = PropertyValue(OUString::createFromAscii("DispatchAsynchron"),-1,makeAny(sal_True),PropertyState_DIRECT_VALUE); - xDispatch->dispatch(aURL, args); - bDispatched = sal_True; - // on stop event set call m_rSessionManager->saveDone(this); - } catch (com::sun::star::uno::Exception& e) { - OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); - OSL_ENSURE(sal_False, aMsg.getStr()); - // save failed, but tell manager to go on if we havent yet dispatched the request - if (m_rSessionManager.is() && !bDispatched) - m_rSessionManager->saveDone(this); - } + m_bSessionStoreRequested = sal_True; // there is no need to protect it with mutex + if ( m_bAllowUserInteractionOnQuit && m_rSessionManager.is() ) + m_rSessionManager->queryInteraction( static_cast< css::frame::XSessionManagerListener* >( this ) ); + else + StoreSession( sal_True ); } // we don't have anything to do so tell the session manager we're done else if( m_rSessionManager.is() ) m_rSessionManager->saveDone( this ); } - - -void SAL_CALL SessionListener::approveInteraction( sal_Bool /*bInteractionGranted*/ ) +void SAL_CALL SessionListener::approveInteraction( sal_Bool bInteractionGranted ) throw (RuntimeException) -{} +{ + // do AutoSave as the first step + ResetableGuard aGuard(m_aLock); + + if ( bInteractionGranted ) + { + // close the office documents in normal way + try + { + // first of all let the session be stored to be sure that we lose no information + StoreSession( sal_False ); + + css::uno::Reference< css::frame::XDesktop > xDesktop( m_xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY_THROW); + m_bTerminated = xDesktop->terminate(); + + if ( m_rSessionManager.is() ) + { + // false means that the application closing has been cancelled + if ( !m_bTerminated ) + m_rSessionManager->cancelShutdown(); + else + m_rSessionManager->interactionDone( this ); + } + } + catch( css::uno::Exception& ) + { + StoreSession( sal_True ); + m_rSessionManager->interactionDone( this ); + } + + if ( m_rSessionManager.is() ) + m_rSessionManager->saveDone(this); + } + else + { + StoreSession( sal_True ); + } +} void SessionListener::shutdownCanceled() throw (RuntimeException) -{} +{ + // set the state back + m_bSessionStoreRequested = sal_False; // there is no need to protect it with mutex +} + +void SessionListener::doQuit() + throw (RuntimeException) +{ + if ( m_bSessionStoreRequested && !m_bTerminated ) + { + // let the session be closed quietly in this case + QuitSessionQuietly(); + } +} } diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index ee766efeee..3080f7cd8b 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -319,6 +319,11 @@ void SubstitutePathVariables_Impl::Notify( const com::sun::star::uno::Sequence< // NOT implemented yet! } +void SubstitutePathVariables_Impl::Commit() +{ +} + + //_________________________________________________________________________________________________________________ // private methods //_________________________________________________________________________________________________________________ diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 6c78600aa9..71136a9ac4 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -75,18 +75,20 @@ namespace framework{ // css::uno::XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** -DEFINE_XINTERFACE_5 ( TabWindowService , +DEFINE_XINTERFACE_6 ( TabWindowService , OWeakObject , DIRECT_INTERFACE(css::lang::XTypeProvider ), DIRECT_INTERFACE(css::lang::XServiceInfo ), + DIRECT_INTERFACE(css::lang::XComponent), DIRECT_INTERFACE(css::awt::XSimpleTabController), DIRECT_INTERFACE(css::beans::XPropertySet ), DIRECT_INTERFACE(css::beans::XPropertySetInfo ) ) -DEFINE_XTYPEPROVIDER_5 ( TabWindowService , +DEFINE_XTYPEPROVIDER_6 ( TabWindowService , css::lang::XTypeProvider , css::lang::XServiceInfo , + css::lang::XComponent , css::awt::XSimpleTabController , css::beans::XPropertySet , css::beans::XPropertySetInfo @@ -100,7 +102,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( TabWindowService , DEFINE_INIT_SERVICE ( TabWindowService, { - impl_initializePropInfo();
+ impl_initializePropInfo(); m_aTransactionManager.setWorkingMode( E_WORK ); } ) @@ -141,7 +143,12 @@ TabWindowService::TabWindowService( const css::uno::Reference< css::lang::XMulti // destructor //***************************************************************************************************************** TabWindowService::~TabWindowService() -{
+{ + // SAFE-> + ResetableGuard aGuard(m_aLock); + + if (m_pTabWin) + m_pTabWin->RemoveEventListener( LINK( this, TabWindowService, EventListener ) ); } //***************************************************************************************************************** @@ -286,8 +293,11 @@ void SAL_CALL TabWindowService::dispose() m_lListener.disposeAndClear (aEvent); + if (m_pTabWin) + m_pTabWin->RemoveEventListener( LINK( this, TabWindowService, EventListener ) ); + m_pTabWin = NULL; - m_xTabWin.clear (); + m_xTabWin.clear(); } //***************************************************************************************************************** @@ -357,6 +367,7 @@ css::uno::Any SAL_CALL TabWindowService::impl_getPropertyValue(const ::rtl::OUSt //***************************************************************************************************************** IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) { + if ( !pEvent && !pEvent->ISA(VclWindowEvent)) return 0; @@ -369,6 +380,11 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) if (nEventId == VCLEVENT_OBJECT_DYING) { m_lListener.disposeAndClear (aEvent); + + m_pTabWin->RemoveEventListener( LINK( this, TabWindowService, EventListener ) ); + m_pTabWin = NULL; + m_xTabWin.clear(); + return 0; } @@ -454,9 +470,9 @@ FwkTabWindow* TabWindowService::mem_TabWin () FwkTabWindow* pWin = NULL; if ( ! m_xTabWin.is ()) - {
- Window* pFakeParent = dynamic_cast< Window* >(Application::GetDefaultDevice ());
-
+ { + Window* pFakeParent = dynamic_cast< Window* >(Application::GetDefaultDevice ()); + m_pTabWin = new FwkTabWindow (pFakeParent); m_xTabWin = VCLUnoHelper::GetInterface (m_pTabWin); diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index bb33aa6c89..56cbdde695 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -62,7 +62,7 @@ #include <rtl/ustrbuf.hxx> #include <rtl/strbuf.hxx> #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif #include <tools/rcid.h> #include <vcl/image.hxx> diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index a2f8ec271a..d91d389931 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -68,7 +68,7 @@ #include <com/sun/star/linguistic2/XLanguageGuessing.hpp> #include <map> #include <i18npool/mslangid.hxx> -#include <svtools/languageoptions.hxx> +#include <svl/languageoptions.hxx> #include <com/sun/star/awt/MenuItemStyle.hpp> #include <svtools/langtab.hxx> #include <classes/fwlresid.hxx> diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index a99c60a10e..d56a120c75 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -71,7 +71,7 @@ #include <toolkit/unohlp.hxx> #include <tools/gen.hxx> #include <com/sun/star/awt/Command.hpp> -#include <svtools/languageoptions.hxx> +#include <svl/languageoptions.hxx> #include <com/sun/star/linguistic2/XLanguageGuessing.hpp> #include <dispatch/uieventloghelper.hxx> @@ -337,7 +337,7 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R mRectangle.Y = mMousePos.Y(); sal_Int16 nId = xPopupMenu->execute( xParent, mRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); //click "More..." - if ( m_xFrame.is() ) + if ( nId && m_xFrame.is() ) { uno::Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); util::URL aURL; diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index f5991c9d86..730e022ab0 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,9 +82,9 @@ #include <comphelper/processfactory.hxx> #include <comphelper/extract.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/historyoptions.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/cmdoptions.hxx> +#include <unotools/historyoptions.hxx> +#include <unotools/pathoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <unotools/localfilehelper.hxx> #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> @@ -541,7 +541,7 @@ throw ( RuntimeException ) ) bEnabledItem = sal_True; #endif - + // Enable/disable item if ( bEnabledItem != bMenuItemEnabled ) m_pVCLMenu->EnableItem( pMenuItemHandler->nItemId, bEnabledItem ); @@ -2104,7 +2104,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen PopupMenu* pCtlPopupMenu = (PopupMenu *)pVCLXPopupMenu->GetMenu(); pAddonMenu->SetPopupMenu( pMenuItemHandler->nItemId, pCtlPopupMenu ); pMenuItemHandler->xPopupMenu = Reference< com::sun::star::awt::XPopupMenu >( (OWeakObject *)pVCLXPopupMenu, UNO_QUERY ); - + } } m_aMenuItemHandlerVector.push_back( pMenuItemHandler ); diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 7dc52b4f5a..fa90f0c161 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,7 +68,7 @@ #include <osl/file.hxx> #include <svtools/menuoptions.hxx> #include <svtools/acceleratorexecute.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <dispatch/uieventloghelper.hxx> //_________________________________________________________________________________________________________________ @@ -112,11 +112,11 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage { sal_Bool bImageSet( sal_False ); ::rtl::OUString aImageId; - + AddInfoForId::const_iterator pInfo = m_aAddInfoForItem.find( nItemId ); if ( pInfo != m_aAddInfoForItem.end() ) aImageId = pInfo->second.aImageId; // Retrieve image id for menu item - + if ( aImageId.getLength() > 0 ) { aImage = GetImageFromURL( xFrame, aImageId, FALSE, bHiContrast ); @@ -132,7 +132,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage String aCmd( pPopupMenu->GetItemCommand( nItemId ) ); if ( aCmd.Len() ) aImage = GetImageFromURL( xFrame, aCmd, FALSE, bHiContrast ); - + if ( !!aImage ) pPopupMenu->SetItemImage( nItemId, aImage ); } @@ -149,7 +149,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const USHORT nId( 0 ); sal_Bool bFound( sal_False ); rtl::OUString aCommand; - + if ( m_aEmptyDocURL.getLength() > 0 ) { // Search for the empty document URL @@ -169,7 +169,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const } } } - + if ( !bFound ) { // Search for the default module name @@ -265,25 +265,25 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) aCmds.push_back( pPopupMenu->GetItemCommand( nId )); } } - + sal_uInt32 nSeqCount( aIds.size() ); if ( m_bNewMenu ) nSeqCount+=1; Sequence< rtl::OUString > aSeq( nSeqCount ); - + // Add a special command for our "New" menu. if ( m_bNewMenu ) { aSeq[nSeqCount-1] = m_aCommandURL; aMenuShortCuts.push_back( aEmptyKeyCode ); } - + const sal_uInt32 nCount = aCmds.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) aSeq[i] = aCmds[i]; - + if ( m_xGlobalAcceleratorManager.is() ) retrieveShortcutsFromConfiguration( xGlobalAccelCfg, aSeq, aMenuShortCuts ); if ( m_xModuleAcceleratorManager.is() ) @@ -305,7 +305,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) } } -void NewMenuController::retrieveShortcutsFromConfiguration( +void NewMenuController::retrieveShortcutsFromConfiguration( const Reference< XAcceleratorConfiguration >& rAccelCfg, const Sequence< rtl::OUString >& rCommands, std::vector< KeyCode >& aMenuShortCuts ) @@ -359,7 +359,7 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup { MenuConfiguration aMenuCfg( m_xServiceManager ); BmkMenu* pSubMenu( 0 ); - + if ( m_bNewMenu ) pSubMenu = (BmkMenu*)aMenuCfg.CreateBookmarkMenu( m_xFrame, BOOKMARK_NEWMENU ); else @@ -370,13 +370,13 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup Image aImage; AddInfo aAddInfo; - + // retrieve additional parameters from bookmark menu and // store it in a hash_map. for ( USHORT i = 0; i < pSubMenu->GetItemCount(); i++ ) { USHORT nItemId = pSubMenu->GetItemId( sal::static_int_cast<USHORT>( i ) ); - if (( nItemId != 0 ) && + if (( nItemId != 0 ) && ( pSubMenu->GetItemType( nItemId ) != MENUITEM_SEPARATOR )) { MenuConfiguration::Attributes* pBmkAttributes = (MenuConfiguration::Attributes *)(pSubMenu->GetUserValue( nItemId )); @@ -384,15 +384,15 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup { aAddInfo.aTargetFrame = pBmkAttributes->aTargetFrame; aAddInfo.aImageId = pBmkAttributes->aImageId; - + m_aAddInfoForItem.insert( AddInfoForId::value_type( nItemId, aAddInfo )); } } } - + if ( m_bShowImages ) setMenuImages( pVCLPopupMenu, m_bShowImages, m_bHiContrast ); - + delete pSubMenu; } } @@ -489,8 +489,8 @@ void SAL_CALL NewMenuController::activate( const css::awt::MenuEvent& ) throw (R sal_Bool bHiContrast( rSettings.GetHighContrastMode() ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); - - if (( m_bShowImages != bShowImages ) || + + if (( m_bShowImages != bShowImages ) || ( m_bHiContrast != bHiContrast )) { m_bShowImages = bShowImages; @@ -498,7 +498,7 @@ void SAL_CALL NewMenuController::activate( const css::awt::MenuEvent& ) throw (R setMenuImages( pVCLPopupMenu, m_bShowImages, m_bHiContrast ); } - + setAccelerators( pVCLPopupMenu ); } } @@ -507,7 +507,7 @@ void SAL_CALL NewMenuController::activate( const css::awt::MenuEvent& ) throw (R // XPopupMenuController void NewMenuController::impl_setPopupMenu() { - + if ( m_xPopupMenu.is() ) fillPopupMenu( m_xPopupMenu ); diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 7ab450d59c..5bf8611801 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ #include <vcl/i18nhelp.hxx> #include <tools/urlobj.hxx> #include <rtl/ustrbuf.hxx> -#include <svtools/historyoptions.hxx> +#include <unotools/historyoptions.hxx> #include <cppuhelper/implbase1.hxx> #include <osl/file.hxx> //#include <tools/solar.hrc> @@ -135,7 +135,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > Reference< XStringWidth > xStringLength( new RecentFilesStringLength ); int nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength(); - + // New vnd.sun.star.popup: command URL to support direct dispatches const rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.popup:RecentFileList?entry=" )); @@ -253,11 +253,11 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex ) xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY ); xServiceManager = m_xServiceManager; aLock.unlock(); - + css::util::URL aTargetURL; Sequence< PropertyValue > aArgsList; - - if (( nIndex >= 0 ) && + + if (( nIndex >= 0 ) && ( nIndex < sal::static_int_cast<sal_Int32>( m_aRecentFilesItems.size() ))) { const RecentFile& rRecentFile = m_aRecentFilesItems[ nIndex ]; @@ -353,7 +353,7 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( xPopupMenu ); if ( pPopupMenu ) executeEntry( rEvent.MenuId-1 ); - } + } } void SAL_CALL RecentFilesMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException) @@ -372,7 +372,7 @@ void RecentFilesMenuController::impl_setPopupMenu() void SAL_CALL RecentFilesMenuController::updatePopupMenu() throw (RuntimeException) { ResetableGuard aLock( m_aLock ); - + if ( m_bDisposed ) throw DisposedException(); @@ -392,17 +392,17 @@ void SAL_CALL RecentFilesMenuController::updatePopupMenu() throw (RuntimeExcepti } // XDispatchProvider -Reference< XDispatch > SAL_CALL RecentFilesMenuController::queryDispatch( - const URL& aURL, - const ::rtl::OUString& /*sTarget*/, - sal_Int32 /*nFlags*/ ) +Reference< XDispatch > SAL_CALL RecentFilesMenuController::queryDispatch( + const URL& aURL, + const ::rtl::OUString& /*sTarget*/, + sal_Int32 /*nFlags*/ ) throw( RuntimeException ) { ResetableGuard aLock( m_aLock ); - + if ( m_bDisposed ) throw DisposedException(); - + if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 ) return Reference< XDispatch >( static_cast< OWeakObject* >( this ), UNO_QUERY ); else @@ -410,13 +410,13 @@ throw( RuntimeException ) } // XDispatch -void SAL_CALL RecentFilesMenuController::dispatch( - const URL& aURL, - const Sequence< PropertyValue >& /*seqProperties*/ ) +void SAL_CALL RecentFilesMenuController::dispatch( + const URL& aURL, + const Sequence< PropertyValue >& /*seqProperties*/ ) throw( RuntimeException ) { ResetableGuard aLock( m_aLock ); - + if ( m_bDisposed ) throw DisposedException(); @@ -433,7 +433,7 @@ throw( RuntimeException ) { sal_Int32 nAddArgs = aURL.Complete.indexOf( '&', nEntryPos ); rtl::OUString aEntryArg; - + if ( nAddArgs < 0 ) aEntryArg = aURL.Complete.copy( nEntryPos ); else @@ -446,22 +446,22 @@ throw( RuntimeException ) } } -void SAL_CALL RecentFilesMenuController::addStatusListener( - const Reference< XStatusListener >& xControl, - const URL& aURL ) +void SAL_CALL RecentFilesMenuController::addStatusListener( + const Reference< XStatusListener >& xControl, + const URL& aURL ) throw( RuntimeException ) { ResetableGuard aLock( m_aLock ); - + if ( m_bDisposed ) throw DisposedException(); - + PopupMenuControllerBase::addStatusListener( xControl, aURL ); } void SAL_CALL RecentFilesMenuController::removeStatusListener( - const Reference< XStatusListener >& xControl, - const URL& aURL ) + const Reference< XStatusListener >& xControl, + const URL& aURL ) throw( RuntimeException ) { PopupMenuControllerBase::removeStatusListener( xControl, aURL ); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 6d5add117e..d9a35ede35 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -85,13 +85,13 @@ //_________________________________________________________________________________________________________________ #include <svtools/imgdef.hxx> #include <svtools/toolboxcontroller.hxx> -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> #endif #include <comphelper/mediadescriptor.hxx> #include <svtools/miscopt.hxx> -#include <svtools/imageitm.hxx> +#include <svl/imageitm.hxx> #include <svtools/framestatuslistener.hxx> #include <vcl/svapp.hxx> #include <vcl/menu.hxx> @@ -99,7 +99,7 @@ #include <vcl/taskpanelist.hxx> #include <rtl/logfile.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <boost/bind.hpp> //_________________________________________________________________________________________________________________ @@ -341,9 +341,11 @@ void ToolBarManager::Destroy() delete static_cast< AddonsParams* >( m_pToolBar->GetItemData( nItemId )); } + // Hide toolbar as lazy delete can destroy the toolbar much later. + m_pToolBar->Hide(); /* #i99167# removed change for i93173 since there is some weird crash */ // #i93173# delete toolbar lazily as we can still be in one of its handlers - m_pToolBar->doLazyDelete(); + m_pToolBar->doLazyDelete(); Link aEmpty; m_pToolBar->SetSelectHdl( aEmpty ); @@ -1388,7 +1390,7 @@ void ToolBarManager::RequestImages() // empty image. if ( !aImage ) aImage = QueryAddonsImage( aCmdURLSeq[i], bBigImages, m_bIsHiContrast ); - + pIter->second.nImageInfo = 1; // mark image as module based } else diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index f0359f3fba..86aad1a41c 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,7 +80,7 @@ #endif #include <vcl/window.hxx> #include <svtools/menuoptions.hxx> -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <dispatch/uieventloghelper.hxx> #include <rtl/logfile.hxx> @@ -143,7 +143,7 @@ Reference< XLayoutManager > getLayoutManagerFromFrame( const Reference< XFrame > { Reference< XPropertySet > xPropSet( rFrame, UNO_QUERY ); Reference< XLayoutManager > xLayoutManager; - + try { xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xLayoutManager; @@ -183,7 +183,7 @@ ToolbarsMenuController::~ToolbarsMenuController() { } -void ToolbarsMenuController::addCommand( +void ToolbarsMenuController::addCommand( Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, USHORT nHelpId, const rtl::OUString& rLabel ) { USHORT nItemId = m_xPopupMenu->getItemCount()+1; @@ -193,11 +193,11 @@ void ToolbarsMenuController::addCommand( aLabel = getUINameFromCommand( rCommandURL ); else aLabel = rLabel; - + rPopupMenu->insertItem( nItemId, aLabel, 0, nItemId ); Reference< awt::XMenuExtended > xMenuExtended( m_xPopupMenu, UNO_QUERY ); xMenuExtended->setCommand( nItemId, rCommandURL ); - + bool bInternal = ( rCommandURL.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STATIC_INTERNAL_CMD_PART ))) == 0); if ( !bInternal ) { @@ -206,10 +206,10 @@ void ToolbarsMenuController::addCommand( } vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - + Image aImage; const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - + if ( rSettings.GetUseImagesInMenus() ) aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetHighContrastMode() ); @@ -407,8 +407,8 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r Sequence< Sequence< com::sun::star::beans::PropertyValue > > aSeqToolBars = m_xModuleCfgMgr->getUIElementsInfo( UIElementType::TOOLBAR ); fillHashMap( aSeqToolBars, aToolbarHashMap ); - } - + } + std::vector< ToolBarEntry > aSortedTbs; rtl::OUString aStaticCmdPart( RTL_CONSTASCII_USTRINGPARAM( STATIC_CMD_PART )); @@ -524,14 +524,14 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r sal_Bool bAddCommand( sal_True ); SvtCommandOptions aCmdOptions; rtl::OUString aConfigureToolbar( RTL_CONSTASCII_USTRINGPARAM( CONFIGURE_TOOLBARS )); - + if ( aCmdOptions.HasEntries( SvtCommandOptions::CMDOPTION_DISABLED )) { - if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, + if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CONFIGURE_TOOLBARS_CMD )))) bAddCommand = sal_False; } - + if ( bAddCommand ) { // Create command for configure @@ -777,7 +777,7 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent } else { - // closing means: + // closing means: // hide and destroy element xLayoutManager->hideElement( aToolBarResName ); xLayoutManager->destroyElement( aToolBarResName ); @@ -833,7 +833,7 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException ) { ResetableGuard aLock( m_aLock ); - + if ( m_bDisposed ) throw DisposedException(); @@ -841,13 +841,13 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X { // Create popup menu on demand vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - + m_xPopupMenu = xPopupMenu; m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY )); fillPopupMenu( m_xPopupMenu ); - } + } } - + // XInitialization void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { @@ -856,14 +856,14 @@ void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArgume if ( !bInitalized ) { PopupMenuControllerBase::initialize(aArguments); - + if ( m_bInitialized ) { - Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( - SERVICENAME_MODULEMANAGER ), + Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( + SERVICENAME_MODULEMANAGER ), UNO_QUERY ); - Reference< XNameAccess > xPersistentWindowStateSupplier( m_xServiceManager->createInstance( - SERVICENAME_WINDOWSTATECONFIGURATION ), + Reference< XNameAccess > xPersistentWindowStateSupplier( m_xServiceManager->createInstance( + SERVICENAME_WINDOWSTATECONFIGURATION ), UNO_QUERY ); // Retrieve persistent window state reference for our module @@ -916,7 +916,7 @@ IMPL_STATIC_LINK_NOINSTANCE( ToolbarsMenuController, ExecuteHdl_Impl, ExecuteInf catch ( Exception& ) { } - + delete pExecuteInfo; return 0; } |