diff options
author | Mark Page <aptitude@btconnect.com> | 2016-05-31 12:26:28 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-08 11:05:30 +0000 |
commit | f595e70cfee85a423f592190c607231cb00e3180 (patch) | |
tree | 40a57d2fa1222496081f39d5a3a05d3ccdaf7d72 /filter | |
parent | 5164ac456f3cb51949fe3bec293660fab74d26de (diff) |
Simplify GfxLink using smart pointers
Uses std::shared_ptr for sharing graphic data
Changed constructor to std::unique_ptr<sal_uInt8[]> to ensure
the delete[] operator is called when GfxLink internals takes
ownership of the data
Change-Id: I4edd4634df8d6ba4d94953260c1a7ac560ccf04a
Reviewed-on: https://gerrit.libreoffice.org/25402
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index d6ba321bfaad..79eaaf15ae50 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -730,8 +730,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) aGraphic); } - GfxLink aGfxLink( pBuf.get(), nPSSize, GfxLinkType::EpsBuffer ) ; - pBuf.release(); + GfxLink aGfxLink( std::move(pBuf), nPSSize, GfxLinkType::EpsBuffer ) ; aMtf.AddAction( static_cast<MetaAction*>( new MetaEPSAction( Point(), Size( nWidth, nHeight ), aGfxLink, aGraphic.GetGDIMetaFile() ) ) ); CreateMtfReplacementAction( aMtf, rStream, nOrigPos, nPSSize, nPosWMF, nSizeWMF, nPosTIFF, nSizeTIFF ); |