[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-07-28 5:23:44
Message-ID: 20100728052344.97F0EAC7A9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1155807 by mkruisselbrink:

When checking if we can obscure other cells, not only the leftmost cell beneath the \
current one needs to be empty, but all cells that would be obscured (in case the cell \
we're drawing spans multiple columns).

 M  +10 -2     CellView.cpp  


--- trunk/koffice/kspread/ui/CellView.cpp #1155806:1155807
@@ -991,7 +991,6 @@
         QColor bgColor = d->style.backgroundColor();
         if (bgColor.isValid()) {
             qreal contrast = KColorUtils::contrastRatio(bgColor, textColorPrint);
-            kDebug() << bgColor << textColorPrint << contrast;
             if (contrast < 3)
                 textColorPrint = QColor(255 - textColorPrint.red(), 255 - \
textColorPrint.green(), 255 - textColorPrint.blue());  }
@@ -1852,7 +1851,16 @@
         while (status == Undefined) {
             Cell nextCell = Cell(masterCell.sheet(), masterCell.column(), row + \
1).masterCell();  
-            if (nextCell.isEmpty()) {
+            bool isEmpty = true;
+            
+            for (int col = 0; col < masterCell.mergedXCells() + d->obscuredCellsX+1; \
col++) { +                Cell cellNext = Cell(masterCell.sheet(), \
masterCell.column() + col, row + 1).masterCell(); +                if \
(!cellNext.isEmpty()) { +                    isEmpty = false;
+                    break;
+                }
+            }
+            if (isEmpty) {
                 extraHeight += nextCell.height();
                 row += 1 + nextCell.mergedYCells();
 


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

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