[Libreoffice-commits] core.git: vcl/source
Julien Nabet
serval2412 at yahoo.fr
Tue Oct 25 11:29:33 UTC 2016
vcl/source/gdi/pdfextoutdevdata.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 88fb9d8f0aae0030fac75156f78818affae4298f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Oct 22 20:06:26 2016 +0200
tdf#99723: target ratio must be reached
to be sure we can avoid decompressing/recompressing
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=76ec54e8c9f3580450bca85236a4f5af0c328588
Change-Id: Iacd7b2419ea85756f936b17f04c4e495d15e5b81
Reviewed-on: https://gerrit.libreoffice.org/30163
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 2223ca3..34c448c 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -830,14 +830,18 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic,
{ 80, 1500 }, { 75, 1700 }
};
sal_Int32 nTargetRatio = 10000;
+ bool bIsTargetRatioReached = false;
for (auto & rRatio : aRatios)
{
if ( mnCompressionQuality > rRatio.mnQuality )
+ {
+ bIsTargetRatioReached = true;
break;
+ }
nTargetRatio = rRatio.mnRatio;
}
- return nCurrentRatio > nTargetRatio;
+ return ((nCurrentRatio > nTargetRatio) && bIsTargetRatioReached);
}
}
More information about the Libreoffice-commits
mailing list