summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
index 6a85192f8418..76e9e411e81e 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -273,15 +273,19 @@ VisibleAreaScroller::VisibleAreaScroller (
// jump to within this distance of the final value and start the
// animation from there.
if (abs(aStart.X()-aEnd.X()) > gnMaxScrollDistance)
+ {
if (aStart.X() < aEnd.X())
maStart.X() = aEnd.X()-gnMaxScrollDistance;
else
maStart.X() = aEnd.X()+gnMaxScrollDistance;
+ }
if (abs(aStart.Y()-aEnd.Y()) > gnMaxScrollDistance)
+ {
if (aStart.Y() < aEnd.Y())
maStart.Y() = aEnd.Y()-gnMaxScrollDistance;
else
maStart.Y() = aEnd.Y()+gnMaxScrollDistance;
+ }
}