diff options
author | Ruslan Kabatsayev <b7.10110111@gmail.com> | 2013-02-07 21:09:59 +0400 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-08 12:16:49 +0000 |
commit | 8880c773e779710dc0a08760e92afd709a73ca31 (patch) | |
tree | 4793c4b67f452a6db5637a2cc0ccea4a448016d2 | |
parent | 165a53f3a7f08e65055e08ecd4cfc068c5d353b8 (diff) |
Resolves: fdo#43650 Disable tooltip when scrolling writer docs via mouse wheel
Change-Id: I8e0d27b26afef08cc6ef963a2baadcddc78f6b27
-rw-r--r-- | sw/source/ui/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewport.cxx | 11 |
3 files changed, 13 insertions, 1 deletions
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; } |