summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-01 11:01:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-02 15:34:38 +0200
commit2024780f9e169a6c1d167e494d37f46f7640dc97 (patch)
tree2488052807d613f63f6afe9a624d8f8fddda674b /filter
parentd656191ec308d4280b93c7169372e543a255d108 (diff)
can allocate these SfxItemSet on the stack
Change-Id: I85a749429a3a14aca5c6eaeaa5da37b25eb9f730 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f7ef3675a03d..0de16f0a6689 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3049,7 +3049,7 @@ sal_uInt16 SdrPowerPointImport::GetMasterPageIndex( sal_uInt16 nPageNum, PptPage
SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage, sal_uInt32& nBgFileOffset )
{
SdrObject* pRet = nullptr;
- std::unique_ptr<SfxItemSet> pSet;
+ std::optional<SfxItemSet> pSet;
sal_uLong nOldFPos = rStCtrl.Tell(); // remember FilePos for restoring it later
DffRecordHeader aPageHd;
if ( SeekToCurrentPage( &aPageHd ) )
@@ -3074,7 +3074,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
ReadDffPropSet( rStCtrl, static_cast<DffPropertyReader&>(*this) );
mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) );
sal_uInt32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
- pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() ));
+ pSet.emplace( pSdrModel->GetItemPool() );
DffObjData aObjData( aEscherObjectHd, tools::Rectangle( 0, 0, 28000, 21000 ), 0 );
ApplyAttributes( rStCtrl, *pSet, aObjData );
Color aColor( MSO_CLR_ToColor( nColor ) );
@@ -3087,7 +3087,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage
rStCtrl.Seek( nOldFPos ); // restore FilePos
if ( !pSet )
{
- pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() ));
+ pSet.emplace( pSdrModel->GetItemPool() );
pSet->Put( XFillStyleItem( drawing::FillStyle_NONE ) );
}
pSet->Put( XLineStyleItem( drawing::LineStyle_NONE ) );