writerfilter/source/rtftok/rtfdispatchsymbol.cxx | 6 +-- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 ++-- writerfilter/source/rtftok/rtfdocumentimpl.hxx | 43 +++++++++++++++-------- 3 files changed, 36 insertions(+), 21 deletions(-)
New commits: commit af57ab1a3fbe8ccdead53fc4dd54cd86b9db2cd9 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Feb 12 21:34:09 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Feb 13 09:02:54 2019 +0100 writerfilter: make RTF TableRowBuffer members private Change-Id: Id16726ad6f0cd5aeae0b55c817d02b315506e863 Reviewed-on: https://gerrit.libreoffice.org/67747 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx index ed97ad5c9a15..248b0a709bd0 100644 --- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx +++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx @@ -209,9 +209,9 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) tools::SvRef<TableRowBuffer> const pBuffer( new TableRowBuffer(m_aTableBufferStack.back(), m_aNestedTableCellsSprms, m_aNestedTableCellsAttributes, m_nNestedCells)); - prepareProperties(m_aStates.top(), pBuffer->pParaProperties, pBuffer->pFrameProperties, - pBuffer->pRowProperties, m_nNestedCells, - m_nNestedCurrentCellX - m_nNestedTRLeft); + prepareProperties(m_aStates.top(), pBuffer->GetParaProperties(), + pBuffer->GetFrameProperties(), pBuffer->GetRowProperties(), + m_nNestedCells, m_nNestedCurrentCellX - m_nNestedTRLeft); if (m_aTableBufferStack.size() == 1 || !m_aStates.top().pCurrentBuffer) { diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 5926db0dccf6..3785e99cd66b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1620,11 +1620,11 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, RTFSprms* const pSprms, { TableRowBuffer& rRowBuffer(*std::get<2>(aTuple)); - replayRowBuffer(rRowBuffer.buffer, rRowBuffer.cellsSprms, rRowBuffer.cellsAttributes, - rRowBuffer.nCells); + replayRowBuffer(rRowBuffer.GetBuffer(), rRowBuffer.GetCellsSprms(), + rRowBuffer.GetCellsAttributes(), rRowBuffer.GetCells()); - sendProperties(rRowBuffer.pParaProperties, rRowBuffer.pFrameProperties, - rRowBuffer.pRowProperties); + sendProperties(rRowBuffer.GetParaProperties(), rRowBuffer.GetFrameProperties(), + rRowBuffer.GetRowProperties()); } else if (std::get<0>(aTuple) == BUFFER_CELLEND) { diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index f34e2ae38463..9ef52152018a 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -61,7 +61,7 @@ class RTFParserState; class RTFDocumentImpl; class RTFTokenizer; class RTFSdrImport; -struct TableRowBuffer; +class TableRowBuffer; enum class RTFBorderState { @@ -122,24 +122,39 @@ using Buf_t = std::tuple<RTFBufferTypes, RTFValue::Pointer_t, tools::SvRef<Table using RTFBuffer_t = std::deque<Buf_t>; /// holds one nested table row -struct TableRowBuffer : public virtual SvRefBase +class TableRowBuffer : public virtual SvRefBase { - RTFBuffer_t buffer; - ::std::deque<RTFSprms> cellsSprms; - ::std::deque<RTFSprms> cellsAttributes; - int const nCells; - writerfilter::Reference<Properties>::Pointer_t pParaProperties; - writerfilter::Reference<Properties>::Pointer_t pFrameProperties; - writerfilter::Reference<Properties>::Pointer_t pRowProperties; + RTFBuffer_t m_aBuffer; + ::std::deque<RTFSprms> m_aCellsSprms; + ::std::deque<RTFSprms> m_aCellsAttributes; + int const m_nCells; + writerfilter::Reference<Properties>::Pointer_t m_pParaProperties; + writerfilter::Reference<Properties>::Pointer_t m_pFrameProperties; + writerfilter::Reference<Properties>::Pointer_t m_pRowProperties; +public: TableRowBuffer(RTFBuffer_t aBuffer, std::deque<RTFSprms> aSprms, - std::deque<RTFSprms> aAttributes, int const i_nCells) - : buffer(std::move(aBuffer)) - , cellsSprms(std::move(aSprms)) - , cellsAttributes(std::move(aAttributes)) - , nCells(i_nCells) + std::deque<RTFSprms> aAttributes, int const nCells) + : m_aBuffer(std::move(aBuffer)) + , m_aCellsSprms(std::move(aSprms)) + , m_aCellsAttributes(std::move(aAttributes)) + , m_nCells(nCells) + { + } + + RTFBuffer_t& GetBuffer() { return m_aBuffer; } + std::deque<RTFSprms>& GetCellsSprms() { return m_aCellsSprms; } + std::deque<RTFSprms>& GetCellsAttributes() { return m_aCellsAttributes; } + int GetCells() const { return m_nCells; } + writerfilter::Reference<Properties>::Pointer_t& GetParaProperties() + { + return m_pParaProperties; + } + writerfilter::Reference<Properties>::Pointer_t& GetFrameProperties() { + return m_pFrameProperties; } + writerfilter::Reference<Properties>::Pointer_t& GetRowProperties() { return m_pRowProperties; } }; /// An entry in the color table. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits