diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 27fb9aa036bc..22092bac9760 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1972,10 +1972,6 @@ IMPL_LINK_NOARG(Desktop, OpenClients_Impl, void*, void) void Desktop::OpenClients() { - // check if a document has been recovered - if there is one of if a document was loaded by cmdline, no default document - // should be created - bool bRecovery = false; - const CommandLineArgs& rArgs = GetCommandLineArgs(); if (!rArgs.IsQuickstart()) @@ -2070,7 +2066,7 @@ void Desktop::OpenClients() { try { - bRecovery = impl_callRecoveryUI( + impl_callRecoveryUI( false , // false => force recovery instead of emergency save bExistsRecoveryData); } @@ -2079,9 +2075,6 @@ void Desktop::OpenClients() SAL_WARN( "desktop.app", "Error during recovery" << e); } } - else if (bExistsRecoveryData && bDisableRecovery && !rArgs.HasModuleParam()) - // prevent new Writer doc - bRecovery = true; Reference< XSessionManagerListener2 > xSessionListener; try @@ -2188,14 +2181,7 @@ void Desktop::OpenClients() // soffice was started as tray icon ... return; - if ( bRecovery ) - { - ShowBackingComponent(nullptr); - } - else - { - OpenDefault(); - } + OpenDefault(); } void Desktop::OpenDefault() @@ -2228,6 +2214,12 @@ void Desktop::OpenDefault() if ( aName.isEmpty() ) { + if (aOpt.IsModuleInstalled(SvtModuleOptions::EModule::STARTMODULE)) + { + ShowBackingComponent(nullptr); + return; + } + // Old way to create a default document if ( aOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) ) aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::EFactory::WRITER );