[Libreoffice-commits] core.git: 2 commits - sw/source
Tor Lillqvist
tml at iki.fi
Fri Apr 19 13:41:22 PDT 2013
sw/source/core/view/viewsh.cxx | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
New commits:
commit 8a5993aeea148ae5d84b4ab8f5116075d9456a5d
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Apr 19 23:29:31 2013 +0300
While at it, disable "smooth scroll" for Android and iOS, too
The display updating happens in such a roundabout fashion that
attempting smooth scrolling here can't have any useful effect.
Change-Id: Iac085ea2ed6bad7a644e889f40fef1e329a041c9
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 5257693..da4ab58 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1211,7 +1211,7 @@ sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRe
lMult = 12;
}
-#ifndef MACOSX
+#if !defined(MACOSX) && !defined(ANDROID) && !defined(IOS)
// #i98766# - disable smooth scrolling for Mac
// #i75172# isolated static conditions
commit e03dc2b84f820814d5da0eb0a5629d252dac75ca
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Apr 19 23:10:49 2013 +0300
Bin three useless variables and simplify
Change-Id: I9e015028ad7a3e0bbac4368a636fad52f0823383
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 3ddb9cb..5257693 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;
More information about the Libreoffice-commits
mailing list