diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 13:12:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 14:27:18 +0100 |
commit | 28d82c33131f5f1a300c632acc06e027b04a5a4d (patch) | |
tree | 80df037d5b16118700d816551203fdbdba21f636 /vbahelper/source/msforms/vbapages.cxx | |
parent | dd0e6849297c18aabe4fc29c0340a2ed1e474eaf (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/vbapages.cxx')
-rw-r--r-- | vbahelper/source/msforms/vbapages.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vbahelper/source/msforms/vbapages.cxx b/vbahelper/source/msforms/vbapages.cxx index 6854ef68f82b..c40aaa8fdf90 100644 --- a/vbahelper/source/msforms/vbapages.cxx +++ b/vbahelper/source/msforms/vbapages.cxx @@ -54,12 +54,10 @@ ScVbaPages::createEnumeration() uno::Sequence< OUString > ScVbaPages::getServiceNames() { - static uno::Sequence< OUString > aServiceNames; - if ( aServiceNames.getLength() == 0 ) + static uno::Sequence< OUString > const aServiceNames { - aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = "ooo.vba.msform.Pages"; - } + "ooo.vba.msform.Pages" + }; return aServiceNames; } |