[Libreoffice-commits] core.git: sw/qa
Manfred Blume
manfred.blume at cib.de
Sun Oct 8 19:13:36 UTC 2017
sw/qa/extras/uiwriter/data/fdo112025-insert.docx |binary
sw/qa/extras/uiwriter/data/fdo112025.odt |binary
sw/qa/extras/uiwriter/uiwriter.cxx | 24 +++++++++++++++++++++++
3 files changed, 24 insertions(+)
New commits:
commit 20888958b52bcb6598cdba20829e59f750b10f0f
Author: Manfred Blume <manfred.blume at cib.de>
Date: Tue Sep 26 12:00:16 2017 +0200
tdf#112025 add unit test
Change-Id: I897201d8ffa3386a13885b1e21f49ab57534039d
Reviewed-on: https://gerrit.libreoffice.org/42795
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/qa/extras/uiwriter/data/fdo112025-insert.docx b/sw/qa/extras/uiwriter/data/fdo112025-insert.docx
new file mode 100755
index 000000000000..f915806e42cb
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/fdo112025-insert.docx differ
diff --git a/sw/qa/extras/uiwriter/data/fdo112025.odt b/sw/qa/extras/uiwriter/data/fdo112025.odt
new file mode 100755
index 000000000000..6d20370189c0
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/fdo112025.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index f78125e3b8bf..2b2f04eff480 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -258,6 +258,7 @@ public:
void testTdf105625();
void testTdf106736();
void testTdf58604();
+ void testTdf112025();
void testMsWordCompTrailingBlanks();
void testCreateDocxAnnotation();
void testTdf107976();
@@ -416,6 +417,7 @@ public:
CPPUNIT_TEST(testTdf105625);
CPPUNIT_TEST(testTdf106736);
CPPUNIT_TEST(testTdf58604);
+ CPPUNIT_TEST(testTdf112025);
CPPUNIT_TEST(testMsWordCompTrailingBlanks);
CPPUNIT_TEST(testCreateDocxAnnotation);
CPPUNIT_TEST(testTdf107976);
@@ -5096,6 +5098,28 @@ void SwUiWriterTest::testTdf58604()
#endif
}
+void SwUiWriterTest::testTdf112025()
+{
+ load(DATA_DIRECTORY, "fdo112025.odt");
+ const int numberOfParagraphs = getParagraphs();
+ CPPUNIT_ASSERT_EQUAL(1, numberOfParagraphs);
+
+ // get a page cursor
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+ xCursor->jumpToEndOfPage();
+
+ OUString insertFileid = m_directories.getURLFromSrc(DATA_DIRECTORY) + "fdo112025-insert.docx";
+ uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({{ "Name", uno::makeAny(insertFileid) }}));
+ lcl_dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues);
+ // something has been inserted + an additional paragraph
+ CPPUNIT_ASSERT_GREATER(numberOfParagraphs, getParagraphs());
+
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
+}
+
void SwUiWriterTest::testTdf108524()
{
createDoc("tdf108524.odt");
More information about the Libreoffice-commits
mailing list