summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-08-30 09:11:58 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-08-30 09:12:12 +0200
commitdd11bca8ab191ce10054a5f2de7010ca400eb0b5 (patch)
tree256b0bcb7eb047d1ba1f66f66608247b46b92c32 /sw/qa/extras
parenta474559ff1e560b83952f00595dbd8ae7fde88b6 (diff)
n#777337 testcase
Also remove the #if 0 I forgot to remove previously. Change-Id: I2cc5e1407c509414c8395d0fd63ab3b379bef04f
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/data/n777337.docxbin0 -> 13409 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx20
2 files changed, 18 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n777337.docx b/sw/qa/extras/ooxmlimport/data/n777337.docx
new file mode 100644
index 000000000000..8bb377dcf621
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n777337.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 00e36b8fb5ad..ec619935aad1 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -88,10 +88,10 @@ public:
void testN775906();
void testN775899();
void testN777345();
+ void testN777337();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
-#if 0
CPPUNIT_TEST(testN751054);
CPPUNIT_TEST(testN751117);
CPPUNIT_TEST(testN751017);
@@ -118,8 +118,8 @@ public:
CPPUNIT_TEST(testAllGapsWord);
CPPUNIT_TEST(testN775906);
CPPUNIT_TEST(testN775899);
-#endif
CPPUNIT_TEST(testN777345);
+ CPPUNIT_TEST(testN777337);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -785,6 +785,22 @@ void Test::testN777345()
CPPUNIT_ASSERT_EQUAL(sal_uLong(2404338915U), aGraphic.GetChecksum());
}
+void Test::testN777337()
+{
+ /*
+ * The problem was that the top and bottom margin on the first page was only 0.1cm instead of 1.7cm.
+ *
+ * oFirst = ThisComponent.StyleFamilies.PageStyles.getByName("First Page")
+ * xray oFirst.TopMargin
+ * xray oFirst.BottomMargin
+ */
+ load("n777337.docx");
+
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("First Page"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1702), getProperty<sal_Int32>(xPropertySet, "TopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1702), getProperty<sal_Int32>(xPropertySet, "BottomMargin"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();