[Libreoffice-commits] core.git: sw/source
Jan-Marek Glogowski
glogow at fbihome.de
Tue Aug 26 05:30:12 PDT 2014
sw/source/core/view/vdraw.cxx | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
New commits:
commit 2d66f9dc4723fdbccf4bd64edcc66bf31df078fa
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Sat Jul 12 13:34:01 2014 +0200
Better variable naming in SwViewImp::NotifySizeChg
Make it obvious, which variable contains the document boundaries and
which the draw / fly object boundaries.
Change-Id: I0bc2bcb5515e317c7a204b3458b92c61482e1a5c
Reviewed-on: https://gerrit.libreoffice.org/10974
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 0450eb1..d068a03 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -192,14 +192,14 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
GetPageView()->GetPage()->SetSize( rNewSz );
// Limitation of the work area
- const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
+ const Rectangle aDocRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
bool bCheckDrawObjs = false;
- if ( aRect != rOldWork )
+ if ( aDocRect != rOldWork )
{
- if ( rOldWork.Bottom() > aRect.Bottom() || rOldWork.Right() > aRect.Right())
+ if ( rOldWork.Bottom() > aDocRect.Bottom() || rOldWork.Right() > aDocRect.Right())
bCheckDrawObjs = true;
- GetDrawView()->SetWorkArea( aRect );
+ GetDrawView()->SetWorkArea( aDocRect );
}
if ( !bCheckDrawObjs )
return;
@@ -234,23 +234,23 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
continue;
}
- const Rectangle aBound( pObj->GetCurrentBoundRect() );
- if ( !aRect.IsInside( aBound ) )
+ const Rectangle aObjBound( pObj->GetCurrentBoundRect() );
+ if ( !aDocRect.IsInside( aObjBound ) )
{
Size aSz;
- if ( aBound.Left() > aRect.Right() )
- aSz.Width() = (aRect.Right() - aBound.Left()) - MINFLY;
- if ( aBound.Top() > aRect.Bottom() )
- aSz.Height() = (aRect.Bottom() - aBound.Top()) - MINFLY;
+ if ( aObjBound.Left() > aDocRect.Right() )
+ aSz.Width() = (aDocRect.Right() - aObjBound.Left()) - MINFLY;
+ if ( aObjBound.Top() > aDocRect.Bottom() )
+ aSz.Height() = (aDocRect.Bottom() - aObjBound.Top()) - MINFLY;
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
// Don't let large objects dissappear to the top
aSz.Width() = aSz.Height() = 0;
- if ( aBound.Bottom() < aRect.Top() )
- aSz.Width() = (aBound.Bottom() - aRect.Top()) - MINFLY;
- if ( aBound.Right() < aRect.Left() )
- aSz.Height() = (aBound.Right() - aRect.Left()) - MINFLY;
+ if ( aObjBound.Bottom() < aDocRect.Top() )
+ aSz.Width() = (aObjBound.Bottom() - aDocRect.Top()) - MINFLY;
+ if ( aObjBound.Right() < aDocRect.Left() )
+ aSz.Height() = (aObjBound.Right() - aDocRect.Left()) - MINFLY;
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
}
More information about the Libreoffice-commits
mailing list