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-06 00:10:20 +0100
commite717a81304ca3d7b081b7581c82f173e9da31176 (patch)
tree1e5c2aae0cf9b1975cc754ec2226698ac37e9cdb /desktop
parent367ced60eb74264571f9d8918df115873634b2da (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 (cherry picked from commit dce74be2bab7a6924578e8f6f6ce37aa593cc481)
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 1158142a4f52..b1003f4d73a2 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2291,10 +2291,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
@@ -2325,7 +2326,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