summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-04-19 23:10:49 +0300
committerTor Lillqvist <tml@iki.fi>2013-04-19 23:41:00 +0300
commite03dc2b84f820814d5da0eb0a5629d252dac75ca (patch)
tree3a78c9e2d555e548ac367a7b9c9ef4b30c62c8d0 /sw
parentb444e459c8a3e39c36e7cf6854bd1eae92b0e81a (diff)
Bin three useless variables and simplify
Change-Id: I9e015028ad7a3e0bbac4368a636fad52f0823383
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx22
1 files changed, 5 insertions, 17 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 3ddb9cba052d..5257693809be 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1211,28 +1211,15 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
lMult = 12;
}
+#ifndef MACOSX
+ // #i98766# - disable smooth scrolling for Mac
+
// #i75172# isolated static conditions
const bool bOnlyYScroll(!lXDiff && Abs(lYDiff) != 0 && Abs(lYDiff) < lMax);
const bool bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel(WINDOW_GETCLIPREGION_NOCHILDREN|WINDOW_GETCLIPREGION_NULL).IsNull());
-// --> OD 2009-08-12 #i98766# - disable smooth scrolling for Mac port builds
-#ifdef MACOSX
- const bool bSmoothScrollAllowed(false);
- (void) bOnlyYScroll;
- (void) bAllowedWithChildWindows;
-#else
const bool bSmoothScrollAllowed(bOnlyYScroll && mbEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
-#endif
-// <-
- const bool bIAmCursorShell(ISA(SwCrsrShell));
- (void) bIAmCursorShell;
- // #i75172# with selection on overlay, smooth scroll should be allowed with it
- const bool bAllowedForSelection(true || (bIAmCursorShell && !((SwCrsrShell*)this)->HasSelection()));
-
- // #i75172# with cursors on overlay, smooth scroll should be allowed with it
- const bool bAllowedForMultipleCursors(true || (bIAmCursorShell && ((SwCrsrShell*)this)->GetCrsrCnt() < 2));
-
- if(bSmoothScrollAllowed && bAllowedForSelection && bAllowedForMultipleCursors)
+ if(bSmoothScrollAllowed)
{
Imp()->bStopSmooth = sal_False;
@@ -1426,6 +1413,7 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
}
delete pVout;
}
+#endif
maVisArea.Pos().X() -= lXDiff;
maVisArea.Pos().Y() -= lYDiff;