diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-03 20:26:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-05 19:00:45 +0200 |
commit | 6cb400f41df0dd108cdb4b4d3ec6656844814147 (patch) | |
tree | 15a38de0d82d59be10a74d6cdc5375e9c08b0dd6 /sc/source/ui/view | |
parent | b99e8c79bf630432fbb6a819d69da0bd2db7c80c (diff) |
store the SfxItemSet inside SfxSetItem by value
rather than on the heap, avoiding an allocation
Change-Id: I3f1504f9a2d4178a9ba59e98de182a0ab98cdce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118356
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 718d8cd0e8c7..acea298aab32 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -895,8 +895,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, return; } - ScPatternAttr aOldAttrs( std::make_unique<SfxItemSet>(*pOldSet) ); - ScPatternAttr aNewAttrs( std::make_unique<SfxItemSet>(*pDialogSet) ); + ScPatternAttr aOldAttrs(( SfxItemSet(*pOldSet) )); + ScPatternAttr aNewAttrs(( SfxItemSet(*pDialogSet) )); aNewAttrs.DeleteUnchanged( &aOldAttrs ); if ( pDialogSet->GetItemState( ATTR_VALUE_FORMAT ) == SfxItemState::SET ) @@ -1005,7 +1005,7 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem, bool bAdjustBlockHeigh return; } - ScPatternAttr aNewAttrs( std::make_unique<SfxItemSet>( *GetViewData().GetDocument().GetPool(), + ScPatternAttr aNewAttrs( SfxItemSet( *GetViewData().GetDocument().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} ) ); aNewAttrs.GetItemSet().Put( rAttrItem ); |