diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-05-17 12:05:17 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-05-17 12:05:17 +0000 |
commit | 9f4c624c0ee757412d1d64c48742bd055d0eb040 (patch) | |
tree | 7355f34aabb7e9408ba914e282c44e371a6aa132 /unotools/source/i18n/charclass.cxx | |
parent | 212c9c9a108b8d84ddb1d94f2834cf8dad9be74a (diff) |
#87163# new toUpper/toLower versions (using an ::rtl::OUString)
Diffstat (limited to 'unotools/source/i18n/charclass.cxx')
-rw-r--r-- | unotools/source/i18n/charclass.cxx | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx index 6371444fcfb3..b793d0900e9f 100644 --- a/unotools/source/i18n/charclass.cxx +++ b/unotools/source/i18n/charclass.cxx @@ -2,9 +2,9 @@ * * $RCSfile: charclass.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: er $ $Date: 2001-03-08 17:12:18 $ + * last change: $Author: fs $ $Date: 2001-05-17 13:05:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -387,51 +387,63 @@ sal_Bool CharClass::isLetterNumeric( const String& rStr ) const String CharClass::toUpper( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const { + return toUpper_rtl(rStr, nPos, nCount); +} + + +String CharClass::toLower( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const +{ + return toLower_rtl(::rtl::OUString(rStr), nPos, nCount); +} + + +String CharClass::toTitle( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const +{ try { if ( xCC.is() ) - return xCC->toUpper( rStr, nPos, nCount, aLocale ); + return xCC->toTitle( rStr, nPos, nCount, aLocale ); else return rStr.Copy( nPos, nCount ); } catch ( Exception& ) { - DBG_ERRORFILE( "toUpper: Exception caught!" ); + DBG_ERRORFILE( "toTitle: Exception caught!" ); return rStr.Copy( nPos, nCount ); } } -String CharClass::toLower( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const +::rtl::OUString CharClass::toUpper_rtl( const ::rtl::OUString& rStr, sal_Int32 nPos, sal_Int32 nCount ) const { try { if ( xCC.is() ) - return xCC->toLower( rStr, nPos, nCount, aLocale ); + return xCC->toUpper( rStr, nPos, nCount, aLocale ); else - return rStr.Copy( nPos, nCount ); + return rStr.copy( nPos, nCount ); } catch ( Exception& ) { - DBG_ERRORFILE( "toLower: Exception caught!" ); - return rStr.Copy( nPos, nCount ); + DBG_ERRORFILE( "toUpper: Exception caught!" ); + return rStr.copy( nPos, nCount ); } } -String CharClass::toTitle( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const +::rtl::OUString CharClass::toLower_rtl( const ::rtl::OUString& rStr, sal_Int32 nPos, sal_Int32 nCount ) const { try { if ( xCC.is() ) - return xCC->toTitle( rStr, nPos, nCount, aLocale ); + return xCC->toLower( rStr, nPos, nCount, aLocale ); else - return rStr.Copy( nPos, nCount ); + return rStr.copy( nPos, nCount ); } catch ( Exception& ) { - DBG_ERRORFILE( "toTitle: Exception caught!" ); - return rStr.Copy( nPos, nCount ); + DBG_ERRORFILE( "toLower: Exception caught!" ); + return rStr.copy( nPos, nCount ); } } |