diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-03 09:33:44 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-03 09:34:34 +0100 |
commit | e6e9b853c55c8b6095617db4b3f79eeaf9a5acab (patch) | |
tree | 4199b922e1f1082996bddceef435cc1d6416f62a /writerfilter | |
parent | 65de9aa744fd51ee3d90a400f8413ae2805520ce (diff) |
writerfilter: RTFParserState is meant to be a struct with no member functions
So move its only member function to RTFDocumentImpl.
Change-Id: I93874c729bc21f0545f62e654577e4b9842e898c
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 12 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 59ad5eeb3e15..46852dafa668 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1615,7 +1615,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) m_aStates.top().eDestination = Destination::LEVELNUMBERS; break; case RTF_SHPPICT: - m_aStates.top().resetFrame(); + resetFrame(); m_aStates.top().eDestination = Destination::SHPPICT; break; case RTF_PICT: @@ -3013,7 +3013,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) // Ideally getDefaultSPRM() would take care of this, but it would not when we're buffering. m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_tabs, std::make_shared<RTFValue>()); } - m_aStates.top().resetFrame(); + resetFrame(); // Reset currently selected paragraph style as well. // By default the style with index 0 is applied. @@ -5643,8 +5643,8 @@ RTFError RTFDocumentImpl::popState() m_bNeedCr = m_bNeedCrOrig; if (aState.aFrame.inFrame()) { - // parBreak modify m_aStates.top() so we can't apply resetFrame directly on aState - m_aStates.top().resetFrame(); + // parBreak() modifies m_aStates.top() so we can't apply resetFrame() directly on aState + resetFrame(); parBreak(); // Save this state for later use, so we only reset frame status only for the first shape inside a frame. aState = m_aStates.top(); @@ -6330,9 +6330,9 @@ RTFParserState::RTFParserState(RTFDocumentImpl* pDocumentImpl) { } -void RTFParserState::resetFrame() +void RTFDocumentImpl::resetFrame() { - aFrame = RTFFrame(this); + m_aStates.top().aFrame = RTFFrame(&m_aStates.top()); } RTFColorTableEntry::RTFColorTableEntry() diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 257f4833cf12..faee9c2c9928 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -210,8 +210,6 @@ class RTFParserState { public: RTFParserState(RTFDocumentImpl* pDocumentImpl); - /// Resets aFrame. - void resetFrame(); RTFDocumentImpl* m_pDocumentImpl; RTFInternalState nInternalState; @@ -397,6 +395,8 @@ public: oox::GraphicHelper& getGraphicHelper(); /// Are we inside the stylesheet table? bool isStyleSheetImport(); + /// Resets m_aStates.top().aFrame. + void resetFrame(); private: SvStream& Strm(); |