sw/source/filter/ww8/wrtw8nds.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
New commits: commit b6a1da9db8f717294b407c94b3572e4d7e72929f Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Jan 24 15:49:03 2025 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Jan 27 12:14:18 2025 +0100 We can use the PoolItem SetAttr rather than create an entire SfxItemSet presumably at least Change-Id: Ib8238322d64f91c0f64606c51806ace96696aa71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180716 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index ba29594321c9..8227d3577f27 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -3524,12 +3524,8 @@ void MSWordExportBase::UpdateTocSectionNodeProperties(const SwSectionNode& rSect SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG, std::map<OUString, css::uno::Any>{{ u"SdtPr"_ustr, uno::Any(aSdtPrPropertyValues) }}); - // create temp attr set - SwAttrSet aSet(pNode->GetSwAttrSet()); - aSet.Put(aGrabBag); - // set new attr to node - const_cast<SwContentNode*>(pNode)->SetAttr(aSet); + const_cast<SwContentNode*>(pNode)->SetAttr(aGrabBag); } // set flag for the next node after TOC @@ -3544,12 +3540,8 @@ void MSWordExportBase::UpdateTocSectionNodeProperties(const SwSectionNode& rSect SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG, std::map<OUString, css::uno::Any>{{u"ParaSdtEndBefore"_ustr, uno::Any(true)}}); - // create temp attr set - SwAttrSet aSet(pNodeAfterToc->GetSwAttrSet()); - aSet.Put(aGrabBag); - // set new attr to node - const_cast<SwContentNode*>(pNodeAfterToc)->SetAttr(aSet); + const_cast<SwContentNode*>(pNodeAfterToc)->SetAttr(aGrabBag); } } }