Kaydet (Commit) dbb64d97 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

ofz#6827 drop last anchor pos if it will be joined

Change-Id: Ib36b74b455f741d9dcccbdf244d21453837bda3c
Reviewed-on: https://gerrit.libreoffice.org/51100Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
(cherry picked from commit f79c3fbd)
üst 0c43c330
......@@ -2370,6 +2370,21 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
if (bStealAttr)
m_pCtrlStck->StealAttr(rPam.GetPoint()->nNode);
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
//positions 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();
}
pNode->JoinNext();
bRet = true;
......
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