summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-21 16:15:45 +0100
committerAndras Timar <andras.timar@collabora.com>2014-11-23 14:30:29 +0100
commitcf33eca77f9946bffc6b6e00dabffb3535773aaf (patch)
tree43cd8d1f47bc6aeee23422569df0eafc7420445f /sd
parentfaf41f60b967118fbd23b5b42cd7abfc18f5a8b3 (diff)
Resolves: fdo#83588 Revert "center slide after changing zoom"
This reverts commit b179235f702e474b115ca479b603052f422346fd. (cherry picked from commit d1e9aa23a7b74e153479e0e23aac1c02cca48177) Change-Id: Ifb9444e77a28ac17e4dcc17725a4393ea0aa294e Reviewed-on: https://gerrit.libreoffice.org/12064 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/ViewShell.hxx1
-rw-r--r--sd/source/ui/view/viewshe2.cxx27
-rw-r--r--sd/source/ui/view/viewshel.cxx1
3 files changed, 0 insertions, 29 deletions
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 87edbc5a611e..ce5ea3152fb2 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -206,7 +206,6 @@ public:
virtual void UpdateScrollBars (void);
void Scroll(long nX, long nY);
void ScrollLines(long nX, long nY);
- void ScrollCenter();
virtual void SetZoom(long nZoom);
virtual void SetZoomRect(const Rectangle& rZoomRect);
void InitWindows(const Point& rViewOrigin, const Size& rViewSize,
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 8f91d6c75af0..5f98d68ba8f4 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -365,33 +365,6 @@ void ViewShell::SetZoom(long nZoom)
UpdateScrollBars();
}
-namespace
-{
- void CenterScrollBar(ScrollBar *pBar)
- {
- long nVisSize = pBar->GetVisibleSize();
- long nMin = pBar->GetRangeMin();
- long nMax = pBar->GetRangeMax();
- long nLen = nMax - nMin - nVisSize;
- long nPos = nMin + nLen/2;
- pBar->DoScroll(nPos);
- }
-}
-
-void ViewShell::ScrollCenter()
-{
- if (mpHorizontalScrollBar.get() != NULL)
- CenterScrollBar(mpHorizontalScrollBar.get());
-
- //zoom mode with no panning of the current slide, i.e. the
- //scrollbar is in change slide mode not pan slide mode
- if (IsPageFlipMode())
- return;
-
- if (mpVerticalScrollBar.get() != NULL)
- CenterScrollBar(mpVerticalScrollBar.get());
-}
-
/**
* Set zoom rectangle for active window. Sets all split windows to the same zoom
* factor.
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 17bcf5f8cd1b..28e272e229e4 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -683,7 +683,6 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
nNewZoom = std::min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom ));
SetZoom( nNewZoom );
- ScrollCenter(); //center slide after changing zoom
Invalidate( SID_ATTR_ZOOM );
Invalidate( SID_ATTR_ZOOMSLIDER );