summaryrefslogtreecommitdiff
path: root/vbahelper/source/msforms/vbacombobox.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 13:12:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 14:27:18 +0100
commit28d82c33131f5f1a300c632acc06e027b04a5a4d (patch)
tree80df037d5b16118700d816551203fdbdba21f636 /vbahelper/source/msforms/vbacombobox.cxx
parentdd0e6849297c18aabe4fc29c0340a2ed1e474eaf (diff)
improve function-local statics in vbahelper
Change-Id: Id54660390baa337d8bd54a19924e138c2ccb0bc7 Reviewed-on: https://gerrit.libreoffice.org/63790 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper/source/msforms/vbacombobox.cxx')
-rw-r--r--vbahelper/source/msforms/vbacombobox.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx
index 65e946e0516a..78ceafb5ea88 100644
--- a/vbahelper/source/msforms/vbacombobox.cxx
+++ b/vbahelper/source/msforms/vbacombobox.cxx
@@ -299,12 +299,10 @@ void SAL_CALL ScVbaComboBox::setLinkedCell( const OUString& _linkedcell )
uno::Sequence< OUString >
ScVbaComboBox::getServiceNames()
{
- static uno::Sequence< OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
+ static uno::Sequence< OUString > const aServiceNames
{
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = "ooo.vba.msforms.ComboBox";
- }
+ "ooo.vba.msforms.ComboBox"
+ };
return aServiceNames;
}