diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-01 13:26:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-03 10:41:59 +0200 |
commit | e83b5f6a015269ed7e5407a8440c0fc99fcfa397 (patch) | |
tree | 782a18ed3665d88ea7e51e56174fbd5ea95a3e85 /filter/source/graphicfilter | |
parent | f5e1314ffa564077c27fb9c954c792b498bcae12 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/graphicfilter')
-rw-r--r-- | filter/source/graphicfilter/icgm/cgm.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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<CGM> 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(); |