diff options
author | Justin Luth <justin_luth@sil.org> | 2019-01-08 11:17:12 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2019-01-09 20:25:50 +0100 |
commit | f18300642c3e962d7c0c6d13daad1676b877b30b (patch) | |
tree | d243cd69f62debc197b1a2243486f46dd62fd869 /sw/source/filter/ww8/wrtww8.cxx | |
parent | 97bb3611d78ed33c6d538a38117c869fe7286cd3 (diff) |
tdf#122345 filter/ww8 export: no fake section at end of document
If Writer has a section that is ending, then the part after
that would need to be another section for MS formats. However,
if the section ends at the end of the document, there is
no need to start a new section.
This is particularly important for exporting RTF (preventing
accumulating sections/paragraphs), but it also affects
docx and doc (without noticable benefit or harm, but
now instead of "fake" section properties it will end with
the properties of the real section - which can only be a
good thing, right?)
This is one step in the right direction for resolving the comment
//0xffffffff, what ... is going on with that!, fixme most terribly
reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1))
Change-Id: Ie0641eb78c11103b33e3d849fe0b7935476a6505
Reviewed-on: https://gerrit.libreoffice.org/65974
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 69be4bc2ce55..6cfc0f019e54 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2778,6 +2778,10 @@ void MSWordExportBase::WriteText() { bNeedExportBreakHere = false; } + // No need to create a "fake" section if this is the end of the document, + // except to emulate balanced columns. + else if ( nColumnCount < 2 && aIdx == m_pDoc->GetNodes().GetEndOfContent() ) + bNeedExportBreakHere = false; } if (bNeedExportBreakHere) //#120140# End of check |