fixed and off by one issue
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: global.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -209,15 +209,14 @@ OString createFileNameFromType( const OString& destination,
|
|||||||
token = '\\';
|
token = '\\';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// sal_Int32 count = fileName.getTokenCount(token) - 1;
|
|
||||||
|
|
||||||
nameBuffer = OStringBuffer(length);
|
nameBuffer = OStringBuffer(length);
|
||||||
|
|
||||||
sal_Int32 nIndex = 0;
|
sal_Int32 nIndex = 0;
|
||||||
// for (int i=0; i < count; i++)
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
nameBuffer.append(fileName.getToken(0, token, nIndex).getStr());
|
nameBuffer.append(fileName.getToken(0, token, nIndex).getStr());
|
||||||
|
if( nIndex == -1 )
|
||||||
|
break;
|
||||||
|
|
||||||
if (nameBuffer.getLength() == 0 || OString(".") == nameBuffer.getStr())
|
if (nameBuffer.getLength() == 0 || OString(".") == nameBuffer.getStr())
|
||||||
{
|
{
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: cpputype.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -575,18 +575,18 @@ void CppuType::dumpNameSpace(FileStream& o, sal_Bool bOpen, sal_Bool bFull, cons
|
|||||||
} while( nIndex != -1 );
|
} while( nIndex != -1 );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
sal_Int32 nPos = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
sal_Int32 nPos = typeName.lastIndexOf( '/' );
|
|
||||||
if( nPos != -1 )
|
|
||||||
typeName = typeName.copy( 0, nPos );
|
|
||||||
nPos = typeName.lastIndexOf( '/' );
|
nPos = typeName.lastIndexOf( '/' );
|
||||||
o << "}";
|
o << "}";
|
||||||
if( bOneLine )
|
if( bOneLine )
|
||||||
o << " ";
|
o << " ";
|
||||||
else
|
else
|
||||||
o << " // " << typeName.copy( nPos != -1 ? nPos+1 : 0 ) << "\n";
|
o << " // " << typeName.copy( nPos+1 ) << "\n";
|
||||||
} while( typeName.getLength() );
|
if( nPos != -1 )
|
||||||
|
typeName = typeName.copy( 0, nPos );
|
||||||
|
} while( nPos != -1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user