sw/source/filter/ww8/wrtw8nds.cxx |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 4c1c507e5efffdf076ff21b5d49f70ec550a9c5e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Jan 24 15:49:03 2025 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Jan 28 09:59:20 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/+/180777
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index e33e8708f453..28dc8ade91b0 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -3489,12 +3489,8 @@ void 
MSWordExportBase::UpdateTocSectionNodeProperties(const SwSectionNode& rSect
         SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG);
         aGrabBag.GetGrabBag()["SdtPr"] <<= 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
@@ -3509,12 +3505,8 @@ void 
MSWordExportBase::UpdateTocSectionNodeProperties(const SwSectionNode& rSect
             SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG);
             aGrabBag.GetGrabBag()["ParaSdtEndBefore"] <<= 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);
         }
     }
 }

Reply via email to