diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-04-04 11:44:23 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-04-04 11:44:23 +0000 |
commit | 14a9a0c0f8ed4097d3d7eb998665d75c9cd974a3 (patch) | |
tree | 64905751ce4d91d038de5d6955c8ed513f32f80e /linguistic/source/misc.cxx | |
parent | 3943e60aa6436b20d6eee42111609433029b81c3 (diff) |
INTEGRATION: CWS tl10 (1.22.26); FILE MERGED
2005/03/02 11:46:46 tl 1.22.26.1: #119761# make proposals for capitalized incorrect words capitalized too
Diffstat (limited to 'linguistic/source/misc.cxx')
-rw-r--r-- | linguistic/source/misc.cxx | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index e09b3f68a5ca..17fd773a62e9 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: misc.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: rt $ $Date: 2004-06-17 16:13:53 $ + * last change: $Author: hr $ $Date: 2005-04-04 12:44:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -712,25 +712,25 @@ osl::Mutex & lcl_GetCharClassMutex() } -BOOL IsUpper( const String &rText, INT16 nLanguage ) +BOOL IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, INT16 nLanguage ) { MutexGuard aGuard( lcl_GetCharClassMutex() ); CharClass &rCC = lcl_GetCharClass(); rCC.setLocale( CreateLocale( nLanguage ) ); - sal_Int32 nFlags = rCC.getStringType( rText, 0, rText.Len() ); + sal_Int32 nFlags = rCC.getStringType( rText, nPos, nLen ); return (nFlags & KCharacterType::UPPER) && !(nFlags & KCharacterType::LOWER); } -BOOL IsLower( const String &rText, INT16 nLanguage ) +BOOL IsLower( const String &rText, xub_StrLen nPos, xub_StrLen nLen, INT16 nLanguage ) { MutexGuard aGuard( lcl_GetCharClassMutex() ); CharClass &rCC = lcl_GetCharClass(); rCC.setLocale( CreateLocale( nLanguage ) ); - sal_Int32 nFlags = rCC.getStringType( rText, 0, rText.Len() ); + sal_Int32 nFlags = rCC.getStringType( rText, nPos, nLen ); return (nFlags & KCharacterType::LOWER) && !(nFlags & KCharacterType::UPPER); } @@ -746,6 +746,26 @@ String ToLower( const String &rText, INT16 nLanguage ) } +String ToUpper( const String &rText, INT16 nLanguage ) +{ + MutexGuard aGuard( lcl_GetCharClassMutex() ); + + CharClass &rCC = lcl_GetCharClass(); + rCC.setLocale( CreateLocale( nLanguage ) ); + return rCC.upper( rText ); +} + + +String ToTitle( const String &rText, INT16 nLanguage ) +{ + MutexGuard aGuard( lcl_GetCharClassMutex() ); + + CharClass &rCC = lcl_GetCharClass(); + rCC.setLocale( CreateLocale( nLanguage ) ); + return rCC.toTitle( rText, 0, rText.Len() ); +} + + sal_Unicode ToLower( const sal_Unicode cChar, INT16 nLanguage ) { MutexGuard aGuard( lcl_GetCharClassMutex() ); |