diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-03-28 09:07:05 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-03-28 09:07:05 +0100 |
commit | a0ac37b9bc45c6016336447ab2ff5a5a251d5bdc (patch) | |
tree | 849c13579dcb34ffa6a0a28b47ab3ba9c7c30ac1 /vcl/source/gdi/impgraph.cxx | |
parent | f1552a8bb74a5eb07ad7e675a50f60dec935b9e3 (diff) |
Revert "pdfium: Share the GfxLink for PDF files."
This reverts commit 62654a8c29b945d00afe9f32e87b44ba0d8b84a2.
Diffstat (limited to 'vcl/source/gdi/impgraph.cxx')
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 6e837c979e78..2d73357ec43d 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -125,14 +125,6 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic) , maGraphicExternalLink(rImpGraphic.maGraphicExternalLink) , mnPageNumber(rImpGraphic.mnPageNumber) { - if( rImpGraphic.mpGfxLink ) - { - if (rImpGraphic.mpGfxLink->GetType() == GfxLinkType::NativePdf) - mpGfxLink = rImpGraphic.mpGfxLink; - else - mpGfxLink = std::make_shared<GfxLink>(*rImpGraphic.mpGfxLink); - } - if( rImpGraphic.mpAnimation ) { mpAnimation = o3tl::make_unique<Animation>( *rImpGraphic.mpAnimation ); @@ -245,18 +237,9 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic ) mbSwapOut = rImpGraphic.mbSwapOut; mpSwapFile = rImpGraphic.mpSwapFile; - if (rImpGraphic.mpGfxLink) - { - if (rImpGraphic.mpGfxLink->GetType() == GfxLinkType::NativePdf) - mpGfxLink = rImpGraphic.mpGfxLink; - else - { - mpGfxLink.reset(); - - mpGfxLink = std::make_shared<GfxLink>(*rImpGraphic.mpGfxLink); - } - } + mpGfxLink = rImpGraphic.mpGfxLink; + maVectorGraphicData = rImpGraphic.maVectorGraphicData; mpPdfData = rImpGraphic.mpPdfData; } @@ -1384,15 +1367,7 @@ bool ImpGraphic::ImplSwapIn( SvStream* xIStm ) void ImpGraphic::ImplSetLink(const GfxLink& rGfxLink) { - mpGfxLink = std::make_shared<GfxLink>( rGfxLink ); - - if( mpGfxLink->IsNative() ) - mpGfxLink->SwapOut(); -} - -void ImpGraphic::ImplSetSharedLink(const std::shared_ptr<GfxLink>& pGfxLink) -{ - mpGfxLink = pGfxLink; + mpGfxLink = rGfxLink; if (mpGfxLink && mpGfxLink->IsNative()) mpGfxLink->SwapOut(); |