From 93388cca19810b41cb45b3770dd6212345e65a14 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 10 Dec 2021 19:56:48 +0000 Subject: cid#1485150 suppress Uncaught exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3baac0b02a3d1eef150cb78873ffbee51282b0db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126654 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svx/source/svdraw/svdedxv.cxx | 3 ++- sw/source/core/inc/frmtool.hxx | 5 ++++- sw/source/core/layout/frmtool.cxx | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f046fb185057..6ba72c1c09f1 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -91,7 +92,7 @@ SdrObjEditView::~SdrObjEditView() mpTextEditWin = nullptr; // so there's no ShowCursor in SdrEndTextEdit assert(!IsTextEdit()); if (IsTextEdit()) - SdrEndTextEdit(); + suppress_fun_call_w_exception(SdrEndTextEdit()); mpTextEditOutliner.reset(); assert(nullptr == mpOldTextEditUndoManager); // should have been reset } diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 29eec3495080..872944a75a50 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -224,6 +224,9 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl = false ); // the necessary notifications in their destructor if needed class SwFrameNotify { +private: + void ImplDestroy(); + protected: SwFrame *mpFrame; const SwRect maFrame; @@ -236,7 +239,7 @@ protected: public: SwFrameNotify( SwFrame *pFrame ); - ~SwFrameNotify() COVERITY_NOEXCEPT_FALSE; + ~SwFrameNotify(); const SwRect &getFrameArea() const { return maFrame; } void SetInvaKeep() { mbInvaKeep = true; } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 6872360d646c..3f92694ff7a6 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -125,7 +125,12 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) : mbHadFollow = pF->IsContentFrame() && static_cast(pF)->GetFollow(); } -SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE +SwFrameNotify::~SwFrameNotify() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + +void SwFrameNotify::ImplDestroy() { SwRectFnSet aRectFnSet(mpFrame); const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->getFrameArea()); -- cgit