[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-06-21 20:48:45
Message-ID: 20100621204845.924E2AC8E4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1140943 by mkruisselbrink:

make textY consistently refer to the bottom of the text in the cell, and not in the \
case of richtext the top. This fixes hyperlinks clicking and richtext in one cell.


 M  +4 -4      CellView.cpp  


--- trunk/koffice/kspread/ui/CellView.cpp #1140942:1140943
@@ -1133,7 +1133,7 @@
         QSharedPointer<QTextDocument> doc = d->richText;
         doc->setDefaultTextOption(d->textOptions());
         const QPointF position(coordinate.x() + indent,
-                               coordinate.y() + d->textY);
+                               coordinate.y() + d->textY - d->textHeight);
         painter.translate(position);
 
         QAbstractTextDocumentLayout::PaintContext ctx;
@@ -1643,7 +1643,7 @@
     case Style::VJustified:
     case Style::Top: {
         if (tmpAngle == 0 && tmpRichText) {
-            d->textY = effTop;
+            d->textY = effTop + d->textHeight;
         } else if (tmpAngle == 0) {
             d->textY = effTop + ascent;
         } else if (tmpAngle < 0) {
@@ -1676,7 +1676,7 @@
                 }
             }
         } else if (tmpRichText) {
-            d->textY = effBottom - d->textHeight;
+            d->textY = effBottom;
         } else if (tmpMultiRow && !tmpVerticalText) {
             // Is enough place available?
             if (effBottom - effTop - d->textHeight > 0) {
@@ -1719,7 +1719,7 @@
                 }
             }
         } else if (tmpRichText && !tmpVerticalText) {
-            d->textY = (h - d->textHeight) / 2;
+            d->textY = (h - d->textHeight) / 2 + d->textHeight;
         } else if (tmpMultiRow && !tmpVerticalText) {
             // Is enough place available?
             if (effBottom - effTop - d->textHeight > 0) {


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

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