[Libreoffice-commits] core.git: 2 commits - desktop/source solenv/gbuild
Tor Lillqvist
tml at iki.fi
Tue Feb 5 14:57:57 PST 2013
desktop/source/app/app.cxx | 9 +++++++++
desktop/source/app/desktop.hrc | 1 +
desktop/source/app/desktop.src | 5 +++++
solenv/gbuild/gbuild.mk | 1 +
4 files changed, 16 insertions(+)
New commits:
commit e98861f1aee28474318b5c3b14fb936fdcbbe053
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Feb 6 00:51:01 2013 +0200
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
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 0f239d1..6a355dc 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 5551db8..7321fc6 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 7519e80..35d56c9 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 ;
commit 9ebf144c3e4474c5b450fbf4b1b62ff9439e9435
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Feb 6 00:49:47 2013 +0200
Propagate also ENABLE_MACOSX_SANDBOX to compilations
Change-Id: I6250ec56c7b6d8f1da94b98e494f483c4076844c
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index c8aeba2..090f5c3 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -266,6 +266,7 @@ gb_GLOBALDEFS += \
DISABLE_EXPORT \
DISABLE_EXTENSIONS \
DISABLE_SCRIPTING \
+ ENABLE_MACOSX_SANDBOX \
ENABLE_READONLY_INSTALLSET \
)
More information about the Libreoffice-commits
mailing list