Check for enable safe mode earlier
Change-Id: I50e48472bb840c70e9a7c11dd84f33c64d6e1422
This commit is contained in:
@@ -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
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user