summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-10 19:56:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-10 22:49:12 +0100
commit93388cca19810b41cb45b3770dd6212345e65a14 (patch)
treea4d8c3858198759fa9d5b6dad51326974d7bdf97
parentbff9f1719a230d031f4914d3412d69701fcaf3d3 (diff)
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 <caolanm@redhat.com>
-rw-r--r--svx/source/svdraw/svdedxv.cxx3
-rw-r--r--sw/source/core/inc/frmtool.hxx5
-rw-r--r--sw/source/core/layout/frmtool.cxx7
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 <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());