[Libreoffice-commits] core.git: sw/qa sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 24 10:28:57 UTC 2019


 sw/qa/core/data/ww8/pass/ofz18414-1.doc |binary
 sw/source/filter/ww8/ww8par6.cxx        |   11 ++++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 808da2c918e662c19618c9f4035e8c9a802bb887
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Oct 24 09:52:44 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 24 12:27:15 2019 +0200

    Resolves: ofz#18414 drop apo anchor if it will be deleted
    
    Change-Id: Ic9dc053582055cae717df6244873cee14f6e44c6
    Reviewed-on: https://gerrit.libreoffice.org/81433
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/core/data/ww8/pass/ofz18414-1.doc b/sw/qa/core/data/ww8/pass/ofz18414-1.doc
new file mode 100644
index 000000000000..84204d197b70
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/ofz18414-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 2e21260408df..112c169edcd4 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2515,7 +2515,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
         if (bStealAttr)
             m_xCtrlStck->StealAttr(rPam.GetPoint()->nNode);
 
-        if (m_pLastAnchorPos || m_pPreviousNode)
+        if (m_pLastAnchorPos || m_pPreviousNode || (m_xSFlyPara && m_xSFlyPara->xMainTextPos))
         {
             SwNodeIndex aToBeJoined(aPref, 1);
 
@@ -2540,6 +2540,15 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
                 if (aDropCharPos == aToBeJoined)
                     m_pPreviousNode = nullptr;
             }
+
+            if (m_xSFlyPara)
+            {
+                // If an open apo pos is here, then clear it before
+                // JoinNext destroys it
+                SwNodeIndex aOpenApoPos(m_xSFlyPara->xMainTextPos->nNode);
+                if (aOpenApoPos == aToBeJoined)
+                    m_xSFlyPara->xMainTextPos.reset();
+            }
         }
 
         pNode->JoinNext();


More information about the Libreoffice-commits mailing list