sw/source/core/uibase/uiview/viewport.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
New commits: commit 8ad3b50dc02875d9a6da46d88b27b2bccf094652 Author: Michael Stahl <mst...@redhat.com> Date: Fri Mar 14 23:18:17 2014 +0100 replace ugly number with SAL_WHEELMOUSE_EVENT_PAGESCROLL Change-Id: If56d5a3fe325182907264882d6a1bf5fb979d969 diff --git a/sw/source/core/uibase/uiview/viewport.cxx b/sw/source/core/uibase/uiview/viewport.cxx index 21ecf81..30fa410 100644 --- a/sw/source/core/uibase/uiview/viewport.cxx +++ b/sw/source/core/uibase/uiview/viewport.cxx @@ -1250,7 +1250,8 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) m_bWheelScrollInProgress=true; } - if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines())) + if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && + (COMMAND_WHEEL_PAGESCROLL == pWData->GetScrollLines())) { if (pWData->GetDelta()<0) PhyPageDown(); commit 6795b251e2011cae945c6bb903de8053953b5e30 Author: Michael Stahl <mst...@redhat.com> Date: Fri Mar 14 23:08:11 2014 +0100 fdo#75460: sw: fix AutoScroll This reverts commit 5141201fba2d080841b81e02be92f4b47aae2684. which fixed a crash but unfortunately also prevents the m_pEditWin->HandleScrollCommand from being called, thus disabling AutoScroll. Fix the crash in the ugly way by another pWData check. (regression from 8880c773e779710dc0a08760e92afd709a73ca31) Change-Id: I958f1403ad23d0c0631eca5dbbef977a9ca1210d diff --git a/sw/source/core/uibase/uiview/viewport.cxx b/sw/source/core/uibase/uiview/viewport.cxx index 119e03e..21ecf81 100644 --- a/sw/source/core/uibase/uiview/viewport.cxx +++ b/sw/source/core/uibase/uiview/viewport.cxx @@ -1187,14 +1187,9 @@ void SwView::Move() sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) { - const CommandWheelData* pWData = rCEvt.GetWheelData(); - if (!pWData) - { - return sal_False; - } - sal_Bool bOk = sal_False; - if( COMMAND_WHEEL_ZOOM == pWData->GetMode() ) + const CommandWheelData* pWData = rCEvt.GetWheelData(); + if (pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode()) { long nFact = m_pWrtShell->GetViewOptions()->GetZoom(); if( 0L > pWData->GetDelta() ) @@ -1205,7 +1200,7 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) SetZoom( SVX_ZOOM_PERCENT, nFact ); bOk = sal_True; } - else if( COMMAND_WHEEL_ZOOM_SCALE == pWData->GetMode() ) + else if (pWData && COMMAND_WHEEL_ZOOM_SCALE == pWData->GetMode()) { // mobile touch zoom (pinch) section // remember the center location to reach in logic @@ -1249,13 +1244,13 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) } else { - if( pWData->GetMode()==COMMAND_WHEEL_SCROLL ) + if (pWData && pWData->GetMode()==COMMAND_WHEEL_SCROLL) { // This influences whether quick help is shown m_bWheelScrollInProgress=true; } - if( (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines()) ) + if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines())) { if (pWData->GetDelta()<0) PhyPageDown(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits