summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-07-27 15:39:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-29 15:10:19 +0200
commitc39978f41dccbeb2e973c919a67d9b1d974f8f3c (patch)
tree1a688fd28ac0f97d3afd742de382bf79937790b4 /editeng
parent8f008bf4b968f219d2fe97ef8175ef6be0555943 (diff)
tdf#161846 use unordered_map in SfxItemPropertyMap
with large property maps, even a binary search starts showing up, but we can do a O(1) search here by using a map Change-Id: Ie7916076073e6dd393f0a1fb5a0db1b973999408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171173 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unoipset.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 8782217fd394..8737b2ea77d1 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -209,7 +209,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMapEntry* pMap,
}
-const SfxItemPropertyMapEntry* SvxItemPropertySet::getPropertyMapEntry(std::u16string_view rName) const
+const SfxItemPropertyMapEntry* SvxItemPropertySet::getPropertyMapEntry(const OUString& rName) const
{
return m_aPropertyMap.getByName( rName );
}
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 7c4c3fbfbc26..5e935f0569d0 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1058,7 +1058,7 @@ beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropert
throw beans::UnknownPropertyException();
}
-beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(std::u16string_view PropertyName, sal_Int32 nPara /* = -1 */)
+beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const OUString& PropertyName, sal_Int32 nPara /* = -1 */)
{
SolarMutexGuard aGuard;
@@ -1364,9 +1364,9 @@ void SAL_CALL SvxUnoTextRangeBase::setAllPropertiesToDefault()
if( pForwarder )
{
- for (const SfxItemPropertyMapEntry* entry : mpPropSet->getPropertyMap().getPropertyEntries())
+ for (auto const & rPair : mpPropSet->getPropertyMap().getPropertyEntries())
{
- _setPropertyToDefault( pForwarder, entry, -1 );
+ _setPropertyToDefault( pForwarder, rPair.second, -1 );
}
}
}