sw/source/filter/basflt/fltshell.cxx |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 73f3028b501c72fb802aa15d0f450afd241e57c6
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Sep 24 16:06:00 2020 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 24 21:35:00 2020 +0200

    ofz#25908 detect if the SwFrameFormat is deleted
    
    Change-Id: Ie9b1587903fef33c5e0471a18e5cbaee1a26f01c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103320
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/basflt/fltshell.cxx 
b/sw/source/filter/basflt/fltshell.cxx
index 4f725a98b9a9..ceae383380af 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -962,7 +962,15 @@ SwFltAnchorListener::SwFltAnchorListener(SwFltAnchor* 
pFltAnchor)
 
 void SwFltAnchorListener::Notify(const SfxHint& rHint)
 {
-    if(auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint))
+    if (rHint.GetId() == SfxHintId::Dying)
+        m_pFltAnchor->SetFrameFormat(nullptr);
+    else if (auto pDrawFrameFormatHint = dynamic_cast<const 
sw::DrawFrameFormatHint*>(&rHint))
+    {
+        if (pDrawFrameFormatHint->m_eId != sw::DrawFrameFormatHintId::DYING)
+            return;
+        m_pFltAnchor->SetFrameFormat(nullptr);
+    }
+    else if (auto pLegacyHint = dynamic_cast<const 
sw::LegacyModifyHint*>(&rHint))
     {
         if(pLegacyHint->m_pNew->Which() != RES_FMT_CHG)
             return;
@@ -971,12 +979,6 @@ void SwFltAnchorListener::Notify(const SfxHint& rHint)
         if(pFrameFormat)
             m_pFltAnchor->SetFrameFormat(pFrameFormat);
     }
-    else if (auto pDrawFrameFormatHint = dynamic_cast<const 
sw::DrawFrameFormatHint*>(&rHint))
-    {
-        if (pDrawFrameFormatHint->m_eId != sw::DrawFrameFormatHintId::DYING)
-            return;
-        m_pFltAnchor->SetFrameFormat(nullptr);
-    }
 }
 
 // methods of SwFltRedline follow
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to