sd/source/filter/eppt/epptso.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
New commits: commit fd855967e0474323e22c9d27152d271826a43821 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Oct 28 01:21:32 2018 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Oct 28 02:37:54 2018 +0200 tdf#120703 PVS: V547 Expression '!pTmp' is always true Change-Id: Ia31961d65592ebd2718446eaa931aab785b8ba65 Reviewed-on: https://gerrit.libreoffice.org/62457 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 01122edd607a..f000253a7e2a 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1720,17 +1720,14 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a aXIndexAccess( mXShape, css::uno::UNO_QUERY ); if ( EnterGroup( aXIndexAccess ) ) { - SvMemoryStream* pTmp = nullptr; - + std::unique_ptr<SvMemoryStream> pTmp; if ( eCa != css::presentation::ClickAction_NONE ) { - if ( !pTmp ) - pTmp = new SvMemoryStream( 0x200, 0x200 ); + pTmp.reset(new SvMemoryStream(0x200, 0x200)); ImplWriteClickAction( *pTmp, eCa, bMediaClickAction ); } - sal_uInt32 nShapeId = mpPptEscherEx->EnterGroup( &maRect, pTmp ); + sal_uInt32 nShapeId = mpPptEscherEx->EnterGroup(&maRect, pTmp.get()); aSolverContainer.AddShape( mXShape, nShapeId ); - delete pTmp; } } else @@ -2697,12 +2694,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } else if ( (mType == "drawing.Table") || (mType == "presentation.Table") ) { - SvMemoryStream* pTmp = nullptr; if ( eCa != css::presentation::ClickAction_NONE ) { - if ( !pTmp ) - pTmp = new SvMemoryStream( 0x200, 0x200 ); - ImplWriteClickAction( *pTmp, eCa, bMediaClickAction ); + SvMemoryStream aTmp(0x200, 0x200); + ImplWriteClickAction( aTmp, eCa, bMediaClickAction ); } ImplCreateTable( mXShape, aSolverContainer, aPropOpt ); continue; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits