diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-01 13:20:55 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-01 13:20:55 +0000 |
commit | 069554851043b414d94e2b0aa692842a2d33587d (patch) | |
tree | 0ac8ce7b939f5cfb29ea2f07e5304239b56c7351 /i18nutil/source/utility | |
parent | a7571a96c307b85349eaadf0d5d9c777c7881137 (diff) |
CWS-TOOLING: integrate CWS cmcfixes56
2009-03-26 14:46:13 +0100 cmc r270080 : #i100517# merge changes of locales32 to match
2009-03-26 14:31:32 +0100 cmc r270079 : #i100517# add some brackets and remove stray ;
2009-03-25 13:30:36 +0100 cmc r270021 : #i100503# make tralay work again
2009-03-25 10:13:35 +0100 cmc r269999 : #i100536# remove last unused method
2009-03-24 15:13:50 +0100 cmc r269955 : #i100517# fix straight-forward warnings
2009-03-24 14:36:37 +0100 cmc r269947 : #i100469# keep ia64 and arm alignments after fork-exec to signal change, but hackaround for arm to keep userlevel qemu-arm working
2009-03-24 14:02:27 +0100 cmc r269943 : #i100223# make stl headers warning free for extra gcc 4.3 warnings
2009-03-24 13:58:15 +0100 cmc r269942 : #i100504# drawinglayer is warning free on ix86 linux
2009-03-24 13:56:15 +0100 cmc r269940 : #i100469# keep ia64 and arm alignments after fork-exec to signal change
Diffstat (limited to 'i18nutil/source/utility')
-rw-r--r-- | i18nutil/source/utility/casefolding.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/i18nutil/source/utility/casefolding.cxx b/i18nutil/source/utility/casefolding.cxx index 8a679b8afbe5..7a74609b0342 100644 --- a/i18nutil/source/utility/casefolding.cxx +++ b/i18nutil/source/utility/casefolding.cxx @@ -51,13 +51,13 @@ static Mapping mapping_0130[] = {{0, 1, {0x0069, 0, 0}},{0, 1, {0x0130, 0, 0}}}; #define langIs(lang) (aLocale.Language.compareToAscii(lang) == 0) // only check simple case, there is more complicated case need to be checked. -#define type_i(ch) (ch == 0x0069 || ch == 0x006a) +#define type_i(ch) ((ch) == 0x0069 || (ch) == 0x006a) -#define cased_letter(ch) (CaseMappingIndex[ch>>8] >= 0 && (CaseMappingValue[(CaseMappingIndex[ch>>8] << 8) + (ch&0xff)].type & CasedLetter)) +#define cased_letter(ch) (CaseMappingIndex[(ch)>>8] >= 0 && (CaseMappingValue[(CaseMappingIndex[(ch)>>8] << 8) + ((ch)&0xff)].type & CasedLetter)) // for Lithuanian, condition to make explicit dot above when lowercasing capital I's and J's // whenever there are more accents above. -#define accent_above(ch) (ch >= 0x0300 && ch <= 0x0314 || ch >= 0x033D && ch <= 0x0344 || ch == 0x0346 || ch >= 0x034A && ch <= 0x034C) +#define accent_above(ch) (((ch) >= 0x0300 && (ch) <= 0x0314) || ((ch) >= 0x033D && (ch) <= 0x0344) || (ch) == 0x0346 || ((ch) >= 0x034A && (ch) <= 0x034C)) Mapping& casefolding::getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, Locale& aLocale, sal_uInt8 nMappingType) throw (RuntimeException) { @@ -68,8 +68,8 @@ Mapping& casefolding::getConditionalValue(const sal_Unicode* str, sal_Int32 pos, return !(pos < len && cased_letter(str[pos+1])) && (pos > 0 && cased_letter(str[pos-1])) ? mapping_03a3[0] : mapping_03a3[1]; case 0x0307: - return ((nMappingType == MappingTypeLowerToUpper && langIs("lt") || - nMappingType == MappingTypeUpperToLower && (langIs("tr") || langIs("az"))) && + return (((nMappingType == MappingTypeLowerToUpper && langIs("lt")) || + (nMappingType == MappingTypeUpperToLower && (langIs("tr") || langIs("az")))) && (pos > 0 && type_i(str[pos-1]))) ? // after_i mapping_0307[0] : mapping_0307[1]; case 0x0130: @@ -147,7 +147,7 @@ sal_Unicode casefolding::getNextChar(const sal_Unicode *str, sal_Int32& idx, sal } if (moduleLoaded & TransliterationModules_IGNORE_KANA) { - if (0x3040 <= c && c <= 0x3094 || 0x309d <= c && c <= 0x309f) + if ((0x3040 <= c && c <= 0x3094) || (0x309d <= c && c <= 0x309f)) c += 0x60; } |