[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu May 27 13:29:41 UTC 2021


 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |   11 +++++++++++
 sw/qa/extras/uiwriter/uiwriter2.cxx        |   17 -----------------
 2 files changed, 11 insertions(+), 17 deletions(-)

New commits:
commit 9b80add7d54298b98cc3d38919fa30f44eb23d60
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu May 27 11:41:04 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu May 27 15:29:03 2021 +0200

    sw_uiwriter2: this is basically a export test
    
    Change-Id: I5b87f52ec4f905df1ae2e9175ac3807171614bdf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116244
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/uiwriter/data/frame_size_export.docx b/sw/qa/extras/ooxmlexport/data/frame_size_export.docx
similarity index 100%
rename from sw/qa/extras/uiwriter/data/frame_size_export.docx
rename to sw/qa/extras/ooxmlexport/data/frame_size_export.docx
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 2b20c8aabc35..1ce0a14556f3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -406,6 +406,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCommentDone, "CommentDone.docx")
     assertXPath(pXmlCommExt, "/w15:commentsEx/w15:commentEx", "done", "1");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTableWidth, "frame_size_export.docx")
+{
+    // after exporting: table width was overwritten in the doc model
+    uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
+                                                    uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
+                         getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
+}
+
+
 DECLARE_OOXMLEXPORT_TEST(testCommentDoneModel, "CommentDone.docx")
 {
     css::uno::Reference<css::text::XTextFieldsSupplier> xTextFieldsSupplier(
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 2453f3afcb60..7cce013d5eab 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2666,23 +2666,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf101873)
     CPPUNIT_ASSERT_EQUAL(OUString("something"), pShellCursor->GetText());
 }
 
-CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTableWidth)
-{
-    load(DATA_DIRECTORY, "frame_size_export.docx");
-
-    uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
-    utl::MediaDescriptor aMediaDescriptor;
-    aMediaDescriptor["FilterName"] <<= OUString("Office Open XML Text");
-    xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
-
-    // after exporting: table width was overwritten in the doc model
-    uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
-    uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
-                                                    uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
-                         getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
-}
-
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTextFormFieldInsertion)
 {
     SwDoc* pDoc = createDoc();


More information about the Libreoffice-commits mailing list