summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.cxx
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-01-18 12:51:33 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-01-24 09:42:46 +0100
commit05a5037f489971676737808c37ad1cfb9dcd53d9 (patch)
tree6f9fe706bf169568c46dff59af6f261694c3b8e8 /sw/source/filter/ww8/docxattributeoutput.cxx
parent8f3e68310357e92ffdfe03471d3bdbd918c65e2e (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> (cherry picked from commit fd5599b9d23a2d9b13af6dd88bd2d38f438f7e00) Reviewed-on: https://gerrit.libreoffice.org/66810
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a73f90de5153..e332bee8d747 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1411,6 +1411,21 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
m_nFieldsInHyperlink = 0;
}
+ // end ToX fields
+ for (auto it = m_Fields.rbegin(); it != m_Fields.rend(); )
+ {
+ if (it->bClose && !it->pField)
+ {
+ EndField_Impl( pNode, nPos, *it );
+ it = decltype(m_Fields)::reverse_iterator(m_Fields.erase(it.base() - 1));
+ }
+ else
+ {
+ ++it;
+ }
+ }
+
+
DoWriteBookmarksStart(m_rFinalBookmarksStart);
DoWriteBookmarksEnd(m_rFinalBookmarksEnd);
DoWriteBookmarkEndIfExist(nPos);