summaryrefslogtreecommitdiff
path: root/svx/source/form/formcontroller.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 08:56:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-22 11:06:58 +0100
commit94ef4c13138c5d3b410c7ef5f285cc63c585e784 (patch)
tree1f06774dd547bbbf7ebd9521203b32840a1e5247 /svx/source/form/formcontroller.cxx
parent7b34fb18a4d60bfc4e32b7c382ac596cbc2e776f (diff)
improve function-local statics in svx
Change-Id: I636fcc8ba1012d774d98f6a880bf29eb4b233128 Reviewed-on: https://gerrit.libreoffice.org/63783 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/form/formcontroller.cxx')
-rw-r--r--svx/source/form/formcontroller.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index e4766576e452..d5c4edb22cec 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -676,13 +676,11 @@ void SAL_CALL FormController::resetted(const EventObject& rEvent)
Sequence< OUString> const & FormController::getSupportedServiceNames_Static()
{
- static Sequence< OUString> aServices;
- if (!aServices.getLength())
+ static Sequence< OUString> const aServices
{
- aServices.realloc(2);
- aServices.getArray()[0] = "com.sun.star.form.runtime.FormController";
- aServices.getArray()[1] = "com.sun.star.awt.control.TabController";
- }
+ "com.sun.star.form.runtime.FormController",
+ "com.sun.star.awt.control.TabController"
+ };
return aServices;
}
@@ -3467,13 +3465,11 @@ Sequence< OUString > SAL_CALL FormController::getSupportedModes()
::osl::MutexGuard aGuard( m_aMutex );
impl_checkDisposed_throw();
- static Sequence< OUString > aModes;
- if (!aModes.getLength())
+ static Sequence< OUString > const aModes
{
- aModes.realloc(2);
- aModes[0] = "DataMode";
- aModes[1] = "FilterMode";
- }
+ "DataMode",
+ "FilterMode"
+ };
return aModes;
}