[Libreoffice-commits] core.git: vcl/inc vcl/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Tue Apr 10 06:38:11 UTC 2018
vcl/inc/impgraph.hxx | 6 +++++-
vcl/source/gdi/graph.cxx | 4 ++--
vcl/source/gdi/impgraph.cxx | 15 +++++++++++++++
3 files changed, 22 insertions(+), 3 deletions(-)
New commits:
commit 18caee072ccbd2be7b947ef2659204d3c18a05f1
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed Apr 4 17:13:45 2018 +0900
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 at libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
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())
More information about the Libreoffice-commits
mailing list