diff options
author | Serge Krot <Serge.Krot@cib.de> | 2019-01-18 12:51:33 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-01-21 13:14:43 +0100 |
commit | fd5599b9d23a2d9b13af6dd88bd2d38f438f7e00 (patch) | |
tree | 156fa677c0ac4518d76c32be9cfc87751b73a3c5 /sw/qa/extras | |
parent | acf8dec2aff423c6c4cfbd0e1ecb01ee052316cd (diff) |
tdf#121561 sw DOCX: output toc-end inside last toc paragraph
During export of the TOC into DOCX all TOC field parts
should be placed inside one STD frame: field start-begin,
field-separate and field-end mark.
Updated unit test.
Change-Id: I10e37a48160e1dc4f0074c4e2e7621a59f79c2ee
Reviewed-on: https://gerrit.libreoffice.org/66587
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 90c7566e30d3..2b0ee4166152 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -151,11 +151,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121561_tocTitleDocx, "tdf121456_tabsOffset.odt") if (!pXmlDoc) return; + // get TOC node uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xIndexes(xIndexSupplier->getDocumentIndexes( ), uno::UNO_QUERY); uno::Reference<text::XDocumentIndex> xTOCIndex(xIndexes->getByIndex(0), uno::UNO_QUERY); + // ensure TOC title was set in TOC properties CPPUNIT_ASSERT_EQUAL(OUString("Inhaltsverzeichnis"), getProperty<OUString>(xTOCIndex, "Title")); + + // ensure TOC end-field mark is placed inside TOC section + assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[16]/w:r/w:fldChar", "fldCharType", "end"); } DECLARE_OOXMLEXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx") |