[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 30 09:33:27 UTC 2020
sw/qa/extras/uiwriter/data/tdf132944.odt |binary
sw/qa/extras/uiwriter/uiwriter.cxx | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit c808f26f8e81c12ddb0353b0ce9a50079eadb59a
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jun 18 10:24:44 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jul 30 11:32:52 2020 +0200
tdf#132944: sw_uiwriter: Add unittest
Change-Id: I45568da4b3dccd4e0cfe990c50217012f02540c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96590
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
(cherry picked from commit c7f7bbf082806ba74eb5a608bfeabd05bf73510d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99642
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 3a560c35bd7b652cc956d808b1f451f859c924d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99667
diff --git a/sw/qa/extras/uiwriter/data/tdf132944.odt b/sw/qa/extras/uiwriter/data/tdf132944.odt
new file mode 100644
index 000000000000..08c3562aeaf1
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf132944.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index e5f7de2c1052..d2ffc5a58f4b 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -5655,6 +5655,27 @@ void SwUiWriterTest::testTdf35021_tabOverMarginDemo()
#endif
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf132944)
+{
+ load(DATA_DIRECTORY, "tdf132944.odt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ lcl_dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, the document would have had 2 pages
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
void SwUiWriterTest::testTdf106701_tabOverMarginAutotab()
{
createDoc("tdf106701_tabOverMarginAutotab.doc");
More information about the Libreoffice-commits
mailing list