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

sw_redlinehide: iterate merged nodes in SwLayIdle::DoIdleJob_()

Change-Id: I42924448749385bb0e5bc2c187e37053e104c0da
üst 2521aaa2
...@@ -1847,19 +1847,50 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) ...@@ -1847,19 +1847,50 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob )
if( !pCnt->IsTextFrame() ) if( !pCnt->IsTextFrame() )
return false; return false;
const SwTextNode* pTextNode = pCnt->GetNode()->GetTextNode(); SwTextFrame const*const pTextFrame(static_cast<SwTextFrame const*>(pCnt));
// sw_redlinehide: spell check only the nodes with visible content?
const SwTextNode* pTextNode = pTextFrame->GetTextNodeForParaProps();
bool bProcess = false; bool bProcess = false;
switch ( eJob ) for (size_t i = 0; pTextNode; )
{ {
case ONLINE_SPELLING : switch ( eJob )
bProcess = pTextNode->IsWrongDirty(); break; {
case AUTOCOMPLETE_WORDS : case ONLINE_SPELLING :
bProcess = pTextNode->IsAutoCompleteWordDirty(); break; bProcess = pTextNode->IsWrongDirty(); break;
case WORD_COUNT : case AUTOCOMPLETE_WORDS :
bProcess = pTextNode->IsWordCountDirty(); break; bProcess = pTextNode->IsAutoCompleteWordDirty(); break;
case SMART_TAGS : case WORD_COUNT :
bProcess = pTextNode->IsSmartTagDirty(); break; bProcess = pTextNode->IsWordCountDirty(); break;
case SMART_TAGS :
bProcess = pTextNode->IsSmartTagDirty(); break;
}
if (bProcess)
{
break;
}
if (sw::MergedPara const* pMerged = pTextFrame->GetMergedPara())
{
while (true)
{
++i;
if (i < pMerged->extents.size())
{
if (pMerged->extents[i].pNode != pTextNode)
{
pTextNode = pMerged->extents[i].pNode;
break;
}
}
else
{
pTextNode = nullptr;
break;
}
}
}
else
pTextNode = nullptr;
} }
if( bProcess ) if( bProcess )
......
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