diff options
Diffstat (limited to 'connectivity/source/drivers')
421 files changed, 3434 insertions, 3434 deletions
diff --git a/connectivity/source/drivers/adabas/BCatalog.cxx b/connectivity/source/drivers/adabas/BCatalog.cxx index 13ce824e00ec..201c55c8ed61 100644 --- a/connectivity/source/drivers/adabas/BCatalog.cxx +++ b/connectivity/source/drivers/adabas/BCatalog.cxx @@ -2,7 +2,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 @@ -62,7 +62,7 @@ OAdabasCatalog::OAdabasCatalog(SQLHANDLE _aConnectionHdl, OAdabasConnection* _pC if ( sName.getLength() ) sName += OAdabasCatalog::getDot(); sName += _xRow->getString(3); - + return sName; } @@ -150,20 +150,20 @@ void OAdabasCatalog::correctColumnProperties(sal_Int32 /*_nPrec*/, sal_Int32& _r } break; case DataType::FLOAT: - // if(_nPrec >= 16) + // if(_nPrec >= 16) { static const ::rtl::OUString sDouble(RTL_CONSTASCII_USTRINGPARAM("DOUBLE PRECISION")); _rsTypeName = sDouble; _rnType = DataType::DOUBLE; } -// else if(_nPrec > 15) -// { -// static const ::rtl::OUString sReal = ::rtl::OUString::createFromAscii("REAL"); -// _rsTypeName = sReal; -// _rnType = DataType::REAL; -// } +// else if(_nPrec > 15) +// { +// static const ::rtl::OUString sReal = ::rtl::OUString::createFromAscii("REAL"); +// _rsTypeName = sReal; +// _rnType = DataType::REAL; +// } break; - } + } } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/adabas/BColumns.cxx b/connectivity/source/drivers/adabas/BColumns.cxx index 6fa88353d593..75fc65208f87 100644 --- a/connectivity/source/drivers/adabas/BColumns.cxx +++ b/connectivity/source/drivers/adabas/BColumns.cxx @@ -2,7 +2,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 @@ -50,7 +50,7 @@ using namespace connectivity::sdbcx; using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -69,9 +69,9 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName) { if(xRow->getString(4) == _rName) { - sal_Int32 nType = xRow->getInt(5); - ::rtl::OUString sTypeName = xRow->getString(6); - sal_Int32 nPrec = xRow->getInt(7); + sal_Int32 nType = xRow->getInt(5); + ::rtl::OUString sTypeName = xRow->getString(6); + sal_Int32 nPrec = xRow->getInt(7); OAdabasCatalog::correctColumnProperties(nPrec,nType,sTypeName); sal_Bool bAutoIncrement = sal_False; if ( !_rName.equalsAscii("DEFAULT") && !m_pTable->getSchema().equalsAscii("DOMAIN") && !m_pTable->getTableName().equalsAscii("COLUMNS") ) @@ -131,7 +131,7 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString& _rForName, cons return cloneDescriptor( descriptor ); ::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("ALTER TABLE ")); - ::rtl::OUString sQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString sQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); m_pTable->beginTransAction(); @@ -143,7 +143,7 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString& _rForName, cons aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); aSql += OTables::getColumnSqlType(descriptor); aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" )")); - + Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement(); xStmt->execute(aSql); ::comphelper::disposeComponent(xStmt); @@ -167,7 +167,7 @@ void OColumns::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementNam if(!m_pTable->isNew()) { ::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("ALTER TABLE ")); - ::rtl::OUString sQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString sQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); aSql += ::dbtools::quoteName(sQuote,m_pTable->getSchema()) + sDot + ::dbtools::quoteName(sQuote,m_pTable->getTableName()); diff --git a/connectivity/source/drivers/adabas/BConnection.cxx b/connectivity/source/drivers/adabas/BConnection.cxx index a594083f6e75..d0d76dbf548d 100644 --- a/connectivity/source/drivers/adabas/BConnection.cxx +++ b/connectivity/source/drivers/adabas/BConnection.cxx @@ -2,7 +2,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 @@ -55,7 +55,7 @@ using namespace ::com::sun::star::lang; //------------------------------------------------------------------------------ -namespace starlang = ::com::sun::star::lang; +namespace starlang = ::com::sun::star::lang; // -------------------------------------------------------------------------------- OAdabasConnection::OAdabasConnection(const SQLHANDLE _pDriverHandle, connectivity::odbc::ODBCDriver* _pDriver) : OConnection_BASE2(_pDriverHandle,_pDriver) @@ -76,8 +76,8 @@ SQLRETURN OAdabasConnection::Construct( const ::rtl::OUString& url,const Sequenc if(m_aConnectionHandle == SQL_NULL_HANDLE) throw SQLException(); - const PropertyValue *pBegin = info.getConstArray(); - const PropertyValue *pEnd = pBegin + info.getLength(); + const PropertyValue *pBegin = info.getConstArray(); + const PropertyValue *pEnd = pBegin + info.getLength(); ::rtl::OUString sHostName; sal_Int32 nLen = url.indexOf(':'); diff --git a/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx b/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx index ffb76b1a62d2..115d5f0144bf 100644 --- a/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx +++ b/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -35,7 +35,7 @@ using namespace connectivity::adabas; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -49,7 +49,7 @@ using namespace ::com::sun::star::lang; // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OAdabasDatabaseMetaData::supportsIntegrityEnhancementFacility( ) throw(SQLException, RuntimeException) { - return sal_True; + return sal_True; } // ----------------------------------------------------------------------------- Reference< XResultSet > OAdabasDatabaseMetaData::impl_getTypeInfo_throw( ) @@ -61,64 +61,64 @@ Reference< XResultSet > OAdabasDatabaseMetaData::impl_getTypeInfo_throw( ) { aRows.reserve(19); Reference< XResultSet > xRes = OAdabasDatabaseMetaData_BASE::impl_getTypeInfo_throw(); - + if(xRes.is()) { ::connectivity::ODatabaseMetaDataResultSet::ORow aRow(19); - + Reference< XRow> xRow(xRes,UNO_QUERY); while(xRes->next()) { sal_Int32 nPos = 1; - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (1)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (1)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (2)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (2)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (3)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (3)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (4)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (4)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (5)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (5)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (6)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (6)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (7)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (7)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getBoolean (8)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getBoolean (8)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getShort (9)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getShort (9)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getBoolean (10)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getBoolean (10)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (11)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (11)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getBoolean (12)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getBoolean (12)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (13)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getString (13)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getShort (14)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getShort (14)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getShort (15)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getShort (15)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (16)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (16)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); - aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (17)); + aRow[nPos++] = new ::connectivity::ORowSetValueDecorator(xRow->getInt (17)); if(xRow->wasNull()) aRow[nPos-1]->setNull(); aRow[nPos++] = new ::connectivity::ORowSetValueDecorator((sal_Int16)xRow->getInt(18)); @@ -131,11 +131,11 @@ Reference< XResultSet > OAdabasDatabaseMetaData::impl_getTypeInfo_throw( ) switch((sal_Int32)aRow[2]->getValue()) { case DataType::FLOAT: -// aRow[3] = sal_Int32(15); -// break; +// aRow[3] = sal_Int32(15); +// break; case DataType::REAL: -// aRow[3] = sal_Int32(16); -// break; +// aRow[3] = sal_Int32(16); +// break; case DataType::DOUBLE: aRow[2]->setValue(DataType::DOUBLE); aRow[3]->setValue(sal_Int32(18)); diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx index 8c702e1793b0..53268cbfc79d 100644 --- a/connectivity/source/drivers/adabas/BDriver.cxx +++ b/connectivity/source/drivers/adabas/BDriver.cxx @@ -2,7 +2,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 @@ -57,14 +57,14 @@ const char sNewLine = '\012'; #else const char sNewLine[] = "\015\012"; // \015\012 and not \n #endif -#define ADABAS_DB_11 "11.02.00" -#define ADABAS_KERNEL_11 "11.02" -#define ADABAS_DB_12 "12.01.00" -#define ADABAS_KERNEL_12 "12.01" -#define CURRENT_DB_VERSION "13.01.00" -#define CURRENT_KERNEL_VERSION "13.01" - -#define OPROCESS_ADABAS (osl_Process_HIDDEN | osl_Process_WAIT | osl_Process_SEARCHPATH) +#define ADABAS_DB_11 "11.02.00" +#define ADABAS_KERNEL_11 "11.02" +#define ADABAS_DB_12 "12.01.00" +#define ADABAS_KERNEL_12 "12.01" +#define CURRENT_DB_VERSION "13.01.00" +#define CURRENT_KERNEL_VERSION "13.01" + +#define OPROCESS_ADABAS (osl_Process_HIDDEN | osl_Process_WAIT | osl_Process_SEARCHPATH) #define OPROCESS_ADABAS_DBG (osl_Process_WAIT | osl_Process_SEARCHPATH) @@ -884,7 +884,7 @@ void ODriver::clearDatabase(const ::rtl::OUString& sDBName) const sal_uInt32 nArgsCount = 2; rtl_uString *pArgs[nArgsCount] = { sDBName.pData, sStop.pData }; #else - sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x_clear")); + sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x_clear")); const sal_uInt32 nArgsCount = 1; rtl_uString* pArgs[nArgsCount] = { sDBName.pData }; #endif @@ -936,16 +936,16 @@ void ODriver::createDb( const TDatabaseStruct& _aInfo) X_START(_aInfo.sDBName); - // SHOW_STATE() - // %m_sDbRoot%\bin\xutil -d %_aInfo.sDBName% -u %CONUSR%,%CONPWD% -b %INITCMD% + // SHOW_STATE() + // %m_sDbRoot%\bin\xutil -d %_aInfo.sDBName% -u %CONUSR%,%CONPWD% -b %INITCMD% ::rtl::OUString aBatch2 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-b ")); -// if(!bBsp && INITCMD.Len() >= 40) -// { -// DirEntry aTmp(INITCMD); -// aTmp.CopyTo(aInitFile, FSYS_ACTION_COPYFILE); -// INITCMD = aInitFile.GetFull(); -// } +// if(!bBsp && INITCMD.Len() >= 40) +// { +// DirEntry aTmp(INITCMD); +// aTmp.CopyTo(aInitFile, FSYS_ACTION_COPYFILE); +// INITCMD = aInitFile.GetFull(); +// } // generate the init file for the database String sInitFile = getDatabaseInitFile(_aInfo); @@ -969,7 +969,7 @@ void ODriver::createDb( const TDatabaseStruct& _aInfo) aInitFile.EnableKillingFile(); { ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(aInitFile.GetURL(),STREAM_WRITE) ); - (*pFileStream) << "ALTER USER \"" + (*pFileStream) << "ALTER USER \"" << ::rtl::OString(_aInfo.sSysUser,_aInfo.sSysUser.getLength(),gsl_getSystemTextEncoding()) << "\" NOT EXCLUSIVE " << sNewLine; @@ -990,12 +990,12 @@ int ODriver::X_PARAM(const ::rtl::OUString& _DBNAME, const ::rtl::OUString& _PWD, const ::rtl::OUString& _CMD) { - // %XPARAM% -u %CONUSR%,%CONPWD% BINIT + // %XPARAM% -u %CONUSR%,%CONPWD% BINIT ::rtl::OUString sCommandFile = generateInitFile(); { ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "x_param" + (*pFileStream) << "x_param" #if defined(WIN) || defined(WNT) << ".exe" #endif @@ -1138,11 +1138,11 @@ int ODriver::X_START(const ::rtl::OUString& sDBName) const sal_uInt32 nArgsCount = 4; rtl_uString* pArgs[nArgsCount] = { sArg1.pData, sDBName.pData, sArg3.pData, sArg4.pData }; - sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("strt.exe")); + sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("strt.exe")); #else const sal_uInt32 nArgsCount = 1; rtl_uString* pArgs[nArgsCount] = { sDBName.pData }; - sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x_start")); + sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x_start")); #endif oslProcess aApp; @@ -1181,7 +1181,7 @@ int ODriver::X_STOP(const ::rtl::OUString& sDBName) const sal_uInt32 nArgsCount = 3; rtl_uString* pArgs[nArgsCount] = { sArg1.pData, sDBName.pData, sArg2.pData }; - sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stp.exe")); + sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stp.exe")); #else const sal_uInt32 nArgsCount = 1; rtl_uString* pArgs[nArgsCount] = { sDBName.pData }; @@ -1224,7 +1224,7 @@ void ODriver::XUTIL(const ::rtl::OUString& _rParam, { ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << + (*pFileStream) << #if defined(WIN) || defined(WNT) "xutil.exe" #else @@ -1282,7 +1282,7 @@ void ODriver::LoadBatch(const ::rtl::OUString& sDBName, { ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "xload" + (*pFileStream) << "xload" #if defined(WIN) || defined(WNT) << ".exe" #endif @@ -1292,13 +1292,13 @@ void ODriver::LoadBatch(const ::rtl::OUString& sDBName, << ::rtl::OString(_rUSR,_rUSR.getLength(),gsl_getSystemTextEncoding()) << "," << ::rtl::OString(_rPWD,_rPWD.getLength(),gsl_getSystemTextEncoding()); - + if ( !isKernelVersion(CURRENT_DB_VERSION) ) (*pFileStream) << " -S adabas -b "; else (*pFileStream) << " -S NATIVE -b "; - (*pFileStream) << ::rtl::OString(_rBatch,_rBatch.getLength(),gsl_getSystemTextEncoding()) + (*pFileStream) << ::rtl::OString(_rBatch,_rBatch.getLength(),gsl_getSystemTextEncoding()) << " > " << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) << " 2>&1" @@ -1373,7 +1373,7 @@ void ODriver::fillEnvironmentVariables() #if !(defined(WIN) || defined(WNT)) SvStream* pFileStream = aCmdFile.GetStream(STREAM_WRITE); - (*pFileStream) << "#!/bin/sh" + (*pFileStream) << "#!/bin/sh" << sNewLine << "cd \"$DBWORK\"" << sNewLine @@ -1480,7 +1480,7 @@ void ODriver::X_CONS(const ::rtl::OUString& sDBName,const ::rtl::OString& _ACTIO ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "x_cons" + (*pFileStream) << "x_cons" #if defined(WIN) || defined(WNT) << ".exe" #endif @@ -1527,7 +1527,7 @@ void ODriver::checkAndRestart(const ::rtl::OUString& sDBName,const TDatabaseStru if(bRead) { if(sStateLine.Search("WARM") != STRING_NOTFOUND) - { // nothing to do + { // nothing to do nStart = 0; break; } @@ -1567,7 +1567,7 @@ sal_Bool ODriver::isVersion(const ::rtl::OUString& sDBName, const char* _pVersio ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "getparam" + (*pFileStream) << "getparam" #if defined(WIN) || defined(WNT) << ".exe" #endif @@ -1607,7 +1607,7 @@ sal_Bool ODriver::isVersion(const ::rtl::OUString& sDBName, const char* _pVersio void ODriver::checkAndInsertNewDevSpace(const ::rtl::OUString& sDBName, const TDatabaseStruct& _rDBInfo) { - // %DBROOT%\pgm\getparam %2 DATA_CACHE_PAGES > %3 + // %DBROOT%\pgm\getparam %2 DATA_CACHE_PAGES > %3 String sWorkUrl(m_sDbWorkURL); String sExt = String::CreateFromAscii(".st"); ::utl::TempFile aCmdFile(String::CreateFromAscii("DevSpaces"),&sExt,&sWorkUrl); @@ -1621,7 +1621,7 @@ void ODriver::checkAndInsertNewDevSpace(const ::rtl::OUString& sDBName, ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "getparam" + (*pFileStream) << "getparam" #if defined(WIN) || defined(WNT) << ".exe" #endif @@ -1674,7 +1674,7 @@ sal_Bool ODriver::isKernelVersion(const char* _pVersion) ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "dbversion" + (*pFileStream) << "dbversion" << " > " << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) << sNewLine; @@ -1706,12 +1706,12 @@ sal_Bool ODriver::isKernelVersion(const char* _pVersion) return bIsVersion; } // ----------------------------------------------------------------------------- -void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) +void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) { #if defined(WIN) || defined(WNT) - // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% -b %m_sDbRoot%\env\TERMCHAR.ind + // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% -b %m_sDbRoot%\env\TERMCHAR.ind ::rtl::OUString aBatch = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-b ")); - ::rtl::OUString sTemp2 = m_sDbRootURL + m_sDelimit + ::rtl::OUString sTemp2 = m_sDbRootURL + m_sDelimit + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")) + m_sDelimit + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TERMCHAR.ind")); @@ -1721,11 +1721,11 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) XUTIL(aBatch,_aInfo.sDBName,_aInfo.sControlUser,_aInfo.sControlPassword); - // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER OFF + // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER OFF XUTIL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DIAGNOSE TRIGGER OFF")),_aInfo.sDBName,_aInfo.sControlUser,_aInfo.sControlPassword); - // xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S NATIVE -b %m_sDbRoot%\env\DBS.ins %_DOMAINPWD% + // xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S NATIVE -b %m_sDbRoot%\env\DBS.ins %_DOMAINPWD% { - sTemp2 = m_sDbRootURL + sTemp2 = m_sDbRootURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")) + m_sDelimit + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DBS.ins")); @@ -1737,9 +1737,9 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) LoadBatch(_aInfo.sDBName,_aInfo.sSysUser,_aInfo.sSysPassword,sTemp); } - // xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S NATIVE -b %m_sDbRoot%\env\XDD.ins + // xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S NATIVE -b %m_sDbRoot%\env\XDD.ins { - sTemp2 = m_sDbRootURL + sTemp2 = m_sDbRootURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")) + m_sDelimit + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("XDD.ins")); @@ -1749,9 +1749,9 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) LoadBatch(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAIN")),_aInfo.sDomainPassword,sTemp); } - // xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S NATIVE -b %m_sDbRoot%\env\QP.ins + // xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S NATIVE -b %m_sDbRoot%\env\QP.ins { - sTemp2 = m_sDbRootURL + sTemp2 = m_sDbRootURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")) + m_sDelimit + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("QP.ins")); @@ -1760,9 +1760,9 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) OSL_ENSURE(bOk,"File could be converted into file system path!"); LoadBatch(_aInfo.sDBName,_aInfo.sSysUser,_aInfo.sSysPassword,sTemp); } - // xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S NATIVE -b %m_sDbRoot%\env\SPROC.ins + // xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S NATIVE -b %m_sDbRoot%\env\SPROC.ins { - sTemp2 = m_sDbRootURL + sTemp2 = m_sDbRootURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")) + m_sDelimit + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SPROC.ins")); @@ -1773,13 +1773,13 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) LoadBatch(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAIN")),_aInfo.sDomainPassword,sTemp); } - // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER ON + // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER ON XUTIL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DIAGNOSE TRIGGER ON")),_aInfo.sDBName,_aInfo.sControlUser,_aInfo.sControlPassword); - // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% SET NOLOG OFF + // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% SET NOLOG OFF XUTIL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET NOLOG OFF")),_aInfo.sDBName,_aInfo.sControlUser,_aInfo.sControlPassword); - // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% SHUTDOWN QUICK + // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% SHUTDOWN QUICK XUTIL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SHUTDOWN QUICK")),_aInfo.sDBName,_aInfo.sControlUser,_aInfo.sControlPassword); - // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% RESTART + // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% RESTART XUTIL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RESTART")),_aInfo.sDBName,_aInfo.sControlUser,_aInfo.sControlPassword); #else // UNX @@ -1787,7 +1787,7 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) { ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); - (*pFileStream) << "x_dbinst" + (*pFileStream) << "x_dbinst" << " -d " << ::rtl::OString(_aInfo.sDBName,_aInfo.sDBName.getLength(),gsl_getSystemTextEncoding()) << " -u " @@ -1800,7 +1800,7 @@ void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) if ( isKernelVersion(ADABAS_KERNEL_11) ) (*pFileStream) << "-i all"; - (*pFileStream) + (*pFileStream) #if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) << " >> /tmp/kstart.log" #else @@ -1829,8 +1829,8 @@ void ODriver::convertOldVersion(const ::rtl::OUString& sDBName,const TDatabaseSt // first we have to check if this databse is a old version and we have to update the system tables if ( !isVersion(sDBName,CURRENT_DB_VERSION) && isKernelVersion(CURRENT_DB_VERSION) ) { - if ( !_rDbInfo.sControlUser.getLength() - || !_rDbInfo.sControlPassword.getLength()) + if ( !_rDbInfo.sControlUser.getLength() + || !_rDbInfo.sControlPassword.getLength()) { ::connectivity::SharedResources aResources; const ::rtl::OUString sError( aResources.getResourceString(STR_DATABASE_NEEDS_CONVERTING) ); @@ -1860,7 +1860,7 @@ void ODriver::convertOldVersion(const ::rtl::OUString& sDBName,const TDatabaseSt } } } - + UCBContentHelper::Kill(sCommandFile); } } diff --git a/connectivity/source/drivers/adabas/BFunctions.cxx b/connectivity/source/drivers/adabas/BFunctions.cxx index ee6159aae64c..0bdb2585ab86 100644 --- a/connectivity/source/drivers/adabas/BFunctions.cxx +++ b/connectivity/source/drivers/adabas/BFunctions.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ T3SQLConnect pODBC3SQLConnect; T3SQLDriverConnect pODBC3SQLDriverConnect; T3SQLBrowseConnect pODBC3SQLBrowseConnect; T3SQLDataSources pODBC3SQLDataSources; -T3SQLDrivers pODBC3SQLDrivers; +T3SQLDrivers pODBC3SQLDrivers; T3SQLGetInfo pODBC3SQLGetInfo; T3SQLGetFunctions pODBC3SQLGetFunctions; T3SQLGetTypeInfo pODBC3SQLGetTypeInfo; @@ -88,7 +88,7 @@ T3SQLForeignKeys pODBC3SQLForeignKeys; T3SQLPrimaryKeys pODBC3SQLPrimaryKeys; T3SQLProcedureColumns pODBC3SQLProcedureColumns; T3SQLProcedures pODBC3SQLProcedures; -T3SQLSpecialColumns pODBC3SQLSpecialColumns; +T3SQLSpecialColumns pODBC3SQLSpecialColumns; T3SQLStatistics pODBC3SQLStatistics; T3SQLTablePrivileges pODBC3SQLTablePrivileges; T3SQLTables pODBC3SQLTables; @@ -116,14 +116,14 @@ sal_Bool LoadLibrary_ADABAS(::rtl::OUString &_rPath) ::rtl::OUString sTemp(RTL_CONSTASCII_USTRINGPARAM("DBROOT")); if ( osl_getEnvironment(sTemp.pData,&pPath) == osl_Process_E_None && pPath ) { - + #if ( defined(SOLARIS) && defined(SPARC)) || defined(LINUX) || defined(MACOSX) _rPath = ::rtl::OUString(pPath); _rPath += ::rtl::OUString::createFromAscii("/lib/"); #endif rtl_uString_release(pPath); } - else + else { _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The variable DBROOT is not set.")); return sal_False; @@ -153,119 +153,119 @@ sal_Bool LoadLibrary_ADABAS(::rtl::OUString &_rPath) sal_Bool LoadFunctions(oslModule pODBCso) { - if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLAllocHandle").pData )) == NULL ) + if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLAllocHandle").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLConnect").pData )) == NULL ) + if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLConnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDriverConnect").pData )) == NULL ) + if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDriverConnect").pData )) == NULL ) return sal_False; if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBrowseConnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetInfo").pData )) == NULL ) + if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetInfo").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetTypeInfo").pData )) == NULL ) + if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetTypeInfo").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetConnectAttr").pData )) == NULL ) + if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetConnectAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetConnectAttr").pData )) == NULL ) + if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetConnectAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetEnvAttr").pData )) == NULL ) + if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetEnvAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetEnvAttr").pData )) == NULL ) + if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetEnvAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetStmtAttr").pData )) == NULL ) + if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetStmtAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetStmtAttr").pData )) == NULL ) + if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetStmtAttr").pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLSetDescField = (T3SQLSetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescField").pData )) == NULL ) + /*if( ( pODBC3SQLSetDescField = (T3SQLSetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescField").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetDescField = (T3SQLGetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescField").pData )) == NULL ) + if( ( pODBC3SQLGetDescField = (T3SQLGetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescField").pData )) == NULL ) return sal_False;*/ - /*if( ( pODBC3SQLGetDescRec = (T3SQLGetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescRec").pData )) == NULL ) + /*if( ( pODBC3SQLGetDescRec = (T3SQLGetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescRec").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetDescRec = (T3SQLSetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescRec").pData )) == NULL ) + if( ( pODBC3SQLSetDescRec = (T3SQLSetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescRec").pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrepare").pData )) == NULL ) + if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrepare").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindParameter").pData )) == NULL ) + if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindParameter").pData )) == NULL ) return sal_False; -// if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) -// return sal_False; - if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetCursorName").pData )) == NULL ) +// if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) +// return sal_False; + if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetCursorName").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecute").pData )) == NULL ) + if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecute").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecDirect").pData )) == NULL ) + if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecDirect").pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) + /*if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) return sal_False;*/ if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeParam").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumParams").pData )) == NULL ) + if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumParams").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLParamData").pData )) == NULL ) + if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLParamData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPutData").pData )) == NULL ) + if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPutData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLRowCount").pData )) == NULL ) + if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLRowCount").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumResultCols").pData )) == NULL ) + if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumResultCols").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeCol").pData )) == NULL ) + if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeCol").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColAttribute").pData )) == NULL ) + if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColAttribute").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindCol").pData )) == NULL ) + if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindCol").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetch").pData )) == NULL ) + if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetch").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetchScroll").pData )) == NULL ) + if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetchScroll").pData )) == NULL ) + return sal_False; + if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetData").pData )) == NULL ) + if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetPos").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetPos").pData )) == NULL ) + if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLMoreResults").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLMoreResults").pData )) == NULL ) - return sal_False; - /*if( ( pODBC3SQLGetDiagField = (T3SQLGetDiagField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagField").pData )) == NULL ) + /*if( ( pODBC3SQLGetDiagField = (T3SQLGetDiagField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagField").pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagRec").pData )) == NULL ) + if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagRec").pData )) == NULL ) return sal_False; if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumnPrivileges").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumns").pData )) == NULL ) + if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLForeignKeys").pData )) == NULL ) + if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLForeignKeys").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrimaryKeys").pData )) == NULL ) + if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrimaryKeys").pData )) == NULL ) return sal_False; if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedureColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedures").pData )) == NULL ) + if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedures").pData )) == NULL ) return sal_False; if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSpecialColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLStatistics").pData )) == NULL ) - return sal_False; - if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTablePrivileges").pData )) == NULL ) + if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLStatistics").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTables").pData )) == NULL ) + if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTablePrivileges").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeStmt").pData )) == NULL ) + if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTables").pData )) == NULL ) + return sal_False; + if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeStmt").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCloseCursor").pData )) == NULL ) + if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCloseCursor").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCancel").pData )) == NULL ) + if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCancel").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLEndTran").pData )) == NULL ) + if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLEndTran").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDisconnect").pData )) == NULL ) + if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDisconnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeHandle").pData )) == NULL ) + if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeHandle").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) + if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) + if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) return sal_False; return sal_True; diff --git a/connectivity/source/drivers/adabas/BGroup.cxx b/connectivity/source/drivers/adabas/BGroup.cxx index 2669454192e1..0f488b635729 100644 --- a/connectivity/source/drivers/adabas/BGroup.cxx +++ b/connectivity/source/drivers/adabas/BGroup.cxx @@ -2,7 +2,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 @@ -39,13 +39,13 @@ using namespace connectivity::adabas; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -OAdabasGroup::OAdabasGroup( OAdabasConnection* _pConnection) : connectivity::sdbcx::OGroup(sal_True) +OAdabasGroup::OAdabasGroup( OAdabasConnection* _pConnection) : connectivity::sdbcx::OGroup(sal_True) ,m_pConnection(_pConnection) { construct(); diff --git a/connectivity/source/drivers/adabas/BGroups.cxx b/connectivity/source/drivers/adabas/BGroups.cxx index f514b9eef8bb..acc6751521f9 100644 --- a/connectivity/source/drivers/adabas/BGroups.cxx +++ b/connectivity/source/drivers/adabas/BGroups.cxx @@ -2,7 +2,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 @@ -40,7 +40,7 @@ using namespace connectivity; using namespace connectivity::adabas; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -58,15 +58,15 @@ void OGroups::impl_refresh() throw(RuntimeException) // ------------------------------------------------------------------------- Reference< XPropertySet > OGroups::createDescriptor() { - // OAdabasGroup* pNew = + // OAdabasGroup* pNew = return new OAdabasGroup(m_pConnection); } // ------------------------------------------------------------------------- // XAppend sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& /*descriptor*/ ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USERGROUP "); - ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USERGROUP "); + ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); aSql = aSql + aQuote + _rForName + aQuote; @@ -80,8 +80,8 @@ sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const // XDrop void OGroups::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USERGROUP "); - ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USERGROUP "); + ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); aSql = aSql + aQuote + _sElementName + aQuote; diff --git a/connectivity/source/drivers/adabas/BIndex.cxx b/connectivity/source/drivers/adabas/BIndex.cxx index 876d0a7fe03f..f8f574783e1f 100644 --- a/connectivity/source/drivers/adabas/BIndex.cxx +++ b/connectivity/source/drivers/adabas/BIndex.cxx @@ -2,7 +2,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 @@ -38,12 +38,12 @@ using namespace connectivity::adabas; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -OAdabasIndex::OAdabasIndex( OAdabasTable* _pTable, +OAdabasIndex::OAdabasIndex( OAdabasTable* _pTable, const ::rtl::OUString& _Name, const ::rtl::OUString& _Catalog, sal_Bool _isUnique, @@ -60,8 +60,8 @@ OAdabasIndex::OAdabasIndex( OAdabasTable* _pTable, refreshColumns(); } // ------------------------------------------------------------------------- -OAdabasIndex::OAdabasIndex(OAdabasTable* _pTable) - : connectivity::sdbcx::OIndex(sal_True) +OAdabasIndex::OAdabasIndex(OAdabasTable* _pTable) + : connectivity::sdbcx::OIndex(sal_True) ,m_pTable(_pTable) { construct(); @@ -98,7 +98,7 @@ void OAdabasIndex::refreshColumns() if(m_pColumns) m_pColumns->reFill(aVector); else - m_pColumns = new OIndexColumns(this,m_aMutex,aVector); + m_pColumns = new OIndexColumns(this,m_aMutex,aVector); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/adabas/BIndexColumns.cxx b/connectivity/source/drivers/adabas/BIndexColumns.cxx index 5cc13d78f4f7..2ca68733d27b 100644 --- a/connectivity/source/drivers/adabas/BIndexColumns.cxx +++ b/connectivity/source/drivers/adabas/BIndexColumns.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ using namespace connectivity::adabas; using namespace connectivity::sdbcx; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -79,9 +79,9 @@ ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName) { if(xRow->getString(4) == _rName) { - sal_Int32 nType = xRow->getInt(5); - ::rtl::OUString sTypeName = xRow->getString(6); - sal_Int32 nPrec = xRow->getInt(7); + sal_Int32 nType = xRow->getInt(5); + ::rtl::OUString sTypeName = xRow->getString(6); + sal_Int32 nPrec = xRow->getInt(7); OAdabasCatalog::correctColumnProperties(nPrec,nType,sTypeName); OIndexColumn* pRet = new OIndexColumn(bAsc, diff --git a/connectivity/source/drivers/adabas/BIndexes.cxx b/connectivity/source/drivers/adabas/BIndexes.cxx index 0da65ae53257..19bd0b80c46c 100644 --- a/connectivity/source/drivers/adabas/BIndexes.cxx +++ b/connectivity/source/drivers/adabas/BIndexes.cxx @@ -2,7 +2,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 @@ -58,12 +58,12 @@ sdbcx::ObjectType OIndexes::createObject(const ::rtl::OUString& _rName) sal_Int32 nLen = _rName.indexOf('.'); if(nLen != -1) { - aQualifier = _rName.copy(0,nLen); - aName = _rName.copy(nLen+1); + aQualifier = _rName.copy(0,nLen); + aName = _rName.copy(nLen+1); } else - aName = _rName; - + aName = _rName; + Reference< XResultSet > xResult = m_pTable->getMetaData()->getIndexInfo(Any(), m_pTable->getSchema(),m_pTable->getTableName(),sal_False,sal_False); @@ -72,7 +72,7 @@ sdbcx::ObjectType OIndexes::createObject(const ::rtl::OUString& _rName) if(xResult.is()) { Reference< XRow > xRow(xResult,UNO_QUERY); - while(xResult->next()) + while(xResult->next()) { if(xRow->getString(6) == aName && (!aQualifier.getLength() || xRow->getString(5) == aQualifier )) { @@ -105,15 +105,15 @@ sdbcx::ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, cons if ( m_pTable->isNew() ) ::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(this)); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE "); - ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE "); + ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); if(getBOOL(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))) aSql = aSql + ::rtl::OUString::createFromAscii("UNIQUE "); aSql = aSql + ::rtl::OUString::createFromAscii("INDEX "); - + if(_rForName.getLength()) { aSql = aSql + aQuote + _rForName + aQuote @@ -130,12 +130,12 @@ sdbcx::ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, cons { xColumns->getByIndex(i) >>= xColProp; aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) + aQuote; - aSql = aSql + (getBOOL(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING))) - ? + aSql = aSql + (getBOOL(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING))) + ? ::rtl::OUString::createFromAscii(" ASC") : ::rtl::OUString::createFromAscii(" DESC")) - + ::rtl::OUString::createFromAscii(","); + + ::rtl::OUString::createFromAscii(","); } aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")")); } @@ -169,10 +169,10 @@ void OIndexes::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementNam ::rtl::OUString aName,aSchema; sal_Int32 nLen = _sElementName.indexOf('.'); aSchema = _sElementName.copy(0,nLen); - aName = _sElementName.copy(nLen+1); + aName = _sElementName.copy(nLen+1); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP INDEX "); - ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP INDEX "); + ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); if (aSchema.getLength()) diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx index 9c130d6e5690..21e4a302956d 100644 --- a/connectivity/source/drivers/adabas/BKeys.cxx +++ b/connectivity/source/drivers/adabas/BKeys.cxx @@ -2,7 +2,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 @@ -63,14 +63,14 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R return xNewDescriptor; } - sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); + sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); - const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); aSql += composeTableName( getTable()->getConnection()->getMetaData(), getTable(), ::dbtools::eInTableDefinitions, false, false, true ); - + if(nKeyType == KeyType::PRIMARY) { aSql = aSql + ::rtl::OUString::createFromAscii(" ALTER PRIMARY KEY ("); @@ -84,13 +84,13 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R Reference<XColumnsSupplier> xColumnSup(descriptor,UNO_QUERY); Reference<XIndexAccess> xColumns(xColumnSup->getColumns(),UNO_QUERY); - + for(sal_Int32 i=0;i<xColumns->getCount();++i) { Reference< XPropertySet > xColProp; xColumns->getByIndex(i) >>= xColProp; aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) + aQuote - + ::rtl::OUString::createFromAscii(","); + + ::rtl::OUString::createFromAscii(","); } aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")")); @@ -99,13 +99,13 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R if(nKeyType == KeyType::FOREIGN) { - nDeleteRule = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE))); + nDeleteRule = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE))); ::rtl::OUString aName,aSchema; sReferencedName = getString(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REFERENCEDTABLE))); sal_Int32 nLen = sReferencedName.indexOf('.'); aSchema = sReferencedName.copy(0,nLen); - aName = sReferencedName.copy(nLen+1); + aName = sReferencedName.copy(nLen+1); aSql += ::rtl::OUString::createFromAscii(" REFERENCES ") + aQuote + aSchema + aQuote + sDot + aQuote + aName + aQuote; aSql += ::rtl::OUString::createFromAscii(" ("); @@ -115,7 +115,7 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R Reference< XPropertySet > xColProp; xColumns->getByIndex(i) >>= xColProp; aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN))) + aQuote - + ::rtl::OUString::createFromAscii(","); + + ::rtl::OUString::createFromAscii(","); } aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")")); @@ -147,8 +147,8 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R { const ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); ::rtl::OUString aSchema,aTable; - getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; - getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; + getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; + getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; Reference< XResultSet > xResult = getTable()->getMetaData()->getImportedKeys( getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)) ,aSchema ,aTable); diff --git a/connectivity/source/drivers/adabas/BPreparedStatement.cxx b/connectivity/source/drivers/adabas/BPreparedStatement.cxx index c217f660d67b..a25b760c3e4b 100644 --- a/connectivity/source/drivers/adabas/BPreparedStatement.cxx +++ b/connectivity/source/drivers/adabas/BPreparedStatement.cxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::io; using namespace com::sun::star::util; -OAdabasPreparedStatement::OAdabasPreparedStatement( OAdabasConnection* _pConnection,const ::rtl::OUString& sql) +OAdabasPreparedStatement::OAdabasPreparedStatement( OAdabasConnection* _pConnection,const ::rtl::OUString& sql) : ::connectivity::odbc::OPreparedStatement( _pConnection,sql) { m_aSelectColumns = _pConnection->createSelectColumns(sql); @@ -68,7 +68,7 @@ void OAdabasPreparedStatement::setResultSetConcurrency(sal_Int32 /*_par0*/) ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetConcurrency", *this ); } // ----------------------------------------------------------------------------- -void OAdabasPreparedStatement::setResultSetType(sal_Int32 /*_par0*/) +void OAdabasPreparedStatement::setResultSetType(sal_Int32 /*_par0*/) { ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetType", *this ); } diff --git a/connectivity/source/drivers/adabas/BResultSet.cxx b/connectivity/source/drivers/adabas/BResultSet.cxx index 4ce890994092..96212030c99f 100644 --- a/connectivity/source/drivers/adabas/BResultSet.cxx +++ b/connectivity/source/drivers/adabas/BResultSet.cxx @@ -2,7 +2,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 @@ -56,7 +56,7 @@ sal_Bool SAL_CALL OAdabasResultSet::next( ) throw(SQLException, RuntimeExceptio m_nLastColumnPos = 0; - // m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_NEXT,0); + // m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_NEXT,0); m_nCurrentFetchState = N3SQLFetch(m_aStatementHandle); if(m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO) @@ -192,7 +192,7 @@ void SAL_CALL OAdabasResultSet::refreshRow( ) throw(SQLException, RuntimeExcept checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - // SQLRETURN nRet = N3SQLSetPos(m_aStatementHandle,1,SQL_REFRESH,SQL_LOCK_NO_CHANGE); + // SQLRETURN nRet = N3SQLSetPos(m_aStatementHandle,1,SQL_REFRESH,SQL_LOCK_NO_CHANGE); N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_RETRIEVE_DATA,(SQLPOINTER)SQL_RD_OFF,SQL_IS_UINTEGER); m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_RELATIVE,0); sal_Bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; diff --git a/connectivity/source/drivers/adabas/BResultSetMetaData.cxx b/connectivity/source/drivers/adabas/BResultSetMetaData.cxx index 18605f519549..fe1eba559a4d 100644 --- a/connectivity/source/drivers/adabas/BResultSetMetaData.cxx +++ b/connectivity/source/drivers/adabas/BResultSetMetaData.cxx @@ -2,7 +2,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 @@ -39,7 +39,7 @@ using namespace com::sun::star::uno; using namespace connectivity::adabas; using namespace connectivity; -OAdabasResultSetMetaData::OAdabasResultSetMetaData(odbc::OConnection* _pConnection, SQLHANDLE _pStmt,const ::rtl::Reference<OSQLColumns>& _rSelectColumns ) +OAdabasResultSetMetaData::OAdabasResultSetMetaData(odbc::OConnection* _pConnection, SQLHANDLE _pStmt,const ::rtl::Reference<OSQLColumns>& _rSelectColumns ) : OAdabasResultSetMetaData_BASE(_pConnection,_pStmt) ,m_aSelectColumns(_rSelectColumns) { diff --git a/connectivity/source/drivers/adabas/BStatement.cxx b/connectivity/source/drivers/adabas/BStatement.cxx index 6f5cf4028b90..f4e399cc3c07 100644 --- a/connectivity/source/drivers/adabas/BStatement.cxx +++ b/connectivity/source/drivers/adabas/BStatement.cxx @@ -2,7 +2,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 @@ -53,18 +53,18 @@ OResultSet* OAdabasStatement::createResulSet() return new OAdabasResultSet(m_aStatementHandle,this,m_aSelectColumns); } // ----------------------------------------------------------------------------- -void OAdabasStatement::setUsingBookmarks(sal_Bool /*_bUseBookmark*/) +void OAdabasStatement::setUsingBookmarks(sal_Bool /*_bUseBookmark*/) { ::dbtools::throwFeatureNotImplementedException( "bookmarks", *this ); // adabas doesn't support bookmarks } // ----------------------------------------------------------------------------- -void OAdabasStatement::setResultSetConcurrency(sal_Int32 /*_par0*/) +void OAdabasStatement::setResultSetConcurrency(sal_Int32 /*_par0*/) { ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetConcurrency", *this ); } // ----------------------------------------------------------------------------- -void OAdabasStatement::setResultSetType(sal_Int32 /*_par0*/) +void OAdabasStatement::setResultSetType(sal_Int32 /*_par0*/) { ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetType", *this ); } diff --git a/connectivity/source/drivers/adabas/BTable.cxx b/connectivity/source/drivers/adabas/BTable.cxx index ad76c4a3f4b1..323f658fdf61 100644 --- a/connectivity/source/drivers/adabas/BTable.cxx +++ b/connectivity/source/drivers/adabas/BTable.cxx @@ -2,7 +2,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 @@ -57,7 +57,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OAdabasTable::OAdabasTable( sdbcx::OCollection* _pTables, +OAdabasTable::OAdabasTable( sdbcx::OCollection* _pTables, OAdabasConnection* _pConnection) :OTable_TYPEDEF(_pTables,_pConnection,sal_True) ,m_pConnection(_pConnection) @@ -65,14 +65,14 @@ OAdabasTable::OAdabasTable( sdbcx::OCollection* _pTables, construct(); } // ------------------------------------------------------------------------- -OAdabasTable::OAdabasTable( sdbcx::OCollection* _pTables, +OAdabasTable::OAdabasTable( sdbcx::OCollection* _pTables, OAdabasConnection* _pConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, const ::rtl::OUString& _Description , const ::rtl::OUString& _SchemaName, const ::rtl::OUString& _CatalogName - ) : OTableHelper( _pTables, + ) : OTableHelper( _pTables, _pConnection, sal_True, _Name, @@ -152,27 +152,27 @@ void SAL_CALL OAdabasTable::alterColumnByName( const ::rtl::OUString& colName, c // first check the types sal_Int32 nOldType = 0,nNewType = 0,nOldPrec = 0,nNewPrec = 0,nOldScale = 0,nNewScale = 0; - xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType; - descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType; + xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType; + descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType; // and precsions and scale - xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec; + xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))>>= nNewPrec; - xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale; - descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nNewScale; + xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale; + descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nNewScale; if(nOldType != nNewType || nOldPrec != nNewPrec || nOldScale != nNewScale) alterColumnType(colName,descriptor); // second: check the "is nullable" value sal_Int32 nOldNullable = 0,nNewNullable = 0; - xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nOldNullable; - descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; + xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nOldNullable; + descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; if(nNewNullable != nOldNullable) alterNotNullValue(nNewNullable,colName); // third: check the default values ::rtl::OUString sNewDefault,sOldDefault; - xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; + xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sNewDefault; if(sOldDefault.getLength()) diff --git a/connectivity/source/drivers/adabas/BTables.cxx b/connectivity/source/drivers/adabas/BTables.cxx index b09476b154e8..4fb9626cc595 100644 --- a/connectivity/source/drivers/adabas/BTables.cxx +++ b/connectivity/source/drivers/adabas/BTables.cxx @@ -2,7 +2,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 @@ -62,12 +62,12 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) ::rtl::OUString aName,aSchema; sal_Int32 nLen = _rName.indexOf('.'); aSchema = _rName.copy(0,nLen); - aName = _rName.copy(nLen+1); + aName = _rName.copy(nLen+1); Sequence< ::rtl::OUString > aTypes(1); aTypes[0] = ::rtl::OUString::createFromAscii("%"); - // aTypes[0] = ::rtl::OUString::createFromAscii("TABLE"); - // aTypes[1] = ::rtl::OUString::createFromAscii("SYSTEMTABLE"); + // aTypes[0] = ::rtl::OUString::createFromAscii("TABLE"); + // aTypes[1] = ::rtl::OUString::createFromAscii("SYSTEMTABLE"); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); @@ -77,7 +77,7 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) Reference< XRow > xRow(xResult,UNO_QUERY); if(xResult->next()) // there can be only one table with this name { - OAdabasTable* pRet = new OAdabasTable(this, static_cast<OAdabasCatalog&>(m_rParent).getConnection(), + OAdabasTable* pRet = new OAdabasTable(this, static_cast<OAdabasCatalog&>(m_rParent).getConnection(), aName,xRow->getString(4),xRow->getString(5),aSchema); xRet = pRet; } @@ -112,8 +112,8 @@ sdbcx::ObjectType OTables::appendObject( const ::rtl::OUString& _rForName, const // ------------------------------------------------------------------------- void OTables::setComments(const Reference< XPropertySet >& descriptor ) throw(SQLException, RuntimeException) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); - ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); + ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); OAdabasConnection* pConnection = static_cast<OAdabasCatalog&>(m_rParent).getConnection(); @@ -174,7 +174,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString aName,aSchema; sal_Int32 nLen = _sElementName.indexOf('.'); aSchema = _sElementName.copy(0,nLen); - aName = _sElementName.copy(nLen+1); + aName = _sElementName.copy(nLen+1); ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP "); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); @@ -202,8 +202,8 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) // ------------------------------------------------------------------------- void OTables::createTable( const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); - ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); + ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); ::rtl::OUString sSchema; @@ -255,7 +255,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) if(::cppu::extractInterface(xColProp,xKeys->getByIndex(key)) && xColProp.is()) { - sal_Int32 nKeyType = getINT32(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); + sal_Int32 nKeyType = getINT32(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); if(nKeyType == KeyType::PRIMARY) { @@ -273,7 +273,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) { if(::cppu::extractInterface(xColProp,xColumns->getByIndex(column)) && xColProp.is()) aSql += aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) + aQuote - + ::rtl::OUString::createFromAscii(","); + + ::rtl::OUString::createFromAscii(","); } aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")")); @@ -297,7 +297,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) } else if(nKeyType == KeyType::FOREIGN) { - sal_Int32 nDeleteRule = getINT32(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE))); + sal_Int32 nDeleteRule = getINT32(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE))); xColumnSup = Reference<XColumnsSupplier>(xColProp,UNO_QUERY); xColumns = Reference<XIndexAccess>(xColumnSup->getColumns(),UNO_QUERY); @@ -308,7 +308,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) ::rtl::OUString aName,aSchema,aRefTable = getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REFERENCEDTABLE))); sal_Int32 nLen = aRefTable.indexOf('.'); aSchema = aRefTable.copy(0,nLen); - aName = aRefTable.copy(nLen+1); + aName = aRefTable.copy(nLen+1); aSql += aQuote + aSchema + aQuote + sDot + aQuote + aName + aQuote @@ -443,7 +443,7 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable) // ----------------------------------------------------------------------------- ::rtl::OUString OTables::getTypeString(const Reference< XPropertySet >& _rxColProp) { - ::rtl::OUString aValue; + ::rtl::OUString aValue; switch(getINT32(_rxColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))) { case DataType::BIT: diff --git a/connectivity/source/drivers/adabas/BUser.cxx b/connectivity/source/drivers/adabas/BUser.cxx index 671edf6df8fb..c6bf7287998a 100644 --- a/connectivity/source/drivers/adabas/BUser.cxx +++ b/connectivity/source/drivers/adabas/BUser.cxx @@ -2,7 +2,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 @@ -48,7 +48,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -OAdabasUser::OAdabasUser( OAdabasConnection* _pConnection) : connectivity::sdbcx::OUser(sal_True) +OAdabasUser::OAdabasUser( OAdabasConnection* _pConnection) : connectivity::sdbcx::OUser(sal_True) ,m_pConnection(_pConnection) { construct(); @@ -90,16 +90,16 @@ void OAdabasUser::refreshGroups() m_pGroups = new OGroups(*this,m_aMutex,aVector,m_pConnection,this); } // ------------------------------------------------------------------------- -OUserExtend::OUserExtend( OAdabasConnection* _pConnection) : OAdabasUser(_pConnection) +OUserExtend::OUserExtend( OAdabasConnection* _pConnection) : OAdabasUser(_pConnection) { construct(); } // ------------------------------------------------------------------------- -typedef connectivity::sdbcx::OUser OUser_TYPEDEF; +typedef connectivity::sdbcx::OUser OUser_TYPEDEF; void OUserExtend::construct() { - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const @@ -266,10 +266,10 @@ void SAL_CALL OAdabasUser::changePassword( const ::rtl::OUString& objPassword, c if(pNewConnection) { Sequence< PropertyValue> aSeq(2); - aSeq.getArray()[0].Name = ::rtl::OUString::createFromAscii("user") ; - aSeq.getArray()[0].Value <<= m_Name; - aSeq.getArray()[1].Name = ::rtl::OUString::createFromAscii("password") ; - aSeq.getArray()[1].Value <<= objPassword; + aSeq.getArray()[0].Name = ::rtl::OUString::createFromAscii("user") ; + aSeq.getArray()[0].Value <<= m_Name; + aSeq.getArray()[1].Name = ::rtl::OUString::createFromAscii("password") ; + aSeq.getArray()[1].Value <<= objPassword; pNewConnection->Construct(m_pConnection->getMetaData()->getURL(),aSeq); } bDisposeConnection = sal_True; diff --git a/connectivity/source/drivers/adabas/BUsers.cxx b/connectivity/source/drivers/adabas/BUsers.cxx index c342a9158339..a0e8fc1ca07d 100644 --- a/connectivity/source/drivers/adabas/BUsers.cxx +++ b/connectivity/source/drivers/adabas/BUsers.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ using namespace connectivity; using namespace connectivity::adabas; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -69,8 +69,8 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USER "); - ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USER "); + ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); sUserName = sUserName.toAsciiUpperCase(); @@ -115,8 +115,8 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) } { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USER "); - ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USER "); + ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); Reference< XStatement > xStmt = m_pConnection->createStatement( ); diff --git a/connectivity/source/drivers/adabas/BViews.cxx b/connectivity/source/drivers/adabas/BViews.cxx index 75caf4fd3967..a2321c0422f9 100644 --- a/connectivity/source/drivers/adabas/BViews.cxx +++ b/connectivity/source/drivers/adabas/BViews.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ sdbcx::ObjectType OViews::createObject(const ::rtl::OUString& _rName) ::rtl::OUString aName,aSchema; sal_Int32 nLen = _rName.indexOf('.'); aSchema = _rName.copy(0,nLen); - aName = _rName.copy(nLen+1); + aName = _rName.copy(nLen+1); ::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT DISTINCT * FROM DOMAIN.SHOW_VIEW WHERE "); if(aSchema.getLength()) @@ -141,7 +141,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) ::rtl::OUString aName,aSchema; sal_Int32 nLen = _sElementName.indexOf('.'); aSchema = _sElementName.copy(0,nLen); - aName = _sElementName.copy(nLen+1); + aName = _sElementName.copy(nLen+1); ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW"); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); @@ -162,8 +162,8 @@ void OViews::dropByNameImpl(const ::rtl::OUString& elementName) // ----------------------------------------------------------------------------- void OViews::createView( const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); - ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); ::rtl::OUString sSchema,sCommand; diff --git a/connectivity/source/drivers/adabas/Bservices.cxx b/connectivity/source/drivers/adabas/Bservices.cxx index dec42a770ba8..a1f26ca24277 100644 --- a/connectivity/source/drivers/adabas/Bservices.cxx +++ b/connectivity/source/drivers/adabas/Bservices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/adabas/adabas.xcu b/connectivity/source/drivers/adabas/adabas.xcu index b92067235e15..fa7defad35c5 100755 --- a/connectivity/source/drivers/adabas/adabas.xcu +++ b/connectivity/source/drivers/adabas/adabas.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/adabas/adabas.xml b/connectivity/source/drivers/adabas/adabas.xml index a3fd2b8b1371..bc6e1348bd8d 100644 --- a/connectivity/source/drivers/adabas/adabas.xml +++ b/connectivity/source/drivers/adabas/adabas.xml @@ -12,7 +12,7 @@ <language>c++</language> <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> - </component-description> + </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> diff --git a/connectivity/source/drivers/ado/ACallableStatement.cxx b/connectivity/source/drivers/ado/ACallableStatement.cxx index 1d1cdabf656a..feb29ec8d9b7 100644 --- a/connectivity/source/drivers/ado/ACallableStatement.cxx +++ b/connectivity/source/drivers/ado/ACallableStatement.cxx @@ -2,7 +2,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 @@ -41,10 +41,10 @@ using namespace com::sun::star::lang; IMPLEMENT_SERVICE_INFO(OCallableStatement,"com.sun.star.sdbcx.ACallableStatement","com.sun.star.sdbc.CallableStatement"); -#define GET_PARAM() \ - ADOParameter* pParam = NULL; \ - m_pParameters->get_Item(OLEVariant(sal_Int32(columnIndex-1)),&pParam); \ - if(pParam) \ +#define GET_PARAM() \ + ADOParameter* pParam = NULL; \ + m_pParameters->get_Item(OLEVariant(sal_Int32(columnIndex-1)),&pParam); \ + if(pParam) \ pParam->get_Value(&m_aValue); //************************************************************** //************ Class: java.sql.CallableStatement diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index aa38e4b5123c..f6390431b66a 100644 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -2,7 +2,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 @@ -58,7 +58,7 @@ OCatalog::~OCatalog() void OCatalog::refreshTables() { TStringVector aVector; - + WpADOTables aTables(m_aCatalog.get_Tables()); if ( aTables.IsValid() ) { @@ -89,7 +89,7 @@ void OCatalog::refreshViews() WpADOViews aViews = m_aCatalog.get_Views(); aViews.fillElementNames(aVector); - + if(m_pViews) m_pViews->reFill(aVector); else @@ -102,7 +102,7 @@ void OCatalog::refreshGroups() WpADOGroups aGroups = m_aCatalog.get_Groups(); aGroups.fillElementNames(aVector); - + if(m_pGroups) m_pGroups->reFill(aVector); else @@ -115,7 +115,7 @@ void OCatalog::refreshUsers() WpADOUsers aUsers = m_aCatalog.get_Users(); aUsers.fillElementNames(aVector); - + if(m_pUsers) m_pUsers->reFill(aVector); else diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index 20a91af98a39..cfa5597d6df4 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -2,7 +2,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 @@ -72,7 +72,7 @@ OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection,_ADOColumn* _pC construct(); OSL_ENSURE(_pColumn,"Column can not be null!"); m_aColumn = WpADOColumn(_pColumn); - // m_aColumn.put_ParentCatalog(_pConnection->getAdoCatalog()->getCatalog()); + // m_aColumn.put_ParentCatalog(_pConnection->getAdoCatalog()->getCatalog()); fillPropertyValues(); } // ------------------------------------------------------------------------- @@ -116,8 +116,8 @@ void OAdoColumn::construct() { sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY; - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, ::getBooleanCppuType()); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, nAttrib,&m_IsAscending, ::getBooleanCppuType()); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)throw (Exception) @@ -153,7 +153,7 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r } break; case PROPERTY_ID_TYPENAME: - // rValue <<= m_pTable->getCatalog()->getConnection()->getTypeInfo()->find(); + // rValue <<= m_pTable->getCatalog()->getConnection()->getTypeInfo()->find(); break; case PROPERTY_ID_PRECISION: { @@ -204,16 +204,16 @@ void OAdoColumn::fillPropertyValues() { if(m_aColumn.IsValid()) { - m_IsAscending = m_aColumn.get_SortOrder() == adSortAscending; - m_ReferencedColumn = m_aColumn.get_RelatedColumn(); - m_Name = m_aColumn.get_Name(); - m_Precision = m_aColumn.get_Precision(); - m_Scale = m_aColumn.get_NumericScale(); - m_IsNullable = ((m_aColumn.get_Attributes() & adColNullable) == adColNullable) ? ColumnValue::NULLABLE : ColumnValue::NO_NULLS; + m_IsAscending = m_aColumn.get_SortOrder() == adSortAscending; + m_ReferencedColumn = m_aColumn.get_RelatedColumn(); + m_Name = m_aColumn.get_Name(); + m_Precision = m_aColumn.get_Precision(); + m_Scale = m_aColumn.get_NumericScale(); + m_IsNullable = ((m_aColumn.get_Attributes() & adColNullable) == adColNullable) ? ColumnValue::NULLABLE : ColumnValue::NO_NULLS; - DataTypeEnum eType = m_aColumn.get_Type(); - m_IsCurrency = (eType == adCurrency); - m_Type = ADOS::MapADOType2Jdbc(eType); + DataTypeEnum eType = m_aColumn.get_Type(); + m_IsCurrency = (eType == adCurrency); + m_Type = ADOS::MapADOType2Jdbc(eType); sal_Bool bForceTo = sal_True; const OTypeInfoMap* pTypeInfoMap = m_pConnection->getTypeInfo(); @@ -249,7 +249,7 @@ void OAdoColumn::fillPropertyValues() if ( pTypeInfo ) { m_TypeName = pTypeInfo->aSimpleType.aTypeName; - m_Type = ADOS::MapADOType2Jdbc(eType); + m_Type = ADOS::MapADOType2Jdbc(eType); } } @@ -280,7 +280,7 @@ void OAdoColumn::fillPropertyValues() } } // ----------------------------------------------------------------------------- -WpADOColumn OAdoColumn::getColumnImpl() const +WpADOColumn OAdoColumn::getColumnImpl() const { return m_aColumn; } diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx index 377667bc863b..9b2c82f052a7 100644 --- a/connectivity/source/drivers/ado/AColumns.cxx +++ b/connectivity/source/drivers/ado/AColumns.cxx @@ -2,7 +2,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 @@ -101,10 +101,10 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString&, const Referenc ::std::mem_fun(&OExtendedTypeInfo::getDBName), ::std::select2nd<OTypeInfoMap::value_type>()) ) - + ); - if ( aFind != pTypeInfoMap->end() ) // change column type if necessary + if ( aFind != pTypeInfoMap->end() ) // change column type if necessary aColumn.put_Type(aFind->first); if ( SUCCEEDED(((ADOColumns*)m_aCollection)->Append(OLEVariant(aColumn.get_Name()),aColumn.get_Type(),aColumn.get_DefinedSize())) ) @@ -117,7 +117,7 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString&, const Referenc if ( bAutoIncrement ) OTools::putValue( aAddedColumn.get_Properties(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Autoincrement")), bAutoIncrement ); - if ( aFind != pTypeInfoMap->end() && aColumn.get_Type() != aAddedColumn.get_Type() ) // change column type if necessary + if ( aFind != pTypeInfoMap->end() && aColumn.get_Type() != aAddedColumn.get_Type() ) // change column type if necessary aColumn.put_Type(aFind->first); aAddedColumn.put_Precision(aColumn.get_Precision()); aAddedColumn.put_NumericScale(aColumn.get_NumericScale()); diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 87e7c927a9e9..6f42c3641354 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -2,7 +2,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 @@ -55,7 +55,7 @@ using namespace com::sun::star::sdbcx; //------------------------------------------------------------------------------ IMPLEMENT_SERVICE_INFO(OConnection,"com.sun.star.sdbcx.AConnection","com.sun.star.sdbc.Connection"); // -------------------------------------------------------------------------------- -OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeException) +OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeException) : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), m_bClosed(sal_False), m_xCatalog(NULL), @@ -67,8 +67,8 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti { osl_incrementInterlockedCount( &m_refCount ); - IClassFactory2* pIUnknown = NULL; - IUnknown *pOuter = NULL; + IClassFactory2* pIUnknown = NULL; + IUnknown *pOuter = NULL; HRESULT hr; hr = CoGetClassObject( ADOS::CLSID_ADOCONNECTION_21, CLSCTX_INPROC_SERVER, @@ -78,7 +78,7 @@ OConnection::OConnection(ODriver* _pDriver) throw(SQLException, RuntimeExcepti if( !FAILED( hr ) ) { - ADOConnection *pCon = NULL; + ADOConnection *pCon = NULL; hr = pIUnknown->CreateInstanceLic( pOuter, NULL, ADOS::IID_ADOCONNECTION_21, @@ -120,8 +120,8 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV sal_Int32 nTimeout = 20; sal_Bool bSilent = sal_True; - const PropertyValue *pIter = info.getConstArray(); - const PropertyValue *pEnd = pIter + info.getLength(); + const PropertyValue *pIter = info.getConstArray(); + const PropertyValue *pEnd = pIter + info.getLength(); for(;pIter != pEnd;++pIter) { if(!pIter->Name.compareToAscii("Timeout")) @@ -448,26 +448,26 @@ void OConnection::buildTypeInfo() throw( SQLException) do { sal_Int32 nPos = 1; - OExtendedTypeInfo* aInfo = new OExtendedTypeInfo(); - aInfo->aSimpleType.aTypeName = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->eType = (DataTypeEnum)(sal_Int32)ADOS::getField(pRecordset,nPos++).get_Value(); + OExtendedTypeInfo* aInfo = new OExtendedTypeInfo(); + aInfo->aSimpleType.aTypeName = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->eType = (DataTypeEnum)(sal_Int32)ADOS::getField(pRecordset,nPos++).get_Value(); if ( aInfo->eType == adWChar && aInfo->aSimpleType.aTypeName == s_sVarChar ) aInfo->eType = adVarWChar; - aInfo->aSimpleType.nType = (sal_Int16)ADOS::MapADOType2Jdbc(static_cast<DataTypeEnum>(aInfo->eType)); - aInfo->aSimpleType.nPrecision = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.aLiteralPrefix = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.aLiteralSuffix = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.aCreateParams = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.bNullable = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.bCaseSensitive = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.nSearchType = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.bUnsigned = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.bCurrency = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.bAutoIncrement = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.aLocalTypeName = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.nMinimumScale = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.nMaximumScale = ADOS::getField(pRecordset,nPos++).get_Value(); - aInfo->aSimpleType.nNumPrecRadix = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.nType = (sal_Int16)ADOS::MapADOType2Jdbc(static_cast<DataTypeEnum>(aInfo->eType)); + aInfo->aSimpleType.nPrecision = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.aLiteralPrefix = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.aLiteralSuffix = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.aCreateParams = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.bNullable = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.bCaseSensitive = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.nSearchType = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.bUnsigned = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.bCurrency = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.bAutoIncrement = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.aLocalTypeName = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.nMinimumScale = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.nMaximumScale = ADOS::getField(pRecordset,nPos++).get_Value(); + aInfo->aSimpleType.nNumPrecRadix = ADOS::getField(pRecordset,nPos++).get_Value(); // Now that we have the type info, save it // in the Hashtable if we don't already have an // entry for this SQL type. @@ -486,10 +486,10 @@ void OConnection::disposing() OConnection_BASE::disposing(); - m_bClosed = sal_True; + m_bClosed = sal_True; m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>(); m_xCatalog = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier>(); - m_pDriver = NULL; + m_pDriver = NULL; m_pAdoConnection->Close(); @@ -553,11 +553,11 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r sal_Int32 nDBTypeScale = pInfo->aSimpleType.nMaximumScale; (void)nDBTypeScale; sal_Int32 nAdoType = pInfo->eType; (void)nAdoType; #endif - if ( ( !_sTypeName.getLength() - || (pInfo->aSimpleType.aTypeName.equalsIgnoreAsciiCase(_sTypeName)) + if ( ( !_sTypeName.getLength() + || (pInfo->aSimpleType.aTypeName.equalsIgnoreAsciiCase(_sTypeName)) ) - && (pInfo->aSimpleType.nPrecision >= _nPrecision) - && (pInfo->aSimpleType.nMaximumScale >= _nScale) + && (pInfo->aSimpleType.nPrecision >= _nPrecision) + && (pInfo->aSimpleType.nMaximumScale >= _nScale) ) break; @@ -568,19 +568,19 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r for(aIter = aPair.first; aIter != aPair.second; ++aIter) { // search the best matching type (now comparing the local names) - if ( (aIter->second->aSimpleType.aLocalTypeName.equalsIgnoreAsciiCase(_sTypeName)) - && (aIter->second->aSimpleType.nPrecision >= _nPrecision) - && (aIter->second->aSimpleType.nMaximumScale >= _nScale) + if ( (aIter->second->aSimpleType.aLocalTypeName.equalsIgnoreAsciiCase(_sTypeName)) + && (aIter->second->aSimpleType.nPrecision >= _nPrecision) + && (aIter->second->aSimpleType.nMaximumScale >= _nScale) ) { // we can not assert here because we could be in d&d /* OSL_ENSURE(sal_False, - ( ::rtl::OString("getTypeInfoFromType: assuming column type ") - += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding()) - += ::rtl::OString("\" (expected type name ") - += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) - += ::rtl::OString(" matches the type's local name).")).getStr()); + ( ::rtl::OString("getTypeInfoFromType: assuming column type ") + += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding()) + += ::rtl::OString("\" (expected type name ") + += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) + += ::rtl::OString(" matches the type's local name).")).getStr()); */ break; } @@ -588,7 +588,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r } if (aIter == aPair.second) - { // no match for the names, no match for the local names + { // no match for the names, no match for the local names // -> drop the precision and the scale restriction, accept any type with the property // type id (nType) @@ -617,7 +617,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r } // we can not assert here because we could be in d&d -// OSL_ENSURE(pTypeInfo, "getTypeInfoFromType: no type info found for this type!"); +// OSL_ENSURE(pTypeInfo, "getTypeInfoFromType: no type info found for this type!"); return pTypeInfo; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx index 958aa395b090..f1af30168e00 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx @@ -2,7 +2,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 @@ -50,7 +50,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// using namespace connectivity; +// using namespace connectivity; ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) : ::connectivity::ODatabaseMetaDataBase(_pCon,_pCon->getConnectionInfo()) @@ -62,7 +62,7 @@ ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) sal_Int32 ODatabaseMetaData::getInt32Property(const ::rtl::OUString& _aProperty) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { connectivity::ado::WpADOProperties aProps(m_pADOConnection->get_Properties()); - // ADOS::ThrowException(*m_pADOConnection,*this); + // ADOS::ThrowException(*m_pADOConnection,*this); OSL_ENSURE(aProps.IsValid(),"There are no properties at the connection"); ADO_PROP(_aProperty); sal_Int32 nValue(0); @@ -98,7 +98,7 @@ sal_Bool ODatabaseMetaData::getBoolProperty(const ::rtl::OUString& _aProperty) Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { ADORecordset *pRecordset = m_pADOConnection->getTypeInfo(); - // ADOS::ThrowException(*m_pADOConnection,*this); + // ADOS::ThrowException(*m_pADOConnection,*this); ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(pRecordset); pResult->setTypeInfoMap(ADOS::isJetEngine(m_pConnection->getEngineType())); @@ -253,7 +253,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLExcept // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) { - // return getInt32Property(::rtl::OUString::createFromAscii("Max Columns in Index")); + // return getInt32Property(::rtl::OUString::createFromAscii("Max Columns in Index")); return 0; } // ------------------------------------------------------------------------- @@ -352,7 +352,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( { Reference< XResultSet > xRef; if(!ADOS::isJetEngine(m_pConnection->getEngineType())) - { // the jet provider doesn't support this method + { // the jet provider doesn't support this method // Create elements used in the array ADORecordset *pRecordset = m_pADOConnection->getTablePrivileges(catalog,schemaPattern,tableNamePattern); @@ -432,7 +432,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_LOWER) == DBPROPVAL_IC_LOWER ; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED ; } @@ -485,7 +485,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLExc // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException) { - // return getStringProperty(::rtl::OUString::createFromAscii("Special Characters")); + // return getStringProperty(::rtl::OUString::createFromAscii("Special Characters")); return ::rtl::OUString(); } // ------------------------------------------------------------------------- @@ -494,7 +494,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return isCapable(DBLITERAL_CORRELATION_NAME); } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { return getInt32Property(::rtl::OUString::createFromAscii("Catalog Location")) == DBPROPVAL_CL_START; } @@ -603,19 +603,19 @@ sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) // ------------------------------------------------------------------------- sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { - // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_TABLE_DEFINITION) == DBPROPVAL_CU_TABLE_DEFINITION; + // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_TABLE_DEFINITION) == DBPROPVAL_CU_TABLE_DEFINITION; return sal_False; } // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) { - // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_INDEX_DEFINITION) == DBPROPVAL_CU_INDEX_DEFINITION; + // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_INDEX_DEFINITION) == DBPROPVAL_CU_INDEX_DEFINITION; return sal_False; } // ------------------------------------------------------------------------- sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { - // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_DML_STATEMENTS) == DBPROPVAL_CU_DML_STATEMENTS; + // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_DML_STATEMENTS) == DBPROPVAL_CU_DML_STATEMENTS; return sal_False; } // ------------------------------------------------------------------------- @@ -808,7 +808,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInProcedureCalls( ) throw( // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInPrivilegeDefinitions( ) throw(SQLException, RuntimeException) { - // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_PRIVILEGE_DEFINITION) == DBPROPVAL_CU_PRIVILEGE_DEFINITION; + // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_PRIVILEGE_DEFINITION) == DBPROPVAL_CU_PRIVILEGE_DEFINITION; return sal_False; } // ------------------------------------------------------------------------- @@ -933,7 +933,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc ::rtl::OUString aRet,aComma = ::rtl::OUString::createFromAscii(","); while(!aRecordset.IsAtEOF()) { - WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(aRecordset.GetFields()); + WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(aRecordset.GetFields()); WpADOField aField(aFields.GetItem(0)); aField.get_Value(aValue); aRet = aRet + aValue + aComma; diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx index c31e40f44922..4b9282748377 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx @@ -2,7 +2,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 @@ -72,7 +72,7 @@ void ODatabaseMetaData::fillLiterals() LiteralInfo aInfo; while(!aRecordset.IsAtEOF()) { - WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(aRecordset.GetFields()); + WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(aRecordset.GetFields()); WpADOField aField(aFields.GetItem(1)); aInfo.pwszLiteralValue = aField.get_Value(); aField = aFields.GetItem(5); @@ -423,10 +423,10 @@ void OAdoIndex::fillPropertyValues() { if(m_aIndex.IsValid()) { - m_Name = m_aIndex.get_Name(); - m_IsUnique = m_aIndex.get_Unique(); + m_Name = m_aIndex.get_Name(); + m_IsUnique = m_aIndex.get_Unique(); m_IsPrimaryKeyIndex = m_aIndex.get_PrimaryKey(); - m_IsClustered = m_aIndex.get_Clustered(); + m_IsClustered = m_aIndex.get_Clustered(); } } // ----------------------------------------------------------------------------- @@ -452,11 +452,11 @@ void OAdoKey::fillPropertyValues() { if(m_aKey.IsValid()) { - m_aProps->m_Type = MapKeyRule(m_aKey.get_Type()); - m_Name = m_aKey.get_Name(); - m_aProps->m_ReferencedTable = m_aKey.get_RelatedTable(); - m_aProps->m_UpdateRule = MapRule(m_aKey.get_UpdateRule()); - m_aProps->m_DeleteRule = MapRule(m_aKey.get_DeleteRule()); + m_aProps->m_Type = MapKeyRule(m_aKey.get_Type()); + m_Name = m_aKey.get_Name(); + m_aProps->m_ReferencedTable = m_aKey.get_RelatedTable(); + m_aProps->m_UpdateRule = MapRule(m_aKey.get_UpdateRule()); + m_aProps->m_DeleteRule = MapRule(m_aKey.get_DeleteRule()); } } // ------------------------------------------------------------------------- @@ -572,8 +572,8 @@ void OAdoTable::fillPropertyValues() { if(m_aTable.IsValid()) { - m_Name = m_aTable.get_Name(); - m_Type = m_aTable.get_Type(); + m_Name = m_aTable.get_Name(); + m_Type = m_aTable.get_Type(); { WpADOCatalog aCat(m_aTable.get_ParentCatalog()); if(aCat.IsValid()) diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index 08b70797c635..9ae90363f97b 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -2,7 +2,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 @@ -80,7 +80,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(ADORecordset* _pRecordSet else m_bOnFirstAfterOpen = sal_False; osl_decrementInterlockedCount( &m_refCount ); - // allocBuffer(); + // allocBuffer(); } // ------------------------------------------------------------------------- @@ -97,7 +97,7 @@ void ODatabaseMetaDataResultSet::disposing(void) ::osl::MutexGuard aGuard(m_aMutex); if(m_pRecordSet) m_pRecordSet->Close(); - m_aStatement = NULL; + m_aStatement = NULL; m_xMetaData.clear(); } // ------------------------------------------------------------------------- @@ -109,7 +109,7 @@ Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) th // ------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -554,7 +554,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, } // ------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException) -{ ::osl::MutexGuard aGuard( m_aMutex ); +{ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); checkRecordSet(); @@ -709,11 +709,11 @@ void ODatabaseMetaDataResultSet::setFetchSize(sal_Int32 _par0) Sequence< com::sun::star::beans::Property > aProps(5); com::sun::star::beans::Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); - DECL_PROP0(RESULTSETTYPE, sal_Int32); + DECL_PROP0(RESULTSETTYPE, sal_Int32); return new ::cppu::OPropertyArrayHelper(aProps); } @@ -804,9 +804,9 @@ void ODatabaseMetaDataResultSet::setProceduresMap() m_aColMapping.push_back(4); TInt2IntMap aMap; - aMap[DB_PT_UNKNOWN] = ProcedureResult::UNKNOWN; - aMap[DB_PT_PROCEDURE] = ProcedureResult::NONE; - aMap[DB_PT_FUNCTION] = ProcedureResult::RETURN; + aMap[DB_PT_UNKNOWN] = ProcedureResult::UNKNOWN; + aMap[DB_PT_PROCEDURE] = ProcedureResult::NONE; + aMap[DB_PT_FUNCTION] = ProcedureResult::RETURN; m_aValueRange[4] = aMap; ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData(m_pRecordSet,this); @@ -869,46 +869,46 @@ void ODatabaseMetaDataResultSet::setColumnsMap() m_aColMapping.push_back(11); TInt2IntMap aMap; - aMap[adEmpty] = ADOS::MapADOType2Jdbc(adEmpty); - aMap[adTinyInt] = ADOS::MapADOType2Jdbc(adTinyInt); - aMap[adSmallInt] = ADOS::MapADOType2Jdbc(adSmallInt); - aMap[adInteger] = ADOS::MapADOType2Jdbc(adInteger); - aMap[adBigInt] = ADOS::MapADOType2Jdbc(adBigInt); - aMap[adUnsignedTinyInt] = ADOS::MapADOType2Jdbc(adUnsignedTinyInt); + aMap[adEmpty] = ADOS::MapADOType2Jdbc(adEmpty); + aMap[adTinyInt] = ADOS::MapADOType2Jdbc(adTinyInt); + aMap[adSmallInt] = ADOS::MapADOType2Jdbc(adSmallInt); + aMap[adInteger] = ADOS::MapADOType2Jdbc(adInteger); + aMap[adBigInt] = ADOS::MapADOType2Jdbc(adBigInt); + aMap[adUnsignedTinyInt] = ADOS::MapADOType2Jdbc(adUnsignedTinyInt); aMap[adUnsignedSmallInt]= ADOS::MapADOType2Jdbc(adUnsignedSmallInt); - aMap[adUnsignedInt] = ADOS::MapADOType2Jdbc(adUnsignedInt); - aMap[adUnsignedBigInt] = ADOS::MapADOType2Jdbc(adUnsignedBigInt); - aMap[adSingle] = ADOS::MapADOType2Jdbc(adSingle); - aMap[adDouble] = ADOS::MapADOType2Jdbc(adDouble); - aMap[adCurrency] = ADOS::MapADOType2Jdbc(adCurrency); - aMap[adDecimal] = ADOS::MapADOType2Jdbc(adDecimal); - aMap[adNumeric] = ADOS::MapADOType2Jdbc(adNumeric); - aMap[adBoolean] = ADOS::MapADOType2Jdbc(adBoolean); - aMap[adError] = ADOS::MapADOType2Jdbc(adError); - aMap[adUserDefined] = ADOS::MapADOType2Jdbc(adUserDefined); - aMap[adVariant] = ADOS::MapADOType2Jdbc(adVariant); - aMap[adIDispatch] = ADOS::MapADOType2Jdbc(adIDispatch); - aMap[adIUnknown] = ADOS::MapADOType2Jdbc(adIUnknown); - aMap[adGUID] = ADOS::MapADOType2Jdbc(adGUID); - aMap[adDate] = ADOS::MapADOType2Jdbc(adDate); - aMap[adDBDate] = ADOS::MapADOType2Jdbc(adDBDate); - aMap[adDBTime] = ADOS::MapADOType2Jdbc(adDBTime); - aMap[adDBTimeStamp] = ADOS::MapADOType2Jdbc(adDBTimeStamp); - aMap[adBSTR] = ADOS::MapADOType2Jdbc(adBSTR); - aMap[adChar] = ADOS::MapADOType2Jdbc(adChar); - aMap[adVarChar] = ADOS::MapADOType2Jdbc(adVarChar); - aMap[adLongVarChar] = ADOS::MapADOType2Jdbc(adLongVarChar); - aMap[adWChar] = ADOS::MapADOType2Jdbc(adWChar); - aMap[adVarWChar] = ADOS::MapADOType2Jdbc(adVarWChar); - aMap[adLongVarWChar] = ADOS::MapADOType2Jdbc(adLongVarWChar); - aMap[adBinary] = ADOS::MapADOType2Jdbc(adBinary); - aMap[adVarBinary] = ADOS::MapADOType2Jdbc(adVarBinary); - aMap[adLongVarBinary] = ADOS::MapADOType2Jdbc(adLongVarBinary); - aMap[adChapter] = ADOS::MapADOType2Jdbc(adChapter); - aMap[adFileTime] = ADOS::MapADOType2Jdbc(adFileTime); - aMap[adPropVariant] = ADOS::MapADOType2Jdbc(adPropVariant); - aMap[adVarNumeric] = ADOS::MapADOType2Jdbc(adVarNumeric); -// aMap[adArray] = ADOS::MapADOType2Jdbc(adArray); + aMap[adUnsignedInt] = ADOS::MapADOType2Jdbc(adUnsignedInt); + aMap[adUnsignedBigInt] = ADOS::MapADOType2Jdbc(adUnsignedBigInt); + aMap[adSingle] = ADOS::MapADOType2Jdbc(adSingle); + aMap[adDouble] = ADOS::MapADOType2Jdbc(adDouble); + aMap[adCurrency] = ADOS::MapADOType2Jdbc(adCurrency); + aMap[adDecimal] = ADOS::MapADOType2Jdbc(adDecimal); + aMap[adNumeric] = ADOS::MapADOType2Jdbc(adNumeric); + aMap[adBoolean] = ADOS::MapADOType2Jdbc(adBoolean); + aMap[adError] = ADOS::MapADOType2Jdbc(adError); + aMap[adUserDefined] = ADOS::MapADOType2Jdbc(adUserDefined); + aMap[adVariant] = ADOS::MapADOType2Jdbc(adVariant); + aMap[adIDispatch] = ADOS::MapADOType2Jdbc(adIDispatch); + aMap[adIUnknown] = ADOS::MapADOType2Jdbc(adIUnknown); + aMap[adGUID] = ADOS::MapADOType2Jdbc(adGUID); + aMap[adDate] = ADOS::MapADOType2Jdbc(adDate); + aMap[adDBDate] = ADOS::MapADOType2Jdbc(adDBDate); + aMap[adDBTime] = ADOS::MapADOType2Jdbc(adDBTime); + aMap[adDBTimeStamp] = ADOS::MapADOType2Jdbc(adDBTimeStamp); + aMap[adBSTR] = ADOS::MapADOType2Jdbc(adBSTR); + aMap[adChar] = ADOS::MapADOType2Jdbc(adChar); + aMap[adVarChar] = ADOS::MapADOType2Jdbc(adVarChar); + aMap[adLongVarChar] = ADOS::MapADOType2Jdbc(adLongVarChar); + aMap[adWChar] = ADOS::MapADOType2Jdbc(adWChar); + aMap[adVarWChar] = ADOS::MapADOType2Jdbc(adVarWChar); + aMap[adLongVarWChar] = ADOS::MapADOType2Jdbc(adLongVarWChar); + aMap[adBinary] = ADOS::MapADOType2Jdbc(adBinary); + aMap[adVarBinary] = ADOS::MapADOType2Jdbc(adVarBinary); + aMap[adLongVarBinary] = ADOS::MapADOType2Jdbc(adLongVarBinary); + aMap[adChapter] = ADOS::MapADOType2Jdbc(adChapter); + aMap[adFileTime] = ADOS::MapADOType2Jdbc(adFileTime); + aMap[adPropVariant] = ADOS::MapADOType2Jdbc(adPropVariant); + aMap[adVarNumeric] = ADOS::MapADOType2Jdbc(adVarNumeric); +// aMap[adArray] = ADOS::MapADOType2Jdbc(adArray); m_aValueRange[12] = aMap; @@ -1046,9 +1046,9 @@ void ODatabaseMetaDataResultSet::setIndexInfoMap() m_aValueRange[8] = aMap2; ::std::map< sal_Int32,::rtl::OUString> aMap3; - aMap3[0] = ::rtl::OUString(); - aMap3[DB_COLLATION_ASC] = ::rtl::OUString::createFromAscii("A"); - aMap3[DB_COLLATION_DESC] = ::rtl::OUString::createFromAscii("D"); + aMap3[0] = ::rtl::OUString(); + aMap3[DB_COLLATION_ASC] = ::rtl::OUString::createFromAscii("A"); + aMap3[DB_COLLATION_DESC] = ::rtl::OUString::createFromAscii("D"); m_aIntValueRange[21] = aMap3; @@ -1122,61 +1122,61 @@ void ODatabaseMetaDataResultSet::setTypeInfoMap(sal_Bool _bJetEngine) m_aStrValueRange[18] = aMap1; TInt2IntMap aMap; - aMap[adEmpty] = ADOS::MapADOType2Jdbc(adEmpty); - aMap[adTinyInt] = ADOS::MapADOType2Jdbc(adTinyInt); - aMap[adSmallInt] = ADOS::MapADOType2Jdbc(adSmallInt); - aMap[adInteger] = ADOS::MapADOType2Jdbc(adInteger); - aMap[adBigInt] = ADOS::MapADOType2Jdbc(adBigInt); - aMap[adUnsignedTinyInt] = ADOS::MapADOType2Jdbc(adUnsignedTinyInt); + aMap[adEmpty] = ADOS::MapADOType2Jdbc(adEmpty); + aMap[adTinyInt] = ADOS::MapADOType2Jdbc(adTinyInt); + aMap[adSmallInt] = ADOS::MapADOType2Jdbc(adSmallInt); + aMap[adInteger] = ADOS::MapADOType2Jdbc(adInteger); + aMap[adBigInt] = ADOS::MapADOType2Jdbc(adBigInt); + aMap[adUnsignedTinyInt] = ADOS::MapADOType2Jdbc(adUnsignedTinyInt); aMap[adUnsignedSmallInt]= ADOS::MapADOType2Jdbc(adUnsignedSmallInt); - aMap[adUnsignedInt] = ADOS::MapADOType2Jdbc(adUnsignedInt); - aMap[adUnsignedBigInt] = ADOS::MapADOType2Jdbc(adUnsignedBigInt); - aMap[adSingle] = ADOS::MapADOType2Jdbc(adSingle); - aMap[adDouble] = ADOS::MapADOType2Jdbc(adDouble); - aMap[adCurrency] = ADOS::MapADOType2Jdbc(adCurrency); - aMap[adDecimal] = ADOS::MapADOType2Jdbc(adDecimal); - aMap[adNumeric] = ADOS::MapADOType2Jdbc(adNumeric); - aMap[adBoolean] = ADOS::MapADOType2Jdbc(adBoolean); - aMap[adError] = ADOS::MapADOType2Jdbc(adError); - aMap[adUserDefined] = ADOS::MapADOType2Jdbc(adUserDefined); - aMap[adVariant] = ADOS::MapADOType2Jdbc(adVariant); - aMap[adIDispatch] = ADOS::MapADOType2Jdbc(adIDispatch); - aMap[adIUnknown] = ADOS::MapADOType2Jdbc(adIUnknown); - aMap[adGUID] = ADOS::MapADOType2Jdbc(adGUID); - aMap[adDate] = _bJetEngine ? ADOS::MapADOType2Jdbc(adDBTimeStamp) : ADOS::MapADOType2Jdbc(adDate); - aMap[adDBDate] = ADOS::MapADOType2Jdbc(adDBDate); - aMap[adDBTime] = ADOS::MapADOType2Jdbc(adDBTime); - aMap[adDBTimeStamp] = ADOS::MapADOType2Jdbc(adDBTimeStamp); - aMap[adBSTR] = ADOS::MapADOType2Jdbc(adBSTR); - aMap[adChar] = ADOS::MapADOType2Jdbc(adChar); - aMap[adVarChar] = ADOS::MapADOType2Jdbc(adVarChar); - aMap[adLongVarChar] = ADOS::MapADOType2Jdbc(adLongVarChar); - aMap[adWChar] = ADOS::MapADOType2Jdbc(adWChar); - aMap[adVarWChar] = ADOS::MapADOType2Jdbc(adVarWChar); - aMap[adLongVarWChar] = ADOS::MapADOType2Jdbc(adLongVarWChar); - aMap[adBinary] = ADOS::MapADOType2Jdbc(adBinary); - aMap[adVarBinary] = ADOS::MapADOType2Jdbc(adVarBinary); - aMap[adLongVarBinary] = ADOS::MapADOType2Jdbc(adLongVarBinary); - aMap[adChapter] = ADOS::MapADOType2Jdbc(adChapter); - aMap[adFileTime] = ADOS::MapADOType2Jdbc(adFileTime); - aMap[adPropVariant] = ADOS::MapADOType2Jdbc(adPropVariant); - aMap[adVarNumeric] = ADOS::MapADOType2Jdbc(adVarNumeric); -// aMap[adArray] = ADOS::MapADOType2Jdbc(adArray); + aMap[adUnsignedInt] = ADOS::MapADOType2Jdbc(adUnsignedInt); + aMap[adUnsignedBigInt] = ADOS::MapADOType2Jdbc(adUnsignedBigInt); + aMap[adSingle] = ADOS::MapADOType2Jdbc(adSingle); + aMap[adDouble] = ADOS::MapADOType2Jdbc(adDouble); + aMap[adCurrency] = ADOS::MapADOType2Jdbc(adCurrency); + aMap[adDecimal] = ADOS::MapADOType2Jdbc(adDecimal); + aMap[adNumeric] = ADOS::MapADOType2Jdbc(adNumeric); + aMap[adBoolean] = ADOS::MapADOType2Jdbc(adBoolean); + aMap[adError] = ADOS::MapADOType2Jdbc(adError); + aMap[adUserDefined] = ADOS::MapADOType2Jdbc(adUserDefined); + aMap[adVariant] = ADOS::MapADOType2Jdbc(adVariant); + aMap[adIDispatch] = ADOS::MapADOType2Jdbc(adIDispatch); + aMap[adIUnknown] = ADOS::MapADOType2Jdbc(adIUnknown); + aMap[adGUID] = ADOS::MapADOType2Jdbc(adGUID); + aMap[adDate] = _bJetEngine ? ADOS::MapADOType2Jdbc(adDBTimeStamp) : ADOS::MapADOType2Jdbc(adDate); + aMap[adDBDate] = ADOS::MapADOType2Jdbc(adDBDate); + aMap[adDBTime] = ADOS::MapADOType2Jdbc(adDBTime); + aMap[adDBTimeStamp] = ADOS::MapADOType2Jdbc(adDBTimeStamp); + aMap[adBSTR] = ADOS::MapADOType2Jdbc(adBSTR); + aMap[adChar] = ADOS::MapADOType2Jdbc(adChar); + aMap[adVarChar] = ADOS::MapADOType2Jdbc(adVarChar); + aMap[adLongVarChar] = ADOS::MapADOType2Jdbc(adLongVarChar); + aMap[adWChar] = ADOS::MapADOType2Jdbc(adWChar); + aMap[adVarWChar] = ADOS::MapADOType2Jdbc(adVarWChar); + aMap[adLongVarWChar] = ADOS::MapADOType2Jdbc(adLongVarWChar); + aMap[adBinary] = ADOS::MapADOType2Jdbc(adBinary); + aMap[adVarBinary] = ADOS::MapADOType2Jdbc(adVarBinary); + aMap[adLongVarBinary] = ADOS::MapADOType2Jdbc(adLongVarBinary); + aMap[adChapter] = ADOS::MapADOType2Jdbc(adChapter); + aMap[adFileTime] = ADOS::MapADOType2Jdbc(adFileTime); + aMap[adPropVariant] = ADOS::MapADOType2Jdbc(adPropVariant); + aMap[adVarNumeric] = ADOS::MapADOType2Jdbc(adVarNumeric); +// aMap[adArray] = ADOS::MapADOType2Jdbc(adArray); m_aValueRange[2] = aMap; TInt2IntMap aColumnValueMapping; - aColumnValueMapping[VARIANT_FALSE] = ColumnValue::NO_NULLS; - aColumnValueMapping[VARIANT_TRUE] = ColumnValue::NULLABLE; + aColumnValueMapping[VARIANT_FALSE] = ColumnValue::NO_NULLS; + aColumnValueMapping[VARIANT_TRUE] = ColumnValue::NULLABLE; m_aValueRange[7] = aColumnValueMapping; // now adjust the column mapping // OJ 24.01.2002 96860 TInt2IntMap aSerachMapping; - aSerachMapping[DB_UNSEARCHABLE] = ColumnSearch::NONE; - aSerachMapping[DB_LIKE_ONLY] = ColumnSearch::CHAR; - aSerachMapping[DB_ALL_EXCEPT_LIKE] = ColumnSearch::BASIC; - aSerachMapping[DB_SEARCHABLE] = ColumnSearch::FULL; + aSerachMapping[DB_UNSEARCHABLE] = ColumnSearch::NONE; + aSerachMapping[DB_LIKE_ONLY] = ColumnSearch::CHAR; + aSerachMapping[DB_ALL_EXCEPT_LIKE] = ColumnSearch::BASIC; + aSerachMapping[DB_SEARCHABLE] = ColumnSearch::FULL; m_aValueRange[9] = aSerachMapping; diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx index 12c250564113..e39ea65ead91 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx @@ -2,7 +2,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 @@ -85,10 +85,10 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount( ) throw( if(m_vMapping.size()) return m_mColumns.size(); - - ADOFields* pFields = NULL; + + ADOFields* pFields = NULL; m_pRecordSet->get_Fields(&pFields); - WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); + WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); m_nColCount = aFields.GetItemCount(); return m_nColCount; } @@ -176,7 +176,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::isNullable( sal_Int32 col { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.isNullable(); - + if(!m_pRecordSet) return 0; @@ -200,7 +200,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isReadOnly( sal_Int32 colu WpADOField aField = ADOS::getField(m_pRecordSet,m_vMapping[column]); if(aField.IsValid()) { - // return (aField.GetStatus() & adFieldReadOnly) == adFieldReadOnly; + // return (aField.GetStatus() & adFieldReadOnly) == adFieldReadOnly; } return sal_False; } diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx index 060764faea89..5fd1e3d17914 100644 --- a/connectivity/source/drivers/ado/ADriver.cxx +++ b/connectivity/source/drivers/ado/ADriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx index 05267df5ced2..d02204b1ec19 100644 --- a/connectivity/source/drivers/ado/AGroup.cxx +++ b/connectivity/source/drivers/ado/AGroup.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ void WpADOGroup::Create() } } // ------------------------------------------------------------------------- -OAdoGroup::OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, ADOGroup* _pGroup) : OGroup_ADO(_bCase),m_pCatalog(_pParent) +OAdoGroup::OAdoGroup(OCatalog* _pParent,sal_Bool _bCase, ADOGroup* _pGroup) : OGroup_ADO(_bCase),m_pCatalog(_pParent) { construct(); if(_pGroup) diff --git a/connectivity/source/drivers/ado/AGroups.cxx b/connectivity/source/drivers/ado/AGroups.cxx index 8efca9efef7e..269a315daaf6 100644 --- a/connectivity/source/drivers/ado/AGroups.cxx +++ b/connectivity/source/drivers/ado/AGroups.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx index 468c1e9ba943..906d03fb2312 100644 --- a/connectivity/source/drivers/ado/AIndex.cxx +++ b/connectivity/source/drivers/ado/AIndex.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/AIndexes.cxx b/connectivity/source/drivers/ado/AIndexes.cxx index 8969747eb192..7b645e6223b9 100644 --- a/connectivity/source/drivers/ado/AIndexes.cxx +++ b/connectivity/source/drivers/ado/AIndexes.cxx @@ -2,7 +2,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 @@ -66,7 +66,7 @@ Reference< XPropertySet > OIndexes::createDescriptor() // ------------------------------------------------------------------------- // XAppend sdbcx::ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) -{ +{ OAdoIndex* pIndex = NULL; if ( !getImplementation(pIndex,descriptor) || pIndex == NULL ) m_pConnection->throwGenericSQLException( STR_INVALID_INDEX_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx index 43c8fd3dc419..6407881fd4be 100644 --- a/connectivity/source/drivers/ado/AKey.cxx +++ b/connectivity/source/drivers/ado/AKey.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/AKeyColumn.cxx b/connectivity/source/drivers/ado/AKeyColumn.cxx index 00da790fee89..ff0bb3cafd8b 100644 --- a/connectivity/source/drivers/ado/AKeyColumn.cxx +++ b/connectivity/source/drivers/ado/AKeyColumn.cxx @@ -2,7 +2,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 @@ -32,31 +32,31 @@ #include "adabas/BKeyColumn.hxx" using namespace connectivity::adabas; -namespace starbeans = ::com::sun::star::beans; +namespace starbeans = ::com::sun::star::beans; // ------------------------------------------------------------------------- OKeyColumn::OKeyColumn() : OColumn() { construct(); } // ------------------------------------------------------------------------- -OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn, - const ::rtl::OUString& _Name, +OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn, + const ::rtl::OUString& _Name, const ::rtl::OUString& _TypeName, const ::rtl::OUString& _DefaultValue, - sal_Int32 _IsNullable, - sal_Int32 _Precision, - sal_Int32 _Scale, - sal_Int32 _Type, - sal_Bool _IsAutoIncrement - ) : OColumn(_Name, - _TypeName, + sal_Int32 _IsNullable, + sal_Int32 _Precision, + sal_Int32 _Scale, + sal_Int32 _Type, + sal_Bool _IsAutoIncrement + ) : OColumn(_Name, + _TypeName, _DefaultValue, _IsNullable, _Precision, _Scale, _Type, _IsAutoIncrement) - , m_ReferencedColumn(_ReferencedColumn) + , m_ReferencedColumn(_ReferencedColumn) { construct(); } @@ -65,7 +65,7 @@ OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn, void OKeyColumn::construct() { sal_Int32 nAttrib = isNew() ? 0 : starbeans::PropertyAttribute::READONLY; - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN), PROPERTY_ID_RELATEDCOLUMN, nAttrib,&m_ReferencedColumn, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/ado/AKeyColumns.cxx b/connectivity/source/drivers/ado/AKeyColumns.cxx index 2dd66136a211..f7449bf1a3e6 100644 --- a/connectivity/source/drivers/ado/AKeyColumns.cxx +++ b/connectivity/source/drivers/ado/AKeyColumns.cxx @@ -2,7 +2,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 @@ -41,7 +41,7 @@ using namespace connectivity::adabas; sdbcx::ObjectType OKeyColumns::createObject(const ::rtl::OUString& _rName) { - Reference< starsdbc::XResultSet > + Reference< starsdbc::XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getImportedKeys(Any(), m_pTable->getSchema(),m_pTable->getName()); @@ -49,7 +49,7 @@ sdbcx::ObjectType OKeyColumns::createObject(const ::rtl::OUString& _rName) if(xResult.is()) { Reference< starsdbc::XRow > xRow(xResult,UNO_QUERY); - while(xResult->next()) + while(xResult->next()) { if(xRow->getString(8) == _rName) { @@ -58,7 +58,7 @@ sdbcx::ObjectType OKeyColumns::createObject(const ::rtl::OUString& _rName) } } } - + xResult = m_pTable->getConnection()->getMetaData()->getColumns(Any(), m_pTable->getSchema(),m_pTable->getName(),_rName); @@ -66,7 +66,7 @@ sdbcx::ObjectType OKeyColumns::createObject(const ::rtl::OUString& _rName) if(xResult.is()) { Reference< starsdbc::XRow > xRow(xResult,UNO_QUERY); - if(xResult->next()) + if(xResult->next()) { if(xRow->getString(4) == _rName) { diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx index 8c38fe014c58..2966f55b5567 100644 --- a/connectivity/source/drivers/ado/AKeys.cxx +++ b/connectivity/source/drivers/ado/AKeys.cxx @@ -2,7 +2,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 @@ -76,7 +76,7 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString&, const Reference< // To pass as column parameter to Key's Apppend method OLEVariant vOptional; vOptional.setNoArg(); - + #if OSL_DEBUG_LEVEL > 0 KeyTypeEnum eKey = #endif diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 433ed279ba2e..11a15656ddef 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -2,7 +2,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 @@ -43,12 +43,12 @@ #include <limits> -#define CHECK_RETURN(x) \ - if(!x) \ +#define CHECK_RETURN(x) \ + if(!x) \ ADOS::ThrowException(*m_pConnection->getConnection(),*this); #ifdef max -# undef max +# undef max #endif //------------------------------------------------------------------------------ @@ -75,7 +75,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf ::rtl::OUString sNewSql; OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,sql); if(pNode) - { // special handling for parameters + { // special handling for parameters /* we recusive replace all occurences of ? in the statement and replace them with name like "æ¬å" */ sal_Int32 nParameterCount = 0; ::rtl::OUString sDefaultName = ::rtl::OUString::createFromAscii("parame"); @@ -110,7 +110,7 @@ OPreparedStatement::~OPreparedStatement() Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) { Any aRet = OStatement_Base::queryInterface(rType); - return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType, + return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType, static_cast< XPreparedStatement*>(this), static_cast< XParameters*>(this), static_cast< XPreparedBatchExecution*>(this), @@ -119,7 +119,7 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt // ------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< XParameters > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< XResultSetMetaDataSupplier > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedBatchExecution > *)0 )); @@ -166,7 +166,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc checkDisposed(OStatement_BASE::rBHelper.bDisposed); - SQLWarning warning; + SQLWarning warning; // Reset warnings @@ -174,7 +174,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc // Reset the statement handle, warning and saved Resultset - // reset(); + // reset(); // Call SQLExecute @@ -446,7 +446,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any ) ); ::dbtools::throwGenericSQLException(sError,*this); } - // setObject (parameterIndex, x, sqlType, 0); + // setObject (parameterIndex, x, sqlType, 0); } // ------------------------------------------------------------------------- @@ -505,15 +505,15 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim CHECK_RETURN(aParam.PutValue(aVal)); } } - // m_pParameters->Delete(OLEVariant(i)); + // m_pParameters->Delete(OLEVariant(i)); } } // ------------------------------------------------------------------------- void SAL_CALL OPreparedStatement::clearBatch( ) throw(SQLException, RuntimeException) { - // clearParameters( ); - // m_aBatchList.erase(); + // clearParameters( ); + // m_aBatchList.erase(); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index 169039ed6e2b..3a1f484bf01c 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -2,7 +2,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 @@ -51,8 +51,8 @@ using namespace ::comphelper; #include <oledb.h> -#define CHECK_RETURN(x) \ - if(!SUCCEEDED(x)) \ +#define CHECK_RETURN(x) \ + if(!SUCCEEDED(x)) \ ADOS::ThrowException(*m_pStmt->m_pConnection->getConnection(),*this); using namespace connectivity::ado; @@ -62,8 +62,8 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; //------------------------------------------------------------------------------ -// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.AResultSet","com.sun.star.sdbc.ResultSet"); -::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) \ +// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.AResultSet","com.sun.star.sdbc.ResultSet"); +::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) \ { return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ado.ResultSet"); } @@ -87,7 +87,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const ::rtl::OUString& _rServiceN return pSupported != pEnd; } // ------------------------------------------------------------------------- -OResultSet::OResultSet(ADORecordset* _pRecordSet,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) +OResultSet::OResultSet(ADORecordset* _pRecordSet,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_xStatement(*pStmt) ,m_pStmt(pStmt) @@ -98,7 +98,7 @@ OResultSet::OResultSet(ADORecordset* _pRecordSet,OStatement_Base* pStmt) : ORes { } // ------------------------------------------------------------------------- -OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex) +OResultSet::OResultSet(ADORecordset* _pRecordSet) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_xStatement(NULL) ,m_xMetaData(NULL) @@ -149,7 +149,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep // ------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -464,7 +464,7 @@ sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, Runt checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - if(!row) // absolute with zero not allowed + if(!row) // absolute with zero not allowed ::dbtools::throwFunctionSequenceException(*this); sal_Bool bCheck = sal_True; @@ -548,7 +548,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio } // ------------------------------------------------------------------------- sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) -{ ::osl::MutexGuard aGuard( m_aMutex ); +{ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -883,7 +883,7 @@ sal_Int32 SAL_CALL OResultSet::compareBookmarks( const Any& first, const Any& se first >>= nPos1; sal_Int32 nPos2; second >>= nPos2; - if(nPos1 == nPos2) // they should be equal + if(nPos1 == nPos2) // they should be equal return sal_True; OSL_ENSURE((nPos1 >= 0 && nPos1 < (sal_Int32)m_aBookmarks.size()) || (nPos1 >= 0 && nPos2 < (sal_Int32)m_aBookmarks.size()),"Invalid Index for vector"); @@ -1063,12 +1063,12 @@ void OResultSet::setFetchSize(sal_Int32 _par0) com::sun::star::beans::Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - // DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + // DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY); DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); - DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); + DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); return new ::cppu::OPropertyArrayHelper(aProps); } diff --git a/connectivity/source/drivers/ado/AResultSetMetaData.cxx b/connectivity/source/drivers/ado/AResultSetMetaData.cxx index 859d261ebfe6..66def0a9cb98 100644 --- a/connectivity/source/drivers/ado/AResultSetMetaData.cxx +++ b/connectivity/source/drivers/ado/AResultSetMetaData.cxx @@ -2,7 +2,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,7 +42,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; OResultSetMetaData::OResultSetMetaData( ADORecordset* _pRecordSet) - : m_pRecordSet(_pRecordSet), + : m_pRecordSet(_pRecordSet), m_nColCount(-1) { if ( m_pRecordSet ) @@ -79,9 +79,9 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, Ru if ( !m_pRecordSet ) return 0; - ADOFields* pFields = NULL; + ADOFields* pFields = NULL; m_pRecordSet->get_Fields(&pFields); - WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); + WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); m_nColCount = aFields.GetItemCount(); return m_nColCount; } @@ -238,7 +238,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLEx WpADOField aField = ADOS::getField(m_pRecordSet,column); if(aField.IsValid()) { - // return (aField.GetStatus() & adFieldReadOnly) == adFieldReadOnly; + // return (aField.GetStatus() & adFieldReadOnly) == adFieldReadOnly; } return sal_False; } diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx index 04612e22d22f..7e06678a26dd 100644 --- a/connectivity/source/drivers/ado/AStatement.cxx +++ b/connectivity/source/drivers/ado/AStatement.cxx @@ -2,7 +2,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 @@ -48,8 +48,8 @@ using namespace ::comphelper; -#define CHECK_RETURN(x) \ - if(!x) \ +#define CHECK_RETURN(x) \ + if(!x) \ ADOS::ThrowException(*m_pConnection->getConnection(),*this); @@ -63,7 +63,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace ::std; //------------------------------------------------------------------------------ -OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(m_aMutex) +OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(m_aMutex) ,OPropertySetHelper(OStatement_BASE::rBHelper) ,OSubComponent<OStatement_Base, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this) ,m_pConnection(_pConnection) @@ -133,7 +133,7 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime // ------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OStatement_Base::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -240,7 +240,7 @@ sal_Int32 OStatement_Base::getPrecision ( sal_Int32 sqlType) // Sets the warning //-------------------------------------------------------------------- -void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) +void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); @@ -456,7 +456,7 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, Runtim checkDisposed(OStatement_BASE::rBHelper.bDisposed); - SQLWarning warning; + SQLWarning warning; // clear previous warnings @@ -642,7 +642,7 @@ void OStatement_Base::setFetchSize(sal_Int32 _par0) throw(SQLException, RuntimeE m_nFetchSize = _par0; - // m_RecordSet.put_CacheSize(_par0); + // m_RecordSet.put_CacheSize(_par0); } //------------------------------------------------------------------------------ void OStatement_Base::setMaxFieldSize(sal_Int32 /*_par0*/) throw(SQLException, RuntimeException) @@ -666,12 +666,12 @@ void OStatement_Base::setCursorName(const ::rtl::OUString &_par0) throw(SQLExcep Sequence< com::sun::star::beans::Property > aProps(10); com::sun::star::beans::Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(CURSORNAME, ::rtl::OUString); DECL_BOOL_PROP0(ESCAPEPROCESSING); DECL_PROP0(FETCHDIRECTION,sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(MAXFIELDSIZE,sal_Int32); - DECL_PROP0(MAXROWS, sal_Int32); + DECL_PROP0(MAXROWS, sal_Int32); DECL_PROP0(QUERYTIMEOUT,sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); DECL_PROP0(RESULTSETTYPE,sal_Int32); @@ -734,7 +734,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue( } catch( const Exception& e ) { - bModified = sal_True; // will ensure that the property is set + bModified = sal_True; // will ensure that the property is set OSL_ENSURE( sal_False, "OStatement_Base::convertFastPropertyValue: caught something strange!" ); (void)e; } @@ -770,9 +770,9 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A setFetchSize(comphelper::getINT32(rValue)); break; case PROPERTY_ID_ESCAPEPROCESSING: - // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); + // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); case PROPERTY_ID_USEBOOKMARKS: - // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); + // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); default: ; } diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index d3f74f6c777a..a4fadaa02b9e 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ OAdoTable::OAdoTable(sdbcx::OCollection* _pTables,sal_Bool _bCase,OCatalog* _pCa { construct(); m_aTable = WpADOTable(_pTable); - // m_aTable.putref_ParentCatalog(_pCatalog->getCatalog()); + // m_aTable.putref_ParentCatalog(_pCatalog->getCatalog()); fillPropertyValues(); } @@ -220,13 +220,13 @@ void OAdoTable::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rV break; case PROPERTY_ID_TYPE: - OTools::putValue( m_aTable.get_Properties(), + OTools::putValue( m_aTable.get_Properties(), OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), getString(rValue)); break; case PROPERTY_ID_DESCRIPTION: - OTools::putValue( m_aTable.get_Properties(), + OTools::putValue( m_aTable.get_Properties(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description")), getString(rValue)); break; diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx index acb096545101..c9872c4bc7bc 100644 --- a/connectivity/source/drivers/ado/ATables.cxx +++ b/connectivity/source/drivers/ado/ATables.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx index 7dc882050145..350f0362ab27 100644 --- a/connectivity/source/drivers/ado/AUser.cxx +++ b/connectivity/source/drivers/ado/AUser.cxx @@ -2,7 +2,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 @@ -133,7 +133,7 @@ void OAdoUser::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const } } // ------------------------------------------------------------------------- -OUserExtend::OUserExtend(OCatalog* _pParent,sal_Bool _bCase, ADOUser* _pUser) +OUserExtend::OUserExtend(OCatalog* _pParent,sal_Bool _bCase, ADOUser* _pUser) : OAdoUser(_pParent,_bCase,_pUser) { } @@ -147,7 +147,7 @@ OUserExtend::OUserExtend(OCatalog* _pParent,sal_Bool _bCase, const ::rtl::OUStri void OUserExtend::construct() { OUser_TYPEDEF::construct(); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const diff --git a/connectivity/source/drivers/ado/AUsers.cxx b/connectivity/source/drivers/ado/AUsers.cxx index 4e4cce3ce14a..e1abe6f2c924 100644 --- a/connectivity/source/drivers/ado/AUsers.cxx +++ b/connectivity/source/drivers/ado/AUsers.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx index ac4fef472b65..a5bc0d549109 100644 --- a/connectivity/source/drivers/ado/AView.cxx +++ b/connectivity/source/drivers/ado/AView.cxx @@ -2,7 +2,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 @@ -45,7 +45,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -// IMPLEMENT_SERVICE_INFO(OAdoView,"com.sun.star.sdbcx.AView","com.sun.star.sdbcx.View"); +// IMPLEMENT_SERVICE_INFO(OAdoView,"com.sun.star.sdbcx.AView","com.sun.star.sdbcx.View"); // ------------------------------------------------------------------------- OAdoView::OAdoView(sal_Bool _bCase,ADOView* _pView) : OView_ADO(_bCase,NULL) ,m_aView(_pView) @@ -89,7 +89,7 @@ void OAdoView::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const case PROPERTY_ID_CATALOGNAME: break; case PROPERTY_ID_SCHEMANAME: - // rValue <<= m_aView.get_Type(); + // rValue <<= m_aView.get_Type(); break; case PROPERTY_ID_COMMAND: { diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx index dee7d4ac6a64..bf99464dfa43 100644 --- a/connectivity/source/drivers/ado/AViews.cxx +++ b/connectivity/source/drivers/ado/AViews.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index c8ea5d87bfab..136c81b9238e 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -2,7 +2,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 @@ -125,17 +125,17 @@ OLEVariant::OLEVariant(const OLEVariant& varSrc) OSL_UNUSED(eRet); } -OLEVariant::OLEVariant(sal_Bool x) { VariantInit(this); vt = VT_BOOL; boolVal = (x ? VARIANT_TRUE : VARIANT_FALSE);} -OLEVariant::OLEVariant(sal_Int8 n) { VariantInit(this); vt = VT_I1; bVal = n;} -OLEVariant::OLEVariant(sal_Int16 n) { VariantInit(this); vt = VT_I2; intVal = n;} -OLEVariant::OLEVariant(sal_Int32 n) { VariantInit(this); vt = VT_I4; lVal = n;} -OLEVariant::OLEVariant(sal_Int64 x) { VariantInit(this); vt = VT_I4; lVal = (LONG)x;} +OLEVariant::OLEVariant(sal_Bool x) { VariantInit(this); vt = VT_BOOL; boolVal = (x ? VARIANT_TRUE : VARIANT_FALSE);} +OLEVariant::OLEVariant(sal_Int8 n) { VariantInit(this); vt = VT_I1; bVal = n;} +OLEVariant::OLEVariant(sal_Int16 n) { VariantInit(this); vt = VT_I2; intVal = n;} +OLEVariant::OLEVariant(sal_Int32 n) { VariantInit(this); vt = VT_I4; lVal = n;} +OLEVariant::OLEVariant(sal_Int64 x) { VariantInit(this); vt = VT_I4; lVal = (LONG)x;} OLEVariant::OLEVariant(const rtl::OUString& us) { ::VariantInit(this); - vt = VT_BSTR; - bstrVal = SysAllocString(reinterpret_cast<LPCOLESTR>(us.getStr())); + vt = VT_BSTR; + bstrVal = SysAllocString(reinterpret_cast<LPCOLESTR>(us.getStr())); } OLEVariant::~OLEVariant() { @@ -147,32 +147,32 @@ OLEVariant::~OLEVariant() OLEVariant::OLEVariant(const ::com::sun::star::util::Date& x ) { VariantInit(this); - vt = VT_DATE; - dblVal = ::dbtools::DBTypeConversion::toDouble(x,::com::sun::star::util::Date(30,12,1899)); + vt = VT_DATE; + dblVal = ::dbtools::DBTypeConversion::toDouble(x,::com::sun::star::util::Date(30,12,1899)); } OLEVariant::OLEVariant(const ::com::sun::star::util::Time& x ) { VariantInit(this); - vt = VT_DATE; - dblVal = ::dbtools::DBTypeConversion::toDouble(x); + vt = VT_DATE; + dblVal = ::dbtools::DBTypeConversion::toDouble(x); } OLEVariant::OLEVariant(const ::com::sun::star::util::DateTime& x ) { VariantInit(this); - vt = VT_DATE; - dblVal = ::dbtools::DBTypeConversion::toDouble(x,::com::sun::star::util::Date(30,12,1899)); + vt = VT_DATE; + dblVal = ::dbtools::DBTypeConversion::toDouble(x,::com::sun::star::util::Date(30,12,1899)); } OLEVariant::OLEVariant(const float &x) { VariantInit(this); - vt = VT_R4; - fltVal = x; + vt = VT_R4; + fltVal = x; } OLEVariant::OLEVariant(const double &x) { VariantInit(this); - vt = VT_R8; - dblVal = x; + vt = VT_R8; + dblVal = x; } @@ -186,13 +186,13 @@ OLEVariant::OLEVariant(const ::com::sun::star::uno::Sequence< sal_Int8 >& x) { VariantInit(this); - vt = VT_ARRAY|VT_UI1; + vt = VT_ARRAY|VT_UI1; SAFEARRAYBOUND rgsabound[1]; rgsabound[0].lLbound = 0; rgsabound[0].cElements = x.getLength(); - // parray = SafeArrayCreate(VT_UI1,1,rgsabound); - parray = SafeArrayCreateVector(VT_UI1, 0, x.getLength()); + // parray = SafeArrayCreate(VT_UI1,1,rgsabound); + parray = SafeArrayCreateVector(VT_UI1, 0, x.getLength()); const sal_Int8* pBegin = x.getConstArray(); const sal_Int8* pEnd = pBegin + x.getLength(); @@ -247,38 +247,38 @@ void OLEVariant::setInt16(sal_Int16 n) HRESULT eRet = VariantClear(this); OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); - vt = VT_I2; - iVal = n; + vt = VT_I2; + iVal = n; } void OLEVariant::setInt32(sal_Int32 n) { HRESULT eRet = VariantClear(this); OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); - vt = VT_I4; - lVal = n; + vt = VT_I4; + lVal = n; } void OLEVariant::setFloat(float f) -{ HRESULT eRet = VariantClear(this); +{ HRESULT eRet = VariantClear(this); OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); - vt = VT_R4; - fltVal = f; + vt = VT_R4; + fltVal = f; } void OLEVariant::setDouble(double d) { HRESULT eRet = VariantClear(this); OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); - vt = VT_R8; - dblVal = d; + vt = VT_R8; + dblVal = d; } void OLEVariant::setDate(DATE d) -{ HRESULT eRet = VariantClear(this); +{ HRESULT eRet = VariantClear(this); OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); - vt = VT_DATE; - date = d; + vt = VT_DATE; + date = d; } void OLEVariant::setChar(unsigned char a) { @@ -286,7 +286,7 @@ void OLEVariant::setChar(unsigned char a) OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); vt = VT_UI1; - bVal = a; + bVal = a; } void OLEVariant::setCurrency(double aCur) { @@ -302,7 +302,7 @@ void OLEVariant::setBool(sal_Bool b) OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); vt = VT_BOOL; - boolVal = b ? VARIANT_TRUE : VARIANT_FALSE; + boolVal = b ? VARIANT_TRUE : VARIANT_FALSE; } void OLEVariant::setString(const rtl::OUString& us) { @@ -310,7 +310,7 @@ void OLEVariant::setString(const rtl::OUString& us) OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); vt = VT_BSTR; - bstrVal = ::SysAllocString(reinterpret_cast<LPCOLESTR>(us.getStr())); + bstrVal = ::SysAllocString(reinterpret_cast<LPCOLESTR>(us.getStr())); } void OLEVariant::setNoArg() { @@ -318,7 +318,7 @@ void OLEVariant::setNoArg() OSL_ENSURE(eRet == S_OK,"Error while clearing an ado variant!"); OSL_UNUSED(eRet); vt = VT_ERROR; - scode = DISP_E_PARAMNOTFOUND; + scode = DISP_E_PARAMNOTFOUND; } void OLEVariant::setNull() @@ -367,8 +367,8 @@ void OLEVariant::setIDispatch(IDispatch* pDispInterface) } -sal_Bool OLEVariant::isNull() const { return (vt == VT_NULL); } -sal_Bool OLEVariant::isEmpty() const { return (vt == VT_EMPTY); } +sal_Bool OLEVariant::isNull() const { return (vt == VT_NULL); } +sal_Bool OLEVariant::isEmpty() const { return (vt == VT_EMPTY); } VARTYPE OLEVariant::getType() const { return vt; } @@ -376,7 +376,7 @@ OLEVariant::operator ::com::sun::star::util::Date() const { return isNull() ? ::com::sun::star::util::Date(30,12,1899) : ::dbtools::DBTypeConversion::toDate(getDate(),::com::sun::star::util::Date(30,12,1899)); } -OLEVariant::operator ::com::sun::star::util::Time() const +OLEVariant::operator ::com::sun::star::util::Time() const { return isNull() ? ::com::sun::star::util::Time() : ::dbtools::DBTypeConversion::toTime(getDate()); } @@ -437,11 +437,11 @@ void OLEVariant::ChangeType(VARTYPE vartype, const OLEVariant* pSrc) if (pSrc == NULL) pSrc = this; - if ( ( this != pSrc ) - || ( vartype != V_VT( this ) ) + if ( ( this != pSrc ) + || ( vartype != V_VT( this ) ) ) { - if ( FAILED( ::VariantChangeType( static_cast< VARIANT* >( this ), + if ( FAILED( ::VariantChangeType( static_cast< VARIANT* >( this ), const_cast< VARIANT* >( static_cast< const VARIANT* >( pSrc ) ), 0, vartype ) ) ) diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx index 7d5aa5e22a59..b182b9327710 100644 --- a/connectivity/source/drivers/ado/Aservices.cxx +++ b/connectivity/source/drivers/ado/Aservices.cxx @@ -2,7 +2,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 @@ -115,8 +115,8 @@ struct ProviderRequest //--------------------------------------------------------------------------------------- extern "C" void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ":affine"; diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index bc9bb2948608..37a64258cb9b 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -2,7 +2,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 @@ -289,8 +289,8 @@ void WpADOCommand::put_ActiveConnection(/* [in] */ const OLEVariant& vConn) void WpADOCommand::Create() { - IClassFactory2* pInterface2 = NULL; - IUnknown *pOuter = NULL; + IClassFactory2* pInterface2 = NULL; + IUnknown *pOuter = NULL; HRESULT hr; hr = CoGetClassObject( ADOS::CLSID_ADOCOMMAND_21, CLSCTX_INPROC_SERVER, @@ -502,7 +502,7 @@ sal_Int32 WpADOField::GetStatus() const { OSL_ENSURE(pInterface,"Interface is null!"); sal_Int32 eADOSFieldAttributes=0; - // pInterface->get_Status(&eADOSFieldAttributes); + // pInterface->get_Status(&eADOSFieldAttributes); return eADOSFieldAttributes; } @@ -699,8 +699,8 @@ sal_Bool WpADOProperty::PutValue(const OLEVariant &aValVar) } void WpADORecordset::Create() { - IClassFactory2* pInterface2 = NULL; - IUnknown *pOuter = NULL; + IClassFactory2* pInterface2 = NULL; + IUnknown *pOuter = NULL; HRESULT hr; hr = CoGetClassObject( ADOS::CLSID_ADORECORDSET_21, CLSCTX_INPROC_SERVER, @@ -836,11 +836,11 @@ WpADOFields WpADORecordset::GetFields() const } - sal_Bool WpADORecordset::Move(sal_Int32 nRows, VARIANT aBmk) {return pInterface && SUCCEEDED(pInterface->Move(nRows, aBmk));} + sal_Bool WpADORecordset::Move(sal_Int32 nRows, VARIANT aBmk) {return pInterface && SUCCEEDED(pInterface->Move(nRows, aBmk));} sal_Bool WpADORecordset::MoveNext() {return pInterface && SUCCEEDED(pInterface->MoveNext());} sal_Bool WpADORecordset::MovePrevious() {return pInterface && SUCCEEDED(pInterface->MovePrevious());} sal_Bool WpADORecordset::MoveFirst() {return pInterface && SUCCEEDED(pInterface->MoveFirst());} - sal_Bool WpADORecordset::MoveLast() {return pInterface && SUCCEEDED(pInterface->MoveLast());} + sal_Bool WpADORecordset::MoveLast() {return pInterface && SUCCEEDED(pInterface->MoveLast());} sal_Bool WpADORecordset::IsAtBOF() const { @@ -1319,7 +1319,7 @@ void WpADOCatalog::putref_ActiveConnection(IDispatch* pCon) pInterface->putref_ActiveConnection(pCon); } -WpADOTables WpADOCatalog::get_Tables() +WpADOTables WpADOCatalog::get_Tables() { OSL_ENSURE(pInterface,"Interface is null!"); ADOTables* pRet = NULL; @@ -1568,7 +1568,7 @@ WpBase::WpBase(IDispatch* pInt) { ULONG nCount = pIUnknown->AddRef(); (void)nCount; - // OSL_ENSURE(nCount == 1,"Count is greater than 1"); + // OSL_ENSURE(nCount == 1,"Count is greater than 1"); } } diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu index 50c29cf7ba2e..3f822de5f75e 100755 --- a/connectivity/source/drivers/ado/ado.xcu +++ b/connectivity/source/drivers/ado/ado.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/ado.xml b/connectivity/source/drivers/ado/ado.xml index e60318939d1f..2be460df8f5a 100644 --- a/connectivity/source/drivers/ado/ado.xml +++ b/connectivity/source/drivers/ado/ado.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding="UTF-8"?> <!DOCTYPE module-description PUBLIC "-//W3C//DTD HTML 3.2//EN" "module-description.dtd"> <module-description xmlns:xlink="http://www.w3.org/1999/xlink"> - <module-name> ado </module-name> + <module-name> ado </module-name> <component-description> <author>Ocke Janssen</author> <name>com.sun.star.comp.sdbc.ado.ODriver</name> @@ -11,8 +11,8 @@ <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> <status value="final"/> - <supported-service> com.sun.star.sdbc.Driver</supported-service> - </component-description> + <supported-service> com.sun.star.sdbc.Driver</supported-service> + </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> diff --git a/connectivity/source/drivers/ado/ado_post_sys_include.h b/connectivity/source/drivers/ado/ado_post_sys_include.h index c3110010b04d..459fa2948908 100644 --- a/connectivity/source/drivers/ado/ado_post_sys_include.h +++ b/connectivity/source/drivers/ado/ado_post_sys_include.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/ado_pre_sys_include.h b/connectivity/source/drivers/ado/ado_pre_sys_include.h index 0393e96d285c..b1ac0e3e517d 100644 --- a/connectivity/source/drivers/ado/ado_pre_sys_include.h +++ b/connectivity/source/drivers/ado/ado_pre_sys_include.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx index c6df59087faf..ad6c2e915e9f 100644 --- a/connectivity/source/drivers/ado/adoimp.cxx +++ b/connectivity/source/drivers/ado/adoimp.cxx @@ -2,7 +2,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 @@ -45,38 +45,38 @@ using namespace com::sun::star::sdbcx; #define MYADOID(l) {l, 0,0x10,0x80,0,0,0xAA,0,0x6D,0x2E,0xA4}; -const CLSID ADOS::CLSID_ADOCONNECTION_21 = MYADOID(0x00000514); -const IID ADOS::IID_ADOCONNECTION_21 = MYADOID(0x00000550); +const CLSID ADOS::CLSID_ADOCONNECTION_21 = MYADOID(0x00000514); +const IID ADOS::IID_ADOCONNECTION_21 = MYADOID(0x00000550); -const CLSID ADOS::CLSID_ADOCOMMAND_21 = MYADOID(0x00000507); -const IID ADOS::IID_ADOCOMMAND_21 = MYADOID(0x0000054E); +const CLSID ADOS::CLSID_ADOCOMMAND_21 = MYADOID(0x00000507); +const IID ADOS::IID_ADOCOMMAND_21 = MYADOID(0x0000054E); -const CLSID ADOS::CLSID_ADORECORDSET_21 = MYADOID(0x00000535); -const IID ADOS::IID_ADORECORDSET_21 = MYADOID(0x0000054F); +const CLSID ADOS::CLSID_ADORECORDSET_21 = MYADOID(0x00000535); +const IID ADOS::IID_ADORECORDSET_21 = MYADOID(0x0000054F); -const CLSID ADOS::CLSID_ADOCATALOG_25 = MYADOID(0x00000602); -const IID ADOS::IID_ADOCATALOG_25 = MYADOID(0x00000603); +const CLSID ADOS::CLSID_ADOCATALOG_25 = MYADOID(0x00000602); +const IID ADOS::IID_ADOCATALOG_25 = MYADOID(0x00000603); -const CLSID ADOS::CLSID_ADOINDEX_25 = MYADOID(0x0000061E); -const IID ADOS::IID_ADOINDEX_25 = MYADOID(0x0000061F); +const CLSID ADOS::CLSID_ADOINDEX_25 = MYADOID(0x0000061E); +const IID ADOS::IID_ADOINDEX_25 = MYADOID(0x0000061F); -const CLSID ADOS::CLSID_ADOTABLE_25 = MYADOID(0x00000609); -const IID ADOS::IID_ADOTABLE_25 = MYADOID(0x00000610); +const CLSID ADOS::CLSID_ADOTABLE_25 = MYADOID(0x00000609); +const IID ADOS::IID_ADOTABLE_25 = MYADOID(0x00000610); -const CLSID ADOS::CLSID_ADOKEY_25 = MYADOID(0x00000621); -const IID ADOS::IID_ADOKEY_25 = MYADOID(0x00000622); +const CLSID ADOS::CLSID_ADOKEY_25 = MYADOID(0x00000621); +const IID ADOS::IID_ADOKEY_25 = MYADOID(0x00000622); -const CLSID ADOS::CLSID_ADOCOLUMN_25 = MYADOID(0x0000061B); -const IID ADOS::IID_ADOCOLUMN_25 = MYADOID(0x0000061C); +const CLSID ADOS::CLSID_ADOCOLUMN_25 = MYADOID(0x0000061B); +const IID ADOS::IID_ADOCOLUMN_25 = MYADOID(0x0000061C); -const CLSID ADOS::CLSID_ADOGROUP_25 = MYADOID(0x00000615); -const IID ADOS::IID_ADOGROUP_25 = MYADOID(0x00000616); +const CLSID ADOS::CLSID_ADOGROUP_25 = MYADOID(0x00000615); +const IID ADOS::IID_ADOGROUP_25 = MYADOID(0x00000616); -const CLSID ADOS::CLSID_ADOUSER_25 = MYADOID(0x00000618); -const IID ADOS::IID_ADOUSER_25 = MYADOID(0x00000619); +const CLSID ADOS::CLSID_ADOUSER_25 = MYADOID(0x00000618); +const IID ADOS::IID_ADOUSER_25 = MYADOID(0x00000619); -const CLSID ADOS::CLSID_ADOVIEW_25 = MYADOID(0x00000612); -const IID ADOS::IID_ADOVIEW_25 = MYADOID(0x00000613); +const CLSID ADOS::CLSID_ADOVIEW_25 = MYADOID(0x00000612); +const IID ADOS::IID_ADOVIEW_25 = MYADOID(0x00000613); OLEString& ADOS::GetKeyStr() { @@ -91,37 +91,37 @@ sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType) switch (eType) { case adUnsignedSmallInt: - case adSmallInt: nType = DataType::SMALLINT; break; + case adSmallInt: nType = DataType::SMALLINT; break; case adUnsignedInt: - case adInteger: nType = DataType::INTEGER; break; + case adInteger: nType = DataType::INTEGER; break; case adUnsignedBigInt: - case adBigInt: nType = DataType::BIGINT; break; - case adSingle: nType = DataType::FLOAT; break; - case adDouble: nType = DataType::DOUBLE; break; - case adCurrency: nType = DataType::DOUBLE; break; + case adBigInt: nType = DataType::BIGINT; break; + case adSingle: nType = DataType::FLOAT; break; + case adDouble: nType = DataType::DOUBLE; break; + case adCurrency: nType = DataType::DOUBLE; break; case adVarNumeric: - case adNumeric: nType = DataType::NUMERIC; break; - case adDecimal: nType = DataType::DECIMAL; break; - case adDBDate: nType = DataType::DATE; break; - case adDBTime: nType = DataType::TIME; break; + case adNumeric: nType = DataType::NUMERIC; break; + case adDecimal: nType = DataType::DECIMAL; break; + case adDBDate: nType = DataType::DATE; break; + case adDBTime: nType = DataType::TIME; break; case adDate: - case adDBTimeStamp: nType = DataType::TIMESTAMP; break; - case adBoolean: nType = DataType::BIT; break; -// case adArray: nType = DataType::ARRAY; break; - case adBinary: nType = DataType::BINARY; break; - case adGUID: nType = DataType::OBJECT; break; + case adDBTimeStamp: nType = DataType::TIMESTAMP; break; + case adBoolean: nType = DataType::BIT; break; +// case adArray: nType = DataType::ARRAY; break; + case adBinary: nType = DataType::BINARY; break; + case adGUID: nType = DataType::OBJECT; break; case adBSTR: case adVarWChar: case adWChar: - case adVarChar: nType = DataType::VARCHAR; break; + case adVarChar: nType = DataType::VARCHAR; break; case adLongVarWChar: - case adLongVarChar: nType = DataType::LONGVARCHAR; break; - case adVarBinary: nType = DataType::VARBINARY; break; - case adLongVarBinary: nType = DataType::LONGVARBINARY;break; - case adChar: nType = DataType::CHAR; break; + case adLongVarChar: nType = DataType::LONGVARCHAR; break; + case adVarBinary: nType = DataType::VARBINARY; break; + case adLongVarBinary: nType = DataType::LONGVARBINARY;break; + case adChar: nType = DataType::CHAR; break; case adUnsignedTinyInt: - case adTinyInt: nType = DataType::TINYINT; break; - case adEmpty: nType = DataType::SQLNULL; break; + case adTinyInt: nType = DataType::TINYINT; break; + case adEmpty: nType = DataType::SQLNULL; break; case adUserDefined: case adPropVariant: case adFileTime: @@ -130,7 +130,7 @@ sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType) case adIUnknown: case adError: case adVariant: - nType = DataType::OTHER; break; + nType = DataType::OTHER; break; default: OSL_ENSURE(0,"MapADOType2Jdbc: Unknown Type!"); ; @@ -142,27 +142,27 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine) { switch (_nType) { - case DataType::SMALLINT: return adSmallInt; break; - case DataType::INTEGER: return adInteger; break; - case DataType::BIGINT: return adBigInt; break; - case DataType::FLOAT: return adSingle; break; - case DataType::DOUBLE: return adDouble; break; - case DataType::NUMERIC: return adNumeric; break; - case DataType::DECIMAL: return adDecimal; break; - case DataType::DATE: return isJetEngine(_nJetEngine) ? adDate : adDBDate; break; - case DataType::TIME: return adDBTime; break; - case DataType::TIMESTAMP: return isJetEngine(_nJetEngine) ? adDate : adDBTimeStamp; break; - case DataType::BIT: return adBoolean; break; - case DataType::BINARY: return adBinary; break; - case DataType::VARCHAR: return adVarWChar; break; + case DataType::SMALLINT: return adSmallInt; break; + case DataType::INTEGER: return adInteger; break; + case DataType::BIGINT: return adBigInt; break; + case DataType::FLOAT: return adSingle; break; + case DataType::DOUBLE: return adDouble; break; + case DataType::NUMERIC: return adNumeric; break; + case DataType::DECIMAL: return adDecimal; break; + case DataType::DATE: return isJetEngine(_nJetEngine) ? adDate : adDBDate; break; + case DataType::TIME: return adDBTime; break; + case DataType::TIMESTAMP: return isJetEngine(_nJetEngine) ? adDate : adDBTimeStamp; break; + case DataType::BIT: return adBoolean; break; + case DataType::BINARY: return adBinary; break; + case DataType::VARCHAR: return adVarWChar; break; case DataType::CLOB: - case DataType::LONGVARCHAR: return adLongVarWChar; break; - case DataType::VARBINARY: return adVarBinary; break; + case DataType::LONGVARCHAR: return adLongVarWChar; break; + case DataType::VARBINARY: return adVarBinary; break; case DataType::BLOB: - case DataType::LONGVARBINARY: return adLongVarBinary; break; - case DataType::CHAR: return adWChar; break; - case DataType::TINYINT: return isJetEngine(_nJetEngine) ? adUnsignedTinyInt : adTinyInt;break; - case DataType::OBJECT: return adGUID; break; + case DataType::LONGVARBINARY: return adLongVarBinary; break; + case DataType::CHAR: return adWChar; break; + case DataType::TINYINT: return isJetEngine(_nJetEngine) ? adUnsignedTinyInt : adTinyInt;break; + case DataType::OBJECT: return adGUID; break; default: OSL_ENSURE(0,"MapJdbc2ADOType: Unknown Type!"); ; @@ -170,30 +170,30 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine) return adEmpty; } // ----------------------------------------------------------------------------- -const int JET_ENGINETYPE_UNKNOWN = 0; -const int JET_ENGINETYPE_JET10 = 1; -const int JET_ENGINETYPE_JET11 = 2; -const int JET_ENGINETYPE_JET20 = 3; -const int JET_ENGINETYPE_JET3X = 4; -const int JET_ENGINETYPE_JET4X = 5; -const int JET_ENGINETYPE_DBASE3 = 10; -const int JET_ENGINETYPE_DBASE4 = 11; -const int JET_ENGINETYPE_DBASE5 = 12; -const int JET_ENGINETYPE_EXCEL30 = 20; -const int JET_ENGINETYPE_EXCEL40 = 21; -const int JET_ENGINETYPE_EXCEL50 = 22; -const int JET_ENGINETYPE_EXCEL80 = 23; -const int JET_ENGINETYPE_EXCEL90 = 24; -const int JET_ENGINETYPE_EXCHANGE4 = 30; -const int JET_ENGINETYPE_LOTUSWK1 = 40; -const int JET_ENGINETYPE_LOTUSWK3 = 41; -const int JET_ENGINETYPE_LOTUSWK4 = 42; -const int JET_ENGINETYPE_PARADOX3X = 50; -const int JET_ENGINETYPE_PARADOX4X = 51; -const int JET_ENGINETYPE_PARADOX5X = 52; -const int JET_ENGINETYPE_PARADOX7X = 53; -const int JET_ENGINETYPE_TEXT1X = 60; -const int JET_ENGINETYPE_HTML1X = 70; +const int JET_ENGINETYPE_UNKNOWN = 0; +const int JET_ENGINETYPE_JET10 = 1; +const int JET_ENGINETYPE_JET11 = 2; +const int JET_ENGINETYPE_JET20 = 3; +const int JET_ENGINETYPE_JET3X = 4; +const int JET_ENGINETYPE_JET4X = 5; +const int JET_ENGINETYPE_DBASE3 = 10; +const int JET_ENGINETYPE_DBASE4 = 11; +const int JET_ENGINETYPE_DBASE5 = 12; +const int JET_ENGINETYPE_EXCEL30 = 20; +const int JET_ENGINETYPE_EXCEL40 = 21; +const int JET_ENGINETYPE_EXCEL50 = 22; +const int JET_ENGINETYPE_EXCEL80 = 23; +const int JET_ENGINETYPE_EXCEL90 = 24; +const int JET_ENGINETYPE_EXCHANGE4 = 30; +const int JET_ENGINETYPE_LOTUSWK1 = 40; +const int JET_ENGINETYPE_LOTUSWK3 = 41; +const int JET_ENGINETYPE_LOTUSWK4 = 42; +const int JET_ENGINETYPE_PARADOX3X = 50; +const int JET_ENGINETYPE_PARADOX4X = 51; +const int JET_ENGINETYPE_PARADOX5X = 52; +const int JET_ENGINETYPE_PARADOX7X = 53; +const int JET_ENGINETYPE_TEXT1X = 60; +const int JET_ENGINETYPE_HTML1X = 70; sal_Bool ADOS::isJetEngine(sal_Int32 _nEngineType) { @@ -320,9 +320,9 @@ WpADOField ADOS::getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex) thr if ( !_pRecordSet ) return WpADOField(); - ADOFields* pFields = NULL; + ADOFields* pFields = NULL; _pRecordSet->get_Fields(&pFields); - WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); + WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); if(_nColumnIndex <= 0 || _nColumnIndex > aFields.GetItemCount()) ::dbtools::throwInvalidIndexException(NULL); WpADOField aField(aFields.GetItem(_nColumnIndex-1)); diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index fd0f903b5705..43142bc18e08 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -2,7 +2,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 @@ -73,7 +73,7 @@ void OCalcCatalog::refreshTables() // this avoids that the document will be loaded a 2nd time when one table will be accessed. //if ( m_pTables && m_pTables->hasElements() ) - // m_pTables->getByIndex(0); + // m_pTables->getByIndex(0); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/calc/CColumns.cxx b/connectivity/source/drivers/calc/CColumns.cxx index 019361e3d12f..e3d7bcaa44a3 100644 --- a/connectivity/source/drivers/calc/CColumns.cxx +++ b/connectivity/source/drivers/calc/CColumns.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 7056a07e7488..bbe3990afb69 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -2,7 +2,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 @@ -76,7 +76,7 @@ void OCalcConnection::construct(const ::rtl::OUString& url,const Sequence< Prope throw(SQLException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcConnection::construct" ); - // open file + // open file sal_Int32 nLen = url.indexOf(':'); nLen = url.indexOf(':',nLen+1); @@ -92,16 +92,16 @@ void OCalcConnection::construct(const ::rtl::OUString& url,const Sequence< Prope aURL.SetSmartURL(m_aFileName); if ( aURL.GetProtocol() == INET_PROT_NOT_VALID ) { - // don't pass invalid URL to loadComponentFromURL + // don't pass invalid URL to loadComponentFromURL throw SQLException(); } m_aFileName = aURL.GetMainURL(INetURLObject::NO_DECODE); m_sPassword = ::rtl::OUString(); - const char* pPwd = "password"; + const char* pPwd = "password"; - const PropertyValue *pIter = info.getConstArray(); - const PropertyValue *pEnd = pIter + info.getLength(); + const PropertyValue *pIter = info.getConstArray(); + const PropertyValue *pEnd = pIter + info.getLength(); for(;pIter != pEnd;++pIter) { if(!pIter->Name.compareToAscii(pPwd)) @@ -122,7 +122,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() osl_incrementInterlockedCount(&m_nDocCount); return m_xDoc; } - // open read-only as long as updating isn't implemented + // open read-only as long as updating isn't implemented Sequence<PropertyValue> aArgs(2); aArgs[0].Name = ::rtl::OUString::createFromAscii("Hidden"); aArgs[0].Value <<= (sal_Bool) sal_True; @@ -158,8 +158,8 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() m_xDoc.set(xComponent, UNO_QUERY ); - // if the URL is not a spreadsheet document, throw the exception here - // instead of at the first access to it + // if the URL is not a spreadsheet document, throw the exception here + // instead of at the first access to it if ( !m_xDoc.is() ) { Any aErrorDetails; diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 272ef85822cf..80f22f5f59ce 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -63,7 +63,7 @@ using namespace ::com::sun::star::sheet; // ------------------------------------------------------------------------- -OCalcDatabaseMetaData::OCalcDatabaseMetaData(OConnection* _pCon) :ODatabaseMetaData(_pCon) +OCalcDatabaseMetaData::OCalcDatabaseMetaData(OConnection* _pCon) :ODatabaseMetaData(_pCon) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcDatabaseMetaData::OCalcDatabaseMetaData" ); } @@ -178,8 +178,8 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( aRow[10] = new ORowSetValueDecorator((sal_Int32)10); Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames()); - const ::rtl::OUString* pTabIter = aTabNames.getConstArray(); - const ::rtl::OUString* pTabEnd = pTabIter + aTabNames.getLength(); + const ::rtl::OUString* pTabIter = aTabNames.getConstArray(); + const ::rtl::OUString* pTabEnd = pTabIter + aTabNames.getLength(); for(;pTabIter != pTabEnd;++pTabIter) { if(match(tableNamePattern,*pTabIter,'\0')) @@ -208,13 +208,13 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getColumns( aRow[5] = new ORowSetValueDecorator(::comphelper::getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))); aRow[6] = new ORowSetValueDecorator(::comphelper::getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)))); aRow[7] = new ORowSetValueDecorator(::comphelper::getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)))); - // aRow[8] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); + // aRow[8] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); aRow[9] = new ORowSetValueDecorator(::comphelper::getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)))); aRow[11] = new ORowSetValueDecorator(::comphelper::getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)))); - // aRow[12] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); + // aRow[12] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); aRow[13] = new ORowSetValueDecorator(::comphelper::getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)))); - // aRow[14] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); - // aRow[15] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); + // aRow[14] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); + // aRow[15] = xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)); switch(sal_Int32(aRow[5]->getValue())) { case DataType::CHAR: @@ -304,7 +304,7 @@ sal_Bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, const ::r Reference<XSpreadsheet> xSheet; if ( aAny >>= xSheet ) { - // test if sheet is hidden + // test if sheet is hidden Reference<XPropertySet> xProp( xSheet, UNO_QUERY ); if (xProp.is()) @@ -313,23 +313,23 @@ sal_Bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, const ::r Any aVisAny = xProp->getPropertyValue( ::rtl::OUString::createFromAscii("IsVisible") ); if ( aVisAny >>= bVisible ) if (!bVisible) - return sal_True; // hidden - } + return sal_True; // hidden + } - // use the same data area as in OCalcTable to test for empty table + // use the same data area as in OCalcTable to test for empty table Reference<XSheetCellCursor> xCursor = xSheet->createCursor(); Reference<XCellRangeAddressable> xRange( xCursor, UNO_QUERY ); if ( xRange.is() ) { - xCursor->collapseToSize( 1, 1 ); // single (first) cell - xCursor->collapseToCurrentRegion(); // contiguous data area + xCursor->collapseToSize( 1, 1 ); // single (first) cell + xCursor->collapseToCurrentRegion(); // contiguous data area CellRangeAddress aRangeAddr = xRange->getRangeAddress(); if ( aRangeAddr.StartColumn == aRangeAddr.EndColumn && aRangeAddr.StartRow == aRangeAddr.EndRow ) { - // single cell -> check content + // single cell -> check content Reference<XCell> xCell = xCursor->getCellByPosition( 0, 0 ); if ( xCell.is() && xCell->getType() == CellContentType_EMPTY ) return sal_True; @@ -361,7 +361,7 @@ sal_Bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& xRanges, const ::rtl:: catch ( UnknownPropertyException& ) { // optional property - } + } } } @@ -391,9 +391,9 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( if(nLength) { bTableFound = sal_False; - + const ::rtl::OUString* pIter = types.getConstArray(); - const ::rtl::OUString* pEnd = pIter + nLength; + const ::rtl::OUString* pEnd = pIter + nLength; for(;pIter != pEnd;++pIter) { if(*pIter == aTable) diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx index 5861836e322e..4f3cb57ef483 100644 --- a/connectivity/source/drivers/calc/CDriver.cxx +++ b/connectivity/source/drivers/calc/CDriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/calc/CPreparedStatement.cxx b/connectivity/source/drivers/calc/CPreparedStatement.cxx index b80353dc151a..13487b50678d 100644 --- a/connectivity/source/drivers/calc/CPreparedStatement.cxx +++ b/connectivity/source/drivers/calc/CPreparedStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx index 3b73d3d02c7c..e218ce7f0041 100644 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx @@ -2,7 +2,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 @@ -44,10 +44,10 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// using namespace com::sun::star::container; -// using namespace com::sun::star::util; +// using namespace com::sun::star::container; +// using namespace com::sun::star::util; //------------------------------------------------------------------------------ -OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) +OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { @@ -55,20 +55,20 @@ OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTr } // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OCalcResultSet::getImplementationName( ) throw ( RuntimeException) -{ - return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.calc.ResultSet"); +{ + return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.calc.ResultSet"); } -// ------------------------------------------------------------------------- -Sequence< ::rtl::OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw( RuntimeException) -{ - Sequence< ::rtl::OUString > aSupported(2); +// ------------------------------------------------------------------------- +Sequence< ::rtl::OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw( RuntimeException) +{ + Sequence< ::rtl::OUString > aSupported(2); aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); - return aSupported; + return aSupported; } -// ------------------------------------------------------------------------- -sal_Bool SAL_CALL OCalcResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw( RuntimeException) -{ +// ------------------------------------------------------------------------- +sal_Bool SAL_CALL OCalcResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw( RuntimeException) +{ Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames()); const ::rtl::OUString* pSupported = aSupported.getConstArray(); const ::rtl::OUString* pEnd = pSupported + aSupported.getLength(); @@ -76,7 +76,7 @@ sal_Bool SAL_CALL OCalcResultSet::supportsService( const ::rtl::OUString& _rServ ; return pSupported != pEnd; -} +} // ------------------------------------------------------------------------- Any SAL_CALL OCalcResultSet::queryInterface( const Type & rType ) throw(RuntimeException) { @@ -95,7 +95,7 @@ Any SAL_CALL OCalcResultSet::getBookmark( ) throw( SQLException, RuntimeExcept { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + return makeAny((sal_Int32)(m_aRow->get())[0]->getValue()); } @@ -104,7 +104,7 @@ sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const Any& bookmark ) throw( { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; @@ -115,7 +115,7 @@ sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark, { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; @@ -139,7 +139,7 @@ sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const Any& bookmark ) throw( S { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + return comphelper::getINT32(bookmark); } @@ -149,14 +149,14 @@ Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const Sequence< Any { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + ::dbtools::throwFeatureNotImplementedException( "XDeleteRows::deleteRows", *this ); return Sequence< sal_Int32 >(); } // ------------------------------------------------------------------------- sal_Bool OCalcResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) { - // Calc table has no index + // Calc table has no index return sal_False; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/calc/CStatement.cxx b/connectivity/source/drivers/calc/CStatement.cxx index 1005d0c8af90..9bdc780c8296 100644 --- a/connectivity/source/drivers/calc/CStatement.cxx +++ b/connectivity/source/drivers/calc/CStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 018eb4d2dfaa..5a005d22d321 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -2,7 +2,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 @@ -81,7 +81,7 @@ using namespace ::com::sun::star::util; void lcl_UpdateArea( const Reference<XCellRange>& xUsedRange, sal_Int32& rEndCol, sal_Int32& rEndRow ) { //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::lcl_UpdateArea" ); - // update rEndCol, rEndRow if any non-empty cell in xUsedRange is right/below + // update rEndCol, rEndRow if any non-empty cell in xUsedRange is right/below const Reference<XCellRangesQuery> xUsedQuery( xUsedRange, UNO_QUERY ); if ( xUsedQuery.is() ) @@ -115,8 +115,8 @@ void lcl_GetDataArea( const Reference<XSpreadsheet>& xSheet, sal_Int32& rColumnC // first find the contiguous cell area starting at A1 - xCursor->collapseToSize( 1, 1 ); // single (first) cell - xCursor->collapseToCurrentRegion(); // contiguous data area + xCursor->collapseToSize( 1, 1 ); // single (first) cell + xCursor->collapseToCurrentRegion(); // contiguous data area CellRangeAddress aRegionAddr = xRange->getRangeAddress(); sal_Int32 nEndCol = aRegionAddr.EndColumn; @@ -125,9 +125,9 @@ void lcl_GetDataArea( const Reference<XSpreadsheet>& xSheet, sal_Int32& rColumnC Reference<XUsedAreaCursor> xUsed( xCursor, UNO_QUERY ); if ( xUsed.is() ) { - // The used area from XUsedAreaCursor includes visible attributes. - // If the used area is larger than the contiguous cell area, find non-empty - // cells in that area. + // The used area from XUsedAreaCursor includes visible attributes. + // If the used area is larger than the contiguous cell area, find non-empty + // cells in that area. xUsed->gotoEndOfUsedArea( sal_False ); CellRangeAddress aUsedAddr = xRange->getRangeAddress(); @@ -141,15 +141,15 @@ void lcl_GetDataArea( const Reference<XSpreadsheet>& xSheet, sal_Int32& rColumnC if ( aUsedAddr.EndRow > aRegionAddr.EndRow ) { - // only up to the last column of aRegionAddr, the other columns are handled above + // only up to the last column of aRegionAddr, the other columns are handled above Reference<XCellRange> xUsedRange = xSheet->getCellRangeByPosition( 0, aRegionAddr.EndRow + 1, aRegionAddr.EndColumn, aUsedAddr.EndRow ); lcl_UpdateArea( xUsedRange, nEndCol, nEndRow ); } } - rColumnCount = nEndCol + 1; // number of columns - rRowCount = nEndRow; // first row (headers) is not counted + rColumnCount = nEndCol + 1; // number of columns + rRowCount = nEndRow; // first row (headers) is not counted } CellContentType lcl_GetContentOrResultType( const Reference<XCell>& xCell ) @@ -162,11 +162,11 @@ CellContentType lcl_GetContentOrResultType( const Reference<XCell>& xCell ) Reference<XPropertySet> xProp( xCell, UNO_QUERY ); try { - xProp->getPropertyValue( s_sFormulaResultType ) >>= eCellType; // type of formula result + xProp->getPropertyValue( s_sFormulaResultType ) >>= eCellType; // type of formula result } catch (UnknownPropertyException&) { - eCellType = CellContentType_VALUE; // if FormulaResultType property not available + eCellType = CellContentType_VALUE; // if FormulaResultType property not available } } return eCellType; @@ -178,7 +178,7 @@ Reference<XCell> lcl_GetUsedCell( const Reference<XSpreadsheet>& xSheet, sal_Int Reference<XCell> xCell = xSheet->getCellByPosition( nDocColumn, nDocRow ); if ( xCell.is() && xCell->getType() == CellContentType_EMPTY ) { - // get first non-empty cell + // get first non-empty cell Reference<XCellRangeAddressable> xAddr( xSheet, UNO_QUERY ); if (xAddr.is()) @@ -243,9 +243,9 @@ void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<X ::rtl::OUString& rName, sal_Int32& rDataType, sal_Bool& rCurrency ) { //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::lcl_GetColumnInfo" ); - //! avoid duplicate field names + //! avoid duplicate field names - // get column name from first row, if range contains headers + // get column name from first row, if range contains headers if ( bHasHeaders ) { @@ -264,7 +264,7 @@ void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<X Reference<XPropertySet> xProp( xDataCell, UNO_QUERY ); if ( xProp.is() ) { - rCurrency = sal_False; // set to true for currency below + rCurrency = sal_False; // set to true for currency below const CellContentType eCellType = lcl_GetContentOrResultType( xDataCell ); // #i35178# use "text" type if there is any text cell in the column @@ -272,14 +272,14 @@ void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<X rDataType = DataType::VARCHAR; else if ( eCellType == CellContentType_VALUE ) { - // get number format to distinguish between different types + // get number format to distinguish between different types sal_Int16 nNumType = NumberFormat::NUMBER; try { static ::rtl::OUString s_NumberFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")); sal_Int32 nKey = 0; - + if ( xProp->getPropertyValue( s_NumberFormat ) >>= nKey ) { const Reference<XPropertySet> xFormat = xFormats->getByKey( nKey ); @@ -304,7 +304,7 @@ void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<X } else if ( ( nNumType & NumberFormat::DATETIME ) == NumberFormat::DATETIME ) { - // NumberFormat::DATETIME is DATE | TIME + // NumberFormat::DATETIME is DATE | TIME rDataType = DataType::TIMESTAMP; } else if ( nNumType & NumberFormat::DATE ) @@ -318,7 +318,7 @@ void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<X } else { - // whole column empty + // whole column empty rDataType = DataType::VARCHAR; } } @@ -332,7 +332,7 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, sal_Int32 nDBRow, sal_Int32 nDBColumn, sal_Int32 nType ) { //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::lcl_SetValue" ); - sal_Int32 nDocColumn = nStartCol + nDBColumn - 1; // database counts from 1 + sal_Int32 nDocColumn = nStartCol + nDBColumn - 1; // database counts from 1 sal_Int32 nDocRow = nStartRow + nDBRow - 1; if (bHasHeaders) ++nDocRow; @@ -356,7 +356,7 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, break; case DataType::DECIMAL: if ( eCellType == CellContentType_VALUE ) - rValue = xCell->getValue(); // double + rValue = xCell->getValue(); // double else rValue.setNull(); break; @@ -384,7 +384,7 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, double fTime = fCellVal - rtl::math::approxFloor( fCellVal ); long nIntTime = (long)rtl::math::round( fTime * 8640000.0 ); if ( nIntTime == 8640000 ) - nIntTime = 0; // 23:59:59.995 and above is 00:00:00.00 + nIntTime = 0; // 23:59:59.995 and above is 00:00:00.00 ::com::sun::star::util::Time aTime; aTime.HundredthSeconds = (sal_uInt16)( nIntTime % 100 ); nIntTime /= 100; @@ -409,8 +409,8 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, long nIntTime = (long)::rtl::math::round( fTime * 8640000.0 ); if ( nIntTime == 8640000 ) { - nIntTime = 0; // 23:59:59.995 and above is 00:00:00.00 - ++nIntDays; // (next day) + nIntTime = 0; // 23:59:59.995 and above is 00:00:00.00 + ++nIntDays; // (next day) } ::com::sun::star::util::DateTime aDateTime; @@ -438,7 +438,7 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, } // switch (nType) } -// rValue.setTypeKind(nType); +// rValue.setTypeKind(nType); } // ------------------------------------------------------------------------- @@ -482,8 +482,8 @@ void OCalcTable::fillColumns() if ( !aColumnName.getLength() ) aColumnName = lcl_GetColumnStr( i ); - sal_Int32 nPrecision = 0; //! ... - sal_Int32 nDecimals = 0; //! ... + sal_Int32 nPrecision = 0; //! ... + sal_Int32 nDecimals = 0; //! ... switch ( eType ) { @@ -560,7 +560,7 @@ OCalcTable::OCalcTable(sdbcx::OCollection* _pTables,OCalcConnection* _pConnectio void OCalcTable::construct() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::construct" ); - // get sheet object + // get sheet object Reference< XSpreadsheetDocument> xDoc = m_pConnection->acquireDoc(); if (xDoc.is()) { @@ -575,21 +575,21 @@ void OCalcTable::construct() // whole sheet is always assumed to include a header row } } - else // no sheet -> try database range + else // no sheet -> try database range { Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { Reference<XDatabaseRanges> xRanges(xDocProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges")) ),UNO_QUERY); - + if ( xRanges.is() && xRanges->hasByName( m_Name ) ) { Reference<XDatabaseRange> xDBRange(xRanges->getByName( m_Name ),UNO_QUERY); Reference<XCellRangeReferrer> xRefer( xDBRange, UNO_QUERY ); if ( xRefer.is() ) { - // Header flag is always stored with database range - // Get flag from FilterDescriptor + // Header flag is always stored with database range + // Get flag from FilterDescriptor sal_Bool bRangeHeader = sal_True; Reference<XPropertySet> xFiltProp( xDBRange->getFilterDescriptor(), UNO_QUERY ); @@ -605,11 +605,11 @@ void OCalcTable::construct() m_nStartCol = aRangeAddr.StartColumn; m_nStartRow = aRangeAddr.StartRow; m_nDataCols = aRangeAddr.EndColumn - m_nStartCol + 1; - // m_nDataRows is excluding header row + // m_nDataRows is excluding header row m_nDataRows = aRangeAddr.EndRow - m_nStartRow; if ( !bRangeHeader ) { - // m_nDataRows counts the whole range + // m_nDataRows counts the whole range m_nDataRows += 1; } @@ -633,7 +633,7 @@ void OCalcTable::construct() } } - //! default if no null date available? + //! default if no null date available? fillColumns(); @@ -654,13 +654,13 @@ void OCalcTable::refreshColumns() if(m_pColumns) m_pColumns->reFill(aVector); else - m_pColumns = new OCalcColumns(this,m_aMutex,aVector); + m_pColumns = new OCalcColumns(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- void OCalcTable::refreshIndexes() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::refreshIndexes" ); - // Calc table has no index + // Calc table has no index } // ------------------------------------------------------------------------- @@ -673,7 +673,7 @@ void SAL_CALL OCalcTable::disposing(void) if ( m_pConnection ) m_pConnection->releaseDoc(); m_pConnection = NULL; - + } // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OCalcTable::getTypes( ) throw(RuntimeException) @@ -681,13 +681,13 @@ Sequence< Type > SAL_CALL OCalcTable::getTypes( ) throw(RuntimeException) //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::getTypes" ); Sequence< Type > aTypes = OTable_TYPEDEF::getTypes(); ::std::vector<Type> aOwnTypes; - aOwnTypes.reserve(aTypes.getLength()); + aOwnTypes.reserve(aTypes.getLength()); const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!( *pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || + if(!( *pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || *pBegin == ::getCppuType((const Reference<XIndexesSupplier>*)0) || *pBegin == ::getCppuType((const Reference<XRename>*)0) || *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || @@ -736,7 +736,7 @@ Sequence< sal_Int8 > OCalcTable::getUnoTunnelImplementationId() sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::getSomething" ); - return (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + return (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( this ) : OCalcTable_BASE::getSomething(rId); } @@ -789,7 +789,7 @@ sal_Bool OCalcTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int goto Error; else { - //! read buffer / setup row object etc? + //! read buffer / setup row object etc? } goto End; @@ -810,9 +810,9 @@ Error: m_nFilePos = 0; break; case IResultSetHelper::BOOKMARK: - m_nFilePos = nTempPos; // vorherige Position + m_nFilePos = nTempPos; // vorherige Position } - // aStatus.Set(SDB_STAT_NO_DATA_FOUND); + // aStatus.Set(SDB_STAT_NO_DATA_FOUND); return sal_False; End: @@ -849,8 +849,8 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, else (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; - - lcl_SetValue( (_rRow->get())[i]->get(), m_xSheet, m_nStartCol, m_nStartRow, m_bHasHeaders, + + lcl_SetValue( (_rRow->get())[i]->get(), m_xSheet, m_nStartCol, m_nStartRow, m_bHasHeaders, m_aNullDate, m_nFilePos, i, nType ); } } diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx index df39fb7698db..165252345967 100644 --- a/connectivity/source/drivers/calc/CTables.cxx +++ b/connectivity/source/drivers/calc/CTables.cxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; -namespace starutil = ::com::sun::star::util; +namespace starutil = ::com::sun::star::util; sdbcx::ObjectType OCalcTables::createObject(const ::rtl::OUString& _rName) { diff --git a/connectivity/source/drivers/calc/CalcDriver.xml b/connectivity/source/drivers/calc/CalcDriver.xml index c6ff0d00fe55..31a73e8bdd39 100644 --- a/connectivity/source/drivers/calc/CalcDriver.xml +++ b/connectivity/source/drivers/calc/CalcDriver.xml @@ -12,7 +12,7 @@ <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - <service-dependency> ... </service-dependency> + <service-dependency> ... </service-dependency> </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index cf99d4b4654e..4af845930d47 100644 --- a/connectivity/source/drivers/calc/Cservices.cxx +++ b/connectivity/source/drivers/calc/Cservices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/calc/calc.xcu b/connectivity/source/drivers/calc/calc.xcu index b7b494fdfa56..ec71ed3cafcc 100755 --- a/connectivity/source/drivers/calc/calc.xcu +++ b/connectivity/source/drivers/calc/calc.xcu @@ -2,7 +2,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 @@ -40,7 +40,7 @@ <value>true</value> </prop> </node> - </node> + </node> <node oor:name="MetaData"> <node oor:name="SupportsBrowsing" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index b0007da28a62..56638353437d 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx index 3c7edbf4ca55..5ac541416352 100644 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ b/connectivity/source/drivers/dbase/DCode.cxx @@ -2,7 +2,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 @@ -65,7 +65,7 @@ OFILEOperandAttr::OFILEOperandAttr(sal_uInt16 _nPos, Sequence< ::rtl::OUString> aSeq = _xIndexes->getElementNames(); const ::rtl::OUString* pBegin = aSeq.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + aSeq.getLength(); + const ::rtl::OUString* pEnd = pBegin + aSeq.getLength(); for(;pBegin != pEnd;++pBegin) { _xIndexes->getByName(*pBegin) >>= xIndex; diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx index c3221c69b04c..6f2fb95d5bfe 100644 --- a/connectivity/source/drivers/dbase/DColumns.cxx +++ b/connectivity/source/drivers/dbase/DColumns.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx index b30eb3cca0c9..e2dc2e30b8ba 100644 --- a/connectivity/source/drivers/dbase/DConnection.cxx +++ b/connectivity/source/drivers/dbase/DConnection.cxx @@ -2,7 +2,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 @@ -54,7 +54,7 @@ using namespace ::com::sun::star::lang; DBG_NAME(ODbaseConnection) // -------------------------------------------------------------------------------- -ODbaseConnection::ODbaseConnection(ODriver* _pDriver) : OConnection(_pDriver) +ODbaseConnection::ODbaseConnection(ODriver* _pDriver) : OConnection(_pDriver) { DBG_CTOR(ODbaseConnection,NULL); m_aFilenameExtension = String::CreateFromAscii("dbf"); diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 74c053b66f8d..85288e86f2f6 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -59,7 +59,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::lang; -ODbaseDatabaseMetaData::ODbaseDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon) +ODbaseDatabaseMetaData::ODbaseDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::ODbaseDatabaseMetaData" ); } @@ -75,7 +75,7 @@ Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw( ) ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo); Reference< XResultSet > xRef = pResult; - + static ODatabaseMetaDataResultSet::ORows aRows; if(aRows.empty()) { @@ -189,8 +189,8 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns( aRow[10] = new ORowSetValueDecorator((sal_Int32)10); Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames()); - const ::rtl::OUString* pTabBegin = aTabNames.getConstArray(); - const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength(); + const ::rtl::OUString* pTabBegin = aTabNames.getConstArray(); + const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength(); for(;pTabBegin != pTabEnd;++pTabBegin) { if(match(tableNamePattern,*pTabBegin,'\0')) @@ -277,8 +277,8 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( ODatabaseMetaDataResultSet::ORows aRows; ODatabaseMetaDataResultSet::ORow aRow(14); - aRow[5] = new ORowSetValueDecorator(::rtl::OUString()); - aRow[10] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("A")); + aRow[5] = new ORowSetValueDecorator(::rtl::OUString()); + aRow[10] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("A")); Reference< XIndexesSupplier> xTable; ::cppu::extractInterface(xTable,xNames->getByName(table)); @@ -398,7 +398,7 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run return bReadOnly; } // ----------------------------------------------------------------------------- -sal_Bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" ); return sal_True; diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 76c573a509a3..19201664166a 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -2,7 +2,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 @@ -115,7 +115,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::O ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) ,aBoolean) ); - return Sequence< DriverPropertyInfo >(&(aDriverInfo[0]),aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(&(aDriverInfo[0]),aDriverInfo.size()); } SharedResources aResources; diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 1b205f08ef70..09103a277fe7 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -2,7 +2,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 @@ -78,7 +78,7 @@ ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) : OIndex(sal_True/*_pTable->getCo construct(); } // ------------------------------------------------------------------------- -ODbaseIndex::ODbaseIndex( ODbaseTable* _pTable, +ODbaseIndex::ODbaseIndex( ODbaseTable* _pTable, const NDXHeader& _rHeader, const ::rtl::OUString& _rName) :OIndex(_rName,::rtl::OUString(),_rHeader.db_unique,sal_False,sal_False,sal_True) @@ -597,7 +597,7 @@ BOOL ODbaseIndex::CreateImpl() nRowsLeft = xSet->getRow(); xSet->beforeFirst(); - ORowSetValue atmpValue=ORowSetValue(); + ORowSetValue atmpValue=ORowSetValue(); ONDXKey aKey(atmpValue, nType, 0); ONDXKey aInsertKey(atmpValue, nType, 0); // Erzeugen der Indexstruktur diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx index 3b9d1302e86b..b10780bfc649 100644 --- a/connectivity/source/drivers/dbase/DIndexColumns.cxx +++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx index 83297aa4fca5..965196f7ded9 100644 --- a/connectivity/source/drivers/dbase/DIndexIter.cxx +++ b/connectivity/source/drivers/dbase/DIndexIter.cxx @@ -2,7 +2,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 @@ -102,7 +102,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) // wird immer die aktuelle Seite und die Knotenposition vermerkt // auf die die Bedingung <= zutrifft // dieses findet beim Insert besondere Beachtung - // ONDXIndex* m_pIndex = GetNDXIndex(); + // ONDXIndex* m_pIndex = GetNDXIndex(); OOp_COMPARE aTempOp(SQLFilterOperator::GREATER); USHORT i = 0; @@ -286,7 +286,7 @@ ONDXKey* OIndexIterator::GetNextKey() { USHORT nPos = pParentPage->Search(pPage); if (nPos != pParentPage->Count() - 1) - { // Seite gefunden + { // Seite gefunden pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage); break; } diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx index 53ba4b50b5d5..cd2090de7f02 100644 --- a/connectivity/source/drivers/dbase/DIndexes.cxx +++ b/connectivity/source/drivers/dbase/DIndexes.cxx @@ -2,7 +2,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 @@ -48,7 +48,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -namespace starutil = ::com::sun::star::util; +namespace starutil = ::com::sun::star::util; sdbcx::ObjectType ODbaseIndexes::createObject(const ::rtl::OUString& _rName) { diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx index 165fe5be3b6a..55c06f2018c8 100644 --- a/connectivity/source/drivers/dbase/DNoException.cxx +++ b/connectivity/source/drivers/dbase/DNoException.cxx @@ -2,7 +2,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 @@ -118,7 +118,7 @@ Error: m_nFilePos = 0; break; case IResultSetHelper::BOOKMARK: - m_nFilePos = nTempPos; // vorherige Position + m_nFilePos = nTempPos; // vorherige Position } return sal_False; @@ -140,7 +140,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) const char cEOF = (char) 0x1a; ByteString aBStr; static char aBuf[514]; - aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen + aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen BOOL bReady = sal_False; do @@ -228,7 +228,7 @@ void ODbaseTable::AllocBuffer() if (m_pBuffer == NULL && nSize) { m_nBufferSize = nSize; - m_pBuffer = new BYTE[m_nBufferSize+1]; + m_pBuffer = new BYTE[m_nBufferSize+1]; } } // ----------------------------------------------------------------------------- @@ -294,7 +294,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const if (!rIndex.isUnique() || rPage.IsLeaf()) rStream << (sal_uInt32)aKey.nRecord; // schluessel else - rStream << (sal_uInt32)0; // schluessel + rStream << (sal_uInt32)0; // schluessel if (rIndex.getHeader().db_keytype) // double { diff --git a/connectivity/source/drivers/dbase/DPreparedStatement.cxx b/connectivity/source/drivers/dbase/DPreparedStatement.cxx index d67b477e3385..67f7c3694142 100644 --- a/connectivity/source/drivers/dbase/DPreparedStatement.cxx +++ b/connectivity/source/drivers/dbase/DPreparedStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index c7489929d210..6b93961a5296 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -2,7 +2,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 @@ -50,7 +50,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; //------------------------------------------------------------------------------ -ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) +ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { diff --git a/connectivity/source/drivers/dbase/DStatement.cxx b/connectivity/source/drivers/dbase/DStatement.cxx index a6038aea6825..9e0e5ddfc8e1 100644 --- a/connectivity/source/drivers/dbase/DStatement.cxx +++ b/connectivity/source/drivers/dbase/DStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 8b5a375a28dc..fa286f345679 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ #include <svl/zforlist.hxx> #include <unotools/syslocale.hxx> #include <rtl/math.hxx> -#include <stdio.h> //sprintf +#include <stdio.h> //sprintf #include <ucbhelper/content.hxx> #include <comphelper/extract.hxx> #include <connectivity/dbexception.hxx> @@ -86,7 +86,7 @@ using namespace ::com::sun::star::i18n; #define FIELD_DESCRIPTOR_TERMINATOR 0x0D #define DBF_EOL 0x1A -namespace +namespace { sal_Int32 lcl_getFileSize(SvStream& _rStream) { @@ -106,7 +106,7 @@ sal_Int32 lcl_getFileSize(SvStream& _rStream) void lcl_CalcJulDate(sal_Int32& _nJulianDate,sal_Int32& _nJulianTime,const com::sun::star::util::DateTime _aDateTime) { com::sun::star::util::DateTime aDateTime = _aDateTime; - // weird: months fix + // weird: months fix if (aDateTime.Month > 12) { aDateTime.Month--; @@ -132,23 +132,23 @@ void lcl_CalcJulDate(sal_Int32& _nJulianDate,sal_Int32& _nJulianTime,const com:: } sal_Int32 ia = iy0 / 100; sal_Int32 ib = 2 - ia + (ia >> 2); - /* calculate julian date */ - if ( aDateTime.Year <= 0 ) + /* calculate julian date */ + if ( aDateTime.Year <= 0 ) { _nJulianDate = (sal_Int32) ((365.25 * iy0) - 0.75) + (sal_Int32) (30.6001 * (im0 + 1) ) + aDateTime.Day + 1720994; - } // if ( _aDateTime.Year <= 0 ) - else + } // if ( _aDateTime.Year <= 0 ) + else { - _nJulianDate = static_cast<sal_Int32>( ((365.25 * iy0) + _nJulianDate = static_cast<sal_Int32>( ((365.25 * iy0) + (sal_Int32) (30.6001 * (im0 + 1)) + aDateTime.Day + 1720994)); } double JD = _nJulianDate + 0.5; _nJulianDate = (sal_Int32)( JD + 0.5); const double gyr = aDateTime.Year + (0.01 * aDateTime.Month) + (0.0001 * aDateTime.Day); - if ( gyr >= 1582.1015 ) /* on or after 15 October 1582 */ + if ( gyr >= 1582.1015 ) /* on or after 15 October 1582 */ _nJulianDate += ib; } @@ -251,30 +251,30 @@ void ODbaseTable::readHeader() case dBaseIIIMemo: case FoxProMemo: m_pFileStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); - if ( m_aHeader.db_frei[17] != 0x00 + if ( m_aHeader.db_frei[17] != 0x00 && !m_aHeader.db_frei[18] && !m_aHeader.db_frei[19] && getConnection()->isTextEncodingDefaulted() ) { switch(m_aHeader.db_frei[17]) { - case 0x01: m_eEncoding = RTL_TEXTENCODING_IBM_437; break; // DOS USA code page 437 - case 0x02: m_eEncoding = RTL_TEXTENCODING_IBM_850; break; // DOS Multilingual code page 850 - case 0x03: m_eEncoding = RTL_TEXTENCODING_MS_1252; break; // Windows ANSI code page 1252 - case 0x04: m_eEncoding = RTL_TEXTENCODING_APPLE_ROMAN; break; // Standard Macintosh - case 0x64: m_eEncoding = RTL_TEXTENCODING_IBM_852; break; // EE MS-DOS code page 852 - case 0x65: m_eEncoding = RTL_TEXTENCODING_IBM_865; break; // Nordic MS-DOS code page 865 - case 0x66: m_eEncoding = RTL_TEXTENCODING_IBM_866; break; // Russian MS-DOS code page 866 - case 0x67: m_eEncoding = RTL_TEXTENCODING_IBM_861; break; // Icelandic MS-DOS - //case 0x68: m_eEncoding = ; break; // Kamenicky (Czech) MS-DOS - //case 0x69: m_eEncoding = ; break; // Mazovia (Polish) MS-DOS - case 0x6A: m_eEncoding = RTL_TEXTENCODING_IBM_737; break; // Greek MS-DOS (437G) - case 0x6B: m_eEncoding = RTL_TEXTENCODING_IBM_857; break; // Turkish MS-DOS - case 0x96: m_eEncoding = RTL_TEXTENCODING_APPLE_CYRILLIC; break; // Russian Macintosh - case 0x97: m_eEncoding = RTL_TEXTENCODING_APPLE_CENTEURO; break; // Eastern European Macintosh - case 0x98: m_eEncoding = RTL_TEXTENCODING_APPLE_GREEK; break; // Greek Macintosh - case 0xC8: m_eEncoding = RTL_TEXTENCODING_MS_1250; break; // Windows EE code page 1250 - case 0xC9: m_eEncoding = RTL_TEXTENCODING_MS_1251; break; // Russian Windows - case 0xCA: m_eEncoding = RTL_TEXTENCODING_MS_1254; break; // Turkish Windows - case 0xCB: m_eEncoding = RTL_TEXTENCODING_MS_1253; break; // Greek Windows + case 0x01: m_eEncoding = RTL_TEXTENCODING_IBM_437; break; // DOS USA code page 437 + case 0x02: m_eEncoding = RTL_TEXTENCODING_IBM_850; break; // DOS Multilingual code page 850 + case 0x03: m_eEncoding = RTL_TEXTENCODING_MS_1252; break; // Windows ANSI code page 1252 + case 0x04: m_eEncoding = RTL_TEXTENCODING_APPLE_ROMAN; break; // Standard Macintosh + case 0x64: m_eEncoding = RTL_TEXTENCODING_IBM_852; break; // EE MS-DOS code page 852 + case 0x65: m_eEncoding = RTL_TEXTENCODING_IBM_865; break; // Nordic MS-DOS code page 865 + case 0x66: m_eEncoding = RTL_TEXTENCODING_IBM_866; break; // Russian MS-DOS code page 866 + case 0x67: m_eEncoding = RTL_TEXTENCODING_IBM_861; break; // Icelandic MS-DOS + //case 0x68: m_eEncoding = ; break; // Kamenicky (Czech) MS-DOS + //case 0x69: m_eEncoding = ; break; // Mazovia (Polish) MS-DOS + case 0x6A: m_eEncoding = RTL_TEXTENCODING_IBM_737; break; // Greek MS-DOS (437G) + case 0x6B: m_eEncoding = RTL_TEXTENCODING_IBM_857; break; // Turkish MS-DOS + case 0x96: m_eEncoding = RTL_TEXTENCODING_APPLE_CYRILLIC; break; // Russian Macintosh + case 0x97: m_eEncoding = RTL_TEXTENCODING_APPLE_CENTEURO; break; // Eastern European Macintosh + case 0x98: m_eEncoding = RTL_TEXTENCODING_APPLE_GREEK; break; // Greek Macintosh + case 0xC8: m_eEncoding = RTL_TEXTENCODING_MS_1250; break; // Windows EE code page 1250 + case 0xC9: m_eEncoding = RTL_TEXTENCODING_MS_1251; break; // Russian Windows + case 0xCA: m_eEncoding = RTL_TEXTENCODING_MS_1254; break; // Turkish Windows + case 0xCB: m_eEncoding = RTL_TEXTENCODING_MS_1253; break; // Greek Windows default: break; } @@ -337,7 +337,7 @@ void ODbaseTable::fillColumns() sal_Int32 nPrecision = aDBFColumn.db_flng; sal_Int32 eType; sal_Bool bIsCurrency = sal_False; - + char cType[2]; cType[0] = aDBFColumn.db_typ; cType[1] = 0; @@ -447,10 +447,10 @@ ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables,ODbaseConnection* _pConnec { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ODbaseTable" ); // initialize the header - m_aHeader.db_typ = dBaseIII; - m_aHeader.db_anz = 0; - m_aHeader.db_kopf = 0; - m_aHeader.db_slng = 0; + m_aHeader.db_typ = dBaseIII; + m_aHeader.db_anz = 0; + m_aHeader.db_kopf = 0; + m_aHeader.db_slng = 0; m_eEncoding = getConnection()->getTextEncoding(); } // ------------------------------------------------------------------------- @@ -477,10 +477,10 @@ void ODbaseTable::construct() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::construct" ); // initialize the header - m_aHeader.db_typ = dBaseIII; - m_aHeader.db_anz = 0; - m_aHeader.db_kopf = 0; - m_aHeader.db_slng = 0; + m_aHeader.db_typ = dBaseIII; + m_aHeader.db_anz = 0; + m_aHeader.db_kopf = 0; + m_aHeader.db_slng = 0; m_aMemoHeader.db_size = 0; String sFileName(getEntry(m_pConnection,m_Name)); @@ -560,7 +560,7 @@ BOOL ODbaseTable::ReadMemoHeader() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemoHeader" ); m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); - m_pMemoStream->RefreshBuffer(); // sicherstellen das die Kopfinformationen tatsaechlich neu gelesen werden + m_pMemoStream->RefreshBuffer(); // sicherstellen das die Kopfinformationen tatsaechlich neu gelesen werden m_pMemoStream->Seek(0L); (*m_pMemoStream) >> m_aMemoHeader.db_next; @@ -571,7 +571,7 @@ BOOL ODbaseTable::ReadMemoHeader() // manchmal wird aber auch dBase3 dBase4 Memo zugeordnet m_pMemoStream->Seek(20L); (*m_pMemoStream) >> m_aMemoHeader.db_size; - if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size != 512) // 1 steht auch fuer dBase 3 + if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size != 512) // 1 steht auch fuer dBase 3 m_aMemoHeader.db_typ = MemodBaseIV; else if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size == 512) { @@ -595,7 +595,7 @@ BOOL ODbaseTable::ReadMemoHeader() case VisualFoxPro: case VisualFoxProAuto: case FoxProMemo: - m_aMemoHeader.db_typ = MemoFoxPro; + m_aMemoHeader.db_typ = MemoFoxPro; m_pMemoStream->Seek(6L); m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); (*m_pMemoStream) >> m_aMemoHeader.db_size; @@ -665,7 +665,7 @@ void ODbaseTable::refreshColumns() if(m_pColumns) m_pColumns->reFill(aVector); else - m_pColumns = new ODbaseColumns(this,m_aMutex,aVector); + m_pColumns = new ODbaseColumns(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- void ODbaseTable::refreshIndexes() @@ -710,7 +710,7 @@ void ODbaseTable::refreshIndexes() if(m_pIndexes) m_pIndexes->reFill(aVector); else - m_pIndexes = new ODbaseIndexes(this,m_aMutex,aVector); + m_pIndexes = new ODbaseIndexes(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- @@ -733,7 +733,7 @@ Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException) const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || + if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))) { aOwnTypes.push_back(*pBegin); @@ -748,7 +748,7 @@ Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException) Any SAL_CALL ODbaseTable::queryInterface( const Type & rType ) throw(RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::queryInterface" ); - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || + if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) return Any(); @@ -810,32 +810,32 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s sal_Int32 nType = 0; if(_bUseTableDefs) { - nLen = m_aPrecisions[i-1]; - nType = m_aTypes[i-1]; + nLen = m_aPrecisions[i-1]; + nType = m_aTypes[i-1]; } else { - (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; - (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; + (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; + (*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; } switch(nType) { - case DataType::INTEGER: + case DataType::INTEGER: case DataType::DOUBLE: case DataType::TIMESTAMP: - case DataType::DATE: - case DataType::BIT: - case DataType::LONGVARCHAR: - case DataType::LONGVARBINARY: - nLen = m_aRealFieldLengths[i-1]; + case DataType::DATE: + case DataType::BIT: + case DataType::LONGVARCHAR: + case DataType::LONGVARBINARY: + nLen = m_aRealFieldLengths[i-1]; break; case DataType::DECIMAL: if(_bUseTableDefs) nLen = SvDbaseConverter::ConvertPrecisionToDbase(nLen,m_aScales[i-1]); else nLen = SvDbaseConverter::ConvertPrecisionToDbase(nLen,getINT32((*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)))); - break; // das Vorzeichen und das Komma - + break; // das Vorzeichen und das Komma + case DataType::BINARY: case DataType::OTHER: nByteOffset += nLen; @@ -904,7 +904,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s { sal_Int64 nValue = 0; memcpy(&nValue, pData, nLen); - + if ( m_aScales[i-1] ) d = (double)(nValue / pow(10.0,(int)m_aScales[i-1])); else @@ -914,7 +914,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s { memcpy(&d, pData, nLen); } - + *(_rRow->get())[i] = d; } else @@ -941,7 +941,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s { // Empty string. Skip it. nByteOffset += nLen; - (_rRow->get())[i]->setNull(); // keine Werte -> fertig + (_rRow->get())[i]->setNull(); // keine Werte -> fertig continue; } @@ -974,8 +974,8 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s { case 'T': case 'Y': - case 'J': b = TRUE; break; - default: b = FALSE; break; + case 'J': b = TRUE; break; + default: b = FALSE; break; } *(_rRow->get())[i] = b; } @@ -984,7 +984,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s case DataType::BINARY: case DataType::LONGVARCHAR: { - const long nBlockNo = aStr.toInt32(); // Blocknummer lesen + const long nBlockNo = aStr.toInt32(); // Blocknummer lesen if (nBlockNo > 0 && m_pMemoStream) // Daten aus Memo-Datei lesen, nur wenn { if ( !ReadMemo(nBlockNo, (_rRow->get())[i]->get()) ) @@ -992,7 +992,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s } else (_rRow->get())[i]->setNull(); - } break; + } break; default: OSL_ASSERT("Falscher Type"); } @@ -1112,7 +1112,7 @@ BOOL ODbaseTable::CreateImpl() } catch(const Exception&) { - + const ::rtl::OUString sError( getConnection()->getResources().getResourceStringWithSubstitution( STR_COULD_NOT_DELETE_FILE, "$name$", aName @@ -1170,7 +1170,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) Reference<XIndexAccess> xColumns(getColumns(),UNO_QUERY); Reference<XPropertySet> xCol; const ::rtl::OUString sPropType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); - + try { const sal_Int32 nCount = xColumns->getCount(); @@ -1182,7 +1182,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) switch (getINT32(xCol->getPropertyValue(sPropType))) { case DataType::DOUBLE: - case DataType::INTEGER: + case DataType::INTEGER: case DataType::TIMESTAMP: case DataType::LONGVARBINARY: nDbaseType = VisualFoxPro; @@ -1226,7 +1226,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) const ::rtl::OUString sPropName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); const ::rtl::OUString sPropPrec = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION); const ::rtl::OUString sPropScale = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE); - + try { const sal_Int32 nCount = xColumns->getCount(); @@ -1303,7 +1303,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) if ( nDbaseType == VisualFoxPro ) (*m_pFileStream) << (nRecLength-1); else - m_pFileStream->Write(aBuffer, 4); + m_pFileStream->Write(aBuffer, 4); switch(cTyp) { @@ -1523,7 +1523,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X BOOL bInsertRow = UpdateBuffer( rRow, NULL, _xCols ); if ( bInsertRow ) { - nFileSize = lcl_getFileSize(*m_pFileStream); + nFileSize = lcl_getFileSize(*m_pFileStream); if (HasMemoFields() && m_pMemoStream) { @@ -1537,7 +1537,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X if (HasMemoFields() && m_pMemoStream) m_pMemoStream->SetStreamSize(nMemoFileSize); // alte Groesse restaurieren - m_nFilePos = nTempPos; // Fileposition restaurieren + m_nFilePos = nTempPos; // Fileposition restaurieren } else { @@ -1552,7 +1552,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X // bei Erfolg # erhoehen m_aHeader.db_anz++; - *rRow.get()[0] = m_nFilePos; // BOOKmark setzen + *rRow.get()[0] = m_nFilePos; // BOOKmark setzen m_nFilePos = nTempPos; } } @@ -1769,18 +1769,18 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const sal_Int32 nScale = 0; if ( i < m_aPrecisions.size() ) { - nLen = m_aPrecisions[i]; - nType = m_aTypes[i]; - nScale = m_aScales[i]; + nLen = m_aPrecisions[i]; + nType = m_aTypes[i]; + nScale = m_aScales[i]; } else { m_pColumns->getByIndex(i) >>= xCol; if ( xCol.is() ) { - xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; - xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; - xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nScale; + xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; + xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; + xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nScale; } } @@ -1793,14 +1793,14 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const bSetZero = true; case DataType::LONGVARBINARY: case DataType::DATE: - case DataType::BIT: + case DataType::BIT: case DataType::LONGVARCHAR: - nLen = m_aRealFieldLengths[i]; + nLen = m_aRealFieldLengths[i]; break; case DataType::DECIMAL: nLen = SvDbaseConverter::ConvertPrecisionToDbase(nLen,nScale); - break; // The sign and the comma - default: + break; // The sign and the comma + default: break; } // switch (nType) @@ -1852,9 +1852,9 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const if (rRow.get()[nPos]->getValue().isNull()) { if ( bSetZero ) - memset(pData,0,nLen); // Clear to NULL + memset(pData,0,nLen); // Clear to NULL else - memset(pData,' ',nLen); // Clear to NULL + memset(pData,' ',nLen); // Clear to NULL nByteOffset += nLen; OSL_ENSURE( nByteOffset <= m_nBufferSize ,"ByteOffset > m_nBufferSize!"); continue; @@ -1901,7 +1901,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const { const double d = rRow.get()[nPos]->getValue(); m_pColumns->getByIndex(i) >>= xCol; - + if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt { sal_Int64 nValue = 0; @@ -1917,7 +1917,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const break; case DataType::DECIMAL: { - memset(pData,' ',nLen); // Clear to NULL + memset(pData,' ',nLen); // Clear to NULL const double n = rRow.get()[nPos]->getValue(); @@ -1957,9 +1957,9 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const case DataType::LONGVARCHAR: { char cNext = pData[nLen]; // Mark's scratch and replaced by 0 - pData[nLen] = '\0'; // This is because the buffer is always a sign of greater ... + pData[nLen] = '\0'; // This is because the buffer is always a sign of greater ... - ULONG nBlockNo = strtol((const char *)pData,NULL,10); // Block number read + ULONG nBlockNo = strtol((const char *)pData,NULL,10); // Block number read // Next initial character restore again: pData[nLen] = cNext; @@ -1971,18 +1971,18 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const aStr.Expand(static_cast<sal_uInt16>(nLen - aBlock.Len()), '0' ); aStr += aBlock; // Copy characters: - memset(pData,' ',nLen); // Clear to NULL + memset(pData,' ',nLen); // Clear to NULL memcpy(pData, aStr.GetBuffer(), nLen); - } break; + } break; default: { - memset(pData,' ',nLen); // Clear to NULL + memset(pData,' ',nLen); // Clear to NULL ::rtl::OUString sStringToWrite( rRow.get()[nPos]->getValue().getString() ); // convert the string, using the connection's encoding ::rtl::OString sEncoded; - + DBTypeConversion::convertUnicodeStringToLength( sStringToWrite, sEncoded, nLen, m_eEncoding ); memcpy( pData, sEncoded.getStr(), sEncoded.getLength() ); @@ -2336,9 +2336,9 @@ namespace Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>()); Sequence< PropertyValue > aProps( 1 ); - aProps[0].Name = ::rtl::OUString::createFromAscii("Title"); - aProps[0].Handle = -1; // n/a - aProps[0].Value = makeAny( ::rtl::OUString(sNewName) ); + aProps[0].Name = ::rtl::OUString::createFromAscii("Title"); + aProps[0].Handle = -1; // n/a + aProps[0].Value = makeAny( ::rtl::OUString(sNewName) ); Sequence< Any > aValues; aContent.executeCommand( rtl::OUString::createFromAscii( "setPropertyValues" ),makeAny(aProps) ) >>= aValues; if(aValues.getLength() && aValues[0].hasValue()) @@ -2552,7 +2552,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) bOk = fetchRow( aRow, *m_aColumns, sal_True, sal_True); if ( bOk && !aRow->isDeleted() ) // copy only not deleted rows { - // special handling when pos == 0 then we don't have to distinguish between the two rows + // special handling when pos == 0 then we don't have to distinguish between the two rows if(_nPos) { aIter = aRow->get().begin()+1; @@ -2584,7 +2584,7 @@ void ODbaseTable::throwInvalidDbaseFormat() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::throwInvalidDbaseFormat" ); FileClose(); // no dbase file - + const ::rtl::OUString sError( getConnection()->getResources().getResourceStringWithSubstitution( STR_INVALID_DBASE_FILE, "$filename$", getEntry(m_pConnection,m_Name) @@ -2674,7 +2674,7 @@ Error: m_nFilePos = 0; break; case IResultSetHelper::BOOKMARK: - m_nFilePos = nTempPos; // vorherige Position + m_nFilePos = nTempPos; // vorherige Position } return sal_False; @@ -2696,7 +2696,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) const char cEOF = (char) DBF_EOL; ByteString aBStr; static char aBuf[514]; - aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen + aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen BOOL bReady = sal_False; do @@ -2789,7 +2789,7 @@ void ODbaseTable::AllocBuffer() if (m_pBuffer == NULL && nSize) { m_nBufferSize = nSize; - m_pBuffer = new BYTE[m_nBufferSize+1]; + m_pBuffer = new BYTE[m_nBufferSize+1]; } } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 17bcf3b27ba4..507d91fb3e7d 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -2,7 +2,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 @@ -53,7 +53,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; -namespace starutil = ::com::sun::star::util; +namespace starutil = ::com::sun::star::util; sdbcx::ObjectType ODbaseTables::createObject(const ::rtl::OUString& _rName) { diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx index c576aa4b46f6..69bd7ffec019 100644 --- a/connectivity/source/drivers/dbase/Dservices.cxx +++ b/connectivity/source/drivers/dbase/Dservices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/dbase/dbase.xcu b/connectivity/source/drivers/dbase/dbase.xcu index f5de1d53ab0e..319b8d79a9c1 100755 --- a/connectivity/source/drivers/dbase/dbase.xcu +++ b/connectivity/source/drivers/dbase/dbase.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/dbase/dbase.xml b/connectivity/source/drivers/dbase/dbase.xml index 3ebfd6185380..e378fcd5fdb6 100644 --- a/connectivity/source/drivers/dbase/dbase.xml +++ b/connectivity/source/drivers/dbase/dbase.xml @@ -12,7 +12,7 @@ <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - <service-dependency> ... </service-dependency> + <service-dependency> ... </service-dependency> </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 719f5b0d1cbc..f769980ed216 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -2,7 +2,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 @@ -204,7 +204,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) { // geht davon aus, dass der Knoten, auf dem die Bedingung (<=) // zutrifft, als m_nCurNode gesetzt ist - --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593) + --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593) bResult = Insert(rIndex.m_nCurNode + 1, rNode); } else // Position unbekannt @@ -212,7 +212,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) USHORT nPos = NODE_NOTFOUND; while (++nPos < nCount && rNode.GetKey() > ((*this)[nPos]).GetKey()) ; - --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593) + --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593) bResult = Insert(nPos, rNode); } @@ -432,7 +432,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos) ONDXNode ONDXPage::Split(ONDXPage& rPage) { DBG_ASSERT(IsFull(), "Falsches Splitting"); - /* Aufteilen einer Seite auf zwei + /* Aufteilen einer Seite auf zwei Blatt: Seite 1 behaelt (n - (n/2)) Seite 2 erhaelt (n/2) @@ -485,14 +485,14 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) DBG_ASSERT(HasParent(), "kein Vater vorhanden"); DBG_ASSERT(nParentNodePos != NODE_NOTFOUND, "Falscher Indexaufbau"); - /* Zusammenlegen zweier Seiten */ + /* Zusammenlegen zweier Seiten */ ONDXNode aResultNode; USHORT nMaxNodes = rIndex.GetMaxNodes(), nMaxNodes_2 = nMaxNodes / 2; // Feststellen ob Seite rechter oder linker Nachbar - BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, wenn xPage die rechte Seite ist - USHORT nNewCount = (*xPage).Count() + Count(); + BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, wenn xPage die rechte Seite ist + USHORT nNewCount = (*xPage).Count() + Count(); if (IsLeaf()) { @@ -548,7 +548,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) xPage->SetModified(FALSE); xPage->ReleaseFull(); // wird nicht mehr benoetigt } - // Ausgleichen der Elemente nNewCount >= (nMaxNodes_2 * 2) + // Ausgleichen der Elemente nNewCount >= (nMaxNodes_2 * 2) else { if (bRight) @@ -709,7 +709,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const if (!rIndex.isUnique() || rPage.IsLeaf()) rStream << (sal_uInt32)aKey.nRecord; // schluessel else - rStream << (sal_uInt32)0; // schluessel + rStream << (sal_uInt32)0; // schluessel if (rIndex.getHeader().db_keytype) // double { diff --git a/connectivity/source/drivers/evoab/LCatalog.cxx b/connectivity/source/drivers/evoab/LCatalog.cxx index 948416bda4d7..55ff6ca510b7 100644 --- a/connectivity/source/drivers/evoab/LCatalog.cxx +++ b/connectivity/source/drivers/evoab/LCatalog.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LCatalog.hxx b/connectivity/source/drivers/evoab/LCatalog.hxx index b8a205a38c83..589063d37e47 100644 --- a/connectivity/source/drivers/evoab/LCatalog.hxx +++ b/connectivity/source/drivers/evoab/LCatalog.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LColumnAlias.cxx b/connectivity/source/drivers/evoab/LColumnAlias.cxx index 320d42e65a8e..24dd9d6b3094 100644 --- a/connectivity/source/drivers/evoab/LColumnAlias.cxx +++ b/connectivity/source/drivers/evoab/LColumnAlias.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LColumnAlias.hxx b/connectivity/source/drivers/evoab/LColumnAlias.hxx index 419d158fa105..9e870b6627cc 100644 --- a/connectivity/source/drivers/evoab/LColumnAlias.hxx +++ b/connectivity/source/drivers/evoab/LColumnAlias.hxx @@ -2,7 +2,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 @@ -94,14 +94,14 @@ namespace connectivity private: ::std::vector< ::rtl::OUString> m_aAlias; ::std::vector< ::rtl::OUString> m_aHeadLineNames; - ::std::map< ::rtl::OUString, ::rtl::OUString> m_aAliasMap; + ::std::map< ::rtl::OUString, ::rtl::OUString> m_aAliasMap; protected: ::osl::Mutex m_aMutex; public: void initialise(void); const ::std::vector< ::rtl::OUString> & getAlias(void) const; const ::std::map< ::rtl::OUString, ::rtl::OUString> & getAliasMap(void) const; - void setAlias(const ::com::sun::star::uno::Reference< + void setAlias(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &); private: void setAliasMap(void); diff --git a/connectivity/source/drivers/evoab/LColumns.hxx b/connectivity/source/drivers/evoab/LColumns.hxx index 5be028cdfe2e..3f146b2a9658 100644 --- a/connectivity/source/drivers/evoab/LColumns.hxx +++ b/connectivity/source/drivers/evoab/LColumns.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LConfigAccess.cxx b/connectivity/source/drivers/evoab/LConfigAccess.cxx index ed8b358db1df..3b5da2ebc04f 100644 --- a/connectivity/source/drivers/evoab/LConfigAccess.cxx +++ b/connectivity/source/drivers/evoab/LConfigAccess.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LConfigAccess.hxx b/connectivity/source/drivers/evoab/LConfigAccess.hxx index c19c63c00750..3c82d3f5e3d1 100644 --- a/connectivity/source/drivers/evoab/LConfigAccess.hxx +++ b/connectivity/source/drivers/evoab/LConfigAccess.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LConnection.cxx b/connectivity/source/drivers/evoab/LConnection.cxx index cc0d8b9639a3..ba047b4e7db9 100644 --- a/connectivity/source/drivers/evoab/LConnection.cxx +++ b/connectivity/source/drivers/evoab/LConnection.cxx @@ -2,7 +2,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 @@ -84,7 +84,7 @@ using namespace ::com::sun::star::lang; } // -------------------------------------------------------------------------------- -OEvoabConnection::OEvoabConnection(OEvoabDriver* _pDriver) : OConnection(_pDriver) +OEvoabConnection::OEvoabConnection(OEvoabDriver* _pDriver) : OConnection(_pDriver) ,m_bHeaderLine(sal_True) ,m_cFieldDelimiter(',') ,m_cStringDelimiter('"') diff --git a/connectivity/source/drivers/evoab/LConnection.hxx b/connectivity/source/drivers/evoab/LConnection.hxx index 9d7df3e3d713..86bbd94b2cac 100644 --- a/connectivity/source/drivers/evoab/LConnection.hxx +++ b/connectivity/source/drivers/evoab/LConnection.hxx @@ -2,7 +2,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 @@ -39,29 +39,29 @@ namespace connectivity { class OEvoabConnection : public file::OConnection { - private: - OColumnAlias m_aColumnAlias; - sal_Bool m_bHeaderLine; // column names in first row - sal_Unicode m_cFieldDelimiter; // look at the name - sal_Unicode m_cStringDelimiter; // delimiter for strings m_cStringDelimiter blabla m_cStringDelimiter - sal_Unicode m_cDecimalDelimiter; // Dezimal-delimiter (Dezimalpoint) - sal_Unicode m_cThousandDelimiter; // - rtl::OUString m_aEvoFlatURI; + private: + OColumnAlias m_aColumnAlias; + sal_Bool m_bHeaderLine; // column names in first row + sal_Unicode m_cFieldDelimiter; // look at the name + sal_Unicode m_cStringDelimiter; // delimiter for strings m_cStringDelimiter blabla m_cStringDelimiter + sal_Unicode m_cDecimalDelimiter; // Dezimal-delimiter (Dezimalpoint) + sal_Unicode m_cThousandDelimiter; // + rtl::OUString m_aEvoFlatURI; public: - OEvoabConnection(OEvoabDriver* _pDriver); + OEvoabConnection(OEvoabDriver* _pDriver); virtual ~OEvoabConnection(); virtual void construct(const ::rtl::OUString& _rUrl,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo ) throw( ::com::sun::star::sdbc::SQLException); // own methods - inline const OEvoabDriver* getDriver() const { return static_cast< const OEvoabDriver* >( m_pDriver ); } - inline sal_Bool isHeaderLine() const { return m_bHeaderLine; } - inline sal_Unicode getFieldDelimiter() const { return m_cFieldDelimiter; } - inline sal_Unicode getStringDelimiter() const { return m_cStringDelimiter; } - inline sal_Unicode getDecimalDelimiter() const { return m_cDecimalDelimiter; } - inline sal_Unicode getThousandDelimiter() const { return m_cThousandDelimiter;} - const OColumnAlias& getColumnAlias() const { return m_aColumnAlias; } + inline const OEvoabDriver* getDriver() const { return static_cast< const OEvoabDriver* >( m_pDriver ); } + inline sal_Bool isHeaderLine() const { return m_bHeaderLine; } + inline sal_Unicode getFieldDelimiter() const { return m_cFieldDelimiter; } + inline sal_Unicode getStringDelimiter() const { return m_cStringDelimiter; } + inline sal_Unicode getDecimalDelimiter() const { return m_cDecimalDelimiter; } + inline sal_Unicode getThousandDelimiter() const { return m_cThousandDelimiter;} + const OColumnAlias& getColumnAlias() const { return m_aColumnAlias; } // XServiceInfo DECLARE_SERVICE_INFO(); diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx index e8ef5ae53ab1..d1a15429a557 100644 --- a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -76,7 +76,7 @@ namespace connectivity } } -OEvoabDatabaseMetaData::OEvoabDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon) +OEvoabDatabaseMetaData::OEvoabDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon) { } // ------------------------------------------------------------------------- @@ -204,8 +204,8 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns( ODatabaseMetaDataResultSet::ORow aRow(19); aRow[10] = new ORowSetValueDecorator((sal_Int32)10); Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames()); - const ::rtl::OUString* pTabBegin = aTabNames.getConstArray(); - const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength(); + const ::rtl::OUString* pTabBegin = aTabNames.getConstArray(); + const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength(); for(;pTabBegin != pTabEnd;++pTabBegin) { if(match(tableNamePattern,*pTabBegin,'\0')) @@ -303,7 +303,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( bTableFound = sal_False; const ::rtl::OUString* pBegin = types.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + nLength; + const ::rtl::OUString* pEnd = pBegin + nLength; for(;pBegin != pEnd;++pBegin) { if(*pBegin == aTable) @@ -317,11 +317,11 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( return xRef; OEvoabConnection* pOEvoabConnection = (OEvoabConnection*)m_pConnection; - OEvoabFolderList* pFolderList = new OEvoabFolderList( pOEvoabConnection ); + OEvoabFolderList* pFolderList = new OEvoabFolderList( pOEvoabConnection ); ODatabaseMetaDataResultSet::ORows aRows; - sal_Bool bMoreData = sal_True; + sal_Bool bMoreData = sal_True; ::rtl::OUString aName, aLocation; sal_Int32 nCardsCount; diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx index ebd693874818..a447a215c8df 100644 --- a/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx +++ b/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx @@ -2,7 +2,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 @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #ifndef _CONNECTIVITY_EVOAB_LDATABASEMETADATA_HXX_ #define _CONNECTIVITY_EVOAB_LDATABASEMETADATA_HXX_ @@ -40,7 +40,7 @@ namespace connectivity //************ Class: java.sql.DatabaseMetaDataDate //************************************************************** - class OEvoabDatabaseMetaData : public file::ODatabaseMetaData + class OEvoabDatabaseMetaData : public file::ODatabaseMetaData { virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw(); virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/evoab/LDebug.cxx b/connectivity/source/drivers/evoab/LDebug.cxx index b28e06c55b7e..042227947a79 100644 --- a/connectivity/source/drivers/evoab/LDebug.cxx +++ b/connectivity/source/drivers/evoab/LDebug.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LDebug.hxx b/connectivity/source/drivers/evoab/LDebug.hxx index eeb9eed1860f..8b9e2b11ab77 100644 --- a/connectivity/source/drivers/evoab/LDebug.hxx +++ b/connectivity/source/drivers/evoab/LDebug.hxx @@ -2,7 +2,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 @@ -34,9 +34,9 @@ #ifdef _DEBUG void evo_traceStringMessage( const sal_Char* _pFormat, const ::rtl::OUString& _rAsciiString ); - #define EVO_TRACE_STRING( pFormat, rAsciiString ) evo_traceStringMessage( pFormat, rAsciiString ) + #define EVO_TRACE_STRING( pFormat, rAsciiString ) evo_traceStringMessage( pFormat, rAsciiString ) #else - #define EVO_TRACE_STRING( pFormat, rAsciiString ) (void)(0) + #define EVO_TRACE_STRING( pFormat, rAsciiString ) (void)(0) #endif diff --git a/connectivity/source/drivers/evoab/LDriver.cxx b/connectivity/source/drivers/evoab/LDriver.cxx index 36363007246b..689ba848edc6 100644 --- a/connectivity/source/drivers/evoab/LDriver.cxx +++ b/connectivity/source/drivers/evoab/LDriver.cxx @@ -2,7 +2,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 @@ -337,7 +337,7 @@ const rtl::OUString OEvoabDriver::getEvoab_CLI_Command() const EVO_TRACE_STRING( "OEvoabDriver::getEvoab_CLI_Command()::aEvoab_CLI_Command = %s", aEvoab_CLI_Command ); - return aEvoab_CLI_Command; + return aEvoab_CLI_Command; } // ------------------------------------------------------------------------- const rtl::OUString OEvoabDriver::getEvoab_CLI_Path() const @@ -356,7 +356,7 @@ const rtl::OUString OEvoabDriver::getEvoab_CLI_Path() const aEvoab_CLI_Path = m_aEvoab_CLI_FullPathCommand.copy(0, nLen+1); EVO_TRACE_STRING( "OEvoabDriver::getEvoab_CLI_Path()::aEvoab_CLI_Path = %s", aEvoab_CLI_Path ); - return aEvoab_CLI_Path; + return aEvoab_CLI_Path; } // ------------------------------------------------------------------------- const rtl::OUString OEvoabDriver::getWorkingDirPath() const @@ -364,7 +364,7 @@ const rtl::OUString OEvoabDriver::getWorkingDirPath() const ::rtl::OUString aWorkingDirPath; if(m_bWorkingDirCreated) osl::File::getSystemPathFromFileURL( m_aWorkingDirURL, aWorkingDirPath ); - return aWorkingDirPath; + return aWorkingDirPath; } // ------------------------------------------------------------------------- const String OEvoabDriver::getEvoFolderListFileURL() const @@ -413,47 +413,47 @@ const sal_Char* OEvoabDriver::getSDBC_SCHEME_EVOLUTION() } const sal_Char* OEvoabDriver::getEVOAB_FOLDERLIST_FILE_NAME() { - static const sal_Char* EVOAB_FOLDERLIST_FILE_NAME = "FolderList"; + static const sal_Char* EVOAB_FOLDERLIST_FILE_NAME = "FolderList"; return EVOAB_FOLDERLIST_FILE_NAME; } const sal_Char* OEvoabDriver::getEVOAB_VERSION_FILE_NAME() { - static const sal_Char* EVOAB_VERSION_FILE_NAME = "EvoVersion"; + static const sal_Char* EVOAB_VERSION_FILE_NAME = "EvoVersion"; return EVOAB_VERSION_FILE_NAME; } const sal_Char* OEvoabDriver::getEVOAB_META_FILE_EXT() { - static const sal_Char* EVOAB_META_FILE_EXT = "csv"; + static const sal_Char* EVOAB_META_FILE_EXT = "csv"; return EVOAB_META_FILE_EXT; } const sal_Char* OEvoabDriver::getEVOAB_CLI_FULLPATHCOMMAND() { - static const sal_Char* EVOAB_CLI_FULLPATHCOMMAND = "file:///home/evoab/extra/share/evolution/*/tools/evolution-addressbook-export"; + static const sal_Char* EVOAB_CLI_FULLPATHCOMMAND = "file:///home/evoab/extra/share/evolution/*/tools/evolution-addressbook-export"; return EVOAB_CLI_FULLPATHCOMMAND; } const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_LIST_FOLDERS() { - static const sal_Char* EVOAB_CLI_ARG_LIST_FOLDERS = "-l"; + static const sal_Char* EVOAB_CLI_ARG_LIST_FOLDERS = "-l"; return EVOAB_CLI_ARG_LIST_FOLDERS; } const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_FILE_PREFIX() { - static const sal_Char* EVOAB_CLI_ARG_OUTPUT_FILE_PREFIX = "--output="; + static const sal_Char* EVOAB_CLI_ARG_OUTPUT_FILE_PREFIX = "--output="; return EVOAB_CLI_ARG_OUTPUT_FILE_PREFIX; } const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_FORMAT() { - static const sal_Char* EVOAB_CLI_ARG_OUTPUT_FORMAT = "--format=csv"; + static const sal_Char* EVOAB_CLI_ARG_OUTPUT_FORMAT = "--format=csv"; return EVOAB_CLI_ARG_OUTPUT_FORMAT; } const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_VERSION() { - static const sal_Char* EVOAB_CLI_ARG_VERSION = "--version"; + static const sal_Char* EVOAB_CLI_ARG_VERSION = "--version"; return EVOAB_CLI_ARG_VERSION; } const sal_Char* OEvoabDriver::getEVOAB_CLI_ARG_OUTPUT_REDIRECT() { - static const sal_Char* EVOAB_CLI_ARG_OUTPUT_REDIRECT = ">"; + static const sal_Char* EVOAB_CLI_ARG_OUTPUT_REDIRECT = ">"; return EVOAB_CLI_ARG_OUTPUT_REDIRECT; } rtl::OUString OEvoabDriver::translateFileErrorMessage( oslFileError nFileErr) diff --git a/connectivity/source/drivers/evoab/LDriver.hxx b/connectivity/source/drivers/evoab/LDriver.hxx index 65731264409e..598880fc278a 100644 --- a/connectivity/source/drivers/evoab/LDriver.hxx +++ b/connectivity/source/drivers/evoab/LDriver.hxx @@ -2,7 +2,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 @@ -36,9 +36,9 @@ #include <osl/file.h> #include <osl/process.h> -#define EVOAB_EVOLUTION_SCHEMA "evolution" -#define EVOAB_LDAP_SCHEMA "ldap" -#define EVOAB_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.evoab.OEvoabDriver" +#define EVOAB_EVOLUTION_SCHEMA "evolution" +#define EVOAB_LDAP_SCHEMA "ldap" +#define EVOAB_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.evoab.OEvoabDriver" namespace connectivity { @@ -56,34 +56,34 @@ namespace connectivity eTrue, eFalse }; - ::utl::TempFile m_aTempDir; - rtl::OUString m_aFolderListName; - rtl::OUString m_aVersionName; - rtl::OUString m_aFileExt; - rtl::OUString m_aWorkingDirURL; - rtl::OUString m_aEvoab_CLI_EffectiveCommand; - rtl::OUString m_aEvoab_CLI_FullPathCommand; - sal_Bool m_bWorkingDirCreated; + ::utl::TempFile m_aTempDir; + rtl::OUString m_aFolderListName; + rtl::OUString m_aVersionName; + rtl::OUString m_aFileExt; + rtl::OUString m_aWorkingDirURL; + rtl::OUString m_aEvoab_CLI_EffectiveCommand; + rtl::OUString m_aEvoab_CLI_FullPathCommand; + sal_Bool m_bWorkingDirCreated; MaybeVoidBool m_eSupportedEvoVersion; - sal_Bool fileExists(const ::rtl::OUString& _rURL, sal_Bool _bIsDir=sal_False) const; + sal_Bool fileExists(const ::rtl::OUString& _rURL, sal_Bool _bIsDir=sal_False) const; public: OEvoabDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory); - inline rtl::OUString getEvoFolderListName() const { return m_aFolderListName;} - inline rtl::OUString getFileExt() const { return m_aFileExt;} - inline rtl::OUString getEvoFolderListFileName() const { return m_aFolderListName + ::rtl::OUString::createFromAscii(".") + m_aFileExt;} - inline rtl::OUString getEvoVersionFileName() const { return m_aVersionName + ::rtl::OUString::createFromAscii(".") + m_aFileExt;} - inline rtl::OUString getWorkingDirURL() const { return m_aWorkingDirURL;} - inline rtl::OUString getEvoab_CLI_FullPathCommand() const { return m_aEvoab_CLI_FullPathCommand;} - inline rtl::OUString getEvoab_CLI_EffectiveCommand() const { return m_aEvoab_CLI_EffectiveCommand;} - inline sal_Bool doesEvoab_CLI_HavePath() const { return m_aEvoab_CLI_FullPathCommand.lastIndexOf('/')!=-1;} - const rtl::OUString getEvoab_CLI_Command() const; - const rtl::OUString getEvoab_CLI_Path() const; - const rtl::OUString getWorkingDirPath() const; - const String getEvoFolderListFileURL() const; - String getTempDirURL() const; + inline rtl::OUString getEvoFolderListName() const { return m_aFolderListName;} + inline rtl::OUString getFileExt() const { return m_aFileExt;} + inline rtl::OUString getEvoFolderListFileName() const { return m_aFolderListName + ::rtl::OUString::createFromAscii(".") + m_aFileExt;} + inline rtl::OUString getEvoVersionFileName() const { return m_aVersionName + ::rtl::OUString::createFromAscii(".") + m_aFileExt;} + inline rtl::OUString getWorkingDirURL() const { return m_aWorkingDirURL;} + inline rtl::OUString getEvoab_CLI_FullPathCommand() const { return m_aEvoab_CLI_FullPathCommand;} + inline rtl::OUString getEvoab_CLI_EffectiveCommand() const { return m_aEvoab_CLI_EffectiveCommand;} + inline sal_Bool doesEvoab_CLI_HavePath() const { return m_aEvoab_CLI_FullPathCommand.lastIndexOf('/')!=-1;} + const rtl::OUString getEvoab_CLI_Command() const; + const rtl::OUString getEvoab_CLI_Path() const; + const rtl::OUString getWorkingDirPath() const; + const String getEvoFolderListFileURL() const; + String getTempDirURL() const; // XInterface ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx index b5757ca1ac37..e7833f25edfb 100644 --- a/connectivity/source/drivers/evoab/LFolderList.cxx +++ b/connectivity/source/drivers/evoab/LFolderList.cxx @@ -2,7 +2,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,7 +42,7 @@ #include <comphelper/sequence.hxx> #include <svl/zforlist.hxx> #include <rtl/math.hxx> -#include <stdio.h> //sprintf +#include <stdio.h> //sprintf #include <comphelper/extract.hxx> #include <comphelper/numbers.hxx> #include "LDriver.hxx" @@ -246,7 +246,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal break; default: eType = DataType::VARCHAR; - nPrecision = 0; // nyi: Daten koennen aber laenger sein! + nPrecision = 0; // nyi: Daten koennen aber laenger sein! nScale = 0; aTypeName = ::rtl::OUString::createFromAscii("VARCHAR"); }; @@ -324,8 +324,8 @@ void OEvoabFolderList::construct() // Buffersize abhaengig von der Filegroesse m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 : - nSize > 100000 ? 16384 : - nSize > 10000 ? 4096 : 1024); + nSize > 100000 ? 16384 : + nSize > 10000 ? 4096 : 1024); OSL_TRACE("OEvoabFolderList::construct()::m_pFileStream->Tell() = %d\n", nSize ); fillColumns(aAppLocale); @@ -336,7 +336,7 @@ void OEvoabFolderList::construct() //------------------------------------------------------------------ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols) { - (_rRow->get())[0] = m_nFilePos; // the "bookmark" + (_rRow->get())[0] = m_nFilePos; // the "bookmark" OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; // Felder: @@ -353,7 +353,7 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols) else { // length depending on the data type - sal_Int32 nType = m_aTypes[i]; + sal_Int32 nType = m_aTypes[i]; switch(nType) { case DataType::TIMESTAMP: @@ -384,10 +384,10 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols) { (_rRow->get())[i+1].setNull(); } - } break; + } break; case DataType::DOUBLE: case DataType::INTEGER: - case DataType::DECIMAL: // #99178# OJ + case DataType::DECIMAL: // #99178# OJ case DataType::NUMERIC: { sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter(); @@ -526,7 +526,7 @@ void OEvoabFolderList::initializeRow(sal_Int32 _nColumnCount) { if(!m_aRow.is()) { - m_aRow = new OValueVector(_nColumnCount); + m_aRow = new OValueVector(_nColumnCount); (m_aRow->get())[0].setBound(sal_True); ::std::for_each(m_aRow->get().begin()+1,m_aRow->get().end(),TSetBound(sal_False)); } diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx index db26ab8d030f..a7eb508d6756 100644 --- a/connectivity/source/drivers/evoab/LFolderList.hxx +++ b/connectivity/source/drivers/evoab/LFolderList.hxx @@ -2,7 +2,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 @@ -47,20 +47,20 @@ namespace connectivity class OEvoabConnection; - class OEvoabFolderList + class OEvoabFolderList { // maps a row postion to a file position - ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset - ::std::vector<sal_Int32> m_aPrecisions; // same as aboth - ::std::vector<sal_Int32> m_aScales; + ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset + ::std::vector<sal_Int32> m_aPrecisions; // same as aboth + ::std::vector<sal_Int32> m_aScales; QuotedTokenizedString m_aCurrentLine; ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xNumberFormatter; - sal_Int32 m_nFilePos; // aktuelle IResultSetHelper::Movement - SvStream* m_pFileStream; - OEvoabConnection* m_pConnection; - ::rtl::Reference<OSQLColumns> m_aColumns; - OValueRow m_aRow; - sal_Bool m_bIsNull; + sal_Int32 m_nFilePos; // aktuelle IResultSetHelper::Movement + SvStream* m_pFileStream; + OEvoabConnection* m_pConnection; + ::rtl::Reference<OSQLColumns> m_aColumns; + OValueRow m_aRow; + sal_Bool m_bIsNull; private: void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx index 2a5fa999587b..c8578fedb016 100644 --- a/connectivity/source/drivers/evoab/LNoException.cxx +++ b/connectivity/source/drivers/evoab/LNoException.cxx @@ -2,7 +2,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 @@ -41,8 +41,8 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) return 0; xub_StrLen nTokCount = 1; - BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token? - BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token? + BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen for( xub_StrLen i = 0; i < Len(); i++ ) @@ -53,8 +53,8 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) // Erstes Zeichen ein String-Delimiter? if ((*this).GetChar(i) == cStrDel) { - bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings! - continue; // dieses Zeichen ueberlesen! + bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings! + continue; // dieses Zeichen ueberlesen! } } @@ -65,7 +65,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) if ((i+1 < Len()) && ((*this).GetChar(i+1) == cStrDel)) { // Verdoppeltes String-Delimiter-Zeichen: - i++; // kein String-Ende, naechstes Zeichen ueberlesen. + i++; // kein String-Ende, naechstes Zeichen ueberlesen. } else { @@ -94,11 +94,11 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni xub_StrLen nLen = Len(); if ( nLen ) { - BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Erstes Zeichen ein String-Delimiter? if (bInString ) - ++nStartPos; // dieses Zeichen ueberlesen! + ++nStartPos; // dieses Zeichen ueberlesen! // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen for( xub_StrLen i = nStartPos; i < nLen; ++i ) { @@ -110,9 +110,9 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni if ((i+1 < nLen) && ((*this).GetChar(i+1) == cStrDel)) { // Verdoppeltes String-Delimiter-Zeichen: - ++i; // kein String-Ende, naechstes Zeichen ueberlesen. + ++i; // kein String-Ende, naechstes Zeichen ueberlesen. - _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String + _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String } else { @@ -122,7 +122,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni } else { - _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String + _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String } } @@ -138,7 +138,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni } else { - _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String + _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String } } } @@ -283,7 +283,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In aIter = m_aRowToFilePos.upper_bound(nOffset); if(aIter == m_aRowToFilePos.end()) { - m_nRowPos = m_aRowToFilePos.rbegin()->first; + m_nRowPos = m_aRowToFilePos.rbegin()->first; nCurPos = m_nFilePos = m_aRowToFilePos.rbegin()->second; while(m_nRowPos != nOffset) seekRow(IResultSetHelper::NEXT,1,nCurPos); @@ -291,8 +291,8 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In else { --aIter; - m_nRowPos = aIter->first; - m_nFilePos = aIter->second; + m_nRowPos = aIter->first; + m_nFilePos = aIter->second; m_pFileStream->Seek(m_nFilePos); if (m_pFileStream->IsEof() || !checkHeaderLine()) return sal_False; @@ -310,7 +310,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In if (m_pFileStream->IsEof()) return sal_False; - m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG) + m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG) m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding()); if (m_pFileStream->IsEof()) return sal_False; diff --git a/connectivity/source/drivers/evoab/LPreparedStatement.cxx b/connectivity/source/drivers/evoab/LPreparedStatement.cxx index fee0905e29ab..3c04d4b38ca7 100644 --- a/connectivity/source/drivers/evoab/LPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab/LPreparedStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LPreparedStatement.hxx b/connectivity/source/drivers/evoab/LPreparedStatement.hxx index 700768c686c0..13671dee9ce7 100644 --- a/connectivity/source/drivers/evoab/LPreparedStatement.hxx +++ b/connectivity/source/drivers/evoab/LPreparedStatement.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LResultSet.cxx b/connectivity/source/drivers/evoab/LResultSet.cxx index 79c291126f48..7bcc71d4074d 100644 --- a/connectivity/source/drivers/evoab/LResultSet.cxx +++ b/connectivity/source/drivers/evoab/LResultSet.cxx @@ -2,7 +2,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 @@ -45,10 +45,10 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// using namespace com::sun::star::container; -// using namespace com::sun::star::util; +// using namespace com::sun::star::container; +// using namespace com::sun::star::util; //------------------------------------------------------------------------------ -OEvoabResultSet::OEvoabResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) +OEvoabResultSet::OEvoabResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { @@ -93,7 +93,7 @@ Sequence< Type > SAL_CALL OEvoabResultSet::getTypes( ) throw( RuntimeException { Sequence< Type > aTypes = OResultSet::getTypes(); ::std::vector<Type> aOwnTypes; - aOwnTypes.reserve(aTypes.getLength()); + aOwnTypes.reserve(aTypes.getLength()); const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) @@ -116,7 +116,7 @@ Any SAL_CALL OEvoabResultSet::getBookmark( ) throw( SQLException, RuntimeExcep { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + return makeAny((sal_Int32)(m_aRow->get())[0]->getValue()); } @@ -125,7 +125,7 @@ sal_Bool SAL_CALL OEvoabResultSet::moveToBookmark( const Any& bookmark ) throw( { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; @@ -136,7 +136,7 @@ sal_Bool SAL_CALL OEvoabResultSet::moveRelativeToBookmark( const Any& bookmark, { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; diff --git a/connectivity/source/drivers/evoab/LResultSet.hxx b/connectivity/source/drivers/evoab/LResultSet.hxx index ebd64292e911..35d4dcd49194 100644 --- a/connectivity/source/drivers/evoab/LResultSet.hxx +++ b/connectivity/source/drivers/evoab/LResultSet.hxx @@ -2,7 +2,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 @@ -40,11 +40,11 @@ namespace connectivity class OEvoabResultSet; // these typedef's are only necessary for the compiler typedef ::cppu::ImplHelper1< ::com::sun::star::sdbcx::XRowLocate> OEvoabResultSet_BASE; - typedef file::OResultSet OEvoabResultSet_BASE2; - typedef ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet> OEvoabResultSet_BASE3; + typedef file::OResultSet OEvoabResultSet_BASE2; + typedef ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet> OEvoabResultSet_BASE3; - class OEvoabResultSet : public OEvoabResultSet_BASE2, + class OEvoabResultSet : public OEvoabResultSet_BASE2, public OEvoabResultSet_BASE, public OEvoabResultSet_BASE3 { @@ -57,7 +57,7 @@ namespace connectivity public: DECLARE_SERVICE_INFO(); - OEvoabResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator); + OEvoabResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/evoab/LServices.cxx b/connectivity/source/drivers/evoab/LServices.cxx index c99a9044994d..6619d90ebb96 100644 --- a/connectivity/source/drivers/evoab/LServices.cxx +++ b/connectivity/source/drivers/evoab/LServices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/evoab/LStatement.cxx b/connectivity/source/drivers/evoab/LStatement.cxx index a6350f11139b..0e29bcf1cb9b 100644 --- a/connectivity/source/drivers/evoab/LStatement.cxx +++ b/connectivity/source/drivers/evoab/LStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LStatement.hxx b/connectivity/source/drivers/evoab/LStatement.hxx index a870c4722034..e2454dc2a578 100644 --- a/connectivity/source/drivers/evoab/LStatement.hxx +++ b/connectivity/source/drivers/evoab/LStatement.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx index 898f445e1d3b..505337dacf88 100644 --- a/connectivity/source/drivers/evoab/LTable.cxx +++ b/connectivity/source/drivers/evoab/LTable.cxx @@ -2,7 +2,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,7 +42,7 @@ #include <comphelper/sequence.hxx> #include <svl/zforlist.hxx> #include <rtl/math.hxx> -#include <stdio.h> //sprintf +#include <stdio.h> //sprintf #include <comphelper/extract.hxx> #include <comphelper/numbers.hxx> #include "LDriver.hxx" @@ -267,7 +267,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) break; default: eType = DataType::VARCHAR; - nPrecision = 0; // nyi: Daten koennen aber laenger sein! + nPrecision = 0; // nyi: Daten koennen aber laenger sein! nScale = 0; aTypeName = ::rtl::OUString::createFromAscii("VARCHAR"); }; @@ -364,8 +364,8 @@ void OEvoabTable::construct() // Buffersize abhaengig von der Filegroesse m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 : - nSize > 100000 ? 16384 : - nSize > 10000 ? 4096 : 1024); + nSize > 100000 ? 16384 : + nSize > 10000 ? 4096 : 1024); OSL_TRACE("OEvoabTable::construct()::m_pFileStream->Tell() = %d\n", nSize ); fillColumns(aAppLocale); @@ -431,7 +431,7 @@ void OEvoabTable::refreshColumns() if(m_pColumns) m_pColumns->reFill(aVector); else - m_pColumns = new OEvoabColumns(this,m_aMutex,aVector); + m_pColumns = new OEvoabColumns(this,m_aMutex,aVector); OSL_TRACE("OEvoabTable::refreshColumns()::end\n" ); } @@ -453,10 +453,10 @@ Sequence< Type > SAL_CALL OEvoabTable::getTypes( ) throw(RuntimeException) const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XRename>*)0) || + if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || + *pBegin == ::getCppuType((const Reference<XRename>*)0) || *pBegin == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || + *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))) { aOwnTypes.push_back(*pBegin); @@ -469,10 +469,10 @@ Sequence< Type > SAL_CALL OEvoabTable::getTypes( ) throw(RuntimeException) // ------------------------------------------------------------------------- Any SAL_CALL OEvoabTable::queryInterface( const Type & rType ) throw(RuntimeException) { - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || - rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - rType == ::getCppuType((const Reference<XRename>*)0) || - rType == ::getCppuType((const Reference<XAlterTable>*)0) || + if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || + rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || + rType == ::getCppuType((const Reference<XRename>*)0) || + rType == ::getCppuType((const Reference<XAlterTable>*)0) || rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) return Any(); @@ -527,18 +527,18 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa else { // Laengen je nach Datentyp: - sal_Int32 nLen, + sal_Int32 nLen, nType = 0; if(bIsTable) { - nLen = m_aPrecisions[i]; - nType = m_aTypes[i]; + nLen = m_aPrecisions[i]; + nType = m_aTypes[i]; } else { Reference< XPropertySet> xColumn = *aIter; - xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; - xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; + xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; + xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; } switch(nType) { @@ -570,10 +570,10 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa { (_rRow->get())[i+1]->setNull(); } - } break; + } break; case DataType::DOUBLE: case DataType::INTEGER: - case DataType::DECIMAL: // #99178# OJ + case DataType::DECIMAL: // #99178# OJ case DataType::NUMERIC: { sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter(); @@ -824,7 +824,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In aIter = m_aRowToFilePos.upper_bound(nOffset); if(aIter == m_aRowToFilePos.end()) { - m_nRowPos = m_aRowToFilePos.rbegin()->first; + m_nRowPos = m_aRowToFilePos.rbegin()->first; nCurPos = m_nFilePos = m_aRowToFilePos.rbegin()->second; while(m_nRowPos != nOffset) seekRow(IResultSetHelper::NEXT,1,nCurPos); @@ -832,8 +832,8 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In else { --aIter; - m_nRowPos = aIter->first; - m_nFilePos = aIter->second; + m_nRowPos = aIter->first; + m_nFilePos = aIter->second; m_pFileStream->Seek(m_nFilePos); if (m_pFileStream->IsEof() || !checkHeaderLine()) return sal_False; @@ -851,7 +851,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In if (m_pFileStream->IsEof()) return sal_False; - m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG) + m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG) m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding()); if (m_pFileStream->IsEof()) return sal_False; diff --git a/connectivity/source/drivers/evoab/LTable.hxx b/connectivity/source/drivers/evoab/LTable.hxx index 998086be4985..f9659a927ce3 100644 --- a/connectivity/source/drivers/evoab/LTable.hxx +++ b/connectivity/source/drivers/evoab/LTable.hxx @@ -2,7 +2,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 @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #ifndef _CONNECTIVITY_EVOAB_LTABLE_HXX_ #define _CONNECTIVITY_EVOAB_LTABLE_HXX_ @@ -46,21 +46,21 @@ namespace connectivity typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed>, comphelper::UStringMixLess > OContainer; - class OEvoabTable : public OEvoabTable_BASE + class OEvoabTable : public OEvoabTable_BASE { private: // maps a row postion to a file position ::std::map<sal_Int32,sal_Int32> m_aRowToFilePos; - ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset - ::std::vector<sal_Int32> m_aPrecisions; // same as aboth - ::std::vector<sal_Int32> m_aScales; + ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset + ::std::vector<sal_Int32> m_aPrecisions; // same as aboth + ::std::vector<sal_Int32> m_aScales; QuotedTokenizedString m_aCurrentLine; ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xNumberFormatter; - sal_Int32 m_nRowPos; - sal_Int32 m_nMaxRowCount; // will be set if stream is once eof - ::std::vector< ::rtl::OUString> m_aColumnRawNames; - sal_Bool setColumnAliases(); - void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); + sal_Int32 m_nRowPos; + sal_Int32 m_nMaxRowCount; // will be set if stream is once eof + ::std::vector< ::rtl::OUString> m_aColumnRawNames; + sal_Bool setColumnAliases(); + void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); sal_Bool checkHeaderLine(); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet> isUniqueByColumnName(const ::rtl::OUString& _rColName); @@ -69,7 +69,7 @@ namespace connectivity virtual void refreshIndexes(); public: - // DECLARE_CTY_DEFAULTS( OFlatTable_BASE); + // DECLARE_CTY_DEFAULTS( OFlatTable_BASE); OEvoabTable( sdbcx::OCollection* _pTables,OEvoabConnection* _pConnection); OEvoabTable( sdbcx::OCollection* _pTables,OEvoabConnection* _pConnection, const ::rtl::OUString& _Name, diff --git a/connectivity/source/drivers/evoab/LTables.cxx b/connectivity/source/drivers/evoab/LTables.cxx index ff27bf54ffad..c104f9c3151d 100644 --- a/connectivity/source/drivers/evoab/LTables.cxx +++ b/connectivity/source/drivers/evoab/LTables.cxx @@ -2,7 +2,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 @@ -49,7 +49,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; -namespace starutil = ::com::sun::star::util; +namespace starutil = ::com::sun::star::util; sdbcx::ObjectType OEvoabTables::createObject(const ::rtl::OUString& _rName) { diff --git a/connectivity/source/drivers/evoab/LTables.hxx b/connectivity/source/drivers/evoab/LTables.hxx index ef2c3f838da3..c91957aa9bbd 100644 --- a/connectivity/source/drivers/evoab/LTables.hxx +++ b/connectivity/source/drivers/evoab/LTables.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/evoab.xcu b/connectivity/source/drivers/evoab/evoab.xcu index c54c9856cad9..4c8e3cc43ab3 100755 --- a/connectivity/source/drivers/evoab/evoab.xcu +++ b/connectivity/source/drivers/evoab/evoab.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab/evoab.xml b/connectivity/source/drivers/evoab/evoab.xml index f2bafcffdada..669eb109addd 100644 --- a/connectivity/source/drivers/evoab/evoab.xml +++ b/connectivity/source/drivers/evoab/evoab.xml @@ -12,7 +12,7 @@ <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - <service-dependency> ... </service-dependency> + <service-dependency> ... </service-dependency> </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx index d670735d2144..1767ec1bcf5a 100644 --- a/connectivity/source/drivers/evoab2/EApi.cxx +++ b/connectivity/source/drivers/evoab2/EApi.cxx @@ -2,7 +2,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 @@ -74,7 +74,7 @@ typedef void (*SymbolFunc) (void); SYM_MAP( e_book_query_to_string ), SYM_MAP( e_book_query_field_exists ), SYM_MAP( e_source_group_peek_base_uri) - }; + }; #undef SYM_MAP static bool @@ -120,13 +120,13 @@ bool EApiInit() // hjs: SOLARDEF does no longer exist please lookup the required // defines in a regular compile line /* - * Test code - enable & + * Test code - enable & * * Compile with ( after source LinuxIntelEnv.Set.sh ) gcc $SOLARDEF -I $SOLARVER/$UPD/$INPATH/inc \ -I. `pkg-config --cflags --libs gobject-2.0` \ -L $SOLARVER/$UPD/$INPATH/lib -luno_sal -lstdc++ EApi.cxx - */ + */ int main( int argc, char **argv) { diff --git a/connectivity/source/drivers/evoab2/EApi.h b/connectivity/source/drivers/evoab2/EApi.h index 90422b7e01f8..c089fda927c3 100644 --- a/connectivity/source/drivers/evoab2/EApi.h +++ b/connectivity/source/drivers/evoab2/EApi.h @@ -2,7 +2,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 @@ -57,7 +57,7 @@ typedef void EContact; typedef int EContactField; EAPI_EXTERN const char *(*e_contact_field_name) ( EContactField field_id); -EAPI_EXTERN gpointer (*e_contact_get) (EContact *contact, EContactField field_id); +EAPI_EXTERN gpointer (*e_contact_get) (EContact *contact, EContactField field_id); EAPI_EXTERN gconstpointer (*e_contact_get_const) (EContact *contact, EContactField field_id); // e-source.h typedef void ESource; @@ -90,14 +90,14 @@ typedef enum { typedef void EBook; typedef void EBookQuery; -EAPI_EXTERN EBook *(*e_book_new) (ESource *source, +EAPI_EXTERN EBook *(*e_book_new) (ESource *source, GError **error); -EAPI_EXTERN gboolean (*e_book_open) (EBook *book, +EAPI_EXTERN gboolean (*e_book_open) (EBook *book, gboolean only_if_exists, GError **error); -EAPI_EXTERN const char *(*e_book_get_uri) (EBook *book); +EAPI_EXTERN const char *(*e_book_get_uri) (EBook *book); EAPI_EXTERN ESource *(*e_book_get_source)(EBook *book); EAPI_EXTERN gboolean (*e_book_get_addressbooks) (ESourceList **addressbook_sources, diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index 0ed28663f72b..4698a6aab0ea 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx @@ -2,7 +2,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 @@ -63,7 +63,7 @@ void OEvoabCatalog::refreshTables() { Reference< XRow > xRow(xResult,UNO_QUERY); ::rtl::OUString aName; - + while(xResult->next()) { aName = xRow->getString(3); diff --git a/connectivity/source/drivers/evoab2/NCatalog.hxx b/connectivity/source/drivers/evoab2/NCatalog.hxx index d55f218fd2df..b08b4e46a1c6 100644 --- a/connectivity/source/drivers/evoab2/NCatalog.hxx +++ b/connectivity/source/drivers/evoab2/NCatalog.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx index cfed31d54422..53818b7507a7 100644 --- a/connectivity/source/drivers/evoab2/NColumns.cxx +++ b/connectivity/source/drivers/evoab2/NColumns.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NColumns.hxx b/connectivity/source/drivers/evoab2/NColumns.hxx index 8c98e9deaf17..34c01e911f8b 100644 --- a/connectivity/source/drivers/evoab2/NColumns.hxx +++ b/connectivity/source/drivers/evoab2/NColumns.hxx @@ -2,7 +2,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 @@ -39,13 +39,13 @@ namespace connectivity class OEvoabColumns : public sdbcx::OCollection { protected: - OEvoabTable* m_pTable; + OEvoabTable* m_pTable; virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException); public: - OEvoabColumns( OEvoabTable* _pTable, + OEvoabColumns( OEvoabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector ) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector), diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index a49f2683a106..caf6d11d36b9 100644 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NConnection.hxx b/connectivity/source/drivers/evoab2/NConnection.hxx index c61d938ccf2c..2b25b76013ab 100644 --- a/connectivity/source/drivers/evoab2/NConnection.hxx +++ b/connectivity/source/drivers/evoab2/NConnection.hxx @@ -2,7 +2,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 @@ -39,7 +39,7 @@ #include "TConnection.hxx" #include <cppuhelper/weakref.hxx> #include <osl/module.h> -#include "EApi.h" +#include "EApi.h" namespace connectivity { @@ -48,21 +48,21 @@ namespace connectivity namespace SDBCAddress { typedef enum { - Unknown = 0, + Unknown = 0, EVO_LOCAL = 1, - EVO_LDAP = 2, - EVO_GWISE = 3 + EVO_LDAP = 2, + EVO_GWISE = 3 } sdbc_address_type; } - - typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding - + + typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding + class OEvoabConnection :public OConnection_BASE ,public connectivity::OSubComponent<OEvoabConnection, OConnection_BASE> { friend class connectivity::OSubComponent<OEvoabConnection, OConnection_BASE>; - private: + private: const OEvoabDriver& m_rDriver; SDBCAddress::sdbc_address_type m_eSDBCAddressType; ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > @@ -80,18 +80,18 @@ namespace connectivity inline void setPassword( rtl::OString aStr ) { m_aPassword = aStr; } // own methods inline const OEvoabDriver& getDriver() const { return m_rDriver; } - + SDBCAddress::sdbc_address_type getSDBCAddressType() const { return m_eSDBCAddressType;} void setSDBCAddressType(SDBCAddress::sdbc_address_type _eSDBCAddressType) {m_eSDBCAddressType = _eSDBCAddressType;} - + // OComponentHelper virtual void SAL_CALL disposing(void); // XInterface virtual void SAL_CALL release() throw(); - + // XServiceInfo DECLARE_SERVICE_INFO(); - + // XConnection virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -112,7 +112,7 @@ namespace connectivity virtual sal_Int32 SAL_CALL getTransactionIsolation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTypeMap( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTypeMap( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - + // XCloseable virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // XWarningsSupplier diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 9112c5c0dba9..c6dc8bbf7afb 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -69,7 +69,7 @@ namespace connectivity static ColumnProperty **pFields=NULL; static guint nFields = 0; - static const char *pBlackList[] = + static const char *pBlackList[] = { "id", "list-show-addresses", @@ -89,11 +89,11 @@ namespace connectivity return evo_addr; } - static void + static void splitColumn (ColumnProperty **pToBeFields) { const SplitEvoColumns* evo_addr( get_evo_addr() ); - for (int i = 0; i < OTHER_ZIP; i++) + for (int i = 0; i < OTHER_ZIP; i++) { pToBeFields[nFields] = g_new0(ColumnProperty,1); pToBeFields[nFields]->bIsSplittedValue = true; @@ -135,7 +135,7 @@ namespace connectivity break; } } - if( bAdd ) + if( bAdd ) { pToBeFields[nFields]= g_new0(ColumnProperty,1); pToBeFields[nFields]->bIsSplittedValue=false; @@ -147,7 +147,7 @@ namespace connectivity break; } } - + splitColumn(pToBeFields); pFields = pToBeFields; } @@ -192,7 +192,7 @@ namespace connectivity guint findEvoabField(const rtl::OUString& aColName) { - guint nRet = (guint)-1; + guint nRet = (guint)-1; sal_Bool bFound = sal_False; initFields(); for (guint i=0;(i < nFields) && !bFound;i++) @@ -236,24 +236,24 @@ namespace connectivity return aName; } - void + void free_column_resources() { - for (int i=nFields-1;i > 0;i--) + for (int i=nFields-1;i > 0;i--) { - if (pFields && pFields[i] ) + if (pFields && pFields[i] ) { - if (pFields[i]->pField) + if (pFields[i]->pField) g_param_spec_unref(pFields[i]->pField); g_free(pFields[i]); } } - if(pFields) + if(pFields) { g_free(pFields); pFields=NULL; } - + } @@ -277,11 +277,11 @@ ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const static ODatabaseMetaDataResultSet::ORows aRows; ODatabaseMetaDataResultSet::ORow aRow(19); aRows.clear(); - + // **************************************************** // Some entries in a row never change, so set them now // **************************************************** - + // Catalog aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("")); // Schema @@ -333,7 +333,7 @@ ODatabaseMetaDataResultSet::ORows& OEvoabDatabaseMetaData::getColumnRows( const return aRows ; } // ------------------------------------------------------------------------- -::rtl::OUString OEvoabDatabaseMetaData::impl_getCatalogSeparator_throw( ) +::rtl::OUString OEvoabDatabaseMetaData::impl_getCatalogSeparator_throw( ) { return ::rtl::OUString(); } @@ -393,7 +393,7 @@ sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxTableNameLength( ) throw(SQLEx return 0;// 0 means no limit } // ------------------------------------------------------------------------- -sal_Int32 OEvoabDatabaseMetaData::impl_getMaxTablesInSelect_throw( ) +sal_Int32 OEvoabDatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { // We only support a single table return 1; @@ -415,7 +415,7 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesLowerCaseIdentifiers( ) throw(S return sal_False; } // ------------------------------------------------------------------------- -sal_Bool OEvoabDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool OEvoabDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return sal_False; } @@ -461,7 +461,7 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsNonNullableColumns( ) throw(S return aVal; } // ------------------------------------------------------------------------- -::rtl::OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw( ) +::rtl::OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " ::rtl::OUString aVal = ::rtl::OUString::createFromAscii("\""); @@ -1031,7 +1031,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) throw ODatabaseMetaDataResultSet::ORow aRow; aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue()); aRow.push_back(new ORowSetValueDecorator(sTableTypes[i])); - + // bound row aRows.push_back(aRow); } @@ -1042,8 +1042,8 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) throw // ------------------------------------------------------------------------- Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) { - /* - * Return the proper type information required by evo driver + /* + * Return the proper type information required by evo driver */ ODatabaseMetaDataResultSet* pResultSet = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTypeInfo); @@ -1107,20 +1107,20 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( ODatabaseMetaDataResultSet* pResult = new ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eTableTypes); Reference< XResultSet > xRef = pResult; - + // check if any type is given // when no types are given then we have to return all tables e.g. TABLE - + const ::rtl::OUString aTable(::rtl::OUString::createFromAscii("TABLE")); - + sal_Bool bTableFound = sal_True; sal_Int32 nLength = types.getLength(); if(nLength) { bTableFound = sal_False; - + const ::rtl::OUString* pBegin = types.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + nLength; + const ::rtl::OUString* pEnd = pBegin + nLength; for(;pBegin != pEnd;++pBegin) { if(*pBegin == aTable) @@ -1134,7 +1134,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( return xRef; ODatabaseMetaDataResultSet::ORows aRows; - + ESourceList *pSourceList; if( !e_book_get_addressbooks (&pSourceList, NULL) ) pSourceList = NULL; @@ -1149,17 +1149,17 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( case SDBCAddress::EVO_GWISE: if (0==strncmp( "groupwise://", p, 11 )) break; - else + else continue; case SDBCAddress::EVO_LOCAL: if (0==strncmp( "file://", p, 6 )) break; else continue; - case SDBCAddress::EVO_LDAP: + case SDBCAddress::EVO_LDAP: if (0==strncmp( "ldap://", p, 6 )) break; - else + else continue; case SDBCAddress::Unknown: break; diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx index d6faab52665e..a0fe1788e29a 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx @@ -2,7 +2,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 @@ -41,7 +41,7 @@ namespace connectivity { class EvoContacts; - + //************************************************************** //************ Class: OEvoabDatabaseMetaData //************************************************************** @@ -71,15 +71,15 @@ namespace connectivity rtl::OUString getFieldTypeName(guint nCol) ; rtl::OUString getFieldName(guint nCol) ; guint findEvoabField(const rtl::OUString& aColName); - + void free_column_resources(); class OEvoabDatabaseMetaData : public ODatabaseMetaDataBase { - OEvoabConnection* m_pConnection; - + OEvoabConnection* m_pConnection; + ODatabaseMetaDataResultSet::ORows& getColumnRows( const ::rtl::OUString& columnNamePattern ); - + protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw(); // cached database information @@ -98,11 +98,11 @@ namespace connectivity virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ); virtual ~OEvoabDatabaseMetaData(); - public: + public: inline OEvoabConnection* getOwnConnection() const { return m_pConnection; } - + OEvoabDatabaseMetaData(OEvoabConnection* _pCon); - + // as I mentioned before this interface is really BIG // XDatabaseMetaData virtual sal_Bool SAL_CALL allProceduresAreCallable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -126,10 +126,10 @@ namespace connectivity virtual sal_Bool SAL_CALL storesUpperCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL storesLowerCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL storesMixedCaseIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - + virtual sal_Bool SAL_CALL storesUpperCaseQuotedIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL storesLowerCaseQuotedIdentifiers( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - + virtual ::rtl::OUString SAL_CALL getSQLKeywords( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getNumericFunctions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getStringFunctions( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/evoab2/NDebug.cxx b/connectivity/source/drivers/evoab2/NDebug.cxx index 612bb9319437..92e360425b98 100644 --- a/connectivity/source/drivers/evoab2/NDebug.cxx +++ b/connectivity/source/drivers/evoab2/NDebug.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NDebug.hxx b/connectivity/source/drivers/evoab2/NDebug.hxx index e522c7873971..77f7269c82a1 100644 --- a/connectivity/source/drivers/evoab2/NDebug.hxx +++ b/connectivity/source/drivers/evoab2/NDebug.hxx @@ -2,7 +2,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 @@ -35,9 +35,9 @@ #ifdef DEBUG void evo_traceStringMessage( const sal_Char* pFormat, const ::rtl::OUString& rString ); -# define EVO_TRACE_STRING( pFormat, rString ) evo_traceStringMessage( pFormat, rString ) +# define EVO_TRACE_STRING( pFormat, rString ) evo_traceStringMessage( pFormat, rString ) #else -# define EVO_TRACE_STRING( pFormat, rString ) ((void)0) +# define EVO_TRACE_STRING( pFormat, rString ) ((void)0) #endif #endif // CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index 5a71080036df..4b5cd5550d8d 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -2,7 +2,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 @@ -67,13 +67,13 @@ OEvoabDriver::~OEvoabDriver() void OEvoabDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); - + // when driver will be destroied so all our connections have to be destroied as well for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i) { Reference< XComponent > xComp(i->get(), UNO_QUERY); if (xComp.is()) { - try { + try { xComp->dispose(); } catch (com::sun::star::lang::DisposedException e) { @@ -99,7 +99,7 @@ rtl::OUString OEvoabDriver::getImplementationName_Static( ) throw(RuntimeExcept //------------------------------------------------------------------ Sequence< ::rtl::OUString > OEvoabDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { - // which service is supported + // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< ::rtl::OUString > aSNS( 1 ); aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver"); @@ -138,15 +138,15 @@ Reference< XConnection > SAL_CALL OEvoabDriver::connect( const ::rtl::OUString& ::osl::MutexGuard aGuard( m_aMutex ); if (ODriver_BASE::rBHelper.bDisposed) throw DisposedException(); - + if ( ! acceptsURL(url) ) return NULL; - + OEvoabConnection* pCon = new OEvoabConnection( *this ); pCon->construct(url,info); Reference< XConnection > xCon = pCon; m_xConnections.push_back(WeakReferenceHelper(*pCon)); - + return xCon; } // -------------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/evoab2/NDriver.hxx b/connectivity/source/drivers/evoab2/NDriver.hxx index 2b9a2cf0f395..c8917bffa68d 100644 --- a/connectivity/source/drivers/evoab2/NDriver.hxx +++ b/connectivity/source/drivers/evoab2/NDriver.hxx @@ -2,7 +2,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 @@ -35,66 +35,66 @@ #include "connectivity/CommonTools.hxx" #include <osl/module.h> -#define EVOAB_EVOLUTION_SCHEMA "evolution" +#define EVOAB_EVOLUTION_SCHEMA "evolution" /*In Future, when seperate schema is required for ldap, groupwise*/ -#define EVOAB_LDAP_SCHEMA "ldap" -#define EVOAB_GWISE_SCHEMA "groupwise" +#define EVOAB_LDAP_SCHEMA "ldap" +#define EVOAB_GWISE_SCHEMA "groupwise" -#define EVOAB_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.evoab.OEvoabDriver" +#define EVOAB_DRIVER_IMPL_NAME "com.sun.star.comp.sdbc.evoab.OEvoabDriver" namespace connectivity { namespace evoab { - + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OEvoabDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ); - - - typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver, + + + typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver, ::com::sun::star::lang::XServiceInfo > ODriver_BASE; - + class OEvoabDriver : public ODriver_BASE { - + protected: - ::osl::Mutex m_aMutex; - connectivity::OWeakRefArray m_xConnections; + ::osl::Mutex m_aMutex; + connectivity::OWeakRefArray m_xConnections; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; - + public: OEvoabDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory); virtual ~OEvoabDriver(); - + // OComponentHelper virtual void SAL_CALL disposing(void); - + // XInterface static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException); static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException); - + // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); - - + + // XDriver virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL acceptsURL( const ::rtl::OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException); - + public: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & getMSFactory(void) const { return m_xFactory; } - - // static methods + + // static methods static sal_Bool acceptsURL_Stat( const ::rtl::OUString& url ); }; } - + } #endif //_CONNECTIVITY_EVOAB_DRIVER_HXX_ diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx index 3f1ef4b572b6..1aadfbf031fe 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.hxx b/connectivity/source/drivers/evoab2/NPreparedStatement.hxx index 1df469d0c8fb..af0e56729fe3 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.hxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.hxx @@ -2,7 +2,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 @@ -45,7 +45,7 @@ namespace connectivity { class OBoundParam; - typedef ::cppu::ImplHelper5< ::com::sun::star::sdbc::XPreparedStatement, + typedef ::cppu::ImplHelper5< ::com::sun::star::sdbc::XPreparedStatement, ::com::sun::star::sdbc::XParameters, ::com::sun::star::sdbc::XResultSetMetaDataSupplier, ::com::sun::star::sdbc::XMultipleResults, @@ -57,27 +57,27 @@ namespace connectivity protected: struct Parameter { - ::com::sun::star::uno::Any aValue; - sal_Int32 nDataType; + ::com::sun::star::uno::Any aValue; + sal_Int32 nDataType; - Parameter(const ::com::sun::star::uno::Any& rValue, - sal_Int32 rDataType) : aValue(rValue),nDataType(rDataType) + Parameter(const ::com::sun::star::uno::Any& rValue, + sal_Int32 rDataType) : aValue(rValue),nDataType(rDataType) { } }; - ::std::vector< Parameter> m_aParameters; + ::std::vector< Parameter> m_aParameters; //==================================================================== // Data attributes //==================================================================== // our SQL statement - ::rtl::OUString m_sSqlStatement; + ::rtl::OUString m_sSqlStatement; // the EBookQuery we're working with QueryData m_aQueryData; // our meta data - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; protected: virtual ~OEvoabPreparedStatement(); diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 874b70d8a0ea..4bea08aab6d3 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -2,7 +2,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 @@ -75,7 +75,7 @@ using namespace com::sun::star::io; namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; //------------------------------------------------------------------------------ -::rtl::OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException) \ +::rtl::OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeException) \ { return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.evoab.ResultSet"); } diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx index 36c1f7d359f0..0ffe5a7e5b86 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.hxx +++ b/connectivity/source/drivers/evoab2/NResultSet.hxx @@ -2,7 +2,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 @@ -70,15 +70,15 @@ namespace connectivity ,public ::comphelper::OPropertyContainer ,public ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet> { - + protected: OCommonStatement* m_pStatement; OEvoabConnection* m_pConnection; - ::com::sun::star::uno::WeakReferenceHelper m_aStatement; + ::com::sun::star::uno::WeakReferenceHelper m_aStatement; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; ::dbtools::WarningsContainer m_aWarnings; - + bool m_bWasNull; // <properties> sal_Int32 m_nFetchSize; @@ -88,7 +88,7 @@ namespace connectivity // </properties> // Data & iteration - GList *m_pContacts; + GList *m_pContacts; sal_Int32 m_nIndex; sal_Int32 m_nLength; EContact *getCur() @@ -101,22 +101,22 @@ namespace connectivity virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; // OPropertySetHelper virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); - + // you can't delete objects of this type virtual ~OEvoabResultSet(); public: DECLARE_SERVICE_INFO(); - + OEvoabResultSet( OCommonStatement *pStmt, OEvoabConnection *pConnection ); void construct( const QueryData& _rData ); OEvoabConnection * getConnection() { return m_pConnection; } - + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *() { return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this); } - + // ::cppu::OComponentHelper virtual void SAL_CALL disposing(void); // XInterface diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index 2265fa0f72cd..ed727feb0727 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx @@ -2,7 +2,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 @@ -40,7 +40,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::sdbc; -OEvoabResultSetMetaData::OEvoabResultSetMetaData(const ::rtl::OUString& _aTableName) +OEvoabResultSetMetaData::OEvoabResultSetMetaData(const ::rtl::OUString& _aTableName) : m_aTableName(_aTableName), m_aEvoabFields() { @@ -117,7 +117,7 @@ sal_Bool SAL_CALL OEvoabResultSetMetaData::isCaseSensitive( sal_Int32 /*nColumnN ::rtl::OUString SAL_CALL OEvoabResultSetMetaData::getColumnLabel( sal_Int32 nColumnNum ) throw(SQLException, RuntimeException) { sal_uInt32 nField = m_aEvoabFields[nColumnNum - 1]; - const ColumnProperty *pSpecs = getField(nField); + const ColumnProperty *pSpecs = getField(nField); GParamSpec *pSpec = pSpecs->pField; rtl::OUString aLabel; diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx index 29e432737dac..6906549dece9 100644 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx @@ -2,7 +2,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 @@ -26,8 +26,8 @@ * ************************************************************************/ -#ifndef _CONNECTIVITY_EVOAB_RESULTSETMETADATA_HXX_ -#define _CONNECTIVITY_EVOAB_RESULTSETMETADATA_HXX_ +#ifndef _CONNECTIVITY_EVOAB_RESULTSETMETADATA_HXX_ +#define _CONNECTIVITY_EVOAB_RESULTSETMETADATA_HXX_ #include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <cppuhelper/implbase1.hxx> @@ -43,7 +43,7 @@ namespace connectivity //************************************************************** typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> OResultSetMetaData_BASE; - class OEvoabResultSetMetaData : public OResultSetMetaData_BASE + class OEvoabResultSetMetaData : public OResultSetMetaData_BASE { ::rtl::OUString m_aTableName; ::std::vector<sal_Int32> m_aEvoabFields; @@ -55,12 +55,12 @@ namespace connectivity void setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(::com::sun::star::sdbc::SQLException); inline sal_uInt32 fieldAtColumn(sal_Int32 columnIndex) const { return m_aEvoabFields[columnIndex - 1]; } - inline sal_Int32 getFieldSize() const + inline sal_Int32 getFieldSize() const {return m_aEvoabFields.size();} /// Avoid ambigous cast error from the compiler. inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw() { return this; } - + virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx index cfdce80a9885..e01013fdde1c 100644 --- a/connectivity/source/drivers/evoab2/NServices.cxx +++ b/connectivity/source/drivers/evoab2/NServices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index af914aae7e87..43bbaf2fcfa4 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -2,7 +2,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 @@ -139,7 +139,7 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< XFastPropertySet > *)0 ), ::getCppuType( (const Reference< XPropertySet > *)0 )); diff --git a/connectivity/source/drivers/evoab2/NStatement.hxx b/connectivity/source/drivers/evoab2/NStatement.hxx index d12956e96008..b5adfeb0a761 100644 --- a/connectivity/source/drivers/evoab2/NStatement.hxx +++ b/connectivity/source/drivers/evoab2/NStatement.hxx @@ -2,7 +2,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 @@ -160,20 +160,20 @@ namespace connectivity ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created OEvoabResultSet *m_pResultSet; OEvoabConnection *m_pConnection; - connectivity::OSQLParser m_aParser; + connectivity::OSQLParser m_aParser; connectivity::OSQLParseTreeIterator m_aSQLIterator; connectivity::OSQLParseNode *m_pParseTree; // <properties> - ::rtl::OUString m_aCursorName; - sal_Int32 m_nMaxFieldSize; - sal_Int32 m_nMaxRows; - sal_Int32 m_nQueryTimeOut; - sal_Int32 m_nFetchSize; - sal_Int32 m_nResultSetType; - sal_Int32 m_nFetchDirection; - sal_Int32 m_nResultSetConcurrency; - sal_Bool m_bEscapeProcessing; + ::rtl::OUString m_aCursorName; + sal_Int32 m_nMaxFieldSize; + sal_Int32 m_nMaxRows; + sal_Int32 m_nQueryTimeOut; + sal_Int32 m_nFetchSize; + sal_Int32 m_nResultSetType; + sal_Int32 m_nFetchDirection; + sal_Int32 m_nResultSetConcurrency; + sal_Bool m_bEscapeProcessing; // </properties> ::cppu::OBroadcastHelper& rBHelper; diff --git a/connectivity/source/drivers/evoab2/NTable.cxx b/connectivity/source/drivers/evoab2/NTable.cxx index 3d4538401f65..30807ab4f50a 100644 --- a/connectivity/source/drivers/evoab2/NTable.cxx +++ b/connectivity/source/drivers/evoab2/NTable.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NTable.hxx b/connectivity/source/drivers/evoab2/NTable.hxx index 8843f5fc157c..169191d63032 100644 --- a/connectivity/source/drivers/evoab2/NTable.hxx +++ b/connectivity/source/drivers/evoab2/NTable.hxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ namespace connectivity OEvoabConnection* m_pConnection; public: - OEvoabTable( sdbcx::OCollection* _pTables, + OEvoabTable( sdbcx::OCollection* _pTables, OEvoabConnection* _pConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index 88bce2c7d869..a41d13db5a2a 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/NTables.hxx b/connectivity/source/drivers/evoab2/NTables.hxx index 8654eb83997d..001454a18dd3 100644 --- a/connectivity/source/drivers/evoab2/NTables.hxx +++ b/connectivity/source/drivers/evoab2/NTables.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/evoab2/evoab.xml b/connectivity/source/drivers/evoab2/evoab.xml index f0abcc963b8d..fbf309cbf03c 100644 --- a/connectivity/source/drivers/evoab2/evoab.xml +++ b/connectivity/source/drivers/evoab2/evoab.xml @@ -11,7 +11,7 @@ <language>c++</language> <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> - <service-dependency> ... </service-dependency> + <service-dependency> ... </service-dependency> </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> diff --git a/connectivity/source/drivers/evoab2/evoab2.xcu b/connectivity/source/drivers/evoab2/evoab2.xcu index a7c81d9c75e8..bda1fb8648f9 100755 --- a/connectivity/source/drivers/evoab2/evoab2.xcu +++ b/connectivity/source/drivers/evoab2/evoab2.xcu @@ -2,7 +2,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 @@ -49,7 +49,7 @@ <prop oor:name="DriverTypeDisplayName" oor:type="xs:string"> <value xml:lang="en-US">Evolution LDAP</value> </prop> - <node oor:name="Features"> + <node oor:name="Features"> <node oor:name="EscapeDateTime" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> <value>true</value> diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index fbf54140dc34..5144486ac51b 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -2,7 +2,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 @@ -102,13 +102,13 @@ Sequence< Type > SAL_CALL OFileCatalog::getTypes( ) throw(RuntimeException) Sequence< Type > aTypes = OFileCatalog_BASE::getTypes(); ::std::vector<Type> aOwnTypes; - aOwnTypes.reserve(aTypes.getLength()); + aOwnTypes.reserve(aTypes.getLength()); const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XGroupsSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XUsersSupplier>*)0) || + if(!(*pBegin == ::getCppuType((const Reference<XGroupsSupplier>*)0) || + *pBegin == ::getCppuType((const Reference<XUsersSupplier>*)0) || *pBegin == ::getCppuType((const Reference<XViewsSupplier>*)0))) { aOwnTypes.push_back(*pBegin); diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx index b1f08c38db98..fb25c29700ea 100644 --- a/connectivity/source/drivers/file/FColumns.cxx +++ b/connectivity/source/drivers/file/FColumns.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 14ce3ddf5841..4d2df42be6c1 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ using namespace ::ucbhelper; using rtl::OUString; typedef connectivity::OMetaConnection OConnection_BASE; // -------------------------------------------------------------------------------- -OConnection::OConnection(OFileDriver* _pDriver) +OConnection::OConnection(OFileDriver* _pDriver) : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) ,m_pDriver(_pDriver) ,m_bClosed(sal_False) @@ -380,10 +380,10 @@ void OConnection::disposing() ::osl::MutexGuard aGuard(m_aMutex); OConnection_BASE::disposing(); - m_bClosed = sal_True; + m_bClosed = sal_True; m_xDir.clear(); m_xContent.clear(); - m_xCatalog = WeakReference< XTablesSupplier>(); + m_xCatalog = WeakReference< XTablesSupplier>(); dispose_ChildImpl(); } diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 91443bab7ed8..470ad0c6fdfe 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -206,7 +206,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( bTableFound = sal_False; const ::rtl::OUString* pBegin = types.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + nLength; + const ::rtl::OUString* pEnd = pBegin + nLength; for(;pBegin != pEnd;++pBegin) { if(*pBegin == aTable) @@ -400,7 +400,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLExcepti return 0; } // ------------------------------------------------------------------------- -sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) +sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::impl_getMaxTablesInSelect_throw" ); return 1; @@ -418,10 +418,10 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( Reference< XTablesSupplier > xTabSup = m_pConnection->createCatalog(); - if( xTabSup.is()) + if( xTabSup.is()) { - Reference< XNameAccess> xNames = xTabSup->getTables(); - Sequence< ::rtl::OUString > aNames = xNames->getElementNames(); + Reference< XNameAccess> xNames = xTabSup->getTables(); + Sequence< ::rtl::OUString > aNames = xNames->getElementNames(); const ::rtl::OUString* pBegin = aNames.getConstArray(); const ::rtl::OUString* pEnd = pBegin + aNames.getLength(); for(;pBegin != pEnd;++pBegin) @@ -494,7 +494,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return sal_False; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" ); return sal_False; @@ -567,7 +567,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return sal_True; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::impl_isCatalogAtStart_throw" ); return sal_True; diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx index 792cb2d8bddb..a7a1bcc4d7aa 100644 --- a/connectivity/source/drivers/file/FDateFunctions.cxx +++ b/connectivity/source/drivers/file/FDateFunctions.cxx @@ -2,7 +2,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 @@ -41,7 +41,7 @@ ORowSetValue OOp_DayOfWeek::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + sal_Int32 nRet = 0; ::com::sun::star::util::Date aD = lhs; Date aDate(aD.Day,aD.Month,aD.Year); @@ -79,7 +79,7 @@ ORowSetValue OOp_DayOfMonth::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Date aD = lhs; return static_cast<sal_Int16>(aD.Day); } @@ -88,7 +88,7 @@ ORowSetValue OOp_DayOfYear::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Date aD = lhs; Date aDate(aD.Day,aD.Month,aD.Year); return static_cast<sal_Int16>(aDate.GetDayOfYear()); @@ -98,7 +98,7 @@ ORowSetValue OOp_Month::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Date aD = lhs; return static_cast<sal_Int16>(aD.Month); } @@ -107,7 +107,7 @@ ORowSetValue OOp_DayName::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::rtl::OUString sRet; ::com::sun::star::util::Date aD = lhs; Date aDate(aD.Day,aD.Month,aD.Year); @@ -145,7 +145,7 @@ ORowSetValue OOp_MonthName::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::rtl::OUString sRet; ::com::sun::star::util::Date aD = lhs; switch(aD.Month) @@ -194,7 +194,7 @@ ORowSetValue OOp_Quarter::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + sal_Int32 nRet = 1; ::com::sun::star::util::Date aD = lhs; Date aDate(aD.Day,aD.Month,aD.Year); @@ -216,7 +216,7 @@ ORowSetValue OOp_Week::operate(const ::std::vector<ORowSetValue>& lhs) const ::com::sun::star::util::Date aD = lhs[nSize-1]; Date aDate(aD.Day,aD.Month,aD.Year); - + sal_Int16 nStartDay = SUNDAY; if ( nSize == 2 && !lhs[0].isNull() ) nStartDay = lhs[0]; @@ -228,7 +228,7 @@ ORowSetValue OOp_Year::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Date aD = lhs; return static_cast<sal_Int16>(aD.Year); } @@ -237,7 +237,7 @@ ORowSetValue OOp_Hour::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Time aT = lhs; return static_cast<sal_Int16>(aT.Hours); } @@ -246,7 +246,7 @@ ORowSetValue OOp_Minute::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Time aT = lhs; return static_cast<sal_Int16>(aT.Minutes); } @@ -255,7 +255,7 @@ ORowSetValue OOp_Second::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + ::com::sun::star::util::Time aT = lhs; return static_cast<sal_Int16>(aT.Seconds); } @@ -264,7 +264,7 @@ ORowSetValue OOp_CurDate::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( !lhs.empty() ) return ORowSetValue(); - + Date aCurDate; return ::com::sun::star::util::Date(aCurDate.GetDay(),aCurDate.GetMonth(),aCurDate.GetYear()); } @@ -273,7 +273,7 @@ ORowSetValue OOp_CurTime::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( !lhs.empty() ) return ORowSetValue(); - + Time aCurTime; return ::com::sun::star::util::Time(aCurTime.Get100Sec(),aCurTime.GetSec(),aCurTime.GetMin(),aCurTime.GetHour()); } @@ -282,7 +282,7 @@ ORowSetValue OOp_Now::operate(const ::std::vector<ORowSetValue>& lhs) const { if ( !lhs.empty() ) return ORowSetValue(); - + DateTime aCurTime; return ::com::sun::star::util::DateTime(aCurTime.Get100Sec(),aCurTime.GetSec(),aCurTime.GetMin(),aCurTime.GetHour(), aCurTime.GetDay(),aCurTime.GetMonth(),aCurTime.GetYear()); diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index c41a839c3fef..f04bd3f4890f 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx index cf1b32c4edc3..e092fb5ce83a 100644 --- a/connectivity/source/drivers/file/FNoException.cxx +++ b/connectivity/source/drivers/file/FNoException.cxx @@ -2,7 +2,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 @@ -56,7 +56,7 @@ OPredicateInterpreter::~OPredicateInterpreter() delete m_aStack.top(); m_aStack.pop(); } - // m_aStack.clear(); + // m_aStack.clear(); } // ----------------------------------------------------------------------------- void OPredicateCompiler::Clean() @@ -75,7 +75,7 @@ void OSQLAnalyzer::clean() // ----------------------------------------------------------------------------- void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow) { - OCodeList& rCodeList = m_aCompiler->m_aCodeList; + OCodeList& rCodeList = m_aCompiler->m_aCodeList; for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end();++aIter) { OOperandParam* pParam = PTR_CAST(OOperandParam,(*aIter)); diff --git a/connectivity/source/drivers/file/FNumericFunctions.cxx b/connectivity/source/drivers/file/FNumericFunctions.cxx index 031905a01999..7800eb6b682f 100644 --- a/connectivity/source/drivers/file/FNumericFunctions.cxx +++ b/connectivity/source/drivers/file/FNumericFunctions.cxx @@ -2,7 +2,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 @@ -40,7 +40,7 @@ ORowSetValue OOp_Abs::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + double nVal(lhs); if ( nVal < 0 ) nVal *= -1.0; @@ -51,14 +51,14 @@ ORowSetValue OOp_Sign::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + sal_Int32 nRet = 0; double nVal(lhs); if ( nVal < 0 ) nRet = -1; else if ( nVal > 0 ) nRet = 1; - + return nRet; } //------------------------------------------------------------------ @@ -74,7 +74,7 @@ ORowSetValue OOp_Floor::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return floor((double)lhs); } // ----------------------------------------------------------------------------- @@ -82,7 +82,7 @@ ORowSetValue OOp_Ceiling::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + double nVal(lhs); return ceil(nVal); } @@ -105,7 +105,7 @@ ORowSetValue OOp_Exp::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + double nVal(lhs); return exp(nVal); } @@ -114,7 +114,7 @@ ORowSetValue OOp_Ln::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() || static_cast<double>(lhs) < 0.0 ) return lhs; - + double nVal(lhs); nVal = log(nVal); if ( rtl::math::isNan(nVal) ) @@ -128,7 +128,7 @@ ORowSetValue OOp_Log::operate(const ::std::vector<ORowSetValue>& lhs) const return ORowSetValue(); size_t nSize = lhs.size(); double nVal = log( (double)lhs[nSize-1] ); - + if ( nSize == 2 && !lhs[0].isNull() ) nVal /= log((double)lhs[0]); @@ -142,7 +142,7 @@ ORowSetValue OOp_Log10::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() || static_cast<double>(lhs) < 0.0 ) return lhs; - + double nVal = log((double)lhs); if ( rtl::math::isNan(nVal) ) return ORowSetValue(); @@ -162,7 +162,7 @@ ORowSetValue OOp_Sqrt::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + double nVal = sqrt((double)lhs); if ( rtl::math::isNan(nVal) ) return ORowSetValue(); @@ -178,7 +178,7 @@ ORowSetValue OOp_Cos::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return cos((double)lhs); } // ----------------------------------------------------------------------------- @@ -186,7 +186,7 @@ ORowSetValue OOp_Sin::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return sin((double)lhs); } // ----------------------------------------------------------------------------- @@ -194,7 +194,7 @@ ORowSetValue OOp_Tan::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return tan((double)lhs); } // ----------------------------------------------------------------------------- @@ -202,7 +202,7 @@ ORowSetValue OOp_ACos::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return acos((double)lhs); } // ----------------------------------------------------------------------------- @@ -210,7 +210,7 @@ ORowSetValue OOp_ASin::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return asin((double)lhs); } // ----------------------------------------------------------------------------- @@ -218,7 +218,7 @@ ORowSetValue OOp_ATan::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + return atan((double)lhs); } // ----------------------------------------------------------------------------- @@ -234,7 +234,7 @@ ORowSetValue OOp_Degrees::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + double nLhs = lhs; return nLhs*180*(1.0/3.141592653589793116); } @@ -243,7 +243,7 @@ ORowSetValue OOp_Radians::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) return lhs; - + double nLhs = lhs; return nLhs*3.141592653589793116*(1.0/180.0); } diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index cb3fb1f78445..700a8b9a6940 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -2,7 +2,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 @@ -139,7 +139,7 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt { //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::queryInterface" ); Any aRet = OStatement_BASE2::queryInterface(rType); - return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType, + return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType, static_cast< XPreparedStatement*>(this), static_cast< XParameters*>(this), static_cast< XResultSetMetaDataSupplier*>(this)); @@ -368,7 +368,7 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any ) ); ::dbtools::throwGenericSQLException(sError,*this); } - // setObject (parameterIndex, x, sqlType, 0); + // setObject (parameterIndex, x, sqlType, 0); } // ------------------------------------------------------------------------- @@ -502,11 +502,11 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere // Typ, Precision, Scale ... der angegebenen Column verwenden, // denn dieser Column wird der Wert zugewiesen bzw. mit dieser // Column wird der Wert verglichen. - _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= eType; - _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nPrecision; - _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nScale; - _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNullable; - _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sParameterName; + _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= eType; + _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nPrecision; + _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nScale; + _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNullable; + _xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sParameterName; } Reference<XPropertySet> xParaColumn = new connectivity::parse::OParseColumn(sParameterName @@ -540,8 +540,8 @@ void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode AddParameter(_pParameter,xProp); } } - // else - // AddParameter(_pParameter,xProp); + // else + // AddParameter(_pParameter,xProp); } // ------------------------------------------------------------------------- void OPreparedStatement::describeParameter() @@ -551,7 +551,7 @@ void OPreparedStatement::describeParameter() scanParameter(m_pParseTree,aParseNodes); if ( !aParseNodes.empty() ) { - // m_xParamColumns = new OSQLColumns(); + // m_xParamColumns = new OSQLColumns(); const OSQLTables& xTabs = m_aSQLIterator.getTables(); if( !xTabs.empty() ) { @@ -585,12 +585,12 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult) { UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j); if (nParameter == SQL_NO_PARAMETER) - continue; // dieser AssignValue ist kein Parameter + continue; // dieser AssignValue ist kein Parameter ++nParaCount; // ab hier ist der Parameter gueltig // Parameter ersetzen. Wenn Parameter nicht verfuegbar, - // Value auf NULL setzen. - // (*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter]; + // Value auf NULL setzen. + // (*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter]; } if (m_aParameterRow.is() && (m_xParamColumns->get().size()+1) != m_aParameterRow->get().size() ) diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 054fe31424b8..72736cf0b836 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -2,7 +2,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 @@ -77,7 +77,7 @@ using namespace com::sun::star::container; // Maximale Anzahl von Rows, die mit ORDER BY sortiert durchlaufen werden koennen: #if defined (WIN) -#define MAX_KEYSET_SIZE 0x3ff0 // Etwas weniger als ein Segment, damit +#define MAX_KEYSET_SIZE 0x3ff0 // Etwas weniger als ein Segment, damit // noch Platz fuer Memory Debug-Informationen #else #define MAX_KEYSET_SIZE 0x40000 // 256K @@ -96,7 +96,7 @@ namespace IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.drivers.file.ResultSet","com.sun.star.sdbc.ResultSet"); DBG_NAME( file_OResultSet ) // ------------------------------------------------------------------------- -OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIterator) : OResultSet_BASE(m_aMutex) +OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIterator) : OResultSet_BASE(m_aMutex) ,::comphelper::OPropertyContainer(OResultSet_BASE::rBHelper) ,m_aAssignValues(NULL) ,m_pEvaluationKeySet(NULL) @@ -134,11 +134,11 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::OResultSet" ); DBG_CTOR( file_OResultSet, NULL ); osl_incrementInterlockedCount( &m_refCount ); - m_bIsCount = (m_pParseTree && - m_pParseTree->count() > 2 && - SQL_ISRULE(m_pParseTree->getChild(2),scalar_exp_commalist) && - SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0),derived_column) && - SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0)->getChild(0),general_set_fct) && + m_bIsCount = (m_pParseTree && + m_pParseTree->count() > 2 && + SQL_ISRULE(m_pParseTree->getChild(2),scalar_exp_commalist) && + SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0),derived_column) && + SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0)->getChild(0),general_set_fct) && m_pParseTree->getChild(2)->getChild(0)->getChild(0)->count() == 4 ); @@ -160,9 +160,9 @@ OResultSet::~OResultSet() void OResultSet::construct() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::construct" ); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, 0,&m_nFetchSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, 0,&m_nFetchSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY,&m_nResultSetType, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, 0,&m_nFetchDirection, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, 0,&m_nFetchDirection, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY,PropertyAttribute::READONLY,&m_nResultSetConcurrency, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); } // ------------------------------------------------------------------------- @@ -174,7 +174,7 @@ void OResultSet::disposing(void) ::osl::MutexGuard aGuard(m_aMutex); m_xStatement.clear(); m_xMetaData.clear(); - m_pParseTree = NULL; + m_pParseTree = NULL; m_xColNames.clear(); m_xColumns = NULL; m_xParamColumns = NULL; @@ -215,7 +215,7 @@ Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw(RuntimeException) //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::getTypes" ); ::osl::MutexGuard aGuard( m_aMutex ); - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -258,7 +258,7 @@ void OResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc { //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::checkIndex" ); if ( columnIndex <= 0 - // || columnIndex > (sal_Int32)m_xColumns->size() + // || columnIndex > (sal_Int32)m_xColumns->size() || columnIndex >= m_nColumnCount ) ::dbtools::throwInvalidIndexException(*this); } @@ -541,7 +541,7 @@ sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeExceptio } // ------------------------------------------------------------------------- sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException) -{ ::osl::MutexGuard aGuard( m_aMutex ); +{ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); @@ -671,7 +671,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException) if(!m_pTable || m_pTable->isReadOnly()) lcl_throwError(STR_TABLE_READONLY,*this); - + m_bRowUpdated = m_pTable->UpdateRow(*m_aInsertRow, m_aRow,m_xColsIdx); *(m_aInsertRow->get())[0] = (sal_Int32)(m_aRow->get())[0]->getValue(); @@ -709,10 +709,10 @@ void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeExcept checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - m_bInserted = sal_False; - m_bRowUpdated = sal_False; - m_bRowInserted = sal_False; - m_bRowDeleted = sal_False; + m_bInserted = sal_False; + m_bRowUpdated = sal_False; + m_bRowInserted = sal_False; + m_bRowDeleted = sal_False; if(m_aInsertRow.is()) { @@ -735,7 +735,7 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti if(!m_pTable || m_pTable->isReadOnly()) lcl_throwError(STR_TABLE_READONLY,*this); - m_bInserted = sal_True; + m_bInserted = sal_True; OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin()+1; for(;aIter != m_aInsertRow->get().end();++aIter) @@ -935,7 +935,7 @@ again: return sal_False; } - if (!bEvaluate) // Laeuft keine Auswertung, dann nur Ergebniszeile fuellen + if (!bEvaluate) // Laeuft keine Auswertung, dann nur Ergebniszeile fuellen { m_pTable->fetchRow(m_aRow,rTableCols, sal_True,bRetrieveData); } @@ -943,10 +943,10 @@ again: { m_pTable->fetchRow(m_aEvaluateRow, rTableCols, sal_True,bRetrieveData || bHasRestriction); - if ( (!m_bShowDeleted && m_aEvaluateRow->isDeleted()) + if ( (!m_bShowDeleted && m_aEvaluateRow->isDeleted()) || (bHasRestriction && //!bShowDeleted && m_aEvaluateRow->isDeleted() ||// keine Anzeige von geloeschten Saetzen - !m_pSQLAnalyzer->evaluateRestriction())) // Auswerten der Bedingungen - { // naechsten Satz auswerten + !m_pSQLAnalyzer->evaluateRestriction())) // Auswerten der Bedingungen + { // naechsten Satz auswerten // aktuelle Zeile loeschen im Keyset if (m_pEvaluationKeySet) { @@ -984,7 +984,7 @@ again: } else { - // aStatus.Set(SQL_STAT_NO_DATA_FOUND); + // aStatus.Set(SQL_STAT_NO_DATA_FOUND); return sal_False; } // Nochmal probieren ... @@ -993,7 +993,7 @@ again: } // Evaluate darf nur gesetzt sein, - // wenn der Keyset weiter aufgebaut werden soll + // wenn der Keyset weiter aufgebaut werden soll if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount() && (m_pFileSet.is() || m_pSortIndex) && bEvaluate) { @@ -1004,7 +1004,7 @@ again: } else if (m_pFileSet.is()) { - // OSL_ENSURE(!m_pFileSet->IsFrozen() , "Falsche CursorPosition!"); + // OSL_ENSURE(!m_pFileSet->IsFrozen() , "Falsche CursorPosition!"); sal_uInt32 nBookmarkValue = Abs((sal_Int32)(m_aEvaluateRow->get())[0]->getValue()); m_pFileSet->get().push_back(nBookmarkValue); } @@ -1096,7 +1096,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, // b.) Ein KeySet besteht und m_nRowPos > m_pFileSet->size() if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen() { - // aStatus.Set(SQL_STAT_NO_DATA_FOUND); + // aStatus.Set(SQL_STAT_NO_DATA_FOUND); goto Error; } else @@ -1119,7 +1119,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, if (!m_pFileSet->get().empty()) { m_aFileSetIter = m_pFileSet->get().end()-1; - // m_pFileSet->SeekPos(m_pFileSet->size()-1); + // m_pFileSet->SeekPos(m_pFileSet->size()-1); m_pTable->seekRow(IResultSetHelper::BOOKMARK, *m_aFileSetIter, m_nFilePos); } sal_Bool bOK = sal_True; @@ -1130,7 +1130,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, { if (m_nRowPos >= (INT32)m_pEvaluationKeySet->size()) return sal_False; - // aStatus.Set(SQL_STAT_NO_DATA_FOUND); + // aStatus.Set(SQL_STAT_NO_DATA_FOUND); else if (m_nRowPos == 0) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); @@ -1159,14 +1159,14 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); } } - else if (!m_pFileSet->isFrozen()) // keinen gueltigen Satz gefunden + else if (!m_pFileSet->isFrozen()) // keinen gueltigen Satz gefunden { //m_pFileSet->Freeze(); m_pFileSet->setFrozen(); - // DELETEZ(m_pEvaluationKeySet); + // DELETEZ(m_pEvaluationKeySet); m_pEvaluationKeySet = NULL; - // aStatus.Set(SQL_STAT_NO_DATA_FOUND); + // aStatus.Set(SQL_STAT_NO_DATA_FOUND); goto Error; } } @@ -1249,12 +1249,12 @@ Error: m_nRowPos = -1; break; case IResultSetHelper::BOOKMARK: - m_nRowPos = nTempPos; // vorherige Position + m_nRowPos = nTempPos; // vorherige Position } } - // delete pGuard; + // delete pGuard; // rMode = (!bShowDeleted && aStatus.IsSuccessful() && m_aRow->isDeleted()) ? // keine Anzeige von geloeschten Saetzen - // OCursor::SQL_MOD_INVALID : OCursor::SQL_MOD_NONE; + // OCursor::SQL_MOD_INVALID : OCursor::SQL_MOD_NONE; return sal_False; } // ------------------------------------------------------------------------- @@ -1267,7 +1267,7 @@ void OResultSet::sortRows() // Und diese Feld ist indiziert, dann den Index ausnutzen Reference<XIndexesSupplier> xIndexSup; m_pTable->queryInterface(::getCppuType((const Reference<XIndexesSupplier>*)0)) >>= xIndexSup; - // Reference<XIndexesSupplier> xIndexSup(m_pTable,UNO_QUERY); + // Reference<XIndexesSupplier> xIndexSup(m_pTable,UNO_QUERY); Reference<XIndexAccess> xIndexes; if(xIndexSup.is()) { @@ -1293,7 +1293,7 @@ void OResultSet::sortRows() } } } - + OSortIndex::TKeyTypeVector eKeyType(m_aOrderbyColumnNumber.size()); ::std::vector<sal_Int32>::iterator aOrderByIter = m_aOrderbyColumnNumber.begin(); for (::std::vector<sal_Int16>::size_type i=0;aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i) @@ -1330,13 +1330,13 @@ void OResultSet::sortRows() } (m_aEvaluateRow->get())[*aOrderByIter]->setBound(sal_True); } - + m_pSortIndex = new OSortIndex(eKeyType,m_aOrderbyAscending); if (m_pEvaluationKeySet) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); - + while (m_aEvaluateIter != m_pEvaluationKeySet->end()) { ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); @@ -1349,14 +1349,14 @@ void OResultSet::sortRows() { } } - + // Sortiertes Keyset erzeugen - // DELETEZ(m_pEvaluationKeySet); + // DELETEZ(m_pEvaluationKeySet); m_pEvaluationKeySet = NULL; m_pFileSet = NULL; m_pFileSet = m_pSortIndex->CreateKeySet(); - // if(!bDistinct) - // SetRowCount(pFileSet->count()); + // if(!bDistinct) + // SetRowCount(pFileSet->count()); DELETEZ(m_pSortIndex); // Nun kann ueber den Index sortiert zugegriffen werden. } @@ -1372,7 +1372,7 @@ BOOL OResultSet::OpenImpl() const OSQLTables& xTabs = m_aSQLIterator.getTables(); if ((xTabs.begin() == xTabs.end()) || !xTabs.begin()->second.is()) lcl_throwError(STR_QUERY_TOO_COMPLEX,*this); - + if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() ) lcl_throwError(STR_QUERY_MORE_TABLES,*this); @@ -1400,7 +1400,7 @@ BOOL OResultSet::OpenImpl() // Neuen Index aufbauen: m_pFileSet = NULL; - // DELETEZ(m_pEvaluationKeySet); + // DELETEZ(m_pEvaluationKeySet); // An den Anfang positionieren m_nRowPos = -1; @@ -1417,7 +1417,7 @@ BOOL OResultSet::OpenImpl() { if(m_xColumns->get().size() > 1) lcl_throwError(STR_QUERY_COMPLEX_COUNT,*this); - + m_nRowCountResult = 0; // Vorlaeufig einfach ueber alle Datensaetze iterieren und // dabei die Aktionen bearbeiten (bzw. einfach nur zaehlen): @@ -1451,7 +1451,7 @@ BOOL OResultSet::OpenImpl() // nRowCount, also die Anzahl der Rows in der Ergebnismenge, ist bei dieser // Anfrage = 1! m_pEvaluationKeySet = NULL; - // DELETEZ(m_pEvaluationKeySet); + // DELETEZ(m_pEvaluationKeySet); } } else @@ -1459,9 +1459,9 @@ BOOL OResultSet::OpenImpl() BOOL bDistinct = FALSE; BOOL bWasSorted = FALSE; OSQLParseNode *pDistinct = m_pParseTree->getChild(1); - ::std::vector<sal_Int32> aOrderbyColumnNumberSave; + ::std::vector<sal_Int32> aOrderbyColumnNumberSave; ::std::vector<TAscendingOrder> aOrderbyAscendingSave; - + if (pDistinct && pDistinct->getTokenID() == SQL_TOKEN_DISTINCT ) { // Sort on all columns, saving original order for later @@ -1472,11 +1472,11 @@ BOOL OResultSet::OpenImpl() aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), m_aOrderbyAscending.end()); bWasSorted = TRUE; } - + // the first column is the bookmark column ::std::vector<sal_Int32>::iterator aColStart = (m_aColMapping.begin()+1); ::std::copy(aColStart, m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber)); -// m_aOrderbyColumnNumber.assign(aColStart, m_aColMapping.end()); +// m_aOrderbyColumnNumber.assign(aColStart, m_aColMapping.end()); m_aOrderbyAscending.assign(m_aColMapping.size()-1, SQL_ASC); bDistinct = TRUE; } @@ -1500,19 +1500,19 @@ BOOL OResultSet::OpenImpl() } } OSL_ENSURE(m_pFileSet.is(),"Kein KeySet vorhanden! :-("); - + if(bDistinct && m_pFileSet.is()) // sicher ist sicher { OValueRow aSearchRow = new OValueVector(m_aRow->get().size()); OValueRefVector::Vector::iterator aRowIter = m_aRow->get().begin(); OValueVector::Vector::iterator aSearchIter = aSearchRow->get().begin(); - for ( ++aRowIter,++aSearchIter; // the first column is the bookmark column + for ( ++aRowIter,++aSearchIter; // the first column is the bookmark column aRowIter != m_aRow->get().end(); ++aRowIter,++aSearchIter) aSearchIter->setBound((*aRowIter)->isBound()); size_t nMaxRow = m_pFileSet->get().size(); - + if (nMaxRow) { #if OSL_DEBUG_LEVEL > 1 @@ -1520,16 +1520,16 @@ BOOL OResultSet::OpenImpl() #endif INT32 nPos; INT32 nKey; - + for( size_t j = nMaxRow-1; j > 0; --j) { - nPos = (m_pFileSet->get())[j]; + nPos = (m_pFileSet->get())[j]; ExecuteRow(IResultSetHelper::BOOKMARK,nPos,FALSE); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); { // copy row values OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin(); OValueVector::Vector::iterator copyTo = aSearchRow->get().begin(); - for ( ++copyFrom,++copyTo; // the first column is the bookmark column + for ( ++copyFrom,++copyTo; // the first column is the bookmark column copyFrom != m_aSelectRow->get().end(); ++copyFrom,++copyTo) *copyTo = *(*copyFrom); @@ -1542,14 +1542,14 @@ BOOL OResultSet::OpenImpl() m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin(); OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin(); - for ( ++loopInRow,++existentInSearchRow; // the first column is the bookmark column + for ( ++loopInRow,++existentInSearchRow; // the first column is the bookmark column loopInRow != m_aSelectRow->get().end(); ++loopInRow,++existentInSearchRow) { if ( (*loopInRow)->isBound() && !( *(*loopInRow) == *existentInSearchRow) ) break; } - + if(loopInRow == m_aSelectRow->get().end()) (m_pFileSet->get())[j] = 0; // Rows match -- Mark for deletion by setting key to 0 #if OSL_DEBUG_LEVEL > 1 @@ -1567,7 +1567,7 @@ BOOL OResultSet::OpenImpl() // Re-sort on original requested order m_aOrderbyColumnNumber = aOrderbyColumnNumberSave; m_aOrderbyAscending.assign(aOrderbyAscendingSave.begin(), aOrderbyAscendingSave.end()); - + TIntVector aEvaluationKeySet(m_pFileSet->get()); m_pEvaluationKeySet = &aEvaluationKeySet; sortRows(); @@ -1579,10 +1579,10 @@ BOOL OResultSet::OpenImpl() ::std::sort(m_pFileSet->get().begin(),m_pFileSet->get().end()); } } - // SetRowCount(m_pFileSet->count()); + // SetRowCount(m_pFileSet->count()); } } - } break; + } break; case SQL_STATEMENT_UPDATE: case SQL_STATEMENT_DELETE: @@ -1620,10 +1620,10 @@ BOOL OResultSet::OpenImpl() // Ergebnis von COUNT(*) in nRowCountResult merken. // nRowCount, also die Anzahl der Rows in der Ergebnismenge, ist bei dieser // Anfrage = 1! - // DELETEZ(m_pEvaluationKeySet); + // DELETEZ(m_pEvaluationKeySet); m_pEvaluationKeySet = NULL; } - // SetRowCount(1); + // SetRowCount(1); break; case SQL_STATEMENT_INSERT: m_nRowCountResult = 0; @@ -1688,14 +1688,14 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, Reference<XPropertySet> xTableColumn; ::rtl::OUString sTableColumnName, sSelectColumnRealName; - const ::rtl::OUString sName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); - const ::rtl::OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME); - const ::rtl::OUString sType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); + const ::rtl::OUString sName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); + const ::rtl::OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME); + const ::rtl::OUString sType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); typedef ::std::map<OSQLColumns::Vector::iterator,sal_Bool> IterMap; IterMap aSelectIters; OValueRefVector::Vector::iterator aRowIter = _rRow->get().begin()+1; - for (sal_Int32 i=0; // the first column is the bookmark column + for (sal_Int32 i=0; // the first column is the bookmark column aRowIter != _rRow->get().end(); ++i, ++aRowIter ) @@ -1713,7 +1713,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, // look if we have such a select column // TODO: would like to have a O(log n) search here ... - for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin(); + for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin(); aIter != _rxColumns->get().end(); ++aIter ) @@ -1757,7 +1757,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, Reference<XNameAccess> xNameAccess(_xNames,UNO_QUERY); Sequence< ::rtl::OUString > aSelectColumns = xNameAccess->getElementNames(); - for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin(); + for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin(); aIter != _rxColumns->get().end(); ++aIter ) @@ -1774,7 +1774,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, aSelectIters.insert(IterMap::value_type(aIter,sal_True)); sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1; const ::rtl::OUString* pBegin = aSelectColumns.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + aSelectColumns.getLength(); + const ::rtl::OUString* pEnd = pBegin + aSelectColumns.getLength(); for(sal_Int32 i=0;pBegin != pEnd;++pBegin,++i) { if ( aCase(*pBegin, sSelectColumnRealName) ) @@ -1845,7 +1845,7 @@ void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::initializeRow" ); if(!_rRow.is()) { - _rRow = new OValueRefVector(_nColumnCount); + _rRow = new OValueRefVector(_nColumnCount); (_rRow->get())[0]->setBound(sal_True); ::std::for_each(_rRow->get().begin()+1,_rRow->get().end(),TSetRefBound(sal_False)); } @@ -1884,7 +1884,7 @@ sal_Bool OResultSet::isRowDeleted() const void SAL_CALL OResultSet::disposing( const EventObject& Source ) throw (RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::disposing" ); - // Reference<XInterface> xInt = m_pTable; + // Reference<XInterface> xInt = m_pTable; Reference<XPropertySet> xProp = m_pTable; if(m_pTable && Source.Source == xProp) { diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx index 6d75d6f67357..fc45a15afb99 100644 --- a/connectivity/source/drivers/file/FResultSetMetaData.cxx +++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx @@ -2,7 +2,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 @@ -47,7 +47,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const ::rtl::OUString& _aTableName,OFileTable* _pTable) +OResultSetMetaData::OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const ::rtl::OUString& _aTableName,OFileTable* _pTable) :m_aTableName(_aTableName) ,m_xColumns(_rxColumns) ,m_pTable(_pTable) diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 0d504a71d2be..1ccb031bba5f 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -2,7 +2,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 @@ -95,16 +95,16 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) sal_Int32 nAttrib = 0; - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME), PROPERTY_ID_CURSORNAME, nAttrib,&m_aCursorName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE), PROPERTY_ID_MAXFIELDSIZE, nAttrib,&m_nMaxFieldSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS), PROPERTY_ID_MAXROWS, nAttrib,&m_nMaxRows, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT), PROPERTY_ID_QUERYTIMEOUT, nAttrib,&m_nQueryTimeOut, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, nAttrib,&m_nFetchSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, nAttrib,&m_nResultSetType, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, nAttrib,&m_nFetchDirection, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING),PROPERTY_ID_ESCAPEPROCESSING, nAttrib,&m_bEscapeProcessing,::getCppuBooleanType()); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CURSORNAME), PROPERTY_ID_CURSORNAME, nAttrib,&m_aCursorName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXFIELDSIZE), PROPERTY_ID_MAXFIELDSIZE, nAttrib,&m_nMaxFieldSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_MAXROWS), PROPERTY_ID_MAXROWS, nAttrib,&m_nMaxRows, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_QUERYTIMEOUT), PROPERTY_ID_QUERYTIMEOUT, nAttrib,&m_nQueryTimeOut, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, nAttrib,&m_nFetchSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, nAttrib,&m_nResultSetType, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, nAttrib,&m_nFetchDirection, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ESCAPEPROCESSING),PROPERTY_ID_ESCAPEPROCESSING, nAttrib,&m_bEscapeProcessing,::getCppuBooleanType()); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, nAttrib,&m_nResultSetConcurrency, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, nAttrib,&m_nResultSetConcurrency, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL))); } // ----------------------------------------------------------------------------- OStatement_Base::~OStatement_Base() @@ -216,7 +216,7 @@ void OStatement_Base::reset() throw (SQLException) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::reset" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + clearWarnings (); @@ -233,7 +233,7 @@ void OStatement_Base::clearMyResultSet () throw (SQLException) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::clearMyResultSet " ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + try { Reference<XCloseable> xCloseable; @@ -254,7 +254,7 @@ void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::setWarning " ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + m_aLastWarning = ex; } @@ -265,7 +265,7 @@ Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeExcepti RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::getWarnings" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + return makeAny(m_aLastWarning); } // ------------------------------------------------------------------------- @@ -326,7 +326,7 @@ Reference< XResultSet > SAL_CALL OStatement::executeQuery( const ::rtl::OUString { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + construct(sql); Reference< XResultSet > xRS; OResultSet* pResult = createResultSet(); @@ -335,7 +335,7 @@ Reference< XResultSet > SAL_CALL OStatement::executeQuery( const ::rtl::OUString m_xResultSet = Reference<XResultSet>(pResult); pResult->OpenImpl(); - + return xRS; } // ------------------------------------------------------------------------- @@ -348,14 +348,14 @@ sal_Int32 SAL_CALL OStatement::executeUpdate( const ::rtl::OUString& sql ) throw { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - + construct(sql); OResultSet* pResult = createResultSet(); Reference< XResultSet > xRS = pResult; initializeResultSet(pResult); pResult->OpenImpl(); - + return pResult->getRowCountResult(); } @@ -421,7 +421,7 @@ void OStatement_Base::anylizeSQL() } } //------------------------------------------------------------------ -void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, +void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, OSQLParseNode* pAscendingDescending) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::setOrderbyColumn" ); @@ -431,19 +431,19 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, else if (pColumnRef->count() == 3) { // Nur die Table Range-Variable darf hier vorkommen: -// if (!(pColumnRef->getChild(0)->getTokenValue() == aTableRange)) -// { -// aStatus.Set(SQL_STAT_ERROR, -// String::CreateFromAscii("S1000"), -// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_INVALID_RANGE_VAR))), -// 0, String() ); - // return; - // } +// if (!(pColumnRef->getChild(0)->getTokenValue() == aTableRange)) +// { +// aStatus.Set(SQL_STAT_ERROR, +// String::CreateFromAscii("S1000"), +// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_INVALID_RANGE_VAR))), +// 0, String() ); + // return; + // } pColumnRef->getChild(2)->parseNodeToStr( aColumnName, getOwnConnection(), NULL, sal_False, sal_False ); } else { - // aStatus.SetStatementTooComplex(); + // aStatus.SetStatementTooComplex(); throw SQLException(); } @@ -505,7 +505,7 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException, default: break; } - + // at this moment we support only one table per select statement Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(xTabs.begin()->second,UNO_QUERY); if(xTunnel.is()) @@ -518,15 +518,15 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException, } OSL_ENSURE(m_pTable,"No table!"); if ( m_pTable ) - m_xColNames = m_pTable->getColumns(); + m_xColNames = m_pTable->getColumns(); Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY); // set the binding of the resultrow - m_aRow = new OValueRefVector(xNames->getCount()); + m_aRow = new OValueRefVector(xNames->getCount()); (m_aRow->get())[0]->setBound(sal_True); ::std::for_each(m_aRow->get().begin()+1,m_aRow->get().end(),TSetRefBound(sal_False)); // set the binding of the resultrow - m_aEvaluateRow = new OValueRefVector(xNames->getCount()); + m_aEvaluateRow = new OValueRefVector(xNames->getCount()); (m_aEvaluateRow->get())[0]->setBound(sal_True); ::std::for_each(m_aEvaluateRow->get().begin()+1,m_aEvaluateRow->get().end(),TSetRefBound(sal_False)); @@ -538,7 +538,7 @@ void OStatement_Base::construct(const ::rtl::OUString& sql) throw(SQLException, // create the column mapping createColumnMapping(); - m_pSQLAnalyzer = createAnalyzer(); + m_pSQLAnalyzer = createAnalyzer(); Reference<XIndexesSupplier> xIndexSup(xTunnel,UNO_QUERY); if(xIndexSup.is()) @@ -554,7 +554,7 @@ void OStatement_Base::createColumnMapping() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::createColumnMapping" ); // initialize the column index map (mapping select columns to table columns) - ::rtl::Reference<connectivity::OSQLColumns> xColumns = m_aSQLIterator.getSelectColumns(); + ::rtl::Reference<connectivity::OSQLColumns> xColumns = m_aSQLIterator.getSelectColumns(); m_aColMapping.resize(xColumns->get().size() + 1); for (sal_Int32 i=0; i<(sal_Int32)m_aColMapping.size(); ++i) m_aColMapping[i] = i; @@ -579,7 +579,7 @@ void OStatement_Base::initializeResultSet(OResultSet* _pResult) _pResult->setSelectRow(m_aSelectRow); m_pSQLAnalyzer->bindSelectRow(m_aRow); - m_pEvaluationKeySet = m_pSQLAnalyzer->bindEvaluationRow(m_aEvaluateRow); // Werte im Code des Compilers setzen + m_pEvaluationKeySet = m_pSQLAnalyzer->bindEvaluationRow(m_aEvaluateRow); // Werte im Code des Compilers setzen _pResult->setEvaluationKeySet(m_pEvaluationKeySet); } // ----------------------------------------------------------------------------- @@ -720,7 +720,7 @@ void OStatement_Base::GetAssignValues() OSL_ENSURE(pComp->getNodeType() == SQL_NODE_EQUAL,"OResultSet: pComp->getNodeType() != SQL_NODE_COMPARISON"); if (pComp->getTokenValue().toChar() != '=') { - // aStatus.SetInvalidStatement(); + // aStatus.SetInvalidStatement(); throwFunctionSequenceException(*this); } @@ -757,7 +757,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam parseParamterElem(aColumnName,pRow_Value_Constructor_Elem); else { - // aStatus.SetStatementTooComplex(); + // aStatus.SetStatementTooComplex(); throwFunctionSequenceException(*this); } } @@ -776,15 +776,15 @@ void OStatement_Base::SetAssignValue(const String& aColumnName, if (!xCol.is()) { // Diese Column gibt es nicht! -// aStatus.Set(SQL_STAT_ERROR, -// String::CreateFromAscii("S0022"), -// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_COLUMN_NOT_FOUND))), -// 0, String() ); +// aStatus.Set(SQL_STAT_ERROR, +// String::CreateFromAscii("S0022"), +// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_COLUMN_NOT_FOUND))), +// 0, String() ); throwFunctionSequenceException(*this); } // Value an die Row mit den zuzuweisenden Werten binden: - // const ODbVariantRef& xValue = (*aAssignValues)[pFileColumn->GetId()]; + // const ODbVariantRef& xValue = (*aAssignValues)[pFileColumn->GetId()]; // Alles geprueft und wir haben den Namen der Column. // Jetzt eine Value allozieren, den Wert setzen und die Value an die Row binden. @@ -810,7 +810,7 @@ void OStatement_Base::SetAssignValue(const String& aColumnName, *(m_aAssignValues->get())[nId] = sal_False; else { - // aStatus.Set(SQL_STAT_ERROR); // nyi: genauer! + // aStatus.Set(SQL_STAT_ERROR); // nyi: genauer! throwFunctionSequenceException(*this); } } @@ -827,16 +827,16 @@ void OStatement_Base::SetAssignValue(const String& aColumnName, case DataType::TIMESTAMP: { *(m_aAssignValues->get())[nId] = ORowSetValue(aValue); // .ToDouble -// try -// { -// double n = xValue->toDouble(); -// xValue->setDouble(n); -// } -// catch ( ... ) -// { -// aStatus.SetDriverNotCapableError(); -// } - } break; +// try +// { +// double n = xValue->toDouble(); +// xValue->setDouble(n); +// } +// catch ( ... ) +// { +// aStatus.SetDriverNotCapableError(); +// } + } break; default: throwFunctionSequenceException(*this); } diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx index d5a9eea0407b..490d9c7bef5d 100644 --- a/connectivity/source/drivers/file/FStringFunctions.cxx +++ b/connectivity/source/drivers/file/FStringFunctions.cxx @@ -2,7 +2,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 @@ -205,7 +205,7 @@ ORowSetValue OOp_Replace::operate(const ::std::vector<ORowSetValue>& lhs) const { sStr = sStr.replaceAt(nIndexOf,sFrom.getLength(),sTo); nIndexOf = sStr.indexOf(sFrom,nIndexOf + sTo.getLength()); - } + } return sStr; } @@ -215,7 +215,7 @@ ORowSetValue OOp_Repeat::operate(const ORowSetValue& lhs,const ORowSetValue& rhs RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OOp_Repeat::operate" ); if ( lhs.isNull() || rhs.isNull() ) return lhs; - + ::rtl::OUString sRet; sal_Int32 nCount = rhs; for (sal_Int32 i=0; i < nCount; ++i) @@ -244,7 +244,7 @@ ORowSetValue OOp_Left::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OOp_Left::operate" ); if ( lhs.isNull() || rhs.isNull() ) return lhs; - + ::rtl::OUString sRet = lhs; sal_Int32 nCount = rhs; if ( nCount < 0 ) @@ -257,12 +257,12 @@ ORowSetValue OOp_Right::operate(const ORowSetValue& lhs,const ORowSetValue& rhs) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OOp_Right::operate" ); if ( lhs.isNull() || rhs.isNull() ) return lhs; - + sal_Int32 nCount = rhs; ::rtl::OUString sRet = lhs; if ( nCount < 0 || nCount >= sRet.getLength() ) return ORowSetValue(); - + return sRet.copy(sRet.getLength()-nCount,nCount); } diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 52974444a43c..edcf565aa9ae 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -2,7 +2,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 @@ -63,11 +63,11 @@ OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection) DBG_CTOR( file_OFileTable, NULL ); construct(); TStringVector aVector; - // m_pColumns = new OColumns(this,m_aMutex,aVector); + // m_pColumns = new OColumns(this,m_aMutex,aVector); m_aColumns = new OSQLColumns(); } // ------------------------------------------------------------------------- -OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, +OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, const ::rtl::OUString& _Description , @@ -90,7 +90,7 @@ OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, DBG_CTOR( file_OFileTable, NULL ); m_aColumns = new OSQLColumns(); construct(); - // refreshColumns(); + // refreshColumns(); } // ------------------------------------------------------------------------- OFileTable::~OFileTable( ) @@ -115,7 +115,7 @@ void OFileTable::refreshColumns() if(m_pColumns) m_pColumns->reFill(aVector); else - m_pColumns = new OColumns(this,m_aMutex,aVector); + m_pColumns = new OColumns(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- void OFileTable::refreshKeys() diff --git a/connectivity/source/drivers/file/FTables.cxx b/connectivity/source/drivers/file/FTables.cxx index b5d918f1f0d9..c56cf59a667e 100644 --- a/connectivity/source/drivers/file/FTables.cxx +++ b/connectivity/source/drivers/file/FTables.cxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; -namespace starutil = ::com::sun::star::util; +namespace starutil = ::com::sun::star::util; typedef connectivity::sdbcx::OCollection OCollection_TYPE; sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& /*_rName*/) diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index f55d609daf51..773b24b277ea 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -2,7 +2,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 @@ -82,20 +82,20 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) for (sal_uInt32 i = 0; i < pSelection->count(); i++) { OSQLParseNode *pColumnRef = pSelection->getChild(i)->getChild(0); - if ( ( SQL_ISRULE(pColumnRef,set_fct_spec) && pColumnRef->count() == 4 ) - || SQL_ISRULE(pColumnRef,char_value_fct) - || SQL_ISRULE(pColumnRef,char_substring_fct) - || SQL_ISRULE(pColumnRef,position_exp) - || SQL_ISRULE(pColumnRef,fold) - || SQL_ISRULE(pColumnRef,length_exp) - || SQL_ISRULE(pColumnRef,num_value_exp) - || SQL_ISRULE(pColumnRef,term) - || SQL_ISRULE(pColumnRef,factor) - || SQL_ISRULE(pColumnRef,set_fct_spec) ) + if ( ( SQL_ISRULE(pColumnRef,set_fct_spec) && pColumnRef->count() == 4 ) + || SQL_ISRULE(pColumnRef,char_value_fct) + || SQL_ISRULE(pColumnRef,char_substring_fct) + || SQL_ISRULE(pColumnRef,position_exp) + || SQL_ISRULE(pColumnRef,fold) + || SQL_ISRULE(pColumnRef,length_exp) + || SQL_ISRULE(pColumnRef,num_value_exp) + || SQL_ISRULE(pColumnRef,term) + || SQL_ISRULE(pColumnRef,factor) + || SQL_ISRULE(pColumnRef,set_fct_spec) ) { - ::rtl::Reference<OPredicateCompiler> pCompiler = new OPredicateCompiler(this); + ::rtl::Reference<OPredicateCompiler> pCompiler = new OPredicateCompiler(this); pCompiler->setOrigColumns(m_aCompiler->getOrigColumns()); - ::rtl::Reference<OPredicateInterpreter> pInterpreter = new OPredicateInterpreter(pCompiler); + ::rtl::Reference<OPredicateInterpreter> pInterpreter = new OPredicateInterpreter(pCompiler); pCompiler->execute( pColumnRef ); m_aSelectionEvaluations.push_back( TPredicates(pCompiler,pInterpreter) ); } @@ -119,7 +119,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvalu // wenn nur ein Kriterium, und das entsprechende Feld ist indiziert // dann wird der Index verwendet - OEvaluateSet* pEvaluateSet = NULL; + OEvaluateSet* pEvaluateSet = NULL; for (OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter) { @@ -150,7 +150,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvalu void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) { // first the select part - OEvaluateSetList aEvaluateSetList; + OEvaluateSetList aEvaluateSetList; for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter) { if ( aIter->first.is() ) @@ -160,11 +160,11 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) //------------------------------------------------------------------ ::std::vector<sal_Int32>* OSQLAnalyzer::bindEvaluationRow(OValueRefRow& _pRow) { - OEvaluateSetList aEvaluateSetList; + OEvaluateSetList aEvaluateSetList; bindRow( m_aCompiler->m_aCodeList,_pRow,aEvaluateSetList); - ::std::vector<sal_Int32>* pKeySet = NULL; - OEvaluateSet* pEvaluateSet = NULL; + ::std::vector<sal_Int32>* pKeySet = NULL; + OEvaluateSet* pEvaluateSet = NULL; // Keyset erzeugen mit kleinster Liste if(!aEvaluateSetList.empty()) @@ -174,7 +174,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) pEvaluateSet = *(i); for(++i; i != aEvaluateSetList.end();++i) { - OEvaluateSet* pEvaluateSetComp = (*i); + OEvaluateSet* pEvaluateSetComp = (*i); for(OEvaluateSet::reverse_iterator j = pEvaluateSet->rbegin(); j != pEvaluateSet->rend(); ++j) { if (pEvaluateSetComp->find(j->second) != pEvaluateSetComp->end()) @@ -199,7 +199,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow) //------------------------------------------------------------------ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns) { - OCodeList& rCodeList = m_aCompiler->m_aCodeList; + OCodeList& rCodeList = m_aCompiler->m_aCodeList; OCodeStack aCodeStack; if (!rCodeList.size()) @@ -216,7 +216,7 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns bindParameterRow(aParameterRow); OValueRefRow aTestRow = new OValueRefVector(Reference< XIndexAccess>(m_aCompiler->getOrigColumns(),UNO_QUERY)->getCount()); - delete bindEvaluationRow(aTestRow); // Binden der Attribute an die Values + delete bindEvaluationRow(aTestRow); // Binden der Attribute an die Values for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter) { @@ -227,11 +227,11 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns else { if (pOperator->getRequestedOperands() == 2) // bei zwei Operatoren ist es moeglich - { // einen Parameter weiter zu spezifizieren + { // einen Parameter weiter zu spezifizieren OOperandParam *pParam = PTR_CAST(OOperandParam,aCodeStack.top()); if (pParam) // Anpassen des ParameterTyps, wenn der linke Operand ein Attribut ist { - OOperandAttr *pLeft = PTR_CAST(OOperandAttr,*(rCodeList.end() - 2)); + OOperandAttr *pLeft = PTR_CAST(OOperandAttr,*(rCodeList.end() - 2)); if (pLeft) { Reference< XPropertySet> xCol; @@ -255,7 +255,7 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns OSL_ENSURE(0,"Illegal here!"); rParameterColumns = aNewParamColumns; - // m_aCompiler->setParameterColumns(rParameterColumns); + // m_aCompiler->setParameterColumns(rParameterColumns); } // ----------------------------------------------------------------------------- @@ -292,7 +292,7 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: { if ( aIter->second.is() ) { - sal_Int32 map = nPos; + sal_Int32 map = nPos; // the first column (index 0) is for convenience only. The first real select column is no 1. if ( (nPos > 0) && (nPos < static_cast<sal_Int32>(_rColumnMapping.size())) ) map = _rColumnMapping[nPos]; diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 67c58ad9ca7a..bb48041a3036 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -2,7 +2,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 @@ -135,7 +135,7 @@ sal_Bool OOperandAttr::isIndexed() const } //------------------------------------------------------------------ OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) - : OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Typ + : OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Typ { OSL_ENSURE(SQL_ISRULE(pNode,parameter),"Argument ist kein Parameter"); OSL_ENSURE(pNode->count() > 0,"Fehler im Parse Tree"); @@ -158,8 +158,8 @@ OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) // Symmetriegruenden ...) // todo - // OColumn* pColumn = new OFILEColumn(aParameterName,eDBType,255,0,SQL_FLAGS_NULLALLOWED); - // rParamColumns->AddColumn(pColumn); + // OColumn* pColumn = new OFILEColumn(aParameterName,eDBType,255,0,SQL_FLAGS_NULLALLOWED); + // rParamColumns->AddColumn(pColumn); // der Wert wird erst kurz vor der Auswertung gesetzt } @@ -179,15 +179,15 @@ OOperandConst::OOperandConst(const OSQLParseNode& rColumnRef, const rtl::OUStrin switch (rColumnRef.getNodeType()) { case SQL_NODE_STRING: - m_aValue = aStrValue; - m_eDBType = DataType::VARCHAR; + m_aValue = aStrValue; + m_eDBType = DataType::VARCHAR; m_aValue.setBound(sal_True); return; case SQL_NODE_INTNUM: case SQL_NODE_APPROXNUM: { - m_aValue = aStrValue.toDouble(); - m_eDBType = DataType::DOUBLE; + m_aValue = aStrValue.toDouble(); + m_eDBType = DataType::DOUBLE; m_aValue.setBound(sal_True); return; } @@ -230,9 +230,9 @@ sal_Bool OBoolOperator::operate(const OOperand*, const OOperand*) const void OBoolOperator::Exec(OCodeStack& rCodeStack) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OBoolOperator::Exec" ); - OOperand *pRight = rCodeStack.top(); + OOperand *pRight = rCodeStack.top(); rCodeStack.pop(); - OOperand *pLeft = rCodeStack.top(); + OOperand *pLeft = rCodeStack.top(); rCodeStack.pop(); rCodeStack.push(new OOperandResultBOOL(operate(pLeft, pRight))); @@ -259,7 +259,7 @@ void OOp_NOT::Exec(OCodeStack& rCodeStack) delete pOperand; } //------------------------------------------------------------------ -sal_uInt16 OOp_NOT::getRequestedOperands() const +sal_uInt16 OOp_NOT::getRequestedOperands() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OOp_NOT::getRequestedOperands" ); return 1; @@ -280,7 +280,7 @@ sal_Bool OOp_OR::operate(const OOperand* pLeft, const OOperand* pRight) const } //------------------------------------------------------------------ -sal_uInt16 OOp_ISNULL::getRequestedOperands() const +sal_uInt16 OOp_ISNULL::getRequestedOperands() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OOp_ISNULL::getRequestedOperands" ); return 1; @@ -364,13 +364,13 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con sRH.pData->length ); switch(aPredicateType) { - case SQLFilterOperator::EQUAL: bResult = (nRes == 0); break; - case SQLFilterOperator::NOT_EQUAL: bResult = (nRes != 0); break; - case SQLFilterOperator::LESS: bResult = (nRes < 0); break; - case SQLFilterOperator::LESS_EQUAL: bResult = (nRes <= 0); break; - case SQLFilterOperator::GREATER: bResult = (nRes > 0); break; - case SQLFilterOperator::GREATER_EQUAL: bResult = (nRes >= 0); break; - default: bResult = sal_False; + case SQLFilterOperator::EQUAL: bResult = (nRes == 0); break; + case SQLFilterOperator::NOT_EQUAL: bResult = (nRes != 0); break; + case SQLFilterOperator::LESS: bResult = (nRes < 0); break; + case SQLFilterOperator::LESS_EQUAL: bResult = (nRes <= 0); break; + case SQLFilterOperator::GREATER: bResult = (nRes > 0); break; + case SQLFilterOperator::GREATER_EQUAL: bResult = (nRes >= 0); break; + default: bResult = sal_False; } } break; case DataType::TINYINT: @@ -389,15 +389,15 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con switch (aPredicateType) { - case SQLFilterOperator::EQUAL: bResult = (n == m); break; - case SQLFilterOperator::LIKE: bResult = (n == m); break; - case SQLFilterOperator::NOT_EQUAL: bResult = (n != m); break; - case SQLFilterOperator::NOT_LIKE: bResult = (n != m); break; - case SQLFilterOperator::LESS: bResult = (n < m); break; - case SQLFilterOperator::LESS_EQUAL: bResult = (n <= m); break; - case SQLFilterOperator::GREATER: bResult = (n > m); break; - case SQLFilterOperator::GREATER_EQUAL: bResult = (n >= m); break; - default: bResult = sal_False; + case SQLFilterOperator::EQUAL: bResult = (n == m); break; + case SQLFilterOperator::LIKE: bResult = (n == m); break; + case SQLFilterOperator::NOT_EQUAL: bResult = (n != m); break; + case SQLFilterOperator::NOT_LIKE: bResult = (n != m); break; + case SQLFilterOperator::LESS: bResult = (n < m); break; + case SQLFilterOperator::LESS_EQUAL: bResult = (n <= m); break; + case SQLFilterOperator::GREATER: bResult = (n > m); break; + case SQLFilterOperator::GREATER_EQUAL: bResult = (n >= m); break; + default: bResult = sal_False; } } break; default: @@ -411,9 +411,9 @@ void ONumOperator::Exec(OCodeStack& rCodeStack) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ONumOperator::Exec" ); - OOperand *pRight = rCodeStack.top(); + OOperand *pRight = rCodeStack.top(); rCodeStack.pop(); - OOperand *pLeft = rCodeStack.top(); + OOperand *pLeft = rCodeStack.top(); rCodeStack.pop(); rCodeStack.push(new OOperandResultNUM(operate(pLeft->getValue(), pRight->getValue()))); @@ -465,7 +465,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack) do { OSL_ENSURE(!rCodeStack.empty(),"Stack must be none empty!"); - pOperand = rCodeStack.top(); + pOperand = rCodeStack.top(); rCodeStack.pop(); if ( !IS_TYPE(OStopOperand,pOperand) ) aValues.push_back( pOperand->getValue() ); @@ -487,9 +487,9 @@ void ONthOperator::Exec(OCodeStack& rCodeStack) void OBinaryOperator::Exec(OCodeStack& rCodeStack) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OBinaryOperator::Exec" ); - OOperand *pRight = rCodeStack.top(); + OOperand *pRight = rCodeStack.top(); rCodeStack.pop(); - OOperand *pLeft = rCodeStack.top(); + OOperand *pLeft = rCodeStack.top(); rCodeStack.pop(); if ( !rCodeStack.empty() && IS_TYPE(OStopOperand,rCodeStack.top()) ) diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index fc0d3d4741ee..9e05f9a91fd1 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -2,7 +2,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 @@ -58,7 +58,7 @@ using namespace ::com::sun::star::util; DBG_NAME(OPredicateCompiler) //------------------------------------------------------------------ OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs) - // : m_rCursor(rCurs) + // : m_rCursor(rCurs) : m_pAnalyzer(pAnalyzer) , m_nParamCounter(0) , m_bORCondition(FALSE) @@ -76,11 +76,11 @@ OPredicateCompiler::~OPredicateCompiler() void OPredicateCompiler::dispose() { Clean(); - m_orgColumns = NULL; + m_orgColumns = NULL; m_xIndexes.clear(); } //------------------------------------------------------------------ -// inline OCursor& OPredicateCompiler::Cursor() const {return m_rCursor;} +// inline OCursor& OPredicateCompiler::Cursor() const {return m_rCursor;} //------------------------------------------------------------------ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode) { @@ -117,8 +117,8 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode) } - pWhereClause = pTableExp->getChild(1); - pOrderbyClause = pTableExp->getChild(4); + pWhereClause = pTableExp->getChild(1); + pOrderbyClause = pTableExp->getChild(4); } else if (SQL_ISRULE(pSQLParseNode,update_statement_searched)) { @@ -156,25 +156,25 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode) OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) { OOperand* pOperand = NULL; - if (pPredicateNode->count() == 3 && // Ausdruck is geklammert + if (pPredicateNode->count() == 3 && // Ausdruck is geklammert SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"(") && SQL_ISPUNCTUATION(pPredicateNode->getChild(2),")")) { execute(pPredicateNode->getChild(1)); } else if ((SQL_ISRULE(pPredicateNode,search_condition) || (SQL_ISRULE(pPredicateNode,boolean_term))) - && // AND/OR-Verknuepfung: + && // AND/OR-Verknuepfung: pPredicateNode->count() == 3) { - execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs - execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs + execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs + execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs - if (SQL_ISTOKEN(pPredicateNode->getChild(1),OR)) // OR-Operator + if (SQL_ISTOKEN(pPredicateNode->getChild(1),OR)) // OR-Operator { m_aCodeList.push_back(new OOp_OR()); m_bORCondition = sal_True; } - else if (SQL_ISTOKEN(pPredicateNode->getChild(1),AND)) // AND-Operator + else if (SQL_ISTOKEN(pPredicateNode->getChild(1),AND)) // AND-Operator m_aCodeList.push_back(new OOp_AND()); else { @@ -204,8 +204,8 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) } else if(SQL_ISRULE(pPredicateNode,num_value_exp)) { - execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs - execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs + execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs + execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"+")) { m_aCodeList.push_back(new OOp_ADD()); @@ -219,8 +219,8 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) } else if(SQL_ISRULE(pPredicateNode,term)) { - execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs - execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs + execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs + execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"*")) { m_aCodeList.push_back(new OOp_MUL()); @@ -233,7 +233,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) } } else - pOperand = execute_Operand(pPredicateNode); // jetzt werden nur einfache Operanden verarbeitet + pOperand = execute_Operand(pPredicateNode); // jetzt werden nur einfache Operanden verarbeitet return pOperand; } @@ -243,17 +243,17 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th { DBG_ASSERT(pPredicateNode->count() == 3,"OFILECursor: Fehler im Parse Tree"); - if ( !(SQL_ISRULE(pPredicateNode->getChild(0),column_ref) || - pPredicateNode->getChild(2)->getNodeType() == SQL_NODE_STRING || - pPredicateNode->getChild(2)->getNodeType() == SQL_NODE_INTNUM || - pPredicateNode->getChild(2)->getNodeType() == SQL_NODE_APPROXNUM || - SQL_ISTOKEN(pPredicateNode->getChild(2),TRUE) || - SQL_ISTOKEN(pPredicateNode->getChild(2),FALSE) || - SQL_ISRULE(pPredicateNode->getChild(2),parameter) || + if ( !(SQL_ISRULE(pPredicateNode->getChild(0),column_ref) || + pPredicateNode->getChild(2)->getNodeType() == SQL_NODE_STRING || + pPredicateNode->getChild(2)->getNodeType() == SQL_NODE_INTNUM || + pPredicateNode->getChild(2)->getNodeType() == SQL_NODE_APPROXNUM || + SQL_ISTOKEN(pPredicateNode->getChild(2),TRUE) || + SQL_ISTOKEN(pPredicateNode->getChild(2),FALSE) || + SQL_ISRULE(pPredicateNode->getChild(2),parameter) || // odbc date - SQL_ISRULE(pPredicateNode->getChild(2),set_fct_spec) || - SQL_ISRULE(pPredicateNode->getChild(2),position_exp) || - SQL_ISRULE(pPredicateNode->getChild(2),char_substring_fct) || + SQL_ISRULE(pPredicateNode->getChild(2),set_fct_spec) || + SQL_ISRULE(pPredicateNode->getChild(2),position_exp) || + SQL_ISRULE(pPredicateNode->getChild(2),char_substring_fct) || // upper, lower etc. SQL_ISRULE(pPredicateNode->getChild(2),fold)) ) { @@ -295,8 +295,8 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( sal_Unicode cEscape = L'\0'; const bool bNotLike = pPart2->getChild(0)->isToken(); - OSQLParseNode* pAtom = pPart2->getChild(pPart2->count()-2); - OSQLParseNode* pOptEscape = pPart2->getChild(pPart2->count()-1); + OSQLParseNode* pAtom = pPart2->getChild(pPart2->count()-2); + OSQLParseNode* pOptEscape = pPart2->getChild(pPart2->count()-1); if (!(pAtom->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(pAtom,parameter))) { @@ -339,7 +339,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr if ( !(p1stValue->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(p1stValue,parameter)) - && !(p2ndtValue->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(p2ndtValue,parameter)) + && !(p2ndtValue->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(p2ndtValue,parameter)) ) { m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_BETWEEN,NULL); @@ -408,7 +408,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr return NULL; } //------------------------------------------------------------------ -OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); const OSQLParseNode* pPart2 = pPredicateNode->getChild(1); @@ -434,7 +434,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr if (SQL_ISRULE(pPredicateNode,column_ref)) { - ::rtl::OUString aColumnName; + ::rtl::OUString aColumnName; if (pPredicateNode->count() == 1) { aColumnName = pPredicateNode->getChild(0)->getTokenValue(); @@ -533,9 +533,9 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr { execute_Fold(pPredicateNode); } - else if( SQL_ISRULE(pPredicateNode,set_fct_spec) - || SQL_ISRULE(pPredicateNode,position_exp) - || SQL_ISRULE(pPredicateNode,char_substring_fct) + else if( SQL_ISRULE(pPredicateNode,set_fct_spec) + || SQL_ISRULE(pPredicateNode,position_exp) + || SQL_ISRULE(pPredicateNode,char_substring_fct) ) { executeFunction(pPredicateNode); @@ -609,7 +609,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD delete pOperand; } // ----------------------------------------------------------------------------- -OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); @@ -626,7 +626,7 @@ OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) thro return NULL; } // ----------------------------------------------------------------------------- -OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { OOperator* pOperator = NULL; diff --git a/connectivity/source/drivers/file/file.xml b/connectivity/source/drivers/file/file.xml index 2d8281bca957..b3b681c30576 100644 --- a/connectivity/source/drivers/file/file.xml +++ b/connectivity/source/drivers/file/file.xml @@ -12,7 +12,7 @@ <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - <service-dependency> ... </service-dependency> + <service-dependency> ... </service-dependency> </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx index eea854031905..5847b94e8817 100644 --- a/connectivity/source/drivers/file/quotedstring.cxx +++ b/connectivity/source/drivers/file/quotedstring.cxx @@ -2,7 +2,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 @@ -45,8 +45,8 @@ namespace connectivity return 0; xub_StrLen nTokCount = 1; - BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token? - BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token? + BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen for( xub_StrLen i = 0; i < nLen; ++i ) @@ -58,12 +58,12 @@ namespace connectivity // Erstes Zeichen ein String-Delimiter? if ( cChar == cStrDel ) { - bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings! - continue; // dieses Zeichen ueberlesen! + bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings! + continue; // dieses Zeichen ueberlesen! } } - if (bInString) + if (bInString) { // Wenn jetzt das String-Delimiter-Zeichen auftritt ... if ( cChar == cStrDel ) @@ -71,7 +71,7 @@ namespace connectivity if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel)) { // Verdoppeltes String-Delimiter-Zeichen: - ++i; // kein String-Ende, naechstes Zeichen ueberlesen. + ++i; // kein String-Ende, naechstes Zeichen ueberlesen. } else { @@ -79,8 +79,8 @@ namespace connectivity bInString = FALSE; } } - } // if (bInString) - else + } // if (bInString) + else { // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount if ( cChar == cTok ) @@ -103,11 +103,11 @@ namespace connectivity const xub_StrLen nLen = m_sString.Len(); if ( nLen ) { - BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Erstes Zeichen ein String-Delimiter? if (bInString ) - ++nStartPos; // dieses Zeichen ueberlesen! + ++nStartPos; // dieses Zeichen ueberlesen! if ( nStartPos >= nLen ) return; @@ -127,7 +127,7 @@ namespace connectivity // Verdoppeltes String-Delimiter-Zeichen: // kein String-Ende, naechstes Zeichen ueberlesen. ++i; - *pData++ = m_sString.GetChar(i); // Zeichen gehoert zum Resultat-String + *pData++ = m_sString.GetChar(i); // Zeichen gehoert zum Resultat-String } else { @@ -138,7 +138,7 @@ namespace connectivity } else { - *pData++ = cChar; // Zeichen gehoert zum Resultat-String + *pData++ = cChar; // Zeichen gehoert zum Resultat-String } } @@ -154,7 +154,7 @@ namespace connectivity } else { - *pData++ = cChar; // Zeichen gehoert zum Resultat-String + *pData++ = cChar; // Zeichen gehoert zum Resultat-String } } } // for( xub_StrLen i = nStartPos; i < nLen; ++i ) diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index 5bdff8c75bff..f1327e152bda 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx index 43d78e0479bf..7fdbeca25c4b 100644 --- a/connectivity/source/drivers/flat/EColumns.cxx +++ b/connectivity/source/drivers/flat/EColumns.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx index 1808e760c430..0097e075efd7 100644 --- a/connectivity/source/drivers/flat/EConnection.cxx +++ b/connectivity/source/drivers/flat/EConnection.cxx @@ -2,7 +2,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 @@ -52,7 +52,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; // -------------------------------------------------------------------------------- -OFlatConnection::OFlatConnection(ODriver* _pDriver) : OConnection(_pDriver) +OFlatConnection::OFlatConnection(ODriver* _pDriver) : OConnection(_pDriver) ,m_bHeaderLine(sal_True) ,m_cFieldDelimiter(';') ,m_cStringDelimiter('"') diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index 29991697fb7b..62568e68efd0 100644 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -49,7 +49,7 @@ using namespace ::comphelper; using namespace connectivity; using namespace connectivity::flat; -// using namespace connectivity::file; +// using namespace connectivity::file; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbcx; @@ -58,7 +58,7 @@ using namespace ::com::sun::star::container; -OFlatDatabaseMetaData::OFlatDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon) +OFlatDatabaseMetaData::OFlatDatabaseMetaData(::connectivity::file::OConnection* _pCon) :ODatabaseMetaData(_pCon) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen@sun.com", "OFlatDatabaseMetaData::OFlatDatabaseMetaData" ); } @@ -75,7 +75,7 @@ Reference< XResultSet > OFlatDatabaseMetaData::impl_getTypeInfo_throw( ) ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo); Reference< XResultSet > xRef = pResult; - + static ODatabaseMetaDataResultSet::ORows aRows; if(aRows.empty()) { @@ -186,8 +186,8 @@ Reference< XResultSet > SAL_CALL OFlatDatabaseMetaData::getColumns( ODatabaseMetaDataResultSet::ORow aRow(19); aRow[10] = new ORowSetValueDecorator((sal_Int32)10); Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames()); - const ::rtl::OUString* pTabBegin = aTabNames.getConstArray(); - const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength(); + const ::rtl::OUString* pTabBegin = aTabNames.getConstArray(); + const ::rtl::OUString* pTabEnd = pTabBegin + aTabNames.getLength(); for(;pTabBegin != pTabEnd;++pTabBegin) { if(match(tableNamePattern,*pTabBegin,'\0')) diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index b4ea6e4d5fc8..13d79d8756dc 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/flat/EPreparedStatement.cxx b/connectivity/source/drivers/flat/EPreparedStatement.cxx index 4800d96a2907..601aadbb7b3a 100644 --- a/connectivity/source/drivers/flat/EPreparedStatement.cxx +++ b/connectivity/source/drivers/flat/EPreparedStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 5c4892becdad..0d15b881db8b 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -2,7 +2,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 @@ -45,10 +45,10 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbcx; -// using namespace com::sun::star::container; -// using namespace com::sun::star::util; +// using namespace com::sun::star::container; +// using namespace com::sun::star::util; //------------------------------------------------------------------------------ -OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) +OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) ,m_bBookmarkable(sal_True) { @@ -93,7 +93,7 @@ Sequence< Type > SAL_CALL OFlatResultSet::getTypes( ) throw( RuntimeException) { Sequence< Type > aTypes = OResultSet::getTypes(); ::std::vector<Type> aOwnTypes; - aOwnTypes.reserve(aTypes.getLength()); + aOwnTypes.reserve(aTypes.getLength()); const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) @@ -124,7 +124,7 @@ sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark ) throw( { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; @@ -135,7 +135,7 @@ sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark, { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; diff --git a/connectivity/source/drivers/flat/EStatement.cxx b/connectivity/source/drivers/flat/EStatement.cxx index f7b617e8019e..6dd16a00b6ce 100644 --- a/connectivity/source/drivers/flat/EStatement.cxx +++ b/connectivity/source/drivers/flat/EStatement.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 622da47534f2..02cc780a47c5 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -2,7 +2,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,7 +42,7 @@ #include <comphelper/sequence.hxx> #include <svl/zforlist.hxx> #include <rtl/math.hxx> -#include <stdio.h> //sprintf +#include <stdio.h> //sprintf #include <comphelper/extract.hxx> #include <comphelper/numbers.hxx> #include "flat/EDriver.hxx" @@ -288,7 +288,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) break; default: eType = DataType::VARCHAR; - nPrecision = 0; // nyi: Daten koennen aber laenger sein! + nPrecision = 0; // nyi: Daten koennen aber laenger sein! nScale = 0; { static const ::rtl::OUString s_sVARCHAR(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); @@ -383,8 +383,8 @@ void OFlatTable::construct() // Buffersize abhaengig von der Filegroesse m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 : - nSize > 100000 ? 16384 : - nSize > 10000 ? 4096 : 1024); + nSize > 100000 ? 16384 : + nSize > 10000 ? 4096 : 1024); fillColumns(aAppLocale); @@ -451,7 +451,7 @@ void OFlatTable::refreshColumns() if(m_pColumns) m_pColumns->reFill(aVector); else - m_pColumns = new OFlatColumns(this,m_aMutex,aVector); + m_pColumns = new OFlatColumns(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- @@ -472,10 +472,10 @@ Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException) const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XRename>*)0) || + if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || + *pBegin == ::getCppuType((const Reference<XRename>*)0) || *pBegin == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || + *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))) { aOwnTypes.push_back(*pBegin); @@ -488,10 +488,10 @@ Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException) // ------------------------------------------------------------------------- Any SAL_CALL OFlatTable::queryInterface( const Type & rType ) throw(RuntimeException) { - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || - rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - rType == ::getCppuType((const Reference<XRename>*)0) || - rType == ::getCppuType((const Reference<XAlterTable>*)0) || + if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || + rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || + rType == ::getCppuType((const Reference<XRename>*)0) || + rType == ::getCppuType((const Reference<XAlterTable>*)0) || rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) return Any(); @@ -533,7 +533,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal if (!bRetrieveData) return TRUE; if ( m_bNeedToReadLine ) - { + { sal_Int32 nCurrentPos = 0; m_pFileStream->Seek(m_nFilePos); readLine(nCurrentPos); @@ -559,18 +559,18 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal else { // Laengen je nach Datentyp: - sal_Int32 nLen, + sal_Int32 nLen, nType = 0; if(bIsTable) { - nLen = m_aPrecisions[i-1]; - nType = m_aTypes[i-1]; + nLen = m_aPrecisions[i-1]; + nType = m_aTypes[i-1]; } else { Reference< XPropertySet> xColumn = *aIter; - xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; - xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; + xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; + xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; } switch(nType) { @@ -598,13 +598,13 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal { (_rRow->get())[i]->setNull(); } - } break; + } break; case DataType::DOUBLE: case DataType::INTEGER: - case DataType::DECIMAL: // #99178# OJ + case DataType::DECIMAL: // #99178# OJ case DataType::NUMERIC: { - + String aStrConverted; if ( DataType::INTEGER != nType ) { @@ -618,7 +618,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln: for (xub_StrLen j = 0; j < aStr.Len(); ++j) { - const sal_Unicode cChar = aStr.GetChar(j); + const sal_Unicode cChar = aStr.GetChar(j); if (cDecimalDelimiter && cChar == cDecimalDelimiter) *pData++ = '.'; //aStrConverted.Append( '.' ); @@ -681,7 +681,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int // run through case IResultSetHelper::NEXT: { - ++m_nRowPos; + ++m_nRowPos; ::std::map<sal_Int32,TRowPositionsInFile::iterator>::const_iterator aFind = m_aRowPosToFilePos.find(m_nRowPos); m_bNeedToReadLine = aFind != m_aRowPosToFilePos.end(); if ( m_bNeedToReadLine ) @@ -698,13 +698,13 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int { m_nMaxRowCount = m_nRowPos -1; return sal_False; - } // if ( m_pFileStream->IsEof() || !readLine(nCurPos) /*|| !checkHeaderLine()*/) + } // if ( m_pFileStream->IsEof() || !readLine(nCurPos) /*|| !checkHeaderLine()*/) TRowPositionsInFile::iterator aPos = m_aFilePosToEndLinePos.insert(TRowPositionsInFile::value_type(m_nFilePos,nCurPos)).first; m_aRowPosToFilePos.insert(::std::map<sal_Int32,TRowPositionsInFile::iterator>::value_type(m_nRowPos,aPos)); } } - + break; case IResultSetHelper::PRIOR: --m_nRowPos; @@ -726,11 +726,11 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int m_nRowPos = aLastPos->first; m_nFilePos = aLastPos->second->first; nCurPos = aLastPos->second->second; - + //m_pFileStream->Seek(m_nFilePos); m_bNeedToReadLine = true; //if ( m_pFileStream->IsEof() /*|| !checkHeaderLine()*/ || !readLine(nCurPos) ) - // return sal_False; + // return sal_False; } else { @@ -763,7 +763,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int //m_pFileStream->Seek(m_nFilePos); m_bNeedToReadLine = true; //if ( m_pFileStream->IsEof() /*|| !checkHeaderLine()*/ || !readLine(nCurPos) ) - // return sal_False; + // return sal_False; } else if(m_nMaxRowCount && nOffset > m_nMaxRowCount) // offset is outside the table { @@ -776,7 +776,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int if(aIter == m_aRowPosToFilePos.end()) { ::std::map<sal_Int32,TRowPositionsInFile::iterator>::reverse_iterator aLastPos = m_aRowPosToFilePos.rbegin(); - m_nRowPos = aLastPos->first; + m_nRowPos = aLastPos->first; nCurPos = m_nFilePos = aLastPos->second->first; while(m_nRowPos != nOffset) seekRow(IResultSetHelper::NEXT,1,nCurPos); @@ -784,13 +784,13 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int else { --aIter; - m_nRowPos = aIter->first; - m_nFilePos = aIter->second->first; - nCurPos = aIter->second->second; + m_nRowPos = aIter->first; + m_nFilePos = aIter->second->first; + nCurPos = aIter->second->second; //m_pFileStream->Seek(m_nFilePos); m_bNeedToReadLine = true; //if ( m_pFileStream->IsEof() /*|| !checkHeaderLine()*/ || !readLine(nCurPos) ) - // return sal_False; + // return sal_False; } } } @@ -805,7 +805,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int m_nFilePos = aFind->first; nCurPos = aFind->second; } - else + else { m_nFilePos = nOffset; m_pFileStream->Seek(nOffset); diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx index a0bb6a170838..e3b1be37cf55 100644 --- a/connectivity/source/drivers/flat/ETables.cxx +++ b/connectivity/source/drivers/flat/ETables.cxx @@ -2,7 +2,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 @@ -49,7 +49,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; -namespace starutil = ::com::sun::star::util; +namespace starutil = ::com::sun::star::util; sdbcx::ObjectType OFlatTables::createObject(const ::rtl::OUString& _rName) { diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx index 952365e43ab1..bb142b83fe1c 100644 --- a/connectivity/source/drivers/flat/Eservices.cxx +++ b/connectivity/source/drivers/flat/Eservices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/flat/flat.xcu b/connectivity/source/drivers/flat/flat.xcu index d00d1f98c38c..ed29028ea966 100755 --- a/connectivity/source/drivers/flat/flat.xcu +++ b/connectivity/source/drivers/flat/flat.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/flat/flat.xml b/connectivity/source/drivers/flat/flat.xml index f3738cc312ba..77b45c48daed 100644 --- a/connectivity/source/drivers/flat/flat.xml +++ b/connectivity/source/drivers/flat/flat.xml @@ -12,7 +12,7 @@ <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - <service-dependency> ... </service-dependency> + <service-dependency> ... </service-dependency> </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index a1cb584b8bf6..2412ed906ca3 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -2,7 +2,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 @@ -71,7 +71,7 @@ void OHCatalog::refreshTables() Sequence< ::rtl::OUString > sTableTypes(2); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; - + refreshObjects(sTableTypes,aVector); if ( m_pTables ) @@ -149,7 +149,7 @@ Sequence< Type > SAL_CALL OHCatalog::getTypes( ) throw(RuntimeException) { Sequence< Type > aTypes = OCatalog::getTypes(); ::std::vector<Type> aOwnTypes; - aOwnTypes.reserve(aTypes.getLength()); + aOwnTypes.reserve(aTypes.getLength()); const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index c1a640ec4036..c8d83e0d2b4e 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -2,7 +2,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 @@ -43,7 +43,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OHSQLColumns::OHSQLColumns( ::cppu::OWeakObject& _rParent +OHSQLColumns::OHSQLColumns( ::cppu::OWeakObject& _rParent ,sal_Bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector @@ -58,8 +58,8 @@ Reference< XPropertySet > OHSQLColumns::createDescriptor() } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -OHSQLColumn::OHSQLColumn( sal_Bool _bCase) - : connectivity::sdbcx::OColumn( _bCase ) +OHSQLColumn::OHSQLColumn( sal_Bool _bCase) + : connectivity::sdbcx::OColumn( _bCase ) { construct(); } @@ -67,7 +67,7 @@ OHSQLColumn::OHSQLColumn( sal_Bool _bCase) void OHSQLColumn::construct() { m_sAutoIncrement = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IDENTITY")); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OHSQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index 07fc4ec5e00a..543e6b39328d 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -2,7 +2,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 @@ -170,7 +170,7 @@ namespace connectivity { namespace hsqldb void SAL_CALL OHsqlConnection::flush( ) throw (RuntimeException) { MethodGuard aGuard( *this ); - + try { if ( m_xConnection.is() ) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 583c33112caa..c551312d0cdc 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -2,7 +2,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 @@ -260,7 +260,7 @@ namespace connectivity makeAny( lcl_getPermittedJavaMethods_nothrow( m_xFactory ) ) ); aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) ); - + const ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) ); ::rtl::OUString sMessage; try @@ -282,7 +282,7 @@ namespace connectivity const sal_Int32 nMajor = sLine.GetToken(0,'.').ToInt32(); const sal_Int32 nMinor = sLine.GetToken(1,'.').ToInt32(); const sal_Int32 nMicro = sLine.GetToken(2,'.').ToInt32(); - if ( nMajor > 1 + if ( nMajor > 1 || ( nMajor == 1 && nMinor > 8 ) || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) { @@ -469,7 +469,7 @@ namespace connectivity const ::rtl::OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); ::dbtools::throwGenericSQLException(sMessage ,*this); } - + return getDataDefinitionByConnection(connect(url,info)); } @@ -882,7 +882,7 @@ namespace connectivity //------------------------------------------------------------------ //------------------------------------------------------------------ //........................................................................ -} // namespace connectivity +} // namespace connectivity //........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HStorage.hxx b/connectivity/source/drivers/hsqldb/HStorage.hxx index cd7e94b44bf0..f13dc3be283b 100644 --- a/connectivity/source/drivers/hsqldb/HStorage.hxx +++ b/connectivity/source/drivers/hsqldb/HStorage.hxx @@ -2,7 +2,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,43 +42,43 @@ #include <comphelper/broadcasthelper.hxx> -#define DECLARE_SERVICE_INFO_STATIC() \ - DECLARE_SERVICE_INFO(); \ - static ::rtl::OUString SAL_CALL getImplementationName_Static( ) throw (::com::sun::star::uno::RuntimeException); \ - static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(::com::sun::star::uno::RuntimeException); \ - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > \ - SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&) \ +#define DECLARE_SERVICE_INFO_STATIC() \ + DECLARE_SERVICE_INFO(); \ + static ::rtl::OUString SAL_CALL getImplementationName_Static( ) throw (::com::sun::star::uno::RuntimeException); \ + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(::com::sun::star::uno::RuntimeException); \ + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > \ + SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&) \ namespace connectivity { namespace hsqldb { - typedef ::cppu::WeakComponentImplHelper6< ::com::sun::star::io::XStream - , ::com::sun::star::io::XInputStream - , ::com::sun::star::io::XOutputStream - , ::com::sun::star::io::XSeekable - , ::com::sun::star::lang::XInitialization - , ::com::sun::star::lang::XServiceInfo> OStorage_Base; + typedef ::cppu::WeakComponentImplHelper6< ::com::sun::star::io::XStream + , ::com::sun::star::io::XInputStream + , ::com::sun::star::io::XOutputStream + , ::com::sun::star::io::XSeekable + , ::com::sun::star::lang::XInitialization + , ::com::sun::star::lang::XServiceInfo> OStorage_Base; class OStorage : public ::comphelper::OBaseMutex ,public OStorage_Base { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; - ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentSubStorageSupplier> m_xDS; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentSubStorageSupplier> m_xDS; - ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage> m_xStorge; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xIn; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > m_xOut; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xSeek; + ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage> m_xStorge; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xIn; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > m_xOut; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xSeek; - OStorage(); // never implemented - OStorage(const OStorage&); // never implemented - int operator= (const OStorage&); // never implemented + OStorage(); // never implemented + OStorage(const OStorage&); // never implemented + int operator= (const OStorage&); // never implemented OStorage( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory); + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory); protected: /** this function is called upon disposing the component */ diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index 1ce47beb572f..b4a898275b94 100644 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx @@ -2,7 +2,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 @@ -237,7 +237,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js jsize nLen = env->GetArrayLength(buffer); if ( nLen < len || len <= 0 ) { - ThrowException( env, + ThrowException( env, "java/io/IOException", "len is greater or equal to the buffer size"); return -1; @@ -265,7 +265,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js #endif return nBytesRead; } - ThrowException( env, + ThrowException( env, "java/io/IOException", "Stream is not valid"); return -1; @@ -354,7 +354,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStor #endif return nRet; } - ThrowException( env, + ThrowException( env, "java/io/IOException", "No InputStream"); return -1; @@ -450,7 +450,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst { Sequence< ::sal_Int8 > aData(buf + off,len); env->ReleaseByteArrayElements(buffer, buf, JNI_ABORT); - xOut->writeBytes(aData); + xOut->writeBytes(aData); #ifdef HSQLDB_DBG if ( logger ) logger->write( aData.getConstArray(), len ); @@ -459,7 +459,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst } else { - ThrowException( env, + ThrowException( env, "java/io/IOException", "No OutputStream"); } @@ -518,7 +518,7 @@ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, j } else { - ThrowException( env, + ThrowException( env, "java/io/IOException", "No OutputStream"); } diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 9f5a1dbd44b7..72722d5645f3 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -2,7 +2,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 @@ -355,7 +355,7 @@ namespace connectivity env->ThrowNew(env->FindClass("java/io/IOException"), cstr.getStr()); } //........................................................................ - } // namespace hsqldb + } // namespace hsqldb //........................................................................ //........................................................................ } diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 3d4373542e08..8b426adfaa75 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -2,7 +2,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 @@ -64,24 +64,24 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, - const Reference< XConnection >& _xConnection) +OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, + const Reference< XConnection >& _xConnection) :OTableHelper(_pTables,_xConnection,sal_True) { // we create a new table here, so we should have all the rights or ;-) - m_nPrivileges = Privilege::DROP | - Privilege::REFERENCE | - Privilege::ALTER | - Privilege::CREATE | - Privilege::READ | - Privilege::DELETE | - Privilege::UPDATE | - Privilege::INSERT | + m_nPrivileges = Privilege::DROP | + Privilege::REFERENCE | + Privilege::ALTER | + Privilege::CREATE | + Privilege::READ | + Privilege::DELETE | + Privilege::UPDATE | + Privilege::INSERT | Privilege::SELECT; construct(); } // ------------------------------------------------------------------------- -OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, +OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, @@ -89,7 +89,7 @@ OHSQLTable::OHSQLTable( sdbcx::OCollection* _pTables, const ::rtl::OUString& _SchemaName, const ::rtl::OUString& _CatalogName, sal_Int32 _nPrivileges - ) : OTableHelper( _pTables, + ) : OTableHelper( _pTables, _xConnection, sal_True, _Name, @@ -106,7 +106,7 @@ void OHSQLTable::construct() { OTableHelper::construct(); if ( !isNew() ) - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRIVILEGES), PROPERTY_ID_PRIVILEGES,PropertyAttribute::READONLY,&m_nPrivileges, ::getCppuType(&m_nPrivileges)); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRIVILEGES), PROPERTY_ID_PRIVILEGES,PropertyAttribute::READONLY,&m_nPrivileges, ::getCppuType(&m_nPrivileges)); } // ----------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OHSQLTable::createArrayHelper( sal_Int32 /*_nId*/ ) const @@ -188,26 +188,26 @@ void SAL_CALL OHSQLTable::alterColumnByName( const ::rtl::OUString& colName, con ::dbtools::OPropertyMap& rProp = OMetaConnection::getPropMap(); // type/typename - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sOldTypeName; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sOldTypeName; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME))>>= sNewTypeName; // and precsions and scale - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION))>>= nNewPrec; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nNewScale; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nNewScale; // second: check the "is nullable" value sal_Int32 nOldNullable = 0,nNewNullable = 0; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nOldNullable; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nOldNullable; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; // check also the auto_increment sal_Bool bOldAutoIncrement = sal_False,bAutoIncrement = sal_False; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; // now we should look if the name of the column changed ::rtl::OUString sNewColumnName; @@ -228,10 +228,10 @@ void SAL_CALL OHSQLTable::alterColumnByName( const ::rtl::OUString& colName, con if ( nOldType != nNewType || sOldTypeName != sNewTypeName - || nOldPrec != nNewPrec - || nOldScale != nNewScale - || nNewNullable != nOldNullable - || bOldAutoIncrement != bAutoIncrement ) + || nOldPrec != nNewPrec + || nOldScale != nNewScale + || nNewNullable != nOldNullable + || bOldAutoIncrement != bAutoIncrement ) { // special handling because they change the type names to distinguish // if a column should be an auto_incmrement one @@ -244,7 +244,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const ::rtl::OUString& colName, con // third: check the default values ::rtl::OUString sNewDefault,sOldDefault; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sNewDefault; if(sOldDefault.getLength()) diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 44ce6dfbecc9..ea2521a633b8 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -2,7 +2,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 @@ -70,7 +70,7 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) Sequence< ::rtl::OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; - sTableTypes[2] = s_sAll; // just to be sure to include anything else .... + sTableTypes[2] = s_sAll; // just to be sure to include anything else .... Any aCatalog; if ( sCatalog.getLength() ) diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx index 070d5e8be5cb..b2f23d8d5119 100644 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx @@ -2,7 +2,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 @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_connectivity.hxx" - + #include "HTerminateListener.hxx" #include "hsqldb/HDriver.hxx" @@ -61,7 +61,7 @@ throw( RuntimeException ) } //........................................................................ -} // namespace connectivity +} // namespace connectivity //........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx index b8af49d66dc8..681985951e49 100644 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx @@ -2,7 +2,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 @@ -39,7 +39,7 @@ namespace connectivity namespace hsqldb { class ODriverDelegator; - class OConnectionController : public ::cppu::WeakImplHelper1< + class OConnectionController : public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XTerminateListener > { ODriverDelegator* m_pDriver; @@ -60,7 +60,7 @@ namespace connectivity }; } //........................................................................ -} // namespace connectivity +} // namespace connectivity //........................................................................ #endif // CONNECTIVITY_HSQLDB_TERMINATELISTENER_HXX diff --git a/connectivity/source/drivers/hsqldb/HTools.cxx b/connectivity/source/drivers/hsqldb/HTools.cxx index f3849359f80f..8f35c9246aeb 100644 --- a/connectivity/source/drivers/hsqldb/HTools.cxx +++ b/connectivity/source/drivers/hsqldb/HTools.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index bfc9d5a44144..840e54d3f6eb 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -2,7 +2,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 @@ -47,7 +47,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -OHSQLUser::OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(sal_True) +OHSQLUser::OHSQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(sal_True) ,m_xConnection(_xConnection) { construct(); @@ -65,15 +65,15 @@ void OHSQLUser::refreshGroups() { } // ------------------------------------------------------------------------- -OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : OHSQLUser(_xConnection) +OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : OHSQLUser(_xConnection) { construct(); } // ------------------------------------------------------------------------- -typedef connectivity::sdbcx::OUser OUser_TYPEDEF; +typedef connectivity::sdbcx::OUser OUser_TYPEDEF; void OUserExtend::construct() { - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const @@ -118,7 +118,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName, xRes = xMeta->getTablePrivileges(aCatalog,sSchema,sTable); } break; - + case PrivilegeObject::COLUMN: { Any aCatalog; @@ -128,29 +128,29 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName, } break; } - + if ( xRes.is() ) { - static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); - static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); - static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); - static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); - static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); - static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); - static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); + static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); + static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); + static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); + static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); + static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); + static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); + static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE"); - static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); - static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); + static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); + static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); nRightsWithGrant = nRights = 0; Reference<XRow> xCurrentRow(xRes,UNO_QUERY); while( xCurrentRow.is() && xRes->next() ) { - ::rtl::OUString sGrantee = xCurrentRow->getString(5); - ::rtl::OUString sPrivilege = xCurrentRow->getString(6); - ::rtl::OUString sGrantable = xCurrentRow->getString(7); - + ::rtl::OUString sGrantee = xCurrentRow->getString(5); + ::rtl::OUString sPrivilege = xCurrentRow->getString(6); + ::rtl::OUString sGrantable = xCurrentRow->getString(7); + if (!m_Name.equalsIgnoreAsciiCase(sGrantee)) continue; @@ -217,7 +217,7 @@ sal_Int32 SAL_CALL OHSQLUser::getGrantablePrivileges( const ::rtl::OUString& obj { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); - + sal_Int32 nRights,nRightsWithGrant; findPrivilegesAndGrantPrivileges(objName,objType,nRights,nRightsWithGrant); return nRightsWithGrant; @@ -231,7 +231,7 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_In const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_GRANTED)); ::dbtools::throwGenericSQLException(sError,*this); } // if ( objType != PrivilegeObject::TABLE ) - + ::osl::MutexGuard aGuard(m_aMutex); @@ -246,7 +246,7 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_In sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); sGrant += ::rtl::OUString::createFromAscii(" TO "); sGrant += m_Name; - + Reference<XStatement> xStmt = m_xConnection->createStatement(); if(xStmt.is()) xStmt->execute(sGrant); @@ -276,7 +276,7 @@ void SAL_CALL OHSQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_I sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); sGrant += ::rtl::OUString::createFromAscii(" FROM "); sGrant += m_Name; - + Reference<XStatement> xStmt = m_xConnection->createStatement(); if(xStmt.is()) xStmt->execute(sGrant); @@ -296,7 +296,7 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, sAlterPwd += newPassword; sAlterPwd += ::rtl::OUString::createFromAscii("')") ; - + Reference<XStatement> xStmt = m_xConnection->createStatement(); if ( xStmt.is() ) { @@ -310,35 +310,35 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) sPrivs += ::rtl::OUString::createFromAscii("INSERT"); - + if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("DELETE"); } - + if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("UPDATE"); } - + if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("ALTER"); } - + if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("SELECT"); } - + if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(sPrivs.getLength()) diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index e9c2ead9d733..6e91008f1dc7 100644 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ using namespace connectivity; using namespace connectivity::hsqldb; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -54,7 +54,7 @@ OUsers::OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const TStringVector &_rVector, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, - connectivity::sdbcx::IRefreshableUsers* _pParent) + connectivity::sdbcx::IRefreshableUsers* _pParent) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) ,m_xConnection(_xConnection) ,m_pParent(_pParent) @@ -81,8 +81,8 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); - ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); + ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) + ::rtl::OUString::createFromAscii(" @\"%\" "); @@ -107,8 +107,8 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const void OUsers::dropObject(sal_Int32 /*nPos*/,const ::rtl::OUString _sElementName) { { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM "); - ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM "); + ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); Reference< XStatement > xStmt = m_xConnection->createStatement( ); diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index 86f0ddfcca46..1596ee70259f 100644 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 1ead660ac9be..2c8c429d87dd 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -2,7 +2,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 @@ -76,8 +76,8 @@ sdbcx::ObjectType HViews::createObject(const ::rtl::OUString& _rName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData, _rName, - sCatalog, - sSchema, + sCatalog, + sSchema, sTable, ::dbtools::eInDataManipulation); return new HView( m_xConnection, isCaseSensitive(), sSchema, sTable ); @@ -120,10 +120,10 @@ void HViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) if (!bIsNew) { ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW"); - + Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); - + Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); Reference< XStatement > xStmt = xConnection->createStatement( ); xStmt->execute(aSql); @@ -142,8 +142,8 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); - ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index fd21de93b1d9..12fd647576ed 100644 --- a/connectivity/source/drivers/hsqldb/Hservices.cxx +++ b/connectivity/source/drivers/hsqldb/Hservices.cxx @@ -2,7 +2,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 @@ -117,8 +117,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx index 5a51e6d9bb7f..532d7ca0de97 100644 --- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx +++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index b9b78a675936..be64f013d71b 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -2,7 +2,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 @@ -153,7 +153,7 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNa #endif if ( n < 0 ) - ThrowException( env, + ThrowException( env, "java/io/IOException", "n < 0"); @@ -198,7 +198,7 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNa } else { - ThrowException( env, + ThrowException( env, "java/io/IOException", "Stream is not valid"); } @@ -240,7 +240,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat } else { - ThrowException( env, + ThrowException( env, "java/io/IOException", "Stream is not valid"); } diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index 4ef88ff7bdca..36ec342e3291 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/hsqldb/accesslog.cxx b/connectivity/source/drivers/hsqldb/accesslog.cxx index a80350eef30c..111e1da186c1 100644 --- a/connectivity/source/drivers/hsqldb/accesslog.cxx +++ b/connectivity/source/drivers/hsqldb/accesslog.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/hsqldb/accesslog.hxx b/connectivity/source/drivers/hsqldb/accesslog.hxx index d29e67c2aa37..f10ae77d4e3e 100644 --- a/connectivity/source/drivers/hsqldb/accesslog.hxx +++ b/connectivity/source/drivers/hsqldb/accesslog.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/hsqldb/hsqldb.map b/connectivity/source/drivers/hsqldb/hsqldb.map index b4fc53b320ef..a13f907752e6 100644 --- a/connectivity/source/drivers/hsqldb/hsqldb.map +++ b/connectivity/source/drivers/hsqldb/hsqldb.map @@ -19,7 +19,7 @@ UDK_3_0_0 { Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_readInt; Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_seek; Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_write; - Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt; + Java_com_sun_star_sdbcx_comp_hsqldb_NativeStorageAccess_writeInt; Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_openStream; Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2; Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeInputStream_read__Ljava_lang_String_2Ljava_lang_String_2_3BII; diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xcu b/connectivity/source/drivers/hsqldb/hsqldb.xcu index f97b5e357179..af9c34824263 100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.xcu +++ b/connectivity/source/drivers/hsqldb/hsqldb.xcu @@ -2,7 +2,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 @@ -66,7 +66,7 @@ <prop oor:name="Value" oor:type="xs:boolean"> <value>true</value> </prop> - </node> + </node> <node oor:name="AutoIncrementIsPrimaryKey" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> <value>true</value> diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xml b/connectivity/source/drivers/hsqldb/hsqldb.xml index c456c253777d..f8e5c61af6de 100644 --- a/connectivity/source/drivers/hsqldb/hsqldb.xml +++ b/connectivity/source/drivers/hsqldb/hsqldb.xml @@ -12,7 +12,7 @@ <language>c++</language> <status value="final"/> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - </component-description> + </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> diff --git a/connectivity/source/drivers/hsqldb/hsqlui.hrc b/connectivity/source/drivers/hsqldb/hsqlui.hrc index fe20ec5eaf21..052b603a7256 100644 --- a/connectivity/source/drivers/hsqldb/hsqlui.hrc +++ b/connectivity/source/drivers/hsqldb/hsqlui.hrc @@ -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 diff --git a/connectivity/source/drivers/hsqldb/hsqlui.src b/connectivity/source/drivers/hsqldb/hsqlui.src index a2886c1a18cf..0e0189c5e278 100644 --- a/connectivity/source/drivers/hsqldb/hsqlui.src +++ b/connectivity/source/drivers/hsqldb/hsqlui.src @@ -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 @@ -39,7 +39,7 @@ If there were another possibility to ensure that the images are put into the repository, instead of creating a resource file for them, - then we would use this other way ... + then we would use this other way ... */ Image 1000 diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx index 3bdc4c261c66..db0a3bf5c06a 100644 --- a/connectivity/source/drivers/jdbc/Array.cxx +++ b/connectivity/source/drivers/jdbc/Array.cxx @@ -2,7 +2,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 @@ -47,7 +47,7 @@ jclass java_sql_Array::getMyClass() const // die Klasse muss nur einmal geholt werden, daher statisch if( !theClass ) theClass = findMyClass("java/sql/Array"); - + return theClass; } @@ -67,7 +67,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: { jobjectArray out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap); static const char * cSignature = "(Ljava/util/Map;)[Ljava/lang/Object;"; @@ -87,7 +87,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: { jobjectArray out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap); static const char * cSignature = "(IILjava/util/Map;)[Ljava/lang/Object;"; @@ -122,7 +122,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: t.pEnv->DeleteLocalRef(obj); } //t.pEnv // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! - // return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out ); + // return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out ); return NULL; } @@ -145,7 +145,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc: t.pEnv->DeleteLocalRef(obj); } //t.pEnv // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! - // return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out ); + // return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out ); return NULL; } diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx index a8b8f88333a7..d523786a31c3 100644 --- a/connectivity/source/drivers/jdbc/Blob.cxx +++ b/connectivity/source/drivers/jdbc/Blob.cxx @@ -2,7 +2,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 @@ -63,7 +63,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx { jlong out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { // temporaere Variable initialisieren static const char * cSignature = "()J"; @@ -99,7 +99,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx } } //t.pEnv // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! - return aSeq; + return aSeq; } ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Blob::getBinaryStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) @@ -115,7 +115,7 @@ sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequenc { jlong out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { // temporaere Variable initialisieren static const char * cSignature = "([BI)J"; diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx index 5954ceae1cfe..b69ef1a73b28 100644 --- a/connectivity/source/drivers/jdbc/Boolean.cxx +++ b/connectivity/source/drivers/jdbc/Boolean.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index 420d6c34d813..293bb7e9ba65 100644 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -73,7 +73,7 @@ Any SAL_CALL java_sql_CallableStatement::queryInterface( const Type & rType ) th // ------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_CallableStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< starsdbc::XRow > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< starsdbc::XRow > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< starsdbc::XOutParameters > *)0 )); return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_PreparedStatement::getTypes()); @@ -214,7 +214,7 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { createStatement(t.pEnv); @@ -235,7 +235,7 @@ void SAL_CALL java_sql_CallableStatement::registerNumericOutParameter( sal_Int32 ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { createStatement(t.pEnv); // temporaere Variable initialisieren diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx index d34ead197798..e1e6d8d8f485 100644 --- a/connectivity/source/drivers/jdbc/Class.cxx +++ b/connectivity/source/drivers/jdbc/Class.cxx @@ -2,7 +2,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 @@ -54,7 +54,7 @@ java_lang_Class * java_lang_Class::forName( const ::rtl::OUString& _par0 ) { jobject out(NULL); SDBThreadAttach t; - + { ::rtl::OString sClassName = ::rtl::OUStringToOString(_par0, RTL_TEXTENCODING_JAVA_UTF8); sClassName = sClassName.replace('.','/'); diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx index ed5b547b84d4..69b1e3425358 100644 --- a/connectivity/source/drivers/jdbc/Clob.cxx +++ b/connectivity/source/drivers/jdbc/Clob.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::length" ); jlong out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { // temporaere Variable initialisieren static const char * cSignature = "()J"; @@ -95,7 +95,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx aStr = JavaString2String(t.pEnv,out); } //t.pEnv // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! - return aStr; + return aStr; } ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_Clob::getCharacterStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) @@ -114,7 +114,7 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const ::rtl::OUString& searchstr, sa RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_Clob::position" ); jlong out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jvalue args[1]; // Parameter konvertieren diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx index 2fea1cea6d14..c50d4bdc9e58 100644 --- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx +++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx index 36ff7a067cc4..da1802f710c9 100644 --- a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx +++ b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index de0e509ec66b..27d78332729e 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -2,7 +2,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 @@ -54,7 +54,7 @@ using namespace ::com::sun::star::lang; //************ Class: java.sql.DatabaseMetaData //************************************************************** -jclass java_sql_DatabaseMetaData::theClass = 0; +jclass java_sql_DatabaseMetaData::theClass = 0; java_sql_DatabaseMetaData::~java_sql_DatabaseMetaData() { @@ -128,7 +128,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( jobject out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { // Java-Call absetzen static jmethodID mID(NULL); @@ -213,7 +213,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( if ( t.pEnv->IsInstanceOf( jThrow,java_sql_SQLException_BASE::st_getMyClass() ) ) { java_sql_SQLException_BASE* pException = new java_sql_SQLException_BASE( t.pEnv, jThrow ); - SQLException e( pException->getMessage(), + SQLException e( pException->getMessage(), *this, pException->getSQLState(), pException->getErrorCode(), @@ -319,7 +319,7 @@ sal_Int32 SAL_CALL java_sql_DatabaseMetaData::getMaxTableNameLength( ) throw(SQ return impl_callIntMethod( "getMaxTableNameLength", mID ); } // ------------------------------------------------------------------------- -sal_Int32 java_sql_DatabaseMetaData::impl_getMaxTablesInSelect_throw( ) +sal_Int32 java_sql_DatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxTablesInSelect", mID ); @@ -357,7 +357,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo( jobject out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { // Java-Call absetzen static jmethodID mID(NULL); @@ -398,7 +398,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier jobject out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { // Java-Call absetzen static jmethodID mID(NULL); @@ -635,7 +635,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS SDBThreadAttach t; OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings: no Java enviroment anymore!" ); - + { const char* pSignature = _pOptionalAdditionalString ? "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;" @@ -644,7 +644,7 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS obtainMethodId(t.pEnv, _pMethodName,pSignature, _inout_MethodID); // call method - + { jvalue args[4]; // convert parameters @@ -699,7 +699,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseIdentifiers( ) thro return impl_callBooleanMethod( "storesLowerCaseIdentifiers", mID ); } // ------------------------------------------------------------------------- -sal_Bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesMixedCaseQuotedIdentifiers", mID ); @@ -873,7 +873,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInIndexDefinitions( return impl_callBooleanMethod( "supportsSchemasInIndexDefinitions", mID ); } // ------------------------------------------------------------------------- -sal_Bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +sal_Bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInTableDefinitions", mID ); @@ -891,7 +891,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInIndexDefinitions( return impl_callBooleanMethod( "supportsCatalogsInIndexDefinitions", mID ); } // ------------------------------------------------------------------------- -sal_Bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +sal_Bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInDataManipulation", mID ); @@ -909,7 +909,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTableTypes( ) th return impl_callResultSetMethod( "getTableTypes", mID ); } // ------------------------------------------------------------------------- -sal_Int32 java_sql_DatabaseMetaData::impl_getMaxStatements_throw( ) +sal_Int32 java_sql_DatabaseMetaData::impl_getMaxStatements_throw( ) { static jmethodID mID(NULL); return impl_callIntMethod( "getMaxStatements", mID ); @@ -1007,7 +1007,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType jboolean out( sal_False ); SDBThreadAttach t; - + { static jmethodID mID(NULL); obtainMethodId(t.pEnv, pMethodName,"(II)Z", mID); @@ -1349,11 +1349,11 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I jboolean out( sal_False ); SDBThreadAttach t; - + { static jmethodID mID(NULL); obtainMethodId(t.pEnv, pMethodName,"(II)Z", mID); - out = t.pEnv->CallBooleanMethod( object, mID, setType, concurrency); + out = t.pEnv->CallBooleanMethod( object, mID, setType, concurrency); ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); } diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx index 258302d83783..24c4a7e9cc58 100644 --- a/connectivity/source/drivers/jdbc/Date.cxx +++ b/connectivity/source/drivers/jdbc/Date.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx index c4571f2f7fef..e39682d0c618 100644 --- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx +++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx @@ -2,7 +2,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 @@ -35,7 +35,7 @@ using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -75,7 +75,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo() { ::rtl::OUString aStr; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jfieldID id = t.pEnv->GetFieldID(getMyClass(),"name","Ljava/lang/String;"); if(id) @@ -88,7 +88,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo() { ::rtl::OUString aStr; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jfieldID id = t.pEnv->GetFieldID(getMyClass(),"description","Ljava/lang/String;"); if(id) @@ -101,7 +101,7 @@ java_sql_DriverPropertyInfo::operator starsdbc::DriverPropertyInfo() { ::rtl::OUString aStr; SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jfieldID id = t.pEnv->GetFieldID(getMyClass(),"value","Ljava/lang/String;"); if(id) @@ -114,7 +114,7 @@ sal_Bool java_sql_DriverPropertyInfo::required() { jboolean out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jfieldID id = t.pEnv->GetFieldID(getMyClass(),"required","Z"); if(id) @@ -126,7 +126,7 @@ sal_Bool java_sql_DriverPropertyInfo::required() Sequence< ::rtl::OUString> java_sql_DriverPropertyInfo::choices() { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jfieldID id = t.pEnv->GetFieldID(getMyClass(),"choices","[Ljava/lang/String;"); if(id) diff --git a/connectivity/source/drivers/jdbc/Exception.cxx b/connectivity/source/drivers/jdbc/Exception.cxx index ba65dab09b3b..682c01ac2b05 100644 --- a/connectivity/source/drivers/jdbc/Exception.cxx +++ b/connectivity/source/drivers/jdbc/Exception.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx index 8e335d66ca2b..d1741c7e588f 100644 --- a/connectivity/source/drivers/jdbc/InputStream.cxx +++ b/connectivity/source/drivers/jdbc/InputStream.cxx @@ -2,7 +2,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 @@ -87,7 +87,7 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jbyteArray pByteArray = t.pEnv->NewByteArray(nBytesToRead); static const char * cSignature = "([BII)I"; diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx index 25d5837b0f5e..81451382ba14 100644 --- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx +++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index b61e2e6e76a4..a8ed19cd87f6 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -2,7 +2,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 @@ -279,7 +279,7 @@ java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver ) ,m_bParameterSubstitution(sal_False) ,m_bIgnoreDriverPrivileges(sal_True) ,m_bIgnoreCurrency(sal_False) -{ +{ } // ----------------------------------------------------------------------------- java_sql_Connection::~java_sql_Connection() @@ -289,7 +289,7 @@ java_sql_Connection::~java_sql_Connection() { SDBThreadAttach t; clearObject(*t.pEnv); - + { if ( m_pDriverobject ) t.pEnv->DeleteGlobalRef( m_pDriverobject ); @@ -486,7 +486,7 @@ Reference< XStatement > SAL_CALL java_sql_Connection::createStatement( ) throw( ::rtl::OUString sNewSql; OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_sSQL); if(pNode) - { // special handling for parameters + { // special handling for parameters OSQLParseNode::substituteParameterNames(pNode); pNode->parseNodeToStr( sNewSql, this ); delete pNode; @@ -581,7 +581,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! if( out ) { - java_sql_SQLWarning_BASE warn_base(t.pEnv, out); + java_sql_SQLWarning_BASE warn_base(t.pEnv, out); SQLException aAsException( static_cast< starsdbc::SQLException >( java_sql_SQLWarning( warn_base, *this ) ) ); // translate to warning @@ -591,7 +591,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc aWarning.SQLState = aAsException.SQLState; aWarning.ErrorCode = aAsException.ErrorCode; aWarning.NextException = aAsException.NextException; - + return makeAny( aWarning ); } @@ -670,9 +670,9 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri const Sequence< NamedValue >& _rSystemProperties ) { // contains the statement which should be used when query for automatically generated values - ::rtl::OUString sGeneratedValueStatement; + ::rtl::OUString sGeneratedValueStatement; // set to <TRUE/> when we should allow to query for generated values - sal_Bool bAutoRetrievingEnabled = sal_False; + sal_Bool bAutoRetrievingEnabled = sal_False; // first try if the jdbc driver is alraedy registered at the driver manager SDBThreadAttach t; @@ -730,7 +730,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri if( t.pEnv && m_pDriverobject ) m_pDriverobject = t.pEnv->NewGlobalRef( m_pDriverobject ); - + { jclass tempClass = t.pEnv->GetObjectClass(m_pDriverobject); if ( m_pDriverobject ) @@ -761,7 +761,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri *this ); } - + enableAutoRetrievingEnabled( bAutoRetrievingEnabled ); setAutoRetrievingStatement( sGeneratedValueStatement ); } @@ -789,12 +789,12 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url, throwGenericSQLException(STR_NO_JAVA,*this); } SDBThreadAttach t; - t.addRef(); // will be released in dtor + t.addRef(); // will be released in dtor if ( !t.pEnv ) throwGenericSQLException(STR_NO_JAVA,*this); - ::rtl::OUString sGeneratedValueStatement; // contains the statement which should be used when query for automatically generated values - sal_Bool bAutoRetrievingEnabled = sal_False; // set to <TRUE/> when we should allow to query for generated values + ::rtl::OUString sGeneratedValueStatement; // contains the statement which should be used when query for automatically generated values + sal_Bool bAutoRetrievingEnabled = sal_False; // set to <TRUE/> when we should allow to query for generated values ::rtl::OUString sDriverClassPath,sDriverClass; Sequence< NamedValue > aSystemProperties; diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 18ea813b25a1..c56aba87405b 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 8a73592c2be8..bde76228d3b6 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -2,7 +2,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 @@ -139,7 +139,7 @@ Any SAL_CALL java_sql_Statement_Base::queryInterface( const Type & rType ) throw // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL java_sql_Statement_Base::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -173,11 +173,11 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( ) { // ignore } - + Reference< XResultSet > xRes; if ( !out ) { - OSL_ENSURE( m_pConnection && m_pConnection->isAutoRetrievingEnabled(),"Illegal call here. isAutoRetrievingEnabled is false!"); + OSL_ENSURE( m_pConnection && m_pConnection->isAutoRetrievingEnabled(),"Illegal call here. isAutoRetrievingEnabled is false!"); if ( m_pConnection ) { ::rtl::OUString sStmt = m_pConnection->getTransformedGeneratedStatement(m_sSqlStatement); @@ -271,7 +271,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const :: jobject out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { createStatement(t.pEnv); m_sSqlStatement = sql; @@ -367,7 +367,7 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callResultSetMethod(t.env(),"getResultSet",mID); - + // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this ); } @@ -401,7 +401,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! if( out ) { - java_sql_SQLWarning_BASE warn_base( t.pEnv, out ); + java_sql_SQLWarning_BASE warn_base( t.pEnv, out ); return makeAny( static_cast< starsdbc::SQLException >( java_sql_SQLWarning(warn_base,*(::cppu::OWeakObject*)this))); @@ -415,7 +415,7 @@ void SAL_CALL java_sql_Statement_Base::clearWarnings( ) throw(::com::sun::star: ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed); SDBThreadAttach t; - + { createStatement(t.pEnv); static jmethodID mID(NULL); @@ -606,12 +606,12 @@ void java_sql_Statement_Base::setCursorName(const ::rtl::OUString &_par0) throw( Sequence< Property > aProps(10); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(CURSORNAME, ::rtl::OUString); DECL_BOOL_PROP0(ESCAPEPROCESSING); DECL_PROP0(FETCHDIRECTION,sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(MAXFIELDSIZE,sal_Int32); - DECL_PROP0(MAXROWS, sal_Int32); + DECL_PROP0(MAXROWS, sal_Int32); DECL_PROP0(QUERYTIMEOUT,sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); DECL_PROP0(RESULTSETTYPE,sal_Int32); @@ -655,7 +655,7 @@ sal_Bool java_sql_Statement_Base::convertFastPropertyValue( case PROPERTY_ID_ESCAPEPROCESSING: return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bEscapeProcessing ); case PROPERTY_ID_USEBOOKMARKS: - // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); + // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); default: ; } @@ -698,7 +698,7 @@ void java_sql_Statement_Base::setFastPropertyValue_NoBroadcast( setEscapeProcessing( ::comphelper::getBOOL( rValue ) ); break; case PROPERTY_ID_USEBOOKMARKS: - // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); + // return ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAsLink); default: ; } diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index 5b342a2e4f2a..3a7184393fb6 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -2,7 +2,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 @@ -342,7 +342,7 @@ void java_lang_Object::callVoidMethodWithBoolArg( const char* _pMethodName, jmet { SDBThreadAttach t; OSL_ENSURE( t.pEnv, "java_lang_Object::callStringMethod: no Java enviroment anymore!" ); - + // call method jstring out = (jstring)callObjectMethod(t.pEnv,_pMethodName,"()Ljava/lang/String;", _inout_MethodID); return JavaString2String( t.pEnv, out ); diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index 3ca4cfbc0c29..21092d5148d5 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -2,7 +2,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 @@ -83,7 +83,7 @@ jclass java_sql_PreparedStatement::getMyClass() const ::com::sun::star::uno::Any SAL_CALL java_sql_PreparedStatement::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Any aRet = OStatement_BASE2::queryInterface(rType); - return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType, + return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType, static_cast< XPreparedStatement*>(this), static_cast< XParameters*>(this), static_cast< XResultSetMetaDataSupplier*>(this), @@ -92,7 +92,7 @@ jclass java_sql_PreparedStatement::getMyClass() const // ------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_PreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< XParameters > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< XResultSetMetaDataSupplier > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedBatchExecution > *)0 )); @@ -129,7 +129,7 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c m_aLogger.log( LogLevel::FINER, STR_LOG_STRING_PARAMETER, parameterIndex, x ); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - { // temporaere Variable initialisieren + { // temporaere Variable initialisieren createStatement(t.pEnv); static const char * cSignature = "(ILjava/lang/String;)V"; static const char * cMethodName = "setString"; diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx index 12ec9e8f9cd5..6bf9bf9b9f95 100644 --- a/connectivity/source/drivers/jdbc/Reader.cxx +++ b/connectivity/source/drivers/jdbc/Reader.cxx @@ -2,7 +2,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 @@ -70,7 +70,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not { jboolean out(sal_False); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { static const char * cSignature = "()Z"; static const char * cMethodName = "available"; @@ -94,7 +94,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< s OSL_ENSURE(aData.getLength() < nBytesToRead," Sequence is smaller than BytesToRead"); jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - + { jcharArray pCharArray = t.pEnv->NewCharArray(nBytesToRead); static const char * cSignature = "([CII)I"; diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx index cb86ebd08c9b..82a4aa418a44 100644 --- a/connectivity/source/drivers/jdbc/Ref.cxx +++ b/connectivity/source/drivers/jdbc/Ref.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index b2d72cb24d50..b71f145183c5 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -2,7 +2,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 @@ -65,7 +65,7 @@ using namespace ::comphelper; using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -140,7 +140,7 @@ m_xMetaData.clear(); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_ResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getTypes" ); - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -161,7 +161,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getBinaryStream","(I)Ljava/io/InputStream;", mID, columnIndex); - + // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! return out==0 ? 0 : new java_io_InputStream( t.pEnv, out ); } @@ -172,7 +172,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getCharacterStream","(I)Ljava/io/Reader;", mID, columnIndex); - + // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! return out==0 ? 0 : new java_io_Reader( t.pEnv, out ); } @@ -283,7 +283,7 @@ Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex); - + // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! return out==0 ? 0 : new java_sql_Array( t.pEnv, out ); } @@ -316,7 +316,7 @@ Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) t SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex); - + // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! return out==0 ? 0 : new java_sql_Ref( t.pEnv, out ); } @@ -343,7 +343,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen obtainMethodId(t.pEnv, cMethodName,cSignature, mID); } - + out = t.pEnv->CallObjectMethodA( object, mID, args); t.pEnv->DeleteLocalRef((jstring)args[1].l); ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); @@ -582,7 +582,7 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! if( out ) { - java_sql_SQLWarning_BASE warn_base( t.pEnv, out ); + java_sql_SQLWarning_BASE warn_base( t.pEnv, out ); return makeAny( static_cast< starsdbc::SQLException >( java_sql_SQLWarning(warn_base,*this))); @@ -704,7 +704,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateString" ); SDBThreadAttach t; - + { // temporaere Variable initialisieren @@ -717,7 +717,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r obtainMethodId(t.pEnv, cMethodName,cSignature, mID); } - + { // Parameter konvertieren jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x)); @@ -732,7 +732,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateBytes" ); SDBThreadAttach t; - + { // temporaere Variable initialisieren // Java-Call absetzen @@ -744,7 +744,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co obtainMethodId(t.pEnv, cMethodName,cSignature, mID); } - + { jbyteArray aArray = t.pEnv->NewByteArray(x.getLength()); t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),(jbyte*)x.getConstArray()); @@ -801,7 +801,7 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con static const char * cMethodName = "updateBinaryStream"; obtainMethodId(t.pEnv, cMethodName,cSignature, mID); } - + { // Parameter konvertieren jobject obj = createByteInputStream(x,length); @@ -812,8 +812,8 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con } catch(Exception) { - ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateBinaryStream", *this ); - } + ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateBinaryStream", *this ); + } } // ------------------------------------------------------------------------- void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) @@ -833,7 +833,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, static const char * cMethodName = "updateCharacterStream"; obtainMethodId(t.pEnv, cMethodName,cSignature, mID); } - + { // Parameter konvertieren jobject obj = createCharArrayReader(x,length); @@ -844,7 +844,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex, } catch(Exception) { - ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this ); + ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateCharacterStream", *this ); } } // ------------------------------------------------------------------------- @@ -866,11 +866,11 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateNumericObject" ); - // OSL_ENSURE(0,"java_sql_ResultSet::updateNumericObject: NYI"); + // OSL_ENSURE(0,"java_sql_ResultSet::updateNumericObject: NYI"); try { SDBThreadAttach t; - + { // temporaere Variable initialisieren @@ -883,7 +883,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co obtainMethodId(t.pEnv, cMethodName,cSignature, mID); } - + { // Parameter konvertieren double nTemp = 0.0; @@ -920,7 +920,7 @@ sal_Int32 java_sql_ResultSet::getResultSetType() const throw(::com::sun::star::s return callIntMethod("getType",mID,true); } //------------------------------------------------------------------------------ -sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) +sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getFetchDirection" ); static jmethodID mID(NULL); @@ -969,11 +969,11 @@ void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::s Sequence< Property > aProps(5); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); - DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); + DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); return new ::cppu::OPropertyArrayHelper(aProps); } diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx index c922f77f4664..6bbe0d493d02 100644 --- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx +++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx @@ -2,7 +2,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 @@ -36,7 +36,7 @@ using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; diff --git a/connectivity/source/drivers/jdbc/SQLException.cxx b/connectivity/source/drivers/jdbc/SQLException.cxx index 0a9e2712d070..93dd658da42b 100644 --- a/connectivity/source/drivers/jdbc/SQLException.cxx +++ b/connectivity/source/drivers/jdbc/SQLException.cxx @@ -2,7 +2,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 @@ -34,7 +34,7 @@ using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -42,7 +42,7 @@ using namespace ::com::sun::star::lang; //************ Class: java.sql.SQLException //************************************************************** java_sql_SQLException::java_sql_SQLException( const java_sql_SQLException_BASE& _rException,const Reference< XInterface> & _rContext) - : starsdbc::SQLException( _rException.getMessage(), + : starsdbc::SQLException( _rException.getMessage(), _rContext, _rException.getSQLState(), _rException.getErrorCode(), @@ -81,7 +81,7 @@ starsdbc::SQLException java_sql_SQLException_BASE::getNextException() const // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! if( out ) { - java_sql_SQLException_BASE warn_base(t.pEnv,out); + java_sql_SQLException_BASE warn_base(t.pEnv,out); return (starsdbc::SQLException)java_sql_SQLException(warn_base,0); } diff --git a/connectivity/source/drivers/jdbc/SQLWarning.cxx b/connectivity/source/drivers/jdbc/SQLWarning.cxx index 85be40a6c342..ac01b0e2f39a 100644 --- a/connectivity/source/drivers/jdbc/SQLWarning.cxx +++ b/connectivity/source/drivers/jdbc/SQLWarning.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/String.cxx b/connectivity/source/drivers/jdbc/String.cxx index 18af00d67171..a2155054f13c 100644 --- a/connectivity/source/drivers/jdbc/String.cxx +++ b/connectivity/source/drivers/jdbc/String.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx index 40713ed10beb..0ae5b66b6b0d 100644 --- a/connectivity/source/drivers/jdbc/Throwable.cxx +++ b/connectivity/source/drivers/jdbc/Throwable.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx index 27f7734cf63d..6474e9cfc3ec 100644 --- a/connectivity/source/drivers/jdbc/Timestamp.cxx +++ b/connectivity/source/drivers/jdbc/Timestamp.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu index f4f599a701d9..49ae3b401580 100755 --- a/connectivity/source/drivers/jdbc/jdbc.xcu +++ b/connectivity/source/drivers/jdbc/jdbc.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/jdbc/jdbc.xml b/connectivity/source/drivers/jdbc/jdbc.xml index bdce638fcf0f..8fe04eb8a5b1 100644 --- a/connectivity/source/drivers/jdbc/jdbc.xml +++ b/connectivity/source/drivers/jdbc/jdbc.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding="UTF-8"?> <!DOCTYPE module-description PUBLIC "-//W3C//DTD HTML 3.2//EN" "module-description.dtd"> <module-description xmlns:xlink="http://www.w3.org/1999/xlink"> - <module-name> jdbc </module-name> + <module-name> jdbc </module-name> <component-description> <author>Ocke Janssen</author> <name>com.sun.star.comp.sdbc.JDBCDriver</name> @@ -11,9 +11,9 @@ <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> <status value="final"/> - <supported-service> com.sun.star.sdbc.Driver </supported-service> - <service-dependency> ... </service-dependency> - </component-description> + <supported-service> com.sun.star.sdbc.Driver </supported-service> + <service-dependency> ... </service-dependency> + </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 585464125b9d..5d0dc8e2ae39 100644 --- a/connectivity/source/drivers/jdbc/jservices.cxx +++ b/connectivity/source/drivers/jdbc/jservices.cxx @@ -2,7 +2,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 @@ -115,8 +115,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 2bd98c24751e..2485943db4b2 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -2,7 +2,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 @@ -41,7 +41,7 @@ using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -50,7 +50,7 @@ void java_util_Properties::setProperty(const ::rtl::OUString key, const ::rtl::O { SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); jobject out(0); - + { jvalue args[2]; // Parameter konvertieren @@ -116,8 +116,8 @@ jstring connectivity::convertwchar_tToJavaString(JNIEnv *pEnv,const ::rtl::OUStr java_util_Properties* connectivity::createStringPropertyArray(const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) { java_util_Properties* pProps = new java_util_Properties(); - const PropertyValue* pBegin = info.getConstArray(); - const PropertyValue* pEnd = pBegin + info.getLength(); + const PropertyValue* pBegin = info.getConstArray(); + const PropertyValue* pEnd = pBegin + info.getLength(); for(;pBegin != pEnd;++pBegin) { @@ -220,7 +220,7 @@ sal_Bool connectivity::isExceptionOccured(JNIEnv *pEnv,sal_Bool _bClear) } // ----------------------------------------------------------------------------- jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length) -{ +{ SDBThreadAttach t; if( !t.pEnv || !x.is() ) return NULL; @@ -247,7 +247,7 @@ jobject connectivity::createByteInputStream(const ::com::sun::star::uno::Referen } // ----------------------------------------------------------------------------- jobject connectivity::createCharArrayReader(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length) -{ +{ SDBThreadAttach t; if( !t.pEnv || !x.is() ) return NULL; diff --git a/connectivity/source/drivers/kab/KCatalog.cxx b/connectivity/source/drivers/kab/KCatalog.cxx index 99148afd5656..44d95d1e85e7 100644 --- a/connectivity/source/drivers/kab/KCatalog.cxx +++ b/connectivity/source/drivers/kab/KCatalog.cxx @@ -2,7 +2,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 @@ -105,7 +105,7 @@ Reference< XNameAccess > SAL_CALL KabCatalog::getTables( ) throw(RuntimeExcepti { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(rBHelper.bDisposed); - + try { if (!m_pTables) diff --git a/connectivity/source/drivers/kab/KCatalog.hxx b/connectivity/source/drivers/kab/KCatalog.hxx index 27f80caafc73..b24a0a92dbfa 100644 --- a/connectivity/source/drivers/kab/KCatalog.hxx +++ b/connectivity/source/drivers/kab/KCatalog.hxx @@ -2,7 +2,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 @@ -39,7 +39,7 @@ namespace connectivity class KabCatalog : public connectivity::sdbcx::OCatalog { - KabConnection* m_pConnection; // used to get the metadata + KabConnection* m_pConnection; // used to get the metadata ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; // just to make things easier public: diff --git a/connectivity/source/drivers/kab/KColumns.cxx b/connectivity/source/drivers/kab/KColumns.cxx index 398950c192ff..4fd9ca7cb9b7 100644 --- a/connectivity/source/drivers/kab/KColumns.cxx +++ b/connectivity/source/drivers/kab/KColumns.cxx @@ -2,7 +2,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 @@ -90,7 +90,7 @@ void KabColumns::impl_refresh() throw(RuntimeException) m_pTable->refreshColumns(); } // ------------------------------------------------------------------------- -KabColumns::KabColumns( KabTable* _pTable, +KabColumns::KabColumns( KabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector) : sdbcx::OCollection(*_pTable, sal_True, _rMutex, _rVector), diff --git a/connectivity/source/drivers/kab/KColumns.hxx b/connectivity/source/drivers/kab/KColumns.hxx index 6ab3d32a39ec..c31f0e165993 100644 --- a/connectivity/source/drivers/kab/KColumns.hxx +++ b/connectivity/source/drivers/kab/KColumns.hxx @@ -2,7 +2,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 @@ -39,13 +39,13 @@ namespace connectivity class KabColumns : public sdbcx::OCollection { protected: - KabTable* m_pTable; + KabTable* m_pTable; virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException); public: - KabColumns( KabTable* _pTable, + KabColumns( KabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector); }; diff --git a/connectivity/source/drivers/kab/KConnection.cxx b/connectivity/source/drivers/kab/KConnection.cxx index b9761ebe9cb8..d612eed46a53 100644 --- a/connectivity/source/drivers/kab/KConnection.cxx +++ b/connectivity/source/drivers/kab/KConnection.cxx @@ -2,7 +2,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 @@ -48,7 +48,7 @@ using namespace com::sun::star::sdbcx; IMPLEMENT_SERVICE_INFO(KabConnection, "com.sun.star.sdbc.drivers.KabConnection", "com.sun.star.sdbc.Connection") //----------------------------------------------------------------------------- -KabConnection::KabConnection(KabDriver* _pDriver) +KabConnection::KabConnection(KabDriver* _pDriver) : OMetaConnection_BASE(m_aMutex), OSubComponent<KabConnection, KabConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), m_xMetaData(NULL), diff --git a/connectivity/source/drivers/kab/KConnection.hxx b/connectivity/source/drivers/kab/KConnection.hxx index b58460c0a80d..df495478203d 100644 --- a/connectivity/source/drivers/kab/KConnection.hxx +++ b/connectivity/source/drivers/kab/KConnection.hxx @@ -2,7 +2,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 @@ -60,7 +60,7 @@ namespace connectivity class KabDriver; class KabDatabaseMetaData; - typedef OMetaConnection_BASE KabConnection_BASE; // implements basics and text encoding + typedef OMetaConnection_BASE KabConnection_BASE; // implements basics and text encoding typedef std::vector< ::com::sun::star::uno::WeakReferenceHelper > OWeakRefArray; class KabConnection : public comphelper::OBaseMutex, @@ -75,13 +75,13 @@ namespace connectivity //==================================================================== ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; - OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects + OWeakRefArray m_aStatements; // vector containing a list of all the Statement objects // for this Connection - ::KABC::StdAddressBook* m_pAddressBook; // the address book - KabDriver* m_pDriver; // pointer to the owning driver object + ::KABC::StdAddressBook* m_pAddressBook; // the address book + KabDriver* m_pDriver; // pointer to the owning driver object ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> - m_xCatalog; // needed for the SQL interpreter + m_xCatalog; // needed for the SQL interpreter public: virtual void construct( const ::rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException); @@ -131,8 +131,8 @@ namespace connectivity ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL createCatalog(); // accessors - inline KabDriver* getDriver() const { return m_pDriver;} - ::KABC::AddressBook* getAddressBook() const; + inline KabDriver* getDriver() const { return m_pDriver;} + ::KABC::AddressBook* getAddressBook() const; }; } } diff --git a/connectivity/source/drivers/kab/KDEInit.cxx b/connectivity/source/drivers/kab/KDEInit.cxx index 922b636337d4..7264f6086221 100644 --- a/connectivity/source/drivers/kab/KDEInit.cxx +++ b/connectivity/source/drivers/kab/KDEInit.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/KDEInit.h b/connectivity/source/drivers/kab/KDEInit.h index 9a5ea70da211..c1f3963561e2 100644 --- a/connectivity/source/drivers/kab/KDEInit.h +++ b/connectivity/source/drivers/kab/KDEInit.h @@ -2,7 +2,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 @@ -30,9 +30,9 @@ #define CONNECTIVITY_KAB_KDEINIT_H // the address book driver's version -#define KAB_DRIVER_VERSION "0.2" -#define KAB_DRIVER_VERSION_MAJOR 0 -#define KAB_DRIVER_VERSION_MINOR 2 +#define KAB_DRIVER_VERSION "0.2" +#define KAB_DRIVER_VERSION_MAJOR 0 +#define KAB_DRIVER_VERSION_MINOR 2 // the minimum KDE version which is required at runtime #define MIN_KDE_VERSION_MAJOR 3 diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index 8ae1227a0062..a8b3f368f3ae 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -45,14 +45,14 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon) +KabDatabaseMetaData::KabDatabaseMetaData(KabConnection* _pCon) : m_xConnection(_pCon), m_bUseCatalog(sal_True) { OSL_ENSURE(_pCon,"KabDatabaseMetaData::KabDatabaseMetaData: No connection set!"); osl_incrementInterlockedCount( &m_refCount ); - m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); + m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); osl_decrementInterlockedCount( &m_refCount ); } // ------------------------------------------------------------------------- @@ -852,17 +852,17 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getSchemas( ) throw(SQLEx return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumnPrivileges( - const Any&, const ::rtl::OUString&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumnPrivileges( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( const Any&, const ::rtl::OUString&, - const ::rtl::OUString& tableNamePattern, + const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern) throw(SQLException, RuntimeException) { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns); @@ -907,7 +907,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( ::KABC::Field::List aFields = ::KABC::Field::allFields(); ::KABC::Field::List::iterator aField; - for ( aField = aFields.begin(); + for ( aField = aFields.begin(); aField != aFields.end(); ++aField, ++nPosition) { @@ -929,7 +929,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns( return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, @@ -980,25 +980,25 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTables( return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedureColumns( - const Any&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedureColumns( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedures( - const Any&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getProcedures( + const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( const Any&, const ::rtl::OUString&, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns); - + Reference< XResultSet > xRef = pResult; ODatabaseMetaDataResultSet::ORows aRows; @@ -1027,47 +1027,47 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getVersionColumns( return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getExportedKeys( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getExportedKeys( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getImportedKeys( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getImportedKeys( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getPrimaryKeys( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getPrimaryKeys( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getIndexInfo( - const Any&, const ::rtl::OUString&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getIndexInfo( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Bool, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getBestRowIdentifier( - const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Int32, +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getBestRowIdentifier( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Int32, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTablePrivileges( +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTablePrivileges( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference( - const Any&, const ::rtl::OUString&, - const ::rtl::OUString&, const Any&, +Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference( + const Any&, const ::rtl::OUString&, + const ::rtl::OUString&, const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.hxx b/connectivity/source/drivers/kab/KDatabaseMetaData.hxx index 2a3e130b6789..00b0bb64145d 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.hxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.hxx @@ -2,7 +2,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 @@ -45,8 +45,8 @@ namespace connectivity class KabDatabaseMetaData : public KabDatabaseMetaData_BASE { - ::com::sun::star::uno::Reference< KabConnection > m_xConnection; - sal_Bool m_bUseCatalog; + ::com::sun::star::uno::Reference< KabConnection > m_xConnection; + sal_Bool m_bUseCatalog; public: diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index df050f02812e..22368d60fcfe 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/KDriver.hxx b/connectivity/source/drivers/kab/KDriver.hxx index e210bd7d5532..aa2d1f252ba4 100644 --- a/connectivity/source/drivers/kab/KDriver.hxx +++ b/connectivity/source/drivers/kab/KDriver.hxx @@ -2,7 +2,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 @@ -158,11 +158,11 @@ namespace connectivity class KabDriver : public KDriver_BASE { protected: - ::osl::Mutex m_aMutex; // mutex is need to control member access - OWeakRefArray m_xConnections; // vector containing a list of all the + ::osl::Mutex m_aMutex; // mutex is need to control member access + OWeakRefArray m_xConnections; // vector containing a list of all the // KabConnection objects for this Driver ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xMSFactory; // the multi-service factory + m_xMSFactory; // the multi-service factory KabImplModule m_aImplModule; public: diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index 2b1c13649b01..d82ca654d7ac 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx @@ -2,7 +2,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 @@ -58,7 +58,7 @@ void KabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQL // ------------------------------------------------------------------------- void KabPreparedStatement::setKabFields() const throw(SQLException) { - ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns + ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns xColumns = m_aSQLIterator.getSelectColumns(); if (!xColumns.is()) @@ -137,7 +137,7 @@ void SAL_CALL KabPreparedStatement::close() throw(SQLException, RuntimeException { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); - + // Reset last warning message try { clearWarnings (); @@ -165,7 +165,7 @@ sal_Int32 SAL_CALL KabPreparedStatement::executeUpdate() throw(SQLException, Run { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); - + // same as in statement with the difference that this statement also can contain parameter return 0; } @@ -200,64 +200,64 @@ void SAL_CALL KabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32) // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const ::rtl::OUString&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setObjectNull", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBoolean", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setByte", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setShort", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setInt", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setFloat", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setDouble", NULL); } @@ -274,96 +274,96 @@ void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const :: // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBytes", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setDate", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setTime", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setTimestamp", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBinaryStream", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setCharacterStream", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException) -{ +{ if(!::dbtools::implSetObject(this,parameterIndex,x)) { throw SQLException(); - } + } } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setObjectWithInfo", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setRef", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBlob", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setClob", NULL); } // ------------------------------------------------------------------------- void SAL_CALL KabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setArray", NULL); } diff --git a/connectivity/source/drivers/kab/KPreparedStatement.hxx b/connectivity/source/drivers/kab/KPreparedStatement.hxx index dfaf0407e238..876afb1719ec 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.hxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.hxx @@ -2,7 +2,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,7 +42,7 @@ namespace connectivity { class OBoundParam; - typedef ::cppu::ImplInheritanceHelper4< KabCommonStatement, + typedef ::cppu::ImplInheritanceHelper4< KabCommonStatement, ::com::sun::star::sdbc::XPreparedStatement, ::com::sun::star::sdbc::XParameters, ::com::sun::star::sdbc::XResultSetMetaDataSupplier, @@ -51,12 +51,12 @@ namespace connectivity class KabPreparedStatement : public KabPreparedStatement_BASE { protected: - ::rtl::OUString m_sSqlStatement; + ::rtl::OUString m_sSqlStatement; ::rtl::Reference< KabResultSetMetaData > m_xMetaData; - sal_Bool m_bPrepared; - mutable sal_Int32 m_nParameterIndex; - OValueRow m_aParameterRow; + sal_Bool m_bPrepared; + mutable sal_Int32 m_nParameterIndex; + OValueRow m_aParameterRow; void checkAndResizeParameters(sal_Int32 nParams) throw(::com::sun::star::sdbc::SQLException); void setKabFields() const throw(::com::sun::star::sdbc::SQLException); diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx index 7a7043eb34c6..1c1b8f35dc50 100644 --- a/connectivity/source/drivers/kab/KResultSet.cxx +++ b/connectivity/source/drivers/kab/KResultSet.cxx @@ -2,7 +2,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 @@ -54,7 +54,7 @@ using namespace com::sun::star::util; IMPLEMENT_SERVICE_INFO(KabResultSet, "com.sun.star.sdbc.drivers.KabResultSet", "com.sun.star.sdbc.ResultSet"); // ------------------------------------------------------------------------- -KabResultSet::KabResultSet(KabCommonStatement* pStmt) +KabResultSet::KabResultSet(KabCommonStatement* pStmt) : KabResultSet_BASE(m_aMutex), OPropertySetHelper(KabResultSet_BASE::rBHelper), m_xStatement(pStmt), @@ -164,13 +164,13 @@ sal_Int32 SAL_CALL KabResultSet::findColumn(const ::rtl::OUString& columnName) t ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); - // find the first column with the name columnName + // find the first column with the name columnName Reference< XResultSetMetaData > xMeta = getMetaData(); sal_Int32 nLen = xMeta->getColumnCount(); for (sal_Int32 i = 1; i <= nLen; ++i) if (xMeta->isCaseSensitive(i) ? - columnName == xMeta->getColumnName(i) : + columnName == xMeta->getColumnName(i) : columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i))) return i; @@ -180,7 +180,7 @@ sal_Int32 SAL_CALL KabResultSet::findColumn(const ::rtl::OUString& columnName) t "$columnname$",columnName ) ); ::dbtools::throwGenericSQLException(sError,NULL); - + // Unreachable: OSL_ASSERT(false); return 0; @@ -502,7 +502,7 @@ void SAL_CALL KabResultSet::beforeFirst() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); - + // move before the first row m_nRowPos = -1; } @@ -616,7 +616,7 @@ sal_Bool SAL_CALL KabResultSet::rowDeleted() throw(SQLException, RuntimeExceptio } // ------------------------------------------------------------------------- sal_Bool SAL_CALL KabResultSet::rowInserted() throw(SQLException, RuntimeException) -{ +{ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); @@ -666,7 +666,7 @@ void SAL_CALL KabResultSet::updateRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); - + // only when you allow updates } // ------------------------------------------------------------------------- @@ -686,7 +686,7 @@ void SAL_CALL KabResultSet::moveToInsertRow() throw(SQLException, RuntimeExcepti { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); - + // only when you allow inserts } // ------------------------------------------------------------------------- @@ -899,7 +899,7 @@ Sequence< sal_Int32 > SAL_CALL KabResultSet::deleteRows(const Sequence< Any >& { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabResultSet_BASE::rBHelper.bDisposed); - + return Sequence< sal_Int32 >(); } // ------------------------------------------------------------------------- @@ -908,12 +908,12 @@ IPropertyArrayHelper* KabResultSet::createArrayHelper() const Sequence< Property > aProps(6); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY); DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); - DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); + DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); return new OPropertyArrayHelper(aProps); } diff --git a/connectivity/source/drivers/kab/KResultSet.hxx b/connectivity/source/drivers/kab/KResultSet.hxx index fc7e5f49ce26..209f9a1d6c3f 100644 --- a/connectivity/source/drivers/kab/KResultSet.hxx +++ b/connectivity/source/drivers/kab/KResultSet.hxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ namespace connectivity namespace kab { /* - ** KabResultSet + ** KabResultSet */ typedef ::cppu::WeakComponentImplHelper12< ::com::sun::star::sdbc::XResultSet, ::com::sun::star::sdbc::XRow, @@ -61,17 +61,17 @@ namespace connectivity ::com::sun::star::sdbc::XColumnLocate, ::com::sun::star::lang::XServiceInfo> KabResultSet_BASE; - class KabResultSet : public comphelper::OBaseMutex, - public KabResultSet_BASE, - public ::cppu::OPropertySetHelper, - public comphelper::OPropertyArrayUsageHelper<KabResultSet> + class KabResultSet : public comphelper::OBaseMutex, + public KabResultSet_BASE, + public ::cppu::OPropertySetHelper, + public comphelper::OPropertyArrayUsageHelper<KabResultSet> { protected: - ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set - ::rtl::Reference< KabResultSetMetaData > m_xMetaData; // the description of the columns in this result set - ::KABC::Addressee::List m_aKabAddressees; // address book entries matching the query - sal_Int32 m_nRowPos; // the current row within the result set - sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL + ::rtl::Reference< KabCommonStatement > m_xStatement; // the statement that has created this result set + ::rtl::Reference< KabResultSetMetaData > m_xMetaData; // the description of the columns in this result set + ::KABC::Addressee::List m_aKabAddressees; // address book entries matching the query + sal_Int32 m_nRowPos; // the current row within the result set + sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; @@ -98,7 +98,7 @@ namespace connectivity public: DECLARE_SERVICE_INFO(); - + KabResultSet(KabCommonStatement *pStmt); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *() diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx index b4739d632352..c9bc2853f159 100644 --- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.hxx b/connectivity/source/drivers/kab/KResultSetMetaData.hxx index 2e04fa84c8b6..5bf1dd2495a9 100644 --- a/connectivity/source/drivers/kab/KResultSetMetaData.hxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.hxx @@ -2,7 +2,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 @@ -40,14 +40,14 @@ namespace connectivity namespace kab { /* - ** KabResultSetMetaData + ** KabResultSetMetaData */ typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> KabResultSetMetaData_BASE; class KabResultSetMetaData : public KabResultSetMetaData_BASE { - KabConnection* m_pConnection; - ::std::vector<sal_Int32> m_aKabFields; // for each selected column, contains the number + KabConnection* m_pConnection; + ::std::vector<sal_Int32> m_aKabFields; // for each selected column, contains the number // of the corresponding KAddressBook field protected: diff --git a/connectivity/source/drivers/kab/KServices.cxx b/connectivity/source/drivers/kab/KServices.cxx index b2d4ef8f3da8..640f84d96d8b 100644 --- a/connectivity/source/drivers/kab/KServices.cxx +++ b/connectivity/source/drivers/kab/KServices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** + const sal_Char **ppEnvTypeName, + uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 4121681255fd..655e8ae656e2 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -2,7 +2,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 @@ -70,7 +70,7 @@ namespace IMPLEMENT_SERVICE_INFO(KabStatement, "com.sun.star.sdbc.drivers.KabStatement", "com.sun.star.sdbc.Statement"); //------------------------------------------------------------------------------ -KabCommonStatement::KabCommonStatement(KabConnection* _pConnection ) +KabCommonStatement::KabCommonStatement(KabConnection* _pConnection ) : KabCommonStatement_BASE(m_aMutex), OPropertySetHelper(KabCommonStatement_BASE::rBHelper), m_aParser(_pConnection->getDriver()->getMSFactory()), @@ -144,9 +144,9 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse { ::rtl::OUString sMatchString; - if (pRight->isToken()) // WHERE Name = 'Doe' + if (pRight->isToken()) // WHERE Name = 'Doe' sMatchString = pRight->getTokenValue(); - else if (SQL_ISRULE(pRight, parameter)) // WHERE Name = ? + else if (SQL_ISRULE(pRight, parameter)) // WHERE Name = ? getNextParameter(sMatchString); switch (pMiddle->getNodeType()) @@ -189,10 +189,10 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse else if (SQL_ISRULE(pParseNode, test_for_null) || SQL_ISRULE(pParseNode, like_predicate)) { const OSQLParseNode *pLeft = pParseNode->getChild(0); - const OSQLParseNode* pPart2 = pParseNode->getChild(1); + const OSQLParseNode* pPart2 = pParseNode->getChild(1); const OSQLParseNode *pMiddleLeft = pPart2->getChild(0), *pMiddleRight = pPart2->getChild(1), - *pRight = pPart2->getChild(2); + *pRight = pPart2->getChild(2); if (SQL_ISRULE(pParseNode, test_for_null)) { @@ -230,9 +230,9 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse { ::rtl::OUString sMatchString; - if (pMiddleRight->isToken()) // WHERE Name LIKE 'Sm%' + if (pMiddleRight->isToken()) // WHERE Name LIKE 'Sm%' sMatchString = pMiddleRight->getTokenValue(); - else if (SQL_ISRULE(pMiddleRight, parameter)) // WHERE Name LIKE ? + else if (SQL_ISRULE(pMiddleRight, parameter)) // WHERE Name LIKE ? getNextParameter(sMatchString); return new KabConditionSimilar(sColumnName, sMatchString); @@ -311,8 +311,8 @@ sal_Bool KabCommonStatement::isTableKnown(KabResultSet *pResult) const //------------------------------------------------------------------------------ void KabCommonStatement::setKabFields(KabResultSet *pResult) const throw(SQLException) { - ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns - KabResultSetMetaData *pMeta; // meta information - holds the list of KAddressBook fields + ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns + KabResultSetMetaData *pMeta; // meta information - holds the list of KAddressBook fields xColumns = m_aSQLIterator.getSelectColumns(); if (!xColumns.is()) @@ -377,7 +377,7 @@ Any SAL_CALL KabCommonStatement::queryInterface( const Type & rType ) throw(Runt // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL KabCommonStatement::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< XFastPropertySet > *)0 ), ::getCppuType( (const Reference< XPropertySet > *)0 )); @@ -397,7 +397,7 @@ void SAL_CALL KabCommonStatement::close( ) throw(SQLException, RuntimeException { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); - + } dispose(); } @@ -434,20 +434,20 @@ OSL_TRACE("KDE Address book - SQL Request: %s", OUtoCStr(sql)); switch (m_aSQLIterator.getStatementType()) { case SQL_STATEMENT_SELECT: - if (isTableKnown(pResult)) // FROM which table ? + if (isTableKnown(pResult)) // FROM which table ? { - setKabFields(pResult); // SELECT which columns ? - selectAddressees(pResult); // WHERE which condition ? - sortAddressees(pResult); // ORDER BY which columns ? + setKabFields(pResult); // SELECT which columns ? + selectAddressees(pResult); // WHERE which condition ? + sortAddressees(pResult); // ORDER BY which columns ? // To be continued: DISTINCT -// etc... +// etc... } break; default: // To be continued: UPDATE -// DELETE -// etc... +// DELETE +// etc... lcl_throwError(STR_QUERY_TOO_COMPLEX); } @@ -458,7 +458,7 @@ Reference< XConnection > SAL_CALL KabCommonStatement::getConnection( ) throw(SQ { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); - + // just return our connection here return (Reference< XConnection >) m_pConnection; } @@ -467,8 +467,8 @@ sal_Int32 SAL_CALL KabCommonStatement::executeUpdate( const ::rtl::OUString& ) t { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); - - // the return values gives information about how many rows are affected by executing the sql statement + + // the return values gives information about how many rows are affected by executing the sql statement return 0; } // ------------------------------------------------------------------------- @@ -495,12 +495,12 @@ void SAL_CALL KabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeE Sequence< Property > aProps(10); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(CURSORNAME, ::rtl::OUString); DECL_BOOL_PROP0(ESCAPEPROCESSING); DECL_PROP0(FETCHDIRECTION,sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(MAXFIELDSIZE,sal_Int32); - DECL_PROP0(MAXROWS, sal_Int32); + DECL_PROP0(MAXROWS, sal_Int32); DECL_PROP0(QUERYTIMEOUT,sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); DECL_PROP0(RESULTSETTYPE,sal_Int32); @@ -521,7 +521,7 @@ sal_Bool KabCommonStatement::convertFastPropertyValue( const Any&) throw (::com::sun::star::lang::IllegalArgumentException) { sal_Bool bConverted = sal_False; - // here we have to try to convert + // here we have to try to convert return bConverted; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/kab/KStatement.hxx b/connectivity/source/drivers/kab/KStatement.hxx index dcc141fc9bd2..044c473ee1a4 100644 --- a/connectivity/source/drivers/kab/KStatement.hxx +++ b/connectivity/source/drivers/kab/KStatement.hxx @@ -2,7 +2,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 @@ -43,7 +43,7 @@ namespace connectivity { namespace kab { - typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement, + typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement, ::com::sun::star::sdbc::XWarningsSupplier, ::com::sun::star::util::XCancellable, ::com::sun::star::sdbc::XCloseable> KabCommonStatement_BASE; @@ -52,20 +52,20 @@ namespace connectivity // Class KabCommonStatement // is a base class for the normal statement and for the prepared statement //************************************************************** - class KabCommonStatement : public comphelper::OBaseMutex, - public KabCommonStatement_BASE, - public ::cppu::OPropertySetHelper, - public comphelper::OPropertyArrayUsageHelper<KabCommonStatement> + class KabCommonStatement : public comphelper::OBaseMutex, + public KabCommonStatement_BASE, + public ::cppu::OPropertySetHelper, + public comphelper::OPropertyArrayUsageHelper<KabCommonStatement> { - ::com::sun::star::sdbc::SQLWarning m_aLastWarning; + ::com::sun::star::sdbc::SQLWarning m_aLastWarning; protected: - ::std::list< ::rtl::OUString> m_aBatchList; - connectivity::OSQLParser m_aParser; - connectivity::OSQLParseTreeIterator m_aSQLIterator; - connectivity::OSQLParseNode* m_pParseTree; - KabConnection* m_pConnection; // The owning Connection object + ::std::list< ::rtl::OUString> m_aBatchList; + connectivity::OSQLParser m_aParser; + connectivity::OSQLParseTreeIterator m_aSQLIterator; + connectivity::OSQLParseNode* m_pParseTree; + KabConnection* m_pConnection; // The owning Connection object protected: class KabCondition *analyseWhereClause( diff --git a/connectivity/source/drivers/kab/KTable.cxx b/connectivity/source/drivers/kab/KTable.cxx index f0af9c6c41c5..20247273a535 100644 --- a/connectivity/source/drivers/kab/KTable.cxx +++ b/connectivity/source/drivers/kab/KTable.cxx @@ -2,7 +2,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 @@ -45,7 +45,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -KabTable::KabTable( sdbcx::OCollection* _pTables, KabConnection* _pConnection) +KabTable::KabTable( sdbcx::OCollection* _pTables, KabConnection* _pConnection) : KabTable_TYPEDEF(_pTables, sal_True), m_pConnection(_pConnection) { diff --git a/connectivity/source/drivers/kab/KTable.hxx b/connectivity/source/drivers/kab/KTable.hxx index 9ab4fb532143..2b640e4cdbfa 100644 --- a/connectivity/source/drivers/kab/KTable.hxx +++ b/connectivity/source/drivers/kab/KTable.hxx @@ -2,7 +2,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 @@ -46,8 +46,8 @@ namespace connectivity KabConnection* m_pConnection; public: - KabTable( sdbcx::OCollection* _pTables, KabConnection* _pConnection); - KabTable( sdbcx::OCollection* _pTables, + KabTable( sdbcx::OCollection* _pTables, KabConnection* _pConnection); + KabTable( sdbcx::OCollection* _pTables, KabConnection* _pConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, diff --git a/connectivity/source/drivers/kab/KTables.cxx b/connectivity/source/drivers/kab/KTables.cxx index 55f10203b226..31d66547bd24 100644 --- a/connectivity/source/drivers/kab/KTables.cxx +++ b/connectivity/source/drivers/kab/KTables.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/KTables.hxx b/connectivity/source/drivers/kab/KTables.hxx index d2d8179c09cf..438458c8e37c 100644 --- a/connectivity/source/drivers/kab/KTables.hxx +++ b/connectivity/source/drivers/kab/KTables.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/kab.xcu b/connectivity/source/drivers/kab/kab.xcu index d350014a3017..0cc515e4ee40 100755 --- a/connectivity/source/drivers/kab/kab.xcu +++ b/connectivity/source/drivers/kab/kab.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/kab.xml b/connectivity/source/drivers/kab/kab.xml index 943906d6c3e7..115b9f5522d2 100644 --- a/connectivity/source/drivers/kab/kab.xml +++ b/connectivity/source/drivers/kab/kab.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding="UTF-8"?> <!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//W3C//DTD HTML 3.2//EN" "module-description.dtd"> <module-description xmlns:xlink="http://www.w3.org/1999/xlink"> - <module-name> kab1 </module-name> + <module-name> kab1 </module-name> <component-description> <Author>Eric Bischoff</Author> <Name>com.sun.star.comp.sdbc.kab.Driver</Name> @@ -10,68 +10,68 @@ <language>c++</language> <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> - <service-dependency> ... </service-dependency> - </component-description> - <project-build-dependency> cppuhelper </project-build-dependency> - <project-build-dependency> cppu </project-build-dependency> - <project-build-dependency> sal </project-build-dependency> + <service-dependency> ... </service-dependency> + </component-description> + <project-build-dependency> cppuhelper </project-build-dependency> + <project-build-dependency> cppu </project-build-dependency> + <project-build-dependency> sal </project-build-dependency> - <runtime-module-dependency> cppuhelper </runtime-module-dependency> - <runtime-module-dependency> cppu1 </runtime-module-dependency> - <runtime-module-dependency> sal1 </runtime-module-dependency> + <runtime-module-dependency> cppuhelper </runtime-module-dependency> + <runtime-module-dependency> cppu1 </runtime-module-dependency> + <runtime-module-dependency> sal1 </runtime-module-dependency> - <type> com.sun.star.registry.XRegistryKey </type> - <type> com.sun.star.util.XCancellable </type> - <type> com.sun.star.util.XNumberFormatter </type> - <type> com.sun.star.uno.TypeClass </type> - <type> com.sun.star.uno.XWeak </type> - <type> com.sun.star.uno.XAggregation </type> - <type> com.sun.star.uno.XComponentContext </type> - <type> com.sun.star.beans.PropertyAttribute </type> - <type> com.sun.star.beans.XPropertyState </type> - <type> com.sun.star.beans.XPropertySet </type> - <type> com.sun.star.beans.PropertyValue </type> - <type> com.sun.star.beans.XMultiPropertySet </type> - <type> com.sun.star.beans.XFastPropertySet </type> - <type> com.sun.star.lang.XSingleServiceFactory </type> - <type> com.sun.star.lang.XTypeProvider </type> - <type> com.sun.star.lang.XSingleComponentFactory </type> - <type> com.sun.star.lang.EventObject </type> - <type> com.sun.star.lang.XComponent </type> - <type> com.sun.star.lang.IllegalArgumentException </type> - <type> com.sun.star.lang.DisposedException </type> - <type> com.sun.star.lang.XMultiServiceFactory </type> - <type> com.sun.star.lang.XServiceInfo </type> - <type> com.sun.star.lang.XUnoTunnel </type> - <type> com.sun.star.java.XJavaThreadRegister_11 </type> - <type> com.sun.star.java.XJavaVM </type> - <type> com.sun.star.sdbc.FetchDirection </type> - <type> com.sun.star.sdbc.XConnection </type> - <type> com.sun.star.sdbc.XStatement </type> - <type> com.sun.star.sdbc.XResultSet </type> - <type> com.sun.star.sdbc.XResultSetMetaDataSupplier</type> - <type> com.sun.star.sdbc.XColumnLocate </type> - <type> com.sun.star.sdbc.XResultSetUpdate </type> - <type> com.sun.star.sdbc.XWarningsSupplier </type> - <type> com.sun.star.sdbc.XRowUpdate </type> - <type> com.sun.star.sdbc.XMultipleResults </type> - <type> com.sun.star.sdbc.XBatchExecution </type> - <type> com.sun.star.sdbc.XPreparedBatchExecution </type> - <type> com.sun.star.sdbc.XParameters </type> - <type> com.sun.star.sdbc.XOutParameters </type> - <type> com.sun.star.sdbc.DriverPropertyInfo </type> - <type> com.sun.star.sdbc.SQLWarning </type> - <type> com.sun.star.sdbc.XRow </type> - <type> com.sun.star.sdbc.ColumnSearch </type> - <type> com.sun.star.sdbc.ColumnValue </type> - <type> com.sun.star.sdbc.DataType </type> - <type> com.sun.star.sdbc.XDriver </type> - <type> com.sun.star.sdbc.TransactionIsolation </type> - <type> com.sun.star.sdbc.ResultSetType </type> - <type> com.sun.star.sdbc.ResultSetConcurrency </type> - <type> com.sun.star.sdbcx.XRowLocate </type> - <type> com.sun.star.sdbcx.XDeleteRows </type> - <type> com.sun.star.sdbcx.CompareBookmark </type> - <type> com.sun.star.sdb.XColumnUpdate </type> - <type> com.sun.star.sdb.XColumn </type> + <type> com.sun.star.registry.XRegistryKey </type> + <type> com.sun.star.util.XCancellable </type> + <type> com.sun.star.util.XNumberFormatter </type> + <type> com.sun.star.uno.TypeClass </type> + <type> com.sun.star.uno.XWeak </type> + <type> com.sun.star.uno.XAggregation </type> + <type> com.sun.star.uno.XComponentContext </type> + <type> com.sun.star.beans.PropertyAttribute </type> + <type> com.sun.star.beans.XPropertyState </type> + <type> com.sun.star.beans.XPropertySet </type> + <type> com.sun.star.beans.PropertyValue </type> + <type> com.sun.star.beans.XMultiPropertySet </type> + <type> com.sun.star.beans.XFastPropertySet </type> + <type> com.sun.star.lang.XSingleServiceFactory </type> + <type> com.sun.star.lang.XTypeProvider </type> + <type> com.sun.star.lang.XSingleComponentFactory </type> + <type> com.sun.star.lang.EventObject </type> + <type> com.sun.star.lang.XComponent </type> + <type> com.sun.star.lang.IllegalArgumentException </type> + <type> com.sun.star.lang.DisposedException </type> + <type> com.sun.star.lang.XMultiServiceFactory </type> + <type> com.sun.star.lang.XServiceInfo </type> + <type> com.sun.star.lang.XUnoTunnel </type> + <type> com.sun.star.java.XJavaThreadRegister_11 </type> + <type> com.sun.star.java.XJavaVM </type> + <type> com.sun.star.sdbc.FetchDirection </type> + <type> com.sun.star.sdbc.XConnection </type> + <type> com.sun.star.sdbc.XStatement </type> + <type> com.sun.star.sdbc.XResultSet </type> + <type> com.sun.star.sdbc.XResultSetMetaDataSupplier</type> + <type> com.sun.star.sdbc.XColumnLocate </type> + <type> com.sun.star.sdbc.XResultSetUpdate </type> + <type> com.sun.star.sdbc.XWarningsSupplier </type> + <type> com.sun.star.sdbc.XRowUpdate </type> + <type> com.sun.star.sdbc.XMultipleResults </type> + <type> com.sun.star.sdbc.XBatchExecution </type> + <type> com.sun.star.sdbc.XPreparedBatchExecution </type> + <type> com.sun.star.sdbc.XParameters </type> + <type> com.sun.star.sdbc.XOutParameters </type> + <type> com.sun.star.sdbc.DriverPropertyInfo </type> + <type> com.sun.star.sdbc.SQLWarning </type> + <type> com.sun.star.sdbc.XRow </type> + <type> com.sun.star.sdbc.ColumnSearch </type> + <type> com.sun.star.sdbc.ColumnValue </type> + <type> com.sun.star.sdbc.DataType </type> + <type> com.sun.star.sdbc.XDriver </type> + <type> com.sun.star.sdbc.TransactionIsolation </type> + <type> com.sun.star.sdbc.ResultSetType </type> + <type> com.sun.star.sdbc.ResultSetConcurrency </type> + <type> com.sun.star.sdbcx.XRowLocate </type> + <type> com.sun.star.sdbcx.XDeleteRows </type> + <type> com.sun.star.sdbcx.CompareBookmark </type> + <type> com.sun.star.sdb.XColumnUpdate </type> + <type> com.sun.star.sdb.XColumn </type> </module-description> diff --git a/connectivity/source/drivers/kab/kcondition.cxx b/connectivity/source/drivers/kab/kcondition.cxx index 6e44372924e5..2ecdead169f5 100644 --- a/connectivity/source/drivers/kab/kcondition.cxx +++ b/connectivity/source/drivers/kab/kcondition.cxx @@ -2,7 +2,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 @@ -123,7 +123,7 @@ sal_Bool KabConditionEqual::eval(const ::KABC::Addressee &aAddressee) const QString aQtName = valueOfKabField(aAddressee, m_nFieldNumber); // Timestamps should not be compared according to their string value // The syntax for such queries should be like -// {ts '2004-03-29 12:55:00.000000'} +// {ts '2004-03-29 12:55:00.000000'} // They should also support operators like '<' or '>=' if (aQtName.isNull()) return sal_False; diff --git a/connectivity/source/drivers/kab/kcondition.hxx b/connectivity/source/drivers/kab/kcondition.hxx index 34e014c637d6..41873bd420a7 100644 --- a/connectivity/source/drivers/kab/kcondition.hxx +++ b/connectivity/source/drivers/kab/kcondition.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/kfields.cxx b/connectivity/source/drivers/kab/kfields.cxx index 9acae2750e64..cf1632b3cdef 100644 --- a/connectivity/source/drivers/kab/kfields.cxx +++ b/connectivity/source/drivers/kab/kfields.cxx @@ -2,7 +2,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 @@ -69,7 +69,7 @@ sal_uInt32 findKabField(const ::rtl::OUString& columnName) throw(SQLException) ::KABC::Field::List::iterator aField; sal_uInt32 nResult; - for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS; + for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS; aField != aFields.end(); ++aField, ++nResult) { diff --git a/connectivity/source/drivers/kab/kfields.hxx b/connectivity/source/drivers/kab/kfields.hxx index 6a79455f906c..2e628cd41363 100644 --- a/connectivity/source/drivers/kab/kfields.hxx +++ b/connectivity/source/drivers/kab/kfields.hxx @@ -2,7 +2,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 @@ -33,8 +33,8 @@ #include <connectivity/dbexception.hxx> #include <rtl/ustring.hxx> -#define KAB_FIELD_REVISION 0 -#define KAB_DATA_FIELDS 1 +#define KAB_FIELD_REVISION 0 +#define KAB_DATA_FIELDS 1 namespace connectivity { diff --git a/connectivity/source/drivers/kab/korder.cxx b/connectivity/source/drivers/kab/korder.cxx index 6220a2383133..e10d2cfeee38 100644 --- a/connectivity/source/drivers/kab/korder.cxx +++ b/connectivity/source/drivers/kab/korder.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/kab/korder.hxx b/connectivity/source/drivers/kab/korder.hxx index 29fa9637c396..d6df56d3835e 100644 --- a/connectivity/source/drivers/kab/korder.hxx +++ b/connectivity/source/drivers/kab/korder.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx index 346336ae6be8..97469643cf7a 100644 --- a/connectivity/source/drivers/macab/MacabAddressBook.cxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx @@ -2,7 +2,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 @@ -51,7 +51,7 @@ MacabAddressBook::MacabAddressBook( ) m_xMacabRecords = NULL; m_bRetrievedGroups = sal_False; } - + // ----------------------------------------------------------------------------- MacabAddressBook::~MacabAddressBook() { @@ -72,7 +72,7 @@ MacabAddressBook::~MacabAddressBook() m_bRetrievedGroups = sal_False; } - + // ----------------------------------------------------------------------------- /* Get the address book's default table name. This is the table name that * refers to the table containing _all_ records in the address book. diff --git a/connectivity/source/drivers/macab/MacabAddressBook.hxx b/connectivity/source/drivers/macab/MacabAddressBook.hxx index 7ac3f4593d3f..2aefbd8d9ec7 100644 --- a/connectivity/source/drivers/macab/MacabAddressBook.hxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.hxx @@ -2,7 +2,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 @@ -66,7 +66,7 @@ namespace connectivity MacabGroup *getMacabGroupMatch(::rtl::OUString _groupName); MacabRecords *getMacabRecordsMatch(const ::rtl::OUString _tableName); }; - + } } diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx b/connectivity/source/drivers/macab/MacabCatalog.cxx index 2e836e1390b9..bd9342b4bd56 100644 --- a/connectivity/source/drivers/macab/MacabCatalog.cxx +++ b/connectivity/source/drivers/macab/MacabCatalog.cxx @@ -2,7 +2,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 @@ -105,7 +105,7 @@ Reference< XNameAccess > SAL_CALL MacabCatalog::getTables( ) throw(RuntimeExcep { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(rBHelper.bDisposed); - + try { if (!m_pTables) diff --git a/connectivity/source/drivers/macab/MacabCatalog.hxx b/connectivity/source/drivers/macab/MacabCatalog.hxx index c63f4187791a..52e4e7782f89 100644 --- a/connectivity/source/drivers/macab/MacabCatalog.hxx +++ b/connectivity/source/drivers/macab/MacabCatalog.hxx @@ -2,7 +2,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 @@ -39,7 +39,7 @@ namespace connectivity class MacabCatalog : public connectivity::sdbcx::OCatalog { - MacabConnection* m_pConnection; // used to get the metadata + MacabConnection* m_pConnection; // used to get the metadata ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; // just to make things easier public: diff --git a/connectivity/source/drivers/macab/MacabColumns.cxx b/connectivity/source/drivers/macab/MacabColumns.cxx index 8501aadd2a70..0d78b459692f 100644 --- a/connectivity/source/drivers/macab/MacabColumns.cxx +++ b/connectivity/source/drivers/macab/MacabColumns.cxx @@ -2,7 +2,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 @@ -90,7 +90,7 @@ void MacabColumns::impl_refresh() throw(RuntimeException) m_pTable->refreshColumns(); } // ------------------------------------------------------------------------- -MacabColumns::MacabColumns( MacabTable* _pTable, +MacabColumns::MacabColumns( MacabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector) : sdbcx::OCollection(*_pTable, sal_True, _rMutex, _rVector), diff --git a/connectivity/source/drivers/macab/MacabColumns.hxx b/connectivity/source/drivers/macab/MacabColumns.hxx index 3cc87d4bedc8..1d75c8b58515 100644 --- a/connectivity/source/drivers/macab/MacabColumns.hxx +++ b/connectivity/source/drivers/macab/MacabColumns.hxx @@ -2,7 +2,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 @@ -39,13 +39,13 @@ namespace connectivity class MacabColumns : public sdbcx::OCollection { protected: - MacabTable* m_pTable; + MacabTable* m_pTable; virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException); public: - MacabColumns( MacabTable* _pTable, + MacabColumns( MacabTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector); }; diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx index bb9052b463f0..4841430a0721 100644 --- a/connectivity/source/drivers/macab/MacabConnection.cxx +++ b/connectivity/source/drivers/macab/MacabConnection.cxx @@ -2,7 +2,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 @@ -48,7 +48,7 @@ using namespace com::sun::star::sdbcx; IMPLEMENT_SERVICE_INFO(MacabConnection, "com.sun.star.sdbc.drivers.MacabConnection", "com.sun.star.sdbc.Connection") //----------------------------------------------------------------------------- -MacabConnection::MacabConnection(MacabDriver* _pDriver) +MacabConnection::MacabConnection(MacabDriver* _pDriver) : OSubComponent<MacabConnection, MacabConnection_BASE>((::cppu::OWeakObject*)_pDriver, this), m_pAddressBook(NULL), m_pDriver(_pDriver) diff --git a/connectivity/source/drivers/macab/MacabConnection.hxx b/connectivity/source/drivers/macab/MacabConnection.hxx index f149847958b9..65ece28448a5 100644 --- a/connectivity/source/drivers/macab/MacabConnection.hxx +++ b/connectivity/source/drivers/macab/MacabConnection.hxx @@ -2,7 +2,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 @@ -56,7 +56,7 @@ namespace connectivity class MacabDatabaseMetaData; class MacabAddressBook; - //typedef OMetaConnection_BASE MacabConnection_BASE; // implements basics and text encoding + //typedef OMetaConnection_BASE MacabConnection_BASE; // implements basics and text encoding typedef std::vector< ::com::sun::star::uno::WeakReferenceHelper > OWeakRefArray; typedef connectivity::OMetaConnection MacabConnection_BASE; @@ -70,10 +70,10 @@ namespace connectivity //==================================================================== // Data attributes //==================================================================== - MacabAddressBook* m_pAddressBook; // the address book - MacabDriver* m_pDriver; // pointer to the owning driver object + MacabAddressBook* m_pAddressBook; // the address book + MacabDriver* m_pDriver; // pointer to the owning driver object ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> - m_xCatalog; // needed for the SQL interpreter + m_xCatalog; // needed for the SQL interpreter public: virtual void construct( const ::rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException); @@ -123,8 +123,8 @@ namespace connectivity ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL createCatalog(); // accessors - inline MacabDriver* getDriver() const { return m_pDriver;} - MacabAddressBook* getAddressBook() const; + inline MacabDriver* getDriver() const { return m_pDriver;} + MacabAddressBook* getAddressBook() const; }; } } diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index a7217c6bd666..3392d0f208e5 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -50,14 +50,14 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; -MacabDatabaseMetaData::MacabDatabaseMetaData(MacabConnection* _pCon) +MacabDatabaseMetaData::MacabDatabaseMetaData(MacabConnection* _pCon) : m_xConnection(_pCon), m_bUseCatalog(sal_True) { OSL_ENSURE(_pCon,"MacabDatabaseMetaData::MacabDatabaseMetaData: No connection set!"); osl_incrementInterlockedCount( &m_refCount ); - m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); + m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); osl_decrementInterlockedCount( &m_refCount ); } // ------------------------------------------------------------------------- @@ -868,17 +868,17 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getSchemas( ) throw(SQL return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eSchemas ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumnPrivileges( - const Any&, const ::rtl::OUString&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumnPrivileges( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( const Any&, const ::rtl::OUString&, - const ::rtl::OUString& tableNamePattern, + const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern) throw(SQLException, RuntimeException) { ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns); @@ -916,7 +916,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( MacabHeader::iterator aField; - for ( aField = aHeader->begin(); + for ( aField = aHeader->begin(); aField != aHeader->end(); ++aField, ++nPosition) { @@ -962,7 +962,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getColumns( return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, @@ -1005,7 +1005,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( ::std::vector<MacabGroup *> xGroups = m_xConnection->getAddressBook()->getMacabGroups(); sal_Int32 i, nGroups; nGroups = xGroups.size(); - + aRow[0] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[1] = ODatabaseMetaDataResultSet::getEmptyValue(); aRow[2] = ODatabaseMetaDataResultSet::getEmptyValue(); @@ -1024,21 +1024,21 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables( return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedureColumns( - const Any&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedureColumns( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedures( - const Any&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getProcedures( + const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( const Any&, const ::rtl::OUString&, const ::rtl::OUString& table ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eVersionColumns ); @@ -1071,47 +1071,47 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getVersionColumns( return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getExportedKeys( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getExportedKeys( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getImportedKeys( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getImportedKeys( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getPrimaryKeys( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getPrimaryKeys( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getIndexInfo( - const Any&, const ::rtl::OUString&, const ::rtl::OUString&, +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getIndexInfo( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Bool, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getBestRowIdentifier( - const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Int32, +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getBestRowIdentifier( + const Any&, const ::rtl::OUString&, const ::rtl::OUString&, sal_Int32, sal_Bool ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTablePrivileges( +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTablePrivileges( const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference( - const Any&, const ::rtl::OUString&, - const ::rtl::OUString&, const Any&, +Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference( + const Any&, const ::rtl::OUString&, + const ::rtl::OUString&, const Any&, const ::rtl::OUString&, const ::rtl::OUString& ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx index 0cc796bda9be..852cd32c7db0 100644 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx @@ -2,7 +2,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 @@ -45,8 +45,8 @@ namespace connectivity class MacabDatabaseMetaData : public MacabDatabaseMetaData_BASE { - ::com::sun::star::uno::Reference< MacabConnection > m_xConnection; - sal_Bool m_bUseCatalog; + ::com::sun::star::uno::Reference< MacabConnection > m_xConnection; + sal_Bool m_bUseCatalog; public: diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index 796b814710db..abcfe98bd0a0 100644 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabDriver.hxx b/connectivity/source/drivers/macab/MacabDriver.hxx index 2648e3871e82..c21715ec09fb 100644 --- a/connectivity/source/drivers/macab/MacabDriver.hxx +++ b/connectivity/source/drivers/macab/MacabDriver.hxx @@ -2,7 +2,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 @@ -38,9 +38,9 @@ #include <osl/module.h> // the address book driver's version -#define MACAB_DRIVER_VERSION "0.1" -#define MACAB_DRIVER_VERSION_MAJOR 0 -#define MACAB_DRIVER_VERSION_MINOR 1 +#define MACAB_DRIVER_VERSION "0.1" +#define MACAB_DRIVER_VERSION_MAJOR 0 +#define MACAB_DRIVER_VERSION_MINOR 1 namespace connectivity { @@ -131,11 +131,11 @@ namespace connectivity class MacabDriver : public MacabDriver_BASE { protected: - ::osl::Mutex m_aMutex; // mutex is need to control member access - OWeakRefArray m_xConnections; // vector containing a list of all the + ::osl::Mutex m_aMutex; // mutex is need to control member access + OWeakRefArray m_xConnections; // vector containing a list of all the // MacabConnection objects for this Driver ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xMSFactory; // the multi-service factory + m_xMSFactory; // the multi-service factory MacabImplModule m_aImplModule; public: diff --git a/connectivity/source/drivers/macab/MacabGroup.cxx b/connectivity/source/drivers/macab/MacabGroup.cxx index f254e2d48f82..6f0dabf45b0f 100644 --- a/connectivity/source/drivers/macab/MacabGroup.cxx +++ b/connectivity/source/drivers/macab/MacabGroup.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabGroup.hxx b/connectivity/source/drivers/macab/MacabGroup.hxx index afc45408face..1f09ac0d09ad 100644 --- a/connectivity/source/drivers/macab/MacabGroup.hxx +++ b/connectivity/source/drivers/macab/MacabGroup.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabHeader.cxx b/connectivity/source/drivers/macab/MacabHeader.cxx index c8b28853feff..11519522d683 100644 --- a/connectivity/source/drivers/macab/MacabHeader.cxx +++ b/connectivity/source/drivers/macab/MacabHeader.cxx @@ -2,7 +2,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 @@ -66,7 +66,7 @@ MacabHeader::MacabHeader(const sal_Int32 _size, macabfield **_fields) CFRetain(fields[i]->value); } } - + } // ------------------------------------------------------------------------- @@ -124,7 +124,7 @@ void MacabHeader::operator+= (const MacabHeader *r) numToAdd++; } } - + newFields = new macabfield *[size+numToAdd]; for(i = 0; i < size; i++) { @@ -249,7 +249,7 @@ macabfield **MacabHeader::sortRecord(const sal_Int32 _start, const sal_Int32 _le return sorted; } -sal_Int32 MacabHeader::compareFields(const macabfield *_field1, const macabfield *_field2) +sal_Int32 MacabHeader::compareFields(const macabfield *_field1, const macabfield *_field2) { /* Comparing two fields in a MacabHeader is different than comparing two * fields in a MacabRecord. It starts in the same way (if one of the two diff --git a/connectivity/source/drivers/macab/MacabHeader.hxx b/connectivity/source/drivers/macab/MacabHeader.hxx index 05c381928ce4..b0dc2820e6cb 100644 --- a/connectivity/source/drivers/macab/MacabHeader.hxx +++ b/connectivity/source/drivers/macab/MacabHeader.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index aa94353e72cd..19d9c5f9de9e 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx @@ -2,7 +2,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 @@ -59,7 +59,7 @@ void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(S // ------------------------------------------------------------------------- void MacabPreparedStatement::setMacabFields() const throw(SQLException) { - ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns + ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns xColumns = m_aSQLIterator.getSelectColumns(); if (!xColumns.is()) @@ -150,7 +150,7 @@ void SAL_CALL MacabPreparedStatement::close() throw(SQLException, RuntimeExcepti { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed); - + // Reset last warning message try { clearWarnings (); @@ -178,7 +178,7 @@ sal_Int32 SAL_CALL MacabPreparedStatement::executeUpdate() throw(SQLException, R { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed); - + // same as in statement with the difference that this statement also can contain parameter return 0; } @@ -213,64 +213,64 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3 // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const ::rtl::OUString&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setObjectNull", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBoolean", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setByte", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setShort", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setInt", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setLong", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setFloat", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setDouble", NULL); } @@ -287,48 +287,48 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBytes", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setDate", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setTime", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setTimestamp", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBinaryStream", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setCharacterStream", NULL); } @@ -347,40 +347,40 @@ void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setObjectWithInfo", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setRef", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setBlob", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setClob", NULL); } // ------------------------------------------------------------------------- void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException) { - - + + ::dbtools::throwFunctionNotSupportedException("setArray", NULL); } diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.hxx b/connectivity/source/drivers/macab/MacabPreparedStatement.hxx index 15443ef7636c..0fb1b6e92d91 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.hxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.hxx @@ -2,7 +2,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,7 +42,7 @@ namespace connectivity { class OBoundParam; - typedef ::cppu::ImplInheritanceHelper4< MacabCommonStatement, + typedef ::cppu::ImplInheritanceHelper4< MacabCommonStatement, ::com::sun::star::sdbc::XPreparedStatement, ::com::sun::star::sdbc::XParameters, ::com::sun::star::sdbc::XResultSetMetaDataSupplier, @@ -51,12 +51,12 @@ namespace connectivity class MacabPreparedStatement : public MacabPreparedStatement_BASE { protected: - ::rtl::OUString m_sSqlStatement; + ::rtl::OUString m_sSqlStatement; ::rtl::Reference< MacabResultSetMetaData > m_xMetaData; - sal_Bool m_bPrepared; - mutable sal_Int32 m_nParameterIndex; - OValueRow m_aParameterRow; + sal_Bool m_bPrepared; + mutable sal_Int32 m_nParameterIndex; + OValueRow m_aParameterRow; void checkAndResizeParameters(sal_Int32 nParams) throw(::com::sun::star::sdbc::SQLException); void setMacabFields() const throw(::com::sun::star::sdbc::SQLException); diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx index d3521663e9e1..bb6eb60661f0 100644 --- a/connectivity/source/drivers/macab/MacabRecord.cxx +++ b/connectivity/source/drivers/macab/MacabRecord.cxx @@ -2,7 +2,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 @@ -173,9 +173,9 @@ void MacabRecord::releaseFields() } // ------------------------------------------------------------------------- -sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield *_field2) +sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield *_field2) { - + /* When comparing records, if either field is NULL (and the other is * not), that field is considered "greater than" the other, so that it * shows up later in the list when fields are ordered. @@ -247,7 +247,7 @@ macabfield *MacabRecord::createMacabField(const ::rtl::OUString _newFieldString, case kABDateProperty: { DateTime aDateTime = DBTypeConversion::toDateTime(_newFieldString); - + // bad format... if(aDateTime.Year == 0 && aDateTime.Month == 0 && aDateTime.Day == 0) { diff --git a/connectivity/source/drivers/macab/MacabRecord.hxx b/connectivity/source/drivers/macab/MacabRecord.hxx index 9ab992eeb27a..aa47f8377bba 100644 --- a/connectivity/source/drivers/macab/MacabRecord.hxx +++ b/connectivity/source/drivers/macab/MacabRecord.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index 02c3a90cf511..601808e9a7bf 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -2,7 +2,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 @@ -152,7 +152,7 @@ void MacabRecords::initialize() records[i] = createMacabRecord(record, header, recordType); } currentRecord = recordsSize; - + CFRelease(allRecords); } @@ -204,7 +204,7 @@ MacabRecord *MacabRecords::insertRecord(MacabRecord *_newRecord, const sal_Int32 */ if(_location >= currentRecord) currentRecord = _location+1; - + oldRecord = records[_location]; records[_location] = _newRecord; return oldRecord; @@ -352,7 +352,7 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records, CFArrayRef allProperties = ABCopyArrayOfPropertiesForRecordType(addressBook, _recordType); CFStringRef *nonRequiredProperties; sal_Int32 numRecords = (sal_Int32) CFArrayGetCount(_records); - sal_Int32 numProperties = (sal_Int32) CFArrayGetCount(allProperties); + sal_Int32 numProperties = (sal_Int32) CFArrayGetCount(allProperties); sal_Int32 numNonRequiredProperties = numProperties - numRequiredProperties; /* While searching through the properties for required properties, these @@ -546,7 +546,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert if(_propertyValue != NULL) { sal_Int32 i; - + sal_Int32 multiLength = ABMultiValueCount((ABMutableMultiValueRef) _propertyValue); CFStringRef multiLabel, localizedMultiLabel; ::rtl::OUString multiLabelString; @@ -651,7 +651,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert j++; k = 0; } - + headerNames[i] = multiHeaders[j]->copy(k); } for(i = 0; i < multiLengthFirstLevel; i++) @@ -660,7 +660,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert delete [] multiHeaders; } break; - + /* Dictionary */ case kABDictionaryProperty: /* For non-scalars, we can only get more information if the property @@ -729,7 +729,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert j++; k = 0; } - + headerNames[i] = dictHeaders[j]->copy(k); } @@ -789,7 +789,7 @@ MacabHeader *MacabRecords::createHeaderForProperty(const ABPropertyType _propert j++; k = 0; } - + headerNames[i] = arrHeaders[j]->copy(k); } for(i = 0; i < arrLength; i++) @@ -869,7 +869,7 @@ MacabRecord *MacabRecords::createMacabRecord(const ABRecordRef _abrecord, const MacabRecord *macabRecord = new MacabRecord(_header->getSize()); CFArrayRef recordProperties = ABCopyArrayOfPropertiesForRecordType(addressBook, _recordType); - sal_Int32 numProperties = (sal_Int32) CFArrayGetCount(recordProperties); + sal_Int32 numProperties = (sal_Int32) CFArrayGetCount(recordProperties); sal_Int32 i; @@ -955,7 +955,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyT sal_Bool bPlaced = sal_False; ::rtl::OUString columnName = ::rtl::OUString(_propertyName); sal_Int32 i = 1; - + // A big safeguard to prevent two fields from having the same name. while(bPlaced != sal_True) { diff --git a/connectivity/source/drivers/macab/MacabRecords.hxx b/connectivity/source/drivers/macab/MacabRecords.hxx index 80c87ee7d40a..dfd6cb8429f7 100644 --- a/connectivity/source/drivers/macab/MacabRecords.hxx +++ b/connectivity/source/drivers/macab/MacabRecords.hxx @@ -2,7 +2,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 @@ -71,7 +71,7 @@ namespace connectivity /* For required properties */ CFStringRef *requiredProperties; sal_Int32 numRequiredProperties; - + private: /* All of the private methods are for creating a MacabHeader or a * MacabRecord. They are used by the initialize method that goes diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 242e92f3cc13..314337fbe73a 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -2,7 +2,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 @@ -56,7 +56,7 @@ using namespace com::sun::star::util; IMPLEMENT_SERVICE_INFO(MacabResultSet, "com.sun.star.sdbc.drivers.MacabResultSet", "com.sun.star.sdbc.ResultSet"); // ------------------------------------------------------------------------- -MacabResultSet::MacabResultSet(MacabCommonStatement* pStmt) +MacabResultSet::MacabResultSet(MacabCommonStatement* pStmt) : MacabResultSet_BASE(m_aMutex), OPropertySetHelper(MacabResultSet_BASE::rBHelper), m_xStatement(pStmt), @@ -75,7 +75,7 @@ MacabResultSet::~MacabResultSet() void MacabResultSet::allMacabRecords() { MacabConnection* pConnection = static_cast< MacabConnection *>(m_xStatement->getConnection().get()); - + m_aMacabRecords = pConnection->getAddressBook()->getMacabRecords(m_sTableName); } // ------------------------------------------------------------------------- @@ -83,7 +83,7 @@ void MacabResultSet::someMacabRecords(const MacabCondition *pCondition) { MacabConnection* pConnection = static_cast< MacabConnection *>(m_xStatement->getConnection().get()); MacabRecords* allRecords; - + allRecords = pConnection->getAddressBook()->getMacabRecords(m_sTableName); // Bad table!! Throw exception? @@ -191,13 +191,13 @@ sal_Int32 SAL_CALL MacabResultSet::findColumn(const ::rtl::OUString& columnName) ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); - // find the first column with the name columnName + // find the first column with the name columnName Reference< XResultSetMetaData > xMeta = getMetaData(); sal_Int32 nLen = xMeta->getColumnCount(); for (sal_Int32 i = 1; i <= nLen; ++i) if (xMeta->isCaseSensitive(i) ? - columnName == xMeta->getColumnName(i) : + columnName == xMeta->getColumnName(i) : columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i))) return i; @@ -578,7 +578,7 @@ void SAL_CALL MacabResultSet::beforeFirst() throw(SQLException, RuntimeException { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); - + // move before the first row m_nRowPos = -1; } @@ -692,7 +692,7 @@ sal_Bool SAL_CALL MacabResultSet::rowDeleted() throw(SQLException, RuntimeExcept } // ------------------------------------------------------------------------- sal_Bool SAL_CALL MacabResultSet::rowInserted() throw(SQLException, RuntimeException) -{ +{ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); @@ -742,7 +742,7 @@ void SAL_CALL MacabResultSet::updateRow() throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); - + // only when you allow updates } // ------------------------------------------------------------------------- @@ -762,7 +762,7 @@ void SAL_CALL MacabResultSet::moveToInsertRow() throw(SQLException, RuntimeExcep { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); - + // only when you allow inserts } // ------------------------------------------------------------------------- @@ -985,7 +985,7 @@ Sequence< sal_Int32 > SAL_CALL MacabResultSet::deleteRows(const Sequence< Any { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); - + return Sequence< sal_Int32 >(); } // ------------------------------------------------------------------------- @@ -994,12 +994,12 @@ IPropertyArrayHelper* MacabResultSet::createArrayHelper() const Sequence< Property > aProps(6); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY); DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); - DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); + DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); return new OPropertyArrayHelper(aProps); } diff --git a/connectivity/source/drivers/macab/MacabResultSet.hxx b/connectivity/source/drivers/macab/MacabResultSet.hxx index 46363e979469..029aa6c13ad0 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.hxx +++ b/connectivity/source/drivers/macab/MacabResultSet.hxx @@ -2,7 +2,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 @@ -45,7 +45,7 @@ namespace connectivity namespace macab { /* - ** MacabResultSet + ** MacabResultSet */ typedef ::cppu::WeakComponentImplHelper12< ::com::sun::star::sdbc::XResultSet, ::com::sun::star::sdbc::XRow, @@ -61,18 +61,18 @@ namespace connectivity ::com::sun::star::lang::XServiceInfo> MacabResultSet_BASE; class MacabRecords; - class MacabResultSet : public comphelper::OBaseMutex, - public MacabResultSet_BASE, - public ::cppu::OPropertySetHelper, - public comphelper::OPropertyArrayUsageHelper<MacabResultSet> + class MacabResultSet : public comphelper::OBaseMutex, + public MacabResultSet_BASE, + public ::cppu::OPropertySetHelper, + public comphelper::OPropertyArrayUsageHelper<MacabResultSet> { protected: - ::rtl::Reference< MacabCommonStatement > m_xStatement; // the statement that has created this result set - ::rtl::Reference< MacabResultSetMetaData > m_xMetaData; // the description of the columns in this result set - MacabRecords * m_aMacabRecords; // address book entries matching the query - sal_Int32 m_nRowPos; // the current row within the result set - sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL - ::rtl::OUString m_sTableName; + ::rtl::Reference< MacabCommonStatement > m_xStatement; // the statement that has created this result set + ::rtl::Reference< MacabResultSetMetaData > m_xMetaData; // the description of the columns in this result set + MacabRecords * m_aMacabRecords; // address book entries matching the query + sal_Int32 m_nRowPos; // the current row within the result set + sal_Bool m_bWasNull; // last entry retrieved from this result set was NULL + ::rtl::OUString m_sTableName; // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; @@ -99,7 +99,7 @@ namespace connectivity public: DECLARE_SERVICE_INFO(); - + MacabResultSet(MacabCommonStatement *pStmt); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *() diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx index 21cd4e9727c5..27ff55dcedb3 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx @@ -2,7 +2,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 @@ -58,7 +58,7 @@ void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity: static const ::rtl::OUString aName(::rtl::OUString::createFromAscii("Name")); MacabRecords *aRecords; MacabHeader *aHeader; - + aRecords = m_pConnection->getAddressBook()->getMacabRecords(m_sTableName); // In case, somehow, we don't have anything with the name m_sTableName @@ -78,7 +78,7 @@ void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity: nFieldNumber = aHeader->getColumnNumber(aFieldName); m_aMacabFields.push_back(nFieldNumber); } - + } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnDisplaySize(sal_Int32 column) throw(SQLException, RuntimeException) @@ -92,7 +92,7 @@ sal_Int32 SAL_CALL MacabResultSetMetaData::getColumnType(sal_Int32 column) throw MacabRecords *aRecords; MacabHeader *aHeader; macabfield *aField; - + aRecords = m_pConnection->getAddressBook()->getMacabRecords(m_sTableName); // In case, somehow, we don't have anything with the name m_sTableName @@ -133,7 +133,7 @@ sal_Bool SAL_CALL MacabResultSetMetaData::isCaseSensitive(sal_Int32) throw(SQLEx sal_uInt32 nFieldNumber = m_aMacabFields[column - 1]; MacabRecords *aRecords; MacabHeader *aHeader; - + aRecords = m_pConnection->getAddressBook()->getMacabRecords(m_sTableName); // In case, somehow, we don't have anything with the name m_sTableName diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx index ab5b9bd20062..2140a03b3073 100644 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx @@ -2,7 +2,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 @@ -41,15 +41,15 @@ namespace connectivity namespace macab { /* - ** MacabResultSetMetaData + ** MacabResultSetMetaData */ typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> MacabResultSetMetaData_BASE; class MacabResultSetMetaData : public MacabResultSetMetaData_BASE { - MacabConnection* m_pConnection; - ::rtl::OUString m_sTableName; - ::std::vector<sal_Int32> m_aMacabFields; // for each selected column, contains the number + MacabConnection* m_pConnection; + ::rtl::OUString m_sTableName; + ::std::vector<sal_Int32> m_aMacabFields; // for each selected column, contains the number // of the corresponding AddressBook field protected: diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx index cc3535ec5586..d6e9e7b385a2 100644 --- a/connectivity/source/drivers/macab/MacabServices.cxx +++ b/connectivity/source/drivers/macab/MacabServices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest //--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** + const sal_Char **ppEnvTypeName, + uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index 583dc62910b6..fa2654131fa2 100644 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx @@ -2,7 +2,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 @@ -73,7 +73,7 @@ namespace connectivity IMPLEMENT_SERVICE_INFO(MacabStatement, "com.sun.star.sdbc.drivers.MacabStatement", "com.sun.star.sdbc.Statement"); //------------------------------------------------------------------------------ -MacabCommonStatement::MacabCommonStatement(MacabConnection* _pConnection ) +MacabCommonStatement::MacabCommonStatement(MacabConnection* _pConnection ) : MacabCommonStatement_BASE(m_aMutex), OPropertySetHelper(MacabCommonStatement_BASE::rBHelper), m_aParser(_pConnection->getDriver()->getMSFactory()), @@ -147,9 +147,9 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP { ::rtl::OUString sMatchString; - if (pRight->isToken()) // WHERE Name = 'Doe' + if (pRight->isToken()) // WHERE Name = 'Doe' sMatchString = pRight->getTokenValue(); - else if (SQL_ISRULE(pRight, parameter)) // WHERE Name = ? + else if (SQL_ISRULE(pRight, parameter)) // WHERE Name = ? getNextParameter(sMatchString); switch (pMiddle->getNodeType()) @@ -192,7 +192,7 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP else if (SQL_ISRULE(pParseNode, test_for_null) || SQL_ISRULE(pParseNode, like_predicate)) { const OSQLParseNode *pLeft = pParseNode->getChild(0); - const OSQLParseNode* pPart2 = pParseNode->getChild(1); + const OSQLParseNode* pPart2 = pParseNode->getChild(1); const OSQLParseNode *pMiddleLeft = pPart2->getChild(0), *pMiddleRight = pPart2->getChild(1), *pRight = pPart2->getChild(2); @@ -233,9 +233,9 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP { ::rtl::OUString sMatchString; - if (pMiddleRight->isToken()) // WHERE Name LIKE 'Sm%' + if (pMiddleRight->isToken()) // WHERE Name LIKE 'Sm%' sMatchString = pMiddleRight->getTokenValue(); - else if (SQL_ISRULE(pMiddleRight, parameter)) // WHERE Name LIKE ? + else if (SQL_ISRULE(pMiddleRight, parameter)) // WHERE Name LIKE ? getNextParameter(sMatchString); return new MacabConditionSimilar(m_pHeader, sColumnName, sMatchString); @@ -313,8 +313,8 @@ MacabOrder *MacabCommonStatement::analyseOrderByClause(const OSQLParseNode *pPar //------------------------------------------------------------------------------ void MacabCommonStatement::setMacabFields(MacabResultSet *pResult) const throw(SQLException) { - ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns - MacabResultSetMetaData *pMeta; // meta information - holds the list of AddressBook fields + ::rtl::Reference<connectivity::OSQLColumns> xColumns; // selected columns + MacabResultSetMetaData *pMeta; // meta information - holds the list of AddressBook fields xColumns = m_aSQLIterator.getSelectColumns(); if (!xColumns.is()) @@ -385,7 +385,7 @@ Any SAL_CALL MacabCommonStatement::queryInterface( const Type & rType ) throw(Ru // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL MacabCommonStatement::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< XFastPropertySet > *)0 ), ::getCppuType( (const Reference< XPropertySet > *)0 )); @@ -405,7 +405,7 @@ void SAL_CALL MacabCommonStatement::close( ) throw(SQLException, RuntimeExcepti { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed); - + } dispose(); } @@ -460,20 +460,20 @@ OSL_TRACE("Mac OS Address book - SQL Request: %s", OUtoCStr(sql)); pResult->setTableName(sTableName); - setMacabFields(pResult); // SELECT which columns ? - selectRecords(pResult); // WHERE which condition ? - sortRecords(pResult); // ORDER BY which columns ? + setMacabFields(pResult); // SELECT which columns ? + selectRecords(pResult); // WHERE which condition ? + sortRecords(pResult); // ORDER BY which columns ? } // To be continued: DISTINCT -// etc... +// etc... } } break; default: // To be continued: UPDATE -// DELETE -// etc... +// DELETE +// etc... impl_throwError(STR_QUERY_TOO_COMPLEX); } @@ -485,7 +485,7 @@ Reference< XConnection > SAL_CALL MacabCommonStatement::getConnection( ) throw( { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed); - + // just return our connection here return (Reference< XConnection >) m_pConnection; } @@ -494,8 +494,8 @@ sal_Int32 SAL_CALL MacabCommonStatement::executeUpdate( const ::rtl::OUString& ) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed); - - // the return values gives information about how many rows are affected by executing the sql statement + + // the return values gives information about how many rows are affected by executing the sql statement return 0; } // ------------------------------------------------------------------------- @@ -522,12 +522,12 @@ void SAL_CALL MacabCommonStatement::clearWarnings( ) throw(SQLException, Runtim Sequence< Property > aProps(10); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(CURSORNAME, ::rtl::OUString); DECL_BOOL_PROP0(ESCAPEPROCESSING); DECL_PROP0(FETCHDIRECTION,sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(MAXFIELDSIZE,sal_Int32); - DECL_PROP0(MAXROWS, sal_Int32); + DECL_PROP0(MAXROWS, sal_Int32); DECL_PROP0(QUERYTIMEOUT,sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); DECL_PROP0(RESULTSETTYPE,sal_Int32); @@ -548,7 +548,7 @@ sal_Bool MacabCommonStatement::convertFastPropertyValue( const Any&) throw (::com::sun::star::lang::IllegalArgumentException) { sal_Bool bConverted = sal_False; - // here we have to try to convert + // here we have to try to convert return bConverted; } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/macab/MacabStatement.hxx b/connectivity/source/drivers/macab/MacabStatement.hxx index e9fabc4ee9dc..0eda7b05f5b9 100644 --- a/connectivity/source/drivers/macab/MacabStatement.hxx +++ b/connectivity/source/drivers/macab/MacabStatement.hxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ namespace connectivity { namespace macab { - typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement, + typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::sdbc::XStatement, ::com::sun::star::sdbc::XWarningsSupplier, ::com::sun::star::util::XCancellable, ::com::sun::star::sdbc::XCloseable> MacabCommonStatement_BASE; @@ -53,23 +53,23 @@ namespace connectivity // Class MacabCommonStatement // is a base class for the normal statement and for the prepared statement //************************************************************** - class MacabCommonStatement : public comphelper::OBaseMutex, - public MacabCommonStatement_BASE, - public ::cppu::OPropertySetHelper, - public comphelper::OPropertyArrayUsageHelper<MacabCommonStatement> + class MacabCommonStatement : public comphelper::OBaseMutex, + public MacabCommonStatement_BASE, + public ::cppu::OPropertySetHelper, + public comphelper::OPropertyArrayUsageHelper<MacabCommonStatement> { - ::com::sun::star::sdbc::SQLWarning m_aLastWarning; + ::com::sun::star::sdbc::SQLWarning m_aLastWarning; protected: - ::std::list< ::rtl::OUString> m_aBatchList; - connectivity::OSQLParser m_aParser; - connectivity::OSQLParseTreeIterator m_aSQLIterator; - connectivity::OSQLParseNode* m_pParseTree; - MacabConnection* m_pConnection; // The owning Connection object - MacabHeader* m_pHeader; // The header of the address book on which to run queries (provided by m_pConnection) + ::std::list< ::rtl::OUString> m_aBatchList; + connectivity::OSQLParser m_aParser; + connectivity::OSQLParseTreeIterator m_aSQLIterator; + connectivity::OSQLParseNode* m_pParseTree; + MacabConnection* m_pConnection; // The owning Connection object + MacabHeader* m_pHeader; // The header of the address book on which to run queries (provided by m_pConnection) ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xResultSet; // The last ResultSet created - + protected: class MacabCondition *analyseWhereClause( diff --git a/connectivity/source/drivers/macab/MacabTable.cxx b/connectivity/source/drivers/macab/MacabTable.cxx index f6d78221d30d..ab4ff29d6578 100644 --- a/connectivity/source/drivers/macab/MacabTable.cxx +++ b/connectivity/source/drivers/macab/MacabTable.cxx @@ -2,7 +2,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 @@ -45,7 +45,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -MacabTable::MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection) +MacabTable::MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection) : MacabTable_TYPEDEF(_pTables, sal_True), m_pConnection(_pConnection) { diff --git a/connectivity/source/drivers/macab/MacabTable.hxx b/connectivity/source/drivers/macab/MacabTable.hxx index 1375aacc2e9a..39f113368e63 100644 --- a/connectivity/source/drivers/macab/MacabTable.hxx +++ b/connectivity/source/drivers/macab/MacabTable.hxx @@ -2,7 +2,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 @@ -46,8 +46,8 @@ namespace connectivity MacabConnection* m_pConnection; public: - MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection); - MacabTable( sdbcx::OCollection* _pTables, + MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection); + MacabTable( sdbcx::OCollection* _pTables, MacabConnection* _pConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx index eddd6a68ab7f..1d839f40f90b 100644 --- a/connectivity/source/drivers/macab/MacabTables.cxx +++ b/connectivity/source/drivers/macab/MacabTables.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/MacabTables.hxx b/connectivity/source/drivers/macab/MacabTables.hxx index 657fa753d7d3..17422ce862a2 100644 --- a/connectivity/source/drivers/macab/MacabTables.hxx +++ b/connectivity/source/drivers/macab/MacabTables.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/macab.xcu b/connectivity/source/drivers/macab/macab.xcu index 0845bc9a2ce2..cbb9d0b6b0c0 100755 --- a/connectivity/source/drivers/macab/macab.xcu +++ b/connectivity/source/drivers/macab/macab.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/macab.xml b/connectivity/source/drivers/macab/macab.xml index b524d1b0bd50..e1c4b57c378b 100755 --- a/connectivity/source/drivers/macab/macab.xml +++ b/connectivity/source/drivers/macab/macab.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding="UTF-8"?> <!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//W3C//DTD HTML 3.2//EN" "module-description.dtd"> <module-description xmlns:xlink="http://www.w3.org/1999/xlink"> - <module-name> macab1 </module-name> + <module-name> macab1 </module-name> <component-description> <Author>Omer bar-or</Author> <Name>com.sun.star.comp.sdbc.macab.Driver</Name> @@ -10,68 +10,68 @@ <language>c++</language> <status value="alpha"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> - <service-dependency> ... </service-dependency> - </component-description> - <project-build-dependency> cppuhelper </project-build-dependency> - <project-build-dependency> cppu </project-build-dependency> - <project-build-dependency> sal </project-build-dependency> + <service-dependency> ... </service-dependency> + </component-description> + <project-build-dependency> cppuhelper </project-build-dependency> + <project-build-dependency> cppu </project-build-dependency> + <project-build-dependency> sal </project-build-dependency> - <runtime-module-dependency> cppuhelper </runtime-module-dependency> - <runtime-module-dependency> cppu1 </runtime-module-dependency> - <runtime-module-dependency> sal1 </runtime-module-dependency> + <runtime-module-dependency> cppuhelper </runtime-module-dependency> + <runtime-module-dependency> cppu1 </runtime-module-dependency> + <runtime-module-dependency> sal1 </runtime-module-dependency> - <type> com.sun.star.registry.XRegistryKey </type> - <type> com.sun.star.util.XCancellable </type> - <type> com.sun.star.util.XNumberFormatter </type> - <type> com.sun.star.uno.TypeClass </type> - <type> com.sun.star.uno.XWeak </type> - <type> com.sun.star.uno.XAggregation </type> - <type> com.sun.star.uno.XComponentContext </type> - <type> com.sun.star.beans.PropertyAttribute </type> - <type> com.sun.star.beans.XPropertyState </type> - <type> com.sun.star.beans.XPropertySet </type> - <type> com.sun.star.beans.PropertyValue </type> - <type> com.sun.star.beans.XMultiPropertySet </type> - <type> com.sun.star.beans.XFastPropertySet </type> - <type> com.sun.star.lang.XSingleServiceFactory </type> - <type> com.sun.star.lang.XTypeProvider </type> - <type> com.sun.star.lang.XSingleComponentFactory </type> - <type> com.sun.star.lang.EventObject </type> - <type> com.sun.star.lang.XComponent </type> - <type> com.sun.star.lang.IllegalArgumentException </type> - <type> com.sun.star.lang.DisposedException </type> - <type> com.sun.star.lang.XMultiServiceFactory </type> - <type> com.sun.star.lang.XServiceInfo </type> - <type> com.sun.star.lang.XUnoTunnel </type> - <type> com.sun.star.java.XJavaThreadRegister_11 </type> - <type> com.sun.star.java.XJavaVM </type> - <type> com.sun.star.sdbc.FetchDirection </type> - <type> com.sun.star.sdbc.XConnection </type> - <type> com.sun.star.sdbc.XStatement </type> - <type> com.sun.star.sdbc.XResultSet </type> - <type> com.sun.star.sdbc.XResultSetMetaDataSupplier</type> - <type> com.sun.star.sdbc.XColumnLocate </type> - <type> com.sun.star.sdbc.XResultSetUpdate </type> - <type> com.sun.star.sdbc.XWarningsSupplier </type> - <type> com.sun.star.sdbc.XRowUpdate </type> - <type> com.sun.star.sdbc.XMultipleResults </type> - <type> com.sun.star.sdbc.XBatchExecution </type> - <type> com.sun.star.sdbc.XPreparedBatchExecution </type> - <type> com.sun.star.sdbc.XParameters </type> - <type> com.sun.star.sdbc.XOutParameters </type> - <type> com.sun.star.sdbc.DriverPropertyInfo </type> - <type> com.sun.star.sdbc.SQLWarning </type> - <type> com.sun.star.sdbc.XRow </type> - <type> com.sun.star.sdbc.ColumnSearch </type> - <type> com.sun.star.sdbc.ColumnValue </type> - <type> com.sun.star.sdbc.DataType </type> - <type> com.sun.star.sdbc.XDriver </type> - <type> com.sun.star.sdbc.TransactionIsolation </type> - <type> com.sun.star.sdbc.ResultSetType </type> - <type> com.sun.star.sdbc.ResultSetConcurrency </type> - <type> com.sun.star.sdbcx.XRowLocate </type> - <type> com.sun.star.sdbcx.XDeleteRows </type> - <type> com.sun.star.sdbcx.CompareBookmark </type> - <type> com.sun.star.sdb.XColumnUpdate </type> - <type> com.sun.star.sdb.XColumn </type> + <type> com.sun.star.registry.XRegistryKey </type> + <type> com.sun.star.util.XCancellable </type> + <type> com.sun.star.util.XNumberFormatter </type> + <type> com.sun.star.uno.TypeClass </type> + <type> com.sun.star.uno.XWeak </type> + <type> com.sun.star.uno.XAggregation </type> + <type> com.sun.star.uno.XComponentContext </type> + <type> com.sun.star.beans.PropertyAttribute </type> + <type> com.sun.star.beans.XPropertyState </type> + <type> com.sun.star.beans.XPropertySet </type> + <type> com.sun.star.beans.PropertyValue </type> + <type> com.sun.star.beans.XMultiPropertySet </type> + <type> com.sun.star.beans.XFastPropertySet </type> + <type> com.sun.star.lang.XSingleServiceFactory </type> + <type> com.sun.star.lang.XTypeProvider </type> + <type> com.sun.star.lang.XSingleComponentFactory </type> + <type> com.sun.star.lang.EventObject </type> + <type> com.sun.star.lang.XComponent </type> + <type> com.sun.star.lang.IllegalArgumentException </type> + <type> com.sun.star.lang.DisposedException </type> + <type> com.sun.star.lang.XMultiServiceFactory </type> + <type> com.sun.star.lang.XServiceInfo </type> + <type> com.sun.star.lang.XUnoTunnel </type> + <type> com.sun.star.java.XJavaThreadRegister_11 </type> + <type> com.sun.star.java.XJavaVM </type> + <type> com.sun.star.sdbc.FetchDirection </type> + <type> com.sun.star.sdbc.XConnection </type> + <type> com.sun.star.sdbc.XStatement </type> + <type> com.sun.star.sdbc.XResultSet </type> + <type> com.sun.star.sdbc.XResultSetMetaDataSupplier</type> + <type> com.sun.star.sdbc.XColumnLocate </type> + <type> com.sun.star.sdbc.XResultSetUpdate </type> + <type> com.sun.star.sdbc.XWarningsSupplier </type> + <type> com.sun.star.sdbc.XRowUpdate </type> + <type> com.sun.star.sdbc.XMultipleResults </type> + <type> com.sun.star.sdbc.XBatchExecution </type> + <type> com.sun.star.sdbc.XPreparedBatchExecution </type> + <type> com.sun.star.sdbc.XParameters </type> + <type> com.sun.star.sdbc.XOutParameters </type> + <type> com.sun.star.sdbc.DriverPropertyInfo </type> + <type> com.sun.star.sdbc.SQLWarning </type> + <type> com.sun.star.sdbc.XRow </type> + <type> com.sun.star.sdbc.ColumnSearch </type> + <type> com.sun.star.sdbc.ColumnValue </type> + <type> com.sun.star.sdbc.DataType </type> + <type> com.sun.star.sdbc.XDriver </type> + <type> com.sun.star.sdbc.TransactionIsolation </type> + <type> com.sun.star.sdbc.ResultSetType </type> + <type> com.sun.star.sdbc.ResultSetConcurrency </type> + <type> com.sun.star.sdbcx.XRowLocate </type> + <type> com.sun.star.sdbcx.XDeleteRows </type> + <type> com.sun.star.sdbcx.CompareBookmark </type> + <type> com.sun.star.sdb.XColumnUpdate </type> + <type> com.sun.star.sdb.XColumn </type> </module-description> diff --git a/connectivity/source/drivers/macab/macabcondition.cxx b/connectivity/source/drivers/macab/macabcondition.cxx index 9c584cb96803..3faf0aa26137 100644 --- a/connectivity/source/drivers/macab/macabcondition.cxx +++ b/connectivity/source/drivers/macab/macabcondition.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/macabcondition.hxx b/connectivity/source/drivers/macab/macabcondition.hxx index d268c4100bdb..29f27bc52ff6 100644 --- a/connectivity/source/drivers/macab/macabcondition.hxx +++ b/connectivity/source/drivers/macab/macabcondition.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/macaborder.cxx b/connectivity/source/drivers/macab/macaborder.cxx index c1afc29d7867..fa8ba7a1abfb 100644 --- a/connectivity/source/drivers/macab/macaborder.cxx +++ b/connectivity/source/drivers/macab/macaborder.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/macaborder.hxx b/connectivity/source/drivers/macab/macaborder.hxx index 2dbc6c5d2850..bad4bc813306 100644 --- a/connectivity/source/drivers/macab/macaborder.hxx +++ b/connectivity/source/drivers/macab/macaborder.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/macab/macabutilities.hxx b/connectivity/source/drivers/macab/macabutilities.hxx index 2f128ed000a0..9b9aa1f6443d 100644 --- a/connectivity/source/drivers/macab/macabutilities.hxx +++ b/connectivity/source/drivers/macab/macabutilities.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/MCatalog.cxx b/connectivity/source/drivers/mozab/MCatalog.cxx index 45e399473eee..4cf749277227 100644 --- a/connectivity/source/drivers/mozab/MCatalog.cxx +++ b/connectivity/source/drivers/mozab/MCatalog.cxx @@ -2,7 +2,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 @@ -50,12 +50,12 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon) ,m_pConnection(_pCon) ,m_xMetaData(m_pConnection->getMetaData( )) { -// osl_incrementInterlockedCount( &m_refCount ); -// refreshTables(); -// refreshViews(); -// refreshGroups(); -// refreshUsers(); -// osl_decrementInterlockedCount( &m_refCount ); +// osl_incrementInterlockedCount( &m_refCount ); +// refreshTables(); +// refreshViews(); +// refreshGroups(); +// refreshUsers(); +// osl_decrementInterlockedCount( &m_refCount ); } // ------------------------------------------------------------------------- void OCatalog::refreshTables() diff --git a/connectivity/source/drivers/mozab/MCatalog.hxx b/connectivity/source/drivers/mozab/MCatalog.hxx index d75774f7de05..cc57748fe15e 100644 --- a/connectivity/source/drivers/mozab/MCatalog.hxx +++ b/connectivity/source/drivers/mozab/MCatalog.hxx @@ -2,7 +2,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 @@ -39,22 +39,22 @@ namespace connectivity class OConnection; class OCatalog : public connectivity::sdbcx::OCatalog { - OConnection* m_pConnection; // used to get the metadata + OConnection* m_pConnection; // used to get the metadata ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; // just to make things easier public: // implementation of the pure virtual methods virtual void refreshTables(); - virtual void refreshViews() ; + virtual void refreshViews() ; virtual void refreshGroups(); - virtual void refreshUsers() ; + virtual void refreshUsers() ; virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTables( ) throw(::com::sun::star::uno::RuntimeException); public: OCatalog(OConnection* _pCon); - OConnection* getConnection() const { return m_pConnection; } - sdbcx::OCollection* getPrivateTables() const { return m_pTables;} - sdbcx::OCollection* getPrivateViews() const { return m_pViews; } + OConnection* getConnection() const { return m_pConnection; } + sdbcx::OCollection* getPrivateTables() const { return m_pTables;} + sdbcx::OCollection* getPrivateViews() const { return m_pViews; } static const ::rtl::OUString& getDot(); }; diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx index 211a7c307542..72a35ef63d5b 100644 --- a/connectivity/source/drivers/mozab/MColumnAlias.cxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/MColumnAlias.hxx b/connectivity/source/drivers/mozab/MColumnAlias.hxx index 5e4858062aaa..b668bba01e5f 100644 --- a/connectivity/source/drivers/mozab/MColumnAlias.hxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/MColumns.cxx b/connectivity/source/drivers/mozab/MColumns.cxx index a3a838a11104..6a95f44df03a 100644 --- a/connectivity/source/drivers/mozab/MColumns.cxx +++ b/connectivity/source/drivers/mozab/MColumns.cxx @@ -2,7 +2,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 @@ -49,7 +49,7 @@ using namespace connectivity::sdbcx; using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -68,9 +68,9 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName) { if(xRow->getString(4) == _rName) { - sal_Int32 nType = xRow->getInt(5); - ::rtl::OUString sTypeName = xRow->getString(6); - sal_Int32 nPrec = xRow->getInt(7); + sal_Int32 nType = xRow->getInt(5); + ::rtl::OUString sTypeName = xRow->getString(6); + sal_Int32 nPrec = xRow->getInt(7); OColumn* pRet = new OColumn(_rName, sTypeName, diff --git a/connectivity/source/drivers/mozab/MColumns.hxx b/connectivity/source/drivers/mozab/MColumns.hxx index 6328dc36e1f2..ffa11ed4af10 100644 --- a/connectivity/source/drivers/mozab/MColumns.hxx +++ b/connectivity/source/drivers/mozab/MColumns.hxx @@ -2,7 +2,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 @@ -41,12 +41,12 @@ namespace connectivity class OColumns : public sdbcx::OCollection { protected: - OTable* m_pTable; + OTable* m_pTable; virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException); public: - OColumns( OTable* _pTable, + OColumns( OTable* _pTable, ::osl::Mutex& _rMutex, const TStringVector &_rVector ) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector) diff --git a/connectivity/source/drivers/mozab/MConfigAccess.cxx b/connectivity/source/drivers/mozab/MConfigAccess.cxx index 0e4d36fe4daa..c45ee87ff8a8 100644 --- a/connectivity/source/drivers/mozab/MConfigAccess.cxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.cxx @@ -2,7 +2,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 @@ -190,8 +190,8 @@ namespace connectivity //------------------------------------------------------------------------- extern "C" const sal_Unicode* SAL_CALL getUserProfile( void ) { - static sal_Bool bReadConfig = sal_False; - static ::rtl::OUString sUserProfile; + static sal_Bool bReadConfig = sal_False; + static ::rtl::OUString sUserProfile; if ( !bReadConfig ) { sUserProfile = ::connectivity::mozab::getPreferredProfileName( ); @@ -203,9 +203,9 @@ extern "C" const sal_Unicode* SAL_CALL getUserProfile( void ) //------------------------------------------------------------------------ extern "C" const sal_Char* SAL_CALL getPabDescription( void ) { - static sal_Bool bReadConfig = sal_False; - static ::rtl::OUString usPabDescription; - static ::rtl::OString sPabDescription; + static sal_Bool bReadConfig = sal_False; + static ::rtl::OUString usPabDescription; + static ::rtl::OString sPabDescription; if ( !bReadConfig ) { @@ -223,9 +223,9 @@ extern "C" const sal_Char* SAL_CALL getPabDescription( void ) //------------------------------------------------------------------------- extern "C" const sal_Char* SAL_CALL getHisDescription( void ) { - static sal_Bool bReadConfig = sal_False; - static ::rtl::OUString usHisDescription; - static ::rtl::OString sHisDescription; + static sal_Bool bReadConfig = sal_False; + static ::rtl::OUString usHisDescription; + static ::rtl::OString sHisDescription; if ( !bReadConfig ) { diff --git a/connectivity/source/drivers/mozab/MConfigAccess.hxx b/connectivity/source/drivers/mozab/MConfigAccess.hxx index 7aa02d0b4b5e..7b66797a1f81 100644 --- a/connectivity/source/drivers/mozab/MConfigAccess.hxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.hxx @@ -2,7 +2,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 @@ -36,6 +36,6 @@ extern "C" const sal_Char* SAL_CALL getPabDescription( void ); extern "C" const sal_Char* SAL_CALL getHisDescription( void ); -#endif // CONNECTIVITY_MOZAB_MCONFIGACCESS_HXX +#endif // CONNECTIVITY_MOZAB_MCONFIGACCESS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index 68a2349a347e..cdf3c6df917c 100644 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx @@ -2,7 +2,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 @@ -120,7 +120,7 @@ const sal_Char* getSchemeURI( MozillaScheme _eScheme ) // ----------------------------------------------------------------------------- -OConnection::OConnection(MozabDriver* _pDriver) +OConnection::OConnection(MozabDriver* _pDriver) :OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) ,m_pDriver(_pDriver) ,m_pImplData( new ConnectionImplData ) @@ -152,7 +152,7 @@ void SAL_CALL OConnection::release() throw() void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { OSL_TRACE("IN OConnection::construct()\n" ); - // open file + // open file setURL(url); // // Skip 'sdbc:mozab: part of URL @@ -378,7 +378,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const :: OPreparedStatement* pPrepared = new OPreparedStatement(this,_sSql); Reference< XPreparedStatement > xReturn = pPrepared; pPrepared->lateInit(); - + m_aStatements.push_back(WeakReferenceHelper(xReturn)); return xReturn; } diff --git a/connectivity/source/drivers/mozab/MConnection.hxx b/connectivity/source/drivers/mozab/MConnection.hxx index 76dcb328c2c4..4ec99a12940c 100644 --- a/connectivity/source/drivers/mozab/MConnection.hxx +++ b/connectivity/source/drivers/mozab/MConnection.hxx @@ -2,7 +2,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 @@ -56,12 +56,12 @@ namespace connectivity namespace SDBCAddress { typedef enum { - Unknown = 0, - Mozilla = 1, - ThunderBird = 2, - LDAP = 3, - Outlook = 4, - OutlookExp = 5 + Unknown = 0, + Mozilla = 1, + ThunderBird = 2, + LDAP = 3, + Outlook = 4, + OutlookExp = 5 } sdbc_address_type; } @@ -96,7 +96,7 @@ namespace connectivity #endif const sal_Char* getSdbcScheme( SdbcScheme _eScheme ); - typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding + typedef connectivity::OMetaConnection OConnection_BASE; // implements basics and text encoding struct ConnectionImplData; class OConnection : public OConnection_BASE, @@ -110,34 +110,34 @@ namespace connectivity //==================================================================== ::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by // an operation - MozabDriver* m_pDriver; // Pointer to the owning + MozabDriver* m_pDriver; // Pointer to the owning // driver object ::std::auto_ptr< ConnectionImplData > m_pImplData; // This is to be able to hold a boost::shared_ptr. If we would hold it as member, it would // not compile the mozillasrc directory, since this directory is compiled without RTTI support // and boost seems to require RTTI on some platforms. // Store Catalog - ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog; // Start of Additions from the land of mozilla OColumnAlias m_aColumnAlias; rtl::OUString m_sMozillaURI; rtl::OUString m_sMozillaProfile; - sal_Int32 m_nMaxResultRecords; - MNameMapper* m_aNameMapper; + sal_Int32 m_nMaxResultRecords; + MNameMapper* m_aNameMapper; //LDAP only rtl::OUString m_sHostName; sal_Bool m_bUseSSL; rtl::OUString m_sBindDN; - rtl::OUString m_sUser; // the user name + rtl::OUString m_sUser; // the user name rtl::OUString m_sPassword; - SDBCAddress::sdbc_address_type m_eSDBCAddressType; + SDBCAddress::sdbc_address_type m_eSDBCAddressType; sal_Bool m_bForceLoadTable; public: virtual void construct( const ::rtl::OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException); - OConnection(MozabDriver* _pDriver); + OConnection(MozabDriver* _pDriver); virtual ~OConnection(); void closeAllStatements () throw( ::com::sun::star::sdbc::SQLException); @@ -174,7 +174,7 @@ namespace connectivity virtual ::com::sun::star::uno::Any SAL_CALL getWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL clearWarnings( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // - MozabDriver* getDriver() const { return m_pDriver;} + MozabDriver* getDriver() const { return m_pDriver;} // Added to enable me to use SQLInterpreter which requires an // XNameAccess i/f to access tables. @@ -182,9 +182,9 @@ namespace connectivity // Additions from the land of mozilla - rtl::OUString getMozURI() const { return m_sMozillaURI; } - rtl::OUString getMozProfile() const { return m_sMozillaProfile; } - void setMozProfile(rtl::OUString &aNewProfile) { m_sMozillaProfile = aNewProfile; } + rtl::OUString getMozURI() const { return m_sMozillaURI; } + rtl::OUString getMozProfile() const { return m_sMozillaProfile; } + void setMozProfile(rtl::OUString &aNewProfile) { m_sMozillaProfile = aNewProfile; } ::com::sun::star::mozilla::MozillaProductType getProduct() { @@ -206,14 +206,14 @@ namespace connectivity sal_Bool isLDAP(void) const { return m_eSDBCAddressType == SDBCAddress::LDAP; } sal_Bool isThunderbird(void) const { return m_eSDBCAddressType == SDBCAddress::ThunderBird; } - sal_Bool isOutlookExpress() const { return m_eSDBCAddressType == SDBCAddress::OutlookExp;} - sal_Int32 getMaxResultRecords() const { return m_nMaxResultRecords; } + sal_Bool isOutlookExpress() const { return m_eSDBCAddressType == SDBCAddress::OutlookExp;} + sal_Int32 getMaxResultRecords() const { return m_nMaxResultRecords; } SDBCAddress::sdbc_address_type getSDBCAddressType() const { return m_eSDBCAddressType;} const OColumnAlias & getColumnAlias() const { return (m_aColumnAlias); } - static ::rtl::OUString getDriverImplementationName(); + static ::rtl::OUString getDriverImplementationName(); MNameMapper* getNameMapper(); void setForceLoadTables(sal_Bool aForce){ m_bForceLoadTable = aForce;} diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx index 4bcea69d2f1a..161d0bced0d3 100644 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx @@ -2,7 +2,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 @@ -223,7 +223,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnsInTable( ) throw(SQLExceptio return nValue; } // ------------------------------------------------------------------------- -sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) +sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { return 0; } @@ -234,7 +234,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLExcepti return nValue; } // ------------------------------------------------------------------------- -sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) +sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { // We only support a single table return 1; @@ -256,7 +256,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return sal_False; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return sal_False; } @@ -303,7 +303,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns( ) throw(SQLExc return aVal; } // ------------------------------------------------------------------------- -::rtl::OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) +::rtl::OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { // normally this is " return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("\"")); @@ -381,7 +381,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return sal_False; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return sal_False; } @@ -406,7 +406,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return sal_False; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return sal_False; } @@ -976,7 +976,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( ::std::vector< ::rtl::OUString > tables; ::std::vector< ::rtl::OUString > types; - if ( !m_pDbMetaDataHelper->getTableStrings( m_pConnection, tables, types ) ) + if ( !m_pDbMetaDataHelper->getTableStrings( m_pConnection, tables, types ) ) getOwnConnection()->throwSQLException( m_pDbMetaDataHelper->getError(), *this ); ::connectivity::ODatabaseMetaDataResultSet::ORows aRows; diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx index 4fb8d5f9a145..89f908367d3e 100644 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx @@ -2,7 +2,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 @@ -41,7 +41,7 @@ namespace connectivity class ODatabaseMetaData : public ODatabaseMetaDataBase { - OConnection* m_pConnection; + OConnection* m_pConnection; MDatabaseMetaDataHelper* m_pDbMetaDataHelper; ODatabaseMetaDataResultSet::ORows& SAL_CALL getColumnRows( const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern ) throw( ::com::sun::star::sdbc::SQLException ); @@ -53,7 +53,7 @@ namespace connectivity inline OConnection* getOwnConnection() const { return m_pConnection; } ODatabaseMetaData(OConnection* _pCon); - + private: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw(); // cached database information @@ -70,7 +70,7 @@ namespace connectivity virtual sal_Int32 impl_getMaxStatements_throw( ); virtual sal_Int32 impl_getMaxTablesInSelect_throw( ); virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ); - + // as I mentioned before this interface is really BIG // XDatabaseMetaData virtual sal_Bool SAL_CALL allProceduresAreCallable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index c88c6742e6b9..0b2950b3dd31 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -2,7 +2,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 @@ -69,7 +69,7 @@ MozabDriver::~MozabDriver() void MozabDriver::disposing() { ::osl::MutexGuard aGuard(m_aMutex); - + // when driver will be destroied so all our connections have to be destroied as well for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i) { @@ -100,7 +100,7 @@ rtl::OUString MozabDriver::getImplementationName_Static( ) throw(RuntimeExcepti //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > MozabDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { - // which service is supported + // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< ::rtl::OUString > aSNS( 1 ); aSNS[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); @@ -149,8 +149,8 @@ Reference< XConnection > SAL_CALL MozabDriver::connect( const ::rtl::OUString& u OSL_ENSURE( xInstance.is(), "failed to create instance" ); OConnection* pCon = reinterpret_cast<OConnection*>((*m_pCreationFunc)(this)); - xCon = pCon; // important here because otherwise the connection could be deleted inside (refcount goes -> 0) - pCon->construct(url,info); // late constructor call which can throw exception and allows a correct dtor call when so + xCon = pCon; // important here because otherwise the connection could be deleted inside (refcount goes -> 0) + pCon->construct(url,info); // late constructor call which can throw exception and allows a correct dtor call when so m_xConnections.push_back(WeakReferenceHelper(*pCon)); } @@ -161,14 +161,14 @@ Reference< XConnection > SAL_CALL MozabDriver::connect( const ::rtl::OUString& u STR_COULD_NOT_LOAD_LIB, "$libname$", ::rtl::OUString::createFromAscii( SVLIBRARY( "mozabdrv" ) ) ) ); - + ::dbtools::throwGenericSQLException(sError,*this); } - + return xCon; } // -------------------------------------------------------------------------------- -sal_Bool SAL_CALL MozabDriver::acceptsURL( const ::rtl::OUString& url ) +sal_Bool SAL_CALL MozabDriver::acceptsURL( const ::rtl::OUString& url ) throw(SQLException, RuntimeException) { if ( !ensureInit() ) @@ -203,7 +203,7 @@ Sequence< DriverPropertyInfo > SAL_CALL MozabDriver::getPropertyInfo( const ::rt ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("100")) ,Sequence< ::rtl::OUString >()) ); - return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); } ::connectivity::SharedResources aResources; const ::rtl::OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); diff --git a/connectivity/source/drivers/mozab/MDriver.hxx b/connectivity/source/drivers/mozab/MDriver.hxx index b8ea911c7db1..5684486b39b7 100644 --- a/connectivity/source/drivers/mozab/MDriver.hxx +++ b/connectivity/source/drivers/mozab/MDriver.hxx @@ -2,7 +2,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 @@ namespace connectivity namespace mozab { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MozabDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ); - + typedef void* (SAL_CALL * OMozabConnection_CreateInstanceFunction)(void* _pDriver ); typedef void (SAL_CALL * OSetMozabServiceFactory)( void* _pFactory ); typedef const void* (SAL_CALL * OGetSdbcScheme_Function)( short ); - typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver, + typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver, ::com::sun::star::lang::XServiceInfo > ODriver_BASE; enum EDriverType @@ -66,11 +66,11 @@ namespace connectivity protected: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xMSFactory; - ::osl::Mutex m_aMutex; // mutex is need to control member access - connectivity::OWeakRefArray m_xConnections; // vector containing a list + ::osl::Mutex m_aMutex; // mutex is need to control member access + connectivity::OWeakRefArray m_xConnections; // vector containing a list // of all the Connection objects // for this Driver - oslModule m_hModule; + oslModule m_hModule; OMozabConnection_CreateInstanceFunction m_pCreationFunc; OGetSdbcScheme_Function m_pSchemeFunction; diff --git a/connectivity/source/drivers/mozab/MExtConfigAccess.hxx b/connectivity/source/drivers/mozab/MExtConfigAccess.hxx index bc1b4fdc07d4..94f15db36bbf 100644 --- a/connectivity/source/drivers/mozab/MExtConfigAccess.hxx +++ b/connectivity/source/drivers/mozab/MExtConfigAccess.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index f8d417bf60da..c221684cbb9d 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx @@ -2,7 +2,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 @@ -387,7 +387,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons // ----------------------------------------------------------------------------- void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) { - if( !_parameterIndex || _parameterIndex > m_nNumParams) + if( !_parameterIndex || _parameterIndex > m_nNumParams) ::dbtools::throwInvalidIndexException(*this); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.hxx b/connectivity/source/drivers/mozab/MPreparedStatement.hxx index 31cfa97bc3f0..cf2dd1986e73 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.hxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.hxx @@ -2,7 +2,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 @@ -101,7 +101,7 @@ namespace connectivity void checkAndResizeParameters(sal_Int32 parameterIndex); void setParameter(sal_Int32 parameterIndex, const ORowSetValue& x); - sal_uInt32 AddParameter(connectivity::OSQLParseNode * pParameter, + sal_uInt32 AddParameter(connectivity::OSQLParseNode * pParameter, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol); void scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes); void describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable); diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index 50aee9f216ea..8ca4e57b8166 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -71,8 +71,8 @@ using namespace com::sun::star::io; using namespace com::sun::star::util; //------------------------------------------------------------------------------ -// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); -::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) \ +// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); +::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) \ { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.mozab.ResultSet")); } @@ -160,7 +160,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException) { - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -377,7 +377,7 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( if (cardNumber == m_nUpdatedRow) { //write back the changes first - if (!pushCard(cardNumber)) //error write back the changes + if (!pushCard(cardNumber)) //error write back the changes throw SQLException(); } } @@ -621,11 +621,11 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const Sequence< Property > aProps(5); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY); DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); - DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); + DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); return new OPropertyArrayHelper(aProps); } @@ -1452,9 +1452,9 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, sal_Bool OResultSet::isCount() const { return (m_pParseTree && - m_pParseTree->count() > 2 && - SQL_ISRULE(m_pParseTree->getChild(2),scalar_exp_commalist) && - SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0),derived_column) && + m_pParseTree->count() > 2 && + SQL_ISRULE(m_pParseTree->getChild(2),scalar_exp_commalist) && + SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0),derived_column) && SQL_ISRULE(m_pParseTree->getChild(2)->getChild(0)->getChild(0),general_set_fct) && m_pParseTree->getChild(2)->getChild(0)->getChild(0)->count() == 4 ); @@ -1495,7 +1495,7 @@ sal_Bool OResultSet::fillKeySet(sal_Int32 nMaxCardNumber) impl_ensureKeySet(); if (m_CurrentRowCount < nMaxCardNumber) { - sal_Int32 nKeyValue; + sal_Int32 nKeyValue; if ( (sal_Int32)m_pKeySet->get().capacity() < nMaxCardNumber ) m_pKeySet->get().reserve(nMaxCardNumber + 20 ); @@ -1564,7 +1564,7 @@ sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) { nCurCard = (m_pKeySet->get())[nCurPos-1]; } - else //The requested row has not been retrived until now. We should get the right card for it. + else //The requested row has not been retrived until now. We should get the right card for it. nCurCard = nCurPos + deletedCount(); while ( nCurCard > nNumberOfRecords && !m_aQuery.queryComplete() ) { @@ -1908,7 +1908,7 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(::com::sun::star::sdbc::SQLE ResultSetEntryGuard aGuard( *this ); m_nOldRowPos = m_nRowPos; - if (!m_nNewRow) //no new row now, insert one + if (!m_nNewRow) //no new row now, insert one { checkDisposed(OResultSet_BASE::rBHelper.bDisposed); checkPendingUpdate(); diff --git a/connectivity/source/drivers/mozab/MResultSet.hxx b/connectivity/source/drivers/mozab/MResultSet.hxx index 47e9ad13d276..a39cb0e7e007 100644 --- a/connectivity/source/drivers/mozab/MResultSet.hxx +++ b/connectivity/source/drivers/mozab/MResultSet.hxx @@ -55,7 +55,7 @@ namespace connectivity { /* - ** java_sql_ResultSet + ** java_sql_ResultSet */ typedef ::cppu::WeakComponentImplHelper12< ::com::sun::star::sdbc::XResultSet, ::com::sun::star::sdbc::XRow, @@ -72,21 +72,21 @@ namespace connectivity typedef sal_Int64 TVoidPtr; - typedef ::std::allocator< TVoidPtr > TVoidAlloc; - typedef ::std::vector<TVoidPtr> TVoidVector; + typedef ::std::allocator< TVoidPtr > TVoidAlloc; + typedef ::std::vector<TVoidPtr> TVoidVector; - class OResultSet : public comphelper::OBaseMutex, - public OResultSet_BASE, - public ::cppu::OPropertySetHelper, - public ::comphelper::OPropertyArrayUsageHelper<OResultSet> + class OResultSet : public comphelper::OBaseMutex, + public OResultSet_BASE, + public ::cppu::OPropertySetHelper, + public ::comphelper::OPropertyArrayUsageHelper<OResultSet> { protected: - OCommonStatement* m_pStatement; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xStatement; + OCommonStatement* m_pStatement; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xStatement; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData; - sal_uInt32 m_nRowPos; - sal_uInt32 m_nOldRowPos; - sal_Bool m_bWasNull; + sal_uInt32 m_nRowPos; + sal_uInt32 m_nOldRowPos; + sal_Bool m_bWasNull; sal_Int32 m_nFetchSize; sal_Int32 m_nResultSetType; sal_Int32 m_nFetchDirection; @@ -232,7 +232,7 @@ namespace connectivity protected: MQuery m_aQuery; OTable* m_pTable; - sal_Int32 m_CurrentRowCount; + sal_Int32 m_CurrentRowCount; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTableColumns; @@ -244,13 +244,13 @@ protected: OValueRow m_aParameterRow; ::std::vector< ::rtl::OUString> m_aAttributeStrings; sal_Int32 m_nParamIndex; - sal_Bool m_bIsAlwaysFalseQuery; + sal_Bool m_bIsAlwaysFalseQuery; ::rtl::Reference<OKeySet> m_pKeySet; OSortIndex* m_pSortIndex; - sal_Int32 m_nNewRow; //inserted row - sal_Int32 m_nUpdatedRow; //updated row - sal_Int32 m_RowStates; - sal_Int32 m_bIsReadOnly; + sal_Int32 m_nNewRow; //inserted row + sal_Int32 m_nUpdatedRow; //updated row + sal_Int32 m_RowStates; + sal_Int32 m_bIsReadOnly; inline void resetParameters() { m_nParamIndex = 0; } ::rtl::Reference<connectivity::OSQLColumns> m_xColumns; // this are the select columns @@ -282,7 +282,7 @@ protected: sal_Bool validRow( sal_uInt32 nRow ); sal_Bool seekRow( eRowPosition pos, sal_Int32 nOffset = 0 ); sal_Int32 deletedCount(); - sal_Bool fillKeySet(sal_Int32 nMaxCardNumber); //When we get new rows, fill the m_pKeySet items for them + sal_Bool fillKeySet(sal_Int32 nMaxCardNumber); //When we get new rows, fill the m_pKeySet items for them sal_Int32 getRowForCardNumber(sal_Int32 nCardNum); const ORowSetValue& getValue(sal_Int32 rowIndex, sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx index 99894fb750e1..170cf18e2488 100644 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx @@ -2,7 +2,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 @@ -83,7 +83,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 /*column*/ ) th // ------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) -{ +{ return ::rtl::OUString(); } // ------------------------------------------------------------------------- @@ -193,9 +193,9 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQL sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException) { checkColumnIndex(column); - sal_Bool bReadOnly = (m_xColumns->get())[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) && + sal_Bool bReadOnly = (m_xColumns->get())[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) && ::cppu::any2bool((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION))); - + return m_bReadOnly || bReadOnly || m_pTable->isReadOnly(); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx index e04668070dfc..134089fb40a7 100644 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx @@ -2,7 +2,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 @@ -44,18 +44,18 @@ namespace connectivity //************************************************************** typedef ::cppu::WeakImplHelper1< ::com::sun::star::sdbc::XResultSetMetaData> OResultSetMetaData_BASE; - class OResultSetMetaData : public OResultSetMetaData_BASE + class OResultSetMetaData : public OResultSetMetaData_BASE { ::rtl::OUString m_aTableName; ::rtl::Reference<connectivity::OSQLColumns> m_xColumns; OTable* m_pTable; - sal_Bool m_bReadOnly; + sal_Bool m_bReadOnly; protected: virtual ~OResultSetMetaData(); public: // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird: - // OResultSetMetaData(OConnection* _pConnection) : m_pConnection(_pConnection){} + // OResultSetMetaData(OConnection* _pConnection) : m_pConnection(_pConnection){} OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns, const ::rtl::OUString& _aTableName,OTable* _pTable,sal_Bool aReadOnly ) diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx index 8fcca8ee58f4..24be4a1be71f 100644 --- a/connectivity/source/drivers/mozab/MServices.cxx +++ b/connectivity/source/drivers/mozab/MServices.cxx @@ -2,7 +2,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 @@ -121,8 +121,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -178,7 +178,7 @@ typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Refere OMozillaBootstrap_CreateInstanceFunction s_pCreationFunc = (OMozillaBootstrap_CreateInstanceFunction)osl_getFunctionSymbol(s_hModule, sFactoryCreationFunc.pData); if (NULL == s_pCreationFunc) - { // did not find the symbol + { // did not find the symbol OSL_ENSURE(sal_False, "MozabDriver::registerClient: could not find the symbol for creating the factory!"); osl_unloadModule(s_hModule); s_hModule = NULL; diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx index 709676b21966..e00ab8db2a3e 100644 --- a/connectivity/source/drivers/mozab/MStatement.cxx +++ b/connectivity/source/drivers/mozab/MStatement.cxx @@ -2,7 +2,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 @@ -125,7 +125,7 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< XFastPropertySet > *)0 ), ::getCppuType( (const Reference< XPropertySet > *)0 )); @@ -157,7 +157,7 @@ void OCommonStatement::createTable( ) throw ( SQLException, RuntimeException ) OSL_ENSURE(xCreateColumn.is(), "Need the Columns!!"); const OColumnAlias& aColumnAlias = m_pConnection->getColumnAlias(); - + OSQLColumns::Vector::const_iterator aIter = xCreateColumn->get().begin(); const ::rtl::OUString sProprtyName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); ::rtl::OUString sName; @@ -166,7 +166,7 @@ void OCommonStatement::createTable( ) throw ( SQLException, RuntimeException ) (*aIter)->getPropertyValue(sProprtyName) >>= sName; if ( !aColumnAlias.hasAlias( sName ) ) { - + const ::rtl::OUString sError( getOwnConnection()->getResources().getResourceStringWithSubstitution( STR_INVALID_COLUMNNAME, "$columnname$", sName @@ -393,12 +393,12 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc Sequence< Property > aProps(9); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(CURSORNAME, ::rtl::OUString); DECL_BOOL_PROP0(ESCAPEPROCESSING); DECL_PROP0(FETCHDIRECTION,sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(MAXFIELDSIZE,sal_Int32); - DECL_PROP0(MAXROWS, sal_Int32); + DECL_PROP0(MAXROWS, sal_Int32); DECL_PROP0(QUERYTIMEOUT,sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); DECL_PROP0(RESULTSETTYPE,sal_Int32); @@ -491,7 +491,7 @@ void OCommonStatement::createColumnMapping() size_t i; // initialize the column index map (mapping select columns to table columns) - ::rtl::Reference<connectivity::OSQLColumns> xColumns = m_pSQLIterator->getSelectColumns(); + ::rtl::Reference<connectivity::OSQLColumns> xColumns = m_pSQLIterator->getSelectColumns(); m_aColMapping.resize(xColumns->get().size() + 1); for (i=0; i<m_aColMapping.size(); ++i) m_aColMapping[i] = i; @@ -535,7 +535,7 @@ void OCommonStatement::analyseSQL() } } //------------------------------------------------------------------ -void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef, +void OCommonStatement::setOrderbyColumn( OSQLParseNode* pColumnRef, OSQLParseNode* pAscendingDescending) { ::rtl::OUString aColumnName; diff --git a/connectivity/source/drivers/mozab/MStatement.hxx b/connectivity/source/drivers/mozab/MStatement.hxx index 41775540713c..de1a75d68f9d 100644 --- a/connectivity/source/drivers/mozab/MStatement.hxx +++ b/connectivity/source/drivers/mozab/MStatement.hxx @@ -2,7 +2,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 @@ -58,7 +58,7 @@ namespace connectivity { class OResultSet; - typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::sdbc::XStatement, + typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::sdbc::XStatement, ::com::sun::star::sdbc::XWarningsSupplier, ::com::sun::star::sdbc::XCloseable> OCommonStatement_IBASE; @@ -70,9 +70,9 @@ namespace connectivity typedef ::connectivity::OSubComponent< OCommonStatement, OCommonStatement_IBASE > OCommonStatement_SBASE; class OCommonStatement :public comphelper::OBaseMutex - ,public OCommonStatement_IBASE - ,public ::cppu::OPropertySetHelper - ,public ::comphelper::OPropertyArrayUsageHelper< OCommonStatement > + ,public OCommonStatement_IBASE + ,public ::cppu::OPropertySetHelper + ,public ::comphelper::OPropertyArrayUsageHelper< OCommonStatement > ,public OCommonStatement_SBASE { friend class ::connectivity::OSubComponent< OCommonStatement, OCommonStatement_IBASE >; @@ -87,11 +87,11 @@ namespace connectivity // for this Statement - ::std::list< ::rtl::OUString> m_aBatchList; - - OTable* m_pTable; - OConnection* m_pConnection; // The owning Connection object + ::std::list< ::rtl::OUString> m_aBatchList; + OTable* m_pTable; + OConnection* m_pConnection; // The owning Connection object + OValueRow m_aRow; connectivity::OSQLParser m_aParser; @@ -100,7 +100,7 @@ namespace connectivity connectivity::OSQLParseNode* m_pParseTree; - ::std::vector<sal_Int32> m_aColMapping; + ::std::vector<sal_Int32> m_aColMapping; ::std::vector<sal_Int32> m_aOrderbyColumnNumber; ::std::vector<TAscendingOrder> m_aOrderbyAscending; @@ -120,7 +120,7 @@ namespace connectivity throw (::com::sun::star::lang::IllegalArgumentException); virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, - const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception); + const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception); virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const; @@ -155,7 +155,7 @@ namespace connectivity void analyseSQL(); void setOrderbyColumn( connectivity::OSQLParseNode* pColumnRef, connectivity::OSQLParseNode* pAscendingDescending); - virtual void createTable( ) throw ( + virtual void createTable( ) throw ( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ); public: @@ -193,7 +193,7 @@ namespace connectivity using OPropertySetHelper::getFastPropertyValue; }; - class OStatement : public OCommonStatement, + class OStatement : public OCommonStatement, public ::com::sun::star::lang::XServiceInfo { protected: diff --git a/connectivity/source/drivers/mozab/MTable.cxx b/connectivity/source/drivers/mozab/MTable.cxx index ddfaed031770..d122794a64c1 100644 --- a/connectivity/source/drivers/mozab/MTable.cxx +++ b/connectivity/source/drivers/mozab/MTable.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/MTable.hxx b/connectivity/source/drivers/mozab/MTable.hxx index 3cc6728fe156..7f1826257f15 100644 --- a/connectivity/source/drivers/mozab/MTable.hxx +++ b/connectivity/source/drivers/mozab/MTable.hxx @@ -2,7 +2,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 @@ -39,13 +39,13 @@ namespace connectivity { typedef ::connectivity::OTableHelper OTable_Base; - class OTable : public OTable_Base + class OTable : public OTable_Base { OConnection* m_pConnection; public: - OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection); - OTable( sdbcx::OCollection* _pTables, + OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection); + OTable( sdbcx::OCollection* _pTables, OConnection* _pConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, diff --git a/connectivity/source/drivers/mozab/MTables.cxx b/connectivity/source/drivers/mozab/MTables.cxx index b01c8fe9d6b2..ebc913845e30 100644 --- a/connectivity/source/drivers/mozab/MTables.cxx +++ b/connectivity/source/drivers/mozab/MTables.cxx @@ -2,7 +2,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 @@ -61,14 +61,14 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) ::rtl::OUString aName,aSchema; // sal_Int32 nLen = _rName.indexOf('.'); // aSchema = _rName.copy(0,nLen); - // aName = _rName.copy(nLen+1); + // aName = _rName.copy(nLen+1); aSchema = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("%")); aName = _rName; Sequence< ::rtl::OUString > aTypes(1); aTypes[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("%")); - // aTypes[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TABLE")); - // aTypes[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SYSTEMTABLE")); + // aTypes[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TABLE")); + // aTypes[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SYSTEMTABLE")); ::rtl::OUString sEmpty; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes); @@ -79,7 +79,7 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) Reference< XRow > xRow(xResult,UNO_QUERY); if(xResult->next()) // there can be only one table with this name { - OTable* pRet = new OTable( this, static_cast<OCatalog&>(m_rParent).getConnection(), + OTable* pRet = new OTable( this, static_cast<OCatalog&>(m_rParent).getConnection(), aName,xRow->getString(4),xRow->getString(5)); xRet = pRet; } diff --git a/connectivity/source/drivers/mozab/MTables.hxx b/connectivity/source/drivers/mozab/MTables.hxx index 56ed3d001d3e..437bbbe6c558 100644 --- a/connectivity/source/drivers/mozab/MTables.hxx +++ b/connectivity/source/drivers/mozab/MTables.hxx @@ -2,7 +2,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 @@ -37,7 +37,7 @@ namespace connectivity class OTables : public sdbcx::OCollection { ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; - // OCatalog* m_pParent; + // OCatalog* m_pParent; protected: virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index b4cc37bb2f03..b50a03d50ca7 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -2,7 +2,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 @@ -102,7 +102,7 @@ rtl::OUString MozillaBootstrap::getImplementationName_Static( ) throw(RuntimeEx //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > MozillaBootstrap::getSupportedServiceNames_Static( ) throw (RuntimeException) { - // which service is supported + // which service is supported // for more information @see com.sun.star.mozilla.MozillaBootstrap Sequence< ::rtl::OUString > aSNS( 1 ); aSNS[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")); @@ -227,7 +227,7 @@ Sequence< ::rtl::OUString > SAL_CALL MozillaBootstrap::getSupportedServiceNames( && ( aCode->getProductType() != currProduct || !profileName.equals(currProfileName)) ) setCurrentProfile(aCode->getProductType(),profileName); MNSRunnable xRunnable; - + return xRunnable.StartProxy(aCode);; #else (void)aCode; /* avoid warning about unused parameter */ diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx index 5a3f609ea90f..d605d4bb0a59 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx @@ -2,7 +2,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 @@ -40,7 +40,7 @@ namespace connectivity { namespace mozab { - typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::mozilla::XMozillaBootstrap, + typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::mozilla::XMozillaBootstrap, ::com::sun::star::lang::XServiceInfo > OMozillaBootstrap_BASE; class ProfileAccess; class ProfileManager; @@ -49,11 +49,11 @@ namespace connectivity protected: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xMSFactory; - ::osl::Mutex m_aMutex; // mutex is need to control member access + ::osl::Mutex m_aMutex; // mutex is need to control member access virtual ~MozillaBootstrap(); protected: ProfileAccess * m_ProfileAccess; - ProfileManager * m_ProfileManager; + ProfileManager * m_ProfileManager; public: void Init(); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index f16c8f481a6f..240d8a8a597e 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -2,7 +2,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 @@ -52,7 +52,7 @@ using namespace ::com::sun::star::mozilla; namespace { - #if defined(XP_MAC) || defined(XP_MACOSX) || defined(MACOSX) + #if defined(XP_MAC) || defined(XP_MACOSX) || defined(MACOSX) #define APP_REGISTRY_NAME "Application Registry" #elif defined(XP_WIN) || defined(XP_OS2) #define APP_REGISTRY_NAME "registry.dat" diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx index e6de431e53a5..3ddf002c34fa 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index 7e523f44e7fd..d8f8d6505532 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -2,7 +2,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 @@ -35,10 +35,10 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce { OUString iniUrl; if (osl_File_E_None != osl_getFileURLFromSystemPath(rIniName.pData, &iniUrl.pData)) - return; - + return; + -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 0 OString sFile = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US); OSL_TRACE(__FILE__" -- parser() - %s\n", sFile.getStr()); #endif @@ -50,17 +50,17 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce } catch(::com::sun::star::io::IOException e) { -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 0 OString file_tmp = OUStringToOString(iniUrl, RTL_TEXTENCODING_ASCII_US); OSL_TRACE( __FILE__" -- couldn't open file: %s", file_tmp.getStr() ); #endif } - + if (osl_File_E_None == fileError) { rtl::ByteSequence seq; sal_uInt64 nSize = 0; - + osl_getFileSize(handle, &nSize); OUString sectionName = OUString::createFromAscii("no name section"); while (true) @@ -84,7 +84,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce aSection->lList.push_back(nameValue); } - else + else { sal_Int32 nIndexStart = line.indexOf('['); sal_Int32 nIndexEnd = line.indexOf(']'); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx index 9fb0588ef26e..efe78e8a8ae4 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx index 8e2cf5deed40..1cffe198ba46 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx @@ -2,7 +2,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 @@ -45,9 +45,9 @@ #include <osl/thread.hxx> #include <MNSTerminateListener.hxx> -static nsIServiceManager* sServiceManager = nsnull; -static sal_Int32 sInitCounter = 0; -static sal_Bool s_bProfilePresentAfterInitialized = sal_False; +static nsIServiceManager* sServiceManager = nsnull; +static sal_Int32 sInitCounter = 0; +static sal_Bool s_bProfilePresentAfterInitialized = sal_False; static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID); static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); @@ -84,9 +84,9 @@ extern "C" void NS_SetupRegistry(); { // compare the current and the preferred profile // (by looping through the characters) - const PRUnichar* pCurrent = *pLoop; - const PRUnichar* pPref = pPreferredProfile; - while ( *pCurrent && ( *pCurrent == *pPref ) ) // testing one of them against 0 is enough because of the second clause + const PRUnichar* pCurrent = *pLoop; + const PRUnichar* pPref = pPreferredProfile; + while ( *pCurrent && ( *pCurrent == *pPref ) ) // testing one of them against 0 is enough because of the second clause { ++pCurrent; ++pPref; @@ -152,8 +152,8 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) // Initialise XPCOM NS_InitXPCOM2(&sServiceManager, binDir, NULL); -// if (!sServiceManager) -// return sal_False; +// if (!sServiceManager) +// return sal_False; #ifdef HACK_AROUND_NONREENTRANT_INITXPCOM sXPCOMInitializedFlag = PR_TRUE; @@ -173,10 +173,10 @@ sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists) eventQService->CreateThreadEventQueue(); -// nsCOMPtr<nsIObserver> mStartupNotifier = do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv); -// if(NS_FAILED(rv)) -// return rv; -// mStartupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull); +// nsCOMPtr<nsIObserver> mStartupNotifier = do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv); +// if(NS_FAILED(rv)) +// return rv; +// mStartupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull); #ifdef HACK_AROUND_THREADING_ISSUES // XXX force certain objects to be created on the main thread @@ -275,7 +275,7 @@ extern "C" void MNS_Mozilla_UI_Thread( void *arg ) #endif } - m_aUI_Thread_Condition.set(); //release all blocks + m_aUI_Thread_Condition.set(); //release all blocks OSL_TRACE( "OUT : MNS_Mozilla_UI_Thread() \n" ); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx index 0ccd4322539c..bfc141cc582c 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx index 71620b07475f..54d4879acb9e 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx @@ -2,7 +2,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 @@ -276,7 +276,7 @@ nsProfile::SetCurrentProfile(const PRUnichar * aCurrentProfile) } // -// // Do the profile switch +// // Do the profile switch gDirServiceProvider->SetProfileDir(profileDir); mCurrentProfileName.Assign(aCurrentProfile); // gProfileDataAccess->SetCurrentProfile(aCurrentProfile); @@ -326,7 +326,7 @@ NS_IMETHODIMP nsProfile::ShutDownCurrentProfile(PRUint32 shutDownType) // if shutDownType is not a well know value, skip the notifications // see DoOnShutdown() in nsAppRunner.cpp for where we use this behaviour to our benefit if (shutDownType == (PRUint32)SHUTDOWN_PERSIST || shutDownType == (PRUint32)SHUTDOWN_CLEANSE ) { - nsCOMPtr<nsIObserverService> observerService = + nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv); NS_ENSURE_TRUE(observerService, NS_ERROR_FAILURE); @@ -335,7 +335,7 @@ NS_IMETHODIMP nsProfile::ShutDownCurrentProfile(PRUint32 shutDownType) NS_NAMED_LITERAL_STRING(cleanseString, "shutdown-cleanse"); NS_NAMED_LITERAL_STRING(persistString, "shutdown-persist"); const nsAFlatString& context = (shutDownType == (PRUint32)SHUTDOWN_CLEANSE) ? cleanseString : persistString; - + // Phase 1: See if anybody objects to the profile being changed. mProfileChangeVetoed = PR_FALSE; observerService->NotifyObservers(subject, "profile-approve-change", context.get()); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx index 723af162ab5b..37939c4acc9f 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx index 279faa7f2318..ef6a88917b82 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx index 434c9e3af390..2efe91623318 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index dbf1c598b5c8..dbcd90509226 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -2,7 +2,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 @@ -116,7 +116,7 @@ namespace connectivity profileName = aProfileName; profilePath = aProfilePath; } - ::rtl::OUString ProfileStruct::getProfilePath() + ::rtl::OUString ProfileStruct::getProfilePath() { #ifdef MINIMAL_PROFILEDISCOVER return profilePath; @@ -149,7 +149,7 @@ namespace connectivity LoadMozillaProfiles(); #endif sal_Int32 count=static_cast<sal_Int32>(m_ProductProfileList[MozillaProductType_Mozilla].mProfileList.size()); - + //load thunderbird profiles to m_ProductProfileList count += LoadXPToolkitProfiles(MozillaProductType_Thunderbird); @@ -186,7 +186,7 @@ namespace connectivity nsCOMPtr<nsIEnumerator> enumKeys; nsRegistryKey profilesTreeKey; - + //step 3:Enumerator it rv = registry->GetKey(nsIRegistry::Common, // PRUnichar != sal_Unicode in mingw @@ -293,7 +293,7 @@ namespace connectivity ::rtl::OUString profilePath; ::rtl::OUString sIsRelative; ::rtl::OUString sIsDefault; - + for(NameValueList::iterator itor=aSection->lList.begin(); itor != aSection->lList.end(); itor++) @@ -323,7 +323,7 @@ namespace connectivity { isRelative = sIsRelative.toInt32(); } - + #ifndef MINIMAL_PROFILEDISCOVER nsCOMPtr<nsILocalFile> rootDir; rv = NS_NewLocalFile(EmptyString(), PR_TRUE, @@ -332,7 +332,7 @@ namespace connectivity OString sPath = OUStringToOString(profilePath, RTL_TEXTENCODING_UTF8); nsCAutoString filePath(sPath.getStr()); - + if (isRelative) { // PRUnichar != sal_Unicode in mingw nsAutoString registryDir( reinterpret_cast_mingw_only<const PRUnichar *>(regDir.getStr()) ); @@ -365,7 +365,7 @@ namespace connectivity m_Product.mCurrentProfileName = profileName; } - + } return static_cast< ::sal_Int32 >(m_Product.mProfileList.size()); } @@ -374,7 +374,7 @@ namespace connectivity { sal_Int32 index=product; ProductStruct &m_Product = m_ProductProfileList[index]; - if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end()) + if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end()) { //Profile not found return ::rtl::OUString(); @@ -403,7 +403,7 @@ namespace connectivity list[i] = aProfile->getProfileName(); i++; } - + return static_cast< ::sal_Int32 >(m_Product.mProfileList.size()); } @@ -431,11 +431,11 @@ namespace connectivity nsAutoString path; aFile->GetPath(path); rv = aFile->Exists(bExist); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); if (!*bExist) { rv = aFile->IsSymlink(bExist); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); } return rv; } @@ -456,29 +456,29 @@ namespace connectivity PRBool isDir; rv = aFile->IsDirectory(&isDir); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); if (!isDir) return NS_ERROR_FILE_NOT_DIRECTORY; nsCOMPtr<nsILocalFile> lockFile; rv = aFile->Clone((nsIFile **)((void **)getter_AddRefs(lockFile))); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); rv = lockFile->Append(LOCKFILE_NAME); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); PRBool nExist=PR_FALSE; rv = isExistFileOrSymlink(lockFile,&nExist); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); if (!nExist) // Check OLD_LOCKFILE_NAME { nsCOMPtr<nsILocalFile> oldlockFile; rv = aFile->Clone((nsIFile **)((void **)getter_AddRefs(oldlockFile))); - NS_ENSURE_SUCCESS(rv, rv); - + NS_ENSURE_SUCCESS(rv, rv); + rv = oldlockFile->Append(OLD_LOCKFILE_NAME); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); rv = isExistFileOrSymlink(oldlockFile,&nExist); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv); } return nExist; } @@ -506,7 +506,7 @@ namespace connectivity PRBool exists = PR_FALSE; rv = localFile->Exists(&exists); - NS_ENSURE_SUCCESS(rv, sal_True); + NS_ENSURE_SUCCESS(rv, sal_True); if (!exists) return sal_True; @@ -522,7 +522,7 @@ namespace connectivity { sal_Int32 index=product; ProductStruct &m_Product = m_ProductProfileList[index]; - if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end()) + if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end()) { return sal_False; } diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx index f2f85ddd77ee..1ce1617bad81 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx @@ -2,7 +2,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 @@ -77,7 +77,7 @@ namespace connectivity ::rtl::OUString getProfileName(){ return profileName;} ::rtl::OUString getProfilePath() ; #ifndef MINIMAL_PROFILEDISCOVER - nsILocalFile *getProfileLocal(){ return profilePath;} + nsILocalFile *getProfileLocal(){ return profilePath;} #endif protected: MozillaProductType product; @@ -104,7 +104,7 @@ namespace connectivity { public: - virtual ~ProfileAccess(); + virtual ~ProfileAccess(); ProfileAccess(); ::rtl::OUString getProfilePath( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); ::sal_Int32 getProfileCount( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx index 84684056f557..2978c16fa152 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx index 6e52c40b8f71..5cbc352684c2 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx @@ -2,7 +2,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 @@ -58,7 +58,7 @@ namespace connectivity { public: - virtual ~ProfileManager(); + virtual ~ProfileManager(); ProfileManager(); ::sal_Int32 SAL_CALL bootupProfile( ::com::sun::star::mozilla::MozillaProductType product, const ::rtl::OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) ; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx index c950e4d0e7e0..646121553236 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx @@ -2,7 +2,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 @@ -51,7 +51,7 @@ using namespace connectivity::mozab; /* Implementation file */ NS_IMPL_ISUPPORTS1(MNSRunnable, nsIRunnable) -static ::osl::Mutex m_aThreadMutex; +static ::osl::Mutex m_aThreadMutex; nsIRunnable * MNSRunnable::ProxiedObject() { diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx index 2f17ea53f556..093e2d157c07 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx @@ -2,7 +2,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 @@ -51,7 +51,7 @@ namespace connectivity virtual ~MNSRunnable(); NS_DECL_ISUPPORTS NS_DECL_NSIRUNNABLE - + public: sal_Int32 StartProxy(const ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XCodeProxy >& aCode); //Call this to start proxy diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h index f03d4a3bb208..e34bc21913d6 100644 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h index 3d01a103c9e2..4d65bc3cb54d 100644 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h index ec9bd9d63d74..4bb836ed1355 100644 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h index 75913dcd525c..03198dcab850 100644 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h index 4208eb6db606..1579b16947fc 100644 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h b/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h index b029a0e23638..a33bd622ac88 100644 --- a/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h +++ b/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h b/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h index 15eeb5395195..792e8a34f46a 100644 --- a/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h +++ b/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/mozab.xcu b/connectivity/source/drivers/mozab/mozab.xcu index c92209e09e5a..837e180ba50d 100755 --- a/connectivity/source/drivers/mozab/mozab.xcu +++ b/connectivity/source/drivers/mozab/mozab.xcu @@ -2,7 +2,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 @@ -34,7 +34,7 @@ <prop oor:name="DriverTypeDisplayName" oor:type="xs:string"> <value xml:lang="en-US">Microsoft Outlook Address Book</value> </prop> - <node oor:name="Features"> + <node oor:name="Features"> <node oor:name="EscapeDateTime" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> <value>true</value> @@ -49,7 +49,7 @@ <prop oor:name="DriverTypeDisplayName" oor:type="xs:string"> <value xml:lang="en-US">Microsoft Windows Address Book</value> </prop> - <node oor:name="Features"> + <node oor:name="Features"> <node oor:name="EscapeDateTime" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> <value>true</value> diff --git a/connectivity/source/drivers/mozab/mozab.xml b/connectivity/source/drivers/mozab/mozab.xml index 6663387cf34c..33e9219a1610 100644 --- a/connectivity/source/drivers/mozab/mozab.xml +++ b/connectivity/source/drivers/mozab/mozab.xml @@ -11,8 +11,8 @@ <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> <status value="final"/> - <supported-service> com.sun.star.sdbc.Driver </supported-service> - <service-dependency> ... </service-dependency> + <supported-service> com.sun.star.sdbc.Driver </supported-service> + <service-dependency> ... </service-dependency> </component-description> <component-description> <Author>Wind Li</Author> @@ -23,57 +23,57 @@ <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> <status value="final"/> - <supported-service> com.sun.star.mozilla.MozillaBootstrap</supported-service> - <service-dependency> ... </service-dependency> + <supported-service> com.sun.star.mozilla.MozillaBootstrap</supported-service> + <service-dependency> ... </service-dependency> </component-description> - <project-build-dependency> cppuhelper </project-build-dependency> - <project-build-dependency> cppu </project-build-dependency> - <project-build-dependency> sal </project-build-dependency> + <project-build-dependency> cppuhelper </project-build-dependency> + <project-build-dependency> cppu </project-build-dependency> + <project-build-dependency> sal </project-build-dependency> - <runtime-module-dependency> cppuhelper </runtime-module-dependency> - <runtime-module-dependency> cppu1 </runtime-module-dependency> - <runtime-module-dependency> sal1 </runtime-module-dependency> + <runtime-module-dependency> cppuhelper </runtime-module-dependency> + <runtime-module-dependency> cppu1 </runtime-module-dependency> + <runtime-module-dependency> sal1 </runtime-module-dependency> - <type> com.sun.star.util.XCancellable </type> - <type> com.sun.star.util.XNumberFormatter </type> - <type> com.sun.star.uno.TypeClass </type> - <type> com.sun.star.uno.XWeak </type> - <type> com.sun.star.uno.XAggregation </type> - <type> com.sun.star.beans.XPropertyState </type> - <type> com.sun.star.beans.XPropertySet </type> - <type> com.sun.star.beans.PropertyValue </type> - <type> com.sun.star.beans.XMultiPropertySet </type> - <type> com.sun.star.beans.XFastPropertySet </type> - <type> com.sun.star.lang.XTypeProvider </type> - <type> com.sun.star.lang.EventObject </type> - <type> com.sun.star.lang.XComponent </type> - <type> com.sun.star.lang.IllegalArgumentException </type> - <type> com.sun.star.lang.XMultiServiceFactory </type> - <type> com.sun.star.java.XJavaThreadRegister_11 </type> - <type> com.sun.star.java.XJavaVM </type> - <type> com.sun.star.sdbc.XConnection </type> - <type> com.sun.star.sdbc.XStatement </type> - <type> com.sun.star.sdbc.XResultSet </type> - <type> com.sun.star.sdbc.XResultSetMetaDataSupplier</type> - <type> com.sun.star.sdbc.XColumnLocate </type> - <type> com.sun.star.sdbc.XResultSetUpdate </type> - <type> com.sun.star.sdbc.XWarningsSupplier </type> - <type> com.sun.star.sdbc.XRowUpdate </type> - <type> com.sun.star.sdbc.XMultipleResults </type> - <type> com.sun.star.sdbc.XBatchExecution </type> - <type> com.sun.star.sdbc.XPreparedBatchExecution </type> - <type> com.sun.star.sdbc.XParameters </type> - <type> com.sun.star.sdbc.XOutParameters </type> - <type> com.sun.star.sdbc.DriverPropertyInfo </type> - <type> com.sun.star.sdbc.XRow </type> - <type> com.sun.star.sdb.XColumnUpdate </type> - <type> com.sun.star.sdb.XColumn </type> - <type> com.sun.star.sdbc.XResultSetUpdate </type> - <type> com.sun.star.sdbc.XRowUpdate </type> - <type> com.sun.star.sdbcx.XRowLocate </type> - <type> com.sun.star.sdbcx.XDeleteRows </type> + <type> com.sun.star.util.XCancellable </type> + <type> com.sun.star.util.XNumberFormatter </type> + <type> com.sun.star.uno.TypeClass </type> + <type> com.sun.star.uno.XWeak </type> + <type> com.sun.star.uno.XAggregation </type> + <type> com.sun.star.beans.XPropertyState </type> + <type> com.sun.star.beans.XPropertySet </type> + <type> com.sun.star.beans.PropertyValue </type> + <type> com.sun.star.beans.XMultiPropertySet </type> + <type> com.sun.star.beans.XFastPropertySet </type> + <type> com.sun.star.lang.XTypeProvider </type> + <type> com.sun.star.lang.EventObject </type> + <type> com.sun.star.lang.XComponent </type> + <type> com.sun.star.lang.IllegalArgumentException </type> + <type> com.sun.star.lang.XMultiServiceFactory </type> + <type> com.sun.star.java.XJavaThreadRegister_11 </type> + <type> com.sun.star.java.XJavaVM </type> + <type> com.sun.star.sdbc.XConnection </type> + <type> com.sun.star.sdbc.XStatement </type> + <type> com.sun.star.sdbc.XResultSet </type> + <type> com.sun.star.sdbc.XResultSetMetaDataSupplier</type> + <type> com.sun.star.sdbc.XColumnLocate </type> + <type> com.sun.star.sdbc.XResultSetUpdate </type> + <type> com.sun.star.sdbc.XWarningsSupplier </type> + <type> com.sun.star.sdbc.XRowUpdate </type> + <type> com.sun.star.sdbc.XMultipleResults </type> + <type> com.sun.star.sdbc.XBatchExecution </type> + <type> com.sun.star.sdbc.XPreparedBatchExecution </type> + <type> com.sun.star.sdbc.XParameters </type> + <type> com.sun.star.sdbc.XOutParameters </type> + <type> com.sun.star.sdbc.DriverPropertyInfo </type> + <type> com.sun.star.sdbc.XRow </type> + <type> com.sun.star.sdb.XColumnUpdate </type> + <type> com.sun.star.sdb.XColumn </type> + <type> com.sun.star.sdbc.XResultSetUpdate </type> + <type> com.sun.star.sdbc.XRowUpdate </type> + <type> com.sun.star.sdbcx.XRowLocate </type> + <type> com.sun.star.sdbcx.XDeleteRows </type> </module-description> diff --git a/connectivity/source/drivers/mozab/mozab2.xcu b/connectivity/source/drivers/mozab/mozab2.xcu index e7c24143f5a1..898c099fc7d2 100755 --- a/connectivity/source/drivers/mozab/mozab2.xcu +++ b/connectivity/source/drivers/mozab/mozab2.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index 28cc64d707ba..2e08d7754bd3 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx @@ -2,7 +2,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 @@ -48,7 +48,7 @@ #include "MNSMozabProxy.hxx" #include <MNSDeclares.hxx> -static ::osl::Mutex m_aMetaMutex; +static ::osl::Mutex m_aMetaMutex; #include <osl/diagnose.h> #include <com/sun/star/uno/Reference.hxx> @@ -201,10 +201,10 @@ static nsresult insertPABDescription() #define NS_ABDIRECTORYDATASOURCE_CONTRACTID \ NS_RDF_DATASOURCE_CONTRACTID_PREFIX "addressdirectory" #define database_uri "@mozilla.org/rdf/datasource;1?name=addressdirectory" -#define NS_ABDIRECTORYDATASOURCE_CID \ -{ /* 0A79186D-F754-11d2-A2DA-001083003D0C */ \ - 0xa79186d, 0xf754, 0x11d2, \ - {0xa2, 0xda, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \ +#define NS_ABDIRECTORYDATASOURCE_CID \ +{ /* 0A79186D-F754-11d2-A2DA-001083003D0C */ \ + 0xa79186d, 0xf754, 0x11d2, \ + {0xa2, 0xda, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \ } // ------------------------------------------------------------------------- @@ -262,7 +262,7 @@ static nsresult enumSubs(nsISimpleEnumerator * subDirs,nsISupportsArray * array) { PRBool hasMore = PR_TRUE ; nsresult rv = NS_OK ; - while (NS_SUCCEEDED(subDirs->HasMoreElements(&hasMore)) && hasMore) { + while (NS_SUCCEEDED(subDirs->HasMoreElements(&hasMore)) && hasMore) { nsCOMPtr<nsISupports> newDirSupports ; rv = subDirs->GetNext(getter_AddRefs(newDirSupports)) ; @@ -482,9 +482,9 @@ sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection* ::std::vector< ::rtl::OUString >& _rStrings, ::std::vector< ::rtl::OUString >& _rTypes) { - sal_Bool bGivenURI; - ::rtl::OUString sAbURI; - ::rtl::OString sAbURIString; + sal_Bool bGivenURI; + ::rtl::OUString sAbURI; + ::rtl::OString sAbURIString; OSL_TRACE( "IN MDatabaseMetaDataHelper::getTableStrings( 0x%08X, %s)\n", _pCon, _pCon->getForceLoadTables()?"True":"False" ); @@ -601,7 +601,7 @@ sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection* args.arg4 = (void*)&m_aTableNames; args.arg5 = (void*)&m_aTableTypes; args.arg6 = (void*)&nErrorResourceId; - rv = xMProxy.StartProxy(&args,m_ProductType,m_ProfileName); + rv = xMProxy.StartProxy(&args,m_ProductType,m_ProfileName); m_aError.setResId( static_cast<sal_uInt16>(nErrorResourceId) ); if (NS_FAILED(rv)) @@ -720,7 +720,7 @@ MDatabaseMetaDataHelper::testLDAPConnection( OConnection* _pCon ) { args.funcIndex = ProxiedFunc::FUNC_TESTLDAP_IS_LDAP_CONNECTED; TimeValue timeValue = { 1, 0 }; // 1 * 30 Seconds timeout - sal_Int32 times=0; + sal_Int32 times=0; while ( times++ < 30 ) { rv = xMProxy.StartProxy( &args, m_ProductType, ::rtl::OUString() ); @@ -742,7 +742,7 @@ MDatabaseMetaDataHelper::testLDAPConnection( OConnection* _pCon ) sal_Bool MDatabaseMetaDataHelper::NewAddressBook(OConnection* _pCon,const ::rtl::OUString & aTableName) { - sal_Bool bIsMozillaAB; + sal_Bool bIsMozillaAB; bIsMozillaAB = !_pCon->usesFactory() && ! _pCon->isLDAP(); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx index 77de88b2f07d..103903ac36d0 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx @@ -2,7 +2,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 @@ -49,7 +49,7 @@ namespace connectivity ::std::vector< ::rtl::OUString > m_aTableNames; ::std::vector< ::rtl::OUString > m_aTableTypes; ::com::sun::star::mozilla::MozillaProductType m_ProductType; - ::rtl::OUString m_ProfileName; + ::rtl::OUString m_ProfileName; ErrorDescriptor m_aError; public: diff --git a/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx b/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx index c7f1dffd83c4..d6bfe02b23e9 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx index 2719c72dd98e..0064cca35160 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * 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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx index c7b5224893da..54461bfc2222 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * 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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx index 0ef193cc3bd8..de53040895a7 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx @@ -2,7 +2,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 @@ -27,16 +27,16 @@ ************************************************************************/ #ifndef _CONNECTIVITY_MAB_NS_DECLARES_HXX_ -#define _CONNECTIVITY_MAB_NS_DECLARES_HXX_ +#define _CONNECTIVITY_MAB_NS_DECLARES_HXX_ #include <sal/types.h> -const sal_Int32 RowStates_Normal = 0; -const sal_Int32 RowStates_Inserted = 1; -const sal_Int32 RowStates_Updated = 2; -const sal_Int32 RowStates_Deleted = 4; -const sal_Int32 RowStates_Error = 32; +const sal_Int32 RowStates_Normal = 0; +const sal_Int32 RowStates_Inserted = 1; +const sal_Int32 RowStates_Updated = 2; +const sal_Int32 RowStates_Deleted = 4; +const sal_Int32 RowStates_Error = 32; namespace connectivity{ namespace mozab{ diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx index b3e75c3763bb..4dd1c511f1f2 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx index df81bb886b5e..02cdcea1fea4 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ using namespace connectivity::mozab; /* Implementation file */ -static ::osl::Mutex m_aThreadMutex; +static ::osl::Mutex m_aThreadMutex; extern nsresult NewAddressBook(const ::rtl::OUString * aName); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx index 06c13993edda..85d63373818a 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx @@ -2,7 +2,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 @@ -61,11 +61,11 @@ namespace connectivity { sal_Int32 funcIndex; //Function Index sal_Int32 argCount; //parameter count - void * arg1; - void * arg2; - void * arg3; - void * arg4; - void * arg5; + void * arg1; + void * arg2; + void * arg3; + void * arg4; + void * arg5; void * arg6; RunArgs() { diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx index d411119e5281..92967f77e8d6 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx @@ -2,7 +2,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 @@ -33,7 +33,7 @@ #include <com/sun/star/frame/XDesktop.hpp> #include <MNSInit.hxx> - + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx index 85e36e8abacd..16a27c7702ac 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx @@ -2,7 +2,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 @@ -49,7 +49,7 @@ private: public: MNSTerminateListener(); - virtual ~MNSTerminateListener(); + virtual ~MNSTerminateListener(); public: static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTerminateListener> mxTerminateListener; static void addTerminateListener(); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx index d3627772369b..e6e394474894 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx index 6fdbcea39938..46651383c4cb 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx @@ -2,7 +2,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 @@ -41,7 +41,7 @@ namespace connectivity { namespace mozab { - class MNameMapper + class MNameMapper { private: @@ -69,10 +69,10 @@ namespace connectivity // May modify the name passed in so that it's unique nsresult add( ::rtl::OUString& str, nsIAbDirectory* abook ); - + //reset dirs void reset(); - + // Get the directory corresponding to str bool getDir( const ::rtl::OUString& str, nsIAbDirectory* *abook ); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx index d3510e9d0d07..a78b9abed55c 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx index d068fc0315ba..8015c3a74cbd 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx @@ -2,7 +2,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 @@ -208,7 +208,7 @@ namespace connectivity const OColumnAlias& m_rColumnAlias; ::com::sun::star::mozilla::MozillaProductType m_Product; - ::rtl::OUString m_Profile; + ::rtl::OUString m_Profile; ErrorDescriptor m_aError; void construct(); @@ -226,14 +226,14 @@ namespace connectivity sal_Int32 executeQuery(OConnection* _pCon); sal_Int32 executeQueryProxied(OConnection* _pCon); //Used only by MNSMozabProxy - sal_Int32 createNewCard(); //return Row count number - sal_Int32 deleteRow(const sal_Int32 rowIndex); - sal_Int32 commitRow(const sal_Int32 rowIndex); - sal_Bool resyncRow(sal_Int32 nDBRow); + sal_Int32 createNewCard(); //return Row count number + sal_Int32 deleteRow(const sal_Int32 rowIndex); + sal_Int32 commitRow(const sal_Int32 rowIndex); + sal_Bool resyncRow(sal_Int32 nDBRow); - sal_Bool isWritable(OConnection* _pCon); + sal_Bool isWritable(OConnection* _pCon); - sal_uInt32 InsertLoginInfo(OConnection* _pCon); + sal_uInt32 InsertLoginInfo(OConnection* _pCon); void setAddressbook( ::rtl::OUString&); ::rtl::OUString getAddressbook(void) const; @@ -261,14 +261,14 @@ namespace connectivity sal_Int32 nDBRow, const rtl::OUString& aDBColumnName, sal_Int32 nType ) const; - sal_Int32 getRowStates(sal_Int32 nDBRow); - sal_Bool setRowStates(sal_Int32 nDBRow,sal_Int32 aState); + sal_Int32 getRowStates(sal_Int32 nDBRow); + sal_Bool setRowStates(sal_Int32 nDBRow,sal_Int32 aState); bool hadError() const { return m_aError.is(); } inline const ErrorDescriptor& getError() const { return m_aError; } public: -// MQuery(); +// MQuery(); MQuery( const OColumnAlias& _ca ); virtual ~MQuery(); static MNameMapper* CreateNameMapper(); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx index b7b1f2bbc7f9..a6b9cbff8f83 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx @@ -2,7 +2,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 @@ -173,7 +173,7 @@ sal_Bool MQueryHelper::waitForResultOrComplete( ) { TimeValue timeValue = { 1, 0 }; // 20 Seconds 0 NanoSecond timeout - sal_Int32 times=0; + sal_Int32 times=0; osl::Condition::Result rv = ::osl::Condition::result_ok; OSL_TRACE("In : waitForResultOrComplete()"); @@ -449,10 +449,10 @@ const char * getAddrURI(const nsIAbDirectory* directory) } #define ENSURE_GETUPDATECARD(x) \ - if (NS_FAILED(retCode)) \ - { \ - OSL_TRACE( x ); \ - return card; \ + if (NS_FAILED(retCode)) \ + { \ + OSL_TRACE( x ); \ + return card; \ } static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); @@ -483,11 +483,11 @@ nsIAbCard * getUpdatedCard( nsIAbCard* card) return aNewCard; } -#define ENSURE_MOZAB_PROFILE_NOT_LOOKED(directory) \ - if (getDirectoryType(directory) == SDBCAddress::Mozilla && isProfileLocked(NULL)) \ - { \ +#define ENSURE_MOZAB_PROFILE_NOT_LOOKED(directory) \ + if (getDirectoryType(directory) == SDBCAddress::Mozilla && isProfileLocked(NULL)) \ + { \ m_aError.setResId( STR_MOZILLA_IS_RUNNIG_NO_CHANGES ); \ - return sal_False; \ + return sal_False; \ } sal_Int32 MQueryHelper::commitCard(const sal_Int32 rowIndex,nsIAbDirectory * directory) diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx index 3daedc286d04..1da8f15464eb 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx @@ -2,7 +2,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 @@ -52,7 +52,7 @@ namespace connectivity mutable ::osl::Mutex m_aMutex; FieldMap m_Fields; nsCOMPtr<nsIAbCard> m_Card; - sal_Int32 m_RowStates; + sal_Int32 m_RowStates; public: MQueryHelperResultEntry(); @@ -129,13 +129,13 @@ namespace connectivity sal_Int32 getResultCount() const; sal_uInt32 getRealCount() const; - sal_Int32 createNewCard(); //return Row count number - sal_Bool resyncRow(sal_Int32 rowIndex); + sal_Int32 createNewCard(); //return Row count number + sal_Bool resyncRow(sal_Int32 rowIndex); void notifyQueryError() ; - sal_Bool setCardValues(const sal_Int32 rowIndex); - sal_Int32 commitCard(const sal_Int32 rowIndex, nsIAbDirectory * directory); - sal_Int32 deleteCard(const sal_Int32 rowIndex, nsIAbDirectory * directory); + sal_Bool setCardValues(const sal_Int32 rowIndex); + sal_Int32 commitCard(const sal_Int32 rowIndex, nsIAbDirectory * directory); + sal_Int32 deleteCard(const sal_Int32 rowIndex, nsIAbDirectory * directory); }; } } diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx index 66f3c5fabba5..6e4d75831a56 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx @@ -2,7 +2,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 @@ -43,7 +43,7 @@ void MTypeConverter::ouStringToNsString(::rtl::OUString const &ous, nsString &ns const char *cs = os.getStr(); PRUint32 csLen = os.getLength(); - + NS_ConvertUTF8toUCS2 mozString(cs, csLen); //const PRUnichar* uniMozString = (const PRUnichar*) mozString; nss = mozString; // temp. diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx index df903eaa003f..55c1246d4313 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx @@ -2,7 +2,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 @@ -33,7 +33,7 @@ #include <rtl/ustring.hxx> #include<string> - + namespace connectivity { namespace mozab diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h index a63db2b480c8..cf365e1008cc 100644 --- a/connectivity/source/drivers/mozab/post_include_mozilla.h +++ b/connectivity/source/drivers/mozab/post_include_mozilla.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h index a90c6a394fd8..4da60543cb50 100644 --- a/connectivity/source/drivers/mozab/pre_include_mozilla.h +++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index 090d0b5486d0..3aeff3344ad1 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -2,7 +2,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 @@ -72,8 +72,8 @@ void OMySQLCatalog::refreshTables() Sequence< ::rtl::OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; - sTableTypes[2] = s_sAll; // just to be sure to include anything else .... - + sTableTypes[2] = s_sAll; // just to be sure to include anything else .... + refreshObjects(sTableTypes,aVector); if ( m_pTables ) @@ -157,7 +157,7 @@ Sequence< Type > SAL_CALL OMySQLCatalog::getTypes( ) throw(RuntimeException) { Sequence< Type > aTypes = OCatalog::getTypes(); ::std::vector<Type> aOwnTypes; - aOwnTypes.reserve(aTypes.getLength()); + aOwnTypes.reserve(aTypes.getLength()); const Type* pBegin = aTypes.getConstArray(); const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index 25ed7d7a9c20..28c9861f615b 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -2,7 +2,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 @@ -43,7 +43,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -OMySQLColumns::OMySQLColumns( ::cppu::OWeakObject& _rParent +OMySQLColumns::OMySQLColumns( ::cppu::OWeakObject& _rParent ,sal_Bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector @@ -58,8 +58,8 @@ Reference< XPropertySet > OMySQLColumns::createDescriptor() } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -OMySQLColumn::OMySQLColumn( sal_Bool _bCase) - : connectivity::sdbcx::OColumn( _bCase ) +OMySQLColumn::OMySQLColumn( sal_Bool _bCase) + : connectivity::sdbcx::OColumn( _bCase ) { construct(); } @@ -67,17 +67,17 @@ OMySQLColumn::OMySQLColumn( sal_Bool _bCase) void OMySQLColumn::construct() { m_sAutoIncrement = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("auto_increment")); - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OMySQLColumn::createArrayHelper( sal_Int32 /*_nId*/ ) const -{ +{ return doCreateArrayHelper(); } // ----------------------------------------------------------------------------- -::cppu::IPropertyArrayHelper & SAL_CALL OMySQLColumn::getInfoHelper() -{ - return *OMySQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0); +::cppu::IPropertyArrayHelper & SAL_CALL OMySQLColumn::getInfoHelper() +{ + return *OMySQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } // ----------------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index dc96adba44ff..4e60c0f01519 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -2,7 +2,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 @@ -63,7 +63,7 @@ namespace connectivity //= ODriverDelegator //==================================================================== //-------------------------------------------------------------------- - ODriverDelegator::ODriverDelegator(const Reference< XMultiServiceFactory >& _rxFactory) + ODriverDelegator::ODriverDelegator(const Reference< XMultiServiceFactory >& _rxFactory) : ODriverDelegator_BASE(m_aMutex) ,m_xFactory(_rxFactory) ,m_eDriverType(D_ODBC) @@ -91,7 +91,7 @@ namespace connectivity void ODriverDelegator::disposing() { ::osl::MutexGuard aGuard(m_aMutex); - + for (TWeakPairVector::iterator i = m_aConnections.begin(); m_aConnections.end() != i; ++i) { @@ -104,7 +104,7 @@ namespace connectivity ODriverDelegator_BASE::disposing(); } - namespace + namespace { sal_Bool isOdbcUrl(const ::rtl::OUString& _sUrl) { @@ -212,7 +212,7 @@ namespace connectivity ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); PropertyValue* pProps = aProps.empty() ? 0 : &aProps[0]; - return Sequence< PropertyValue >(pProps, aProps.size()); + return Sequence< PropertyValue >(pProps, aProps.size()); } } //-------------------------------------------------------------------- @@ -233,7 +233,7 @@ namespace connectivity m_xNativeDriver = lcl_loadDriver(m_xFactory,sCuttedUrl); xDriver = m_xNativeDriver; } - else + else { ::comphelper::NamedValueCollection aSettings( info ); ::rtl::OUString sDriverClass(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver")); @@ -304,7 +304,7 @@ namespace connectivity pMetaConnection->setURL(url); } m_aConnections.push_back(TWeakPair(WeakReferenceHelper(xConnection),TWeakConnectionPair(WeakReferenceHelper(),pMetaConnection))); - } + } } } return xConnection; @@ -334,7 +334,7 @@ namespace connectivity aBoolean[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")); aBoolean[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1")); - + aDriverInfo.push_back(DriverPropertyInfo( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet")) ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet of the database.")) @@ -361,7 +361,7 @@ namespace connectivity ); } - return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); } //-------------------------------------------------------------------- @@ -375,7 +375,7 @@ namespace connectivity { return 0; } - + //-------------------------------------------------------------------- Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByConnection( const Reference< XConnection >& connection ) throw (SQLException, RuntimeException) { @@ -425,7 +425,7 @@ namespace connectivity } return xTab; } - + //-------------------------------------------------------------------- Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByURL( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { @@ -438,7 +438,7 @@ namespace connectivity return getDataDefinitionByConnection(connect(url,info)); } - + // XServiceInfo // -------------------------------------------------------------------------------- //------------------------------------------------------------------------------ @@ -478,7 +478,7 @@ namespace connectivity } //------------------------------------------------------------------ //........................................................................ -} // namespace connectivity +} // namespace connectivity //........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index f40a348db09e..e08b488df633 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -2,7 +2,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 @@ -74,7 +74,7 @@ namespace connectivity return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DROP FOREIGN KEY ")); } public: - OMySQLKeysHelper( OTableHelper* _pTable, + OMySQLKeysHelper( OTableHelper* _pTable, ::osl::Mutex& _rMutex, const TStringVector& _rVector ) : OKeysHelper(_pTable,_rMutex,_rVector){} @@ -83,24 +83,24 @@ namespace connectivity } } -OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, - const Reference< XConnection >& _xConnection) +OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, + const Reference< XConnection >& _xConnection) :OTableHelper(_pTables,_xConnection,sal_True) { // we create a new table here, so we should have all the rights or ;-) - m_nPrivileges = Privilege::DROP | - Privilege::REFERENCE | - Privilege::ALTER | - Privilege::CREATE | - Privilege::READ | - Privilege::DELETE | - Privilege::UPDATE | - Privilege::INSERT | + m_nPrivileges = Privilege::DROP | + Privilege::REFERENCE | + Privilege::ALTER | + Privilege::CREATE | + Privilege::READ | + Privilege::DELETE | + Privilege::UPDATE | + Privilege::INSERT | Privilege::SELECT; construct(); } // ------------------------------------------------------------------------- -OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, +OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, const ::rtl::OUString& _Name, const ::rtl::OUString& _Type, @@ -108,7 +108,7 @@ OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, const ::rtl::OUString& _SchemaName, const ::rtl::OUString& _CatalogName, sal_Int32 _nPrivileges - ) : OTableHelper( _pTables, + ) : OTableHelper( _pTables, _xConnection, sal_True, _Name, @@ -125,7 +125,7 @@ void OMySQLTable::construct() { OTableHelper::construct(); if ( !isNew() ) - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRIVILEGES), PROPERTY_ID_PRIVILEGES,PropertyAttribute::READONLY,&m_nPrivileges, ::getCppuType(&m_nPrivileges)); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRIVILEGES), PROPERTY_ID_PRIVILEGES,PropertyAttribute::READONLY,&m_nPrivileges, ::getCppuType(&m_nPrivileges)); } // ----------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OMySQLTable::createArrayHelper( sal_Int32 /*_nId*/ ) const @@ -204,32 +204,32 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co sal_Int32 nOldType = 0,nNewType = 0,nOldPrec = 0,nNewPrec = 0,nOldScale = 0,nNewScale = 0; ::dbtools::OPropertyMap& rProp = OMetaConnection::getPropMap(); - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType; // and precsions and scale - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION))>>= nNewPrec; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nNewScale; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nNewScale; // second: check the "is nullable" value sal_Int32 nOldNullable = 0,nNewNullable = 0; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nOldNullable; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nOldNullable; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; // check also the auto_increment sal_Bool bOldAutoIncrement = sal_False,bAutoIncrement = sal_False; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; bool bColumnNameChanged = false; ::rtl::OUString sOldDesc,sNewDesc; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sOldDesc; - descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sNewDesc; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sOldDesc; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sNewDesc; - if ( nOldType != nNewType - || nOldPrec != nNewPrec - || nOldScale != nNewScale - || nNewNullable != nOldNullable - || bOldAutoIncrement != bAutoIncrement + if ( nOldType != nNewType + || nOldPrec != nNewPrec + || nOldScale != nNewScale + || nNewNullable != nOldNullable + || bOldAutoIncrement != bAutoIncrement || sOldDesc != sNewDesc ) { // special handling because they change dthe type names to distinguish @@ -264,7 +264,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co // third: check the default values ::rtl::OUString sNewDefault,sOldDefault; - xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sNewDefault; if(sOldDefault.getLength()) diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 7248e3a7327d..28858834e10c 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -2,7 +2,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 @@ -70,7 +70,7 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) Sequence< ::rtl::OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; - sTableTypes[2] = s_sAll; // just to be sure to include anything else .... + sTableTypes[2] = s_sAll; // just to be sure to include anything else .... Any aCatalog; if ( sCatalog.getLength() ) @@ -83,26 +83,26 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) Reference< XRow > xRow(xResult,UNO_QUERY); if ( xResult->next() ) // there can be only one table with this name { -// Reference<XStatement> xStmt = m_xConnection->createStatement(); -// if ( xStmt.is() ) -// { -// Reference< XResultSet > xPrivRes = xStmt->executeQuery(); -// Reference< XRow > xPrivRow(xPrivRes,UNO_QUERY); -// while ( xPrivRes.is() && xPrivRes->next() ) -// { -// if ( xPrivRow->getString(1) ) -// { -// } -// } -// } - sal_Int32 nPrivileges = Privilege::DROP | - Privilege::REFERENCE | - Privilege::ALTER | - Privilege::CREATE | - Privilege::READ | - Privilege::DELETE | - Privilege::UPDATE | - Privilege::INSERT | +// Reference<XStatement> xStmt = m_xConnection->createStatement(); +// if ( xStmt.is() ) +// { +// Reference< XResultSet > xPrivRes = xStmt->executeQuery(); +// Reference< XRow > xPrivRow(xPrivRes,UNO_QUERY); +// while ( xPrivRes.is() && xPrivRes->next() ) +// { +// if ( xPrivRow->getString(1) ) +// { +// } +// } +// } + sal_Int32 nPrivileges = Privilege::DROP | + Privilege::REFERENCE | + Privilege::ALTER | + Privilege::CREATE | + Privilege::READ | + Privilege::DELETE | + Privilege::UPDATE | + Privilege::INSERT | Privilege::SELECT; OMySQLTable* pRet = new OMySQLTable( this @@ -234,7 +234,7 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable) void OTables::addComment(const Reference< XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut) { ::rtl::OUString sDesc; - descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sDesc; + descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sDesc; if ( sDesc.getLength() ) { _rOut.appendAscii(" COMMENT '"); diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 0cdd1bf5e8c4..2467c9c7b4ad 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -2,7 +2,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 @@ -47,7 +47,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- -OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(sal_True) +OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : connectivity::sdbcx::OUser(sal_True) ,m_xConnection(_xConnection) { construct(); @@ -65,15 +65,15 @@ void OMySQLUser::refreshGroups() { } // ------------------------------------------------------------------------- -OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : OMySQLUser(_xConnection) +OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) : OMySQLUser(_xConnection) { construct(); } // ------------------------------------------------------------------------- -typedef connectivity::sdbcx::OUser OUser_TYPEDEF; +typedef connectivity::sdbcx::OUser OUser_TYPEDEF; void OUserExtend::construct() { - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const @@ -118,7 +118,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName xRes = xMeta->getTablePrivileges(aCatalog,sSchema,sTable); } break; - + case PrivilegeObject::COLUMN: { Any aCatalog; @@ -128,29 +128,29 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName } break; } - + if ( xRes.is() ) { - static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); - static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); - static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); - static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); - static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); - static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); - static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); + static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT"); + static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT"); + static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE"); + static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE"); + static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ"); + static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE"); + static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER"); static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE"); - static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); - static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); + static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP"); + static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES"); nRightsWithGrant = nRights = 0; Reference<XRow> xCurrentRow(xRes,UNO_QUERY); while( xCurrentRow.is() && xRes->next() ) { - ::rtl::OUString sGrantee = xCurrentRow->getString(5); - ::rtl::OUString sPrivilege = xCurrentRow->getString(6); - ::rtl::OUString sGrantable = xCurrentRow->getString(7); - + ::rtl::OUString sGrantee = xCurrentRow->getString(5); + ::rtl::OUString sPrivilege = xCurrentRow->getString(6); + ::rtl::OUString sGrantable = xCurrentRow->getString(7); + if (!m_Name.equalsIgnoreAsciiCase(sGrantee)) continue; @@ -217,7 +217,7 @@ sal_Int32 SAL_CALL OMySQLUser::getGrantablePrivileges( const ::rtl::OUString& ob { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); - + sal_Int32 nRights,nRightsWithGrant; findPrivilegesAndGrantPrivileges(objName,objType,nRights,nRightsWithGrant); return nRightsWithGrant; @@ -245,7 +245,7 @@ void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_I sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); sGrant += ::rtl::OUString::createFromAscii(" TO "); sGrant += m_Name; - + Reference<XStatement> xStmt = m_xConnection->createStatement(); if(xStmt.is()) xStmt->execute(sGrant); @@ -275,7 +275,7 @@ void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_ sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); sGrant += ::rtl::OUString::createFromAscii(" FROM "); sGrant += m_Name; - + Reference<XStatement> xStmt = m_xConnection->createStatement(); if(xStmt.is()) xStmt->execute(sGrant); @@ -295,7 +295,7 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/ sAlterPwd += newPassword; sAlterPwd += ::rtl::OUString::createFromAscii("')") ; - + Reference<XStatement> xStmt = m_xConnection->createStatement(); if ( xStmt.is() ) { @@ -309,35 +309,35 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/ ::rtl::OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) sPrivs += ::rtl::OUString::createFromAscii("INSERT"); - + if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("DELETE"); } - + if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("UPDATE"); } - + if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("ALTER"); } - + if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(sPrivs.getLength()) sPrivs += ::rtl::OUString::createFromAscii(","); sPrivs += ::rtl::OUString::createFromAscii("SELECT"); } - + if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(sPrivs.getLength()) diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index da6e024fef62..6f69b59e8bb5 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -2,7 +2,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 @@ -44,7 +44,7 @@ using namespace connectivity; using namespace connectivity::mysql; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; +// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -54,7 +54,7 @@ OUsers::OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const TStringVector &_rVector, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, - connectivity::sdbcx::IRefreshableUsers* _pParent) + connectivity::sdbcx::IRefreshableUsers* _pParent) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) ,m_xConnection(_xConnection) ,m_pParent(_pParent) @@ -81,8 +81,8 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); - ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO "); + ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) + ::rtl::OUString::createFromAscii(" @\"%\" "); @@ -106,8 +106,8 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const // XDrop void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) { - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM "); - ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM "); + ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); Reference< XStatement > xStmt = m_xConnection->createStatement( ); diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index 767ae19cdb48..5d3226577fa8 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -2,7 +2,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 @@ -64,8 +64,8 @@ sdbcx::ObjectType OViews::createObject(const ::rtl::OUString& _rName) ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData, _rName, - sCatalog, - sSchema, + sCatalog, + sSchema, sTable, ::dbtools::eInDataManipulation); return new ::connectivity::sdbcx::OView(isCaseSensitive(), @@ -114,10 +114,10 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) if (!bIsNew) { ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW"); - + Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); - + Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); Reference< XStatement > xStmt = xConnection->createStatement( ); xStmt->execute(aSql); @@ -136,8 +136,8 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); - ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW "); + ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index 391acae12ed5..e3987d90c5ba 100644 --- a/connectivity/source/drivers/mysql/Yservices.cxx +++ b/connectivity/source/drivers/mysql/Yservices.cxx @@ -2,7 +2,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 @@ -116,8 +116,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/mysql/mysql.xcu b/connectivity/source/drivers/mysql/mysql.xcu index afc5c0d07f5d..16e3c8203183 100755 --- a/connectivity/source/drivers/mysql/mysql.xcu +++ b/connectivity/source/drivers/mysql/mysql.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/mysql/mysql.xml b/connectivity/source/drivers/mysql/mysql.xml index 6ef9f55721b1..93cb83d0ab15 100644 --- a/connectivity/source/drivers/mysql/mysql.xml +++ b/connectivity/source/drivers/mysql/mysql.xml @@ -13,7 +13,7 @@ <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> <supported-service>com.sun.star.sdbcx.Driver</supported-service> - </component-description> + </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index fd4183b2c14b..66e10db75de1 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -2,7 +2,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,7 +42,7 @@ T3SQLConnect pODBC3SQLConnect; T3SQLDriverConnect pODBC3SQLDriverConnect; T3SQLBrowseConnect pODBC3SQLBrowseConnect; T3SQLDataSources pODBC3SQLDataSources; -T3SQLDrivers pODBC3SQLDrivers; +T3SQLDrivers pODBC3SQLDrivers; T3SQLGetInfo pODBC3SQLGetInfo; T3SQLGetFunctions pODBC3SQLGetFunctions; T3SQLGetTypeInfo pODBC3SQLGetTypeInfo; @@ -86,7 +86,7 @@ T3SQLForeignKeys pODBC3SQLForeignKeys; T3SQLPrimaryKeys pODBC3SQLPrimaryKeys; T3SQLProcedureColumns pODBC3SQLProcedureColumns; T3SQLProcedures pODBC3SQLProcedures; -T3SQLSpecialColumns pODBC3SQLSpecialColumns; +T3SQLSpecialColumns pODBC3SQLSpecialColumns; T3SQLStatistics pODBC3SQLStatistics; T3SQLTablePrivileges pODBC3SQLTablePrivileges; T3SQLTables pODBC3SQLTables; @@ -107,12 +107,12 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) { static sal_Bool bLoaded = sal_False; static oslModule pODBCso = NULL; - - if (bLoaded) + + if (bLoaded) return sal_True; #ifdef WIN _rPath = ::rtl::OUString::createFromAscii("ODBC.DLL"); - + #endif #ifdef WNT _rPath = ::rtl::OUString::createFromAscii("ODBC32.DLL"); @@ -153,127 +153,127 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) sal_Bool LoadFunctions(oslModule pODBCso) { - if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLAllocHandle").pData )) == NULL ) + if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLAllocHandle").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLConnect").pData )) == NULL ) + if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLConnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDriverConnect").pData )) == NULL ) + if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDriverConnect").pData )) == NULL ) return sal_False; if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBrowseConnect").pData )) == NULL ) return sal_False; - if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDataSources").pData )) == NULL ) + if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDataSources").pData )) == NULL ) return sal_False; - if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDrivers").pData )) == NULL ) + if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDrivers").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetInfo").pData )) == NULL ) + if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetInfo").pData )) == NULL ) return sal_False; - if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetFunctions").pData )) == NULL ) + if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetFunctions").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetTypeInfo").pData )) == NULL ) + if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetTypeInfo").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetConnectAttr").pData )) == NULL ) + if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetConnectAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetConnectAttr").pData )) == NULL ) + if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetConnectAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetEnvAttr").pData )) == NULL ) + if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetEnvAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetEnvAttr").pData )) == NULL ) + if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetEnvAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetStmtAttr").pData )) == NULL ) + if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetStmtAttr").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetStmtAttr").pData )) == NULL ) + if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetStmtAttr").pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLSetDescField = (T3SQLSetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescField").pData )) == NULL ) + /*if( ( pODBC3SQLSetDescField = (T3SQLSetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescField").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetDescField = (T3SQLGetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescField").pData )) == NULL ) + if( ( pODBC3SQLGetDescField = (T3SQLGetDescField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescField").pData )) == NULL ) return sal_False;*/ - /*if( ( pODBC3SQLGetDescRec = (T3SQLGetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescRec").pData )) == NULL ) + /*if( ( pODBC3SQLGetDescRec = (T3SQLGetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDescRec").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetDescRec = (T3SQLSetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescRec").pData )) == NULL ) + if( ( pODBC3SQLSetDescRec = (T3SQLSetDescRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetDescRec").pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrepare").pData )) == NULL ) + if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrepare").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindParameter").pData )) == NULL ) + if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindParameter").pData )) == NULL ) return sal_False; -// if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) -// return sal_False; - if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetCursorName").pData )) == NULL ) +// if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) +// return sal_False; + if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetCursorName").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecute").pData )) == NULL ) + if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecute").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecDirect").pData )) == NULL ) + if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLExecDirect").pData )) == NULL ) return sal_False; - /*if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) + /*if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) return sal_False;*/ if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeParam").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumParams").pData )) == NULL ) + if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumParams").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLParamData").pData )) == NULL ) + if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLParamData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPutData").pData )) == NULL ) + if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPutData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLRowCount").pData )) == NULL ) + if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLRowCount").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumResultCols").pData )) == NULL ) + if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNumResultCols").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeCol").pData )) == NULL ) + if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDescribeCol").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColAttribute").pData )) == NULL ) + if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColAttribute").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindCol").pData )) == NULL ) + if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBindCol").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetch").pData )) == NULL ) + if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetch").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetchScroll").pData )) == NULL ) + if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFetchScroll").pData )) == NULL ) + return sal_False; + if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetData").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetData").pData )) == NULL ) + if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetPos").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSetPos").pData )) == NULL ) + if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBulkOperations").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLBulkOperations").pData )) == NULL ) + if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLMoreResults").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLMoreResults").pData )) == NULL ) - return sal_False; - /*if( ( pODBC3SQLGetDiagField = (T3SQLGetDiagField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagField").pData )) == NULL ) + /*if( ( pODBC3SQLGetDiagField = (T3SQLGetDiagField)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagField").pData )) == NULL ) return sal_False;*/ - if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagRec").pData )) == NULL ) + if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetDiagRec").pData )) == NULL ) return sal_False; if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumnPrivileges").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumns").pData )) == NULL ) + if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLForeignKeys").pData )) == NULL ) + if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLForeignKeys").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrimaryKeys").pData )) == NULL ) + if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLPrimaryKeys").pData )) == NULL ) return sal_False; if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedureColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedures").pData )) == NULL ) + if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLProcedures").pData )) == NULL ) return sal_False; if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLSpecialColumns").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLStatistics").pData )) == NULL ) - return sal_False; - if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTablePrivileges").pData )) == NULL ) + if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLStatistics").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTables").pData )) == NULL ) + if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTablePrivileges").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeStmt").pData )) == NULL ) + if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLTables").pData )) == NULL ) + return sal_False; + if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeStmt").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCloseCursor").pData )) == NULL ) + if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCloseCursor").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCancel").pData )) == NULL ) + if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLCancel").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLEndTran").pData )) == NULL ) + if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLEndTran").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDisconnect").pData )) == NULL ) + if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLDisconnect").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeHandle").pData )) == NULL ) + if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLFreeHandle").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) + if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLGetCursorName").pData )) == NULL ) return sal_False; - if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) + if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, ::rtl::OUString::createFromAscii("SQLNativeSql").pData )) == NULL ) return sal_False; return sal_True; diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index 1bca9cccc78a..8dd9ab3bfd25 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx @@ -2,7 +2,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 @@ -108,7 +108,7 @@ namespace connectivity { protected: virtual oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const; - virtual SQLHANDLE EnvironmentHandle(::rtl::OUString &_rPath); + virtual SQLHANDLE EnvironmentHandle(::rtl::OUString &_rPath); public: ORealObdcDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) : ODBCDriver(_rxFactory) {} }; diff --git a/connectivity/source/drivers/odbc/ORealDriver.hxx b/connectivity/source/drivers/odbc/ORealDriver.hxx index 41185499aa15..9b1939335ae1 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.hxx +++ b/connectivity/source/drivers/odbc/ORealDriver.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * 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 diff --git a/connectivity/source/drivers/odbc/odbc.xcu b/connectivity/source/drivers/odbc/odbc.xcu index 74ba8815d021..f8efe2eed493 100755 --- a/connectivity/source/drivers/odbc/odbc.xcu +++ b/connectivity/source/drivers/odbc/odbc.xcu @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/odbc/odbc.xml b/connectivity/source/drivers/odbc/odbc.xml index ad7562ae7a35..eae2d3f3e11a 100644 --- a/connectivity/source/drivers/odbc/odbc.xml +++ b/connectivity/source/drivers/odbc/odbc.xml @@ -12,7 +12,7 @@ <language>c++</language> <status value="final"/> <supported-service>com.sun.star.sdbc.Driver</supported-service> - </component-description> + </component-description> <project-build-dependency>cppuhelper</project-build-dependency> <project-build-dependency>cppu</project-build-dependency> <project-build-dependency>sal</project-build-dependency> diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx index 34e29b5cbcc2..eab3c07f3076 100644 --- a/connectivity/source/drivers/odbc/oservices.cxx +++ b/connectivity/source/drivers/odbc/oservices.cxx @@ -2,7 +2,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 @@ -117,8 +117,8 @@ struct ProviderRequest extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx index d7bd5c6baef5..1fec1f89ec38 100644 --- a/connectivity/source/drivers/odbcbase/OConnection.cxx +++ b/connectivity/source/drivers/odbcbase/OConnection.cxx @@ -2,7 +2,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 @@ -56,7 +56,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; // -------------------------------------------------------------------------------- -OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver) +OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver) : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this) ,m_pDriver(_pDriver) ,m_pDriverHandleCopy(_pDriverHandle) @@ -161,7 +161,7 @@ SQLRETURN OConnection::OpenConnection(const ::rtl::OUString& aConnectStr,sal_Int { ::rtl::OUString sVersion; OTools::GetInfo(this,m_aConnectionHandle,SQL_DRIVER_ODBC_VER,sVersion,*this,getTextEncoding()); - m_bUseOldDateFormat = sVersion == ::rtl::OUString::createFromAscii("02.50") || sVersion == ::rtl::OUString::createFromAscii("02.00"); + m_bUseOldDateFormat = sVersion == ::rtl::OUString::createFromAscii("02.50") || sVersion == ::rtl::OUString::createFromAscii("02.00"); } catch(Exception&) { @@ -179,7 +179,7 @@ SQLRETURN OConnection::OpenConnection(const ::rtl::OUString& aConnectStr,sal_Int SQLRETURN OConnection::Construct(const ::rtl::OUString& url,const Sequence< PropertyValue >& info) throw(SQLException) { m_aConnectionHandle = SQL_NULL_HANDLE; - m_sURL = url; + m_sURL = url; setConnectionInfo(info); // Connection allozieren @@ -192,23 +192,23 @@ SQLRETURN OConnection::Construct(const ::rtl::OUString& url,const Sequence< Prop ::rtl::OUString aDSN(RTL_CONSTASCII_USTRINGPARAM("DSN=")), aUID, aPWD, aSysDrvSettings; aDSN += url.copy(nLen+1); - const char* pUser = "user"; - const char* pTimeout = "Timeout"; - const char* pSilent = "Silent"; - const char* pPwd = "password"; + const char* pUser = "user"; + const char* pTimeout = "Timeout"; + const char* pSilent = "Silent"; + const char* pPwd = "password"; const char* pUseCatalog = "UseCatalog"; - const char* pSysDrv = "SystemDriverSettings"; - const char* pCharSet = "CharSet"; - const char* pParaName = "ParameterNameSubstitution"; - const char* pPrivName = "IgnoreDriverPrivileges"; + const char* pSysDrv = "SystemDriverSettings"; + const char* pCharSet = "CharSet"; + const char* pParaName = "ParameterNameSubstitution"; + const char* pPrivName = "IgnoreDriverPrivileges"; const char* pVerColName = "PreventGetVersionColumns"; // #i60273# - const char* pRetrieving = "IsAutoRetrievingEnabled"; - const char* pRetriStmt = "AutoRetrievingStatement"; + const char* pRetrieving = "IsAutoRetrievingEnabled"; + const char* pRetriStmt = "AutoRetrievingStatement"; sal_Int32 nTimeout = 20; sal_Bool bSilent = sal_True; - const PropertyValue *pBegin = info.getConstArray(); - const PropertyValue *pEnd = pBegin + info.getLength(); + const PropertyValue *pBegin = info.getConstArray(); + const PropertyValue *pEnd = pBegin + info.getLength(); for(;pBegin != pEnd;++pBegin) { if(!pBegin->Name.compareToAscii(pTimeout)) @@ -497,13 +497,13 @@ void OConnection::buildTypeInfo() throw( SQLException) { Reference< XRow> xRow(xRs,UNO_QUERY); // Information for a single SQL type - + ::connectivity::ORowSetValue aValue; ::std::vector<sal_Int32> aTypes; Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData(); sal_Int32 nCount = xResultSetMetaData->getColumnCount(); // Loop on the result set until we reach end of file - while (xRs->next ()) + while (xRs->next ()) { OTypeInfo aInfo; sal_Int32 nPos = 1; @@ -518,54 +518,54 @@ void OConnection::buildTypeInfo() throw( SQLException) } aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.aTypeName = aValue; + aInfo.aTypeName = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.nType = aValue; + aInfo.nType = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.nPrecision = aValue; + aInfo.nPrecision = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.aLiteralPrefix = aValue; + aInfo.aLiteralPrefix = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.aLiteralSuffix = aValue; + aInfo.aLiteralSuffix = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.aCreateParams = aValue; + aInfo.aCreateParams = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE; + aInfo.bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.bCaseSensitive = (sal_Bool)aValue; + aInfo.bCaseSensitive = (sal_Bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.nSearchType = aValue; + aInfo.nSearchType = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.bUnsigned = (sal_Bool)aValue; + aInfo.bUnsigned = (sal_Bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.bCurrency = (sal_Bool)aValue; + aInfo.bCurrency = (sal_Bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.bAutoIncrement = (sal_Bool)aValue; + aInfo.bAutoIncrement = (sal_Bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.aLocalTypeName = aValue; + aInfo.aLocalTypeName = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.nMinimumScale = aValue; + aInfo.nMinimumScale = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.nMaximumScale = aValue; + aInfo.nMaximumScale = aValue; if ( nCount >= 18 ) { nPos = 18; aValue.fill(nPos,aTypes[nPos],xRow); - aInfo.nNumPrecRadix = aValue; + aInfo.nNumPrecRadix = aValue; } // check if values are less than zero like it happens in a oracle jdbc driver @@ -606,7 +606,7 @@ void OConnection::disposing() if(!m_bClosed) N3SQLDisconnect(m_aConnectionHandle); - m_bClosed = sal_True; + m_bClosed = sal_True; dispose_ChildImpl(); } diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx index ac0fdc7333f6..ce2b36d9fe2c 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx @@ -2,7 +2,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 @@ -60,9 +60,9 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon osl_incrementInterlockedCount( &m_refCount ); try { - m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); + m_bUseCatalog = !(usesLocalFiles() || usesLocalFilePerTable()); ::rtl::OUString sVersion = getDriverVersion(); - m_bOdbc3 = sVersion != ::rtl::OUString::createFromAscii("02.50") && sVersion != ::rtl::OUString::createFromAscii("02.00"); + m_bOdbc3 = sVersion != ::rtl::OUString::createFromAscii("02.50") && sVersion != ::rtl::OUString::createFromAscii("02.00"); } catch(SQLException& ) { // doesn't matter here @@ -335,7 +335,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTableNameLength( ) throw(SQLExcepti return nValue; } // ------------------------------------------------------------------------- -sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) +sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_MAX_TABLES_IN_SELECT,nValue,*this); @@ -483,7 +483,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return nValue == SQL_IC_LOWER; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); @@ -522,8 +522,8 @@ sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ALTER_TABLE,nValue,*this); - return ((nValue & SQL_AT_DROP_COLUMN) == SQL_AT_DROP_COLUMN) || - ((nValue & SQL_AT_DROP_COLUMN_CASCADE) == SQL_AT_DROP_COLUMN_CASCADE) || + return ((nValue & SQL_AT_DROP_COLUMN) == SQL_AT_DROP_COLUMN) || + ((nValue & SQL_AT_DROP_COLUMN_CASCADE) == SQL_AT_DROP_COLUMN_CASCADE) || ((nValue & SQL_AT_DROP_COLUMN_RESTRICT) == SQL_AT_DROP_COLUMN_RESTRICT); } // ------------------------------------------------------------------------- @@ -690,7 +690,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return (nValue & SQL_SU_INDEX_DEFINITION) == SQL_SU_INDEX_DEFINITION; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); @@ -713,7 +713,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro return (nValue & SQL_CU_INDEX_DEFINITION) == SQL_CU_INDEX_DEFINITION; } // ------------------------------------------------------------------------- -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { SQLUINTEGER nValue=0; if(m_bUseCatalog) @@ -940,25 +940,25 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CONVERT_LONGVARBINARY,nValue,*this); break; case DataType::SQLNULL: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; case DataType::OTHER: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; case DataType::OBJECT: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; case DataType::DISTINCT: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; case DataType::STRUCT: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; case DataType::ARRAY: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; case DataType::REF: - // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); + // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; } sal_Bool bConvert = sal_False; diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx index aef6f67b4801..88fd5133b126 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx @@ -2,7 +2,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 @@ -84,7 +84,7 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection m_pConnection->acquire(); m_pRowStatusArray = new SQLUSMALLINT[1]; // the default value osl_decrementInterlockedCount( &m_refCount ); - // allocBuffer(); + // allocBuffer(); } // ------------------------------------------------------------------------- @@ -107,7 +107,7 @@ void ODatabaseMetaDataResultSet::disposing(void) if(m_bFreeHandle) m_pConnection->freeStatementHandle(m_aStatementHandle); - m_aStatement = NULL; + m_aStatement = NULL; m_xMetaData.clear(); m_pConnection->release(); } @@ -135,16 +135,16 @@ void SAL_CALL ODatabaseMetaDataResultSet::release() throw() // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< XFastPropertySet > *)0 ), ::getCppuType( (const Reference< XPropertySet > *)0 )); return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } // ----------------------------------------------------------------------------- -sal_Int32 ODatabaseMetaDataResultSet::mapColumn (sal_Int32 column) +sal_Int32 ODatabaseMetaDataResultSet::mapColumn (sal_Int32 column) { - sal_Int32 map = column; + sal_Int32 map = column; if (!m_aColMapping.empty()) { @@ -228,7 +228,7 @@ sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) t { OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TINYINT,m_bWasNull,**this,&nVal,sizeof nVal); - ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator aValueRangeIter; + ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator aValueRangeIter; if ( !m_aValueRange.empty() && (aValueRangeIter = m_aValueRange.find(columnIndex)) != m_aValueRange.end()) return sal_Int8((*aValueRangeIter).second[(sal_Int32)nVal]); } @@ -335,7 +335,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) t { OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_LONG,m_bWasNull,**this,&nVal,sizeof nVal); - ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator aValueRangeIter; + ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator aValueRangeIter; if ( !m_aValueRange.empty() && (aValueRangeIter = m_aValueRange.find(columnIndex)) != m_aValueRange.end()) return (*aValueRangeIter).second[(sal_Int32)nVal]; } @@ -410,7 +410,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) { OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_SHORT,m_bWasNull,**this,&nVal,sizeof nVal); - ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator aValueRangeIter; + ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator aValueRangeIter; if ( !m_aValueRange.empty() && (aValueRangeIter = m_aValueRange.find(columnIndex)) != m_aValueRange.end()) return sal_Int16((*aValueRangeIter).second[(sal_Int32)nVal]); } @@ -669,7 +669,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti ::osl::MutexGuard aGuard( m_aMutex ); - // m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_NEXT,0); + // m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_NEXT,0); m_nCurrentFetchState = N3SQLFetch(m_aStatementHandle); OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); return m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; @@ -747,11 +747,11 @@ sal_Int32 ODatabaseMetaDataResultSet::getFetchSize() const throw(SQLException, R Sequence< com::sun::star::beans::Property > aProps(5); com::sun::star::beans::Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); - DECL_PROP0(RESULTSETTYPE, sal_Int32); + DECL_PROP0(RESULTSETTYPE, sal_Int32); return new ::cppu::OPropertyArrayHelper(aProps); } @@ -824,37 +824,37 @@ void ODatabaseMetaDataResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nH void ODatabaseMetaDataResultSet::openTypeInfo() throw(SQLException, RuntimeException) { TInt2IntMap aMap; - aMap[SQL_BIT] = DataType::BIT; - aMap[SQL_TINYINT] = DataType::TINYINT; - aMap[SQL_SMALLINT] = DataType::SMALLINT; - aMap[SQL_INTEGER] = DataType::INTEGER; - aMap[SQL_FLOAT] = DataType::FLOAT; - aMap[SQL_REAL] = DataType::REAL; - aMap[SQL_DOUBLE] = DataType::DOUBLE; - aMap[SQL_BIGINT] = DataType::BIGINT; - - aMap[SQL_CHAR] = DataType::CHAR; - aMap[SQL_WCHAR] = DataType::CHAR; - aMap[SQL_VARCHAR] = DataType::VARCHAR; - aMap[SQL_WVARCHAR] = DataType::VARCHAR; - aMap[SQL_LONGVARCHAR] = DataType::LONGVARCHAR; - aMap[SQL_WLONGVARCHAR] = DataType::LONGVARCHAR; - - aMap[SQL_TYPE_DATE] = DataType::DATE; - aMap[SQL_DATE] = DataType::DATE; - aMap[SQL_TYPE_TIME] = DataType::TIME; - aMap[SQL_TIME] = DataType::TIME; - aMap[SQL_TYPE_TIMESTAMP] = DataType::TIMESTAMP; - aMap[SQL_TIMESTAMP] = DataType::TIMESTAMP; - - aMap[SQL_DECIMAL] = DataType::DECIMAL; - aMap[SQL_NUMERIC] = DataType::NUMERIC; - - aMap[SQL_BINARY] = DataType::BINARY; - aMap[SQL_VARBINARY] = DataType::VARBINARY; - aMap[SQL_LONGVARBINARY] = DataType::LONGVARBINARY; - - aMap[SQL_GUID] = DataType::VARBINARY; + aMap[SQL_BIT] = DataType::BIT; + aMap[SQL_TINYINT] = DataType::TINYINT; + aMap[SQL_SMALLINT] = DataType::SMALLINT; + aMap[SQL_INTEGER] = DataType::INTEGER; + aMap[SQL_FLOAT] = DataType::FLOAT; + aMap[SQL_REAL] = DataType::REAL; + aMap[SQL_DOUBLE] = DataType::DOUBLE; + aMap[SQL_BIGINT] = DataType::BIGINT; + + aMap[SQL_CHAR] = DataType::CHAR; + aMap[SQL_WCHAR] = DataType::CHAR; + aMap[SQL_VARCHAR] = DataType::VARCHAR; + aMap[SQL_WVARCHAR] = DataType::VARCHAR; + aMap[SQL_LONGVARCHAR] = DataType::LONGVARCHAR; + aMap[SQL_WLONGVARCHAR] = DataType::LONGVARCHAR; + + aMap[SQL_TYPE_DATE] = DataType::DATE; + aMap[SQL_DATE] = DataType::DATE; + aMap[SQL_TYPE_TIME] = DataType::TIME; + aMap[SQL_TIME] = DataType::TIME; + aMap[SQL_TYPE_TIMESTAMP] = DataType::TIMESTAMP; + aMap[SQL_TIMESTAMP] = DataType::TIMESTAMP; + + aMap[SQL_DECIMAL] = DataType::DECIMAL; + aMap[SQL_NUMERIC] = DataType::NUMERIC; + + aMap[SQL_BINARY] = DataType::BINARY; + aMap[SQL_VARBINARY] = DataType::VARBINARY; + aMap[SQL_LONGVARBINARY] = DataType::LONGVARBINARY; + + aMap[SQL_GUID] = DataType::VARBINARY; m_aValueRange[2] = aMap; @@ -865,7 +865,7 @@ void ODatabaseMetaDataResultSet::openTypeInfo() throw(SQLException, RuntimeExcep //----------------------------------------------------------------------------- void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, - const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException) + const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException) { m_bFreeHandle = sal_True; ::rtl::OString aPKQ,aPKO,aPKN,aCOL; @@ -880,12 +880,12 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const ::rtl::OUS aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = aPKN = ::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding).getStr(); - const char *pCOL = NULL; + const char *pCOL = NULL; const char* pComma = ","; const ::rtl::OUString* pBegin = types.getConstArray(); const ::rtl::OUString* pEnd = pBegin + types.getLength(); @@ -912,7 +912,7 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const ::rtl::OUS } //----------------------------------------------------------------------------- -void ODatabaseMetaDataResultSet::openTablesTypes( ) throw(SQLException, RuntimeException) +void ODatabaseMetaDataResultSet::openTablesTypes( ) throw(SQLException, RuntimeException) { m_bFreeHandle = sal_True; SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle, @@ -964,8 +964,8 @@ void ODatabaseMetaDataResultSet::openSchemas() throw(SQLException, RuntimeExcept checkColumnCount(); } // ------------------------------------------------------------------------- -void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, const ::rtl::OUString& schema, - const ::rtl::OUString& table, const ::rtl::OUString& columnNamePattern ) +void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, const ::rtl::OUString& schema, + const ::rtl::OUString& table, const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException) { const ::rtl::OUString *pSchemaPat = NULL; @@ -981,7 +981,7 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, cons aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding).getStr(), *pCOL = aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding).getStr(); @@ -997,8 +997,8 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog, cons checkColumnCount(); } // ------------------------------------------------------------------------- -void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, const ::rtl::OUString& schemaPattern, - const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern ) +void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, const ::rtl::OUString& schemaPattern, + const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException) { const ::rtl::OUString *pSchemaPat = NULL; @@ -1013,7 +1013,7 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = aPKN = ::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding).getStr(), *pCOL = aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding).getStr(); @@ -1027,43 +1027,43 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); TInt2IntMap aMap; - aMap[SQL_BIT] = DataType::BIT; - aMap[SQL_TINYINT] = DataType::TINYINT; - aMap[SQL_SMALLINT] = DataType::SMALLINT; - aMap[SQL_INTEGER] = DataType::INTEGER; - aMap[SQL_FLOAT] = DataType::FLOAT; - aMap[SQL_REAL] = DataType::REAL; - aMap[SQL_DOUBLE] = DataType::DOUBLE; - aMap[SQL_BIGINT] = DataType::BIGINT; - - aMap[SQL_CHAR] = DataType::CHAR; - aMap[SQL_WCHAR] = DataType::CHAR; - aMap[SQL_VARCHAR] = DataType::VARCHAR; - aMap[SQL_WVARCHAR] = DataType::VARCHAR; - aMap[SQL_LONGVARCHAR] = DataType::LONGVARCHAR; - aMap[SQL_WLONGVARCHAR] = DataType::LONGVARCHAR; - - aMap[SQL_TYPE_DATE] = DataType::DATE; - aMap[SQL_DATE] = DataType::DATE; - aMap[SQL_TYPE_TIME] = DataType::TIME; - aMap[SQL_TIME] = DataType::TIME; - aMap[SQL_TYPE_TIMESTAMP] = DataType::TIMESTAMP; - aMap[SQL_TIMESTAMP] = DataType::TIMESTAMP; - - aMap[SQL_DECIMAL] = DataType::DECIMAL; - aMap[SQL_NUMERIC] = DataType::NUMERIC; - - aMap[SQL_BINARY] = DataType::BINARY; - aMap[SQL_VARBINARY] = DataType::VARBINARY; - aMap[SQL_LONGVARBINARY] = DataType::LONGVARBINARY; - - aMap[SQL_GUID] = DataType::VARBINARY; + aMap[SQL_BIT] = DataType::BIT; + aMap[SQL_TINYINT] = DataType::TINYINT; + aMap[SQL_SMALLINT] = DataType::SMALLINT; + aMap[SQL_INTEGER] = DataType::INTEGER; + aMap[SQL_FLOAT] = DataType::FLOAT; + aMap[SQL_REAL] = DataType::REAL; + aMap[SQL_DOUBLE] = DataType::DOUBLE; + aMap[SQL_BIGINT] = DataType::BIGINT; + + aMap[SQL_CHAR] = DataType::CHAR; + aMap[SQL_WCHAR] = DataType::CHAR; + aMap[SQL_VARCHAR] = DataType::VARCHAR; + aMap[SQL_WVARCHAR] = DataType::VARCHAR; + aMap[SQL_LONGVARCHAR] = DataType::LONGVARCHAR; + aMap[SQL_WLONGVARCHAR] = DataType::LONGVARCHAR; + + aMap[SQL_TYPE_DATE] = DataType::DATE; + aMap[SQL_DATE] = DataType::DATE; + aMap[SQL_TYPE_TIME] = DataType::TIME; + aMap[SQL_TIME] = DataType::TIME; + aMap[SQL_TYPE_TIMESTAMP] = DataType::TIMESTAMP; + aMap[SQL_TIMESTAMP] = DataType::TIMESTAMP; + + aMap[SQL_DECIMAL] = DataType::DECIMAL; + aMap[SQL_NUMERIC] = DataType::NUMERIC; + + aMap[SQL_BINARY] = DataType::BINARY; + aMap[SQL_VARBINARY] = DataType::VARBINARY; + aMap[SQL_LONGVARBINARY] = DataType::LONGVARBINARY; + + aMap[SQL_GUID] = DataType::VARBINARY; m_aValueRange[5] = aMap; checkColumnCount(); } // ------------------------------------------------------------------------- -void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog, const ::rtl::OUString& schemaPattern, +void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& procedureNamePattern,const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException) { @@ -1079,7 +1079,7 @@ void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog, aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = aPKN = ::rtl::OUStringToOString(procedureNamePattern,m_nTextEncoding).getStr(), *pCOL = aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding).getStr(); @@ -1112,7 +1112,7 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const ::rtl: aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = aPKN = ::rtl::OUStringToOString(procedureNamePattern,m_nTextEncoding).getStr(); @@ -1126,7 +1126,7 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const ::rtl: } // ------------------------------------------------------------------------- void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& catalog, const ::rtl::OUString& schema, - const ::rtl::OUString& table,sal_Int32 scope, sal_Bool nullable ) + const ::rtl::OUString& table,sal_Int32 scope, sal_Bool nullable ) throw(SQLException, RuntimeException) { const ::rtl::OUString *pSchemaPat = NULL; @@ -1141,7 +1141,7 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding).getStr(); @@ -1181,10 +1181,10 @@ void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const ::rt if ( catalog2.hasValue() ) aFKQ = ::rtl::OUStringToOString(comphelper::getString(catalog2),m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = schema && schema->getLength() ? ::rtl::OUStringToOString(*schema,m_nTextEncoding).getStr() : NULL, *pPKN = table ? (aPKN = ::rtl::OUStringToOString(*table,m_nTextEncoding)).getStr(): NULL, - *pFKQ = catalog2.hasValue() && aFKQ.getLength() ? aFKQ.getStr() : NULL, + *pFKQ = catalog2.hasValue() && aFKQ.getLength() ? aFKQ.getStr() : NULL, *pFKO = schema2 && schema2->getLength() ? (aFKO = ::rtl::OUStringToOString(*schema2,m_nTextEncoding)).getStr() : NULL, *pFKN = table2 ? (aFKN = ::rtl::OUStringToOString(*table2,m_nTextEncoding)).getStr() : NULL; @@ -1202,20 +1202,20 @@ void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const ::rt } // ------------------------------------------------------------------------- void ODatabaseMetaDataResultSet::openImportedKeys(const Any& catalog, const ::rtl::OUString& schema, - const ::rtl::OUString& table) throw(SQLException, RuntimeException) + const ::rtl::OUString& table) throw(SQLException, RuntimeException) { openForeignKeys(Any(),NULL,NULL,catalog,!schema.compareToAscii("%") ? &schema : NULL,&table); } // ------------------------------------------------------------------------- void ODatabaseMetaDataResultSet::openExportedKeys(const Any& catalog, const ::rtl::OUString& schema, - const ::rtl::OUString& table) throw(SQLException, RuntimeException) + const ::rtl::OUString& table) throw(SQLException, RuntimeException) { openForeignKeys(catalog,!schema.compareToAscii("%") ? &schema : NULL,&table,Any(),NULL,NULL); } // ------------------------------------------------------------------------- void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const ::rtl::OUString& schema, - const ::rtl::OUString& table) throw(SQLException, RuntimeException) + const ::rtl::OUString& table) throw(SQLException, RuntimeException) { const ::rtl::OUString *pSchemaPat = NULL; @@ -1230,7 +1230,7 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const ::rtl aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = (aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding)).getStr(); @@ -1259,7 +1259,7 @@ void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const : aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = (aPKN = ::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding)).getStr(); @@ -1289,7 +1289,7 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const ::rtl: aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding); aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding); - const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, + const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL, *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL, *pPKN = (aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding)).getStr(); diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx index 3c3d945f0d6d..c81198ebd6b2 100644 --- a/connectivity/source/drivers/odbcbase/ODriver.cxx +++ b/connectivity/source/drivers/odbcbase/ODriver.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx index a4b513eee998..2d13dd4e9147 100644 --- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx @@ -2,7 +2,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 @@ -67,7 +67,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const ::rtl::O :OStatement_BASE2(_pConnection) ,numParams(0) ,boundParams(NULL) - ,m_bPrepared(sal_False) + ,m_bPrepared(sal_False) { m_sSqlStatement = sql; try @@ -79,7 +79,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const ::rtl::O ::rtl::OUString sNewSql; ::std::auto_ptr<OSQLParseNode> pNode( aParser.parseTree(sErrorMessage,sql) ); if ( pNode.get() ) - { // special handling for parameters + { // special handling for parameters OSQLParseNode::substituteParameterNames(pNode.get()); pNode->parseNodeToStr( sNewSql, _pConnection ); m_sSqlStatement = sNewSql; @@ -256,7 +256,7 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, Run if (!execute()) numRows = getUpdateCount (); - else + else { // No update count was produced (a ResultSet was). Raise // an exception @@ -293,7 +293,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE if (execute()) rs = getResultSet(sal_False); - else + else { // No ResultSet was produced. Raise an exception m_pConnection->throwGenericSQLException(STR_NO_RESULTSET,*this); @@ -352,7 +352,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex,sal_Int32 _nType, sal_Int8* bindBuf = allocBindBuf(parameterIndex, nRealSize); OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); - OTools::bindParameter( m_pConnection, + OTools::bindParameter( m_pConnection, m_aStatementHandle, parameterIndex, bindBuf, @@ -451,13 +451,13 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s SQLSMALLINT fSqlType = 0; SQLSMALLINT nDecimalDigits = 0; - OTools::getBindTypes( sal_False, + OTools::getBindTypes( sal_False, m_pConnection->useOldDateFormat(), (SQLSMALLINT)sqlType, fCType, fSqlType); - SQLRETURN nReturn = N3SQLBindParameter( m_aStatementHandle, + SQLRETURN nReturn = N3SQLBindParameter( m_aStatementHandle, (SQLUSMALLINT)parameterIndex, (SQLSMALLINT)SQL_PARAM_INPUT, fCType, @@ -527,14 +527,14 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c setNull(parameterIndex,sqlType); break; case DataType::DECIMAL: - { + { ORowSetValue aValue; aValue.fill(x); setDecimal(parameterIndex,aValue); } break; case DataType::NUMERIC: - { + { ORowSetValue aValue; aValue.fill(x); setString(parameterIndex,aValue); @@ -558,7 +558,7 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException) { if (!::dbtools::implSetObject(this, parameterIndex, x)) - { // there is no other setXXX call which can handle the value in x + { // there is no other setXXX call which can handle the value in x throw SQLException(); } } @@ -600,8 +600,8 @@ void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, Runtim // ------------------------------------------------------------------------- void SAL_CALL OPreparedStatement::clearBatch( ) throw(SQLException, RuntimeException) { - // clearParameters( ); - // m_aBatchList.erase(); + // clearParameters( ); + // m_aBatchList.erase(); } // ------------------------------------------------------------------------- @@ -658,7 +658,7 @@ void OPreparedStatement::initBoundParam () throw(SQLException) // parameter. //-------------------------------------------------------------------- -sal_Int8* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen) +sal_Int8* OPreparedStatement::allocBindBuf( sal_Int32 index,sal_Int32 bufLen) { sal_Int8* b = NULL; @@ -725,7 +725,7 @@ sal_Int8* OPreparedStatement::getLengthBuf (sal_Int32 index) // the column is considered to be NULL. //-------------------------------------------------------------------- -sal_Int32 OPreparedStatement::getParamLength ( sal_Int32 index) +sal_Int32 OPreparedStatement::getParamLength ( sal_Int32 index) { sal_Int32 paramLen = SQL_NULL_DATA; @@ -764,12 +764,12 @@ void OPreparedStatement::putParamData (sal_Int32 index) throw(SQLException) // Get the information about the input stream - Reference< XInputStream> inputStream = boundParams[index - 1].getInputStream (); + Reference< XInputStream> inputStream = boundParams[index - 1].getInputStream (); if ( !inputStream.is() ) { ::connectivity::SharedResources aResources; const ::rtl::OUString sError( aResources.getResourceString(STR_NO_INPUTSTREAM)); - throw SQLException (sError, *this,::rtl::OUString(),0,Any()); + throw SQLException (sError, *this,::rtl::OUString(),0,Any()); } sal_Int32 maxBytesLeft = boundParams[index - 1].getInputStreamLen (); @@ -871,7 +871,7 @@ void OPreparedStatement::setStream( // Bind the parameter with SQL_LEN_DATA_AT_EXEC SQLSMALLINT Ctype = SQL_C_CHAR; - SQLLEN atExec = SQL_LEN_DATA_AT_EXEC (length); + SQLLEN atExec = SQL_LEN_DATA_AT_EXEC (length); memcpy (dataBuf, &ParameterIndex, sizeof(ParameterIndex)); memcpy (lenBuf, &atExec, sizeof (atExec)); @@ -933,7 +933,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons } catch(const SQLException&) { - // throw Exception(e.Message,*this); + // throw Exception(e.Message,*this); } } // ----------------------------------------------------------------------------- @@ -952,7 +952,7 @@ void OPreparedStatement::prepareStatement() // ----------------------------------------------------------------------------- void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) { - if( !_parameterIndex || _parameterIndex > numParams) + if( !_parameterIndex || _parameterIndex > numParams) { ::connectivity::SharedResources aResources; const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution(STR_WRONG_PARAM_INDEX, diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index 2b3c45b4214c..f33d2ec489b8 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -2,7 +2,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 @@ -64,7 +64,7 @@ using namespace com::sun::star::util; #define ODBC_SQL_NOT_DEFINED 99UL //------------------------------------------------------------------------------ -// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); +// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); ::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) { return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.odbc.ResultSet"); @@ -90,7 +90,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const ::rtl::OUString& _rServiceN } // ------------------------------------------------------------------------- -OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) +OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_aStatementHandle(_pStatementHandle) ,m_aConnectionHandle(pStmt->getConnectionHandle()) @@ -240,7 +240,7 @@ SQLRETURN OResultSet::unbind(sal_Bool _bUnbindHandle) case DataType::BIT: case DataType::TINYINT: delete static_cast< sal_Int8* >(reinterpret_cast< void * >(pValue->first)); - break; + break; case DataType::SMALLINT: delete static_cast< sal_Int16* >(reinterpret_cast< void * >(pValue->first)); break; @@ -303,7 +303,7 @@ TVoidPtr OResultSet::allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex) case DataType::BIT: case DataType::TINYINT: aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new sal_Int8(0)),_nType); - break; + break; case DataType::SMALLINT: aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new sal_Int16(0)),_nType); break; @@ -337,13 +337,13 @@ void OResultSet::allocBuffer() for(sal_Int32 i = 1;i<=nLen;++i) { sal_Int32 nType = xMeta->getColumnType(i); - m_aRow[i].setTypeKind( nType ); + m_aRow[i].setTypeKind( nType ); } m_aLengthVector.resize(nLen + 1); } // ------------------------------------------------------------------------- void OResultSet::releaseBuffer() -{ +{ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OResultSet::releaseBuffer" ); unbind(sal_False); m_aLengthVector.clear(); @@ -357,7 +357,7 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException) { - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), + OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); @@ -492,11 +492,11 @@ Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, R { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OResultSet::getDate" ); DATE_STRUCT aDate; - aDate.day = 0; + aDate.day = 0; aDate.month = 0; - aDate.year = 0; + aDate.year = 0; - const ORowSetValue& aValue = getValue( columnIndex, + const ORowSetValue& aValue = getValue( columnIndex, m_pStatement->getOwnConnection()->useOldDateFormat() ? SQL_C_DATE : SQL_C_TYPE_DATE, &aDate,sizeof aDate); return (&aValue == &m_aEmptyValue) ? Date(aDate.day,aDate.month,aDate.year) : (Date)aValue; @@ -616,7 +616,7 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OResultSet::getString" ); ::osl::MutexGuard aGuard( m_aMutex ); - + ::rtl::OUString nRet; if ( m_bFetchData ) nRet = getValue(columnIndex,0,NULL,0); @@ -852,7 +852,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) nMaxLen, &nRealLen ); - // Sequence<sal_Int8> aRealBookmark(nMaxLen); + // Sequence<sal_Int8> aRealBookmark(nMaxLen); sal_Bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) ); if ( bPositionByBookmark ) @@ -887,7 +887,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) else nRet = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_RELATIVE,0); // OJ 06.03.2004 // sometimes we got an error but we are not interested in anymore #106047# OJ - // OTools::ThrowException(m_pStatement->getOwnConnection(),nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this); + // OTools::ThrowException(m_pStatement->getOwnConnection(),nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this); nRet = unbind(); OTools::ThrowException(m_pStatement->getOwnConnection(),nRet,m_aStatementHandle,SQL_HANDLE_STMT,*this); @@ -983,7 +983,7 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti m_nLastColumnPos = 0; // first unbound all columns OSL_VERIFY_EQUALS( unbind(), SQL_SUCCESS, "Could not unbind columns!" ); - // SQLRETURN nRet = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE ,(SQLPOINTER)1,SQL_IS_INTEGER); + // SQLRETURN nRet = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE ,(SQLPOINTER)1,SQL_IS_INTEGER); m_bInserting = sal_True; } // ------------------------------------------------------------------------- @@ -1002,7 +1002,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex,SQLSMALLINT _nType,void* _pVa m_aBindVector.push_back(allocBindColumn(OTools::MapOdbcType2Jdbc(_nType),columnIndex)); void* pData = reinterpret_cast<void*>(m_aBindVector.rbegin()->first); OSL_ENSURE(pData != NULL,"Data for update is NULL!"); - OTools::bindValue( m_pStatement->getOwnConnection(), + OTools::bindValue( m_pStatement->getOwnConnection(), m_aStatementHandle, columnIndex, _nType, @@ -1124,7 +1124,7 @@ void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - // SQLRETURN nRet = N3SQLSetPos(m_aStatementHandle,1,SQL_REFRESH,SQL_LOCK_NO_CHANGE); + // SQLRETURN nRet = N3SQLSetPos(m_aStatementHandle,1,SQL_REFRESH,SQL_LOCK_NO_CHANGE); m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_RELATIVE,0); OTools::ThrowException(m_pStatement->getOwnConnection(),m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); } @@ -1243,10 +1243,10 @@ sal_Int32 SAL_CALL OResultSet::hashBookmark( const Any& /*bookmark*/ ) throw( S Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException) { Sequence< sal_Int32 > aRet(rows.getLength()); - sal_Int32 *pRet = aRet.getArray(); + sal_Int32 *pRet = aRet.getArray(); - const Any *pBegin = rows.getConstArray(); - const Any *pEnd = pBegin + rows.getLength(); + const Any *pBegin = rows.getConstArray(); + const Any *pEnd = pBegin + rows.getLength(); for(;pBegin != pEnd;++pBegin,++pRet) { @@ -1353,7 +1353,7 @@ sal_Bool OResultSet::isBookmarkable() const { return sal_False; } - + if ( m_nUseBookmarks == ODBC_SQL_NOT_DEFINED ) { m_nUseBookmarks = SQL_UB_OFF; @@ -1382,12 +1382,12 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const Sequence< Property > aProps(6); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); - DECL_PROP0(FETCHDIRECTION, sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP1IMPL(CURSORNAME, ::rtl::OUString) PropertyAttribute::READONLY); + DECL_PROP0(FETCHDIRECTION, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_BOOL_PROP1IMPL(ISBOOKMARKABLE) PropertyAttribute::READONLY); DECL_PROP1IMPL(RESULTSETCONCURRENCY,sal_Int32) PropertyAttribute::READONLY); - DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); + DECL_PROP1IMPL(RESULTSETTYPE, sal_Int32) PropertyAttribute::READONLY); return new OPropertyArrayHelper(aProps); } @@ -1483,9 +1483,9 @@ void OResultSet::fillRow(sal_Int32 _nToColumn) } m_bFetchData = sal_False; - sal_Int32 nColumn = m_nLastColumnPos + 1; - TDataRow::iterator pColumn = m_aRow.begin() + nColumn; - TDataRow::iterator pColumnEnd = m_aRow.begin() + _nToColumn + 1; + sal_Int32 nColumn = m_nLastColumnPos + 1; + TDataRow::iterator pColumn = m_aRow.begin() + nColumn; + TDataRow::iterator pColumnEnd = m_aRow.begin() + _nToColumn + 1; for (; pColumn < pColumnEnd; ++nColumn, ++pColumn) { diff --git a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx index 34f60939f9f8..af21829918c1 100644 --- a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx @@ -2,7 +2,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 diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index 1a6b2d49e551..dcf62bf3c6a3 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -2,7 +2,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 @@ -57,13 +57,13 @@ using namespace ::comphelper; OTools::ThrowException(m_pConnection,x,m_aStatementHandle,SQL_HANDLE_STMT,*this) #if OSL_DEBUG_LEVEL > 1 -#define DEBUG_THROW \ - try \ - { \ - THROW_SQL(nRetCode); \ - } \ - catch(SQLException&) \ - { \ +#define DEBUG_THROW \ + try \ + { \ + THROW_SQL(nRetCode); \ + } \ + catch(SQLException&) \ + { \ OSL_ENSURE(0,"Exception in odbc catched"); \ } #endif @@ -162,7 +162,7 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime // ------------------------------------------------------------------------- Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), ::getCppuType( (const Reference< XFastPropertySet > *)0 ), ::getCppuType( (const Reference< XPropertySet > *)0 )); Sequence< Type > aOldTypes = OStatement_BASE::getTypes(); @@ -178,7 +178,7 @@ Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException) // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL OStatement_Base::getGeneratedValues( ) throw (SQLException, RuntimeException) { - OSL_ENSURE( m_pConnection && m_pConnection->isAutoRetrievingEnabled(),"Illegal call here. isAutoRetrievingEnabled is false!"); + OSL_ENSURE( m_pConnection && m_pConnection->isAutoRetrievingEnabled(),"Illegal call here. isAutoRetrievingEnabled is false!"); Reference< XResultSet > xRes; if ( m_pConnection ) { @@ -320,7 +320,7 @@ sal_Bool OStatement_Base::lockIfNecessary (const ::rtl::OUString& sql) throw( SQ // Sets the warning //-------------------------------------------------------------------- -void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) +void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); @@ -340,7 +340,7 @@ sal_Int32 OStatement_Base::getColumnCount () throw( SQLException) checkDisposed(OStatement_BASE::rBHelper.bDisposed); - sal_Int16 numCols = 0; + sal_Int16 numCols = 0; OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); try { @@ -450,7 +450,7 @@ Reference< XResultSet > OStatement_Base::getResultSet (sal_Bool checkCount) thro sal_Int32 OStatement_Base::getStmtOption (short fOption) const { - sal_Int32 result = 0; + sal_Int32 result = 0; OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); N3SQLGetStmtAttr(m_aStatementHandle, fOption,&result,SQL_IS_INTEGER,NULL); return result; @@ -562,7 +562,7 @@ sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const ::rtl::OUString& sql ) ::connectivity::SharedResources aResources; const ::rtl::OUString sError( aResources.getResourceString(STR_NO_ROWCOUNT)); - throw SQLException (sError, *this,::rtl::OUString(),0,Any()); + throw SQLException (sError, *this,::rtl::OUString(),0,Any()); } return numRows; @@ -604,7 +604,7 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, Runtim checkDisposed(OStatement_BASE::rBHelper.bDisposed); - SQLWarning warning; + SQLWarning warning; sal_Bool hasResultSet = sal_False; // clear previous warnings @@ -800,10 +800,10 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) switch(_par0) { case ResultSetType::FORWARD_ONLY: - nSet = SQL_UNSPECIFIED; + nSet = SQL_UNSPECIFIED; break; case ResultSetType::SCROLL_INSENSITIVE: - nSet = SQL_INSENSITIVE; + nSet = SQL_INSENSITIVE; N3SQLSetStmtAttr(m_aStatementHandle, SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)SQL_CURSOR_KEYSET_DRIVEN,SQL_IS_UINTEGER); break; case ResultSetType::SCROLL_SENSITIVE: @@ -816,7 +816,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) sal_Bool bNotBookmarks = ((nCurProp & SQL_CA1_BOOKMARK) != SQL_CA1_BOOKMARK); nCurProp = getCursorProperties(SQL_CURSOR_KEYSET_DRIVEN,sal_False); nSet = SQL_CURSOR_KEYSET_DRIVEN; - if( bNotBookmarks || + if( bNotBookmarks || ((nCurProp & SQL_CA2_SENSITIVITY_DELETIONS) != SQL_CA2_SENSITIVITY_DELETIONS) || ((nCurProp & SQL_CA2_SENSITIVITY_ADDITIONS) != SQL_CA2_SENSITIVITY_ADDITIONS)) { @@ -835,7 +835,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) nSet = SQL_CURSOR_KEYSET_DRIVEN; N3SQLSetStmtAttr(m_aStatementHandle, SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)nSet,SQL_IS_UINTEGER); } - nSet = SQL_SENSITIVE; + nSet = SQL_SENSITIVE; break; default: OSL_ENSURE( false, "OStatement_Base::setResultSetType: invalid result set type!" ); @@ -859,7 +859,7 @@ void OStatement_Base::setFetchDirection(sal_Int32 _par0) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); sal_Int32 nCursType = 0; - SQLRETURN nRetCode = SQL_SUCCESS; + SQLRETURN nRetCode = SQL_SUCCESS; if(_par0 == FetchDirection::FORWARD) { nCursType = SQL_NONSCROLLABLE; @@ -928,12 +928,12 @@ void OStatement_Base::setUsingBookmarks(sal_Bool _bUseBookmark) Sequence< Property > aProps(10); Property* pProperties = aProps.getArray(); sal_Int32 nPos = 0; - DECL_PROP0(CURSORNAME, ::rtl::OUString); + DECL_PROP0(CURSORNAME, ::rtl::OUString); DECL_BOOL_PROP0(ESCAPEPROCESSING); DECL_PROP0(FETCHDIRECTION,sal_Int32); - DECL_PROP0(FETCHSIZE, sal_Int32); + DECL_PROP0(FETCHSIZE, sal_Int32); DECL_PROP0(MAXFIELDSIZE,sal_Int32); - DECL_PROP0(MAXROWS, sal_Int32); + DECL_PROP0(MAXROWS, sal_Int32); DECL_PROP0(QUERYTIMEOUT,sal_Int32); DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32); DECL_PROP0(RESULTSETTYPE,sal_Int32); @@ -1004,7 +1004,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue( } catch(const SQLException&) { - // throw Exception(e.Message,*this); + // throw Exception(e.Message,*this); } return bConverted; } @@ -1052,7 +1052,7 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A } catch(const SQLException& ) { - // throw Exception(e.Message,*this); + // throw Exception(e.Message,*this); } } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx index 76d44d533834..f48ac3c08da0 100644 --- a/connectivity/source/drivers/odbcbase/OTools.cxx +++ b/connectivity/source/drivers/odbcbase/OTools.cxx @@ -2,7 +2,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 @@ -47,7 +47,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::sdbc; using namespace com::sun::star::util; -void OTools::getValue( OConnection* _pConnection, +void OTools::getValue( OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, @@ -69,7 +69,7 @@ void OTools::getValue( OConnection* _pConnection, _bWasNull = pcbValue == SQL_NULL_DATA; } // ----------------------------------------------------------------------------- -void OTools::bindParameter( OConnection* _pConnection, +void OTools::bindParameter( OConnection* _pConnection, SQLHANDLE _hStmt, sal_Int32 nPos, sal_Int8*& pDataBuffer, @@ -87,10 +87,10 @@ void OTools::bindParameter( OConnection* _pConnection, SQLSMALLINT fSqlType; SQLSMALLINT fCType; SQLLEN nMaxLen = 0; - // void*& pData = pDataBuffer; + // void*& pData = pDataBuffer; SQLLEN* pLen = (SQLLEN*)pLenBuffer; SQLULEN nColumnSize=0; - SQLSMALLINT nDecimalDigits=0; + SQLSMALLINT nDecimalDigits=0; OTools::getBindTypes(_bUseWChar,_bUseOldTimeDate,_nODBCtype,fCType,fSqlType); @@ -102,7 +102,7 @@ void OTools::bindParameter( OConnection* _pConnection, memcpy(pDataBuffer,&nPos,sizeof(nPos)); // 20.09.2001 OJ: Problems with mysql. mysql returns only CHAR as parameter type - // nRetcode = (*(T3SQLDescribeParam)_pConnection->getOdbcFunction(ODBC3SQLDescribeParam))(_hStmt,(SQLUSMALLINT)nPos,&fSqlType,&nColumnSize,&nDecimalDigits,&nNullable); + // nRetcode = (*(T3SQLDescribeParam)_pConnection->getOdbcFunction(ODBC3SQLDescribeParam))(_hStmt,(SQLUSMALLINT)nPos,&fSqlType,&nColumnSize,&nDecimalDigits,&nNullable); nRetcode = (*(T3SQLBindParameter)_pConnection->getOdbcFunction(ODBC3SQLBindParameter))(_hStmt, (SQLUSMALLINT)nPos, @@ -118,7 +118,7 @@ void OTools::bindParameter( OConnection* _pConnection, OTools::ThrowException(_pConnection,nRetcode,_hStmt,SQL_HANDLE_STMT,_xInterface); } // ----------------------------------------------------------------------------- -void OTools::bindData( SQLSMALLINT _nOdbcType, +void OTools::bindData( SQLSMALLINT _nOdbcType, sal_Bool _bUseWChar, sal_Int8 *&_pData, SQLLEN*& pLen, @@ -159,7 +159,7 @@ void OTools::bindData( SQLSMALLINT _nOdbcType, *pLen = sizeof(sal_Int64); _nColumnSize = *pLen; break; - + case SQL_NUMERIC: if(_bUseWChar) { @@ -177,7 +177,7 @@ void OTools::bindData( SQLSMALLINT _nOdbcType, *pLen = _nColumnSize; memcpy(_pData,aString.getStr(),aString.getLength()); ((sal_Int8*)_pData)[_nColumnSize] = '\0'; - } break; + } break; case SQL_BIT: case SQL_TINYINT: *((sal_Int8*)_pData) = *(sal_Int8*)_pValue; @@ -251,7 +251,7 @@ void OTools::bindData( SQLSMALLINT _nOdbcType, } } // ------------------------------------------------------------------------- -void OTools::bindValue( OConnection* _pConnection, +void OTools::bindValue( OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, @@ -269,7 +269,7 @@ void OTools::bindValue( OConnection* _pConnection, SQLSMALLINT fCType; SQLLEN nMaxLen = _nMaxLen; - OTools::getBindTypes( sal_False, + OTools::getBindTypes( sal_False, _bUseOldTimeDate, _nType, fCType, @@ -295,15 +295,15 @@ void OTools::bindValue( OConnection* _pConnection, case SQL_CHAR: case SQL_VARCHAR: //if(GetODBCConnection()->m_bUserWChar) -// { -// _nMaxLen = rCol.GetPrecision(); -// *pLen = SQL_NTS; -// *((rtl::OUString*)pData) = (rtl::OUString)_aValue; +// { +// _nMaxLen = rCol.GetPrecision(); +// *pLen = SQL_NTS; +// *((rtl::OUString*)pData) = (rtl::OUString)_aValue; // -// // Zeiger auf Char* -// pData = (void*)((rtl::OUString*)pData)->getStr(); -// } -// else +// // Zeiger auf Char* +// pData = (void*)((rtl::OUString*)pData)->getStr(); +// } +// else { ::rtl::OString aString(::rtl::OUStringToOString(*(::rtl::OUString*)_pValue,_nTextEncoding)); *pLen = SQL_NTS; @@ -312,7 +312,7 @@ void OTools::bindValue( OConnection* _pConnection, // Zeiger auf Char* _pData = (void*)aString.getStr(); - } break; + } break; case SQL_BIGINT: *((sal_Int64*)_pData) = *(sal_Int64*)_pValue; *pLen = sizeof(sal_Int64); @@ -320,14 +320,14 @@ void OTools::bindValue( OConnection* _pConnection, case SQL_DECIMAL: case SQL_NUMERIC: //if(GetODBCConnection()->m_bUserWChar) -// { -// rtl::OUString aString(rtl::OUString(SdbTools::ToString(ODbTypeConversion::toDouble(*pVariable),rCol.GetScale()))); -// *pLen = _nMaxLen; -// *((rtl::OUString*)_pData) = aString; -// // Zeiger auf Char* -// _pData = (void*)((rtl::OUString*)_pData)->getStr(); -// } -// else +// { +// rtl::OUString aString(rtl::OUString(SdbTools::ToString(ODbTypeConversion::toDouble(*pVariable),rCol.GetScale()))); +// *pLen = _nMaxLen; +// *((rtl::OUString*)_pData) = aString; +// // Zeiger auf Char* +// _pData = (void*)((rtl::OUString*)_pData)->getStr(); +// } +// else { ::rtl::OString aString = ::rtl::OString::valueOf(*(double*)_pValue); _nMaxLen = (SQLSMALLINT)aString.getLength(); @@ -335,7 +335,7 @@ void OTools::bindValue( OConnection* _pConnection, *((::rtl::OString*)_pData) = aString; // Zeiger auf Char* _pData = (void*)((::rtl::OString*)_pData)->getStr(); - } break; + } break; case SQL_BIT: case SQL_TINYINT: *((sal_Int8*)_pData) = *(sal_Int8*)_pValue; @@ -365,7 +365,7 @@ void OTools::bindValue( OConnection* _pConnection, { _pData = (void*)((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getConstArray(); *pLen = ((const ::com::sun::star::uno::Sequence< sal_Int8 > *)_pValue)->getLength(); - } break; + } break; case SQL_LONGVARBINARY: { _pData = (void*)(columnIndex); @@ -463,7 +463,7 @@ void OTools::ThrowException(OConnection* _pConnection, OSL_ENSURE(n == SQL_SUCCESS || n == SQL_SUCCESS_WITH_INFO || n == SQL_NO_DATA_FOUND || n == SQL_ERROR,"SdbODBC3_SetStatus: SQLError failed"); // Zum Return Code von SQLError siehe ODBC 2.0 Programmer's Reference Seite 287ff - throw SQLException( ::rtl::OUString((char *)szErrorMessage,pcbErrorMsg,_nTextEncoding), + throw SQLException( ::rtl::OUString((char *)szErrorMessage,pcbErrorMsg,_nTextEncoding), _xInterface, ::rtl::OUString((char *)szSqlState,5,_nTextEncoding), pfNativeError, @@ -484,7 +484,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, // Erstmal versuchen, die Daten mit dem kleinen Puffer // abzuholen: SQLLEN nMaxLen = sizeof aCharArray - 1; - // GETDATA(SQL_C_CHAR,aCharArray,nMaxLen); + // GETDATA(SQL_C_CHAR,aCharArray,nMaxLen); SQLLEN pcbValue = 0; OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle, (SQLUSMALLINT)columnIndex, @@ -519,7 +519,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, nBytes = nMaxLen; // Solange eine "truncation"-Warnung vorliegt, weiter Daten abholen - // GETDATA(SQL_C_CHAR,aCharArray, nLen + 1); + // GETDATA(SQL_C_CHAR,aCharArray, nLen + 1); OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle, (SQLUSMALLINT)columnIndex, SQL_C_BINARY, @@ -553,7 +553,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, sal_Unicode waCharArray[2048]; // read the unicode data SQLLEN nMaxLen = (sizeof(waCharArray) / sizeof(sal_Unicode)) - 1; - // GETDATA(SQL_C_WCHAR, waCharArray, nMaxLen + sizeof(sal_Unicode)); + // GETDATA(SQL_C_WCHAR, waCharArray, nMaxLen + sizeof(sal_Unicode)); SQLLEN pcbValue=0; OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle, @@ -590,7 +590,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, nLen = nMaxLen; // Solange eine "truncation"-Warnung vorliegt, weiter Daten abholen - // GETDATA(SQL_C_CHAR,waCharArray, nLen + 1); + // GETDATA(SQL_C_CHAR,waCharArray, nLen + 1); OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle, (SQLUSMALLINT)columnIndex, SQL_C_WCHAR, @@ -614,7 +614,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, // Erstmal versuchen, die Daten mit dem kleinen Puffer // abzuholen: SQLLEN nMaxLen = sizeof aCharArray - 1; - // GETDATA(SQL_C_CHAR,aCharArray,nMaxLen); + // GETDATA(SQL_C_CHAR,aCharArray,nMaxLen); SQLLEN pcbValue = 0; OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle, (SQLUSMALLINT)columnIndex, @@ -640,7 +640,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, while ((pcbValue == SQL_NO_TOTAL) || pcbValue > nMaxLen) { // Solange eine "truncation"-Warnung vorliegt, weiter Daten abholen - // GETDATA(SQL_C_CHAR,aCharArray, nLen + 1); + // GETDATA(SQL_C_CHAR,aCharArray, nLen + 1); OTools::ThrowException(_pConnection,(*(T3SQLGetData)_pConnection->getOdbcFunction(ODBC3SQLGetData))(_aStatementHandle, (SQLUSMALLINT)columnIndex, SQL_C_CHAR, @@ -657,7 +657,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection, } // delete all blanks - // aData.EraseTrailingChars(); + // aData.EraseTrailingChars(); } } @@ -687,7 +687,7 @@ void OTools::GetInfo(OConnection* _pConnection, const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException) { SQLSMALLINT nValueLen; - _rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION) + _rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION) OTools::ThrowException(_pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); @@ -700,7 +700,7 @@ void OTools::GetInfo(OConnection* _pConnection, const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException) { SQLSMALLINT nValueLen; - _rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION) + _rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION) OTools::ThrowException(_pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); @@ -713,7 +713,7 @@ void OTools::GetInfo(OConnection* _pConnection, const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException) { SQLSMALLINT nValueLen; - _rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION) + _rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION) OTools::ThrowException(_pConnection, (*(T3SQLGetInfo)_pConnection->getOdbcFunction(ODBC3SQLGetInfo))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen), _aConnectionHandle,SQL_HANDLE_DBC,_xInterface); @@ -843,7 +843,7 @@ void OTools::getBindTypes(sal_Bool _bUseWChar, RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::getBindTypes" ); switch(_nOdbcType) { - case SQL_CHAR: if(_bUseWChar) + case SQL_CHAR: if(_bUseWChar) { fCType = SQL_C_WCHAR; fSqlType = SQL_WCHAR; @@ -854,7 +854,7 @@ void OTools::getBindTypes(sal_Bool _bUseWChar, fSqlType = SQL_CHAR; } break; - case SQL_VARCHAR: if(_bUseWChar) + case SQL_VARCHAR: if(_bUseWChar) { fCType = SQL_C_WCHAR; fSqlType = SQL_WVARCHAR; @@ -865,82 +865,82 @@ void OTools::getBindTypes(sal_Bool _bUseWChar, fSqlType = SQL_VARCHAR; } break; - case SQL_LONGVARCHAR: if(_bUseWChar) + case SQL_LONGVARCHAR: if(_bUseWChar) { fCType = SQL_C_WCHAR; fSqlType = SQL_WLONGVARCHAR; } else { - fCType = SQL_C_CHAR; + fCType = SQL_C_CHAR; fSqlType = SQL_LONGVARCHAR; } break; - case SQL_DECIMAL: fCType = _bUseWChar ? SQL_C_WCHAR : SQL_C_CHAR; - fSqlType = SQL_DECIMAL; break; - case SQL_NUMERIC: fCType = _bUseWChar ? SQL_C_WCHAR : SQL_C_CHAR; - fSqlType = SQL_NUMERIC; break; - case SQL_BIT: fCType = SQL_C_TINYINT; - fSqlType = SQL_INTEGER; break; - case SQL_TINYINT: fCType = SQL_C_TINYINT; - fSqlType = SQL_TINYINT; break; - case SQL_SMALLINT: fCType = SQL_C_SHORT; - fSqlType = SQL_SMALLINT; break; - case SQL_INTEGER: fCType = SQL_C_LONG; - fSqlType = SQL_INTEGER; break; - case SQL_BIGINT: fCType = SQL_C_SBIGINT; - fSqlType = SQL_BIGINT; break; - case SQL_FLOAT: fCType = SQL_C_FLOAT; - fSqlType = SQL_FLOAT; break; - case SQL_REAL: fCType = SQL_C_DOUBLE; - fSqlType = SQL_REAL; break; - case SQL_DOUBLE: fCType = SQL_C_DOUBLE; - fSqlType = SQL_DOUBLE; break; - case SQL_BINARY: fCType = SQL_C_BINARY; - fSqlType = SQL_BINARY; break; + case SQL_DECIMAL: fCType = _bUseWChar ? SQL_C_WCHAR : SQL_C_CHAR; + fSqlType = SQL_DECIMAL; break; + case SQL_NUMERIC: fCType = _bUseWChar ? SQL_C_WCHAR : SQL_C_CHAR; + fSqlType = SQL_NUMERIC; break; + case SQL_BIT: fCType = SQL_C_TINYINT; + fSqlType = SQL_INTEGER; break; + case SQL_TINYINT: fCType = SQL_C_TINYINT; + fSqlType = SQL_TINYINT; break; + case SQL_SMALLINT: fCType = SQL_C_SHORT; + fSqlType = SQL_SMALLINT; break; + case SQL_INTEGER: fCType = SQL_C_LONG; + fSqlType = SQL_INTEGER; break; + case SQL_BIGINT: fCType = SQL_C_SBIGINT; + fSqlType = SQL_BIGINT; break; + case SQL_FLOAT: fCType = SQL_C_FLOAT; + fSqlType = SQL_FLOAT; break; + case SQL_REAL: fCType = SQL_C_DOUBLE; + fSqlType = SQL_REAL; break; + case SQL_DOUBLE: fCType = SQL_C_DOUBLE; + fSqlType = SQL_DOUBLE; break; + case SQL_BINARY: fCType = SQL_C_BINARY; + fSqlType = SQL_BINARY; break; case SQL_VARBINARY: - fCType = SQL_C_BINARY; - fSqlType = SQL_VARBINARY; break; - case SQL_LONGVARBINARY: fCType = SQL_C_BINARY; - fSqlType = SQL_LONGVARBINARY; break; + fCType = SQL_C_BINARY; + fSqlType = SQL_VARBINARY; break; + case SQL_LONGVARBINARY: fCType = SQL_C_BINARY; + fSqlType = SQL_LONGVARBINARY; break; case SQL_DATE: if(_bUseOldTimeDate) { - fCType = SQL_C_DATE; - fSqlType = SQL_DATE; + fCType = SQL_C_DATE; + fSqlType = SQL_DATE; } else { - fCType = SQL_C_TYPE_DATE; - fSqlType = SQL_TYPE_DATE; + fCType = SQL_C_TYPE_DATE; + fSqlType = SQL_TYPE_DATE; } break; case SQL_TIME: if(_bUseOldTimeDate) { - fCType = SQL_C_TIME; - fSqlType = SQL_TIME; + fCType = SQL_C_TIME; + fSqlType = SQL_TIME; } else { - fCType = SQL_C_TYPE_TIME; - fSqlType = SQL_TYPE_TIME; + fCType = SQL_C_TYPE_TIME; + fSqlType = SQL_TYPE_TIME; } break; case SQL_TIMESTAMP: if(_bUseOldTimeDate) { - fCType = SQL_C_TIMESTAMP; - fSqlType = SQL_TIMESTAMP; + fCType = SQL_C_TIMESTAMP; + fSqlType = SQL_TIMESTAMP; } else { - fCType = SQL_C_TYPE_TIMESTAMP; - fSqlType = SQL_TYPE_TIMESTAMP; + fCType = SQL_C_TYPE_TIMESTAMP; + fSqlType = SQL_TYPE_TIMESTAMP; } break; - default: fCType = SQL_C_BINARY; - fSqlType = SQL_LONGVARBINARY; break; + default: fCType = SQL_C_BINARY; + fSqlType = SQL_LONGVARBINARY; break; } } |