summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-16 15:23:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 08:25:47 +0200
commitccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch)
tree2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /filter
parentda5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff)
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/eschesdo.cxx4
-rw-r--r--filter/source/msfilter/mstoolbar.cxx4
-rw-r--r--filter/source/svg/svgfilter.cxx9
-rw-r--r--filter/source/svg/svgwriter.cxx16
4 files changed, 18 insertions, 15 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 0485d6f55930..43b8195680bc 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -241,9 +241,9 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if ( InteractionInfo* pInteraction = mpHostAppData ? mpHostAppData->GetInteractionInfo():nullptr )
{
const std::unique_ptr< SvMemoryStream >& pMemStrm = pInteraction->getHyperlinkRecord();
- if ( pMemStrm.get() )
+ if (pMemStrm)
{
- aPropOpt.AddOpt(ESCHER_Prop_pihlShape, false, 0, *pMemStrm.get());
+ aPropOpt.AddOpt(ESCHER_Prop_pihlShape, false, 0, *pMemStrm);
}
aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x00080008 );
}
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 62147ae598eb..5d985e60cc96 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -107,7 +107,7 @@ CustomToolBarImportHelper::createCommandFromMacro( const OUString& sCmd )
OUString CustomToolBarImportHelper::MSOCommandToOOCommand( sal_Int16 msoCmd )
{
OUString result;
- if ( pMSOCmdConvertor.get() )
+ if (pMSOCmdConvertor)
result = pMSOCmdConvertor->MSOCommandToOOCommand( msoCmd );
return result;
}
@@ -115,7 +115,7 @@ OUString CustomToolBarImportHelper::MSOCommandToOOCommand( sal_Int16 msoCmd )
OUString CustomToolBarImportHelper::MSOTCIDToOOCommand( sal_Int16 msoTCID )
{
OUString result;
- if ( pMSOCmdConvertor.get() )
+ if (pMSOCmdConvertor)
result = pMSOCmdConvertor->MSOTCIDToOOCommand( msoTCID );
return result;
}
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 07aef15edba3..b638794c8385 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -178,7 +178,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
// get the SvStream to work with
std::unique_ptr< SvStream > aStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
- if(!aStream.get())
+ if (!aStream)
{
// we need the SvStream
break;
@@ -189,7 +189,8 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
// As a bonus, zipped data is already detected and handled there
GraphicFilter aGraphicFilter;
Graphic aGraphic;
- const ErrCode nGraphicFilterErrorCode(aGraphicFilter.ImportGraphic(aGraphic, OUString(), *aStream.get()));
+ const ErrCode nGraphicFilterErrorCode(
+ aGraphicFilter.ImportGraphic(aGraphic, OUString(), *aStream));
if(ERRCODE_NONE != nGraphicFilterErrorCode)
{
@@ -260,7 +261,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
pTargetSdrPage->getSdrModelFromSdrPage(),
aGraphic));
- if(!aNewSdrGrafObj.get())
+ if (!aNewSdrGrafObj)
{
// could not create GraphicObject
break;
@@ -577,7 +578,7 @@ private:
std::unique_ptr< SvStream > aStream(utl::UcbStreamHelper::CreateStream(mxInput, true));
- if(!aStream.get())
+ if (!aStream)
{
return;
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index a1cff2e99346..6fff0b0cb99d 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1990,7 +1990,8 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape )
ImplMap( rShape.maShapePolyPoly, aPolyPoly );
- const bool bLineOnly = ( rShape.maShapeFillColor == COL_TRANSPARENT ) && ( !rShape.mapShapeGradient.get() );
+ const bool bLineOnly
+ = (rShape.maShapeFillColor == COL_TRANSPARENT) && (!rShape.mapShapeGradient);
tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
maAttributeWriter.AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect, rShape.mapShapeGradient.get() );
@@ -3076,7 +3077,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
pA->GetDataSize() )
{
// write open shape in every case
- if( mapCurShape.get() )
+ if (mapCurShape)
{
ImplWriteShape( *mapCurShape );
mapCurShape.reset();
@@ -3114,7 +3115,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( bGradient )
{
// step through following actions until the first Gradient/GradientEx action is found
- while( !mapCurShape->mapShapeGradient.get() && bSkip && ( ++nCurAction < nCount ) )
+ while (!mapCurShape->mapShapeGradient && bSkip
+ && (++nCurAction < nCount))
{
pAction = rMtf.GetAction( nCurAction );
@@ -3172,7 +3174,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
aStroke.getPath(aPoly);
- if(mapCurShape.get())
+ if (mapCurShape)
{
if(1 != mapCurShape->maShapePolyPoly.Count()
|| !mapCurShape->maShapePolyPoly[0].IsEqual(aPoly))
@@ -3184,7 +3186,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
- if( !mapCurShape.get() )
+ if (!mapCurShape)
{
mapCurShape.reset( new SVGShapeDescriptor );
@@ -3281,7 +3283,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
// write open shape in every case
- if( mapCurShape.get() )
+ if (mapCurShape)
{
ImplWriteShape( *mapCurShape );
mapCurShape.reset();
@@ -3718,7 +3720,7 @@ void SVGActionWriter::WriteMetaFile( const Point& rPos100thmm,
ImplEndClipRegion();
// draw open shape that doesn't have a border
- if( mapCurShape.get() )
+ if (mapCurShape)
{
ImplWriteShape( *mapCurShape );
mapCurShape.reset();