From 1cec392ef50699cc0f310823e4e5fdbb9b272f0f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 4 Jan 2013 14:37:10 +0100 Subject: n#793262 testcase --- sw/qa/extras/ooxmlimport/data/n793262.docx | Bin 0 -> 15449 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 sw/qa/extras/ooxmlimport/data/n793262.docx (limited to 'sw/qa') 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 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n793262.docx 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 xHeaderText = getProperty< uno::Reference >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText"); + uno::Reference 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(xHeaderParagraphs->nextElement(), "CharHeight")); + + uno::Reference xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference xTable(xTables->getByIndex(0), uno::UNO_QUERY); + // Cell margins as direct formatting were ignored, this was 0. + CPPUNIT_ASSERT_EQUAL(sal_Int32(76), getProperty(xTable->getCellByName("A1"), "TopBorderDistance")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3