summaryrefslogtreecommitdiff
path: root/framework/inc/services/sessionlistener.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/inc/services/sessionlistener.hxx')
-rw-r--r--framework/inc/services/sessionlistener.hxx22
1 files changed, 19 insertions, 3 deletions
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);