summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorMikhail Voitenko <mav@openoffice.org>2009-12-03 10:37:54 +0000
committerMikhail Voitenko <mav@openoffice.org>2009-12-03 10:37:54 +0000
commit83551c86578375623fa8e670bbfe1c976b3bd665 (patch)
tree999b9bdf092072743327637712fc515969039d26 /framework/inc
parent245aaeb38f6d1f0ed1ac892da302772e6f71a9f3 (diff)
#i105172# allow to request storing of documents from the user on session shutdown
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/services/autorecovery.hxx7
-rw-r--r--framework/inc/services/sessionlistener.hxx20
2 files changed, 24 insertions, 3 deletions
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/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);