diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-16 10:42:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-16 22:17:28 +0200 |
commit | f0eec7572dfa630f903e91ac44a41f3503112846 (patch) | |
tree | cfcae34dfac59705c8802f892e94b048cf8d2763 /sw/source/uibase/uiview/viewport.cxx | |
parent | 4e52299a6aff1386151223a99e7ed3a49496d967 (diff) |
ExternalZoom and ExternalScroll are unused
which leads to CommandWheelMode::ZOOM_SCALE becoming unused
and so touch/touch.h is unnecessary
Change-Id: I7cb9a4f6af2719deb0d768e35d514b59010daf79
Reviewed-on: https://gerrit.libreoffice.org/37671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/uiview/viewport.cxx')
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index e56fcd6c330c..c909c1dd8835 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -41,7 +41,6 @@ #include <usrpref.hxx> #include <pagedesc.hxx> #include <workctrl.hxx> -#include <touch/touch.h> #include <PostItMgr.hxx> @@ -1217,48 +1216,6 @@ bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) SetZoom( SvxZoomType::PERCENT, nFact ); bOk = true; } - else if (pWData && CommandWheelMode::ZOOM_SCALE == pWData->GetMode()) - { - // mobile touch zoom (pinch) section - // remember the center location to reach in logic - - Size winSize = GetViewFrame()->GetWindow().GetOutputSizePixel(); - Point centerInPixels(winSize.getWidth() / 2, winSize.getHeight() / 2); - const Point & preZoomTargetCenterInLogic = GetEditWin().PixelToLogic(centerInPixels); - - double scale = double(pWData->GetDelta()) / double(MOBILE_ZOOM_SCALE_MULTIPLIER); - - int preZoomByVCL = m_pWrtShell->GetViewOptions()->GetZoom(); - - // each zooming event is scaling the initial zoom - int zoomTarget = int(preZoomByVCL * scale); - - // thresholding the zoom - zoomTarget = std::max( MOBILE_MAX_ZOOM_OUT, std::min( MOBILE_MAX_ZOOM_IN, zoomTarget ) ); - - // no point zooming if the target zoom is the same as the current zoom - if(zoomTarget!=preZoomByVCL) - { - - SetZoom( SvxZoomType::PERCENT, zoomTarget ); - } - // we move to the center, and add additional tilt from center - const Point & postZoomTargetCenterInPixels = GetEditWin().LogicToPixel(preZoomTargetCenterInLogic); - long deltaX = rCEvt.GetMousePosPixel().X() + centerInPixels.X() - postZoomTargetCenterInPixels.X(); - long deltaY = rCEvt.GetMousePosPixel().Y() + centerInPixels.Y() - postZoomTargetCenterInPixels.Y(); - - if((deltaX!=0) || (deltaY!=0)) - { - - // scrolling the deltaX deltaY - Point deltaPoint( deltaX, deltaY ); - CommandWheelData cmd( 0, 0, 0, CommandWheelMode::SCROLL, 0, false, true); - CommandEvent event(deltaPoint , CommandEventId::Wheel, true, &cmd ); - m_pEditWin->HandleScrollCommand(event, m_pHScrollbar, m_pVScrollbar); - } - - bOk = true; - } else { if (pWData && pWData->GetMode()==CommandWheelMode::SCROLL) |