diff options
Diffstat (limited to 'sw/qa/extras/ww8export/ww8export2.cxx')
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index d429d53b0404..70aa498d5fdc 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -15,6 +15,7 @@ #include <com/sun/star/text/XTextFramesSupplier.hpp> #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> +#include <com/sun/star/text/XFootnote.hpp> #include <pagedesc.hxx> class Test : public SwModelTestBase @@ -96,6 +97,24 @@ DECLARE_WW8EXPORT_TEST(testBnc863018b, "bnc863018b.doc") CPPUNIT_ASSERT_EQUAL( 1, getPages() ); } +DECLARE_WW8EXPORT_TEST(testTdf108448_endNote, "tdf108448_endNote.odt") +{ + uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xEndnotes(xEndnotesSupplier->getEndnotes(), uno::UNO_QUERY); + uno::Reference<text::XText> xEndnote; + xEndnotes->getByIndex(0) >>= xEndnote; + + uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xEndnote->getText(), uno::UNO_QUERY); + uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration(); + int nRet = 0; + while (xParaEnum->hasMoreElements()) + { + xParaEnum->nextElement(); + nRet++; + } + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of paragraphs in Endnote i", 1, nRet ); +} + DECLARE_WW8EXPORT_TEST(testTdf104805, "tdf104805.doc") { uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WW8Num1"), uno::UNO_QUERY); |