diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-02 20:50:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-03 15:37:53 +0200 |
commit | 56f9efdf5cc30454dd36959f9d18bf55581c9141 (patch) | |
tree | a61013388bfd6de182697561ab84a3e65976b16e /sw | |
parent | c60ab1050e901c667ab8949509eaecee7c182b49 (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>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 8 |
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) { |