sw/qa/extras/ooxmlimport/data/n780843.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+)
New commits: commit 601fd489995e9fd422d8c0fd47d8433413f95eaf Author: Miklos Vajna <[email protected]> Date: Wed Sep 26 11:51:47 2012 +0200 n#780843 testcase Change-Id: I8a008b48dfd4b424fa95f8919fb52208ee45e6b6 diff --git a/sw/qa/extras/ooxmlimport/data/n780843.docx b/sw/qa/extras/ooxmlimport/data/n780843.docx new file mode 100644 index 0000000..9b92f79 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/n780843.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f7c75c5..f8f161f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -94,6 +94,7 @@ public: void testFdo55187(); void testN780563(); void testN780853(); + void testN780843(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -134,6 +135,7 @@ public: CPPUNIT_TEST(testFdo55187); CPPUNIT_TEST(testN780563); CPPUNIT_TEST(testN780853); + CPPUNIT_TEST(testN780843); #endif CPPUNIT_TEST_SUITE_END(); @@ -922,6 +924,27 @@ void Test::testN780853() CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); } +void Test::testN780843() +{ + /* + * The problem was that wrong footer was picked. + * + * oParas = ThisComponent.Text.createEnumeration + * oPara = oParas.nextElement + * oPara = oParas.nextElement + * oPara = oParas.nextElement + * sStyle = oPara.PageStyleName + * oStyle = ThisComponent.StyleFamilies.PageStyles.getByName(sStyle) + * xray oStyle.FooterText.String ' was "hidden footer" + */ + load("n780843.docx"); + uno::Reference< text::XTextRange > xPara = getParagraph(3); + OUString aStyleName = getProperty<OUString>(xPara, "PageStyleName"); + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(aStyleName), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xFooter = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, "FooterText"); + CPPUNIT_ASSERT_EQUAL(OUString("shown footer"), xFooter->getString()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
