summaryrefslogtreecommitdiff
path: root/lingucomponent/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-30 15:32:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 14:25:08 +0200
commitf883bf8b655569b9897a4a237b52d424b2550cf8 (patch)
treec543ea338d2f215b79050e738c2c9c6fa64c00d4 /lingucomponent/source
parente81be03d9f2c952da0516be0f42fd2dbe6f6d4a4 (diff)
osl::Mutex->std::mutex in NumberText_Impl
Change-Id: I9903a2717fe9019c45c4ecc3e7dcaed7e1a9d9f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent/source')
-rw-r--r--lingucomponent/source/numbertext/numbertext.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx
index cb8e913bf571..5b9a32a65196 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -18,6 +18,7 @@
*/
#include <iostream>
+#include <mutex>
#include <osl/file.hxx>
#include <tools/debug.hxx>
@@ -47,9 +48,9 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
-static osl::Mutex& GetNumberTextMutex()
+static std::mutex& GetNumberTextMutex()
{
- static osl::Mutex aMutex;
+ static std::mutex aMutex;
return aMutex;
}
@@ -111,7 +112,7 @@ void NumberText_Impl::EnsureInitialized()
OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale& rLocale)
{
- osl::MutexGuard aGuard(GetNumberTextMutex());
+ std::lock_guard aGuard(GetNumberTextMutex());
EnsureInitialized();
// libnumbertext supports Language + Country tags (separated by "_" or "-")
LanguageTag aLanguageTag(rLocale);
@@ -141,7 +142,7 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo
uno::Sequence<Locale> SAL_CALL NumberText_Impl::getAvailableLanguages()
{
- osl::MutexGuard aGuard(GetNumberTextMutex());
+ std::lock_guard aGuard(GetNumberTextMutex());
// TODO
Sequence<css::lang::Locale> aRes;
return aRes;