summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx3
-rw-r--r--desktop/source/app/appinit.cxx4
2 files changed, 6 insertions, 1 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 6396a239f3cb..eb48be03baaa 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2088,8 +2088,9 @@ void Desktop::OpenClients()
bool bAllowRecoveryAndSessionManagement = ( !rArgs.IsNoRestore() ) && ( !rArgs.IsHeadless() );
// Enter safe mode if requested
- if (rArgs.IsSafeMode() || sfx2::SafeMode::hasFlag())
+ if (Application::IsSafeModeEnabled()) {
handleSafeMode();
+ }
#if HAVE_FEATURE_BREAKPAD
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 105ade387159..3ea24827907d 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -53,6 +53,7 @@
#include <unotools/tempfile.hxx>
#include <vcl/svapp.hxx>
#include <unotools/pathoptions.hxx>
+#include <sfx2/safemode.hxx>
#include <map>
using namespace desktop;
@@ -96,6 +97,9 @@ 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();