How to get a bitmap of page or shape in a unit test?

Miklos Vajna vmiklos at collabora.com
Wed Feb 27 08:22:07 UTC 2019


Hi Regina,

On Tue, Feb 26, 2019 at 12:25:38AM +0100, Regina Henschel <rb.henschel at t-online.de> wrote:
> But the content of 'myfirstmetafile.xml' has no shape, but only the page.
> Background color and size of the page is correct.
> [Of cause, the file 'myfirstmetafile.xml' does not belong to a final
> solution.]
> 
> The problem is similar. I do not get the shape.

Oh, interesting. There is a GDIMetaFile::Write() to write a .svm file
for an in-memory GDIMetaFile (you can simply open that in Draw later). I
would try if writing to .svm has the shape you are interested in or not.

Depending on that, either the XML dumper for GDIMetaFile needs extending
or simply the preview metafile misses some content -- and then fixing
that would be nice.

(Or just do the same using the UI: open the document in question, close
it, and see the preview metafile in the start center.)

Regards,

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190227/b0687ea2/attachment.sig>


More information about the LibreOffice mailing list