diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 16:54:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 20:18:45 +0100 |
commit | 2d2d5d1a704aa6827657a73b395620009b04b3ea (patch) | |
tree | 4045566b446c9b3df1d35fb22b017dab23816af9 /sw | |
parent | f0f6077dc51a20dfa0387d4e68eb677e50ab76cd (diff) |
fix SwIndex assert on fdo66692-2.doc
Change-Id: Ic3330817809727bfa2293ba74dcd7f5a25683dae
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/data/ww8/pass/fdo66692-2.doc | bin | 0 -> 91136 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/core/data/ww8/pass/fdo66692-2.doc b/sw/qa/core/data/ww8/pass/fdo66692-2.doc Binary files differnew file mode 100644 index 000000000000..5042eeeb206c --- /dev/null +++ b/sw/qa/core/data/ww8/pass/fdo66692-2.doc diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index e21876d0d7bb..2077882e962b 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2511,6 +2511,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(); } |