diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-06 19:26:49 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-06 19:26:49 (GMT) |
commit | 7a5bca82738e6b782047e50a813972eccd928307 (patch) | |
tree | ada860439ffcc9b53c24972e4782ed19f2374247 /src/gui/text | |
parent | 69bc7ba41375e3f00b2111bda8d2743654960f71 (diff) | |
parent | 94759a0ed565b21c8dbfb4b12bfe6064f156b410 (diff) | |
download | Qt-7a5bca82738e6b782047e50a813972eccd928307.zip Qt-7a5bca82738e6b782047e50a813972eccd928307.tar.gz Qt-7a5bca82738e6b782047e50a813972eccd928307.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (42 commits)
QBoxLayout::setGeometry would not respect the widget min/max width
Revert "QStyleSheetStyle: Fixed some text croped when having padding with native border."
Use QFile:rename when moving items in QFileystemModel.
Revert "Add GLfloat[2][2] & GLfloat[3][3] uniform setters to QGLShaderProgram"
Fix default filter selection when using HideNameFilterDetails option.
Don't write out fo:word-spacing if its the default value.
Improved initial startup time for a QGLWidget ontop of EGL/X11.
Document the QGraphicsView::IndirectPainting flag
Display broken symlinks in the filesystem model.
Fix typo in autotest testcase name.
Fixed a bug with distribution of spans.
Make unit test more robust
Compile with QT_NO_DOCKWIDGET
Removed temporary QGLWidget created during QGLWidget/X11 initialization.
Fix test: The bug is now fixed
Fix auto-test failure on Windows
QScript: Lookup the native setter from the prototype
Implement QScript::QObjectDelegate::getOwnPropertyDescriptor
fix compilation in GL2 paint engine for Windows
Move QGLTextureGlyphCache into it's own file
...
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 1bd4dd6..dcc2e7d 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -484,6 +484,10 @@ void QTextOdfWriter::writeBlockFormat(QXmlStreamWriter &writer, QTextBlockFormat if (format.pageBreakPolicy() & QTextFormat::PageBreak_AlwaysAfter) writer.writeAttribute(foNS, QString::fromLatin1("break-after"), QString::fromLatin1("page")); } + if (format.hasProperty(QTextFormat::BackgroundBrush)) { + QBrush brush = format.background(); + writer.writeAttribute(foNS, QString::fromLatin1("background-color"), brush.color().name()); + } if (format.hasProperty(QTextFormat::BlockNonBreakableLines)) writer.writeAttribute(foNS, QString::fromLatin1("keep-together"), format.nonBreakableLines() ? QString::fromLatin1("true") : QString::fromLatin1("false")); @@ -552,8 +556,8 @@ void QTextOdfWriter::writeCharacterFormat(QXmlStreamWriter &writer, QTextCharFor } if (format.hasProperty(QTextFormat::FontLetterSpacing)) writer.writeAttribute(foNS, QString::fromLatin1("letter-spacing"), pixelToPoint(format.fontLetterSpacing())); - if (format.hasProperty(QTextFormat::FontWordSpacing)) - writer.writeAttribute(foNS, QString::fromLatin1("word-spacing"), pixelToPoint(format.fontWordSpacing())); + if (format.hasProperty(QTextFormat::FontWordSpacing) && format.fontWordSpacing() != 0) + writer.writeAttribute(foNS, QString::fromLatin1("word-spacing"), pixelToPoint(format.fontWordSpacing())); if (format.hasProperty(QTextFormat::FontUnderline)) writer.writeAttribute(styleNS, QString::fromLatin1("text-underline-type"), format.fontUnderline() ? QString::fromLatin1("single") : QString::fromLatin1("none")); @@ -610,9 +614,12 @@ void QTextOdfWriter::writeCharacterFormat(QXmlStreamWriter &writer, QTextCharFor } if (format.hasProperty(QTextFormat::ForegroundBrush)) { QBrush brush = format.foreground(); - // TODO writer.writeAttribute(foNS, QString::fromLatin1("color"), brush.color().name()); } + if (format.hasProperty(QTextFormat::BackgroundBrush)) { + QBrush brush = format.background(); + writer.writeAttribute(foNS, QString::fromLatin1("background-color"), brush.color().name()); + } writer.writeEndElement(); // style } |