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:
parent
26e6d1abc8
commit
6c1aa68d76
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user