Kaydet (Commit) 7b091d76 authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Kohei Yoshida

fdo#87155: Avoid negative scaling (and assertion failures further on)

Change-Id: I4a1a96b785ced4364a325ac19975d29771afe122
Reviewed-on: https://gerrit.libreoffice.org/13396Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
Tested-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst f5607f7a
...@@ -1722,7 +1722,7 @@ void ScOutputData::DrawStrings( bool bPixelToLogic ) ...@@ -1722,7 +1722,7 @@ void ScOutputData::DrawStrings( bool bPixelToLogic )
long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin; long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin;
long nScaleSize = aVars.GetTextSize().Width(); // without margin 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; long nScale = ( nAvailable * 100 ) / nScaleSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment