[Libreoffice-commits] core.git: sw/source

Michael Stahl Michael.Stahl at cib.de
Wed May 16 17:21:23 UTC 2018


 sw/source/core/text/itratr.hxx   |    8 +++++---
 sw/source/core/text/redlnitr.cxx |    4 +---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 851064d1b293e16372b5c1917c64f83eb5659e7c
Author: Michael Stahl <Michael.Stahl at cib.de>
Date:   Tue May 15 13:30:23 2018 +0200

    sw_redlinehide: SwAttrIter::m_pAttrSet is used once, in the ctor
    
    Change-Id: I44705fc14f5a7013da3b6425b0e001c03f617f19
    Reviewed-on: https://gerrit.libreoffice.org/54371
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 54aec69f4f4a..68d3801dc495 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -42,16 +42,19 @@ protected:
     SwAttrHandler m_aAttrHandler;
     SwViewShell *m_pViewShell;
     SwFont *m_pFont;
-    SwpHints  *m_pHints;
-    const SwAttrSet* m_pAttrSet;       // The char attribute set
+    SwpHints const* m_pHints;
     SwScriptInfo* m_pScriptInfo;
 
 private:
     VclPtr<OutputDevice> m_pLastOut;
+    /// count currently open hints, redlines, ext-input
     short m_nChgCnt;
     SwRedlineItr *m_pRedline;
+    /// current iteration index in HintStarts
     size_t m_nStartIndex;
+    /// current iteration index in HintEnds
     size_t m_nEndIndex;
+    /// current iteration index in text node
     sal_Int32 m_nPosition;
     sal_uInt8 m_nPropFont;
     o3tl::enumarray<SwFontScript, const void*> m_aMagicNo;
@@ -69,7 +72,6 @@ protected:
         : m_pViewShell(nullptr)
         , m_pFont(nullptr)
         , m_pHints(nullptr)
-        , m_pAttrSet(nullptr)
         , m_pScriptInfo(nullptr)
         , m_pLastOut(nullptr)
         , m_nChgCnt(0)
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 762361af52f0..fe3d9eb2b5ab 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -52,8 +52,6 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
 
     m_pScriptInfo = &rScrInf;
 
-    // attributes set at the whole paragraph
-    m_pAttrSet = rTextNode.GetpSwAttrSet();
     // attribute array
     m_pHints = rTextNode.GetpSwpHints();
 
@@ -80,7 +78,7 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
     // If any further attributes for the paragraph are given in pAttrSet
     // consider them during construction of the default array, and apply
     // them to the font
-    m_aAttrHandler.Init( aFontAccess.Get()->GetDefault(), m_pAttrSet,
+    m_aAttrHandler.Init(aFontAccess.Get()->GetDefault(), rTextNode.GetpSwAttrSet(),
                        *rTextNode.getIDocumentSettingAccess(), m_pViewShell, *m_pFont, bVertLayout );
 
     m_aMagicNo[SwFontScript::Latin] = m_aMagicNo[SwFontScript::CJK] = m_aMagicNo[SwFontScript::CTL] = nullptr;


More information about the Libreoffice-commits mailing list