sw/source/core/inc/frmtool.hxx    |    4 ++++
 sw/source/core/layout/frmtool.cxx |   14 ++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 40a382a8e49d544be7accee6cc846de96c3d36e6
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Dec 11 21:52:38 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Dec 12 13:26:42 2021 +0100

    cid#1399158 Uncaught exception
    
    and
    
    cid#1495379 Uncaught exception
    
    Change-Id: I8ec5ca64c3dda79c72bb91ba4651134fe9c4ffc9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126694
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 872944a75a50..1ef396a7a960 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -249,6 +249,8 @@ class SwLayNotify : public SwFrameNotify
 {
     bool m_bLowersComplete;
 
+    void ImplDestroy();
+
 public:
     SwLayNotify( SwLayoutFrame *pLayFrame );
     ~SwLayNotify();
@@ -262,6 +264,8 @@ class SwFlyNotify : public SwLayNotify
     SwPageFrame *pOldPage;
     const SwRect aFrameAndSpace;
 
+    void ImplDestroy();
+
 public:
     SwFlyNotify( SwFlyFrame *pFlyFrame );
     ~SwFlyNotify();
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 3f92694ff7a6..2b218097ec13 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -471,7 +471,7 @@ static void lcl_InvalidatePosOfLowers( SwLayoutFrame& 
_rLayoutFrame )
     }
 }
 
-SwLayNotify::~SwLayNotify()
+void SwLayNotify::ImplDestroy()
 {
     SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(mpFrame);
     SwRectFnSet aRectFnSet(pLay);
@@ -648,6 +648,11 @@ SwLayNotify::~SwLayNotify()
         static_cast<SwFlyFrame*>(pLay)->AnchorFrame()->InvalidateSize();
 }
 
+SwLayNotify::~SwLayNotify()
+{
+    suppress_fun_call_w_exception(ImplDestroy());
+}
+
 SwFlyNotify::SwFlyNotify( SwFlyFrame *pFlyFrame ) :
     SwLayNotify( pFlyFrame ),
     // #115759# - keep correct page frame - the page frame
@@ -657,7 +662,7 @@ SwFlyNotify::SwFlyNotify( SwFlyFrame *pFlyFrame ) :
 {
 }
 
-SwFlyNotify::~SwFlyNotify()
+void SwFlyNotify::ImplDestroy()
 {
     SwFlyFrame *pFly = static_cast<SwFlyFrame*>(mpFrame);
     if ( pFly->IsNotifyBack() )
@@ -763,6 +768,11 @@ SwFlyNotify::~SwFlyNotify()
     pFly->AnchorFrame()->InvalidatePos();
 }
 
+SwFlyNotify::~SwFlyNotify()
+{
+    suppress_fun_call_w_exception(ImplDestroy());
+}
+
 SwContentNotify::SwContentNotify( SwContentFrame *pContentFrame ) :
     SwFrameNotify( pContentFrame ),
     // OD 08.01.2004 #i11859#

Reply via email to