summaryrefslogtreecommitdiff
path: root/emfio/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-09-18 17:52:41 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-09-18 21:24:38 +0200
commit01024ee24c6e89044c68051f6fd5f1264905e90c (patch)
tree4fbfc06d643f72cab1cf5525c921565d2fb90c65 /emfio/inc
parentccf35ce98771cac805aafa58a1bcfaba17c59a12 (diff)
[API CHANGE] tdf#136836 emfio: set size hint on inner PDF if used as shape fill
The bugdoc has a shape, its bitmap fill is an EMF, which is actually a PDF. The PDF is has a height of 5cm, but the shape has a height of 14 cm. Inform vcl::RenderPDFBitmaps() about the size of the shape, so the result won't be blurry. This approach makes sure that we don't unconditionally render at higher resolution, i.e. the "load a PDF of 100 pages into Online" use-case won't use more memory than before. API CHANGE, because the EMF reader is only available via UNO, though it's likely that no actual external code would ever invoke it directly. Change-Id: If1d8def0136d408a31a0cc54777a7f26430a0ff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102996 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'emfio/inc')
-rw-r--r--emfio/inc/emfreader.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/emfio/inc/emfreader.hxx b/emfio/inc/emfreader.hxx
index ec2c5273f650..39d576b64aed 100644
--- a/emfio/inc/emfreader.hxx
+++ b/emfio/inc/emfreader.hxx
@@ -34,6 +34,7 @@ namespace emfio
bool mbEMFPlusDualMode : 1;
/// Another format is read already, can ignore actual EMF data.
bool mbReadOtherGraphicFormat = false;
+ basegfx::B2DTuple maSizeHint;
bool ReadHeader();
// reads and converts the rectangle
@@ -47,6 +48,7 @@ namespace emfio
void ReadGDIComment(sal_uInt32 nCommentId);
/// Parses EMR_COMMENT_MULTIFORMATS.
void ReadMultiformatsComment();
+ void SetSizeHint(const basegfx::B2DTuple& rSizeHint) { maSizeHint = rSizeHint; }
private:
template <class T> void ReadAndDrawPolyPolygon(sal_uInt32 nNextPos);