Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.4.0
-
None
-
Mac OS 10.10.3.
Description
I insert images into QTextDocument with
document()->addResource(QTextDocument::ImageResource, url, image);
QTextImageFormat imageFormat;
imageFormat.setWidth( image.width() );
imageFormat.setHeight( image.height() );
imageFormat.setName( url.toString() );
textCursor().insertImage(imageFormat);
If I write the document to file with QTextDocumentWriter, the output cannot be read by OpenOffice 4.0.1., probably because the document is not valid ODF1.2.
The document contains the following content fragment:
<text text:style-name="p1"><text:span>
<draw:frame draw:name="dropped_image_0" svg:width="231.75pt" svg:height="257.25pt">
<draw:image xlink:href="Pictures/Picture1"/>
</draw:frame>
</text:span></text>
<text text:style-name="p1"><text:span text:style-name="c4">yyy</text:span></text
>
According to ODF spec, <draw:image/> requires further mandatory type/show/actuate attributes.