diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-04-04 17:13:45 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-04-10 08:37:48 +0200 |
commit | 18caee072ccbd2be7b947ef2659204d3c18a05f1 (patch) | |
tree | 7bd188d6144c2ea10da7aa26e6be74b50d3068e3 | |
parent | c5e4eec3dd98f0c7ab7a59b08450748382afcea2 (diff) |
graphic: move access to cxx for PDFData and VectorGraphicData
We need strict control when PDFData and VectorGraphicData is
accessed and changed, so create access methods for PDFData and
move the access methods to cxx (for VectorGraphicData).
Change-Id: I39324a807a4db559bad5501b5913e62a0aeabf01
Reviewed-on: https://gerrit.libreoffice.org/52395
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | vcl/inc/impgraph.hxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 15 |
3 files changed, 22 insertions, 3 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 4496cfd84b82..a60296fde556 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -191,7 +191,11 @@ private: friend void WriteImpGraphic(SvStream& rOStm, const ImpGraphic& rImpGraphic); friend void ReadImpGraphic(SvStream& rIStm, ImpGraphic& rImpGraphic); - const VectorGraphicDataPtr& getVectorGraphicData() const { return maVectorGraphicData; } + const VectorGraphicDataPtr& getVectorGraphicData() const; + + const css::uno::Sequence<sal_Int8>& getPdfData() const; + + void setPdfData(const css::uno::Sequence<sal_Int8>& rPdfData); }; #endif // INCLUDED_VCL_INC_IMPGRAPH_HXX diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index b262f262601e..fdaaabf38612 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -552,12 +552,12 @@ const VectorGraphicDataPtr& Graphic::getVectorGraphicData() const void Graphic::setPdfData(const uno::Sequence<sal_Int8>& rPdfData) { ImplTestRefCount(); - mxImpGraphic->maPdfData = rPdfData; + mxImpGraphic->setPdfData(rPdfData); } const uno::Sequence<sal_Int8>& Graphic::getPdfData() const { - return mxImpGraphic->maPdfData; + return mxImpGraphic->getPdfData(); } OUString Graphic::getOriginURL() const diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index d74af6f18884..d32f93eab3b4 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -396,6 +396,21 @@ bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const return bRet; } +const VectorGraphicDataPtr& ImpGraphic::getVectorGraphicData() const +{ + return maVectorGraphicData; +} + +void ImpGraphic::setPdfData(const uno::Sequence<sal_Int8>& rPdfData) +{ + maPdfData = rPdfData; +} + +const uno::Sequence<sal_Int8>& ImpGraphic::getPdfData() const +{ + return maPdfData; +} + void ImpGraphic::ImplCreateSwapInfo() { if (!ImplIsSwapOut()) |