diff options
author | László Németh <nemeth@numbertext.org> | 2021-12-08 10:11:06 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-12-08 12:40:51 +0100 |
commit | 76784f2dbf6d8641cfb6bf5d24e37521d6c806df (patch) | |
tree | 7d53cc2ea54e28d9c1b2db4769a8552324eeb0f7 /sw/qa/extras | |
parent | 155024040de888270bf90bdd200799cea7d73e4e (diff) |
tdf#107292: ODT import: fix order of deletions at same position
Tracked deletions at the same position were loaded in reverse
order, resulting broken text content.
Note: FODT format is not applicable for the unit test document,
because it's not affected by the problem.
Change-Id: Id13f8d23ae5964cbf82095a3d1ce2f6c9fdd59e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126529
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/odfexport/data/tdf107292.odt | bin | 0 -> 9921 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf107292.odt b/sw/qa/extras/odfexport/data/tdf107292.odt Binary files differnew file mode 100644 index 000000000000..f35da387f964 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf107292.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index f7ed88cd04a9..d3fe6465b4d4 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -561,6 +561,17 @@ DECLARE_ODFEXPORT_TEST(testredlineTextFrame, "redlineTextFrame.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); } +DECLARE_ODFEXPORT_TEST(testTdf107292, "tdf107292.odt") +{ + // tracked deletions at the same position were loaded in reverse order + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + // Without this fix in place, this test would have failed with + // - Expected: Lorem ipsum dolor sit... + // - Actual : dolor ipsumLorem sit... + CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum dolor sit..."), getParagraph(1)->getString()); +} + DECLARE_ODFEXPORT_TEST(testTdf140437, "tdf140437.odt") { // Without the fix in place, the document would have failed to load |