summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba/vbaheaderfooter.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 13:11:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 13:34:17 +0100
commit0d653000a6c07327d6db1f95be3d21d50d505423 (patch)
tree31c38f67117af9f72664dbba170eb822fc4e1193 /sw/source/ui/vba/vbaheaderfooter.cxx
parent7f91d6cceeeafb588f545be4c383e312d9e42bf7 (diff)
improve function-local statics in sw
Change-Id: I36b0e9b2819a442f01182f551dbc2bf7d5c878f4 Reviewed-on: https://gerrit.libreoffice.org/63788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/vba/vbaheaderfooter.cxx')
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx
index 21bd2debe849..e5feadede78f 100644
--- a/sw/source/ui/vba/vbaheaderfooter.cxx
+++ b/sw/source/ui/vba/vbaheaderfooter.cxx
@@ -92,12 +92,10 @@ SwVbaHeaderFooter::getServiceImplName()
uno::Sequence< OUString >
SwVbaHeaderFooter::getServiceNames()
{
- static uno::Sequence< OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
+ static uno::Sequence< OUString > const aServiceNames
{
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = "ooo.vba.word.Pane";
- }
+ "ooo.vba.word.Pane"
+ };
return aServiceNames;
}