diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-10 20:47:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-11 11:20:43 +0200 |
commit | 2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch) | |
tree | b0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /sw/source/core/layout/wsfrm.cxx | |
parent | 74012c48d99634a7556a86f77e9522024f2afdb2 (diff) |
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/wsfrm.cxx')
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 9d93cf61733f..04035710861a 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -689,31 +689,31 @@ void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const } pRoot->SetIdleFlags(); - if (IsTextFrame()) + if (!IsTextFrame()) + return; + + SwTextFrame const*const pText(static_cast<SwTextFrame const*>(this)); + if (sw::MergedPara const*const pMergedPara = pText->GetMergedPara()) { - SwTextFrame const*const pText(static_cast<SwTextFrame const*>(this)); - if (sw::MergedPara const*const pMergedPara = pText->GetMergedPara()) + SwTextNode const* pNode(nullptr); + for (auto const& e : pMergedPara->extents) { - SwTextNode const* pNode(nullptr); - for (auto const& e : pMergedPara->extents) + if (e.pNode != pNode) { - if (e.pNode != pNode) + pNode = e.pNode; + if (pNode->IsGrammarCheckDirty()) { - pNode = e.pNode; - if (pNode->IsGrammarCheckDirty()) - { - pRoot->SetNeedGrammarCheck( true ); - break; - } + pRoot->SetNeedGrammarCheck( true ); + break; } } } - else + } + else + { + if (pText->GetTextNodeFirst()->IsGrammarCheckDirty()) { - if (pText->GetTextNodeFirst()->IsGrammarCheckDirty()) - { - pRoot->SetNeedGrammarCheck( true ); - } + pRoot->SetNeedGrammarCheck( true ); } } } |