summaryrefslogtreecommitdiff
path: root/connectivity/workben
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/workben')
-rwxr-xr-x[-rw-r--r--]connectivity/workben/TT/StartTest.classbin183 -> 183 bytes
-rwxr-xr-x[-rw-r--r--]connectivity/workben/TT/StartTest.java0
-rw-r--r--connectivity/workben/iniParser/main.cxx17
-rwxr-xr-x[-rw-r--r--]connectivity/workben/iniParser/makefile.mk3
-rw-r--r--connectivity/workben/little/main.cxx21
-rwxr-xr-x[-rw-r--r--]connectivity/workben/little/makefile.mk3
-rw-r--r--connectivity/workben/skeleton/SResultSet.hxx3
-rwxr-xr-x[-rw-r--r--]connectivity/workben/skeleton/how_to_write_a_driver.txt2
-rw-r--r--connectivity/workben/testmoz/initUNO.cxx3
-rw-r--r--connectivity/workben/testmoz/main.cxx91
-rwxr-xr-x[-rw-r--r--]connectivity/workben/testmoz/makefile.mk6
-rw-r--r--connectivity/workben/testmoz/mozthread.cxx53
12 files changed, 96 insertions, 106 deletions
diff --git a/connectivity/workben/TT/StartTest.class b/connectivity/workben/TT/StartTest.class
index 28791c43eb9c..28791c43eb9c 100644..100755
--- a/connectivity/workben/TT/StartTest.class
+++ b/connectivity/workben/TT/StartTest.class
Binary files differ
diff --git a/connectivity/workben/TT/StartTest.java b/connectivity/workben/TT/StartTest.java
index 305f1fc4da9a..305f1fc4da9a 100644..100755
--- a/connectivity/workben/TT/StartTest.java
+++ b/connectivity/workben/TT/StartTest.java
diff --git a/connectivity/workben/iniParser/main.cxx b/connectivity/workben/iniParser/main.cxx
index 9ec90e7888f9..692acde215a0 100644
--- a/connectivity/workben/iniParser/main.cxx
+++ b/connectivity/workben/iniParser/main.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,11 +32,15 @@
#include <stdio.h>
#include <com/sun/star/io/IOException.hpp>
#include <osl/process.h>
-using namespace rtl;
#include <map>
#include <list>
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OStringToOUString;
+using ::rtl::OUStringToOString;
+
struct ini_NameValue
{
rtl::OUString sName;
@@ -96,7 +101,7 @@ public:
sal_uInt64 nSize = 0;
osl_getFileSize(handle, &nSize);
- OUString sectionName = OUString::createFromAscii("no name section");
+ OUString sectionName( RTL_CONSTASCII_USTRINGPARAM( "no name section" ));
while (true)
{
sal_uInt64 nPos;
@@ -127,7 +132,7 @@ public:
sectionName = OStringToOUString(
line.copy(nIndexStart + 1,nIndexEnd - nIndexStart -1).trim(), RTL_TEXTENCODING_ASCII_US );
if (!sectionName.getLength())
- sectionName = OUString::createFromAscii("no name section");
+ sectionName = OUString(RTL_CONSTASCII_USTRINGPARAM("no name section"));
ini_Section *aSection = &mAllSection[sectionName];
aSection->sName = sectionName;
@@ -175,7 +180,7 @@ public:
};
-#if (defined UNX) || (defined OS2)
+#if (defined UNX)
int main( int argc, char * argv[] )
#else
int _cdecl main( int argc, char * argv[] )
@@ -183,7 +188,9 @@ int _cdecl main( int argc, char * argv[] )
{
- IniParser parser(OUString::createFromAscii("test.ini"));
+ IniParser parser(OUString(RTL_CONSTASCII_USTRINGPARAM("test.ini")));
parser.Dump();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/workben/iniParser/makefile.mk b/connectivity/workben/iniParser/makefile.mk
index c1caaecf67de..d9ee3d0deda5 100644..100755
--- a/connectivity/workben/iniParser/makefile.mk
+++ b/connectivity/workben/iniParser/makefile.mk
@@ -42,13 +42,12 @@ OBJFILES= $(OBJ)$/main.obj
APPSTDLIBS=$(SALLIB) \
- $(VOSLIB) \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(UCBHELPERLIB) \
$(DBTOOLSLIB) \
$(COMPHELPERLIB)
-
+
# ... cfgapi ..............................
diff --git a/connectivity/workben/little/main.cxx b/connectivity/workben/little/main.cxx
index 3d89fb2c28ea..8ae9926c9377 100644
--- a/connectivity/workben/little/main.cxx
+++ b/connectivity/workben/little/main.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,11 +50,12 @@ using namespace com::sun::star::sdbc;
using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-using namespace rtl;
using namespace cppu;
+using ::rtl::OUString;
-#if (defined UNX) || (defined OS2)
+
+#if (defined UNX)
void main( int argc, char * argv[] )
#else
void _cdecl main( int argc, char * argv[] )
@@ -65,28 +67,28 @@ void _cdecl main( int argc, char * argv[] )
try{
Reference< ::com::sun::star::lang::XMultiServiceFactory > xFac =
- createRegistryServiceFactory(OUString::createFromAscii("g:\\office50\\program\\applicat.rdb"),OUString());
+ createRegistryServiceFactory(OUString(RTL_CONSTASCII_USTRINGPARAM("g:\\office50\\program\\applicat.rdb")),OUString());
if(!xFac.is())
return;
- m_xDriver = Reference<XDriver>(xFac->createInstance(OUString::createFromAscii("com.sun.star.sdbc.driver.dbase.Driver")),UNO_QUERY);
+ m_xDriver = Reference<XDriver>(xFac->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.driver.dbase.Driver"))),UNO_QUERY);
if(m_xDriver.is())
{
Sequence<PropertyValue> aValue;
- // aValue.getArray()[0] = PropertyValue( OUString::createFromAscii("user"),0,makeAny(OUString::createFromAscii("TEST1")),PropertyState_DIRECT_VALUE);
- // aValue.getArray()[1] = PropertyValue( OUString::createFromAscii("password"),0,makeAny(OUString::createFromAscii("TEST1")),PropertyState_DIRECT_VALUE);
+ // aValue.getArray()[0] = PropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("user")),0,makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("TEST1"))),PropertyState_DIRECT_VALUE);
+ // aValue.getArray()[1] = PropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("password")),0,makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("TEST1"))),PropertyState_DIRECT_VALUE);
//
- m_xConnection = m_xDriver->connect(OUString::createFromAscii("sdbc:dbase:g:\\"),aValue);
+ m_xConnection = m_xDriver->connect(OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:g:\\")),aValue);
if(m_xConnection.is())
{
Reference<XStatement> xStmt = m_xConnection->createStatement();
if(xStmt.is())
{
- Reference<XResultSet> xRes = xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM Tele"));
+ Reference<XResultSet> xRes = xStmt->executeQuery(OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM Tele")));
if(xRes.is())
{
- ::rtl::OUString aPat = ::rtl::OUString::createFromAscii("%s\t");
+ ::rtl::OUString aPat( RTL_CONSTASCII_USTRINGPARAM( "%s\t" ));
Reference<XRow> xRow(xRes,UNO_QUERY);
Reference<XResultSetMetaData> xMeta = Reference<XResultSetMetaDataSupplier>(xRes,UNO_QUERY)->getMetaData();
for(sal_Int32 i=1;i<xMeta->getColumnCount();++i)
@@ -115,3 +117,4 @@ void _cdecl main( int argc, char * argv[] )
scanf("%d",&d);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/workben/little/makefile.mk b/connectivity/workben/little/makefile.mk
index 5d3d6516f311..220fa91b75ab 100644..100755
--- a/connectivity/workben/little/makefile.mk
+++ b/connectivity/workben/little/makefile.mk
@@ -43,11 +43,10 @@ OBJFILES= $(OBJ)$/main.obj
APP1TARGET= $(TARGET)
APP1OBJS= $(OBJFILES)
APPSTDLIBS=$(SALLIB) \
- $(VOSLIB) \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(SLB)$/sql.lib
-
+
# ... cfgapi ..............................
APP1STDLIBS = $(APPSTDLIBS)
diff --git a/connectivity/workben/skeleton/SResultSet.hxx b/connectivity/workben/skeleton/SResultSet.hxx
index 2eaa5c8b2e97..22a062bfda97 100644
--- a/connectivity/workben/skeleton/SResultSet.hxx
+++ b/connectivity/workben/skeleton/SResultSet.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -244,3 +245,5 @@ namespace connectivity
}
}
#endif // CONNECTIVITY_SRESULTSET_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/workben/skeleton/how_to_write_a_driver.txt b/connectivity/workben/skeleton/how_to_write_a_driver.txt
index 596a9349026e..f76c1209e333 100644..100755
--- a/connectivity/workben/skeleton/how_to_write_a_driver.txt
+++ b/connectivity/workben/skeleton/how_to_write_a_driver.txt
@@ -6,7 +6,7 @@ Pre implementation steps
- copy all files from connectivity/workben/skeleton into your new created directory under
connectivity/source/drivers and rename the first char of the files to one which isn't used so far
( please have a look at the other drivers )
-- search all occurances of skeleton and replace them to a name which you prefer
+- search all occurrences of skeleton and replace them to a name which you prefer
1. Implement a class called driver or modify the existing skeleton -> have a look at SDriver.?xx
2. Implement a class called connection -> have a look at SConnection.?xx
diff --git a/connectivity/workben/testmoz/initUNO.cxx b/connectivity/workben/testmoz/initUNO.cxx
index 67d1c07cc19d..952ac372626f 100644
--- a/connectivity/workben/testmoz/initUNO.cxx
+++ b/connectivity/workben/testmoz/initUNO.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ Reference< XMultiServiceFactory > InitializeFac( void )
Reference<XMultiServiceFactory> xMS(xComponentContext->getServiceManager(), UNO_QUERY);
return xMS;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx
index af6ec282353b..86e991e128e1 100644
--- a/connectivity/workben/testmoz/main.cxx
+++ b/connectivity/workben/testmoz/main.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,14 +73,12 @@
using namespace comphelper;
using namespace cppu;
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace com::sun::star::ucb;
using namespace com::sun::star::beans;
-//using namespace com::sun::star;
using namespace connectivity;
using namespace com::sun::star::sdb;
using namespace com::sun::star::sdbc;
@@ -87,6 +86,10 @@ using namespace com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace com::sun::star::registry;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using ::rtl::OUStringToOString;
+
#define OUtoCStr( x ) (OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US ).getStr())
Reference< XContentProviderManager > globalUcb;
#define PRINTSTR(x) printf("%s",x);
@@ -102,13 +105,8 @@ void printColumns( Reference<XResultSet> &xRes )
printf( "ColumnCount = %d\n", xMeta->getColumnCount());
for(sal_Int32 i=1;i<=xMeta->getColumnCount();++i)
{
- // printf(aPat.getStr(), xMeta->getColumnName(i).getStr());
const char *str = OUtoCStr(xMeta->getColumnName(i));
-// if ( i < 3 ) {
-// printf( aPat_Short, str );
-// } else {
- printf( aPat, str );
-// }
+ printf( aPat, str );
}
printf("\n");
printf("------------------------------------------------------------------------------------------\n");
@@ -127,11 +125,7 @@ void printXResultSet( Reference<XResultSet> &xRes )
{
try {
const char *str = OUtoCStr(xRow->getString(j));
-// if ( j < 3 ) {
-// printf( aPat_Short, str );
-// } else {
- printf( aPat_Short, str );
-// }
+ printf( aPat_Short, str );
} catch (...) {
printf(" Ex ");
}
@@ -158,7 +152,6 @@ void printXResultSets( Reference<XResultSet> &xRes )
}
}
-//#define OUtoCStr( x ) ( ::rtl::OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US).getStr())
static const char * const components[] =
{
SAL_MODULENAME( "ucb1" ) // KSO, ABI
@@ -230,13 +223,13 @@ Reference< XMultiServiceFactory > InitializeFac( void )
createRegistryServiceFactory( types, sal_True );
Reference< XImplementationRegistration > xIR(
interimSmgr->createInstance(
- OUString::createFromAscii(
- "com.sun.star.registry.ImplementationRegistration" ) ), UNO_QUERY );
+ OUString::(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.registry.ImplementationRegistration" )) ), UNO_QUERY );
Reference< XSimpleRegistry > xReg(
interimSmgr->createInstance(
- OUString::createFromAscii(
- "com.sun.star.registry.SimpleRegistry" ) ), UNO_QUERY );
+ OUString::(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.registry.SimpleRegistry" )) ), UNO_QUERY );
if ( xReg.is() )
{
xReg->open(services, sal_False, sal_True);
@@ -280,34 +273,18 @@ Reference< XMultiServiceFactory > InitializeFac( void )
// set global factory
setProcessServiceFactory( xSMgr );
-/* // Create simple ConfigManager
- Sequence< Any > aConfArgs(3);
- aConfArgs[0] <<= PropertyValue( OUString::createFromAscii("servertype"), 0, makeAny( OUString::createFromAscii("local") ), ::com::sun::star::beans::PropertyState_DIRECT_VALUE );
- aConfArgs[1] <<= PropertyValue( OUString::createFromAscii("sourcepath"), 0, makeAny( OUString::createFromAscii("g:\\") ), ::com::sun::star::beans::PropertyState_DIRECT_VALUE );
- aConfArgs[2] <<= PropertyValue( OUString::createFromAscii("updatepath"), 0, makeAny( OUString::createFromAscii("g:\\") ), ::com::sun::star::beans::PropertyState_DIRECT_VALUE );
-
- Reference< XContentProvider > xConfProvider
- ( xSMgr->createInstanceWithArguments( OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ), aConfArgs), UNO_QUERY );
-*/
-
// Create unconfigured Ucb:
-/* Sequence< Any > aArgs(1);
- aArgs[1] = makeAny ( xConfProvider );*/
Sequence< Any > aArgs;
::ucb::ContentBroker::initialize( xSMgr, aArgs );
Reference< XContentProviderManager > xUcb =
ucb::ContentBroker::get()->getContentProviderManagerInterface();
Reference< XContentProvider > xFileProvider
- ( xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ) ), UNO_QUERY );
- xUcb->registerContentProvider( xFileProvider, OUString::createFromAscii( "file" ), sal_True );
+ ( xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")) ), UNO_QUERY );
+ xUcb->registerContentProvider( xFileProvider, OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True );
-/* Reference< XContentProvider > xPackageProvider
- ( xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.ucb.PackageContentProvider" ) ), UNO_QUERY );
- xUcb->registerContentProvider( xPackageProvider, OUString::createFromAscii( "vnd.sun.star.pkg" ), sal_True );
- */
globalUcb = xUcb;
return xSMgr;
}
@@ -328,10 +305,10 @@ int TestMetaData(Reference< ::com::sun::star::sdbc::XConnection> &pConnection)
printf("Testing getColumns() : START\n");
{
Reference<XResultSet> xRes = xDmd->getColumns(
- makeAny(OUString::createFromAscii("")), // Catalog
- OUString::createFromAscii("%"), // Schema
- OUString::createFromAscii("%"), // TabName
- OUString::createFromAscii("%")
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM(""))), // Catalog
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // Schema
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // TabName
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%"))
);
printXResultSets( xRes );
}
@@ -347,9 +324,9 @@ int TestMetaData(Reference< ::com::sun::star::sdbc::XConnection> &pConnection)
printf("Testing getTables() : START\n");
{
Reference<XResultSet> xRes = xDmd->getTables(
- makeAny(OUString::createFromAscii("")), // Catalog
- OUString::createFromAscii("%"), // Schema
- OUString::createFromAscii("%"), // TabName
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM(""))), // Catalog
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // Schema
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // TabName
Sequence<rtl::OUString>()
);
printXResultSets( xRes );
@@ -396,12 +373,7 @@ Reference<XResultSet> TestQuery(Reference< ::com::sun::star::sdbc::XConnection>
for (times = 0;times< 100;times ++)
{
Reference<XResultSet> tmpRes =
- //xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM \"addr\""));
xStmt->executeQuery(OUString::createFromAscii(sql));
- // xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM \"Personal Address Book\" WHERE ( PrimaryEmail IS NULL )"));
- // xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM \"Personal Address Book\" WHERE ( PrimaryEmail LIKE \"Darren\" )"));
- // xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM \"Personal Address Book\""));
- // xStmt->executeQuery(OUString::createFromAscii("SELECT * FROM \"myldap\" WHERE ( PrimaryEmail LIKE \"%Darren%\" OR DisplayName LIKE \"%Darren%\" )"));
autoTest( tmpRes );
Reference<XCloseable> clsRes(tmpRes,UNO_QUERY);
@@ -436,16 +408,16 @@ Reference< ::com::sun::star::sdbc::XConnection> TestConnected
{
case -1:
case 1: //mozilla
- url=OUString::createFromAscii("sdbc:address:mozilla://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:mozilla://"));
break;
case 2:
- url=OUString::createFromAscii("sdbc:address:ldap://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap://"));
char hostname[40],basedn[40];
scanf("%s %s",hostname,basedn);
aValue.realloc(2);
- aValue[0].Name = ::rtl::OUString::createFromAscii("HostName");
+ aValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HostName"));
aValue[0].Value <<= rtl::OUString::createFromAscii(hostname);
- aValue[1].Name = ::rtl::OUString::createFromAscii("BaseDN");
+ aValue[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseDN"));
aValue[1].Value <<= rtl::OUString::createFromAscii(basedn);
break;
case 3:
@@ -453,12 +425,12 @@ Reference< ::com::sun::star::sdbc::XConnection> TestConnected
break;
case 5:
//Default LDAP AB
- url=OUString::createFromAscii("sdbc:address:ldap://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap://"));
aValue.realloc(2);
- aValue[0].Name = ::rtl::OUString::createFromAscii("HostName");
- aValue[0].Value <<= rtl::OUString::createFromAscii("sun-ds");
- aValue[1].Name = ::rtl::OUString::createFromAscii("BaseDN");
- aValue[1].Value <<= rtl::OUString::createFromAscii("dc=sun,dc=com");
+ aValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HostName"));
+ aValue[0].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sun-ds"));
+ aValue[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseDN"));
+ aValue[1].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dc=sun,dc=com"));
break;
default:
return pConnection;
@@ -662,7 +634,7 @@ void menuMain()
PRINTSTR("4 Open OE Address Book\n")
PRINTSTR("Please Input your choice:")
}
-#if (defined UNX) || (defined OS2)
+#if (defined UNX)
int main( int argc, char * argv[] )
#else
int _cdecl main( int argc, char * argv[] )
@@ -675,7 +647,7 @@ int _cdecl main( int argc, char * argv[] )
{
Reference< ::com::sun::star::sdbc::XDriver>
m_xDriver(xMgr->createInstance(
- OUString::createFromAscii("com.sun.star.comp.sdbc.MozabDriver")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.MozabDriver"))),
UNO_QUERY);
if(m_xDriver.is())
{
@@ -722,3 +694,4 @@ int _cdecl main( int argc, char * argv[] )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/workben/testmoz/makefile.mk b/connectivity/workben/testmoz/makefile.mk
index 387d2e4a2014..7d906a2be412 100644..100755
--- a/connectivity/workben/testmoz/makefile.mk
+++ b/connectivity/workben/testmoz/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -42,13 +42,13 @@ OBJFILES= $(OBJ)$/main.obj
APPSTDLIBS=$(SALLIB) \
- $(VOSLIB) \
+ \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(UCBHELPERLIB) \
$(DBTOOLSLIB) \
$(COMPHELPERLIB)
-
+
# ... cfgapi ..............................
diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx
index c61e5d8a0e06..9286ec1695a6 100644
--- a/connectivity/workben/testmoz/mozthread.cxx
+++ b/connectivity/workben/testmoz/mozthread.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,14 +78,12 @@
using namespace comphelper;
using namespace cppu;
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace com::sun::star::ucb;
using namespace com::sun::star::beans;
-//using namespace com::sun::star;
using namespace connectivity;
using namespace com::sun::star::sdb;
using namespace com::sun::star::sdbc;
@@ -92,6 +91,9 @@ using namespace com::sun::star::sdbcx;
using namespace ::com::sun::star::container;
using namespace com::sun::star::registry;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+
extern Reference< XMultiServiceFactory > InitializeFac( void );
Reference< XMultiServiceFactory > mMgr;
@@ -189,10 +191,10 @@ int TestMetaData(Reference< ::com::sun::star::sdbc::XConnection> &pConnection)
OSL_TRACE("Testing getColumns() : START\n");
{
Reference<XResultSet> xRes = xDmd->getColumns(
- makeAny(OUString::createFromAscii("")), // Catalog
- OUString::createFromAscii("%"), // Schema
- OUString::createFromAscii("%"), // TabName
- OUString::createFromAscii("%")
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM(""))), // Catalog
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // Schema
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // TabName
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%"))
);
printXResultSets( xRes );
}
@@ -208,9 +210,9 @@ int TestMetaData(Reference< ::com::sun::star::sdbc::XConnection> &pConnection)
OSL_TRACE("Testing getTables() : START\n");
{
Reference<XResultSet> xRes = xDmd->getTables(
- makeAny(OUString::createFromAscii("")), // Catalog
- OUString::createFromAscii("%"), // Schema
- OUString::createFromAscii("%"), // TabName
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM(""))), // Catalog
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // Schema
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // TabName
Sequence<rtl::OUString>() );
printXResultSets( xRes );
}
@@ -233,7 +235,7 @@ void TestQuery(Reference< ::com::sun::star::sdbc::XConnection> &pConnection)
OSL_TRACE(": got statement\n");
OSL_TRACE(": excuteQuery() : START \n");
// SELECT "First Name", "Display Name", "E-mail" FROM tablename
- OUString sqlPrefix= OUString::createFromAscii("SELECT \"First Name\", \"Display Name\", \"E-mail\" FROM ");
+ OUString sqlPrefix(RTL_CONSTASCII_USTRINGPARAM("SELECT \"First Name\", \"Display Name\", \"E-mail\" FROM "));
try
{
sal_Int32 times=0;
@@ -244,9 +246,9 @@ void TestQuery(Reference< ::com::sun::star::sdbc::XConnection> &pConnection)
OUString qut = xDmd->getIdentifierQuoteString();
Reference<XResultSet> xRes = xDmd->getTables(
- makeAny(OUString::createFromAscii("")), // Catalog
- OUString::createFromAscii("%"), // Schema
- OUString::createFromAscii("%"), // TabName
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM(""))), // Catalog
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // Schema
+ OUString(RTL_CONSTASCII_USTRINGPARAM("%")), // TabName
Sequence<rtl::OUString>() );
sal_Int32 nTables = 0;
while( xRes.is() && xRes->next())
@@ -299,24 +301,24 @@ Reference< ::com::sun::star::sdbc::XConnection> TestConnected
switch( nIndex)
{
case testLDAP:
- url=OUString::createFromAscii("sdbc:address:ldap://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap://"));
aValue.realloc(2);
- aValue[0].Name = ::rtl::OUString::createFromAscii("HostName");
- aValue[0].Value <<= rtl::OUString::createFromAscii("sun-ds");
- aValue[1].Name = ::rtl::OUString::createFromAscii("BaseDN");
- aValue[1].Value <<= rtl::OUString::createFromAscii("dc=sun,dc=com");
+ aValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HostName"));
+ aValue[0].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sun-ds"));
+ aValue[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseDN"));
+ aValue[1].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dc=sun,dc=com"));
break;
case testMozilla:
- url=OUString::createFromAscii("sdbc:address:mozilla://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:mozilla://"));
break;
case testOp:
- url=OUString::createFromAscii("sdbc:address:outlook://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:outlook://"));
break;
case testOe:
- url=OUString::createFromAscii("sdbc:address:outlookexp://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:outlookexp://"));
break;
default:
- url=OUString::createFromAscii("sdbc:address:mozilla://");
+ url=OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:mozilla://"));
break;
}
pConnection =
@@ -326,10 +328,10 @@ Reference< ::com::sun::star::sdbc::XConnection> TestConnected
int autoTest(Reference<XResultSet> &xRes)
{
- sal_Int32 nRows = 0;
printColumns(xRes);
if(xRes.is())
{
+ sal_Int32 nRows = 0;
while( xRes.is() && xRes->next())
{
nRows++;
@@ -363,7 +365,7 @@ void SAL_CALL mozThread(void*)
{
Reference< ::com::sun::star::sdbc::XDriver>
m_xDriver(mMgr->createInstance(
- OUString::createFromAscii("com.sun.star.comp.sdbc.MozabDriver")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.MozabDriver"))),
UNO_QUERY);
if(m_xDriver.is())
{
@@ -404,7 +406,7 @@ void usage()
PRINTLN("-e test outlook express");
PRINTLN("0 < threadcount <= 100, default 100");
}
-#if (defined UNX) || (defined OS2)
+#if (defined UNX)
int main( int argc, char * argv[] )
#else
int _cdecl main( int argc, char * argv[] )
@@ -475,3 +477,4 @@ int _cdecl main( int argc, char * argv[] )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */