summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-05-10 19:07:30 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-05-10 19:07:30 +0000
commit901ed1be024eca36e50e195e1a03d3c63b0ff3f0 (patch)
treedbcb37a5bc4a557a31af54728bc28a99354e2b2e /codemaker
parent40e34e3a9fce4a8849015db9b4ba2f4662e76a5b (diff)
fixed and off by one issue
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/codemaker/global.cxx9
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx14
2 files changed, 11 insertions, 12 deletions
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 747ee385b..4e9a4d359 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: global.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pl $ $Date: 2001-05-10 14:16:39 $
+ * last change: $Author: pl $ $Date: 2001-05-10 20:07:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -209,15 +209,14 @@ OString createFileNameFromType( const OString& destination,
token = '\\';
#endif
-// sal_Int32 count = fileName.getTokenCount(token) - 1;
-
nameBuffer = OStringBuffer(length);
sal_Int32 nIndex = 0;
-// for (int i=0; i < count; i++)
do
{
nameBuffer.append(fileName.getToken(0, token, nIndex).getStr());
+ if( nIndex == -1 )
+ break;
if (nameBuffer.getLength() == 0 || OString(".") == nameBuffer.getStr())
{
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 9eef1e42d..5d1a3e729 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cpputype.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: pl $ $Date: 2001-05-10 14:16:40 $
+ * last change: $Author: pl $ $Date: 2001-05-10 20:07:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -575,18 +575,18 @@ void CppuType::dumpNameSpace(FileStream& o, sal_Bool bOpen, sal_Bool bFull, cons
} while( nIndex != -1 );
} else
{
+ sal_Int32 nPos = 0;
do
{
- sal_Int32 nPos = typeName.lastIndexOf( '/' );
- if( nPos != -1 )
- typeName = typeName.copy( 0, nPos );
nPos = typeName.lastIndexOf( '/' );
o << "}";
if( bOneLine )
o << " ";
else
- o << " // " << typeName.copy( nPos != -1 ? nPos+1 : 0 ) << "\n";
- } while( typeName.getLength() );
+ o << " // " << typeName.copy( nPos+1 ) << "\n";
+ if( nPos != -1 )
+ typeName = typeName.copy( 0, nPos );
+ } while( nPos != -1 );
}
}