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(-)

New commits:
commit 93388cca19810b41cb45b3770dd6212345e65a14
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 10 19:56:48 2021 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Dec 10 22:49:12 2021 +0100

    cid#1485150 suppress Uncaught exception
    
    Change-Id: I3baac0b02a3d1eef150cb78873ffbee51282b0db
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126654
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

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 <editeng/editstat.hxx>
 #include <editeng/outlobj.hxx>
 #include <editeng/unotext.hxx>
+#include <o3tl/deleter.hxx>
 #include <svl/itemiter.hxx>
 #include <svl/style.hxx>
 #include <svl/whiter.hxx>
@@ -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<SwContentFrame*>(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());

Reply via email to