summaryrefslogtreecommitdiff
path: root/desktop/source/app
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-07-08 07:29:44 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-07-08 07:29:44 +0000
commitf764f65c016534c3a9db32e0ef6d66da1545c633 (patch)
tree5977cce68f0bde411cbdab06b6fecc2a32685323 /desktop/source/app
parentdcb9b228d4543e9822593d984c812511ca0503bf (diff)
INTEGRATION: CWS fwk90 (1.221.12); FILE MERGED
2008/06/13 06:02:34 mav 1.221.12.2: RESYNC: (1.221-1.222); FILE MERGED 2008/05/30 09:53:06 as 1.221.12.1: #156532# use native messagebox an call exit to prevent office from any action during/after FatalError
Diffstat (limited to 'desktop/source/app')
-rw-r--r--desktop/source/app/app.cxx39
1 files changed, 27 insertions, 12 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 09c1862a57..089e3b8c1a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: app.cxx,v $
- * $Revision: 1.222 $
+ * $Revision: 1.223 $
*
* This file is part of OpenOffice.org.
*
@@ -293,23 +293,38 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
return aDiagnosticMessage.makeStringAndClear();
}
-void FatalError(OUString const & aMessage)
+//=============================================================================
+// shows a simple error box with the given message ... but exits from these process !
+//
+// Fatal errors cant be solved by the process ... nor any recovery can help.
+// Mostly the installation was damaged and must be repaired manually .. or by calling
+// setup again.
+//
+// On the other side we must make sure that no further actions will be possible within
+// the current office process ! No pipe requests, no menu/toolbar/shortuct actions
+// 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 ::rtl::OUString& sMessage)
{
- OUString aProductKey = ::utl::Bootstrap::getProductKey();
-
- if (!aProductKey.getLength())
+ ::rtl::OUString sProductKey = ::utl::Bootstrap::getProductKey();
+ if ( ! sProductKey.getLength())
{
::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( aProductKey );
+ aInfo.getExecutableFile( sProductKey );
- sal_uInt32 lastIndex = aProductKey.lastIndexOf('/');
- if ( lastIndex > 0 )
- aProductKey = aProductKey.copy( lastIndex+1 );
+ ::sal_uInt32 nLastIndex = sProductKey.lastIndexOf('/');
+ if ( nLastIndex > 0 )
+ sProductKey = sProductKey.copy( nLastIndex+1 );
}
- ErrorBox aBootstrapFailedBox( NULL, WB_OK, aMessage );
- aBootstrapFailedBox.SetText( aProductKey );
- aBootstrapFailedBox.Execute();
+ ::rtl::OUStringBuffer sTitle (128);
+ sTitle.append (sProductKey );
+ sTitle.appendAscii (" - Fatal Error");
+
+ Application::ShowNativeErrorBox (sTitle.makeStringAndClear (), sMessage);
+ _exit(ExitHelper::E_FATAL_ERROR);
}
static bool ShouldSuppressUI(CommandLineArgs* pCmdLine)