diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-04-19 08:57:08 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-04-19 08:57:08 (GMT) |
commit | 1e83011e2ac4a33b39d12807b71cd3bb3511a263 (patch) | |
tree | c2d64695ab67a39c5f08f0ade5ba6a1f328526a1 /src | |
parent | 4676dd62871da2b58452ebda477a04c25158bec4 (diff) | |
download | Qt-1e83011e2ac4a33b39d12807b71cd3bb3511a263.zip Qt-1e83011e2ac4a33b39d12807b71cd3bb3511a263.tar.gz Qt-1e83011e2ac4a33b39d12807b71cd3bb3511a263.tar.bz2 |
Odf export: Remove double namespace in tab-stops and fix table padding
According to the specification, the correct name of the tab-stops
element is style:tab-stops (and similar with style:tab-stop). The style
namespace seems to have been added twice by mistake in QTextOdfWriter.
Also: Fix a copy-paste bug when outputting left, right and bottom
padding for table cells.
Reviewed-by: Thomas Zander
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index d369bff0..7992de5 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -493,10 +493,10 @@ void QTextOdfWriter::writeBlockFormat(QXmlStreamWriter &writer, QTextBlockFormat format.nonBreakableLines() ? QString::fromLatin1("true") : QString::fromLatin1("false")); if (format.hasProperty(QTextFormat::TabPositions)) { QList<QTextOption::Tab> tabs = format.tabPositions(); - writer.writeStartElement(styleNS, QString::fromLatin1("style-tab-stops")); + writer.writeStartElement(styleNS, QString::fromLatin1("tab-stops")); QList<QTextOption::Tab>::Iterator iterator = tabs.begin(); while(iterator != tabs.end()) { - writer.writeEmptyElement(styleNS, QString::fromLatin1("style-tab-stop")); + writer.writeEmptyElement(styleNS, QString::fromLatin1("tab-stop")); writer.writeAttribute(styleNS, QString::fromLatin1("position"), pixelToPoint(iterator->position) ); QString type; switch(iterator->type) { @@ -511,7 +511,7 @@ void QTextOdfWriter::writeBlockFormat(QXmlStreamWriter &writer, QTextBlockFormat ++iterator; } - writer.writeEndElement(); // style-tab-stops + writer.writeEndElement(); // tab-stops } writer.writeEndElement(); // paragraph-properties @@ -698,11 +698,11 @@ void QTextOdfWriter::writeTableCellFormat(QXmlStreamWriter &writer, QTextTableCe if (padding > 0) writer.writeAttribute(foNS, QString::fromLatin1("padding-top"), pixelToPoint(padding)); if (format.bottomPadding() > 0) - writer.writeAttribute(foNS, QString::fromLatin1("padding-top"), pixelToPoint(format.bottomPadding())); + writer.writeAttribute(foNS, QString::fromLatin1("padding-bottom"), pixelToPoint(format.bottomPadding())); if (format.leftPadding() > 0) - writer.writeAttribute(foNS, QString::fromLatin1("padding-top"), pixelToPoint(format.leftPadding())); + writer.writeAttribute(foNS, QString::fromLatin1("padding-left"), pixelToPoint(format.leftPadding())); if (format.rightPadding() > 0) - writer.writeAttribute(foNS, QString::fromLatin1("padding-top"), pixelToPoint(format.rightPadding())); + writer.writeAttribute(foNS, QString::fromLatin1("padding-right"), pixelToPoint(format.rightPadding())); } if (format.hasProperty(QTextFormat::TextVerticalAlignment)) { |