[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kword/part/frames
From: Thomas Zander <zander () kde ! org>
Date: 2010-12-23 15:57:44
Message-ID: 20101223155744.2346A3E1FC () svn ! kde ! org
[Download RAW message or body]
SVN commit 1208890 by zander:
Make right-to-left counter placement work again.
M +9 -1 KWTextDocumentLayout.cpp
--- trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp #1208889:1208890
@@ -278,6 +278,11 @@
line.setPosition(QPointF(rect.x(), rect.y()));
return;
}
+ qreal rightIndent = 0;
+ if (m_state->layout->textOption().textDirection() == \
Qt::RightToLeft) { + rightIndent = \
qMax(m_state->shape->size().width() - width - leftIndent, 0.); + }
+
rect = limit(rect);
qreal movedDown = 0;
@@ -293,6 +298,9 @@
x += leftIndent;
effectiveLineWidth -= leftIndent;
}
+ if (rect.right() < leftIndent + width) { // limit moved the \
edge, keep the indent. + effectiveLineWidth -= \
rightIndent; + }
line.setLineWidth(effectiveLineWidth);
line.setPosition(QPointF(x, rect.y()));
}
@@ -300,7 +308,7 @@
QRectF newLine = limit(rect);
if (newLine.width() <= 0 || line.textLength() == 0
- || line.cursorToX(line.textStart(), QTextLine::Trailing) \
> newLine.right()) { + || line.naturalTextRect().left() > \
> newLine.right()) {
const int Move = 10;
movedDown += Move;
if (movedDown > m_state->shape->size().height() * 1.3) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic