diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-31 11:20:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-01 08:49:35 +0200 |
commit | d95e54676039a593b797455674863ccd9a902d52 (patch) | |
tree | 97cd279fa6b5ec3dc89a85f241ca0fc017874312 /sc/source/core/data/patattr.cxx | |
parent | 6fc8a6b0b52509d735971f079d7b1660559d475d (diff) |
no need to allocate these on the heap
Change-Id: I912b1aafcc615efb87455fa9ba02caf7bef044cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116480
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data/patattr.cxx')
-rw-r--r-- | sc/source/core/data/patattr.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 548eb6ef1f91..d5f137f09117 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -1031,8 +1031,8 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD { const SfxItemSet* pSrcSet = &GetItemSet(); - std::unique_ptr<ScPatternAttr> pDestPattern( new ScPatternAttr(pDestDoc->GetPool()) ); - SfxItemSet* pDestSet = &pDestPattern->GetItemSet(); + ScPatternAttr aDestPattern( pDestDoc->GetPool() ); + SfxItemSet* pDestSet = &aDestPattern.GetItemSet(); // Copy cell pattern style to other document: @@ -1048,7 +1048,7 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD pDestDoc->GetStyleSheetPool(), pDestDoc->GetFormatExchangeList() ); - pDestPattern->SetStyleSheet( static_cast<ScStyleSheet*>(pStyleCpy) ); + aDestPattern.SetStyleSheet( static_cast<ScStyleSheet*>(pStyleCpy) ); } for ( sal_uInt16 nAttrId = ATTR_PATTERN_START; nAttrId <= ATTR_PATTERN_END; nAttrId++ ) @@ -1096,7 +1096,7 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD } } - ScPatternAttr* pPatternAttr = const_cast<ScPatternAttr*>( &pDestDoc->GetPool()->Put(*pDestPattern) ); + ScPatternAttr* pPatternAttr = const_cast<ScPatternAttr*>( &pDestDoc->GetPool()->Put(aDestPattern) ); return pPatternAttr; } |