[Libreoffice-commits] .: sw/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Aug 23 08:55:36 PDT 2012
sw/qa/extras/ooxmlimport/data/n775906.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 19 ++++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
New commits:
commit 93d22852564b8d77b98fae902ce5f879272ca818
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Aug 23 17:54:54 2012 +0200
n#775906 testcase
Change-Id: Idafd1b7506dac77307190df275fb8ed35d40e5e5
diff --git a/sw/qa/extras/ooxmlimport/data/n775906.docx b/sw/qa/extras/ooxmlimport/data/n775906.docx
new file mode 100644
index 0000000..6b6dd1a
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n775906.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 342f476..f82aaa3 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -83,6 +83,7 @@ public:
void testNumbering1();
void testBnc773061();
void testAllGapsWord();
+ void testN775906();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -110,6 +111,7 @@ public:
CPPUNIT_TEST(testNumbering1);
CPPUNIT_TEST(testBnc773061);
CPPUNIT_TEST(testAllGapsWord);
+ CPPUNIT_TEST(testN775906);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -638,7 +640,6 @@ void Test::testN766487()
void Test::testN693238()
{
/*
- *
* The problem was that a continous section break at the end of the doc caused the margins to be ignored.
*
* xray ThisComponent.StyleFamilies.PageStyles.Default.LeftMargin ' was 2000, should be 635
@@ -719,6 +720,22 @@ void Test::testAllGapsWord()
borderTest.testTheBorders(mxComponent);
}
+void Test::testN775906()
+{
+ /*
+ * The problem was that right margin (via direct formatting) erased the left/first margin (inherited from numbering style).
+ *
+ * oParas = ThisComponent.Text.createEnumeration
+ * oPara = oParas.nextElement
+ * xray oPara.ParaFirstLineIndent ' was 0
+ * xray oPara.ParaLeftMargin ' was 0
+ */
+ load("n775906.docx");
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-635), getProperty<sal_Int32>(getParagraph(1), "ParaFirstLineIndent"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1905), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list