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

Caolán McNamara caolanm at redhat.com
Tue Oct 20 13:57:33 PDT 2015


 sw/qa/core/data/ww8/pass/fdo66692-2.doc |binary
 sw/source/filter/ww8/ww8par6.cxx        |   15 +++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit 343595ff97e4ae50613c1e479315e16f3bcd54be
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 14 16:54:47 2015 +0100

    fix SwIndex assert on fdo66692-2.doc
    
    Change-Id: Ic3330817809727bfa2293ba74dcd7f5a25683dae
    (cherry picked from commit 2d2d5d1a704aa6827657a73b395620009b04b3ea)
    Reviewed-on: https://gerrit.libreoffice.org/19378
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/core/data/ww8/pass/fdo66692-2.doc b/sw/qa/core/data/ww8/pass/fdo66692-2.doc
new file mode 100644
index 0000000..5042eee
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/fdo66692-2.doc differ
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 86281ac..1a393b9 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2513,6 +2513,21 @@ void SwWW8ImplReader::StopApo()
             if (rBrush.GetColor().GetColor() != COL_AUTO)
                 aBg = rBrush.GetColor();
 
+            if (m_pLastAnchorPos.get())
+            {
+                //If the last anchor pos is here, then clear the anchor pos.
+                //This "last anchor pos" is only used for fixing up the
+                //postions of things anchored to page breaks and here
+                //we are removing the last paragraph of a frame, so there
+                //cannot be a page break at this point so we can
+                //safely reset m_pLastAnchorPos to avoid any dangling
+                //SwIndex's pointing into the deleted paragraph
+                SwNodeIndex aLastAnchorPos(m_pLastAnchorPos->nNode);
+                SwNodeIndex aToBeJoined(aPref, 1);
+                if (aLastAnchorPos == aToBeJoined)
+                    m_pLastAnchorPos.reset();
+            }
+
             //Get rid of extra empty paragraph
             pNd->JoinNext();
         }


More information about the Libreoffice-commits mailing list