From b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 6 Feb 2017 16:02:12 +0200 Subject: remove ugly operator* in DynamicErrorInfo I can see why you'd want to hide this horrible tunnelling of information with objects registering themselves in a global list. Urrgh. Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095 Reviewed-on: https://gerrit.libreoffice.org/33984 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/filter/xml/sdxmlwrp.cxx | 8 ++++---- sd/source/ui/func/fuinsert.cxx | 3 +-- sd/source/ui/view/viewshe2.cxx | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index f91acb54cf80..d79ff01c3048 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -245,17 +245,17 @@ sal_Int32 ReadThroughComponent( if (!rStreamName.isEmpty()) { - return *new TwoStringErrorInfo( + return (new TwoStringErrorInfo( (bMustBeSuccessfull ? ERR_FORMAT_FILE_ROWCOL : WARN_FORMAT_FILE_ROWCOL), rStreamName, sErr, - ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); + ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ))->GetErrorCode(); } else { DBG_ASSERT( bMustBeSuccessfull, "Warnings are not supported" ); - return *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr, - ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ); + return (new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr, + ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ))->GetErrorCode(); } } catch (const xml::sax::SAXException& r) diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index f91f0663ff81..e9155f7e5d80 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -452,8 +452,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) } else { - ErrorHandler::HandleError(* new StringErrorInfo(ERRCODE_SFX_OLEGENERAL, - "" ) ); + ErrorHandler::HandleError( (new StringErrorInfo(ERRCODE_SFX_OLEGENERAL, ""))->GetErrorCode() ); } } else diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 82b529e869d3..b0f37020460a 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -864,7 +864,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) if (aErrCode != 0 && !bAbort) { - ErrorHandler::HandleError(* new StringErrorInfo(aErrCode, OUString() ) ); + ErrorHandler::HandleError( (new StringErrorInfo(aErrCode, ""))->GetErrorCode() ); } return aErrCode == 0; -- cgit