summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-01-08 11:17:12 +0300
committerAndras Timar <andras.timar@collabora.com>2019-03-04 15:13:20 +0100
commita070675cfc5a9b474f7b7062303d0ba6b3b532b6 (patch)
tree4f0ca073630ba831475bdec3abe527bcd30e1422 /sw/source
parent1a5d7407d508057f4e4f8f4a3f890453623a0481 (diff)
tdf#122456 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> Reviewed-on: https://gerrit.libreoffice.org/66051 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 5deec1c02ca1f2df30b0c33d516d3aa10285fb3b) Reviewed-on: https://gerrit.libreoffice.org/68500 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 15e5506abfc4..64bf90dfdac5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2773,6 +2773,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