summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-05-10 15:29:19 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-05-10 15:29:19 +0000
commit4e6557b1dbef8051f3fca76bfb9e5c9bb27eb7b8 (patch)
tree5ae561c16d55feb45aa9456b697b95c73ce0bbd1 /idlc
parent174b4b6b02a2df85e718cfbeafa8723beb12ac26 (diff)
corrected an index error
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/astdeclaration.cxx6
-rw-r--r--idlc/source/astscope.cxx12
2 files changed, 11 insertions, 7 deletions
diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx
index a25c0aa45f87..e1ebe315138c 100644
--- a/idlc/source/astdeclaration.cxx
+++ b/idlc/source/astdeclaration.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: astdeclaration.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: pl $ $Date: 2001-05-10 13:07:49 $
+ * last change: $Author: pl $ $Date: 2001-05-10 16:29:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,7 +136,7 @@ void AstDeclaration::setName(const ::rtl::OString& name)
{
m_scopedName = name;
sal_Int32 nIndex = name.lastIndexOf( ':' );
- m_localName = name.copy( nIndex != -1 ? nIndex+1 : 0 );
+ m_localName = name.copy( nIndex+1 );
// Huh ? There is always at least one token
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index 4ea17b1fcd46..67248122b778 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: astscope.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: pl $ $Date: 2001-05-10 13:07:49 $
+ * last change: $Author: pl $ $Date: 2001-05-10 16:29:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -212,12 +212,16 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
if ( bFindFirstScope && (firstScope != scopedName) )
{
- sal_Int32 nIndex = 1;
+ sal_Int32 nIndex = 0;
+ sal_Int32 nOffset = 2;
do
{
pScope = declAsScope(pDecl);
if( pScope )
- pDecl = pScope->lookupByNameLocal(scopedName.getToken(1, ':', nIndex ));
+ {
+ pDecl = pScope->lookupByNameLocal(scopedName.getToken(nOffset, ':', nIndex ));
+ nOffset = 1;
+ }
if( !pDecl )
return NULL;
} while( nIndex != -1 );