summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-04 14:37:10 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-04 14:49:06 +0100
commit1cec392ef50699cc0f310823e4e5fdbb9b272f0f (patch)
tree8cfdef3c827bd629cfd0a5d31256857da2e369fb /sw/qa
parent60ec497e0e91354a616978be531d15d3efa3f559 (diff)
n#793262 testcase
Diffstat (limited to 'sw/qa')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/n793262.docxbin0 -> 15449 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n793262.docx b/sw/qa/extras/ooxmlimport/data/n793262.docx
new file mode 100755
index 000000000000..7f2d2e0a8084
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n793262.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3b7a658a8a20..813b6536b537 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -111,6 +111,7 @@ public:
void testN780645();
void testFineTableDash();
void testN792778();
+ void testN793262();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -174,6 +175,7 @@ void Test::run()
{"n780645.docx", &Test::testN780645},
{"tableborder-finedash.docx", &Test::testFineTableDash},
{"n792778.docx", &Test::testN792778},
+ {"n793262.docx", &Test::testN793262},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1096,6 +1098,22 @@ void Test::testN792778()
xInnerShape.set(xInnerGroupShape->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(11684), xInnerShape->getPosition().Y);
}
+
+void Test::testN793262()
+{
+ uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< uno::Reference<container::XEnumerationAccess> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<container::XEnumeration> xHeaderParagraphs(xHeaderText->createEnumeration());
+ xHeaderParagraphs->nextElement();
+ // Font size of the last empty paragraph in the header was ignored, this was 11.
+ CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xHeaderParagraphs->nextElement(), "CharHeight"));
+
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // Cell margins as direct formatting were ignored, this was 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(76), getProperty<sal_Int32>(xTable->getCellByName("A1"), "TopBorderDistance"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();