diff options
author | László Németh <nemeth@numbertext.org> | 2019-02-20 12:32:21 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-02-21 10:51:45 +0100 |
commit | 4d32ad37b86200fe207dd1eda2bed11109b08d00 (patch) | |
tree | 54ea5133e54caa9e54fa94bc82963743fab283eb /writerfilter/source/rtftok/rtfdocumentimpl.cxx | |
parent | 30e7c7f2289cd59c36c00ba4defc52bf189ef77d (diff) |
tdf#123434 FILEOPEN: RTF: missing content in cells
Revert "tdf#122424 RTF import: ignore table row text outside the cells"
This reverts commit dc8fa612054363e1a871b0e413a59889fbdb156a.
Change-Id: Id68dc7ae55df013de64fb2d4955a412e4c046781
Reviewed-on: https://gerrit.libreoffice.org/68086
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 9e2d9fea060b..2d2d63ca5a4e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -301,8 +301,6 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x , m_hasRFooter(false) , m_hasFFooter(false) , m_bAfterCellBeforeRow(false) - , m_nCellsInRow(0) - , m_nActualCellInRow(0) { OSL_ASSERT(xInputStream.is()); m_pInStream = utl::UcbStreamHelper::CreateStream(xInputStream, true); @@ -1481,12 +1479,6 @@ void RTFDocumentImpl::text(OUString& rString) RTFBuffer_t* pCurrentBuffer = m_aStates.top().pCurrentBuffer; - if (m_nActualCellInRow > 0) - { - m_nActualCellInRow = 0; - m_nCellsInRow = 0; - } - if (!pCurrentBuffer && m_aStates.top().eDestination != Destination::FOOTNOTE) Mapper().startCharacterGroup(); else if (pCurrentBuffer) @@ -1628,7 +1620,6 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, RTFSprms* const pSprms, } else if (std::get<0>(aTuple) == BUFFER_CELLEND) { - m_nActualCellInRow++; assert(pSprms && pAttributes); auto pValue = new RTFValue(1); pSprms->set(NS_ooxml::LN_tblCell, pValue); @@ -1647,15 +1638,9 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, RTFSprms* const pSprms, } else if (std::get<0>(aTuple) == BUFFER_UTEXT) { - // ignore text outside the cell content in table rows - // except in the case of nested tables - if (m_nActualCellInRow == 0 || m_nActualCellInRow < m_nCellsInRow - || m_nCellsInRow == -1) - { - OUString const aString(std::get<1>(aTuple)->getString()); - Mapper().utext(reinterpret_cast<sal_uInt8 const*>(aString.getStr()), - aString.getLength()); - } + OUString const aString(std::get<1>(aTuple)->getString()); + Mapper().utext(reinterpret_cast<sal_uInt8 const*>(aString.getStr()), + aString.getLength()); } else if (std::get<0>(aTuple) == BUFFER_ENDRUN) Mapper().endCharacterGroup(); |