diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-02-08 20:00:37 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-02-11 07:35:34 +0100 |
commit | c6a23023150c164a19236139fa413d43006ce21c (patch) | |
tree | b0fbf06dc669866166ed84626ad8bc98171b5647 /vcl/source | |
parent | d4a44dc4cd5b4a1679a5325bc202dc9ca39d75c5 (diff) |
Add origin URL to Graphic to remember where the image came from
Change-Id: I73e7377c2049211de0b464efff03058dc5de33a6
Reviewed-on: https://gerrit.libreoffice.org/49554
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/graph.cxx | 17 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 0505bf6e1172..69e962c8ee64 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -597,6 +597,23 @@ const uno::Sequence<sal_Int8>& Graphic::getPdfData() const return mxImpGraphic->maPdfData; } +OUString Graphic::getOriginURL() const +{ + if (mxImpGraphic) + { + return mxImpGraphic->getOriginURL(); + } + return OUString(); +} + +void Graphic::setOriginURL(OUString const & rOriginURL) +{ + if (mxImpGraphic) + { + mxImpGraphic->setOriginURL(rOriginURL); + } +} + namespace { struct Id: public rtl::Static<cppu::OImplementationId, Id> {}; diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 84aa0462c863..0e4ecc354ed1 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -120,6 +120,7 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic) , mbDummyContext(rImpGraphic.mbDummyContext) , maVectorGraphicData(rImpGraphic.maVectorGraphicData) , maPdfData(rImpGraphic.maPdfData) + , msOriginURL(rImpGraphic.msOriginURL) { if( rImpGraphic.mpGfxLink ) mpGfxLink = o3tl::make_unique<GfxLink>( *rImpGraphic.mpGfxLink ); @@ -145,6 +146,7 @@ ImpGraphic::ImpGraphic(ImpGraphic&& rImpGraphic) , mbDummyContext(rImpGraphic.mbDummyContext) , maVectorGraphicData(std::move(rImpGraphic.maVectorGraphicData)) , maPdfData(std::move(rImpGraphic.maPdfData)) + , msOriginURL(rImpGraphic.msOriginURL) { rImpGraphic.ImplClear(); rImpGraphic.mbDummyContext = false; @@ -211,6 +213,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic ) maSwapInfo = rImpGraphic.maSwapInfo; mpContext = rImpGraphic.mpContext; mbDummyContext = rImpGraphic.mbDummyContext; + msOriginURL = rImpGraphic.msOriginURL; mpAnimation.reset(); @@ -254,6 +257,7 @@ ImpGraphic& ImpGraphic::operator=(ImpGraphic&& rImpGraphic) mpGfxLink = std::move(rImpGraphic.mpGfxLink); maVectorGraphicData = std::move(rImpGraphic.maVectorGraphicData); maPdfData = std::move(rImpGraphic.maPdfData); + msOriginURL = rImpGraphic.msOriginURL; rImpGraphic.ImplClear(); rImpGraphic.mbDummyContext = false; @@ -373,6 +377,7 @@ void ImpGraphic::ImplClear() ImplClearGraphics(); meType = GraphicType::NONE; mnSizeBytes = 0; + msOriginURL.clear(); } void ImpGraphic::ImplSetDefaultType() |