diff options
author | Eike Rathke <erack@redhat.com> | 2018-05-15 14:31:56 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-05-15 14:35:27 +0200 |
commit | fb345397694258d87746879e4c530cc11c777843 (patch) | |
tree | 0a669457c4d14fa5974e73f6fc639719cbd274a2 /i18npool | |
parent | weld ScSolverNoSolutionDialog (diff) | |
download | core-fb345397694258d87746879e4c530cc11c777843.tar.gz core-fb345397694258d87746879e4c530cc11c777843.zip |
Guard static variables, tdf#115007 tdf#117171 follow-up
Change-Id: Ib8f73ceefb8278b6233d46d86a34a3869622239f
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/nativenumber/nativenumbersupplier.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index f3c40a2b7d61..f075e5324c16 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -63,6 +63,8 @@ typedef struct { namespace i18npool { +struct theNatNumMutex : public rtl::Static<osl::Mutex, theNatNumMutex> {}; + OUString getHebrewNativeNumberString(const OUString& aNumberString, bool useGeresh); OUString getCyrillicNativeNumberString(const OUString& aNumberString); @@ -560,6 +562,9 @@ OUString getNumberText(const Locale& aLocale, sal_Int16 numType, const OUString& OUString aNumberStr = sBuf.makeStringAndClear(); + // Guard the static variables below. + osl::MutexGuard aGuard( theNatNumMutex::get()); + static auto xNumberText = css::linguistic2::NumberText::create(comphelper::getProcessComponentContext()); OUString aLoc = LanguageTag::convertToBcp47(aLocale); |