Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2d95bb94 authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink

save the music shape also as an image in odf documents. The resolution of the...

save the music shape also as an image in odf documents. The resolution of the saved image should perhaps be made configurable, but now at least OOo will at least show something when loading a document with embedded music

svn path=/trunk/koffice/; revision=924794
parent 047b23ab
......@@ -142,8 +142,14 @@ void MusicShape::saveOdf( KoShapeSavingContext & context ) const
KoZoomHandler converter;
converter.setZoomAndResolution(100, previewDPI, previewDPI);
constPaint(painter, converter);
//img.save("/tmp/test.png");
// TODO: actually save the image
writer.startElement("draw:image");
// In the spec, only the xlink:href attribute is marked as mandatory, cool :)
QString name = context.imageHref(img);
writer.addAttribute("xlink:type", "simple" );
writer.addAttribute("xlink:show", "embed" );
writer.addAttribute("xlink:actuate", "onLoad");
writer.addAttribute("xlink:href", name);
writer.endElement(); // draw:image
// TODO: Save a preview svg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment