sw/qa/core/data/odt/pass/ooo95711-1.odt |binary
 sw/source/core/doc/docedt.cxx           |    3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6b2e925aa0dd389a613e182545de6550057374d4
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Apr 8 13:40:02 2020 +0200
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Wed Apr 8 14:52:03 2020 +0200

    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.st...@cib.de>

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
Binary files /dev/null and b/sw/qa/core/data/odt/pass/ooo95711-1.odt 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);
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to