summaryrefslogtreecommitdiff
path: root/desktop/source/app/app.cxx
diff options
context:
space:
mode:
authorJürgen Schmidt <jsc@apache.org>2012-07-19 13:55:30 +0000
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-30 16:01:30 +0200
commitb218cbf59de4d7ae0a6962995fb0f719ed68b5d2 (patch)
tree12a01e6dfc9f8f1470a4ad14006caa05f7398ef7 /desktop/source/app/app.cxx
parentab29ad8cd537cd77d4124801b714c75062e1e5dd (diff)
Fixing i#119950 warn about other running terminal sessions
introduce new warning message box to inform about further running terminal sessions Patch By: Juan Li Review By: Jina Fang Zheng, jsc (cherry picked from commit 208b788dd4afc0559eb26c6e20a59548be0d993e) Conflicts: desktop/source/app/app.cxx desktop/source/app/officeipcthread.cxx desktop/source/app/officeipcthread.hxx Change-Id: Icd858adaa0d2400eecba3c61c91e0c6fdb6d6af7
Diffstat (limited to 'desktop/source/app/app.cxx')
-rw-r--r--desktop/source/app/app.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 96e244dc208e..ba90725abab0 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -415,7 +415,10 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
// are allowed. Otherwise we will force a "crash inside a crash".
// Thats why we have to use a special native message box here which does not use yield :-)
//=============================================================================
-void FatalError(const OUString& sMessage)
+
+// #i119950# Add a option that not to display the "Fatal Error" on dialog title
+void FatalError(const OUString& sMessage, const bool isDisplayErrorString = true);
+void FatalError(const OUString& sMessage, const bool isDisplayErrorString)
{
OUString sProductKey = ::utl::Bootstrap::getProductKey();
if ( sProductKey.isEmpty())
@@ -429,8 +432,9 @@ void FatalError(const OUString& sMessage)
OUStringBuffer sTitle (128);
sTitle.append (sProductKey );
- sTitle.appendAscii (" - Fatal Error");
-
+ if (isDisplayErrorString) {
+ sTitle.appendAscii (" - Fatal Error");
+ }
Application::ShowNativeErrorBox (sTitle.makeStringAndClear (), sMessage);
_exit(EXITHELPER_FATAL_ERROR);
}
@@ -622,6 +626,10 @@ void Desktop::Init()
{
SetBootstrapError( BE_PATHINFO_MISSING, OUString() );
}
+ else if ( aStatus == OfficeIPCThread::IPC_STATUS_MULTI_TS_ERROR )
+ {
+ SetBootstrapError( BE_MULTISESSION_NOT_SUPPORTED, OUString() );
+ }
else if ( aStatus == OfficeIPCThread::IPC_STATUS_2ND_OFFICE )
{
// 2nd office startup should terminate after sending cmdlineargs through pipe
@@ -848,7 +856,13 @@ OUString Desktop::CreateErrorMsgString(
void Desktop::HandleBootstrapErrors(
BootstrapError aBootstrapError, OUString const & aErrorMessage )
{
- if ( aBootstrapError == BE_PATHINFO_MISSING )
+ if ( aBootstrapError == BE_MULTISESSION_NOT_SUPPORTED ) {
+ OUString aMessage;
+ aMessage = GetMsgString( STR_BOOTSTRAP_ERR_MULTISESSION,
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "You have another instance running in a different terminal session. Close that instance and then try again." )) );
+ FatalError(aMessage,sal_False);
+
+ } else if ( aBootstrapError == BE_PATHINFO_MISSING )
{
OUString aErrorMsg;
OUString aBuffer;