From 8880c773e779710dc0a08760e92afd709a73ca31 Mon Sep 17 00:00:00 2001 From: Ruslan Kabatsayev Date: Thu, 7 Feb 2013 21:09:59 +0400 Subject: Resolves: fdo#43650 Disable tooltip when scrolling writer docs via mouse wheel Change-Id: I8e0d27b26afef08cc6ef963a2baadcddc78f6b27 --- 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(-) diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 573e4d7bca92..68383d4d2ef1 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 1d27f8d75ed2..1ad946c0863b 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 150ba01f6b07..729a42bed3d2 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; } -- cgit v1.2.3