summaryrefslogtreecommitdiffstats
path: root/i18npool/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-07 13:35:24 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-11 16:17:27 -0500
commit6122a6c272436f0f1959f160406d2e4ecdd1a733 (patch)
tree04eab77c0c87fd2e033b7691994b97a0dbdd498d /i18npool/inc
parentMake this thread safe too. (diff)
downloadcore-6122a6c272436f0f1959f160406d2e4ecdd1a733.tar.gz
core-6122a6c272436f0f1959f160406d2e4ecdd1a733.zip
Guard CharacterClassificationImpl with mutex.
They are accessed from multiple threads frequently. Change-Id: I3f9720ede076109efe0b7eaa4a05dd50f2e38102
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/characterclassificationImpl.hxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx
index e220968640b0..24221d10f7b4 100644
--- a/i18npool/inc/characterclassificationImpl.hxx
+++ b/i18npool/inc/characterclassificationImpl.hxx
@@ -26,6 +26,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include "osl/mutex.hxx"
+
namespace com { namespace sun { namespace star { namespace i18n {
class CharacterClassificationImpl : public cppu::WeakImplHelper2
@@ -93,17 +95,19 @@ private:
aLocale.Variant == rLocale.Variant;
};
};
- std::vector<lookupTableItem*> lookupTable;
- lookupTableItem *cachedItem;
-
- com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
- com::sun::star::uno::Reference < XCharacterClassification > xUCI;
com::sun::star::uno::Reference < XCharacterClassification > SAL_CALL
getLocaleSpecificCharacterClassification(const com::sun::star::lang::Locale& rLocale) throw(com::sun::star::uno::RuntimeException);
sal_Bool SAL_CALL
createLocaleSpecificCharacterClassification(const OUString& serviceName, const com::sun::star::lang::Locale& rLocale);
+private:
+ std::vector<lookupTableItem*> lookupTable;
+ lookupTableItem *cachedItem;
+
+ com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
+ com::sun::star::uno::Reference < XCharacterClassification > xUCI;
+ osl::Mutex maMtx;
};
} } } }