summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-02 10:40:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-03 10:51:57 +0200
commit054c0e7177cbef26942f8ca7cb7b1422ceea721c (patch)
tree7390a1be5ee0797b7f43d7d433822315fd75c6dd /oox
parent0f499af8c2c22ccc8f1c19edeeb2bdac8cbcb7f0 (diff)
loplugin:simplifypointertobool improve
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ppt/pptshape.cxx4
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index edf527b67049..b28c9d07b223 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -348,7 +348,7 @@ void PPTShape::addShape(
} else
setMasterTextListStyle( aMasterTextListStyle );
- Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, mpPlaceholder.get() != nullptr, aTransformation, getFillProperties() ) );
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, bool(mpPlaceholder), aTransformation, getFillProperties() ) );
if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && mnSubType == XML_title)
{
try
@@ -369,7 +369,7 @@ void PPTShape::addShape(
}
// Apply text properties on placeholder text inside this placeholder shape
- if (meShapeLocation == Slide && mpPlaceholder.get() != nullptr && getTextBody() && getTextBody()->isEmpty())
+ if (meShapeLocation == Slide && mpPlaceholder && getTextBody() && getTextBody()->isEmpty())
{
Reference < XText > xText(mxShape, UNO_QUERY);
if (xText.is())
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index ab5dfdb8524c..0684814bc7cc 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -501,7 +501,7 @@ ShapeContextHandler::getShape()
mxWpgContext.clear();
}
}
- else if (mpShape.get() != nullptr)
+ else if (mpShape)
{
basegfx::B2DHomMatrix aTransformation;
mpShape->addShape(*mxFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() );