[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kspread/ui
From:       Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date:       2010-08-05 16:47:47
Message-ID: 20100805164747.617CEAC7BC () svn ! kde ! org
[Download RAW message or body]

SVN commit 1159570 by mkruisselbrink:

don't come into a nearly infinite loop if none of the text is going to fit in the \
                cell
BUG: 246826

 M  +1 -1      CellView.cpp  


--- trunk/koffice/kspread/ui/CellView.cpp #1159569:1159570
@@ -1421,7 +1421,7 @@
         start = qMin(d->displayText.length(), start);
         // Start out with the whole text, cut one character at a time, and
         // when the text finally fits, return it.
-        for (int i = start; i != 0; i--) {
+        for (int i = start; i >= 0; i--) {
             //Note that numbers are always treated as left-aligned since if we have \
                to cut digits off, they should
             //always be the least significant ones at the end of the string
             if (hAlign == Style::Left || hAlign == Style::HAlignUndefined || \
isNumeric)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic