summaryrefslogtreecommitdiff
path: root/i18npool/inc
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/cclass_unicode.hxx6
-rw-r--r--i18npool/inc/transliteration_body.hxx11
2 files changed, 15 insertions, 2 deletions
diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx
index 3cfa1475a063..a10fe84eb8d9 100644
--- a/i18npool/inc/cclass_unicode.hxx
+++ b/i18npool/inc/cclass_unicode.hxx
@@ -94,7 +94,11 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
private:
- rtl::Reference<Transliteration_casemapping> trans;
+ // These are performance sensitive, so we don't want to use locking and switch their state, so just
+ // have multiple copies.
+ rtl::Reference<Transliteration_casemapping> transToUpper;
+ rtl::Reference<Transliteration_casemapping> transToLower;
+ rtl::Reference<Transliteration_casemapping> transToTitle;
// --- parser specific (implemented in cclass_unicode_parser.cxx) ---
diff --git a/i18npool/inc/transliteration_body.hxx b/i18npool/inc/transliteration_body.hxx
index a53aa77d15d2..6c3418fd7994 100644
--- a/i18npool/inc/transliteration_body.hxx
+++ b/i18npool/inc/transliteration_body.hxx
@@ -70,7 +70,16 @@ class Transliteration_casemapping final : public Transliteration_body
{
public:
Transliteration_casemapping();
- void setMappingType(const MappingType rMappingType, const css::lang::Locale& rLocale );
+ void setMappingType( const MappingType rMappingType )
+ {
+ if (nMappingType != rMappingType)
+ nMappingType = rMappingType;
+ }
+ void setLocale( const css::lang::Locale& rLocale )
+ {
+ if (aLocale != rLocale)
+ aLocale = rLocale;
+ }
};
class Transliteration_togglecase final : public Transliteration_body