[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 29 09:38:15 UTC 2020


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

New commits:
commit c70d803de936449926c779b3a30af31526e5a4a7
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 24 16:06:00 2020 +0100
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Tue Sep 29 11:37:44 2020 +0200

    ofz#25908 detect if the SwFrameFormat is deleted
    
    Change-Id: Ie9b1587903fef33c5e0471a18e5cbaee1a26f01c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103329
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

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


More information about the Libreoffice-commits mailing list