Kaydet (Commit) f79c3fbd authored tarafından Caolán McNamara's avatar Caolán McNamara

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>
üst 081f9097
...@@ -2443,6 +2443,21 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) ...@@ -2443,6 +2443,21 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr)
if (bStealAttr) if (bStealAttr)
m_pCtrlStck->StealAttr(rPam.GetPoint()->nNode); 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(); pNode->JoinNext();
bRet = true; 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