diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-06 23:00:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-09 13:28:37 +0000 |
commit | 45b19123a63f23fe37b11b063d7567bf79ef09aa (patch) | |
tree | befd8c637ac6fbdf94c05bb80c500fb781dd2bb4 /lingucomponent | |
parent | bcd9122715c7b708a65bee05a90dba3a38624ecb (diff) |
simplify CharClass
multiple variants of toUpper (etc)
some that take a non-const OUString or String and modify it
some that take a const OUString or String and return a new one
some that take part of a const OUString or String and return a new one
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 8 | ||||
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index d2f7365ac27f..132660ff608d 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -753,14 +753,14 @@ sal_uInt16 SAL_CALL Hyphenator::capitalType(const OUString& aTerm, CharClass * p OUString SAL_CALL Hyphenator::makeLowerCase(const OUString& aTerm, CharClass * pCC) { if (pCC) - return pCC->toLower_rtl(aTerm, 0, aTerm.getLength()); + return pCC->lowercase(aTerm); return aTerm; } OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * pCC) { if (pCC) - return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength()); + return pCC->uppercase(aTerm); return aTerm; } @@ -772,9 +772,9 @@ OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC { OUString bTemp = aTerm.copy(0,1); if (tlen > 1) - return ( pCC->toUpper_rtl(bTemp, 0, 1) + pCC->toLower_rtl(aTerm,1,(tlen-1)) ); + return ( pCC->uppercase(bTemp, 0, 1) + pCC->lowercase(aTerm,1,(tlen-1)) ); - return pCC->toUpper_rtl(bTemp, 0, 1); + return pCC->uppercase(bTemp, 0, 1); } return aTerm; } diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 8e9bf582d0bb..ae88aead865b 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -643,7 +643,7 @@ sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pC OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pCC) { if (pCC) - return pCC->toLower_rtl(aTerm, 0, aTerm.getLength()); + return pCC->lowercase(aTerm); return aTerm; } @@ -651,7 +651,7 @@ OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pC OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pCC) { if (pCC) - return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength()); + return pCC->uppercase(aTerm); return aTerm; } @@ -664,11 +664,11 @@ OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC) OUString bTemp = aTerm.copy(0,1); if (tlen > 1) { - return ( pCC->toUpper_rtl(bTemp, 0, 1) - + pCC->toLower_rtl(aTerm,1,(tlen-1)) ); + return ( pCC->uppercase(bTemp, 0, 1) + + pCC->lowercase(aTerm,1,(tlen-1)) ); } - return pCC->toUpper_rtl(bTemp, 0, 1); + return pCC->uppercase(bTemp, 0, 1); } return aTerm; } |