From 9192e85076f99772884393e4cc2aa9b663b2e43f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 8 Feb 2017 10:58:47 +0000 Subject: move the extra data of ERRCODE_SFXMSG_STYLEREPLACE out of the .src Change-Id: I5c39d785d1f2a78e1fcfcd763deac60f047a5e4b --- svtools/source/misc/ehdl.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'svtools') diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 577953b62ebc..ea1a7d837b77 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -271,7 +271,6 @@ void SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr) } } - bool SfxErrorHandler::GetErrorString( sal_uLong lErrId, OUString &rStr, sal_uInt16 &nFlags) const @@ -295,9 +294,9 @@ bool SfxErrorHandler::GetErrorString( { ResString aErrorString(aEr.GetResString()); - sal_uInt16 nResFlags = aErrorString.GetFlags(); - if ( nResFlags ) - nFlags = nResFlags; + if (lErrId == ERRCODE_SFXMSG_STYLEREPLACE) + nFlags = ERRCODE_MSG_ERROR | ERRCODE_BUTTON_OK_CANCEL; + rStr = rStr.replaceAll("$(ERROR)", aErrorString.GetString()); bRet = true; } @@ -318,7 +317,6 @@ bool SfxErrorHandler::GetErrorString( return bRet; } - SfxErrorContext::SfxErrorContext( sal_uInt16 nCtxIdP, vcl::Window *pWindow, sal_uInt16 nResIdP, ResMgr *pMgrP) : ErrorContext(pWindow), nCtxId(nCtxIdP), nResId(nResIdP), pMgr(pMgrP) -- cgit