diff options
author | Andrew den Exter <andrew.den.exter@qinetic.com.au> | 2019-05-13 12:09:04 +1000 |
---|---|---|
committer | Andrew den Exter <andrew.den.exter@qinetic.com.au> | 2019-05-13 13:03:07 +1000 |
commit | d661a22ae283c604e9e95eceeaf4e6b47e7e1753 (patch) | |
tree | 0f609549413a6f7a8d4e040c712b02ddc105d563 /src/gui | |
parent | 345f86a2d8d69c6d3cbae314028902f090f39a43 (diff) |
Write an anchor-type attribute when embedding images in an ODF document
Without this some readers will fail to display the image or position
the image at the start of a paragraph rather than inline.
Change-Id: I2b9257e3193e5e68eb20112017a0c23be1d06cb0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 1a96f7608f..1906502c10 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -510,6 +510,7 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF writer.writeAttribute(svgNS, QString::fromLatin1("width"), pixelToPoint(width)); writer.writeAttribute(svgNS, QString::fromLatin1("height"), pixelToPoint(height)); + writer.writeAttribute(textNS, QStringLiteral("anchor-type"), QStringLiteral("as-char")); writer.writeStartElement(drawNS, QString::fromLatin1("image")); writer.writeAttribute(xlinkNS, QString::fromLatin1("href"), filename); writer.writeEndElement(); // image |