diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-04-07 15:22:06 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-06-01 08:59:12 +0200 |
commit | 7136f4f7a737d1af10a9f72adca0285757efe976 (patch) | |
tree | dab77cfdc5d4282bd6c7e02f2a02c033b0d940f1 /vcl | |
parent | 97aaca9355dda3fcf47888d634c9bd48f3771b95 (diff) |
svx: support breaking PDFs imported as images
Change-Id: I990c2b3c3055fbffddedc407c34beb5824277b38
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 9ed3ead27a68..8027d0d85b1d 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -121,8 +121,8 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic) , mbDummyContext(rImpGraphic.mbDummyContext) , maVectorGraphicData(rImpGraphic.maVectorGraphicData) , mpPdfData(rImpGraphic.mpPdfData) - , mnPageNumber(-1) , maGraphicExternalLink(rImpGraphic.maGraphicExternalLink) + , mnPageNumber(rImpGraphic.mnPageNumber) { if( rImpGraphic.mpGfxLink ) mpGfxLink = o3tl::make_unique<GfxLink>( *rImpGraphic.mpGfxLink ); @@ -148,8 +148,8 @@ ImpGraphic::ImpGraphic(ImpGraphic&& rImpGraphic) , mbDummyContext(rImpGraphic.mbDummyContext) , maVectorGraphicData(std::move(rImpGraphic.maVectorGraphicData)) , mpPdfData(std::move(rImpGraphic.mpPdfData)) - , mnPageNumber(-1) , maGraphicExternalLink(rImpGraphic.maGraphicExternalLink) + , mnPageNumber(rImpGraphic.mnPageNumber) { rImpGraphic.ImplClear(); rImpGraphic.mbDummyContext = false; @@ -180,7 +180,7 @@ ImpGraphic::ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr) mnSizeBytes( 0 ), mbSwapOut( false ), mbDummyContext ( false ), - maVectorGraphicData(rVectorGraphicDataPtr) + maVectorGraphicData(rVectorGraphicDataPtr), mnPageNumber(-1) { } @@ -1612,7 +1612,8 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) if (!rImpGraphic.mpPdfData) rImpGraphic.mpPdfData.reset(new uno::Sequence<sal_Int8>()); - if (vcl::ImportPDF(rIStm, aBitmap, *rImpGraphic.mpPdfData, + if (vcl::ImportPDF(rIStm, aBitmap, rImpGraphic.mnPageNumber, + *rImpGraphic.mpPdfData, rIStm.Tell(), nPdfDataLength)) { rImpGraphic.maEx = aBitmap; |