diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-04-29 02:02:08 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-04-29 09:23:04 +0200 |
commit | f9598b27815dbf9fa4010eda24e4f3f7cc90e3f2 (patch) | |
tree | 175ec06ef727b8509f019a5322abefb99acce02a /vcl/source/gdi/pdfwriter_impl.cxx | |
parent | 8b9c26218cb2c9526f69b40ff6f72ce757a464c2 (diff) |
improve: pdf export caching of jpeg bitmaps
* make cache size configurable (defaults to 15)
* have one cache object per PDFWriter instance, thus avoiding
accidentally caching JPEGs with different compression settings
Change-Id: I6664fc09b382f471cbe7c3e7aaedb3ebb5883b47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93112
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl.cxx')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index cb7f4cc17027..10758d84d639 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -41,6 +41,7 @@ #include <cppuhelper/implbase.hxx> #include <i18nlangtag/languagetag.hxx> #include <o3tl/numeric.hxx> +#include <officecfg/Office/Common.hxx> #include <osl/file.hxx> #include <osl/thread.h> #include <rtl/digest.h> @@ -1152,6 +1153,8 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, m_nCurrentStructElement( 0 ), m_bEmitStructure( true ), m_nNextFID( 1 ), + m_aPDFBmpCache( + officecfg::Office::Common::VCL::PDFExportImageCacheSize::get() ), m_nCurrentPage( -1 ), m_nCatalogObject(0), m_nSignatureObject( -1 ), |