Check for enable safe mode earlier

Change-Id: I50e48472bb840c70e9a7c11dd84f33c64d6e1422
This commit is contained in:
Samuel Mehrbrodt
2016-10-20 12:47:40 +02:00
parent f0006e79c4
commit 11f6c6d591
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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();