[Libreoffice-commits] core.git: sd/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 21 08:19:18 PDT 2014
sd/source/ui/inc/ViewShell.hxx | 1 -
sd/source/ui/view/viewshe2.cxx | 27 ---------------------------
sd/source/ui/view/viewshel.cxx | 1 -
3 files changed, 29 deletions(-)
New commits:
commit d1e9aa23a7b74e153479e0e23aac1c02cca48177
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 21 16:15:45 2014 +0100
Resolves: fdo#83588 Revert "center slide after changing zoom"
This reverts commit b179235f702e474b115ca479b603052f422346fd.
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 8c53ccb..34f988d 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -205,7 +205,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 7408267..b540af7 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 343e4c4..52bff55 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -655,7 +655,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 );
More information about the Libreoffice-commits
mailing list