summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18npool/inc/numberformatcode.hxx3
-rw-r--r--i18npool/source/numberformatcode/numberformatcode.cxx8
2 files changed, 6 insertions, 5 deletions
diff --git a/i18npool/inc/numberformatcode.hxx b/i18npool/inc/numberformatcode.hxx
index 2b1a5006653d..d51abd7de74b 100644
--- a/i18npool/inc/numberformatcode.hxx
+++ b/i18npool/inc/numberformatcode.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <deque>
+#include <mutex>
#include <utility>
namespace com::sun::star::i18n { class XLocaleData5; }
@@ -55,7 +56,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
private:
- osl::Mutex maMutex;
+ std::mutex maMutex;
css::uno::Reference < css::i18n::XLocaleData5 > m_xLocaleData;
typedef std::pair< css::lang::Locale, css::uno::Sequence< css::i18n::FormatElement > > FormatElementCacheItem;
std::deque < FormatElementCacheItem > m_aFormatElementCache;
diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx
index 90d6904b85a1..0e76f087b02f 100644
--- a/i18npool/source/numberformatcode/numberformatcode.cxx
+++ b/i18npool/source/numberformatcode/numberformatcode.cxx
@@ -43,7 +43,7 @@ NumberFormatCodeMapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage,
OUString elementType = mapElementTypeShortToString(formatType);
OUString elementUsage = mapElementUsageShortToString(formatUsage);
- osl::MutexGuard g(maMutex);
+ std::lock_guard g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
auto pFormat = std::find_if(aFormatSeq.begin(), aFormatSeq.end(),
@@ -67,7 +67,7 @@ NumberFormatCodeMapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage,
css::i18n::NumberFormatCode SAL_CALL
NumberFormatCodeMapper::getFormatCode( sal_Int16 formatIndex, const css::lang::Locale& rLocale )
{
- osl::MutexGuard g(maMutex);
+ std::lock_guard g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
auto pFormat = std::find_if(aFormatSeq.begin(), aFormatSeq.end(),
@@ -88,7 +88,7 @@ NumberFormatCodeMapper::getFormatCode( sal_Int16 formatIndex, const css::lang::L
css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL
NumberFormatCodeMapper::getAllFormatCode( sal_Int16 formatUsage, const css::lang::Locale& rLocale )
{
- osl::MutexGuard g(maMutex);
+ std::lock_guard g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
std::vector<css::i18n::NumberFormatCode> aVec;
@@ -113,7 +113,7 @@ NumberFormatCodeMapper::getAllFormatCode( sal_Int16 formatUsage, const css::lang
css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL
NumberFormatCodeMapper::getAllFormatCodes( const css::lang::Locale& rLocale )
{
- osl::MutexGuard g(maMutex);
+ std::lock_guard g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
std::vector<css::i18n::NumberFormatCode> aVec;