summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-05-28 21:41:51 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-05-29 18:44:00 +0400
commite7f7f4092a337cc98076ff500fb209a7f4dbb6b1 (patch)
treeaa2cd4cb422aaf46c70cbe946428291122ae1148 /sw
parent2b508cf6b431c2faeec95340d192e7d917f3e7c7 (diff)
these SwScrollbar::IsVisible(false) calls does not make sense to me...
Change-Id: Ic58be239044f75f1ad7f70df45813b59a4610737
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/uiview/viewport.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 44bd8c4ae051..7acaa98250e1 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -870,13 +870,10 @@ void ViewResizePixel( const Window &rRef,
const sal_Bool bVLineal = pVLineal && pVLineal->IsVisible();
const long nVLinSzWidth = bVLineal ?
pVLineal->GetSizePixel().Width() : 0;
- long nHBSzHeight2= rHScrollbar.IsVisible( sal_False ) || !rHScrollbar.IsAuto() ?
- rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
- long nHBSzHeight =
- rHScrollbar.IsVisible(sal_True) || (rHScrollbar.IsVisible( sal_False ) && !rHScrollbar.IsAuto()) ?
- nHBSzHeight2:0;
- long nVBSzWidth = rVScrollbar.IsVisible(sal_True) || (rVScrollbar.IsVisible( sal_False ) && !rVScrollbar.IsAuto()) ?
- rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
+
+ long nScrollBarSize = rRef.GetSettings().GetStyleSettings().GetScrollBarSize();
+ long nHBSzHeight = rHScrollbar.IsVisible(true) ? nScrollBarSize : 0;
+ long nVBSzWidth = rVScrollbar.IsVisible(true) ? nScrollBarSize : 0;
if(pVLineal)
{
@@ -920,7 +917,7 @@ void ViewResizePixel( const Window &rRef,
aPos.X() += nVBSzWidth;
}
- Size aSize( rSize.Width(), nHBSzHeight2 );
+ Size aSize( rSize.Width(), nHBSzHeight );
if ( nVBSzWidth )
aSize.Width() -= nVBSzWidth;
rHScrollbar.SetPosSizePixel( aPos, aSize );
@@ -968,15 +965,10 @@ void ViewResizePixel( const Window &rRef,
aPos.Y() += aImgSz.Height();
pPageDownBtn->SetPosSizePixel( aPos, aImgSz );
-
- if( rHScrollbar.IsVisible( sal_False ) )
- {
- aScrollFillPos.X() = aPos.X();
-
- rScrollBarBox.SetPosSizePixel( aScrollFillPos,
- Size( nHBSzHeight, nVBSzWidth) );
- }
+ aScrollFillPos.X() = aPos.X();
}
+
+ rScrollBarBox.SetPosSizePixel( aScrollFillPos, Size( nHBSzHeight, nVBSzWidth) );
}
void SwView::ShowAtResize()