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