summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-09 16:29:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 10:00:41 +0200
commit0dc47739176493ded49b665c5fdfe0fe8fff39c1 (patch)
treebf2134e56b75652fcd0f48921ecddc27b1c04dd7 /starmath
parentf7936b8ccd0ce9bea3a5e780443e4ae8f35b9da1 (diff)
handle empty tools::Rectangle in SmDocShell::SetVisArea
Change-Id: Iccea3b686b02e03552fa5c836ee5a29103930d04 Reviewed-on: https://gerrit.libreoffice.org/72056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/document.cxx6
1 files changed, 4 insertions, 2 deletions
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 )