diff options
author | Justin Luth <justin_luth@sil.org> | 2019-09-03 14:14:10 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-09-09 16:55:13 +0200 |
commit | 5d04e2c94c8b3f6c5e75ff4c394ca086de5a6e5a (patch) | |
tree | 2599458eaef260d6acf927893f992e75ce7a44f2 /sw/source/filter/ww8/wrtww8.cxx | |
parent | b32ac08a12380228202c396fba36d8ecd85252da (diff) |
tdf#126994 ww8 export: Don't skip TOX end node
The section end node processes the section page break,
so skipping it after the Table Of Contents meant that a
page break here was lost.
This fix is specifically for DOCX although it could impact
.doc (which already worked, and still does) and .rtf
(which probably doesn't work with section end anyway).
Utlimately, it just calls OutputEndNode() for an end node,
so it shouldn't cause any difficulties.
Change-Id: Iabc4a734365febb2b3e3bfed7d3c954b4b01da34
Reviewed-on: https://gerrit.libreoffice.org/78552
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 86af33b312fb..42f7b7e4f29f 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2756,12 +2756,13 @@ void MSWordExportBase::WriteText() ; else if ( aIdx.GetNode().IsSectionNode() ) ; - else if ( !IsInTable() - && (rSect.GetType() != TOX_CONTENT_SECTION && rSect.GetType() != TOX_HEADER_SECTION )) //No sections in table + else if ( !IsInTable() ) //No sections in table { //#120140# Do not need to insert a page/section break after a section end. Check this case first bool bNeedExportBreakHere = true; - if ( aIdx.GetNode().IsTextNode() ) + if ( rSect.GetType() == TOX_CONTENT_SECTION || rSect.GetType() == TOX_HEADER_SECTION ) + bNeedExportBreakHere = false; + else if ( aIdx.GetNode().IsTextNode() ) { SwTextNode *pTempNext = aIdx.GetNode().GetTextNode(); if ( pTempNext ) |