diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-08-09 17:09:53 +0200 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-08-09 17:09:53 +0200 |
commit | 9c3d0de22682058f525c69e2caca7a9fbace452a (patch) | |
tree | db6af67306053a52a7d0505dbde7464e6e829a84 | |
parent | fb51494aaa2e361ec036b81d59b620324eb25c7e (diff) |
vcl114: #i113753# fix ResId assertion
-rw-r--r-- | svtools/source/java/javainteractionhandler.cxx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index ec34ed07f25d..2d1112d54d49 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -150,20 +150,25 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque //We first try to get the patch resource svp680xxx.res //If the resource is not found then svt680xxx.res is used ResId idWBX = SvtResId(WARNINGBOX_JAVANOTFOUND); - SvpResId pidPatchWBX(WARNINGBOX_JAVANOTFOUND); - pidPatchWBX.SetRT(RSC_WARNINGBOX); - ResMgr *pMgrWB = pidPatchWBX.GetResMgr(); - if (pMgrWB && pMgrWB->IsAvailable(pidPatchWBX)) - idWBX = pidPatchWBX; + ResMgr* pPatchMgr = ImpSvtData::GetSvtData().GetPatchResMgr(); + if( pPatchMgr ) + { + ResId pidPatchWBX(WARNINGBOX_JAVANOTFOUND, *pPatchMgr); + pidPatchWBX.SetRT(RSC_WARNINGBOX); + if ( pPatchMgr->IsAvailable(pidPatchWBX)) + idWBX = pidPatchWBX; + } WarningBox aWarningBox( NULL, idWBX); String aTitle; - SvpResId pidString(STR_WARNING_JAVANOTFOUND); - pidString.SetRT(RSC_STRING); - ResMgr *pmgr = pidString.GetResMgr(); - if ( pmgr && pmgr->IsAvailable(pidString)) - aTitle = String(pidString); - else + if( pPatchMgr ) + { + ResId pidString(STR_WARNING_JAVANOTFOUND, *pPatchMgr); + pidString.SetRT(RSC_STRING); + if( pPatchMgr->IsAvailable(pidString)) + aTitle = String(pidString); + } + if( ! aTitle.Len() ) aTitle = String( SvtResId( STR_WARNING_JAVANOTFOUND )); aWarningBox.SetText( aTitle ); |