diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdispatchsymbol.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 21 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4 |
3 files changed, 3 insertions, 32 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx index 248b0a709bd0..e3b212a1dfdd 100644 --- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx +++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx @@ -176,16 +176,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) case RTF_NESTCELL: { if (nKeyword == RTF_CELL) - { m_bAfterCellBeforeRow = true; - if (m_nCellsInRow != -1) - m_nCellsInRow++; - } - else - { - // in the case of nested tables, disable ignoring row text outside of cell content - m_nCellsInRow = -1; - } checkFirstRun(); if (m_bNeedPap) @@ -241,7 +232,6 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) case RTF_ROW: { m_bAfterCellBeforeRow = false; - m_nActualCellInRow = 0; if (m_aStates.top().nTableRowWidthAfter > 0) { // Add fake cellx / cell, RTF equivalent of 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(); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 25928dfd073e..cb957ef975b8 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -811,10 +811,6 @@ private: /// Are we after a \cell, but before a \row? bool m_bAfterCellBeforeRow; - /// cells in row, to ignore extra text content of the row - int m_nCellsInRow; - /// actual cell in row - int m_nActualCellInRow; }; } // namespace rtftok } // namespace writerfilter |