From 8055ad41bbde67d0be0b240218295ea16c03d136 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 May 2022 11:03:12 +0200 Subject: 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 --- starmath/source/unomodel.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'starmath') 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 lcl_createModelPropertyInfo () +static const rtl::Reference & lcl_createModelPropertyInfo () { static PropertyMapEntry aModelPropertyInfoMap[] = { @@ -304,7 +304,8 @@ static rtl::Reference lcl_createModelPropertyInfo () { OUString("SyntaxVersion") , HANDLE_STARMATH_VERSION , ::cppu::UnoType::get(), PROPERTY_NONE, 0 }, { OUString(), 0, css::uno::Type(), 0, 0 } }; - return rtl::Reference( new PropertySetInfo ( aModelPropertyInfoMap ) ); + static const rtl::Reference PROPS_INFO = new PropertySetInfo ( aModelPropertyInfoMap ); + return PROPS_INFO; } SmModel::SmModel( SfxObjectShell *pObjSh ) -- cgit