diff options
author | Juergen Funk <juergen.funk_ml@cib.de> | 2016-12-08 15:41:24 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-02-07 08:44:10 +0000 |
commit | f57424cc4c0dd68083c7935ce8a9b795625cf84c (patch) | |
tree | 266e0567eea3593bc682c23c92922c34f2ee7441 /framework | |
parent | d8ccf8cf7a604cb1df04f23b5b5036fff1d4afdb (diff) |
tdf#104101 Improve the session management handling
- Set the current time to the SessionID
- Split the SetProperties-Data, and send
DeleteProperties for DiscardCommand
(above both topic is the same as kate and
plasma-desktop to do)
- in statusChange the saveDone was not called, and
call only once the saveDone
- in shutdownCanceled must be send the saveDone too
Change-Id: I42855c75b88b5d651ef8091947e359dc2c3f9209
Reviewed-on: https://gerrit.libreoffice.org/33215
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/sessionlistener.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index f9c53947bb4a..6a57c566907f 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -275,9 +275,10 @@ void SAL_CALL SessionListener::statusChanged(const frame::FeatureStateEvent& eve m_bRestored = true; // a document was restored } - else if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionSave" ) - { - if (event.FeatureDescriptor == "stop") + else if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doAutoSave" ) + { // the "doSessionSave" was never set, look to framework/source/services/autorecovery.cxx + // it always testing but never setting (enum AutoRecovery::E_SESSION_SAVE) + if (event.FeatureDescriptor == "update") { if (m_rSessionManager.is()) m_rSessionManager->saveDone(this); // done with save @@ -372,7 +373,7 @@ void SAL_CALL SessionListener::approveInteraction( sal_Bool bInteractionGranted m_rSessionManager->interactionDone( this ); } - if ( m_rSessionManager.is() ) + if ( m_rSessionManager.is() && m_bTerminated ) m_rSessionManager->saveDone(this); } else @@ -386,6 +387,9 @@ void SessionListener::shutdownCanceled() SAL_INFO("fwk.session", "SessionListener::shutdownCanceled"); // set the state back m_bSessionStoreRequested = false; // there is no need to protect it with mutex + + if ( m_rSessionManager.is() ) + m_rSessionManager->saveDone(this); } void SessionListener::doQuit() |