summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-05 20:57:20 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-05 23:06:39 +0100
commitdce74be2bab7a6924578e8f6f6ce37aa593cc481 (patch)
tree11771249b5fa0e2610905cba8f10e4f08671d77a /desktop
parent1d2ba2e7facbe074a4450dd7ead0612f36c10b47 (diff)
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
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index f5722e4c5a72..f71aa9b482df 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2290,10 +2290,11 @@ void Desktop::OpenClients()
bool bCrashed = false;
bool bExistsRecoveryData = false;
bool bExistsSessionData = false;
+ bool const bDisableRecovery = getenv("OOO_DISABLE_RECOVERY") != nullptr;
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
- if ( !getenv ("OOO_DISABLE_RECOVERY") &&
+ if ( !bDisableRecovery &&
(
( bExistsRecoveryData ) || // => crash with files => recovery
( bCrashed ) // => crash without files => error report
@@ -2324,7 +2325,8 @@ void Desktop::OpenClients()
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
try