fixed and off by one issue
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user