pdf: deduplicate resources when copying from external PDF stream
commite528293bc17ecce92124e8dd8841bcea2bda562e
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Wed, 28 Oct 2020 12:55:23 +0000 (28 13:55 +0100)
committerMiklos Vajna <vmiklos@collabora.com>
Wed, 28 Oct 2020 17:24:24 +0000 (28 18:24 +0100)
tree7bebe3d37dd0348c5acf3be615ecf312cf789525
parent5245723d92e92773d4679b3cd60a70706e3b4782
pdf: deduplicate resources when copying from external PDF stream

When using external PDF stream/data (from PDF graphic objects),
make sure to copy the content of external PDF resources (fonts,
bitmaps, forms) only one time (by sharing the map between calls)
and every other use, just use the reference to the objects.

Change-Id: Ibaa632c8f74806eb195e69404551db6fd077a986
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104935
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
vcl/Library_vcl.mk
vcl/inc/pdf/ExternalPDFStreams.hxx [new file with mode: 0644]
vcl/inc/pdf/objectcopier.hxx
vcl/qa/cppunit/pdfexport/pdfexport.cxx
vcl/source/gdi/pdfobjectcopier.cxx
vcl/source/gdi/pdfwriter_impl.cxx
vcl/source/gdi/pdfwriter_impl.hxx
vcl/source/pdf/ExternalPDFStreams.cxx [new file with mode: 0644]