[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice
From: Thomas Zander <zander () kde ! org>
Date: 2010-04-01 21:19:24
Message-ID: 20100401211924.0E6A8AC88B () svn ! kde ! org
[Download RAW message or body]
SVN commit 1110097 by zander:
Make sure that on layout finish we emit finishedLayout()
This is required for the ToC, f-office and shapeResizing fixes
OK-ed by cyrille.
M +3 -0 kword/part/frames/KWTextDocumentLayout.cpp
M +4 -1 libs/kotext/KoTextDocumentLayout.cpp
M +4 -0 libs/kotext/KoTextDocumentLayout.h
--- trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp #1110096:1110097
@@ -627,6 +627,7 @@
m_frameSet->layoutDone();
cleanupAnchors();
+ emit finishedLayout();
return; // done!
} else if (m_state->shape == 0) {
TDEBUG << "encountered an 'end of page' break, we need an extra page to honor that!";
@@ -696,6 +697,7 @@
|| dynamic_cast<KWCopyShape*>(lastFrame)) {
m_state->clearTillEnd();
m_frameSet->layoutDone();
+ emit finishedLayout();
return; // done!
}
@@ -734,6 +736,7 @@
if (! m_state->setFollowupShape(m_dummyShape)) { // if I can't render into a dummy shape
m_state->clearTillEnd();
m_frameSet->layoutDone();
+ emit finishedLayout();
return; // done!
}
requestFrameResize = true;
--- trunk/koffice/libs/kotext/KoTextDocumentLayout.cpp #1110096:1110097
@@ -408,8 +408,10 @@
m_state->shape->update(QRectF(0, posY,
m_state->shape->size().width(), m_state->y() - posY));
- if (! moreText)
+ if (! moreText) {
+ emit finishedLayout();
return; // done!
+ }
continue;
}
if (m_state->numColumns() > 0)
@@ -420,6 +422,7 @@
while (m_state->addLine(line)) {
if (m_state->shape == 0) { // shape is full!
line.setPosition(QPointF(0, m_state->y() + 20));
+ emit finishedLayout();
return; // done!
}
line.setLineWidth(m_state->width());
--- trunk/koffice/libs/kotext/KoTextDocumentLayout.h #1110096:1110097
@@ -203,6 +203,10 @@
signals:
void shapeAdded(KoShape *shape);
+ /**
+ * Signal is emitted every time a layout run has finished and all text is positioned.
+ */
+ void finishedLayout();
public slots:
/// make sure we start a layout run (returns immediately)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic