diff options
author | Noel Grandin <noel@peralex.com> | 2021-05-10 15:22:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-10 21:19:13 +0200 |
commit | 1820db814909643df22bcb24ba28495adb87fe70 (patch) | |
tree | 3f3ac39f60370c39a41afe39d30d39a9d8647475 /include/svl/itemprop.hxx | |
parent | 68c1682929d5b8af95e299a2cfb3fdbb4f97e5ed (diff) |
speed up SfxExtItemPropertySetInfo
Change-Id: I7fdf0395c40f1932cfa1fc6ada91accc1912851a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115352
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svl/itemprop.hxx')
-rw-r--r-- | include/svl/itemprop.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx index 7be78d1a0330..c6f6b9bd1425 100644 --- a/include/svl/itemprop.hxx +++ b/include/svl/itemprop.hxx @@ -202,6 +202,14 @@ public: }; +struct SfxItemPropertyMapCompare2 +{ + bool operator() ( const SfxItemPropertyMapEntry & lhs, const SfxItemPropertyMapEntry & rhs ) const + { + return lhs.aName < rhs.aName; + } +}; + // workaround for incremental linking bugs in MSVC2015 class SAL_DLLPUBLIC_TEMPLATE SfxExtItemPropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {}; @@ -223,7 +231,8 @@ public: hasPropertyByName( const OUString& Name ) override; private: - std::unordered_map<OUString, SfxItemPropertySimpleEntry> maMap; + const SfxItemPropertyMapEntry* getByName( std::u16string_view rName ) const; + o3tl::sorted_vector< SfxItemPropertyMapEntry, SfxItemPropertyMapCompare2 > maMap; mutable css::uno::Sequence< css::beans::Property > m_aPropSeq; }; |