diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-07-31 22:43:51 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-02 10:18:21 +0200 |
commit | 44befa2b6c447fcf9f4b13dbb3c5ffd62a5bdbac (patch) | |
tree | 92b5b4bbe105bfa7c50cf134e4a070140725afe0 /writerfilter/source/rtftok/rtfdispatchsymbol.cxx | |
parent | 2af9630349011a192b21b65c49c91d64a5562fdf (diff) |
tdf#109790 RTF import: keep remembering paragraph style between \cell and \row
This is the opposite situation as tdf#44715, where the problem was that
style was not reset between in-cell paragraphs.
Here we don't want to reset the paragraph style too early, so that
direct (character) formatting isn't lost just because the theoretical
end-of-row character would not have the same direct formatting.
(cherry picked from commit aaa6a5202a447fb4e86d5f016d8e79fbc34a3ed7)
Conflicts:
writerfilter/source/rtftok/rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Change-Id: I9bb54f37804f5889fb10504ae890362a2e42122c
Reviewed-on: https://gerrit.libreoffice.org/40625
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdispatchsymbol.cxx')
-rw-r--r-- | writerfilter/source/rtftok/rtfdispatchsymbol.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx index 19040d06fd74..09b9b6c9c5ed 100644 --- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx +++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx @@ -174,6 +174,9 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) case RTF_CELL: case RTF_NESTCELL: { + if (nKeyword == RTF_CELL) + m_bAfterCellBeforeRow = true; + checkFirstRun(); if (m_bNeedPap) { @@ -230,6 +233,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) break; case RTF_ROW: { + m_bAfterCellBeforeRow = false; if (m_aStates.top().nTableRowWidthAfter > 0) { // Add fake cellx / cell, RTF equivalent of |