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

sw_redlinehide: rename it to SwAttrIter::MaybeHasHints()

... because it's only used as an optimization currently, so we just use
the slow-path if there is a merged paragraph.

Change-Id: I8b577174e65edd0e5210971511e054fd719de96a
üst a3731a19
...@@ -96,6 +96,11 @@ SwAttrIter::~SwAttrIter() ...@@ -96,6 +96,11 @@ SwAttrIter::~SwAttrIter()
delete m_pFont; delete m_pFont;
} }
bool SwAttrIter::MaybeHasHints() const
{
return nullptr != m_pTextNode->GetpSwpHints() || nullptr != m_pMergedPara;
}
/** /**
* Returns the attribute for a position * Returns the attribute for a position
* *
......
...@@ -118,8 +118,8 @@ public: ...@@ -118,8 +118,8 @@ public:
bool SeekAndChgAttrIter(TextFrameIndex nPos, OutputDevice* pOut); bool SeekAndChgAttrIter(TextFrameIndex nPos, OutputDevice* pOut);
bool SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFont ); bool SeekStartAndChgAttrIter( OutputDevice* pOut, const bool bParaFont );
// Do we have an attribute change at all? // Do we possibly have nasty things like footnotes?
bool HasHints() const { return nullptr != m_pHints; } bool MaybeHasHints() const;
// Returns the attribute for a position // Returns the attribute for a position
SwTextAttr *GetAttr(TextFrameIndex nPos) const; SwTextAttr *GetAttr(TextFrameIndex nPos) const;
......
...@@ -322,7 +322,7 @@ void SwTextIter::TruncLines( bool bNoteFollow ) ...@@ -322,7 +322,7 @@ void SwTextIter::TruncLines( bool bNoteFollow )
if( pDel ) if( pDel )
{ {
m_pCurr->SetNext( nullptr ); m_pCurr->SetNext( nullptr );
if (HasHints() && bNoteFollow) if (MaybeHasHints() && bNoteFollow)
{ {
GetInfo().GetParaPortion()->SetFollowField( pDel->IsRest() || GetInfo().GetParaPortion()->SetFollowField( pDel->IsRest() ||
lcl_NeedsFieldRest( m_pCurr ) ); lcl_NeedsFieldRest( m_pCurr ) );
...@@ -367,7 +367,7 @@ void SwTextIter::TruncLines( bool bNoteFollow ) ...@@ -367,7 +367,7 @@ void SwTextIter::TruncLines( bool bNoteFollow )
{ {
m_pCurr->SetRealHeight( 1 ); m_pCurr->SetRealHeight( 1 );
} }
if (HasHints()) if (MaybeHasHints())
m_pFrame->RemoveFootnote( nEnd ); m_pFrame->RemoveFootnote( nEnd );
} }
......
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