[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/qa sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jul 24 11:43:33 UTC 2018


 sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc |binary
 sw/source/filter/ww8/ww8par6.cxx                      |    6 +++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2fd44e945d3d0bb6318ba704c7ca2ac06c7db263
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 20 12:28:54 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Jul 24 13:43:09 2018 +0200

    forcepoint#51 anchor location deleted before graphic anchor processed
    
    try deferring to after anchor stack is cleared
    
    Change-Id: Iaa42d19635968d1656e171a7e0c5e473879cd8f3
    Reviewed-on: https://gerrit.libreoffice.org/57776
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc b/sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc
new file mode 100644
index 000000000000..91ee6b58f210
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/forcepoint50-grfanchor-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 3d543b74bc97..9b9998081fca 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2526,6 +2526,7 @@ void SwWW8ImplReader::StopApo()
         Color aBg(0xFE, 0xFF, 0xFF, 0xFF);  //Transparent by default
 
         SwTextNode* pNd = aPref.GetNode().GetTextNode();
+        SwTextNode* pJoinNext = nullptr;
         if (pNd && m_xSFlyPara->pFlyFormat)
         {
             /*
@@ -2555,13 +2556,16 @@ void SwWW8ImplReader::StopApo()
             }
 
             //Get rid of extra empty paragraph
-            pNd->JoinNext();
+            pJoinNext = pNd;
         }
 
         if (m_xSFlyPara->pFlyFormat)
             m_xSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, RES_BACKGROUND));
 
         DeleteAnchorStack();
+        if (pJoinNext)
+            pJoinNext->JoinNext();
+
         m_xAnchorStck = std::move(m_xSFlyPara->xOldAnchorStck);
 
         // When inserting a graphic into the fly frame using the auto


More information about the Libreoffice-commits mailing list