summaryrefslogtreecommitdiff
path: root/rdbmaker
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-05-11 08:02:06 +0000
committerThomas Benisch <tbe@openoffice.org>2001-05-11 08:02:06 +0000
commit8b83e9f93d32f8444a56ac542cb00b129da48959 (patch)
tree0727d1574f229b9e649e7cdabf43e2124426b53d /rdbmaker
parent37608991fac3fac012363809237ff15356e6c05e (diff)
rtl string api changes
Diffstat (limited to 'rdbmaker')
-rw-r--r--rdbmaker/source/codemaker/global.cxx14
-rw-r--r--rdbmaker/source/rdbmaker/rdbmaker.cxx32
2 files changed, 23 insertions, 23 deletions
diff --git a/rdbmaker/source/codemaker/global.cxx b/rdbmaker/source/codemaker/global.cxx
index ee2aa7fcf32f..4defc582db24 100644
--- a/rdbmaker/source/codemaker/global.cxx
+++ b/rdbmaker/source/codemaker/global.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: global.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jsc $ $Date: 2001-03-13 12:45:14 $
+ * last change: $Author: tbe $ $Date: 2001-05-11 09:01:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -151,7 +151,7 @@ OString createFileNameFromType( const OString& destination,
if (bLowerCase)
{
- type = typeName.toLowerCase();
+ type = typeName.toAsciiLowerCase();
}
sal_uInt32 length = destination.getLength();
@@ -205,13 +205,12 @@ OString createFileNameFromType( const OString& destination,
token = '\\';
#endif
- sal_Int32 count = fileName.getTokenCount(token) - 1;
-
nameBuffer = OStringBuffer(length);
- for (int i=0; i < count; i++)
+ sal_Int32 nIndex = 0;
+ do
{
- nameBuffer.append(fileName.getToken(i, token).getStr());
+ nameBuffer.append(fileName.getToken( 0, token, nIndex ).getStr());
if (nameBuffer.getLength() == 0 || OString(".") == nameBuffer.getStr())
{
@@ -235,6 +234,7 @@ OString createFileNameFromType( const OString& destination,
nameBuffer.append(token);
}
+ while ( nIndex >= 0 );
return fileName;
}
diff --git a/rdbmaker/source/rdbmaker/rdbmaker.cxx b/rdbmaker/source/rdbmaker/rdbmaker.cxx
index 70856b5ca9e0..df7923db639f 100644
--- a/rdbmaker/source/rdbmaker/rdbmaker.cxx
+++ b/rdbmaker/source/rdbmaker/rdbmaker.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: rdbmaker.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jsc $ $Date: 2001-03-13 12:45:16 $
+ * last change: $Author: tbe $ $Date: 2001-05-11 09:02:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,13 +136,13 @@ void initFilterTypes(RdbOptions* pOptions)
if (pOptions->isValid("-FT"))
{
OString fOption(pOptions->getOption("-FT"));
- sal_uInt32 count = fOption.getTokenCount(';');
-
sal_Bool ret = sal_False;
- for (sal_uInt32 i = 0; i < count; i++)
+ sal_Int32 nIndex = 0;
+ do
{
- filterTypes.insert( fOption.getToken(i, ';').replace('.', '/') );
+ filterTypes.insert( fOption.getToken( 0, ';', nIndex ).replace('.', '/') );
}
+ while ( nIndex >= 0 );
}
if (pOptions->isValid("-F"))
{
@@ -253,13 +253,12 @@ OString createFileName(const OString& path)
token = '\\';
#endif
- sal_Int32 count = fileName.getTokenCount(token) - 1;
-
OStringBuffer nameBuffer( path.getLength() );
- for (int i=0; i < count; i++)
+ sal_Int32 nIndex = 0;
+ do
{
- nameBuffer.append(fileName.getToken(i, token).getStr());
+ nameBuffer.append(fileName.getToken( 0, token, nIndex ).getStr());
if (nameBuffer.getLength() == 0 || OString(".") == nameBuffer.getStr())
{
@@ -282,6 +281,7 @@ OString createFileName(const OString& path)
nameBuffer.append(token);
}
+ while ( nIndex >= 0 );
return fileName;
}
@@ -459,15 +459,14 @@ int _cdecl main( int argc, char * argv[] )
if (options.isValid("-T"))
{
OString tOption(options.getOption("-T"));
- sal_uInt32 count = tOption.getTokenCount(';');
-
OString typeName, tmpName;
sal_Bool ret = sal_False;
- for (sal_uInt32 i = 0; i < count; i++)
+ sal_Int32 nIndex = 0;
+ do
{
- typeName = tOption.getToken(i, ';');
-
- tmpName = typeName.getToken(typeName.getTokenCount('.') - 1, '.');
+ typeName = tOption.getToken( 0, ';', nIndex);
+ sal_Int32 lastIndex = typeName.lastIndexOf('.');
+ tmpName = typeName.copy( lastIndex+1 );
if (tmpName == "*")
{
if (bootReg.getLength())
@@ -511,6 +510,7 @@ int _cdecl main( int argc, char * argv[] )
exit(99);
}
}
+ while ( nIndex >= 0 );
} else
if (options.isValid("-X"))
{