summaryrefslogtreecommitdiff
path: root/idlc/source/astscope.cxx
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-05-10 12:07:49 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-05-10 12:07:49 +0000
commit2f02e0b70843b881756aa2cc68c19e64b1bef777 (patch)
tree0d43e67e6c51b651202019e4d9660d0259a33077 /idlc/source/astscope.cxx
parent2d04e77e8fbfe1d02ce8e095aa6639cedc8ae613 (diff)
osl string api changes
Diffstat (limited to 'idlc/source/astscope.cxx')
-rw-r--r--idlc/source/astscope.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index 01f40629a32f..4ea17b1fcd46 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: astscope.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jsc $ $Date: 2001-04-11 07:24:23 $
+ * last change: $Author: pl $ $Date: 2001-05-10 13:07:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -180,8 +180,8 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
// The name does not start with "::"
// Look up in the local scope and start with the first scope
- OString firstScope = scopedName.indexOf(':') > 0 ?
- scopedName.getToken(0, ':') : scopedName;
+ sal_Int32 nIndex = scopedName.indexOf(':');
+ OString firstScope = nIndex > 0 ? scopedName.copy(0, nIndex) : scopedName;
sal_Bool bFindFirstScope = sal_True;
pDecl = lookupByNameLocal(firstScope);
if ( !pDecl )
@@ -212,17 +212,15 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
if ( bFindFirstScope && (firstScope != scopedName) )
{
- sal_Int32 count = scopedName.getTokenCount(':');
- for ( sal_Int32 i = 2; i < count; i += 2 )
+ sal_Int32 nIndex = 1;
+ do
{
pScope = declAsScope(pDecl);
-
- if ( pScope )
- pDecl = pScope->lookupByNameLocal(scopedName.getToken(i, ':'));
-
- if ( !pDecl )
+ if( pScope )
+ pDecl = pScope->lookupByNameLocal(scopedName.getToken(1, ':', nIndex ));
+ if( !pDecl )
return NULL;
- }
+ } while( nIndex != -1 );
}
// if ( !pDecl )