From 0d653000a6c07327d6db1f95be3d21d50d505423 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 22 Nov 2018 13:11:47 +0200 Subject: improve function-local statics in sw Change-Id: I36b0e9b2819a442f01182f551dbc2bf7d5c878f4 Reviewed-on: https://gerrit.libreoffice.org/63788 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/ui/vba/vbacells.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sw/source/ui/vba/vbacells.cxx') diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx index cddf9c2fe2c1..6cc969d492e7 100644 --- a/sw/source/ui/vba/vbacells.cxx +++ b/sw/source/ui/vba/vbacells.cxx @@ -201,12 +201,10 @@ SwVbaCells::getServiceImplName() uno::Sequence SwVbaCells::getServiceNames() { - static uno::Sequence< OUString > sNames; - if ( sNames.getLength() == 0 ) + static uno::Sequence< OUString > const sNames { - sNames.realloc( 1 ); - sNames[0] = "ooo.vba.word.Cells"; - } + "ooo.vba.word.Cells" + }; return sNames; } -- cgit