summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-11 11:03:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-11 15:18:19 +0200
commit8055ad41bbde67d0be0b240218295ea16c03d136 (patch)
tree614feec65572c62f96d20a8235bc14ae7f87ae5e /starmath
parent8ca5cdbd87bedc6a239dfed060d3100ea5e0196e (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/unomodel.cxx5
1 files changed, 3 insertions, 2 deletions
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 )