diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-24 09:52:44 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-01-25 14:41:56 +0100 |
commit | 856a45f21eaea5645837401e35f9c84c8f7cac4b (patch) | |
tree | fe846e30d055148f32296b22c01550177c19ea59 /sw/source | |
parent | 7b69009c0aa1dc7de4be66ec1801a98e0dc25d28 (diff) |
Resolves: ofz#18414 drop apo anchor if it will be deleted
Change-Id: Ic9dc053582055cae717df6244873cee14f6e44c6
Reviewed-on: https://gerrit.libreoffice.org/81433
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 808da2c918e662c19618c9f4035e8c9a802bb887)
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 9b9998081fca..c7dc9724a4b3 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2423,7 +2423,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) if (bStealAttr) m_xCtrlStck->StealAttr(rPam.GetPoint()->nNode); - if (m_pLastAnchorPos || m_pPreviousNode) + if (m_pLastAnchorPos || m_pPreviousNode || (m_xSFlyPara && m_xSFlyPara->xMainTextPos)) { SwNodeIndex aToBeJoined(aPref, 1); @@ -2448,6 +2448,15 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) if (aDropCharPos == aToBeJoined) m_pPreviousNode = nullptr; } + + if (m_xSFlyPara) + { + // If an open apo pos is here, then clear it before + // JoinNext destroys it + SwNodeIndex aOpenApoPos(m_xSFlyPara->xMainTextPos->nNode); + if (aOpenApoPos == aToBeJoined) + m_xSFlyPara->xMainTextPos.reset(); + } } pNode->JoinNext(); |