30 m_contentDocument.layoutWithTextWidth(w);
35 m_contentDocument.setPageSize(size);
40 return m_contentDocument;
45 return contentDocumentData().document();
50 return m_contentDocument.document().defaultFont();
55 m_contentDocument.scaleFontsBy(factor);
60 m_contentDocument.updateTextValue(
id, newValue);
66 return m_contentDocument.asHtml();
73 qDebug() <<
"Dumping document:";
74 QTextCursor cursor( &m_contentDocument );
76 int currentBlock = -1;
78 const int blockNumber = cursor.block().blockNumber();
79 if ( blockNumber != currentBlock ) {
80 currentBlock = blockNumber;
81 qDebug() <<
" block" << currentBlock <<
"starts at char" << i;
82 QTextFormat::PageBreakFlags flags = cursor.block().blockFormat().pageBreakPolicy();
83 if ( flags & QTextFormat::PageBreak_AlwaysBefore )
84 qDebug() <<
" block" << currentBlock <<
"says: BREAK BEFORE";
85 if ( flags & QTextFormat::PageBreak_AlwaysAfter )
86 qDebug() <<
" block" << currentBlock <<
"says: BREAK AFTER";
88 const QChar ch = m_contentDocument.characterAt( i );
89 qDebug() <<
" char" << i << ch << ch.unicode();
91 if ( cursor.atEnd() ) {
92 qDebug() <<
" document ends at" << cursor.position();
95 cursor.movePosition( QTextCursor::NextCharacter );
104 return m_contentDocument.autoTableElements();
110 m_contentDocument.regenerateAutoTables();
115 m_contentDocument.regenerateAutoTableForModel(model);