Revert "Guard CharacterClassificationImpl with mutex."
This reverts commit fc04b55f7f96a4f70f31c145dafd44c1d9276a41.
This commit is contained in:
parent
677cefa3db
commit
a4a60b677c
@ -26,8 +26,6 @@
|
||||
#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
|
||||
@ -95,19 +93,17 @@ 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;
|
||||
};
|
||||
|
||||
} } } }
|
||||
|
@ -47,7 +47,6 @@ OUString SAL_CALL
|
||||
CharacterClassificationImpl::toUpper( const OUString& Text, sal_Int32 nPos,
|
||||
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->toUpper(Text, nPos, nCount, rLocale);
|
||||
}
|
||||
|
||||
@ -55,7 +54,6 @@ OUString SAL_CALL
|
||||
CharacterClassificationImpl::toLower( const OUString& Text, sal_Int32 nPos,
|
||||
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->toLower(Text, nPos, nCount, rLocale);
|
||||
}
|
||||
|
||||
@ -63,7 +61,6 @@ OUString SAL_CALL
|
||||
CharacterClassificationImpl::toTitle( const OUString& Text, sal_Int32 nPos,
|
||||
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->toTitle(Text, nPos, nCount, rLocale);
|
||||
}
|
||||
|
||||
@ -71,7 +68,6 @@ sal_Int16 SAL_CALL
|
||||
CharacterClassificationImpl::getType( const OUString& Text, sal_Int32 nPos )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
if (xUCI.is())
|
||||
return xUCI->getType(Text, nPos);
|
||||
throw RuntimeException();
|
||||
@ -81,7 +77,6 @@ sal_Int16 SAL_CALL
|
||||
CharacterClassificationImpl::getCharacterDirection( const OUString& Text, sal_Int32 nPos )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
if (xUCI.is())
|
||||
return xUCI->getCharacterDirection(Text, nPos);
|
||||
throw RuntimeException();
|
||||
@ -91,7 +86,6 @@ sal_Int16 SAL_CALL
|
||||
CharacterClassificationImpl::getScript( const OUString& Text, sal_Int32 nPos )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
if (xUCI.is())
|
||||
return xUCI->getScript(Text, nPos);
|
||||
throw RuntimeException();
|
||||
@ -101,7 +95,6 @@ sal_Int32 SAL_CALL
|
||||
CharacterClassificationImpl::getCharacterType( const OUString& Text, sal_Int32 nPos,
|
||||
const Locale& rLocale ) throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->getCharacterType(Text, nPos, rLocale);
|
||||
}
|
||||
|
||||
@ -109,7 +102,6 @@ sal_Int32 SAL_CALL
|
||||
CharacterClassificationImpl::getStringType( const OUString& Text, sal_Int32 nPos,
|
||||
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->getStringType(Text, nPos, nCount, rLocale);
|
||||
}
|
||||
|
||||
@ -119,7 +111,6 @@ ParseResult SAL_CALL CharacterClassificationImpl::parseAnyToken(
|
||||
sal_Int32 contCharTokenType, const OUString& userDefinedCharactersCont )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->parseAnyToken(Text, nPos, rLocale,
|
||||
startCharTokenType,userDefinedCharactersStart,
|
||||
contCharTokenType, userDefinedCharactersCont);
|
||||
@ -132,7 +123,6 @@ ParseResult SAL_CALL CharacterClassificationImpl::parsePredefinedToken(
|
||||
const OUString& userDefinedCharactersStart, sal_Int32 contCharTokenType,
|
||||
const OUString& userDefinedCharactersCont ) throw(RuntimeException)
|
||||
{
|
||||
osl::MutexGuard aGuard(&maMtx);
|
||||
return getLocaleSpecificCharacterClassification(rLocale)->parsePredefinedToken(
|
||||
nTokenType, Text, nPos, rLocale, startCharTokenType, userDefinedCharactersStart,
|
||||
contCharTokenType, userDefinedCharactersCont);
|
||||
|
Loading…
x
Reference in New Issue
Block a user