diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-08 22:47:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-08 23:07:28 +0100 |
commit | f4bb73164a51ec83fe1d5975b1232d35f8a9e88a (patch) | |
tree | a54be078b24e8c3ee7739ecd3979856d880c851e /writerfilter | |
parent | 5fea6b760df32297f225b72c9e2c30d975e9142a (diff) |
fdo#84645 RTF import: set DontBalanceTextColumns=true for the last section ...
... if it has multiple columns. See commit
d185204737031955c56a24356ed003d342548434 (DOCX import: set
DontBalanceTextColumns=true for the last section, 2014-07-17) for the
DOCX equivalent of this problem; this just adapts the RTF tokenizer to
dmapper.
Change-Id: Ib30f9b386e204b8b2987832ab17ee0cc53b3f0bc
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 3c7b5d3c8464..66b9eb3904b1 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -611,6 +611,12 @@ void RTFDocumentImpl::sectBreak(bool bFinal = false) writerfilter::Reference<Properties>::Pointer_t const pProperties( new RTFReferenceProperties(aAttributes, aSprms) ); + + if (bFinal && !m_pSuperstream) + // This is the end of the document, not just the end of e.g. a header. + // This makes sure that dmapper can set DontBalanceTextColumns=true for this section if necessary. + Mapper().markLastSectionGroup(); + // The trick is that we send properties of the previous section right now, which will be exactly what dmapper expects. Mapper().props(pProperties); Mapper().endParagraphGroup(); |