summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-06 00:51:01 +0200
committerTor Lillqvist <tml@iki.fi>2013-02-06 00:57:26 +0200
commite98861f1aee28474318b5c3b14fb936fdcbbe053 (patch)
treea13130821dd22f8e42fa446eef226438b4a0f32b
parent9ebf144c3e4474c5b450fbf4b1b62ff9439e9435 (diff)
The resstart crack causes a crash when running sandboxed on OS X
I doubt any other app would intentionally do such a restart trick, so it isn't surprising that the app sandbox designers have not taken such a possibility into account. So instead of crashing, display a dialog informing the user that LO must be restarted manually once after installation (or after being updated, presumably). Change-Id: I0e6ea8384fe5a9b3a8b3ddb07743374a4c2300cd
-rw-r--r--desktop/source/app/app.cxx9
-rw-r--r--desktop/source/app/desktop.hrc1
-rw-r--r--desktop/source/app/desktop.src5
3 files changed, 15 insertions, 0 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 0f239d1a6485..6a355dcda25c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1161,6 +1161,14 @@ namespace {
void restartOnMac(bool passArguments) {
#if defined MACOSX
OfficeIPCThread::DisableOfficeIPCThread();
+#ifdef ENABLE_MACOSX_SANDBOX
+ (void) passArguments; // avoid warnings
+ ResMgr *resMgr = Desktop::GetDesktopResManager();
+ OUString aMessage = OUString( String( ResId( STR_LO_MUST_BE_RESTARTED, *resMgr )));
+
+ ErrorBox aRestartBox( NULL, WB_OK, aMessage );
+ aRestartBox.Execute();
+#else
rtl::OUString execUrl;
OSL_VERIFY(osl_getExecutableFile(&execUrl.pData) == osl_Process_E_None);
rtl::OUString execPath;
@@ -1223,6 +1231,7 @@ void restartOnMac(bool passArguments) {
}
}
std::abort();
+#endif
#else
(void) passArguments; // avoid warnings
#endif
diff --git a/desktop/source/app/desktop.hrc b/desktop/source/app/desktop.hrc
index 5551db8c2c80..7321fc659352 100644
--- a/desktop/source/app/desktop.hrc
+++ b/desktop/source/app/desktop.hrc
@@ -58,6 +58,7 @@
#define STR_ASK_START_SETUP_MANUALLY (RID_DESKTOP_STRING_START+152)
#define STR_INTERNAL_ERRMSG (RID_DESKTOP_STRING_START+161)
+#define STR_LO_MUST_BE_RESTARTED (RID_DESKTOP_STRING_START+162)
#define STR_CONFIG_ERR_SETTINGS_INCOMPLETE (RID_DESKTOP_STRING_START+182)
#define STR_CONFIG_ERR_CANNOT_CONNECT (RID_DESKTOP_STRING_START+183)
diff --git a/desktop/source/app/desktop.src b/desktop/source/app/desktop.src
index 7519e8087edc..35d56c944a68 100644
--- a/desktop/source/app/desktop.src
+++ b/desktop/source/app/desktop.src
@@ -124,6 +124,11 @@ String STR_INTERNAL_ERRMSG
Text [ en-US ] = "The following internal error has occurred: " ;
};
+String STR_LO_MUST_BE_RESTARTED
+{
+ Text [ en-US ] = "LibreOffice must unfortunately be manually restarted once after installation or update." ;
+};
+
QueryBox QBX_USERDATALOCKED
{
Buttons = WB_YES_NO ;