diff options
Diffstat (limited to 'framework')
58 files changed, 407 insertions, 215 deletions
diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx index 80e4b8144bb0..ecd9acecd7b9 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 4dbafe373117..595b358a789a 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 595f45bfc79a..a62ec3e47890 100644 --- a/framework/inc/dispatch/basedispatcher.hxx +++ b/framework/inc/dispatch/basedispatcher.hxx @@ -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 6f35d20c2d22..57fb2e94b07a 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 435b87a4f248..1bd908b266c6 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 22ef1a481ab7..55d356c80806 100644 --- a/framework/inc/helper/persistentwindowstate.hxx +++ b/framework/inc/helper/persistentwindowstate.hxx @@ -53,7 +53,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <cppuhelper/weak.hxx> //_________________________________________________________________________________________________________________ diff --git a/framework/inc/helper/titlebarupdate.hxx b/framework/inc/helper/titlebarupdate.hxx index aa893cd40a57..255229d8e2eb 100644 --- a/framework/inc/helper/titlebarupdate.hxx +++ b/framework/inc/helper/titlebarupdate.hxx @@ -93,7 +93,7 @@ //_________________________________________________________________________________________________________________ #ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #endif #ifndef _CPPUHELPER_WEAK_HXX_ diff --git a/framework/inc/helpid.hrc b/framework/inc/helpid.hrc index 49921efcee37..6195a6372452 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 eaffedbc0e5c..fd211dd81ee9 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 8f6c62a2f39e..ed3630ed1583 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 92c575c7b5b5..c1e1e59dc02f 100644 --- a/framework/inc/services/desktop.hxx +++ b/framework/inc/services/desktop.hxx @@ -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> diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx index 32e83aed1974..022bda1786bc 100644 --- a/framework/inc/services/frame.hxx +++ b/framework/inc/services/frame.hxx @@ -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> diff --git a/framework/inc/services/licensedlg.hxx b/framework/inc/services/licensedlg.hxx index 86e3f6c7fc57..4f5b9f0c65fa 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 46a90015a56e..af81b51d04ac 100644 --- a/framework/inc/services/pluginframe.hxx +++ b/framework/inc/services/pluginframe.hxx @@ -57,7 +57,7 @@ #ifndef _VCL_ATOM_HXX #include <vcl/threadex.hxx> #endif -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> //_________________________________________________________________________________________________________________ diff --git a/framework/inc/services/sessionlistener.hxx b/framework/inc/services/sessionlistener.hxx index cbb22a322d48..c8e54d4bcbaa 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!) @@ -120,6 +120,18 @@ 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: //--------------------------------------- @@ -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 a95e913695b0..215def2ea08c 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 8423a01f1793..f6b930906ca3 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:
- - 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;
+{ + 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_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 ca446a7e1386..69e6f85c6f90 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 452d2c045da4..d0961892b96b 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 9bcfa9564a33..8619ae423622 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 c3f827bc95a1..924c601ac689 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 36556d6f03fe..2178f1eefb91 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 6f20fc5aa474..3fe22b6adb74 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 b9cfad982ded..e95e37191138 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 1dd1194db1af..7f686ff5f6d8 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 fb08f7438399..0b86efd4d05b 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 d9da36437e25..49a28defb9dd 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 eb52b2beba1d..8537d18abc69 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 605c95a68468..8f6ee0302f87 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 3ca7dadd9953..453ae89d270c 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 97b9e7dbb220..959ea5cba57e 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 efa66b3a6140..44a023d3b70d 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> diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index d737a2d77308..c841e6fb0b8d 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 bb850b876e5c..588c59d8f323 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -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_ diff --git a/framework/source/classes/protocolhandlercache.cxx b/framework/source/classes/protocolhandlercache.cxx index 034b35259186..f426eb530c90 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 25b80650e81a..d1ac0c0e044e 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -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 diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx index 80f02236065f..9326181c6476 100644 --- a/framework/source/dispatch/startmoduledispatcher.cxx +++ b/framework/source/dispatch/startmoduledispatcher.cxx @@ -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 c57840b4d442..feec90e5a167 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 88a6484ca92c..b021d4f4de9d 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 491738dea73f..01934dfb47df 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> @@ -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; } @@ -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 ee39e583e5e7..9fb939e9db0b 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -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> diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 9328ed9d9a5c..9b19503f887e 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -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) ) @@ -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&) - { - // closed ... disposed ... always the same .-) - } - */ - catch(const css::uno::Exception&) + try { - // 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# @@ -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 @@ -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(); @@ -3020,6 +3058,7 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams) impl_flushALLConfigChanges(); } + //----------------------------------------------- void AutoRecovery::implts_doSessionRestore(const DispatchParams& aParams) { diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index 5a299150611e..7f190a678763 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 c5d845a9d333..a354b01d3c32 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -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" diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 0b9afa6d38de..e02206cf5f29 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -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" diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 0e14404de381..2b615240b594 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -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_ diff --git a/framework/source/services/mediatypedetectionhelper.cxx b/framework/source/services/mediatypedetectionhelper.cxx index 41d57b47899e..aca9b8f79523 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 ad0016fc0af6..95cbc52dcd04 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -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,7 +139,10 @@ 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 ) { } @@ -150,6 +155,63 @@ SessionListener::~SessionListener() } } +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; } } } @@ -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 ) + 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(); -void SAL_CALL SessionListener::approveInteraction( sal_Bool /*bInteractionGranted*/ ) - throw (RuntimeException) -{} + 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 966ce1756c64..21b2be8b1c53 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 fb3c08876687..dfce492ddcd7 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 311db615ed2a..caa356d850fa 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 555682677e33..ec1508cb0fd7 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 bccd553b57d3..3a92fa7848b1 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 4c20b96f00dc..0b26f96829d2 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -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> diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 37580f86f546..d4e5228c6b9c 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -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> //_________________________________________________________________________________________________________________ diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 1ca5bf409e6d..9c5ed617b9e0 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -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> diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 55c8d16af2ec..6463dd634c20 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 ); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 3b359eea97c2..a697eaeff3b7 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -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> |