impress181: #i97966#: fixed resource problem, now the error message is notifying a read error instead of "Move background page assignment" when trying to load an encrypted PPT document

This commit is contained in:
sj 2009-12-08 18:05:50 +01:00
parent 26e6d1abc8
commit 6c1aa68d76

View File

@ -321,16 +321,21 @@ BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
*/
{
ResId aId(RID_ERRHDL, *pMgr);
ErrorResource_Impl aEr(aId, (USHORT)lClassId);
if(aEr)
BOOL bRet = FALSE;
com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILocale() );
ResMgr* pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
if( pResMgr )
{
rStr=((ResString)aEr).GetString();
return TRUE;
ResId aId(RID_ERRHDL, *pResMgr );
ErrorResource_Impl aEr(aId, (USHORT)lClassId);
if(aEr)
{
rStr=((ResString)aEr).GetString();
bRet = TRUE;
}
}
else
return FALSE;
delete pResMgr;
return bRet;
}
//-------------------------------------------------------------------------
@ -379,10 +384,10 @@ BOOL SfxErrorHandler::GetErrorString(
BOOL bRet = FALSE;
rStr=String(SvtResId(RID_ERRHDL_CLASS));
ResId *pResId = new ResId(nId, *pMgr);
ResId aResId(nId, *pMgr);
{
ErrorResource_Impl aEr(*pResId, (USHORT)lErrId);
ErrorResource_Impl aEr(aResId, (USHORT)lErrId);
if(aEr)
{
ResString aErrorString(aEr);
@ -408,7 +413,6 @@ BOOL SfxErrorHandler::GetErrorString(
rStr.SearchAndReplace(String::CreateFromAscii( "$(CLASS)" ),aErrStr);
}
delete pResId;
return bRet;
}