summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2023-08-02 15:28:44 -0400
committerJustin Luth <jluth@mail.com>2023-08-07 18:15:47 +0200
commitceeb48b33b374dfcd970d4fdd194ce0301bbb65a (patch)
tree1908d932fc280f724e3e8b0d745e647cee94a2df /framework
parentbd6c6d46e82eb5cf5839a5b99e4838471250e959 (diff)
tdf#57414 autorecovery: ignoreClosing during Emergency/SessionSave
Unmodified documents were losing the enties from RecoveryList when implts_deregisterDocument was triggered, which prevented the Session recovery from being able to reload them. Change-Id: I991a9821105aca81ec596b28341ef4335b817439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155380 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/autorecovery.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 657d8c12106c..dbf0c803aab6 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2896,12 +2896,17 @@ AutoRecovery::ETimerType AutoRecovery::implts_saveDocs( bool bAllow
if ((aInfo.DocumentState & DocState::Handled) == DocState::Handled)
continue;
+ // don't allow implts_deregisterDocument to remove from RecoveryList during shutdown jobs
+ if (m_eJob & (Job::EmergencySave | Job::SessionSave))
+ aInfo.IgnoreClosing = true;
+
// Not modified documents are not saved.
- // We safe an information about the URL only!
+ // We save information about the URL only!
Reference< XDocumentRecovery > xDocRecover( aInfo.Document, UNO_QUERY_THROW );
if ( !xDocRecover->wasModifiedSinceLastSave() )
{
aInfo.DocumentState |= DocState::Handled;
+ *pIt = aInfo;
continue;
}