From e83b5f6a015269ed7e5407a8440c0fc99fcfa397 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 1 Jun 2021 13:26:04 +0200 Subject: no need to allocate these on the heap Change-Id: Ic4b16e776a731e5e9bea61e99acb7257c5220322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116585 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/graphicfilter/icgm/cgm.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'filter/source/graphicfilter') diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index 02f1d0219f02..1cf7c7ca0b36 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -693,8 +693,8 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u { try { - std::unique_ptr pCGM(new CGM(rXModel)); - if (pCGM->IsValid()) + CGM aCGM(rXModel); + if (aCGM.IsValid()) { rIn.SetEndian(SvStreamEndian::BIG); sal_uInt64 const nInSize = rIn.remainingSize(); @@ -706,7 +706,7 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u if ( bProgressBar ) aXStatInd->start( "CGM Import" , nInSize ); - while (pCGM->IsValid() && (rIn.Tell() < nInSize) && !pCGM->IsFinished()) + while (aCGM.IsValid() && (rIn.Tell() < nInSize) && !aCGM.IsFinished()) { if ( bProgressBar ) { @@ -718,12 +718,12 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, css::u } } - if (!pCGM->Write(rIn)) + if (!aCGM.Write(rIn)) break; } - if ( pCGM->IsValid() ) + if ( aCGM.IsValid() ) { - nStatus = pCGM->GetBackGroundColor() | 0xff000000; + nStatus = aCGM.GetBackGroundColor() | 0xff000000; } if ( bProgressBar ) aXStatInd->end(); -- cgit