summaryrefslogtreecommitdiff
path: root/sd/source/filter/eppt/epptso.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-28 01:21:32 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-28 02:37:54 +0200
commitfd855967e0474323e22c9d27152d271826a43821 (patch)
tree8877899c9c2317beb554f916a9e7919ae073b604 /sd/source/filter/eppt/epptso.cxx
parent871089ecca78d818dee5c588f1a9a5e975816f7c (diff)
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.kaganski@collabora.com>
Diffstat (limited to 'sd/source/filter/eppt/epptso.cxx')
-rw-r--r--sd/source/filter/eppt/epptso.cxx15
1 files changed, 5 insertions, 10 deletions
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;