diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-08 11:14:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-08 12:18:41 +0000 |
commit | ff82f13b6837b034987cd6fd26de136071cee0c5 (patch) | |
tree | b7d525e29338543c12c438cc53a05fcd2c4b1a67 /svtools/source | |
parent | 9192e85076f99772884393e4cc2aa9b663b2e43f (diff) |
drop unused error strings
includes ERRCODE_SFXMSG_STYLEREPLACE
which has the knock on effect that the flags argument
can be removed from a bunch of methods
Change-Id: I72b58bc2a19376bb4609e61aa44e71f734efb333
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/misc/ehdl.cxx | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index ea1a7d837b77..4285b63d7168 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -161,8 +161,7 @@ SfxErrorHandler::~SfxErrorHandler() } -bool SfxErrorHandler::CreateString( - const ErrorInfo *pErr, OUString &rStr, sal_uInt16& nFlags) const +bool SfxErrorHandler::CreateString(const ErrorInfo *pErr, OUString &rStr) const /* [Description] @@ -174,7 +173,7 @@ bool SfxErrorHandler::CreateString( sal_uLong nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK; if( nErrCode>=lEnd || nErrCode<=lStart ) return false; - if(GetErrorString(nErrCode, rStr, nFlags)) + if(GetErrorString(nErrCode, rStr)) { const StringErrorInfo *pStringInfo = dynamic_cast<const StringErrorInfo *>(pErr); if(pStringInfo) @@ -195,38 +194,30 @@ bool SfxErrorHandler::CreateString( return false; } - class ResString: public OUString - /* [Description] Helpclass to read a string and optional ExtraData from a string Resource. */ - { - sal_uInt16 nFlags; public: - sal_uInt16 GetFlags() const {return nFlags;} const OUString & GetString() const {return *this;} explicit ResString( ResId &rId); }; - -ResString::ResString(ResId & rId): - OUString(rId.SetAutoRelease(false).toString()), - nFlags(0) +ResString::ResString(ResId & rId) + : OUString(rId.SetAutoRelease(false).toString()) { ResMgr * pResMgr = rId.GetResMgr(); // String ctor temporarily sets global ResManager if (pResMgr->GetRemainSize()) - nFlags = sal_uInt16(pResMgr->ReadShort()); + (void)pResMgr->ReadShort(); rId.SetAutoRelease(true); pResMgr->PopContext(); } - struct ErrorResource_Impl : private Resource /* [Description] @@ -235,7 +226,6 @@ struct ErrorResource_Impl : private Resource */ { - ResId aResId; ErrorResource_Impl(ResId& rErrIdP, sal_uInt16 nId) @@ -248,7 +238,6 @@ struct ErrorResource_Impl : private Resource }; - void SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr) /* [Description] @@ -271,8 +260,7 @@ void SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr) } } -bool SfxErrorHandler::GetErrorString( - sal_uLong lErrId, OUString &rStr, sal_uInt16 &nFlags) const +bool SfxErrorHandler::GetErrorString(sal_uLong lErrId, OUString &rStr) const /* [Description] @@ -293,10 +281,6 @@ bool SfxErrorHandler::GetErrorString( if(aEr) { ResString aErrorString(aEr.GetResString()); - - if (lErrId == ERRCODE_SFXMSG_STYLEREPLACE) - nFlags = ERRCODE_MSG_ERROR | ERRCODE_BUTTON_OK_CANCEL; - rStr = rStr.replaceAll("$(ERROR)", aErrorString.GetString()); bRet = true; } |