summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-04-02 23:03:01 +0200
committerAshod Nakashian <ashnakash@gmail.com>2019-08-25 13:42:52 +0200
commit5c5ab9c1291235671261db39503e239117a952dd (patch)
treebe4d05f4be8a90e2b39786ccd8a5a7e09612c6fc /svx
parenteb581eff6ac41b938299b4c154ded6891bdd0c11 (diff)
pdfium: Returning a const std::shared_ptr<...>& is not recommended.
Change-Id: Iff6acef712c5b95c8cc222fc5293c9304b1c03ec (cherry picked from commit c0a3f61ef5c42d6cfa7484a2c759e7638da2c096) Reviewed-on: https://gerrit.libreoffice.org/77692 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 8ac19ae1525a..a51758add1f0 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
+std::shared_ptr<std::vector<sal_Int8>> const SdrGrafObj::getEmbeddedPdfData() const
{
return mpGraphicObject->GetGraphic().getPdfData();
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 1c64d13566d6..cf16f49be84c 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -760,7 +760,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(aStream.xStream));
if (bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData())
{
- const std::shared_ptr<std::vector<sal_Int8>>& rPdfData = aGraphic.getPdfData();
+ const std::shared_ptr<std::vector<sal_Int8>> rPdfData = aGraphic.getPdfData();
if (rPdfData && !rPdfData->empty())
{
// See if we have this PDF already, and avoid duplicate storage.
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 6aeca72a6eb1..f55d3ffa0f57 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -185,7 +185,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE|StreamMode::SHARE_DENYNONE|StreamMode::TRUNC);
if (SvStream* pOutStream = aMedium.GetOutStream())
{
- const std::shared_ptr<std::vector<sal_Int8>>& rPdfData = rGraphic.getPdfData();
+ const std::shared_ptr<std::vector<sal_Int8>> rPdfData(rGraphic.getPdfData());
pOutStream->WriteBytes(rPdfData->data(), rPdfData->size());
aMedium.Commit();
if (!aMedium.GetError())