summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbawindow.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 08:53:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 12:44:43 +0100
commita73494cf130866d4e678a1f421df56cdba7441d8 (patch)
tree7702df19639902db9fd089adf325e31c59b6ea5d /sc/source/ui/vba/vbawindow.cxx
parent266aab73a88ae5b62fcddaf383107d8e7edc51f2 (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/vbawindow.cxx')
-rw-r--r--sc/source/ui/vba/vbawindow.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 4fe117f8ac66..e0498cb7a73a 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -877,12 +877,10 @@ ScVbaWindow::getServiceImplName()
uno::Sequence< OUString >
ScVbaWindow::getServiceNames()
{
- static uno::Sequence< OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
+ static uno::Sequence< OUString > const aServiceNames
{
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = "ooo.vba.excel.Window";
- }
+ "ooo.vba.excel.Window"
+ };
return aServiceNames;
}
namespace window