[Libreoffice-commits] core.git: include/svx include/vcl svx/source vcl/inc vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 26 08:47:07 UTC 2019


 include/svx/svdograf.hxx       |    2 +-
 include/vcl/graph.hxx          |    2 +-
 svx/source/svdraw/svdograf.cxx |    2 +-
 vcl/inc/impgraph.hxx           |    2 +-
 vcl/source/gdi/graph.cxx       |    2 +-
 vcl/source/gdi/impgraph.cxx    |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit c54df306b347a3ffe50fd5efac4a50b6e621d735
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 26 09:25:12 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 26 10:45:39 2019 +0200

    loplugin:returnconstval in new pdf code
    
    Change-Id: I11fdc9a0dcf745dacd516cfc8540a8fb67c45b6c
    Reviewed-on: https://gerrit.libreoffice.org/78106
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index a61144ced8d3..54858894baa3 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -202,7 +202,7 @@ public:
     GDIMetaFile getMetafileFromEmbeddedVectorGraphicData() const;
 
     bool isEmbeddedPdfData() const;
-    std::shared_ptr<std::vector<sal_Int8>> const getEmbeddedPdfData() const;
+    const std::shared_ptr<std::vector<sal_Int8>> & getEmbeddedPdfData() const;
     /// Returns the page number of the embedded data (typically to re-render or import it).
     sal_Int32 getEmbeddedPageNumber() const;
 
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 3559f9935a81..a09e5efa2086 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -225,7 +225,7 @@ public:
     const VectorGraphicDataPtr& getVectorGraphicData() const;
 
     void setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfData);
-    std::shared_ptr<std::vector<sal_Int8>> getPdfData() const;
+    const std::shared_ptr<std::vector<sal_Int8>> & getPdfData() const;
     bool hasPdfData() const;
 
     /// Set the page number of the multi-page source this Graphic is rendered from.
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index a51758add1f0..8c3c8adf7ccc 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -907,7 +907,7 @@ bool SdrGrafObj::isEmbeddedPdfData() const
    return mpGraphicObject->GetGraphic().hasPdfData();
 }
 
-std::shared_ptr<std::vector<sal_Int8>> const SdrGrafObj::getEmbeddedPdfData() const
+const std::shared_ptr<std::vector<sal_Int8>> & SdrGrafObj::getEmbeddedPdfData() const
 {
    return mpGraphicObject->GetGraphic().getPdfData();
 }
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index bd821eb05fb1..90e658c67308 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -228,7 +228,7 @@ private:
 
     const VectorGraphicDataPtr& getVectorGraphicData() const;
 
-    std::shared_ptr<std::vector<sal_Int8>> getPdfData() const;
+    const std::shared_ptr<std::vector<sal_Int8>> & getPdfData() const;
 
     void setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfData);
 
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 01e069eeead3..45a562d26d77 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -558,7 +558,7 @@ void Graphic::setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfData)
     mxImpGraphic->setPdfData(rPdfData);
 }
 
-std::shared_ptr<std::vector<sal_Int8>> Graphic::getPdfData() const
+const std::shared_ptr<std::vector<sal_Int8>> & Graphic::getPdfData() const
 {
     return mxImpGraphic->getPdfData();
 }
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index d60da42ebbc7..b1ce5fc83d1f 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -477,7 +477,7 @@ void ImpGraphic::setPdfData(const std::shared_ptr<std::vector<sal_Int8>>& rPdfDa
     mpPdfData = rPdfData;
 }
 
-std::shared_ptr<std::vector<sal_Int8>> ImpGraphic::getPdfData() const
+const std::shared_ptr<std::vector<sal_Int8>> & ImpGraphic::getPdfData() const
 {
     ensureAvailable();
 


More information about the Libreoffice-commits mailing list