[Libreoffice-commits] core.git: editeng/source include/editeng

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon May 31 09:21:29 UTC 2021


 editeng/source/uno/unoipset.cxx |   16 ++++++++--------
 include/editeng/unoipset.hxx    |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 7d34a7777cfeec112ab5cdabba059d01d8876be4
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun May 30 13:03:38 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon May 31 11:20:55 2021 +0200

    flatten SvxItemPropertySet a little
    
    Change-Id: Icb76ae5d0ebb0397bc1a2ea3c7d713a56d5ae477
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116422
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 8a4ad0c29bac..cdc1bac825df 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -54,10 +54,10 @@ SvxItemPropertySet::~SvxItemPropertySet()
 
 uno::Any* SvxItemPropertySet::GetUsrAnyForID(SfxItemPropertyMapEntry const & entry) const
 {
-    for (auto const & pActual : aCombineList)
+    for (auto const & rActual : aCombineList)
     {
-        if( pActual->nWID == entry.nWID && pActual->memberId == entry.nMemberId )
-            return &pActual->aAny;
+        if( rActual.nWID == entry.nWID && rActual.memberId == entry.nMemberId )
+            return const_cast<uno::Any*>(&rActual.aAny);
     }
     return nullptr;
 }
@@ -66,11 +66,11 @@ uno::Any* SvxItemPropertySet::GetUsrAnyForID(SfxItemPropertyMapEntry const & ent
 void SvxItemPropertySet::AddUsrAnyForID(
     const uno::Any& rAny, SfxItemPropertyMapEntry const & entry)
 {
-    std::unique_ptr<SvxIDPropertyCombine> pNew(new SvxIDPropertyCombine);
-    pNew->nWID = entry.nWID;
-    pNew->memberId = entry.nMemberId;
-    pNew->aAny = rAny;
-    aCombineList.push_back( std::move(pNew) );
+    SvxIDPropertyCombine aNew;
+    aNew.nWID = entry.nWID;
+    aNew.memberId = entry.nMemberId;
+    aNew.aAny = rAny;
+    aCombineList.push_back( std::move(aNew) );
 }
 
 
diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx
index 10a0030aa75b..2c079a06b37f 100644
--- a/include/editeng/unoipset.hxx
+++ b/include/editeng/unoipset.hxx
@@ -34,7 +34,7 @@ class EDITENG_DLLPUBLIC SvxItemPropertySet
 {
     SfxItemPropertyMap          m_aPropertyMap;
     mutable css::uno::Reference<css::beans::XPropertySetInfo> m_xInfo;
-    ::std::vector< std::unique_ptr<SvxIDPropertyCombine> > aCombineList;
+    ::std::vector< SvxIDPropertyCombine > aCombineList;
     SfxItemPool&                    mrItemPool;
 
 public:


More information about the Libreoffice-commits mailing list