[Libreoffice-commits] .: sw/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 13 03:11:56 PDT 2012


 sw/qa/extras/ooxmlimport/data/n778836.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx   |   15 +++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit 601e7d4f5e2966ae3167de5ef09dc1e0252f55e8
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Thu Sep 13 12:08:34 2012 +0200

    n#778836 testcase
    
    Change-Id: I0b6fbeff5d784e0e3f2067111cf505904f263844

diff --git a/sw/qa/extras/ooxmlimport/data/n778836.docx b/sw/qa/extras/ooxmlimport/data/n778836.docx
new file mode 100644
index 0000000..ccd89e8
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n778836.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index ec61993..b66b5b8 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -89,6 +89,7 @@ public:
     void testN775899();
     void testN777345();
     void testN777337();
+    void testN778836();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -120,6 +121,7 @@ public:
     CPPUNIT_TEST(testN775899);
     CPPUNIT_TEST(testN777345);
     CPPUNIT_TEST(testN777337);
+    CPPUNIT_TEST(testN778836);
 #endif
     CPPUNIT_TEST_SUITE_END();
 
@@ -801,6 +803,19 @@ void Test::testN777337()
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1702), getProperty<sal_Int32>(xPropertySet, "BottomMargin"));
 }
 
+void Test::testN778836()
+{
+    /*
+     * The problem was that the paragraph inherited margins from the numbering
+     * and parent paragraph styles and the result was incorrect.
+     */
+    load("n778836.docx");
+
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1270), getProperty<sal_Int32>(getParagraph(0), "ParaRightMargin"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(3810), getProperty<sal_Int32>(getParagraph(0), "ParaLeftMargin"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-635), getProperty<sal_Int32>(getParagraph(0), "ParaFirstLineIndent"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list