[ooo-build-commit] patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Sat Jun 20 01:12:24 PDT 2009
patches/dev300/scroll-accel-sc.diff | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
New commits:
commit f8657177cabf23766d2b32db747bb6ff65ac8994
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Sat Jun 20 04:08:01 2009 -0400
Slow down scrolling interval to prevent infinite scrolling.
My previous "fix" didn't entirely fix the infinite scrolling
problem during ref input mode. Let's set the lower threshold
for update intervals to 65 msec during ref mode (for the
Windows version only). (n#514395)
* patches/dev300/scroll-accel-sc.diff:
diff --git a/patches/dev300/scroll-accel-sc.diff b/patches/dev300/scroll-accel-sc.diff
index 6f87459..46ea965 100644
--- a/patches/dev300/scroll-accel-sc.diff
+++ b/patches/dev300/scroll-accel-sc.diff
@@ -11,10 +11,11 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/
public:
ScViewFunctionSet( ScViewData* pNewViewData );
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/select.cxx sc/source/ui/view/select.cxx
---- sc.clean/source/ui/view/select.cxx 2008-04-01 12:26:33.000000000 -0400
-+++ sc/source/ui/view/select.cxx 2008-04-03 18:13:03.000000000 -0400
-@@ -42,6 +42,7 @@
+diff --git sc/source/ui/view/select.cxx sc/source/ui/view/select.cxx
+index 26305d8..d337f50 100644
+--- sc/source/ui/view/select.cxx
++++ sc/source/ui/view/select.cxx
+@@ -37,6 +37,7 @@
#include <tools/urlobj.hxx>
#include <vcl/sound.hxx>
@@ -22,8 +23,17 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/
#include <sfx2/docfile.hxx>
#include "select.hxx"
-@@ -85,6 +86,72 @@ ScSplitPos ScViewFunctionSet::GetWhich()
- return pViewData->GetActivePart();
+@@ -49,6 +50,8 @@
+ #include "docsh.hxx"
+ #include "tabprotection.hxx"
+
++#define SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN 65
++
+ extern USHORT nScFillModeMouseModifier; // global.cxx
+
+ using namespace com::sun::star;
+@@ -81,6 +84,83 @@ ScSplitPos ScViewFunctionSet::GetWhich()
+ return pViewData->GetActivePart();
}
+ULONG ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
@@ -89,12 +99,23 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/
+ nUpdateInterval = nTmp;
+ }
+
++#ifdef WNT
++ ScTabViewShell* pViewShell = pViewData->GetViewShell();
++ bool bRefMode = pViewShell && pViewShell->IsRefInputMode();
++ if (bRefMode && nUpdateInterval < SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN)
++ // Lower the update interval during ref mode, because re-draw can be
++ // expensive on Windows. Making this interval too small would queue up
++ // the scroll/paint requests which would cause semi-infinite
++ // scrolls even after the mouse cursor is released. We don't have
++ // this problem on Linux.
++ nUpdateInterval = SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN;
++#endif
+ return nUpdateInterval;
+}
+
void ScViewFunctionSet::SetSelectionEngine( ScViewSelectionEngine* pSelEngine )
{
- pEngine = pSelEngine;
+ pEngine = pSelEngine;
@@ -263,10 +330,11 @@ BOOL __EXPORT ScViewFunctionSet::SetCurs
// Scrolling
More information about the ooo-build-commit
mailing list