21#include <config_features.h>
22#include <config_feature_desktop.h>
23#include <config_feature_opencl.h>
24#include <config_java.h>
25#include <config_folders.h>
26#include <config_extensions.h>
27#include <config_wasm_strip.h>
44#if HAVE_FEATURE_UPDATE_MAR
53#include <com/sun/star/beans/XPropertySet.hpp>
54#include <com/sun/star/frame/theAutoRecovery.hpp>
55#include <com/sun/star/frame/theGlobalEventBroadcaster.hpp>
56#include <com/sun/star/frame/SessionListener.hpp>
57#include <com/sun/star/frame/XSynchronousDispatch.hpp>
58#include <com/sun/star/configuration/theDefaultProvider.hpp>
59#include <com/sun/star/util/XFlushable.hpp>
60#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
61#include <com/sun/star/frame/Desktop.hpp>
62#include <com/sun/star/frame/StartModule.hpp>
63#include <com/sun/star/view/XPrintable.hpp>
64#include <com/sun/star/awt/XTopWindow.hpp>
65#include <com/sun/star/util/URLTransformer.hpp>
66#include <com/sun/star/util/XURLTransformer.hpp>
67#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
68#include <com/sun/star/configuration/MissingBootstrapFileException.hpp>
69#include <com/sun/star/configuration/InvalidBootstrapFileException.hpp>
70#include <com/sun/star/configuration/InstallationIncompleteException.hpp>
71#include <com/sun/star/configuration/backend/BackendSetupException.hpp>
72#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
73#include <com/sun/star/task/theJobExecutor.hpp>
74#include <com/sun/star/task/OfficeRestartManager.hpp>
75#include <com/sun/star/task/XRestartManager.hpp>
76#include <com/sun/star/document/XDocumentEventListener.hpp>
77#include <com/sun/star/office/Quickstart.hpp>
78#include <com/sun/star/system/XSystemShellExecute.hpp>
79#include <com/sun/star/system/SystemShellExecute.hpp>
80#include <com/sun/star/loader/XImplementationLoader.hpp>
91#include <uno/current_context.hxx>
97#include <officecfg/Office/Common.hxx>
98#include <officecfg/Office/Recovery.hxx>
99#include <officecfg/Office/Update.hxx>
100#include <officecfg/Setup.hxx>
101#include <osl/file.hxx>
102#include <osl/process.h>
103#include <rtl/byteseq.hxx>
105#if !ENABLE_WASM_STRIP_PINGUSER
108#include <rtl/bootstrap.hxx>
109#include <vcl/test/GraphicsRenderTests.hxx>
114#include <sfx2/sfxsids.hrc>
137#define WIN32_LEAN_AND_MEAN
144#define GETPID _getpid
150#include <strings.hxx>
161using namespace ::com::sun::star::system;
173#if HAVE_FEATURE_EXTENSIONS
205bool cleanExtensionCache() {
207 "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" SAL_CONFIGFILE(
"version")
":buildid}");
208 rtl::Bootstrap::expandMacros(buildId);
210 "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" SAL_CONFIGFILE(
"bootstrap")
211 ":UserInstallation}/user/extensions");
212 rtl::Bootstrap::expandMacros(extDir);
213 OUString buildIdFile(extDir +
"/buildid");
214 osl::File fr(buildIdFile);
215 osl::FileBase::RC rc = fr.open(osl_File_OpenFlag_Read);
217 case osl::FileBase::E_None:
219 rtl::ByteSequence s1;
220 rc = fr.readLine(s1);
221 osl::FileBase::RC rc2 = fr.close();
223 rc2 != osl::FileBase::E_None,
"desktop.app",
224 "cannot close " << fr.getURL() <<
" after reading: " << +rc2);
226 if (rc != osl::FileBase::E_None && rc != osl::FileBase::E_AGAIN) {
227 SAL_WARN(
"desktop.app",
"cannot read from " << fr.getURL() <<
": " << +rc);
231 reinterpret_cast< char const *
>(s1.getConstArray()),
232 s1.getLength(), RTL_TEXTENCODING_ISO_8859_1);
240 case osl::FileBase::E_NOENT:
243 SAL_WARN(
"desktop.app",
"cannot open " << fr.getURL() <<
" for reading: " << +rc);
248 "$UNO_USER_PACKAGES_CACHE/registry/"
249 "com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc");
250 rtl::Bootstrap::expandMacros(userRcFile);
251 rc = osl::File::remove(userRcFile);
253 rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT,
"desktop.app",
254 "cannot remove file " << userRcFile <<
": " << +rc);
255 rc = osl::Directory::createPath(extDir);
257 rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST,
"desktop.app",
258 "cannot create path " << extDir <<
": " << +rc);
259 osl::File fw(buildIdFile);
260 rc = fw.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
261 if (rc != osl::FileBase::E_None) {
262 SAL_WARN(
"desktop.app",
"cannot open " << fw.getURL() <<
" for writing: " << +rc);
270 rc = fw.write(buf.getStr(), buf.getLength(),
n);
272 (rc != osl::FileBase::E_None
273 ||
n !=
static_cast< sal_uInt32
>(buf.getLength())),
275 "cannot write to " << fw.getURL() <<
": " << +rc <<
", " <<
n);
278 rc != osl::FileBase::E_None,
"desktop.app",
279 "cannot close " << fw.getURL() <<
" after writing: " << +rc);
285bool shouldLaunchQuickstart()
294 bQuickstart = pLauncherItem->
GetValue();
299void SetRestartState() {
301 std::shared_ptr< comphelper::ConfigurationChanges > batch(
303 officecfg::Setup::Office::OfficeRestartInProgress::set(
true, batch);
305 }
catch (css::uno::Exception) {
310void DoRestartActionsIfNecessary(
bool quickstart) {
315 if (officecfg::Setup::Office::OfficeRestartInProgress::get()) {
316 std::shared_ptr< comphelper::ConfigurationChanges > batch(
318 officecfg::Setup::Office::OfficeRestartInProgress::set(
321 css::office::Quickstart::createStart(
323 shouldLaunchQuickstart());
325 }
catch (css::uno::Exception &) {
330void RemoveIconCacheDirectory()
333 OUString sUrl =
"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
335 rtl::Bootstrap::expandMacros(sUrl);
343void runGraphicsRenderTests()
347#if !ENABLE_WASM_STRIP_PINGUSER
358OUString MakeStartupErrorMessage(std::u16string_view aErrorMessage)
360 return DpResId(STR_BOOTSTRAP_ERR_CANNOT_START) +
"\n" + aErrorMessage;
373void FatalError(
const OUString& sMessage)
376 if ( sProductKey.isEmpty())
378 osl_getExecutableFile( &sProductKey.pData );
380 ::sal_uInt32 nLastIndex = sProductKey.lastIndexOf(
'/');
381 if ( nLastIndex > 0 )
382 sProductKey = sProductKey.copy( nLastIndex+1 );
385 OUString sTitle = sProductKey +
" - Fatal Error";
387 std::cerr << sTitle <<
": " <<
sMessage << std::endl;
396 return theCommandLineArgs;
409 if (sRet.indexOf(
"%PRODUCT") != -1 || sRet.indexOf(
"%ABOUTBOX") != -1)
411 sRet = sRet.replaceAll(
"%PRODUCTNAME", sBrandName );
412 sRet = sRet.replaceAll(
"%PRODUCTVERSION", sVersion );
413 sRet = sRet.replaceAll(
"%BUILDID", sBuildId );
414 sRet = sRet.replaceAll(
"%ABOUTBOXPRODUCTVERSIONSUFFIX", sAboutBoxVersionSuffix );
415 sRet = sRet.replaceAll(
"%ABOUTBOXPRODUCTVERSION", sAboutBoxVersion );
416 sRet = sRet.replaceAll(
"%PRODUCTEXTENSION", sExtension );
419 if ( sRet.indexOf(
"%OOOVENDOR" ) != -1 )
422 sRet = sRet.replaceAll(
"%OOOVENDOR", sOOOVendor );
429 : m_bCleanedExtensionCache(false)
430 , m_bServicesRegistered(false)
431 , m_aBootstrapError(BE_OK)
432 , m_aBootstrapStatus(BS_OK)
433 , m_firstRunTimer(
"desktop::Desktop m_firstRunTimer" )
447#if HAVE_FEATURE_EXTENSIONS
460 catch (css::uno::Exception & e)
487 catch (css::uno::Exception & e)
496 static bool bTryHardOfficeconfigBroken(
false);
498 if (bTryHardOfficeconfigBroken)
507#if defined(ANDROID) || defined(EMSCRIPTEN)
528 else if ( !rCmdLineArgs.
GetUnknown().isEmpty()
551 Reference< XComponent >(
555 ::comphelper::setProcessServiceFactory(
nullptr );
566 TOOLS_WARN_EXCEPTION(
"desktop.app",
"exception throwing during shutdown, will leave some garbage behind");
580 static constexpr OUStringLiteral SUSPEND_QUICKSTARTVETO =
u"SuspendQuickstartVeto";
583 Reference< XPropertySet > xPropertySet(xDesktop, UNO_QUERY_THROW);
584 xPropertySet->setPropertyValue( SUSPEND_QUICKSTARTVETO,
Any(
true) );
586 bool bExit = xDesktop->terminate();
590 xPropertySet->setPropertyValue( SUSPEND_QUICKSTARTVETO,
Any(
false) );
622 OUString aProductKey;
625 osl_getExecutableFile( &aProductKey.pData );
626 sal_uInt32 lastIndex = aProductKey.lastIndexOf(
'/');
628 aProductKey = aProductKey.copy( lastIndex+1 );
631 if ( !aTemp.isEmpty() )
634 OUString
const aMessage(OUString::Concat(aDiagnosticMessage) +
"\n");
637 VclMessageType::Warning, VclButtonsType::Ok, aMessage));
638 xBootstrapFailedBox->set_title(aProductKey);
639 xBootstrapFailedBox->run();
645 const OUString& aFileURL )
648 bool bFileInfo =
true;
650 switch ( nFailureCode )
653 case ::utl::Bootstrap::MISSING_INSTALL_DIRECTORY:
655 aMsg =
DpResId(STR_BOOTSTRAP_ERR_PATH_INVALID);
661 case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE:
663 aMsg =
DpResId(STR_BOOTSTRAP_ERR_FILE_MISSING);
669 case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE_ENTRY:
670 case ::utl::Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY:
672 aMsg =
DpResId(STR_BOOTSTRAP_ERR_FILE_CORRUPT);
677 case ::utl::Bootstrap::MISSING_VERSION_FILE:
679 aMsg =
DpResId(STR_BOOTSTRAP_ERR_FILE_MISSING);
684 case ::utl::Bootstrap::MISSING_VERSION_FILE_ENTRY:
686 aMsg =
DpResId(STR_BOOTSTRAP_ERR_NO_SUPPORT);
691 case ::utl::Bootstrap::MISSING_USER_DIRECTORY:
693 aMsg =
DpResId(STR_BOOTSTRAP_ERR_DIR_MISSING);
698 case ::utl::Bootstrap::INVALID_BOOTSTRAP_DATA:
700 aMsg =
DpResId(STR_BOOTSTRAP_ERR_INTERNAL);
705 case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
708 aMsg =
"Invalid version file entry";
713 case ::utl::Bootstrap::NO_FAILURE:
722 OUString aMsgString( aMsg );
725 osl::File::getSystemPathFromFileURL( aFileURL, aFilePath );
727 aMsgString = aMsgString.replaceFirst(
"$1", aFilePath );
731 return MakeStartupErrorMessage( aMsg );
747 switch ( nFailureCode )
749 case ::utl::Bootstrap::MISSING_INSTALL_DIRECTORY:
750 case ::utl::Bootstrap::INVALID_BOOTSTRAP_DATA:
759 case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE_ENTRY:
760 case ::utl::Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY:
761 case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE:
763 OUString aBootstrapFileURL;
773 case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
774 case ::utl::Bootstrap::MISSING_VERSION_FILE_ENTRY:
775 case ::utl::Bootstrap::MISSING_VERSION_FILE:
777 OUString aVersionFileURL;
785 case ::utl::Bootstrap::MISSING_USER_DIRECTORY:
787 OUString aUserInstallationURL;
794 case ::utl::Bootstrap::NO_FAILURE:
814 <<
"The application cannot be started.\n"
817 ?
"The component manager is not available.\n"
819 :
"The configuration service is not available.\n");
821 if ( !aErrorMessage.isEmpty() )
823 std::cerr <<
"(\"" << aErrorMessage <<
"\")\n";
827 OUString aDiagnosticMessage =
DpResId(STR_BOOTSTRAP_ERR_NO_CFG_SERVICE) +
"\n";
828 if ( !aErrorMessage.isEmpty() )
830 aDiagnosticMessage +=
"(\"" + aErrorMessage +
"\")\n";
836 aDiagnosticMessage +=
DpResId(STR_ASK_START_SETUP_MANUALLY);
838 FatalError(MakeStartupErrorMessage(aDiagnosticMessage));
850 OUString msg(
DpResId(STR_CONFIG_ERR_ACCESS_GENERAL));
851 if (!aErrorMessage.isEmpty()) {
852 msg +=
"\n(\"" + aErrorMessage +
"\")";
854 FatalError(MakeStartupErrorMessage(msg));
858 OUString aDiagnosticMessage =
DpResId(STR_BOOTSTRAP_ERR_USERINSTALL_FAILED);
859 FatalError(MakeStartupErrorMessage(aDiagnosticMessage));
863 OUString aDiagnosticMessage =
DpResId(STR_BOOTSTRAP_ERR_LANGUAGE_MISSING);
864 FatalError(MakeStartupErrorMessage(aDiagnosticMessage));
869 OUString aUserInstallationURL;
870 OUString aUserInstallationPath;
872 osl::File::getSystemPathFromFileURL( aUserInstallationURL, aUserInstallationPath );
874 OUString aDiagnosticMessage;
876 aDiagnosticMessage =
DpResId(STR_BOOTSTRAP_ERR_NOTENOUGHDISKSPACE);
878 aDiagnosticMessage =
DpResId(STR_BOOTSTRAP_ERR_NOACCESSRIGHTS);
879 aDiagnosticMessage += aUserInstallationPath;
881 FatalError(MakeStartupErrorMessage(aDiagnosticMessage));
889#if HAVE_FEATURE_BREAKPAD
890void handleCrashReport()
892 static constexpr OUStringLiteral SERVICENAME_CRASHREPORT =
u"com.sun.star.comp.svx.CrashReportUI";
894 css::uno::Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
896 Reference< css::frame::XSynchronousDispatch > xRecoveryUI(
897 xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_CRASHREPORT,
xContext),
898 css::uno::UNO_QUERY_THROW);
900 Reference< css::util::XURLTransformer > xURLParser =
904 css::uno::Any aRet = xRecoveryUI->dispatchWithReturnValue(
aURL, css::uno::Sequence< css::beans::PropertyValue >());
913 css::uno::Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
915 Reference< css::frame::XSynchronousDispatch > xSafeModeUI(
916 xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.svx.SafeModeUI",
xContext),
917 css::uno::UNO_QUERY_THROW);
920 css::uno::Any aRet = xSafeModeUI->dispatchWithReturnValue(
aURL, css::uno::Sequence< css::beans::PropertyValue >());
942void impl_checkRecoveryState(
bool& bCrashed ,
943 bool& bRecoveryDataExists,
944 bool& bSessionDataExists )
946 bCrashed = officecfg::Office::Recovery::RecoveryInfo::Crashed::get()
947#if HAVE_FEATURE_BREAKPAD
948 || CrashReporter::crashReportInfoExists();
952 bool elements = officecfg::Office::Recovery::RecoveryList::get()->
955 = officecfg::Office::Recovery::RecoveryInfo::SessionData::get();
956 bRecoveryDataExists = elements && !session;
957 bSessionDataExists = elements && session;
960Reference< css::frame::XSynchronousDispatch > g_xRecoveryUI;
966 RefClearGuard(Ref& ref) :
m_Ref(ref) {}
967 ~RefClearGuard() {
m_Ref.clear(); }
975#if !ENABLE_WASM_STRIP_RECOVERYUI
976bool impl_callRecoveryUI(
bool bEmergencySave ,
977 bool bExistsRecoveryData)
979 constexpr OUStringLiteral COMMAND_EMERGENCYSAVE =
u"vnd.sun.star.autorecovery:/doEmergencySave";
980 constexpr OUStringLiteral COMMAND_RECOVERY =
u"vnd.sun.star.autorecovery:/doAutoRecovery";
982 css::uno::Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
985 xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.svx.RecoveryUI",
xContext),
986 css::uno::UNO_QUERY_THROW);
987 RefClearGuard<Reference< css::frame::XSynchronousDispatch >> refClearGuard(g_xRecoveryUI);
989 Reference< css::util::XURLTransformer > xURLParser =
994 aURL.Complete = COMMAND_EMERGENCYSAVE;
995 else if (bExistsRecoveryData)
996 aURL.Complete = COMMAND_RECOVERY;
1000 xURLParser->parseStrict(
aURL);
1002 css::uno::Any aRet = g_xRecoveryUI->dispatchWithReturnValue(
aURL, css::uno::Sequence< css::beans::PropertyValue >());
1009bool impl_bringToFrontRecoveryUI()
1011 Reference< css::frame::XSynchronousDispatch > xRecoveryUI(g_xRecoveryUI);
1012 if (!xRecoveryUI.is())
1015 css::util::URL
aURL;
1016 aURL.Complete =
"vnd.sun.star.autorecovery:/doBringToFront";
1017 Reference< css::util::XURLTransformer > xURLParser =
1019 xURLParser->parseStrict(
aURL);
1021 css::uno::Any aRet = xRecoveryUI->dispatchWithReturnValue(
aURL, css::uno::Sequence< css::beans::PropertyValue >());
1031void restartOnMac(
bool passArguments) {
1034#if HAVE_FEATURE_MACOSX_SANDBOX
1035 (void) passArguments;
1036 OUString aMessage =
DpResId(STR_LO_MUST_BE_RESTARTED);
1039 VclMessageType::Warning, VclButtonsType::Ok, aMessage));
1043 OSL_VERIFY(osl_getExecutableFile(&execUrl.pData) == osl_Process_E_None);
1046 if ((osl::FileBase::getSystemPathFromFileURL(execUrl, execPath)
1047 != osl::FileBase::E_None) ||
1048 !execPath.convertToString(
1049 &execPath8, osl_getThreadTextEncoding(),
1050 (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
1051 RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
1055 std::vector< OString >
args { execPath8 };
1057 if (passArguments) {
1058 sal_uInt32
n = osl_getCommandArgCount();
1059 for (sal_uInt32 i = 0;
i <
n; ++
i) {
1061 osl_getCommandArg(i, &arg.pData);
1062 if (arg.match(
"--accept=")) {
1066 if (!arg.convertToString(
1067 &arg8, osl_getThreadTextEncoding(),
1068 (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
1069 RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
1073 args.push_back(arg8);
1076 std::vector< char const * > argPtrs;
1077 for (
auto const& elem : args)
1079 argPtrs.push_back(elem.getStr());
1081 argPtrs.push_back(
nullptr);
1082 execv(execPath8.getStr(),
const_cast< char **
>(argPtrs.data()));
1083 if (errno == ENOTSUP) {
1086 execv(execPath8.getStr(),
const_cast< char **
>(argPtrs.data()));
1087 }
else if (pid > 0) {
1096 if (waitpid(pid, &stat, 0) == pid && WIFEXITED(stat)) {
1097 _exit(WEXITSTATUS(stat));
1104 (void) passArguments;
1108#if HAVE_FEATURE_UPDATE_MAR
1109bool isTimeForUpdateCheck()
1111 sal_uInt64 nLastUpdate = officecfg::Office::Update::Update::LastUpdateTime::get();
1114 sal_uInt64 n7DayInMS = 1000 * 60 * 60 * 12 * 1;
1115 if (nNow - n7DayInMS >= nLastUpdate)
1127 static bool bInException =
false;
1129#if HAVE_FEATURE_BREAKPAD
1130 CrashReporter::removeExceptionHandler();
1140 bInException =
true;
1144 bool bRestart =
false;
1145 bool bAllowRecoveryAndSessionManagement = (
1148 ( nCategory != ExceptionCategory::UserInterface ) &&
1151 if ( bAllowRecoveryAndSessionManagement )
1156#if !ENABLE_WASM_STRIP_RECOVERYUI
1157 bRestart = impl_callRecoveryUI(
1173 restartOnMac(
false);
1174#if !ENABLE_WASM_STRIP_SPLASH
1198 JVMloadThread() :
salhelper::Thread(
"Preload JVM thread")
1203 virtual void execute() override final
1207 Reference< css::loader::XImplementationLoader > xJavaComponentLoader(
1208 xSMgr->createInstance(
"com.sun.star.comp.stoc.JavaComponentLoader"),
1209 css::uno::UNO_QUERY_THROW);
1211 if (xJavaComponentLoader.is())
1213 const css::uno::Reference< ::com::sun::star::registry::XRegistryKey > xRegistryKey;
1216 xJavaComponentLoader->activate(
"",
"",
"", xRegistryKey);
1220 SAL_WARN(
"desktop.app",
"Cannot activate factory during JVM preloading");
1226struct ExecuteGlobals
1248 css::uno::ContextLayer layer( css::uno::getCurrentContext() );
1253 return EXIT_FAILURE;
1258 return EXIT_SUCCESS;
1262 css::uno::setCurrentContext(
new DesktopContext( css::uno::getCurrentContext() ) );
1264 if (officecfg::Office::Common::Misc::PreloadJVM::get() &&
pExecGlobals)
1266 SAL_INFO(
"desktop.app",
"Preload JVM");
1278#if !ENABLE_WASM_STRIP_SPLASH
1287 SAL_WARN(
"desktop.app",
"userinstall failed: " << inst_fin);
1295 return EXIT_FAILURE;
1301 Reference< XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
1303 Reference< XRestartManager > xRestartManager( OfficeRestartManager::get(
xContext) );
1311#if HAVE_FEATURE_DESKTOP && !defined(EMSCRIPTEN)
1315 bool bMustLockProfile = ( getenv(
"SAL_NOLOCK_PROFILE" ) == nullptr );
1316 if ( bMustLockProfile )
1324 return EXIT_FAILURE;
1332 return EXIT_FAILURE;
1338 return EXIT_SUCCESS;
1342 return EXIT_FAILURE;
1344#if HAVE_FEATURE_UPDATE_MAR
1345 const char* pUpdaterTestEnable = std::getenv(
"LIBO_UPDATER_TEST_ENABLE");
1346 if (pUpdaterTestEnable || officecfg::Office::Update::Update::Enabled::get())
1349 const char* pUpdaterRunning = std::getenv(
"LIBO_UPDATER_TEST_RUNNING");
1350 bool bUpdateRunning = officecfg::Office::Update::Update::UpdateRunning::get() || pUpdaterRunning;
1353 OUString aSeeAlso = officecfg::Office::Update::Update::SeeAlso::get();
1354 OUString aOldBuildID = officecfg::Office::Update::Update::OldBuildID::get();
1357 if (aOldBuildID == aBuildID)
1359 Updater::log(
"Old and new Build ID are the same. No Updating took place.");
1363 if (!aSeeAlso.isEmpty())
1365 SAL_INFO(
"desktop.updater",
"See also: " << aSeeAlso);
1366 Reference< css::system::XSystemShellExecute > xSystemShell(
1369 xSystemShell->execute( aSeeAlso, OUString(), SystemShellExecuteFlags::URIS_ONLY );
1375 std::shared_ptr< comphelper::ConfigurationChanges > batch(
1377 officecfg::Office::Update::Update::UpdateRunning::set(
false, batch);
1378 officecfg::Office::Update::Update::SeeAlso::set(OUString(), batch);
1379 officecfg::Office::Update::Update::OldBuildID::set(OUString(), batch);
1385 osl::DirectoryItem aUpdateFile;
1388 const char* pUpdaterTestUpdate = std::getenv(
"LIBO_UPDATER_TEST_UPDATE");
1389 const char* pForcedUpdateCheck = std::getenv(
"LIBO_UPDATER_TEST_UPDATE_CHECK");
1390 if (pUpdaterTestUpdate || aUpdateFile.is())
1392 OUString aBuildID(
"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
"/" SAL_CONFIGFILE(
"version")
":buildid}");
1393 rtl::Bootstrap::expandMacros(aBuildID);
1394 std::shared_ptr< comphelper::ConfigurationChanges > batch(
1396 officecfg::Office::Update::Update::OldBuildID::set(aBuildID, batch);
1397 officecfg::Office::Update::Update::UpdateRunning::set(
true, batch);
1401 css::uno::Reference<css::util::XFlushable> xFlushable(css::configuration::theDefaultProvider::get(
xContext), UNO_QUERY);
1402 xFlushable->flush();
1405 bool bSuccess =
update();
1407 return EXIT_SUCCESS;
1409 else if (isTimeForUpdateCheck() || pForcedUpdateCheck)
1412 Updater::log(
"Update Check Time: " + OUString::number(nNow));
1413 std::shared_ptr< comphelper::ConfigurationChanges > batch(
1415 officecfg::Office::Update::Update::LastUpdateTime::set(nNow, batch);
1439 pExecGlobals->xGlobalBroadcaster = Reference < css::document::XDocumentEventListener >
1440 ( css::frame::theGlobalEventBroadcaster::get(
xContext), UNO_SET_THROW );
1449#if HAVE_FEATURE_EXTENSIONS
1456 return EXIT_FAILURE;
1467 css::document::DocumentEvent
aEvent;
1468 aEvent.EventName =
"OnStartApp";
1474 bool bCrashed =
false;
1475 bool bExistsRecoveryData =
false;
1476 bool bExistsSessionData =
false;
1478 impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
1481 if ( !pidfileName.isEmpty() )
1483 OUString pidfileURL;
1485 if ( osl_getFileURLFromSystemPath(pidfileName.pData, &pidfileURL.pData) == osl_File_E_None )
1487 osl::File pidfile( pidfileURL );
1488 osl::FileBase::RC rc;
1490 osl::File::remove( pidfileURL );
1491 if ( (rc = pidfile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create ) ) == osl::File::E_None )
1493 OString pid( OString::number(
GETPID() ) );
1494 sal_uInt64 written = 0;
1495 if ( pidfile.write(pid.getStr(), pid.getLength(), written) != osl::File::E_None )
1497 SAL_WARN(
"desktop.app",
"cannot write pidfile " << pidfile.getURL());
1503 SAL_WARN(
"desktop.app",
"cannot open pidfile " << pidfile.getURL() << rc);
1508 SAL_WARN(
"desktop.app",
"cannot get pidfile URL from path" << pidfileName);
1512 pExecGlobals->bRestartRequested = xRestartManager->isRestartRequested(
true);
1517 (!bExistsRecoveryData ) &&
1518 (!bExistsSessionData ) &&
1550 if ( xDesktop.is() )
1555#if HAVE_FEATURE_OPENCL
1559#if !defined(EMSCRIPTEN)
1561 const char * pDisplay = std::getenv(
"DISPLAY");
1562 if (!pDisplay || pDisplay[0] ==
':')
1564 runGraphicsRenderTests();
1577#if HAVE_FEATURE_JAVA
1580 css::uno::ContextLayer layer2(
1585 xRestartManager->isRestartRequested(
true);
1598 xDesktop->terminate();
1608 return EXIT_SUCCESS;
1621 isRestartRequested(
true);
1627 if ( !pidfileName.isEmpty() )
1629 OUString pidfileURL;
1631 if ( osl_getFileURLFromSystemPath(pidfileName.pData, &pidfileURL.pData) == osl_File_E_None )
1633 if ( osl::File::remove( pidfileURL ) != osl::FileBase::E_None )
1635 SAL_WARN(
"desktop.app",
"shutdown: cannot remove pidfile " << pidfileURL);
1640 SAL_WARN(
"desktop.app",
"shutdown: cannot get pidfile URL from path" << pidfileName);
1655 RemoveIconCacheDirectory();
1677#if HAVE_FEATURE_SCRIPTING
1696#if !ENABLE_WASM_STRIP_SPLASH
1703 return EXIT_SUCCESS;
1715 css::configuration::theDefaultProvider::get(
1719 catch( css::lang::ServiceNotRegisteredException & e )
1724 catch(
const css::configuration::MissingBootstrapFileException& e )
1727 e.BootstrapFileURL ));
1730 catch(
const css::configuration::InvalidBootstrapFileException& e )
1733 e.BootstrapFileURL ));
1736 catch(
const css::configuration::InstallationIncompleteException& )
1738 OUString aVersionFileURL;
1748 catch (
const css::configuration::backend::BackendAccessException& exception)
1753 FatalError( MakeStartupErrorMessage( exception.Message ) );
1755 catch (
const css::configuration::backend::BackendSetupException& exception)
1760 FatalError( MakeStartupErrorMessage( exception.Message ) );
1762 catch (
const css::configuration::CannotLoadConfigurationException& )
1768 catch(
const css::uno::Exception& )
1779 css::uno::Reference< css::util::XFlushable >(
1780 css::configuration::theDefaultProvider::get(
1782 css::uno::UNO_QUERY_THROW)->flush();
1793 bool bQuickstart = shouldLaunchQuickstart();
1810 css::office::Quickstart::createStart(rxContext, bQuickstart);
1814 catch(
const css::uno::Exception& )
1830 sal_uInt16 nDragMode = officecfg::Office::Common::View::Window::Drag::get();
1831 switch ( nDragMode )
1834 nDragFullOptions |= DragFullOptions::All;
1845 bool bMenuFollowMouse = officecfg::Office::Common::View::Menu::FollowMouse::get();
1846 hMouseSettings.
SetFollow( bMenuFollowMouse ? (nFollow|MouseFollowFlags::Menu) : (nFollow&~MouseFollowFlags::Menu));
1849 bool bMenuIcons = officecfg::Office::Common::View::Menu::ShowIconsInMenues::get();
1850 bool bSystemMenuIcons = officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::get();
1860class ExitTimer :
public Timer
1863 ExitTimer() :
Timer(
"desktop ExitTimer")
1868 virtual void Invoke()
override
1894 CloseSplashScreen();
1897 bool bDontShowDialogs
1902 bDontShowDialogs =
true;
1904 if (!bDontShowDialogs)
1908 xSMgr->createInstance(
"com.sun.star.bridge.OleApplicationRegistration");
1909 xSMgr->createInstance(
"com.sun.star.comp.ole.EmbedServer");
1911 const char *pExitPostStartup = getenv (
"OOO_EXIT_POST_STARTUP");
1912 if (pExitPostStartup && *pExitPostStartup)
1923 OUString aHelpModule;
1925 aHelpModule =
"swriter";
1927 aHelpModule =
"scalc";
1929 aHelpModule =
"sdraw";
1931 aHelpModule =
"simpress";
1933 aHelpModule =
"sdatabase";
1935 aHelpModule =
"sbasic";
1937 aHelpModule =
"smath";
1939 if (!aHelpModule.isEmpty()) {
1940 OUString aHelpURL =
"vnd.sun.star.help://"
1942 +
"/start?Language="
1945 aHelpURL +=
"&System=UNX";
1947 aHelpURL +=
"&System=WIN";
1970#if HAVE_FEATURE_BREAKPAD
1971 if (officecfg::Office::Common::Misc::CrashReport::get() && CrashReporter::crashReportInfoExists())
1972 handleCrashReport();
1975 if ( ! bAllowRecoveryAndSessionManagement )
1979 Reference< XDispatch > xRecovery = css::frame::theAutoRecovery::get( ::comphelper::getProcessComponentContext() );
1982 css::util::URL aCmd;
1983 aCmd.Complete =
"vnd.sun.star.autorecovery:/disableRecovery";
1984 xParser->parseStrict(aCmd);
1986 xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >());
1988 catch(
const css::uno::Exception&)
1995 bool bExistsRecoveryData =
false;
1996#if !ENABLE_WASM_STRIP_RECOVERYUI
1997 bool bCrashed =
false;
1998 bool bExistsSessionData =
false;
1999 bool const bDisableRecovery
2000 = getenv(
"OOO_DISABLE_RECOVERY") !=
nullptr
2002 || !officecfg::Office::Recovery::RecoveryInfo::Enabled::get();
2004 impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
2006 if ( !bDisableRecovery &&
2008 bExistsRecoveryData ||
2015 impl_callRecoveryUI(
2017 bExistsRecoveryData);
2019 catch(
const css::uno::Exception&)
2026 Reference< XSessionManagerListener2 > xSessionListener;
2030 bool bUIOnSessionShutdownAllowed = officecfg::Office::Recovery::SessionShutdown::DocumentStoreUIEnabled::get();
2031 xSessionListener = SessionListener::createWithOnQuitFlag(
2032 ::comphelper::getProcessComponentContext(), bUIOnSessionShutdownAllowed);
2034 catch(
const css::uno::Exception&)
2039 if ( !bExistsRecoveryData && xSessionListener.is() )
2044 xSessionListener->doRestore();
2046 catch(
const css::uno::Exception&)
2106 VclMessageType::Warning, VclButtonsType::Ok,
2107 DpResId(STR_ERR_PRINTDISABLED)));
2121 Reference< XElementAccess > xList( xDesktop->getFrames(), UNO_QUERY_THROW );
2122 if ( xList->hasElements() )
2160 if (
aName.isEmpty() )
2190 const OUString& rName, std::optional< OUString >
const & cwdUrl )
2194 if (rName.startsWith(
"vnd.sun.star.script"))
2206 if ( rName.startsWith(
"service:"))
2226 RTL_TEXTENCODING_UTF8,
true );
2229 ::osl::FileStatus aStatus( osl_FileStatus_Mask_FileURL );
2230 ::osl::DirectoryItem aItem;
2231 if( ::osl::FileBase::E_None == ::osl::DirectoryItem::get( aFileURL, aItem ) &&
2232 ::osl::FileBase::E_None == aItem.getFileStatus( aStatus ) )
2233 aFileURL = aStatus.getFileURL();
2250 Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
2254 Reference< css::frame::XFrame > xTask = xDesktop->getActiveFrame();
2258 Reference< css::container::XIndexAccess > xList = xDesktop->getFrames();
2259 if ( xList->getCount() > 0 )
2260 xList->getByIndex(0) >>= xTask;
2265 Reference< css::awt::XTopWindow > xTop( xTask->getContainerWindow(), UNO_QUERY );
2271 Reference< css::awt::XWindow > xContainerWindow;
2272 Reference< XFrame > xBackingFrame = xDesktop->findFrame(
"_blank", 0);
2273 if (xBackingFrame.is())
2274 xContainerWindow = xBackingFrame->getContainerWindow();
2275 if (xContainerWindow.is())
2277 Reference< XController > xStartModule = StartModule::createWithParentWindow(
xContext, xContainerWindow);
2278 Reference< css::awt::XWindow > xBackingWin(xStartModule, UNO_QUERY);
2282 xBackingFrame->setComponent(xBackingWin, xStartModule);
2283 xStartModule->attachFrame(xBackingFrame);
2284 xContainerWindow->setVisible(
true);
2288 pCompWindow->PaintImmediately();
2301 docsRequest.
aOpenList.end(), data.begin(), data.end());
2318 docsRequest.
aPrintList.end(), data.begin(), data.end());
2326 OSL_ENSURE( pD,
"no desktop ?!?" );
2339 Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
2340 css::office::Quickstart::createStart(
xContext,
true);
2349 Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
2356 aCommand.Complete =
".uno:OptionsTreeDialog";
2363 css::uno::Reference< css::frame::XDispatch >
xDispatch = xDesktop->queryDispatch(
aCommand, OUString(), 0);
2365 xDispatch->dispatch(
aCommand, css::uno::Sequence< css::beans::PropertyValue >());
2368 catch(
const css::uno::Exception&)
2378 SAL_WARN(
"desktop.app",
"this cannot happen");
2383#if !ENABLE_WASM_STRIP_SPLASH
2402 aAppName =
"writer";
2403 else if ( rCmdLine.
IsCalc() )
2405 else if ( rCmdLine.
IsDraw() )
2408 aAppName =
"impress";
2409 else if ( rCmdLine.
IsBase() )
2412 aAppName =
"global";
2413 else if ( rCmdLine.
IsMath() )
2415 else if ( rCmdLine.
IsWeb() )
2419 OUString aSplashService(
"com.sun.star.office.SplashScreen" );
2421 aSplashService =
"com.sun.star.office.PipeSplashScreen";
2423 Sequence< Any >
aSeq{
Any(
true) ,
Any(aAppName) };
2424 css::uno::Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
2426 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aSplashService,
aSeq,
xContext),
2437#if ENABLE_WASM_STRIP_SPLASH
2449#if ENABLE_WASM_STRIP_SPLASH
2461#if !ENABLE_WASM_STRIP_SPLASH
2477 Reference< XJobExecutor > xExecutor = theJobExecutor::get( ::comphelper::getProcessComponentContext() );
2478 xExecutor->trigger(
"onFirstRunInitialization" );
2480 catch(
const css::uno::Exception&)
2482 TOOLS_WARN_EXCEPTION(
"desktop.app",
"Desktop::DoFirstRunInitializations: caught an exception while trigger job executor" );
2494 if (progress !=
nullptr)
2498 Reference< XFrame > xBackingFrame = xDesktop->findFrame(
"_blank", 0);
2499 Reference< css::awt::XWindow > xContainerWindow;
2501 if (xBackingFrame.is())
2502 xContainerWindow = xBackingFrame->getContainerWindow();
2503 if (!xContainerWindow.is())
2510 SAL_WARN_IF( !pContainerWindow,
"desktop.app",
"Desktop::Main: no implementation access to the frame's container window!" );
2511 pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WindowExtendedStyle::Document );
2512 if (progress !=
nullptr)
2517 Reference< XController > xStartModule = StartModule::createWithParentWindow(
xContext, xContainerWindow);
2521 xBackingFrame->setComponent(Reference< XWindow >(xStartModule, UNO_QUERY), xStartModule);
2522 if (progress !=
nullptr)
2526 xStartModule->attachFrame(xBackingFrame);
2527 if (progress !=
nullptr)
2531 xContainerWindow->setVisible(
true);
2537 if (!officecfg::Office::Common::Misc::FirstRun::get())
2547 WCHAR szValue[8192];
2548 DWORD nValueSize =
sizeof(szValue);
2550 if (ERROR_SUCCESS == RegOpenKeyW(HKEY_LOCAL_MACHINE, o3tl::toW(sRootKey.getStr()), &hKey))
2552 if ( ERROR_SUCCESS == RegQueryValueExW( hKey, L
"RunQuickstartAtFirstStart",
nullptr,
nullptr,
reinterpret_cast<LPBYTE
>(szValue), &nValueSize ) )
2554 css::uno::Reference< css::uno::XComponentContext >
xContext = ::comphelper::getProcessComponentContext();
2555 css::office::Quickstart::createAutoStart(
xContext,
true,
true);
2556 RegCloseKey( hKey );
2561 std::shared_ptr< comphelper::ConfigurationChanges > batch(
2563 officecfg::Office::Common::Misc::FirstRun::set(
false, batch);
rtl::Reference< JVMloadThread > xJVMloadThread
std::unique_ptr< SvtCTLOptions > pCTLLanguageOptions
std::unique_ptr< SvtPathOptions > pPathOptions
Reference< css::document::XDocumentEventListener > xGlobalBroadcaster
SfxApplication * SfxGetpApp()
const MouseSettings & GetMouseSettings() const
const MiscSettings & GetMiscSettings() const
void SetMouseSettings(const MouseSettings &rSet)
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
OUString const & GetStringData() const
std::vector< OUString > const & GetStringsData() const
static sal_uInt16 GetCommandLineParamCount()
static bool IsOnSystemEventLoop()
static void SetDisplayName(const OUString &rDisplayName)
static OutputDevice * GetDefaultDevice()
static SystemWindowFlags GetSystemWindowMode()
static void Abort(const OUString &rErrorText)
static void SetSystemWindowMode(SystemWindowFlags nMode)
static void ShowNativeErrorBox(const OUString &sTitle, const OUString &sMessage)
static const AllSettings & GetSettings()
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void SetFilterHdl(const Link< ConvertData &, bool > &rLink)
static bool IsInExecute()
static bool IsSafeModeEnabled()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static bool AnyInput(VclInputFlags nType=VCL_INPUT_ANY)
static void EnableSafeMode()
static OUString GetCommandLineParam(sal_uInt16 nParam)
static bool IsHeadlessModeEnabled()
static void addKeyValue(SAL_UNUSED_PARAMETER const OUString &, SAL_UNUSED_PARAMETER const OUString &, SAL_UNUSED_PARAMETER tAddKeyHandling)
static GraphicFilter & GetGraphicFilter()
Link< ConvertData &, bool > GetFilterCallback() const
void run(bool storeResultBitmap=false)
virtual bool Start(const OUString &rHelpId, weld::Widget *pWidget=nullptr)
INetURLObject smartRel2Abs(OUString const &rTheRelURIRef, bool &rWasAbsolute, bool bIgnoreFragment=false, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs=false, FSysStyle eStyle=FSysStyle::Detect) const
bool SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
bool GetDisablePrinting() const
bool GetEnableATToolSupport() const
void SetFollow(MouseFollowFlags nFollow)
MouseFollowFlags GetFollow() const
static void GetOptions(SfxItemSet &)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
static void DetachAllDocBasicItems()
void SetContextMenuShortcuts(TriState eContextMenuShortcuts)
void SetUseImagesInMenus(TriState eUseImagesInMenus)
DragFullOptions GetDragFullOptions() const
void SetDragFullOptions(DragFullOptions nOptions)
static void SetVCLSettings()
bool IsModuleInstalled(EModule eModule) const
OUString GetFactoryEmptyDocumentURL(EFactory eFactory) const
const OUString & GetFactoryName(EFactory eFactory) const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
static void removeUpdateFiles()
static void log(const OUString &rMessage)
static OUString getUpdateFileURL()
static OUString getBuildID()
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
static void reactOnSafeMode(bool bSafeMode)
void tryPushExtensionInfo()
static void setExitWasCalled()
static std::shared_ptr< ConfigurationChanges > create()
static ThreadPool & getSharedOptimalPool()
bool HasSplashPipe() const
std::vector< OUString > GetForceNewList() const
bool IsTerminateAfterInit() const
std::vector< OUString > GetConversionList() const
bool IsNoLockcheck() const
const OUString & GetPrinterName() const
OUString const & GetImageConversionType() const
OUString GetConversionOut() const
std::vector< OUString > GetViewList() const
std::vector< OUString > GetStartList() const
std::vector< OUString > GetPrintList() const
std::vector< OUString > GetForceOpenList() const
const OUString & GetUnknown() const
bool HasModuleParam() const
bool IsQuickstart() const
const std::optional< OUString > & getCwdUrl() const
std::vector< OUString > GetPrintToList() const
std::vector< OUString > GetOpenList() const
bool IsNoQuickstart() const
bool WantsToLoadDocument() const
bool IsHelpWriter() const
std::vector< OUString > const & GetInFilter() const
const OUString & GetPidfileName() const
bool IsHelpImpress() const
const OUString & GetConversionParams() const
static bool CheckExtensionDependencies()
static void RemoveTemporaryDirectory()
static void DeregisterServices()
static void destroyAcceptor(const OUString &aDescription)
static void CheckOpenCLCompute(const css::uno::Reference< css::frame::XDesktop2 > &)
BootstrapError m_aBootstrapError
static void FlushConfiguration()
static void InitApplicationServiceManager()
static bool InitializeQuickstartMode(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
BootstrapStatus GetBootstrapStatus() const
virtual void InitFinished() override
virtual bool QueryExit() override
OUString m_aBootstrapErrorMessage
css::uno::Reference< css::task::XStatusIndicator > m_rSplashScreen
static void createAcceptor(const OUString &aDescription)
virtual void OverrideSystemSettings(AllSettings &rSettings) override
bool m_bCleanedExtensionCache
static void HandleAppEvent(const ApplicationEvent &rAppEvent)
@ BE_USERINSTALL_NOWRITEACCESS
@ BE_UNO_SERVICE_CONFIG_MISSING
@ BE_USERINSTALL_NOTENOUGHDISKSPACE
static void SynchronizeExtensionRepositories(bool bCleanedExtensionCache, Desktop *pDesktop=nullptr)
static void OpenDefault()
static void OpenClients()
virtual void AppEvent(const ApplicationEvent &rAppEvent) override
void CheckFirstRun()
checks if the office is run the first time
void SetBootstrapError(BootstrapError nError, OUString const &aMessage)
static CommandLineArgs & GetCommandLineArgs()
static void HandleBootstrapErrors(BootstrapError nError, OUString const &aMessage)
static OUString CreateErrorMsgString(utl::Bootstrap::FailureCode nFailureCode, const OUString &aFileURL)
virtual void Init() override
static bool InitializeConfiguration()
void SetSplashScreenText(const OUString &rText)
virtual void Exception(ExceptionCategory nCategory) override
virtual ~Desktop() override
std::thread m_aUpdateThread
static void ShowBackingComponent(Desktop *progress)
std::unique_ptr< Lockfile > m_xLockfile
void SetSplashScreenProgress(sal_Int32)
virtual void DeInit() override
virtual int Main() override
static void HandleBootstrapPathErrors(::utl::Bootstrap::Status, std::u16string_view aMsg)
virtual void Shutdown() override
void SetBootstrapStatus(BootstrapStatus nStatus)
static void migrateSettingsIfNecessary()
static void EnableRequests()
static Status Enable(bool ipc)
static void SetReady(bool bIsReady)
static bool ExecuteCmdLineRequests(ProcessDocumentsRequest &, bool noTerminate)
@ IPC_STATUS_BOOTSTRAP_ERROR
static bool removeRestartFlag()
static bool hasRestartFlag()
static PathStatus locateVersionFile(OUString &_rURL)
static PathStatus locateUserInstallation(OUString &_rURL)
static Status checkBootstrapStatus(OUString &_rDiagnosticMessage, FailureCode &_rErrCode)
static OUString getProductKey()
MISSING_VERSION_FILE_ENTRY
INVALID_BOOTSTRAP_FILE_ENTRY
static OUString getBuildIdData(OUString const &_sDefault)
static PathStatus locateBootstrapFile(OUString &_rURL)
static OUString getProductVersion()
static void storeConfigItems()
static OUString getUILocale()
static OUString getAboutBoxProductVersionSuffix()
static OUString getProductExtension()
static OUString getAboutBoxProductVersion()
static OUString getVendor()
static OUString getProductName()
#define SAL_CONFIGFILE(name)
#define TOOLS_WARN_EXCEPTION(area, stream)
Reference< XDispatch > xDispatch
OUString DpResId(TranslateId aId)
@ EXITHELPER_NORMAL_RESTART
@ EXITHELPER_CRASH_WITH_RESTART
Reference< XMultiServiceFactory > xSMgr
static uno::Reference< css::uno::XComponentContext > xContext
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
SVT_DLLPUBLIC void SetApplicationDefaults(Application *pApp)
SVT_DLLPUBLIC void SetInitialized()
SVT_DLLPUBLIC bool IsInitialized()
void SetReadStringHook(ResHookProc pProc)
COMPHELPER_DLLPUBLIC bool isFileUrl(std::u16string_view url)
Reference< XMultiServiceFactory > getProcessServiceFactory()
Reference< XComponentContext > getProcessComponentContext()
IMPL_LINK_NOARG(Desktop, OpenClients_Impl, void *, void)
OUString GetURL_Impl(const OUString &rName, std::optional< OUString > const &cwdUrl)
IMPL_STATIC_LINK_NOARG(Desktop, AsyncInitFirstRun, Timer *, void)
OUString ReplaceStringHookProc(const OUString &rStr)
bool Lockfile_execWarning(Lockfile const *that)
static ExecuteGlobals * pExecGlobals
static oslSignalHandler pSignalHandler
IMPL_STATIC_LINK(Desktop, ImplInitFilterHdl, ::ConvertData &, rData, bool)
oslSignalAction SalMainPipeExchangeSignal_impl(SAL_UNUSED_PARAMETER void *, oslSignalInfo *pInfo)
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
SFX2_DLLPUBLIC void removeTemporaryHtmlDirectory()
FWK_DLLPUBLIC const rtl::Reference< Desktop > & getDesktop(css::uno::Reference< css::uno::XComponentContext > const &context)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
UNOTOOLS_DLLPUBLIC bool Kill(OUString const &url)
static bool isProductVersionUpgraded(bool aUpdateVersion)
void removeTree(OUString const &url)
VCL_DLLPUBLIC void CheckFileExtRegistration(weld::Window *pDialogParent)
constexpr OUStringLiteral RID_APPTITLE
std::vector< OUString > aPrintToList
OUString aConversionParams
std::vector< OUString > aPrintList
std::vector< OUString > aConversionList
std::vector< OUString > aViewList
std::vector< OUString > aOpenList
OUString aImageConversionType
std::vector< OUString > aStartList
std::vector< OUString > aInFilter
std::vector< OUString > aForceNewList
std::vector< OUString > aForceOpenList
VCL_DLLPUBLIC Application * GetpApp()
VCL_DLLPUBLIC bool InitAccessBridge()
std::unique_ptr< char[]> aBuffer