diff options
author | Noel Grandin <noel@peralex.com> | 2021-12-05 14:06:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-05 19:57:01 +0100 |
commit | cba21368d8297e4039c907ff847a3074ece09599 (patch) | |
tree | c788fa1a53e4024381bc173310cfd091673200c0 /chart2/source/inc | |
parent | 374e261ad1ea8b41f5ecdd850c27fdc961c4868b (diff) |
speed up property access in charts
uno::Any copy and assign is fairly hot, so try and do those operations
in one step
Change-Id: I110566ba98788d5a658d229433de291c8cdf146c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126377
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/inc')
-rw-r--r-- | chart2/source/inc/OPropertySet.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx index 52cf2e782e28..346e89b99c94 100644 --- a/chart2/source/inc/OPropertySet.hxx +++ b/chart2/source/inc/OPropertySet.hxx @@ -55,11 +55,14 @@ protected: /** implement this method to provide default values for all properties supporting defaults. If a property does not have a default value, you may throw an UnknownPropertyException. + We pass the any by reference because this code is very hot and doing + it this way is cheaper than the two step process of constructing a new + any and then assigning to via a return value. @throws css::beans::UnknownPropertyException @throws css::uno::RuntimeException */ - virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const = 0; + virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const = 0; /** The InfoHelper table contains all property names and types of this object. |