summaryrefslogtreecommitdiff
path: root/codemaker/source
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
commit835c83c7f218e861fea30dbc3924bf88faf8d1d4 (patch)
treeb0602d23dc736564a99c4cf903fd5d89c140c9e3 /codemaker/source
parent8c3d09f5a8e6a7c5e5a2ca4a89bcbae1ea7e1230 (diff)
fixed and off by one issue
Diffstat (limited to 'codemaker/source')
-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 4d730c5e79bd..455691e3052c 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 f085498f4da5..67b100eb6e73 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 );
}
}