starmath/source/unomodel.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 8055ad41bbde67d0be0b240218295ea16c03d136 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed May 11 11:03:12 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed May 11 15:18:19 2022 +0200 cache the PropertySetInfo in lcl_createModelPropertyInfo we only need one of them Change-Id: I2f6f2c75da96f76d4bf9cb31ef31bf597a3f5e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 4b32900cbf26..8b0b8817f588 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -228,7 +228,7 @@ enum SmModelPropertyHandles } -static rtl::Reference<PropertySetInfo> lcl_createModelPropertyInfo () +static const rtl::Reference<PropertySetInfo> & lcl_createModelPropertyInfo () { static PropertyMapEntry aModelPropertyInfoMap[] = { @@ -304,7 +304,8 @@ static rtl::Reference<PropertySetInfo> lcl_createModelPropertyInfo () { OUString("SyntaxVersion") , HANDLE_STARMATH_VERSION , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { OUString(), 0, css::uno::Type(), 0, 0 } }; - return rtl::Reference<PropertySetInfo>( new PropertySetInfo ( aModelPropertyInfoMap ) ); + static const rtl::Reference<PropertySetInfo> PROPS_INFO = new PropertySetInfo ( aModelPropertyInfoMap ); + return PROPS_INFO; } SmModel::SmModel( SfxObjectShell *pObjSh )