diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 22:30:58 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 19:40:43 +0200 |
commit | 80a67ae825d80b4a6ab6d5e93f45d59a3b650f6d (patch) | |
tree | 813278c517b073d0b0bb6f3772c2d63c15171eef | |
parent | 5e610f70edfafe35288eb1a5ff5f55dc9398a9b3 (diff) |
sw_redlinehide: iterate merged nodes in SwLayIdle::DoIdleJob_()
Change-Id: I42924448749385bb0e5bc2c187e37053e104c0da
-rw-r--r-- | sw/source/core/layout/layact.cxx | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index a4df2477ea01..e98f19ccb771 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1847,19 +1847,50 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) if( !pCnt->IsTextFrame() ) 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; - switch ( eJob ) + for (size_t i = 0; pTextNode; ) { - case ONLINE_SPELLING : - bProcess = pTextNode->IsWrongDirty(); break; - case AUTOCOMPLETE_WORDS : - bProcess = pTextNode->IsAutoCompleteWordDirty(); break; - case WORD_COUNT : - bProcess = pTextNode->IsWordCountDirty(); break; - case SMART_TAGS : - bProcess = pTextNode->IsSmartTagDirty(); break; + switch ( eJob ) + { + case ONLINE_SPELLING : + bProcess = pTextNode->IsWrongDirty(); break; + case AUTOCOMPLETE_WORDS : + bProcess = pTextNode->IsAutoCompleteWordDirty(); break; + case WORD_COUNT : + 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 ) |