summaryrefslogtreecommitdiff
path: root/remotebridges
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-05-11 10:27:39 +0000
committerThomas Benisch <tbe@openoffice.org>2001-05-11 10:27:39 +0000
commit283f0b3180cfacc8e1a833c0d5a6dc210857b578 (patch)
treeb419387f8388b4c4c11c553ca55fced5ee7ebaa9 /remotebridges
parente1f81cde76878825492a96f857a2037e38f33f8d (diff)
rtl string api changes
Diffstat (limited to 'remotebridges')
-rw-r--r--remotebridges/source/unourl_resolver/unourl_resolver.cxx26
1 files changed, 19 insertions, 7 deletions
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index fd6d1b6f4fd4..e4cfefefc141 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unourl_resolver.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-03-12 16:17:56 $
+ * last change: $Author: tbe $ $Date: 2001-05-11 11:27:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -159,8 +159,17 @@ Sequence< OUString > ResolverImpl::getSupportedServiceNames()
Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
throw (NoConnectException, ConnectionSetupException, RuntimeException)
{
- if (rUnoUrl.getTokenCount( ';' ) != 3 || rUnoUrl.getLength() < 10 ||
- !rUnoUrl.copy( 0, 4 ).equalsIgnoreCase( OUString( RTL_CONSTASCII_USTRINGPARAM("uno:") ) ))
+ sal_Int32 nTokenCount = 0;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rUnoUrl.getToken( 0 , ';' , nIndex );
+ nTokenCount++;
+ }
+ while ( nIndex >= 0 );
+
+ if (nTokenCount != 3 || rUnoUrl.getLength() < 10 ||
+ !rUnoUrl.copy( 0, 4 ).equalsIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM("uno:") ) ))
{
throw ConnectionSetupException( OUString( RTL_CONSTASCII_USTRINGPARAM("illegal uno url given!" ) ), Reference< XInterface >() );
}
@@ -170,8 +179,10 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
if (! xConnector.is())
throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM("no connector!" ) ), Reference< XInterface >() );
- OUString aConnectDescr( rUnoUrl.getToken( 0 ).copy( 4 ) ); // uno:CONNECTDESCR;iiop;InstanceName
- OUString aInstanceName( rUnoUrl.getToken( 2 ) );
+ nIndex = 0;
+ OUString aConnectDescr( rUnoUrl.getToken( 0, ';', nIndex ).copy( 4 ) ); // uno:CONNECTDESCR;iiop;InstanceName
+ nIndex = 0;
+ OUString aInstanceName( rUnoUrl.getToken( 2, ';', nIndex ) );
Reference< XConnection > xConnection( xConnector->connect( aConnectDescr ) );
@@ -181,8 +192,9 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM("no bridge factory!" ) ), Reference< XInterface >() );
// bridge
+ nIndex = 0;
Reference< XBridge > xBridge( xBridgeFactory->createBridge(
- OUString(), rUnoUrl.getToken( 1 ),
+ OUString(), rUnoUrl.getToken( 1, ';', nIndex ),
xConnection, Reference< XInstanceProvider >() ) );
Reference< XInterface > xRet( xBridge->getInstance( aInstanceName ) );