Kaydet (Commit) 90cb0c4c authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide: SwAttrIter direct ctor gets a SwTextFrame arg

... and use it in SwTextPainter::CheckSpecialUnderline()

Change-Id: I904cb955f0bc8dc1f92612b47dc129922865c198
üst 42c775b2
......@@ -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();
......
......@@ -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;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment