summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfextoutdevdata.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-05-16 09:46:36 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-05-17 08:46:01 +0200
commit9fd6b6b1f5b83d923a47252b744358721761d9cf (patch)
tree873ebeb86597be94648003be0f9fabdea91b5903 /vcl/source/gdi/pdfextoutdevdata.cxx
parent2e3f5a1e2aad2ff9866d7a782a04bec7c29c0e43 (diff)
tdf#105954 PDF export, ReduceImageResolution: fix re-compressing large images
Expensive re-compress is not pointless when the user opts in to reduce resolution. Change-Id: I1e04c6d4f0d95d41808ef885082239645401b2e2 Reviewed-on: https://gerrit.libreoffice.org/54384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/pdfextoutdevdata.cxx')
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 2a7e7b1f0774..a36a056ddfd2 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -812,6 +812,11 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic,
// rOutputRect is the crop rectangle, re-compress cropped image.
return false;
+ if (mbReduceImageResolution)
+ // Reducing resolution was requested, implies that re-compressing is
+ // wanted.
+ return false;
+
if (rGraphic.GetGfxLink().GetDataSize() == 0)
return false;