starmath/source/document.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 0dc47739176493ded49b665c5fdfe0fe8fff39c1
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu May 9 16:29:26 2019 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri May 10 10:00:41 2019 +0200

    handle empty tools::Rectangle in SmDocShell::SetVisArea
    
    Change-Id: Iccea3b686b02e03552fa5c836ee5a29103930d04
    Reviewed-on: https://gerrit.libreoffice.org/72056
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index f6bc36c7d325..58a4c073bb09 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1225,8 +1225,10 @@ void SmDocShell::SetVisArea(const tools::Rectangle & 
rVisArea)
 
     aNewRect.SetPos(Point());
 
-    if (! aNewRect.Right()) aNewRect.SetRight( 2000 );
-    if (! aNewRect.Bottom()) aNewRect.SetBottom( 1000 );
+    if (aNewRect.IsWidthEmpty())
+        aNewRect.SetRight( 2000 );
+    if (aNewRect.IsHeightEmpty())
+        aNewRect.SetBottom( 1000 );
 
     bool bIsEnabled = IsEnableSetModified();
     if ( bIsEnabled )
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to