summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index 0785f786366f..70dad4a5c8ee 100644
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -95,13 +95,13 @@ void ScrollBarManager::Connect (void)
mpVerticalScrollBar->SetScrollHdl (
LINK(
this,
- ScrollBarManager,
+ ScrollBarManager,
VerticalScrollBarHandler));
if (mpHorizontalScrollBar != NULL)
mpHorizontalScrollBar->SetScrollHdl (
LINK(
this,
- ScrollBarManager,
+ ScrollBarManager,
HorizontalScrollBarHandler));
}
@@ -121,14 +121,14 @@ void ScrollBarManager::Disconnect (void)
/** Placing the scroll bars is an iterative process. The visibility of one
scroll bar affects the remaining size and thus may lead to the other
- scroll bar becoming visible.
+ scroll bar becoming visible.
First we determine the visibility of the horizontal scroll bar. After
that we do the same for the vertical scroll bar. To have an initial
value for the required size we call the layouter before that. When one
of the two scroll bars is made visible then the size of the browser
window changes and a second call to the layouter becomes necessary.
- That call is made anyway after this method returns.
+ That call is made anyway after this method returns.
*/
Rectangle ScrollBarManager::PlaceScrollBars (const Rectangle& rAvailableArea)
{
@@ -155,11 +155,11 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea
// Place the scroll bar.
Size aScrollBarSize (mpHorizontalScrollBar->GetSizePixel());
mpHorizontalScrollBar->SetPosSizePixel (
- Point(aAvailableArea.Left(),
+ Point(aAvailableArea.Left(),
aAvailableArea.Bottom()-aScrollBarSize.Height()+1),
- Size (aAvailableArea.GetWidth() - GetVerticalScrollBarWidth(),
+ Size (aAvailableArea.GetWidth() - GetVerticalScrollBarWidth(),
aScrollBarSize.Height()));
-
+
// Restore the relative position.
mpHorizontalScrollBar->SetThumbPos(
(long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len()));
@@ -168,13 +168,13 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea
-
+
void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea)
{
if (mpVerticalScrollBar != NULL
&& mpVerticalScrollBar->IsVisible())
{
- view::Layouter::DoublePoint aLayouterPosition
+ view::Layouter::DoublePoint aLayouterPosition
= mrSlideSorter.GetView().GetLayouter().ConvertModelToLayouterCoordinates (
Point (0, mpVerticalScrollBar->GetThumbPos()));
@@ -239,10 +239,10 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro
mnHorizontalPosition = 0;
}
else
- mnHorizontalPosition =
+ mnHorizontalPosition =
double(mpHorizontalScrollBar->GetThumbPos())
/ double(mpHorizontalScrollBar->GetRange().Len());
-
+
mpHorizontalScrollBar->SetVisibleSize (aWindowModelSize.Width());
const long nWidth (mpContentWindow->PixelToLogic(
@@ -268,10 +268,10 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro
mnVerticalPosition = 0;
}
else
- mnVerticalPosition =
+ mnVerticalPosition =
double(mpVerticalScrollBar->GetThumbPos())
/ double(mpVerticalScrollBar->GetRange().Len());
-
+
mpVerticalScrollBar->SetVisibleSize (aWindowModelSize.Height());
const long nHeight (mpContentWindow->PixelToLogic(
@@ -313,7 +313,7 @@ IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar)
/ double(pScrollBar->GetRange().Len());
mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- -1,
+ -1,
nRelativePosition);
}
return TRUE;
@@ -324,7 +324,7 @@ IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar)
IMPL_LINK(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar)
{
- if (pScrollBar!=NULL
+ if (pScrollBar!=NULL
&& pScrollBar==mpHorizontalScrollBar.get()
&& pScrollBar->IsVisible()
&& mrSlideSorter.GetView().GetWindow()!=NULL)
@@ -542,15 +542,15 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
if (rMouseWindowPosition.X() < maScrollBorder.Width()
&& aWindowArea.Left() > aViewPixelArea.Left())
{
- nDx = -1 + (int)(mnHorizontalScrollFactor
+ nDx = -1 + (int)(mnHorizontalScrollFactor
* (rMouseWindowPosition.X() - maScrollBorder.Width()));
}
if (rMouseWindowPosition.X() >= (aWindowSize.Width() - maScrollBorder.Width())
&& aWindowArea.Right() < aViewPixelArea.Right())
{
- nDx = 1 + (int)(mnHorizontalScrollFactor
- * (rMouseWindowPosition.X() - aWindowSize.Width()
+ nDx = 1 + (int)(mnHorizontalScrollFactor
+ * (rMouseWindowPosition.X() - aWindowSize.Width()
+ maScrollBorder.Width()));
}
}
@@ -561,15 +561,15 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
if (rMouseWindowPosition.Y() < maScrollBorder.Height()
&& aWindowArea.Top() > aViewPixelArea.Top())
{
- nDy = -1 + (int)(mnVerticalScrollFactor
+ nDy = -1 + (int)(mnVerticalScrollFactor
* (rMouseWindowPosition.Y() - maScrollBorder.Height()));
}
if (rMouseWindowPosition.Y() >= (aWindowSize.Height() - maScrollBorder.Height())
&& aWindowArea.Bottom() < aViewPixelArea.Bottom())
{
- nDy = 1 + (int)(mnVerticalScrollFactor
- * (rMouseWindowPosition.Y() - aWindowSize.Height()
+ nDy = 1 + (int)(mnVerticalScrollFactor
+ * (rMouseWindowPosition.Y() - aWindowSize.Height()
+ maScrollBorder.Height()));
}
}
@@ -609,7 +609,7 @@ bool ScrollBarManager::RepeatAutoScroll (void)
if (mrSlideSorter.GetViewShell() != NULL)
{
mrSlideSorter.GetViewShell()->ScrollLines(
- maAutoScrollOffset.Width(),
+ maAutoScrollOffset.Width(),
maAutoScrollOffset.Height());
return true;
}