summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-09 14:44:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 08:16:31 +0200
commitc302027510adb13a2d34d863e417460375588c4b (patch)
tree753aaebad792666c75602a901e6ae336975e410f /sc/source/ui/view/gridwin4.cxx
parentb2ea5031386d773f797b3f8cf8035ba5680db813 (diff)
pass SfxItemSet by unique_ptr to ScEditEngineDefaulter
Change-Id: I2bcfb87f687355a66a8a855b2858220cf1fefd39 Reviewed-on: https://gerrit.libreoffice.org/72043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/gridwin4.cxx')
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 1acd0e11eabd..663ce00737ca 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1385,10 +1385,10 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
// use EditEngine to draw mixed-script string
pEditEng.reset(new ScEditEngineDefaulter( EditEngine::CreatePool(), true ));
pEditEng->SetRefMapMode(rRenderContext.GetMapMode());
- SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() );
- rDefPattern.FillEditItemSet( pEditDefaults );
+ auto pEditDefaults = std::make_unique<SfxItemSet>( pEditEng->GetEmptyItemSet() );
+ rDefPattern.FillEditItemSet( pEditDefaults.get() );
pEditDefaults->Put( SvxColorItem( COL_LIGHTGRAY, EE_CHAR_COLOR ) );
- pEditEng->SetDefaults( pEditDefaults );
+ pEditEng->SetDefaults( std::move(pEditDefaults) );
}
sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );