summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-20 12:47:40 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-20 12:48:43 +0200
commit11f6c6d59128be73e722441012cffb47cdf0058c (patch)
treea5714cc1430124ec0cd3f5645e5c0a99fa972e1f
parentf0006e79c4112b06b65c098722729b9a3f3301c7 (diff)
Check for enable safe mode earlier
Change-Id: I50e48472bb840c70e9a7c11dd84f33c64d6e1422
-rw-r--r--desktop/source/app/app.cxx5
-rw-r--r--desktop/source/app/appinit.cxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c3bd15ce361f..44598da773ac 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -556,6 +556,11 @@ void Desktop::Init()
SetBootstrapError( BE_UNO_SERVICEMANAGER, e.Message );
}
+ // Check whether safe mode is enabled
+ CommandLineArgs& rCmdLine = GetCommandLineArgs();
+ if (rCmdLine.IsSafeMode() || sfx2::SafeMode::hasFlag())
+ Application::EnableSafeMode();
+
// When we are in SafeMode we need to do changes before the configuration
// gets read (langselect::prepareLocale() by UNO API -> Components::Components)
// This may prepare SafeMode or restore from it by moving data in
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 3ea24827907d..6e6f56b1da33 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -97,9 +97,6 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
// interpret command line arguments
CommandLineArgs& rCmdLine = GetCommandLineArgs();
- if (rCmdLine.IsSafeMode() || sfx2::SafeMode::hasFlag())
- Application::EnableSafeMode();
-
// Headless mode for FAT Office, auto cancels any dialogs that popup
if (rCmdLine.IsEventTesting())
Application::EnableEventTestingMode();