summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-12-09 17:58:53 +0200
committerKohei Yoshida <libreoffice@kohei.us>2014-12-11 21:22:22 +0000
commit7b091d76d84ca915c0ca00ce3ce055af5b7f2b49 (patch)
tree9390e59b08d831cb2f3d9668cd90f85f5b48ba72
parentf5607f7a440cc54a0a48582ae05c817c8c306b71 (diff)
fdo#87155: Avoid negative scaling (and assertion failures further on)
Change-Id: I4a1a96b785ced4364a325ac19975d29771afe122 Reviewed-on: https://gerrit.libreoffice.org/13396 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--sc/source/ui/view/output2.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index fc3535e1dc1a..e6d745eb6e08 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1722,7 +1722,7 @@ void ScOutputData::DrawStrings( bool bPixelToLogic )
long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin;
long nScaleSize = aVars.GetTextSize().Width(); // without margin
- if ( nScaleSize > 0 ) // 0 if the text is empty (formulas, number formats)
+ if ( nAvailable > 0 && nScaleSize > 0 ) // 0 if the text is empty (formulas, number formats)
{
long nScale = ( nAvailable * 100 ) / nScaleSize;