diff options
author | Justin Luth <justin.luth@collabora.com> | 2018-05-22 19:32:25 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-06-21 20:48:21 +0200 |
commit | b25f59094794eb72eefdbbbca8ac69eb325120c8 (patch) | |
tree | 29b40f39cf18e7fad885fb73c729018381d1d8df /sd | |
parent | fa72f1d1a05fd9b934966a432c83bb018e8c2dc3 (diff) |
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_luth@sil.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviewsh.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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()); |