summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-06 17:23:49 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-08 21:51:37 +0200
commit90cb0c4c43e744e058241c736b322337de5f0bc6 (patch)
treea900e13b75de9939d93fa5ad79cbf0ce559fa710 /sw
parent42c775b2b0f5cf0014a65b38927d5951886b199f (diff)
sw_redlinehide: SwAttrIter direct ctor gets a SwTextFrame arg
... and use it in SwTextPainter::CheckSpecialUnderline() Change-Id: I904cb955f0bc8dc1f92612b47dc129922865c198
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/itratr.hxx8
-rw-r--r--sw/source/core/text/itrpaint.cxx4
-rw-r--r--sw/source/core/text/redlnitr.cxx2
3 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 016f97c333bc..c47be02230d8 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -71,7 +71,7 @@ private:
protected:
void Chg( SwTextAttr const *pHt );
void Rst( SwTextAttr const *pHt );
- void CtorInitAttrIter(SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame * pFrame = nullptr);
+ void CtorInitAttrIter(SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame const* pFrame = nullptr);
explicit SwAttrIter(SwTextNode const * pTextNode)
: m_pViewShell(nullptr)
, m_pFont(nullptr)
@@ -93,7 +93,7 @@ public:
/// All subclasses of this always have a SwTextFrame passed to the
/// constructor, but SwAttrIter itself may be created without a
/// SwTextFrame in certain special cases via this ctor here
- SwAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf )
+ SwAttrIter(SwTextNode& rTextNode, SwScriptInfo& rScrInf, SwTextFrame const*const pFrame = nullptr)
: m_pViewShell(nullptr)
, m_pFont(nullptr)
, m_pScriptInfo(nullptr)
@@ -103,7 +103,9 @@ public:
, m_nPropFont(0)
, m_pTextNode(&rTextNode)
, m_pMergedPara(nullptr)
- { CtorInitAttrIter( rTextNode, rScrInf ); }
+ {
+ CtorInitAttrIter(rTextNode, rScrInf, pFrame);
+ }
virtual ~SwAttrIter();
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 295765d7f809..7e2458fcb2b9 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -596,8 +596,8 @@ void SwTextPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
{
// here starts the algorithm for calculating the underline font
SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo();
- SwAttrIter aIter( *GetInfo().GetTextFrame()->GetTextNode(),
- rScriptInfo );
+ SwAttrIter aIter(*GetInfo().GetTextFrame()->GetTextNodeFirst(),
+ rScriptInfo, GetTextFrame());
TextFrameIndex nTmpIdx = nIndx;
sal_uLong nSumWidth = 0;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 0640001dddb0..b7ded98a503b 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -189,7 +189,7 @@ void SwAttrIter::InitFontAndAttrHandler(SwTextNode const& rTextNode,
}
void SwAttrIter::CtorInitAttrIter(SwTextNode & rTextNode,
- SwScriptInfo & rScriptInfo, SwTextFrame *const pFrame)
+ SwScriptInfo & rScriptInfo, SwTextFrame const*const pFrame)
{
// during HTML-Import it can happen, that no layout exists
SwRootFrame* pRootFrame = rTextNode.getIDocumentLayoutAccess().GetCurrentLayout();