diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-06-22 12:58:12 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-04-03 17:54:01 +0200 |
commit | 8aca771675f7f76c84bbbd117b9dc1cc9c5ada8b (patch) | |
tree | 75fc8d4ba7cd5f1ad922534b843a0a24daa5f829 /svtools | |
parent | 335113741b2f4672a7813d8e6410dc5ec1b45527 (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')
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 443cfa91aa90..0bb04b0c5d56 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -80,6 +80,16 @@ GraphicID::GraphicID( const GraphicObject& rObj ) mnID3 = basegfx::fround(rRange.getHeight()); mnID4 = vcl_get_checksum(0, rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()); } + 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() ); |