Kaydet (Commit) 343595ff authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Michael Stahl

fix SwIndex assert on fdo66692-2.doc

Change-Id: Ic3330817809727bfa2293ba74dcd7f5a25683dae
(cherry picked from commit 2d2d5d1a)
Reviewed-on: https://gerrit.libreoffice.org/19378Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 43769b7a
This diff was suppressed by a .gitattributes entry.
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment