summaryrefslogtreecommitdiff
path: root/include/vcl/pdfextoutdevdata.hxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2016-02-08 14:24:15 +0000
committerMichael Meeks <michael.meeks@collabora.com>2016-02-09 00:09:08 +0000
commit76ec54e8c9f3580450bca85236a4f5af0c328588 (patch)
tree1c4d36e921be16426fc8a61c7a85bdc006e0fafa /include/vcl/pdfextoutdevdata.hxx
parente07ffae5046e9c91ef96026435cab84c3bcb4534 (diff)
tdf#97662 - Try to preserve original compressed JPEGs harder.
Avoiding de-compressing and re-compressing them saves lots of time too. Change-Id: Ie8eb68554627581b2f0584a55bbbdb43c9482bed Reviewed-on: https://gerrit.libreoffice.org/22219 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include/vcl/pdfextoutdevdata.hxx')
-rw-r--r--include/vcl/pdfextoutdevdata.hxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 265a5b328a76..d681ab072730 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -86,6 +86,8 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
bool mbExportNDests; //i56629
sal_Int32 mnFormsFormat;
sal_Int32 mnPage;
+ sal_Int32 mnCompressionQuality;
+ sal_Int32 mnMaxImageResolution;
css::lang::Locale maDocLocale;
PageSyncData* mpPageSyncData;
@@ -103,8 +105,6 @@ public:
void PlayGlobalActions( PDFWriter& rWriter );
-
-
bool GetIsExportNotes() const { return mbExportNotes;}
void SetIsExportNotes( const bool bExportNotes );
@@ -135,10 +135,16 @@ public:
sal_Int32 GetCurrentPageNumber() const { return mnPage;}
void SetCurrentPageNumber( const sal_Int32 nPage );
- bool GetIsLosslessCompression() const { return mbUseLosslessCompression;}
+ bool GetIsLosslessCompression() const { return mbUseLosslessCompression;}
void SetIsLosslessCompression( const bool bLosslessCompression );
- bool GetIsReduceImageResolution() const { return mbReduceImageResolution;}
+ sal_Int32 GetCompressionQuality() const { return mnCompressionQuality; }
+ void SetCompressionQuality( const sal_Int32 nQuality );
+
+ sal_Int32 GetMaxImageResolution() const { return mnMaxImageResolution; }
+ void SetMaxImageResolution( const sal_Int32 nQuality );
+
+ bool GetIsReduceImageResolution() const { return mbReduceImageResolution;}
void SetIsReduceImageResolution( const bool bReduceImageResolution );
const css::lang::Locale& GetDocumentLocale() const { return maDocLocale;}
@@ -176,9 +182,15 @@ public:
rOutputRect, e.g. for cropped graphics.
*/
void EndGroup( const Graphic& rGraphic,
- sal_uInt8 nTransparency,
+ sal_uInt8 nTransparency,
const Rectangle& rOutputRect,
const Rectangle& rVisibleOutputRect );
+
+ /// Detect if stream is compressed enough to avoid de-compress / scale & re-compress
+ bool HasAdequateCompression( const Graphic &rGraphic,
+ const Rectangle &rOutputRect,
+ const Rectangle &rVisibleOutputRect ) const;
+
//--->i56629
/** Create a new named destination to be used in a link to this document from another PDF document
(see PDF spec 1.4, 8.2.1)