diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2007-04-19 08:23:27 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2007-04-19 08:23:27 +0000 |
commit | 3fde2d6b2b802c445748121024e9286f30ae8092 (patch) | |
tree | 1e60874761b85f4fb0689f55074c70fae238caa8 /uui/source/iahndl.cxx | |
parent | bfa103003a9208af8cb683a11e7232d585e912f9 (diff) |
INTEGRATION: CWS fwk64 (1.56.10); FILE MERGED
2007/03/27 08:36:02 mav 1.56.10.2: adopt for linux
2007/03/26 15:08:08 mav 1.56.10.1: #i69640# fix some errors and warnings, let them be handled by interaction handler
Diffstat (limited to 'uui/source/iahndl.cxx')
-rw-r--r-- | uui/source/iahndl.cxx | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 7012ca023fc1..c74e96041b0b 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: iahndl.cxx,v $ * - * $Revision: 1.56 $ + * $Revision: 1.57 $ * - * last change: $Author: obo $ $Date: 2007-01-23 08:08:52 $ + * last change: $Author: ihi $ $Date: 2007-04-19 09:23:27 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -99,6 +99,7 @@ #include "svtools/svtools.hrc" #include "svtools/loginerr.hxx" #include "svtools/httpcook.hxx" +#include "svtools/sfxecode.hxx" #include "toolkit/helper/vclunohelper.hxx" #include "comphelper/sequenceashashmap.hxx" #include "unotools/configmgr.hxx" @@ -2264,11 +2265,40 @@ UUIInteractionHelper::handleGenericErrorRequest( } // Note: It's important to convert the transported long to the - // required unsigned long value. Otherwhise using as flag field + // required unsigned long value. Otherwhise using as flag field // can fail ... ErrCode nError = (ErrCode)nErrorCode; sal_Bool bWarning = !ERRCODE_TOERROR(nError); - ErrorHandler::HandleError(nErrorCode); + + if ( (ErrCode)nErrorCode == ERRCODE_SFX_BROKENSIGNATURE ) + { + // the broken signature warning needs a special title + String aErrorString; + ErrorHandler::GetErrorString( nErrorCode, aErrorString ); + + + std::auto_ptr< ResMgr > + xManager( ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) ); + ::rtl::OUString aTitle; + + try + { + star::uno::Any aProductNameAny = + ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( + ::utl::ConfigManager::PRODUCTNAME ); + aProductNameAny >>= aTitle; + } catch( star::uno::Exception& ) + {} + + ::rtl::OUString aErrTitle = String( ResId( STR_WARNING_BROKENSIGNATURE_TITLE, xManager.get() ) ); + if ( aTitle.getLength() && aErrTitle.getLength() ) + aTitle += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " - " ) ); + aTitle += aErrTitle; + + executeMessageBox( aTitle, aErrorString, WB_OK ); + } + else + ErrorHandler::HandleError(nErrorCode); if (xApprove.is() && bWarning) xApprove->select(); |