From 7b091d76d84ca915c0ca00ce3ce055af5b7f2b49 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 9 Dec 2014 17:58:53 +0200 Subject: fdo#87155: Avoid negative scaling (and assertion failures further on) Change-Id: I4a1a96b785ced4364a325ac19975d29771afe122 Reviewed-on: https://gerrit.libreoffice.org/13396 Reviewed-by: Kohei Yoshida Tested-by: Kohei Yoshida --- sc/source/ui/view/output2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc') 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; -- cgit