include/editeng/fontitem.hxx  |    1 +
 svl/source/items/itemprop.cxx |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c390c2e3f44953e236389467c7c090cee9ebc1b7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 26 12:16:35 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 26 14:28:44 2022 +0200

    mark SvxFontItem as IsSortable
    
    which speeds up some searching in the pool
    
    Change-Id: I9fe7da50b4d803010c88702d8cd03c3380e7cc0d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134992
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/editeng/fontitem.hxx b/include/editeng/fontitem.hxx
index 2ccaade20121..35743b9949e1 100644
--- a/include/editeng/fontitem.hxx
+++ b/include/editeng/fontitem.hxx
@@ -47,6 +47,7 @@ public:
     // "pure virtual Methods" from SfxPoolItem
     virtual bool operator==(const SfxPoolItem& rItem) const override;
     bool operator<(const SfxPoolItem& rCmp) const override;
+    virtual bool IsSortable() const override { return true; }
     virtual SvxFontItem* Clone(SfxItemPool *pPool = nullptr) const override;
     virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) 
const override;
     virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) 
override;
commit f6b05d9feb5c74606b55a83da9ba06673ccc161f
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 26 12:15:12 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 26 14:28:36 2022 +0200

    avoid some allocation in SfxItemPropertySet::setPropertyValue
    
    by using std::move on the newly created poolitem, so that the pool does
    not need to clone it
    
    Change-Id: Ib90b14173d19768517eb2a31cc0a105e5eb4d7c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134991
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 1bb49d191007..56e3254b78f9 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -180,7 +180,7 @@ void SfxItemPropertySet::setPropertyValue( const 
SfxItemPropertyMapEntry& rEntry
             throw IllegalArgumentException();
         }
         // apply new item
-        rSet.Put( *pNewItem );
+        rSet.Put( std::move(pNewItem) );
     }
 }
 

Reply via email to