Kaydet (Commit) dce74be2 authored tarafından Michael Stahl's avatar Michael Stahl

desktop: avoid starting with new writer doc if OOO_DISABLE_RECOVERY set

Better to show the start center, same as when --norestore is given.

Change-Id: I726a8b7d227b646180fe16ee9c302a329a7fa36c
üst 1d2ba2e7
...@@ -2290,10 +2290,11 @@ void Desktop::OpenClients() ...@@ -2290,10 +2290,11 @@ void Desktop::OpenClients()
bool bCrashed = false; bool bCrashed = false;
bool bExistsRecoveryData = false; bool bExistsRecoveryData = false;
bool bExistsSessionData = false; bool bExistsSessionData = false;
bool const bDisableRecovery = getenv("OOO_DISABLE_RECOVERY") != nullptr;
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData); impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
if ( !getenv ("OOO_DISABLE_RECOVERY") && if ( !bDisableRecovery &&
( (
( bExistsRecoveryData ) || // => crash with files => recovery ( bExistsRecoveryData ) || // => crash with files => recovery
( bCrashed ) // => crash without files => error report ( bCrashed ) // => crash without files => error report
...@@ -2324,7 +2325,8 @@ void Desktop::OpenClients() ...@@ -2324,7 +2325,8 @@ void Desktop::OpenClients()
SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message); SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message);
} }
if ( !bExistsRecoveryData && xSessionListener.is() ) // in bDisableRecovery case call doRestore() to prevent new Writer doc
if ((!bExistsRecoveryData || bDisableRecovery) && xSessionListener.is())
{ {
// session management // session management
try try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment