summaryrefslogtreecommitdiff
path: root/svtools/source/graphic/grfcache.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-06-22 12:58:12 +0200
committerAshod Nakashian <ashnakash@gmail.com>2018-06-22 14:44:25 +0200
commit89626f5f52a80e719cb0fdbf533a4b21697db66a (patch)
tree3a6ca59b1ed93d4ff1a96f8ef8616ebde395fd3f /svtools/source/graphic/grfcache.cxx
parent3d2b4942214f586f22640e84f6d48fee475521fb (diff)
pdfium: Delay the swap out.
If we swap out too early, the constructor of GraphicObject forces a swap in, so we'd render everything during the load anyway. Change-Id: I0ea1a755242fd57ef28d082ce4bf534a32199f87 Reviewed-on: https://gerrit.libreoffice.org/56286 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'svtools/source/graphic/grfcache.cxx')
-rw-r--r--svtools/source/graphic/grfcache.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 8def38eca49f..ec6bc39457b8 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -83,6 +83,16 @@ GraphicID::GraphicID( const GraphicObject& rObj )
mnID3 = basegfx::fround(rRange.getHeight());
mnID4 = vcl_get_checksum(0, rSvgDataPtr->getSvgDataArray().getConstArray(), rSvgDataPtr->getSvgDataArrayLength());
}
+ else if (rGraphic.hasPdfData())
+ {
+ std::shared_ptr<css::uno::Sequence<sal_Int8>> pPdfData = rGraphic.getPdfData();
+ const BitmapEx& rBmpEx = rGraphic.GetBitmapEx();
+
+ mnID1 |= (rGraphic.getPageNumber() & 0x0fffffff);
+ mnID2 = rBmpEx.GetSizePixel().Width();
+ mnID3 = rBmpEx.GetSizePixel().Height();
+ mnID4 = vcl_get_checksum(0, pPdfData->getConstArray(), pPdfData->getLength());
+ }
else if( rGraphic.IsAnimated() )
{
const Animation aAnimation( rGraphic.GetAnimation() );