From e0382c3ad7786910bc9aa81cf581798df0f2508c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 May 2019 08:29:46 +0200 Subject: avoid copying when placing items into SfxItemSet Change-Id: I05c627f590e7794c1ba11b66021dc30aa3285eb0 Reviewed-on: https://gerrit.libreoffice.org/71941 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/filter/excel/xlroot.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sc/source/filter/excel') diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index c1044e216115..977f848061d6 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -388,12 +388,9 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const SfxItemSet aItemSet( *GetDoc().GetPool(), svl::Items{} ); ScPatternAttr::FillToEditItemSet( *pEditSet, aItemSet ); // FillToEditItemSet() adjusts font height to 1/100th mm, we need twips - std::unique_ptr pNewItem( aItemSet.Get( ATTR_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT)); - pEditSet->Put( *pNewItem ); - pNewItem = aItemSet.Get( ATTR_CJK_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK); - pEditSet->Put( *pNewItem ); - pNewItem = aItemSet.Get( ATTR_CTL_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL); - pEditSet->Put( *pNewItem ); + pEditSet->Put( aItemSet.Get( ATTR_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT) ); + pEditSet->Put( aItemSet.Get( ATTR_CJK_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CJK) ); + pEditSet->Put( aItemSet.Get( ATTR_CTL_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL) ); rEE.SetDefaults( pEditSet ); // takes ownership } return *mrData.mxHFEditEngine; -- cgit