[ooo-build-commit] Branch 'ooo-build-3-1' - 2 commits - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Sat Jun 20 20:46:29 PDT 2009


 patches/dev300/scroll-accel-sc.diff  |   35 ++++++++++++++++++++++++++++-------
 patches/dev300/scroll-accel-vcl.diff |   19 +++++++++++--------
 2 files changed, 39 insertions(+), 15 deletions(-)

New commits:
commit fdb48a8ecc06554906bff5b1218c025b48182238
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Sat Jun 20 11:39:01 2009 -0400

    A minor tweak to prevent unnecessary timer re-start.
    
    * patches/dev300/scroll-accel-vcl.diff:

diff --git a/patches/dev300/scroll-accel-vcl.diff b/patches/dev300/scroll-accel-vcl.diff
index f22d4a9..b58f462 100644
--- a/patches/dev300/scroll-accel-vcl.diff
+++ b/patches/dev300/scroll-accel-vcl.diff
@@ -71,28 +71,31 @@ diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/sourc
      aWTimer.Start();
      if ( eSelMode != SINGLE_SELECTION )
      {
-@@ -488,3 +490,24 @@ void SelectionEngine::Command( const CommandEvent& rCEvt )
+@@ -488,3 +490,27 @@ void SelectionEngine::Command( const CommandEvent& rCEvt )
              nFlags &= ~SELENG_CMDEVT;
      }
  }
 +
 +void SelectionEngine::SetUpdateInterval( ULONG nInterval )
 +{
++    if (nInterval < SELENG_AUTOREPEAT_INTERVAL_MIN)
++        // Set a lower threshold.  On Windows, setting this value too low
++        // would cause selection to get updated indefinitely.
++        nInterval = SELENG_AUTOREPEAT_INTERVAL_MIN;
++
 +    if (nUpdateInterval == nInterval)
 +        // no update needed.
 +        return;
 +
-+    nUpdateInterval = nInterval;
-+    if (nUpdateInterval < SELENG_AUTOREPEAT_INTERVAL_MIN)
-+        // Set a lower threshold.  On Windows, setting this value too low
-+        // would cause selection to get updated indefinitely.
-+        nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MIN;
-+
 +    if (aWTimer.IsActive())
 +    {
 +        // reset the timer right away on interval change.
 +        aWTimer.Stop();
-+        aWTimer.SetTimeout(nUpdateInterval);
++        aWTimer.SetTimeout(nInterval);
 +        aWTimer.Start();
 +    }
++    else
++        aWTimer.SetTimeout(nInterval);
++
++    nUpdateInterval = nInterval;
 +}
commit 2c9d0995089381e5a8f0502925fd0786a5997826
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