summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-08-23 17:54:54 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-08-23 17:55:12 +0200
commit93d22852564b8d77b98fae902ce5f879272ca818 (patch)
treef38f0e53fb6d8a4436966276040fd9d41b03b1c3 /sw
parent1a3f44e52b31c520d52261af8a2f92b88e107459 (diff)
n#775906 testcase
Change-Id: Idafd1b7506dac77307190df275fb8ed35d40e5e5
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/n775906.docxbin0 -> 11750 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx19
2 files changed, 18 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n775906.docx b/sw/qa/extras/ooxmlimport/data/n775906.docx
new file mode 100644
index 000000000000..6b6dd1a6b45d
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n775906.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 342f4766a72c..f82aaa3bdbbc 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();