summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-08 13:40:02 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-04-08 14:52:03 +0200
commit6b2e925aa0dd389a613e182545de6550057374d4 (patch)
tree8ba5e3fb10d0f50f964fc8fc8bed9ef1cecf0dfe
parent1b582b53596928be9e01e40ea287fbd4ed62996c (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>
-rw-r--r--sw/qa/core/data/odt/pass/ooo95711-1.odtbin0 -> 23500 bytes
-rw-r--r--sw/source/core/doc/docedt.cxx3
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/qa/core/data/odt/pass/ooo95711-1.odt b/sw/qa/core/data/odt/pass/ooo95711-1.odt
new file mode 100644
index 000000000000..4bcb3b44675b
--- /dev/null
+++ b/sw/qa/core/data/odt/pass/ooo95711-1.odt
Binary files differ
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 016a3849e470..b4f52ede746e 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -144,7 +144,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);
}