diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-05-11 08:03:33 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-05-11 08:03:33 +0000 |
commit | 730e6f8f180d374ac8243744f260fd6bef4baaf4 (patch) | |
tree | 659e0806430b2bade701c9296f131b784244b4fd /bridges/source | |
parent | 8b83e9f93d32f8444a56ac542cb00b129da48959 (diff) |
rtl string api changes
Diffstat (limited to 'bridges/source')
-rw-r--r-- | bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx | 52 | ||||
-rw-r--r-- | bridges/source/remote/urp/urp_environment.cxx | 12 |
2 files changed, 33 insertions, 31 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx index 64e05b595913..ebdc932d7f76 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx @@ -2,9 +2,9 @@ * * $RCSfile: except.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-03-30 13:29:02 $ + * last change: $Author: pl $ $Date: 2001-05-11 09:03:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,6 +83,10 @@ #include "cc50_solaris_sparc.hxx" +#ifndef _RTL_STRBUF_HXX_ +#include <rtl/strbuf.hxx> +#endif + #include <hash.cxx> // need a += operator for OString and sal_Char @@ -136,17 +140,17 @@ static OString toUNOname( const OString & rRTTIname ) //================================================================================================== static OString toRTTIname( const OString & rUNOname ) { - OString aRet; + OStringBuffer aRet( rUNOname.getLength()*2 ); - int nTokens = rUNOname.getTokenCount( '.' ); - for( int i = 0; i < nTokens; i++ ) + sal_Int32 nIndex = 0; + do { - if( i > 0 ) - aRet += "::"; - aRet += rUNOname.getToken( i, '.' ); - } + if( nIndex > 0 ) + aRet.append( "::" ); + aRet.append( rUNOname.getToken( 0, '.', nIndex ) ); + } while( nIndex != -1 ); - return aRet; + return aRet.makeStringAndClear(); } //================================================================================================== @@ -155,32 +159,30 @@ static OString toRTTImangledname( const OString & rRTTIname ) if( ! rRTTIname.getLength() ) return OString(); - OString aRet; + OStringBuffer aRet( rRTTIname.getLength()*2 ); - int nUnoTokens = rRTTIname.getTokenCount( ':' ); - for( int i = 0; i < nUnoTokens; i++ ) + aRet.append( "__1n" ); + sal_Int32 nIndex = 0; + do { - OString aToken( rRTTIname.getToken( i, ':' ) ); + OString aToken( rRTTIname.getToken( 0, ':', nIndex ) ); int nBytes = aToken.getLength(); if( nBytes ) { - OString aAdd; - if( nBytes > 25 ) + if( nBytes > 25 ) { - aAdd += (sal_Char)( nBytes/26 + 'a' ); - aAdd += (sal_Char)( nBytes % 26 + 'A' ); + aRet.append( (sal_Char)( nBytes/26 + 'a' ) ); + aRet.append( (sal_Char)( nBytes%26 + 'A' ) ); } else - aAdd += (sal_Char)( nBytes + 'A' ); - aRet += aAdd; - aRet += aToken; + aRet.append( (sal_Char)( nBytes + 'A' ) ); + aRet.append( aToken ); } - } - aRet += '_'; + } while( nIndex != -1 ); - aRet = "__1n"+aRet; + aRet.append( '_' ); - return aRet; + return aRet.makeStringAndClear(); } diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx index b82de66973be..0b3ba2960727 100644 --- a/bridges/source/remote/urp/urp_environment.cxx +++ b/bridges/source/remote/urp/urp_environment.cxx @@ -2,9 +2,9 @@ * * $RCSfile: urp_environment.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: jbu $ $Date: 2001-05-02 14:01:28 $ + * last change: $Author: pl $ $Date: 2001-05-11 09:03:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -544,16 +544,16 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_ext_getMapping( ::rtl::OUString sToName = pTo->pTypeName; ::rtl::OUString sUno = OUString::createFromAscii( UNO_LB_UNO ); ::rtl::OUString sRemote = OUString::createFromAscii( "urp" ); - if ( sFromName.equalsIgnoreCase( sRemote ) && - sToName.equalsIgnoreCase( sUno ) ) + if ( sFromName.equalsIgnoreAsciiCase( sRemote ) && + sToName.equalsIgnoreAsciiCase( sUno ) ) { pMapping = new bridges_remote::RemoteMapping( pTo, /* Uno */ pFrom, /*remote*/ bridges_remote::RemoteMapping::remoteToUno, OUString() ); } - else if ( sFromName.equalsIgnoreCase( sUno ) && - sToName.equalsIgnoreCase( sRemote ) ) + else if ( sFromName.equalsIgnoreAsciiCase( sUno ) && + sToName.equalsIgnoreAsciiCase( sRemote ) ) { pMapping = new bridges_remote::RemoteMapping( pFrom , pTo , |