diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 08:53:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 12:44:43 +0100 |
commit | a73494cf130866d4e678a1f421df56cdba7441d8 (patch) | |
tree | 7702df19639902db9fd089adf325e31c59b6ea5d /sc/source/ui/vba/vbamenu.cxx | |
parent | 266aab73a88ae5b62fcddaf383107d8e7edc51f2 (diff) |
improve function-local statics in sc
Change-Id: Ibde8aa9393591fe405bfad8ddb23ceda77723a35
Reviewed-on: https://gerrit.libreoffice.org/63781
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba/vbamenu.cxx')
-rw-r--r-- | sc/source/ui/vba/vbamenu.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx index 0e023ac17e0a..d45c35e74c32 100644 --- a/sc/source/ui/vba/vbamenu.cxx +++ b/sc/source/ui/vba/vbamenu.cxx @@ -56,12 +56,10 @@ ScVbaMenu::getServiceImplName() uno::Sequence<OUString> ScVbaMenu::getServiceNames() { - static uno::Sequence< OUString > aServiceNames; - if ( aServiceNames.getLength() == 0 ) + static uno::Sequence< OUString > const aServiceNames { - aServiceNames.realloc( 1 ); - aServiceNames[ 0 ] = "ooo.vba.excel.Menu"; - } + "ooo.vba.excel.Menu" + }; return aServiceNames; } |