summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-07 16:57:42 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-07 17:36:14 +0100
commit195b8491d0299038fb64d19463e3ce90905bf346 (patch)
tree631e2b028ef5f8ba4add0c10934de38519175263 /sw/qa/extras
parent1cded3f89a8759c91830bb5844b8dac54af24944 (diff)
DOCX strict import: fix headers
Now that the document has a header, better to just test the bottom margin, as in case there is a header, the top margin has different semantics in Word and Writer. Change-Id: I11212965ecd364cdc8a205c3ab3b8b71ed12944b
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/data/strict.docxbin11408 -> 13345 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx6
2 files changed, 5 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/strict.docx b/sw/qa/extras/ooxmlimport/data/strict.docx
index 41953981766e..57d671f72bbe 100644
--- a/sw/qa/extras/ooxmlimport/data/strict.docx
+++ b/sw/qa/extras/ooxmlimport/data/strict.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 2503c81509c8..d0c0b4a1280c 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1908,11 +1908,15 @@ DECLARE_OOXMLIMPORT_TEST(testStrict, "strict.docx")
{
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
// This was only 127, pt suffix was ignored, so this got parsed as twips instead of points.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(72 * 20)), getProperty<sal_Int32>(xPageStyle, "TopMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(72 * 20)), getProperty<sal_Int32>(xPageStyle, "BottomMargin"));
// This was only 1397, same issue
CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(792 * 20)), getProperty<sal_Int32>(xPageStyle, "Height"));
// Text was missing, due to not handling the strict namespaces.
getParagraph(1, "Hello world!");
+
+ // Header in the document caused a crash on import.
+ uno::Reference<text::XText> xHeaderText(xPageStyle->getPropertyValue("HeaderText"), uno::UNO_QUERY);
+ getParagraphOfText(1, xHeaderText, "This is a header.");
}
#endif