QTextOdfWriter: fix exporting pixmaps to ODT
The QVariant returned by resource() can contain either a QPixmap or a QImage. The code here is now more similar to the one in qtextimagehandler.cpp.
Also, the quality is 0 when not set, in which case we want a nice PNG rather than a very very low quality JPG with just a few large blocks of same-color pixels.
Pick-to: 5.15 6.2 Change-Id: I49db542e2234c8068f85a636a81a7d8cdb7b5876 Reviewed-by: André Hartmann aha_1980@gmx.de Reviewed-by: Lars Knoll lars.knoll@qt.io (cherry picked from commit b67f887a)