summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdograf.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-04-11 12:02:47 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-04-12 11:34:07 +0200
commitd7a201ee95ffa10416290d8a1e0a2905664fb4ed (patch)
tree3fe26e00be8a031192440c2faaf9cefec5a5ce06 /svx/source/svdraw/svdograf.cxx
parent65f5484dd7ad8036f617685f2a76e5e2c24be298 (diff)
replace and remove VectorGraphicDataPtr typedef for the real type
There is no need to hide std::shared_ptr<VectorGraphicData> type under an alias name. It doesn't make the code more understandble and it usually is the exact opposite because we know with what type we are dealing with. Change-Id: Iec80ee99697ff2fe3a8275fc2787b5370510ebe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92069 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx/source/svdraw/svdograf.cxx')
-rw-r--r--svx/source/svdraw/svdograf.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 49c4c3175dd6..fc70e8bc1984 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -133,9 +133,9 @@ void SdrGrafObj::onGraphicChanged()
if (!mpGraphicObject || !mpGraphicObject->GetGraphic().isAvailable())
return;
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
- if (!rVectorGraphicDataPtr.get())
+ if (!rVectorGraphicDataPtr)
return;
// Skip for PDF as it is only a bitmap primitive in a sequence and
@@ -282,9 +282,9 @@ const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
{
if (!mpReplacementGraphicObject && mpGraphicObject)
{
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
- if (rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
const_cast< SdrGrafObj* >(this)->mpReplacementGraphicObject.reset(new GraphicObject(rVectorGraphicDataPtr->getReplacement()));
}
@@ -552,11 +552,11 @@ OUString SdrGrafObj::TakeObjNameSingul() const
if (!mpGraphicObject)
return OUString();
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
OUStringBuffer sName;
- if(rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
{
@@ -622,11 +622,11 @@ OUString SdrGrafObj::TakeObjNamePlural() const
if (!mpGraphicObject)
return OUString();
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
OUStringBuffer sName;
- if(rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
{