diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-26 09:15:25 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-30 12:13:14 +0100 |
commit | 46d233c026fd104f449bb99c1c6f80de34c9a4c6 (patch) | |
tree | 10a684ac6b5646c8077b5aca33c2c395c20f4d92 /sw/source/core/layout/flylay.cxx | |
parent | 94cf44656492e408ef6c7f6e18deffe519f22018 (diff) |
Migrated from SwFrame::FrameWA to setFrame
Change-Id: I01f7b828fe2134411cc76639e880da46b415d767
Diffstat (limited to 'sw/source/core/layout/flylay.cxx')
-rw-r--r-- | sw/source/core/layout/flylay.cxx | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index c1c84a8cfac3..f49909a16e86 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -297,25 +297,40 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz ) if ( !pHeader || !pHeader->IsHeaderFrame() ) { const long nOld = FrameRA().Top(); - FrameWA().Pos().Y() = std::max( aClip.Top(), nClipBot - FrameRA().Height() ); + SwRect aFrm(FrameRA()); + aFrm.Pos().Y() = std::max( aClip.Top(), nClipBot - aFrm.Height() ); + setFrame(aFrm); + if ( FrameRA().Top() != nOld ) + { bAgain = true; + } + m_bHeightClipped = true; } } if ( bRig ) { const long nOld = FrameRA().Left(); - FrameWA().Pos().X() = std::max( aClip.Left(), nClipRig - FrameRA().Width() ); + SwRect aFrm(FrameRA()); + aFrm.Pos().X() = std::max( aClip.Left(), nClipRig - aFrm.Width() ); + setFrame(aFrm); + if ( FrameRA().Left() != nOld ) { const SwFormatHoriOrient &rH = GetFormat()->GetHoriOrient(); // Left-aligned ones may not be moved to the left when they // are avoiding another one. if( rH.GetHoriOrient() == text::HoriOrientation::LEFT ) - FrameWA().Pos().X() = nOld; + { + SwRect aFrm(FrameRA()); + aFrm.Pos().X() = nOld; + setFrame(aFrm); + } else + { bAgain = true; + } } m_bWidthClipped = true; } @@ -420,8 +435,12 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz ) const long nPrtHeightDiff = FrameRA().Height() - PrintRA().Height(); const long nPrtWidthDiff = FrameRA().Width() - PrintRA().Width(); maUnclippedFrame = FrameRA(); - FrameWA().Height( aFrameRect.Height() ); - FrameWA().Width ( std::max( long(MINLAY), aFrameRect.Width() ) ); + + SwRect aFrm(FrameRA()); + aFrm.Height( aFrameRect.Height() ); + aFrm.Width ( std::max( long(MINLAY), aFrameRect.Width() ) ); + setFrame(aFrm); + if ( Lower() && Lower()->IsColumnFrame() ) { ColLock(); //lock grow/shrink |