[Libreoffice-commits] core.git: sc/source

Tor Lillqvist tml at collabora.com
Thu Dec 11 13:22:51 PST 2014


 sc/source/ui/view/output2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7b091d76d84ca915c0ca00ce3ce055af5b7f2b49
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Dec 9 17:58:53 2014 +0200

    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 at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index fc3535e..e6d745e 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;
 


More information about the Libreoffice-commits mailing list