diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 11:46:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 12:28:23 +0100 |
commit | 48314f25241e014a634dd5371543b90137ffd2bc (patch) | |
tree | c55d6ef485fee3941bc1d3becb106d0dd77e7f2f /basic/source/runtime/methods1.cxx | |
parent | e41667762bfff43f95d1ee71b2d67903e4fdab4e (diff) |
improve function-local statics in basic..cui
Change-Id: If737e8478f6f1c8fffb060ce132d80e0f07ef8ee
Reviewed-on: https://gerrit.libreoffice.org/63701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r-- | basic/source/runtime/methods1.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 951c416936bc..32824b6f2c61 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -70,13 +70,7 @@ using namespace com::sun::star::uno; static Reference< XCalendar4 > const & getLocaleCalendar() { - static Reference< XCalendar4 > xCalendar; - if( !xCalendar.is() ) - { - Reference< XComponentContext > xContext = getProcessComponentContext(); - xCalendar = LocaleCalendar2::create(xContext); - } - + static Reference< XCalendar4 > xCalendar = LocaleCalendar2::create(getProcessComponentContext()); static css::lang::Locale aLastLocale; static bool bNeedsInit = true; |