diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-04-12 09:21:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-15 15:53:25 +0200 |
commit | 6c934d0feb6a391fda0939e8db5d12aafeb93cc6 (patch) | |
tree | 6d256b92dc7913cfd195b199440e90226c772413 /sw/inc | |
parent | 6c9a86a6392662f1115d3fe6b793a451101429b7 (diff) |
store ptr to the original entries in SfxItemPropertyMap
instead of copying them to a new data structure that
is practically identical.
Helps startup time since we build a ton of these when
loading documents.
And use o3tl::sorted_vector as a dense map data
structure to reduce allocations and improve cache
friendliness, since this is a build-once thing.
Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/unocrsrhelper.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 28984e6950e3..f7477565a4d7 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -29,6 +29,7 @@ class SfxItemSet; class SfxItemPropertySet; struct SfxItemPropertySimpleEntry; +struct SfxItemPropertyMapEntry; class SdrObject; class SwTextNode; class SwCursor; @@ -77,7 +78,7 @@ namespace SwUnoCursorHelper GetNestedTextContent(SwTextNode const & rTextNode, sal_Int32 const nIndex, bool const bParent); - bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry + bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry , SwPaM& rPam , css::uno::Any *pAny , css::beans::PropertyState& eState @@ -91,7 +92,7 @@ namespace SwUnoCursorHelper { return rUnoCursor.GetContentNode() && rUnoCursor.GetPoint()->nContent == rUnoCursor.GetContentNode()->Len();} - void resetCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam); + void resetCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry, SwPaM& rPam); /// @throws css::lang::IllegalArgumentException /// @throws css::io::IOException /// @throws css::uno::RuntimeException @@ -217,7 +218,7 @@ namespace SwUnoCursorHelper /// @throws css::uno::RuntimeException /// @throws css::uno::DeploymentException bool SetCursorPropertyValue( - SfxItemPropertySimpleEntry const& rEntry, + SfxItemPropertyMapEntry const& rEntry, css::uno::Any const& rValue, SwPaM & rPam, SfxItemSet & rItemSet); |