diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-05-25 17:47:24 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 21:51:27 +0200 |
commit | 0d2acda04d591440f18101dc8a87823dea7840cf (patch) | |
tree | d86e796dc6ee786a934e97706b5cdc09a25a507b /sw | |
parent | b5c583c234f1ac636660045c2868ac354afaa033 (diff) |
sw_redlinehide: remove pointless Seek_ indirection
Change-Id: I30b13433ab1c42532a7dea852938b654a8f0a72a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/redlnitr.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/redlnitr.hxx | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index 6ab9578f4393..38b277445a9d 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -305,6 +305,7 @@ SwRedlineItr::SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt, } else m_pExt = nullptr; + assert(m_pExt || m_eMode != Mode::Ignore); // only create if necessary Seek(rFnt, m_nNdIdx, 0, COMPLETE_STRING); } @@ -316,7 +317,8 @@ SwRedlineItr::~SwRedlineItr() COVERITY_NOEXCEPT_FALSE // The return value of SwRedlineItr::Seek tells you if the current font // has been manipulated by leaving (-1) or accessing (+1) of a section -short SwRedlineItr::Seek_(SwFont& rFnt, sal_uLong const nNode, sal_Int32 const nNew, sal_Int32 const nOld) +short SwRedlineItr::Seek(SwFont& rFnt, + sal_uLong const nNode, sal_Int32 const nNew, sal_Int32 const nOld) { short nRet = 0; if( ExtOn() ) diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx index 75f975d4cd7a..f683eb86c846 100644 --- a/sw/source/core/text/redlnitr.hxx +++ b/sw/source/core/text/redlnitr.hxx @@ -89,7 +89,6 @@ private: void Clear_( SwFont* pFnt ); bool ChkSpecialUnderline_() const; void FillHints( std::size_t nAuthor, RedlineType_t eType ); - short Seek_(SwFont& rFnt, sal_uLong nNode, sal_Int32 nNew, sal_Int32 nOld); short EnterExtend(SwFont& rFnt, sal_uLong const nNode, sal_Int32 const nNew) { if (m_pExt) return m_pExt->Enter(rFnt, nNode, nNew); @@ -109,11 +108,7 @@ public: bool IsOn() const { return m_bOn || (m_pExt && m_pExt->IsOn()); } void Clear( SwFont* pFnt ) { if (m_bOn) Clear_( pFnt ); } void ChangeTextAttr( SwFont* pFnt, SwTextAttr const &rHt, bool bChg ); - short Seek(SwFont& rFnt, sal_uLong nNode, sal_Int32 nNew, sal_Int32 nOld) - { - if (m_eMode != Mode::Hide || m_pExt) return Seek_(rFnt, nNode, nNew, nOld); - return 0; - } + short Seek(SwFont& rFnt, sal_uLong nNode, sal_Int32 nNew, sal_Int32 nOld); void Reset() { if (m_nAct != m_nFirst) m_nAct = SwRedlineTable::npos; if (m_pExt) m_pExt->Reset(); |