summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-10-11 08:15:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-11 08:43:33 +0000
commitd0304a8f57b3fe0065193a2a3f7089f414b1ffd9 (patch)
tree6ac18f078dc91b56ae7db204028c15089113339c /svtools
parent52dfb06b194bf890510352a98540c64bc3d44b70 (diff)
remove some conversion operator methods
which, in these cases, only serve to make the code harder to read Change-Id: Ic9bcf42545b4fcfd60a535fb63956092d392f469 Reviewed-on: https://gerrit.libreoffice.org/29685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/ehdl.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 3f6e282621b4..60fde45acf6a 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -243,8 +243,8 @@ struct ErrorResource_Impl : private Resource
~ErrorResource_Impl() { FreeResource(); }
- operator ResString() { return ResString( aResId ); }
- operator bool() { return IsAvailableRes(aResId.SetRT(RSC_STRING)); }
+ ResString GetResString() { return ResString( aResId ); }
+ operator bool() { return IsAvailableRes(aResId.SetRT(RSC_STRING)); }
};
@@ -266,7 +266,7 @@ void SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr)
ErrorResource_Impl aEr(aId, (sal_uInt16)lClassId);
if(aEr)
{
- rStr = static_cast<ResString>(aEr).GetString();
+ rStr = aEr.GetResString().GetString();
}
}
}
@@ -293,7 +293,7 @@ bool SfxErrorHandler::GetErrorString(
ErrorResource_Impl aEr(aResId, (sal_uInt16)lErrId);
if(aEr)
{
- ResString aErrorString(aEr);
+ ResString aErrorString(aEr.GetResString());
sal_uInt16 nResFlags = aErrorString.GetFlags();
if ( nResFlags )
@@ -362,7 +362,7 @@ bool SfxErrorContext::GetString(sal_uLong nErrId, OUString &rStr)
ErrorResource_Impl aTestEr( aResId, nCtxId );
if ( aTestEr )
{
- rStr = static_cast<ResString>(aTestEr).GetString();
+ rStr = aTestEr.GetResString().GetString();
rStr = rStr.replaceAll("$(ARG1)", aArg1);
bRet = true;
}
@@ -377,7 +377,7 @@ bool SfxErrorContext::GetString(sal_uLong nErrId, OUString &rStr)
sal_uInt16 nId = ( nErrId & ERRCODE_WARNING_MASK ) ? ERRCTX_WARNING : ERRCTX_ERROR;
ResId aSfxResId( RID_ERRCTX, *pMgr );
ErrorResource_Impl aEr( aSfxResId, nId );
- rStr = rStr.replaceAll("$(ERR)", static_cast<ResString>(aEr).GetString());
+ rStr = rStr.replaceAll("$(ERR)", aEr.GetResString().GetString());
}
}