[Libreoffice-commits] core.git: sw/source

Ruslan Kabatsayev b7.10110111 at gmail.com
Fri Feb 8 04:19:35 PST 2013


 sw/source/ui/inc/view.hxx        |    2 ++
 sw/source/ui/uiview/view.cxx     |    1 +
 sw/source/ui/uiview/viewport.cxx |   11 ++++++++++-
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 8880c773e779710dc0a08760e92afd709a73ca31
Author: Ruslan Kabatsayev <b7.10110111 at gmail.com>
Date:   Thu Feb 7 21:09:59 2013 +0400

    Resolves: fdo#43650 Disable tooltip when scrolling writer docs via mouse wheel
    
    Change-Id: I8e0d27b26afef08cc6ef963a2baadcddc78f6b27

diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 573e4d7..68383d4 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -243,6 +243,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
     sal_uInt16          nLeftBorderDistance;
     sal_uInt16          nRightBorderDistance;
 
+    bool mbWheelScrollInProgress;
+
     sal_Bool            bCenterCrsr : 1,
                     bTopCrsr : 1,
                     bAllwaysShowSel : 1,
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 1d27f8d..1ad946c 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -744,6 +744,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
     nLastPasteDestination( 0xFFFF ),
     nLeftBorderDistance( 0 ),
     nRightBorderDistance( 0 ),
+    mbWheelScrollInProgress(false),
     bInMailMerge(sal_False),
     bInDtor(sal_False),
     bOldShellWasPagePreView(sal_False),
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 150ba01f..729a42b 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -692,7 +692,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
         {
 
             //QuickHelp:
-            if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
+            if( !mbWheelScrollInProgress && pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
             {
                 if( !nPgNum || nPgNum != nPhNum )
                 {
@@ -1290,6 +1290,12 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
     }
     else
     {
+        if(pWData->GetMode()==COMMAND_WHEEL_SCROLL)
+        {
+            // This influences whether quick help is shown
+            mbWheelScrollInProgress=true;
+        }
+
         if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines()))
             {
                         if (pWData->GetDelta()<0)
@@ -1301,6 +1307,9 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
         else
             bOk = pEditWin->HandleScrollCommand( rCEvt,
                             pHScrollbar, pVScrollbar);
+
+        // Restore default state for case when scroll command comes from dragging scrollbar handle
+        mbWheelScrollInProgress=false;
     }
     return bOk;
 }


More information about the Libreoffice-commits mailing list