summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/grid
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 13:12:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 18:54:21 +0100
commit170df072a612456ec83143dff0174a2e376afcba (patch)
tree2761d280b41b103679650a47f85dcc111395343d /toolkit/source/controls/grid
parentc5b920dc889410ef5c4baf0adf7fc57ff0d2f123 (diff)
improve function-local statics in toolkit
Change-Id: I2a134d1cc74eaeaad46f4249fadd215b2391ba19 Reviewed-on: https://gerrit.libreoffice.org/63789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source/controls/grid')
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 3807e570b89e..6cd6e8ad151b 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -251,13 +251,8 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
::cppu::IPropertyArrayHelper& UnoGridModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = nullptr;
- if ( !pHelper )
- {
- Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
- pHelper = new UnoPropertyArrayHelper( aIDs );
- }
- return *pHelper;
+ static UnoPropertyArrayHelper aHelper( ImplGetPropertyIds() );
+ return aHelper;
}