diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-08 13:40:02 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-04-09 15:14:40 +0200 |
commit | cb9ebc47e0c7c6affedcff59b0254c54be9f8238 (patch) | |
tree | 02b680596b8b643b23addffdc19fa88097d027ff /sw/source/core | |
parent | 5e2fc4864a5ed4c8361863ba7fa8e83d1c768638 (diff) |
sw: crashtesting: fix assert on ooo95711-1.odt
Document is special and contains deletion that contains only a table, no
paragraphs before or after it. The assertion is wrong in this case.
It doesn't matter if the atParaEndNode is incremented because it's going
to be on an end node either way.
(regression from 91b2325808a75174f284c48c8b8afc118fad74e4)
Change-Id: I3fe82f0ed0b7b213df036bb8026dc209c00123de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91873
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 6b2e925aa0dd389a613e182545de6550057374d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91890
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 192738317a05..f6e38600f1ba 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -142,7 +142,8 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos, SwPosition atParaEnd(*rPam.End()); if (bMoveAllFlys) { - assert(rPam.End()->nContent.GetIndex() == rPam.End()->nNode.GetNode().GetTextNode()->Len()); + assert(!rPam.End()->nNode.GetNode().IsTextNode() // can be table end-node + || rPam.End()->nContent.GetIndex() == rPam.End()->nNode.GetNode().GetTextNode()->Len()); ++atParaEnd.nNode; atParaEnd.nContent.Assign(atParaEnd.nNode.GetNode().GetContentNode(), 0); } |