diff options
-rw-r--r-- | i18npool/source/inputchecker/inputsequencechecker_th.cxx | 18 | ||||
-rw-r--r-- | i18npool/source/transliteration/hiraganaToKatakana.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/transliteration/katakanaToHiragana.cxx | 2 | ||||
-rw-r--r-- | transex3/source/export2.cxx | 6 | ||||
-rw-r--r-- | unotools/source/ucbhelper/ucbhelper.cxx | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/i18npool/source/inputchecker/inputsequencechecker_th.cxx b/i18npool/source/inputchecker/inputsequencechecker_th.cxx index 7da4a7e5b73f..815431368237 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_th.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_th.cxx @@ -122,19 +122,19 @@ http://www.openoffice.org/issues/show_bug.cgi?id=42661 8. <cons> <thanthakhat> + <abv1> => <cons> <abv1> <thanthakhat> (reorder) 9. <cons> <abv1>_x <thanthakhat> + <abv1>_y => <cons> <abv1>_y <thanthakhat>(reorder, replace) */ -#define CT_ABV(t) (t>=CT_AV1 && t<=CT_AV3 || t==CT_BV1 || t==CT_BV2) +#define CT_ABV(t) ( (t>=CT_AV1 && t<=CT_AV3) || t==CT_BV1 || t==CT_BV2) #define CT_ABV1(t) (t==CT_AV1 || t==CT_BV1) if (check(Text[nStartPos], inputChar, inputCheckMode)) Text = Text.replaceAt(++nStartPos, 0, OUString(inputChar)); else if (nStartPos > 0 && getCharType(Text[nStartPos-1]) == CT_CONS) { sal_uInt16 t1=getCharType(Text[nStartPos]), t2=getCharType(inputChar); - if (CT_ABV(t1) && CT_ABV(t2) || // 1. - t1==CT_TONE && t2==CT_TONE) // 2. + if ( (CT_ABV(t1) && CT_ABV(t2)) || // 1. + (t1==CT_TONE && t2==CT_TONE) )// 2. Text = Text.replaceAt(nStartPos, 1, OUString(inputChar)); - else if (t1==CT_TONE && CT_ABV(t2) || // 5. - t1==CT_FV1 && t2==CT_TONE || // 6. - Text[nStartPos]==0x0E4C && CT_ABV1(t2)) // 8. + else if ( (t1==CT_TONE && CT_ABV(t2)) || // 5. + (t1==CT_FV1 && t2==CT_TONE) || // 6. + (Text[nStartPos]==0x0E4C && CT_ABV1(t2)) ) // 8. Text = Text.replaceAt(nStartPos++, 0, OUString(inputChar)); else nStartPos=Text.getLength(); @@ -142,9 +142,9 @@ http://www.openoffice.org/issues/show_bug.cgi?id=42661 sal_uInt16 t1=getCharType(Text[nStartPos-1]), t2=getCharType(Text[nStartPos]), t3=getCharType(inputChar); if (CT_ABV(t1) && t2==CT_TONE && t3==CT_TONE) // 3. Text = Text.replaceAt(nStartPos, 1, OUString(inputChar)); - else if (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3) || // 4. - t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE || // 7. - CT_ABV1(t1) && Text[nStartPos]==0x0E4C && CT_ABV1(t3)) // 9. + else if ( (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3)) || // 4. + (t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE) || // 7. + (CT_ABV1(t1) && Text[nStartPos]==0x0E4C && CT_ABV1(t3)) ) // 9. Text = Text.replaceAt(nStartPos-1, 1, OUString(inputChar)); else nStartPos=Text.getLength(); diff --git a/i18npool/source/transliteration/hiraganaToKatakana.cxx b/i18npool/source/transliteration/hiraganaToKatakana.cxx index 160bce6e4ff8..0a47316f004f 100644 --- a/i18npool/source/transliteration/hiraganaToKatakana.cxx +++ b/i18npool/source/transliteration/hiraganaToKatakana.cxx @@ -46,7 +46,7 @@ namespace com { namespace sun { namespace star { namespace i18n { // see http://charts.unicode.org/Web/U3040.html Hiragana (U+3040..U+309F) // see http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF) static sal_Unicode toKatakana (const sal_Unicode c) { - if (0x3041 <= c && c <= 0x3096 || 0x309d <= c && c <= 0x309f) { // 3040 - 309F HIRAGANA LETTER + if ( (0x3041 <= c && c <= 0x3096) || (0x309d <= c && c <= 0x309f) ) { // 3040 - 309F HIRAGANA LETTER // shift code point by 0x0060 return c + (0x30a0 - 0x3040); } diff --git a/i18npool/source/transliteration/katakanaToHiragana.cxx b/i18npool/source/transliteration/katakanaToHiragana.cxx index 3cb78c717f7a..013173840760 100644 --- a/i18npool/source/transliteration/katakanaToHiragana.cxx +++ b/i18npool/source/transliteration/katakanaToHiragana.cxx @@ -43,7 +43,7 @@ namespace com { namespace sun { namespace star { namespace i18n { // see http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF) static sal_Unicode toHiragana (const sal_Unicode c) { - if (0x30a1 <= c && c <= 0x30f6 || 0x30fd <= c && c <= 0x30ff) { // 30A0 - 30FF KATAKANA LETTER + if ( (0x30a1 <= c && c <= 0x30f6) || (0x30fd <= c && c <= 0x30ff) ) { // 30A0 - 30FF KATAKANA LETTER // shift code point by 0x0060 return c - (0x30a0 - 0x3040); } diff --git a/transex3/source/export2.cxx b/transex3/source/export2.cxx index 40ed6734c347..5db1067a7afb 100644 --- a/transex3/source/export2.cxx +++ b/transex3/source/export2.cxx @@ -165,15 +165,15 @@ void Export::QuotHTMLXRM( ByteString &rString ) switch ( rString.GetChar( i )) { case '<': if( i+2 < rString.Len() && - rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B' && - rString.GetChar( +2 ) == '>' ) + (rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B') && + rString.GetChar( i+2 ) == '>' ) { sReturn +="<b>"; i += 2; } else if( i+3 < rString.Len() && rString.GetChar( i+1 ) == '/' && - rString.GetChar( i+2 ) == 'b' || rString.GetChar( i+2 ) == 'B' && + (rString.GetChar( i+2 ) == 'b' || rString.GetChar( i+2 ) == 'B') && rString.GetChar( i+3 ) == '>' ) { sReturn +="</b>"; diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 67049e043266..2b301efc4e52 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -709,7 +709,7 @@ sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, Str INetURLObject aFileObject( pFiles[i] ); String aFile = aFileObject.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ).toAsciiLowerCase(); - if ( bWild && WildCard( rName ).Matches( aFile ) || aFile == rName ) + if ( (bWild && WildCard( rName ).Matches( aFile )) || aFile == rName ) { // names match rFile = aFileObject.GetMainURL( INetURLObject::NO_DECODE ); |