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

Miklos Vajna vmiklos at suse.cz
Thu Aug 22 07:49:05 PDT 2013


 dev/null                                 |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |    4 +++-
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |   14 --------------
 3 files changed, 3 insertions(+), 15 deletions(-)

New commits:
commit 84184f957d004e1f7b7a361935d34b1fc2af51d6
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Thu Aug 22 16:42:52 2013 +0200

    DOCX tests: move testTableFloatingMargins to the export suite
    
    This was added to the import suite temporarily, to be sure the import
    part does not regress till the export part passes, which is now the
    case.
    
    Change-Id: Ib9291ab3ef0beaa407f025c6f81bda9cdf9f75e9

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 89c3aab..f974d34 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1172,10 +1172,12 @@ void Test::testTableFloating()
 
 void Test::testTableFloatingMargins()
 {
+    // In case the table had custom left cell margin, the horizontal position was still incorrect (too small, -199).
     uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
     uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
     uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
-    // These were 0, due to lack of import/export.
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-499), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
+    // These were 0 as well, due to lack of import.
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xFrame, "TopMargin"));
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xFrame, "BottomMargin"));
 
diff --git a/sw/qa/extras/ooxmlimport/data/table-floating-margins.docx b/sw/qa/extras/ooxmlimport/data/table-floating-margins.docx
deleted file mode 100755
index 81f6f6c..0000000
Binary files a/sw/qa/extras/ooxmlimport/data/table-floating-margins.docx and /dev/null differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 524ef58..f9d3416 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -128,7 +128,6 @@ public:
     void testFdo66474();
     void testGroupshapeRotation();
     void testBnc780044Spacing();
-    void testTableFloatingMargins();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -222,7 +221,6 @@ void Test::run()
         {"fdo66474.docx", &Test::testFdo66474},
         {"groupshape-rotation.docx", &Test::testGroupshapeRotation},
         {"bnc780044_spacing.docx", &Test::testBnc780044Spacing},
-        {"table-floating-margins.docx", &Test::testTableFloatingMargins},
     };
     header();
     for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1552,18 +1550,6 @@ void Test::testBnc780044Spacing()
     CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
 }
 
-void Test::testTableFloatingMargins()
-{
-    // In case the table had custom left cell margin, the horizontal position was still incorrect (too small, -199).
-    uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
-    uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
-    uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(-499), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
-    // These were 0 as well, due to lack of import.
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xFrame, "TopMargin"));
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(2000), getProperty<sal_Int32>(xFrame, "BottomMargin"));
-}
-
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list