summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-02 20:50:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-03 15:37:53 +0200
commit56f9efdf5cc30454dd36959f9d18bf55581c9141 (patch)
treea61013388bfd6de182697561ab84a3e65976b16e
parentc60ab1050e901c667ab8949509eaecee7c182b49 (diff)
cid#1485150 silence Uncaught exception
Change-Id: Ib2d10db236ff646514f9b722d1f02a1906cbb111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123010 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/inc/frmtool.hxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx8
2 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 4e328ca32af9..c7e75565fd05 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -275,6 +275,8 @@ private:
bool mbInvalidatePrevPrtArea;
bool mbBordersJoinedWithPrev;
+ void ImplDestroy();
+
public:
SwContentNotify( SwContentFrame *pContentFrame );
~SwContentNotify();
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 549e88f20e14..70303008b48c 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -25,6 +25,7 @@
#include <editeng/lspcitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <sal/log.hxx>
+#include <o3tl/deleter.hxx>
#include <osl/diagnose.h>
#include <drawdoc.hxx>
@@ -782,7 +783,7 @@ SwContentNotify::SwContentNotify( SwContentFrame *pContentFrame ) :
}
}
-SwContentNotify::~SwContentNotify()
+void SwContentNotify::ImplDestroy()
{
SwContentFrame *pCnt = static_cast<SwContentFrame*>(mpFrame);
if ( bSetCompletePaintOnInvalidate )
@@ -1002,6 +1003,11 @@ SwContentNotify::~SwContentNotify()
}
}
+SwContentNotify::~SwContentNotify()
+{
+ suppress_fun_call_w_exception(ImplDestroy());
+}
+
// note this *cannot* be static because it's a friend
void AppendObj(SwFrame *const pFrame, SwPageFrame *const pPage, SwFrameFormat *const pFormat, const SwFormatAnchor & rAnch)
{