summaryrefslogtreecommitdiffstats
path: root/sw/source/core/layout/wsfrm.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-20 09:25:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-21 11:32:43 +0100
commita60ffa6985dec32cc73032a7774f58694a6ee9a7 (patch)
treee94b9c586e6db1dde0a69aeddbe067bf8be2a47d /sw/source/core/layout/wsfrm.cxx
parenttdf#103234 undo replacing text with formula (diff)
downloadcore-a60ffa6985dec32cc73032a7774f58694a6ee9a7.tar.gz
core-a60ffa6985dec32cc73032a7774f58694a6ee9a7.zip
loplugin:flatten in sw
Change-Id: I64176f48d90303f078e326c8838da9eb2daf8126 Reviewed-on: https://gerrit.libreoffice.org/44937 Tested-by: Jenkins <ci@libreoffice.org> 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.cxx75
1 files changed, 38 insertions, 37 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 08debf8408e2..01952039d9ee 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -2293,51 +2293,52 @@ void SwContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
else
UpdateAttr_( pOld, pNew, nInvFlags );
- if ( nInvFlags != 0 )
+ if ( nInvFlags == 0 )
+ return;
+
+ SwPageFrame *pPage = FindPageFrame();
+ InvalidatePage( pPage );
+ if ( nInvFlags & 0x01 )
+ SetCompletePaint();
+ if ( nInvFlags & 0x02 )
+ InvalidatePos_();
+ if ( nInvFlags & 0x04 )
+ InvalidateSize_();
+ if ( nInvFlags & 0x88 )
{
- SwPageFrame *pPage = FindPageFrame();
- InvalidatePage( pPage );
- if ( nInvFlags & 0x01 )
- SetCompletePaint();
- if ( nInvFlags & 0x02 )
- InvalidatePos_();
- if ( nInvFlags & 0x04 )
- InvalidateSize_();
- if ( nInvFlags & 0x88 )
+ if( IsInSct() && !GetPrev() )
{
- if( IsInSct() && !GetPrev() )
+ SwSectionFrame *pSect = FindSctFrame();
+ if( pSect->ContainsAny() == this )
{
- SwSectionFrame *pSect = FindSctFrame();
- if( pSect->ContainsAny() == this )
- {
- pSect->InvalidatePrt_();
- pSect->InvalidatePage( pPage );
- }
+ pSect->InvalidatePrt_();
+ pSect->InvalidatePage( pPage );
}
- InvalidatePrt_();
- }
- SwFrame* pNextFrame = GetIndNext();
- if ( pNextFrame && nInvFlags & 0x10)
- {
- pNextFrame->InvalidatePrt_();
- pNextFrame->InvalidatePage( pPage );
- }
- if ( pNextFrame && nInvFlags & 0x80 )
- {
- pNextFrame->SetCompletePaint();
}
- if ( nInvFlags & 0x20 )
+ InvalidatePrt_();
+ }
+ SwFrame* pNextFrame = GetIndNext();
+ if ( pNextFrame && nInvFlags & 0x10)
+ {
+ pNextFrame->InvalidatePrt_();
+ pNextFrame->InvalidatePage( pPage );
+ }
+ if ( pNextFrame && nInvFlags & 0x80 )
+ {
+ pNextFrame->SetCompletePaint();
+ }
+ if ( nInvFlags & 0x20 )
+ {
+ SwFrame* pPrevFrame = GetPrev();
+ if ( pPrevFrame )
{
- SwFrame* pPrevFrame = GetPrev();
- if ( pPrevFrame )
- {
- pPrevFrame->InvalidatePrt_();
- pPrevFrame->InvalidatePage( pPage );
- }
+ pPrevFrame->InvalidatePrt_();
+ pPrevFrame->InvalidatePage( pPage );
}
- if ( nInvFlags & 0x40 )
- InvalidateNextPos();
}
+ if ( nInvFlags & 0x40 )
+ InvalidateNextPos();
+
}
void SwContentFrame::UpdateAttr_( const SfxPoolItem* pOld, const SfxPoolItem* pNew,