sd/source/ui/view/drviewsh.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit b25f59094794eb72eefdbbbca8ac69eb325120c8 Author: Justin Luth <justin.l...@collabora.com> Date: Tue May 22 19:32:25 2018 +0300 NFC sd misc cleanup: earlier exit, comments The exception in the case of a running slideshow has been around since the function was introduced, but more and more code has been building up in front of that if clause. Since no changes will be made, include that exception in the initial exit clause to avoid unnecessary computations. This cleanup is prep work for a bug fix. Change-Id: Ief0b07d8108e1576459486ef61f038443f64705f Reviewed-on: https://gerrit.libreoffice.org/54678 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index 40454bc331c6..54915188b498 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -58,6 +58,9 @@ void DrawViewShell::GotoBookmark(const OUString& rBookmark) void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) { + if ( SlideShow::IsRunning( GetViewShellBase() ) ) + return; + // tdf#98646 check if Rectangle which contains the bounds of the region to // be shown eventually contains values that cause overflows when processing // e.g. when calling GetWidth() @@ -72,7 +75,8 @@ void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rW // In older versions, if in X or Y the size of the object was // smaller than the visible area, the user-defined zoom was - // changed. This was decided to be a bug for 6.x, thus I developed a + // changed. This was decided to be a bug for + // StarOffice 6.x (Apr 2002), thus I developed a // version which instead handles X/Y bigger/smaller and visibility // questions separately const Size aLogicSize(rRect.GetSize()); @@ -90,7 +94,7 @@ void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rW rWin.Pop(); Size aVisAreaSize(aVisArea.GetSize()); - if (!aVisArea.IsInside(rRect) && !SlideShow::IsRunning( GetViewShellBase() ) ) + if ( !aVisArea.IsInside(rRect) ) { // object is not entirely in visible area sal_Int32 nFreeSpaceX(aVisAreaSize.Width() - aLogicSize.Width()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits