From 199d333f131474729a105afa5a3da61205f61df2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Apr 2014 09:14:24 +0200 Subject: connectivity: sal_Bool->bool Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56 --- .../source/drivers/ado/ADatabaseMetaData.cxx | 26 ++-- connectivity/source/drivers/calc/CConnection.cxx | 4 +- .../source/drivers/calc/CDatabaseMetaData.cxx | 22 +-- connectivity/source/drivers/calc/CResultSet.cxx | 14 +- connectivity/source/drivers/calc/CTable.cxx | 38 ++--- connectivity/source/drivers/calc/Cservices.cxx | 2 +- connectivity/source/drivers/dbase/DCode.cxx | 2 +- .../source/drivers/dbase/DDatabaseMetaData.cxx | 10 +- connectivity/source/drivers/dbase/DIndex.cxx | 54 +++---- connectivity/source/drivers/dbase/DIndexIter.cxx | 16 +-- connectivity/source/drivers/dbase/DResultSet.cxx | 14 +- connectivity/source/drivers/dbase/DTable.cxx | 132 ++++++++--------- connectivity/source/drivers/dbase/DTables.cxx | 2 +- connectivity/source/drivers/dbase/Dservices.cxx | 2 +- connectivity/source/drivers/dbase/dindexnode.cxx | 64 ++++----- .../source/drivers/evoab2/NDatabaseMetaData.cxx | 37 +++-- .../source/drivers/evoab2/NDatabaseMetaData.hxx | 26 ++-- connectivity/source/drivers/file/FConnection.cxx | 16 +-- .../source/drivers/file/FDatabaseMetaData.cxx | 68 ++++----- .../source/drivers/file/FPreparedStatement.cxx | 4 +- connectivity/source/drivers/file/FResultSet.cxx | 156 ++++++++++----------- connectivity/source/drivers/file/FStatement.cxx | 8 +- connectivity/source/drivers/file/FTable.cxx | 16 +-- connectivity/source/drivers/file/fanalyzer.cxx | 10 +- connectivity/source/drivers/file/fcode.cxx | 36 ++--- connectivity/source/drivers/file/fcomp.cxx | 14 +- .../source/drivers/firebird/Connection.cxx | 6 +- .../source/drivers/firebird/Connection.hxx | 8 +- .../source/drivers/firebird/DatabaseMetaData.cxx | 2 +- connectivity/source/drivers/firebird/Driver.cxx | 2 +- connectivity/source/drivers/firebird/ResultSet.hxx | 2 +- connectivity/source/drivers/firebird/Services.cxx | 2 +- .../drivers/firebird/StatementCommonBase.cxx | 2 +- .../source/drivers/firebird/SubComponent.hxx | 2 +- connectivity/source/drivers/flat/EConnection.cxx | 4 +- connectivity/source/drivers/flat/EResultSet.cxx | 10 +- connectivity/source/drivers/flat/ETable.cxx | 46 +++--- connectivity/source/drivers/flat/Eservices.cxx | 2 +- connectivity/source/drivers/hsqldb/HCatalog.cxx | 2 +- connectivity/source/drivers/hsqldb/HColumns.cxx | 8 +- connectivity/source/drivers/hsqldb/HDriver.cxx | 10 +- connectivity/source/drivers/hsqldb/HStorageMap.cxx | 4 +- connectivity/source/drivers/hsqldb/HTable.cxx | 6 +- connectivity/source/drivers/hsqldb/HTables.cxx | 4 +- connectivity/source/drivers/hsqldb/HView.cxx | 2 +- connectivity/source/drivers/hsqldb/HViews.cxx | 8 +- connectivity/source/drivers/hsqldb/Hservices.cxx | 2 +- .../source/drivers/jdbc/DatabaseMetaData.cxx | 38 ++--- .../source/drivers/jdbc/DriverPropertyInfo.cxx | 2 +- connectivity/source/drivers/jdbc/JConnection.cxx | 12 +- connectivity/source/drivers/jdbc/JStatement.cxx | 4 +- connectivity/source/drivers/jdbc/Object.cxx | 14 +- connectivity/source/drivers/jdbc/ResultSet.cxx | 2 +- connectivity/source/drivers/jdbc/jservices.cxx | 2 +- connectivity/source/drivers/jdbc/tools.cxx | 6 +- connectivity/source/drivers/mork/MConnection.hxx | 2 +- .../source/drivers/mork/MDatabaseMetaData.cxx | 36 ++--- .../source/drivers/mork/MDatabaseMetaData.hxx | 26 ++-- .../drivers/mork/MDatabaseMetaDataHelper.cxx | 10 +- .../drivers/mork/MDatabaseMetaDataHelper.hxx | 4 +- .../source/drivers/mork/MPreparedStatement.cxx | 6 +- .../source/drivers/mork/MPreparedStatement.hxx | 2 +- connectivity/source/drivers/mork/MQueryHelper.cxx | 32 ++--- connectivity/source/drivers/mork/MQueryHelper.hxx | 32 ++--- connectivity/source/drivers/mork/MResultSet.cxx | 74 +++++----- connectivity/source/drivers/mork/MResultSet.hxx | 24 ++-- .../source/drivers/mork/MResultSetMetaData.cxx | 2 +- .../source/drivers/mork/MResultSetMetaData.hxx | 4 +- connectivity/source/drivers/mork/MStatement.cxx | 4 +- connectivity/source/drivers/mork/MTable.hxx | 2 +- .../source/drivers/mozab/MDatabaseMetaData.cxx | 36 ++--- .../source/drivers/mozab/MDatabaseMetaData.hxx | 26 ++-- .../drivers/mozab/bootstrap/MMozillaBootstrap.cxx | 2 +- .../source/drivers/mozab/bootstrap/MNSInit.hxx | 12 +- .../drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 10 +- .../drivers/mozab/bootstrap/MNSProfileDiscover.hxx | 4 +- .../drivers/mozab/mozillasrc/MNSDeclares.hxx | 3 +- connectivity/source/drivers/mysql/YColumns.cxx | 8 +- connectivity/source/drivers/mysql/YDriver.cxx | 6 +- connectivity/source/drivers/mysql/YTable.cxx | 4 +- connectivity/source/drivers/mysql/YTables.cxx | 4 +- connectivity/source/drivers/mysql/YViews.cxx | 6 +- connectivity/source/drivers/odbc/OConnection.cxx | 30 ++-- .../source/drivers/odbc/ODatabaseMetaData.cxx | 26 ++-- .../drivers/odbc/ODatabaseMetaDataResultSet.cxx | 62 ++++---- connectivity/source/drivers/odbc/OFunctions.cxx | 122 ++++++++-------- .../source/drivers/odbc/OPreparedStatement.cxx | 10 +- connectivity/source/drivers/odbc/ORealDriver.cxx | 2 +- connectivity/source/drivers/odbc/OResultSet.cxx | 84 +++++------ .../source/drivers/odbc/OResultSetMetaData.cxx | 6 +- connectivity/source/drivers/odbc/OStatement.cxx | 40 +++--- connectivity/source/drivers/odbc/OTools.cxx | 20 +-- connectivity/source/drivers/odbc/oservices.cxx | 2 +- .../source/drivers/postgresql/pq_baseresultset.cxx | 10 +- .../source/drivers/postgresql/pq_baseresultset.hxx | 2 +- .../source/drivers/postgresql/pq_connection.hxx | 4 +- .../drivers/postgresql/pq_databasemetadata.cxx | 2 +- .../drivers/postgresql/pq_preparedstatement.cxx | 4 +- .../drivers/postgresql/pq_preparedstatement.hxx | 2 +- .../drivers/postgresql/pq_resultsetmetadata.cxx | 8 +- .../drivers/postgresql/pq_resultsetmetadata.hxx | 2 +- .../postgresql/pq_sequenceresultsetmetadata.cxx | 2 +- .../source/drivers/postgresql/pq_statement.cxx | 12 +- .../source/drivers/postgresql/pq_statement.hxx | 4 +- .../source/drivers/postgresql/pq_statics.cxx | 48 +++---- .../source/drivers/postgresql/pq_statics.hxx | 24 ++-- .../source/drivers/postgresql/pq_tools.cxx | 16 +-- .../source/drivers/postgresql/pq_tools.hxx | 4 +- .../source/drivers/postgresql/pq_xindexcolumns.cxx | 2 +- .../source/drivers/postgresql/pq_xindexes.cxx | 2 +- .../source/drivers/postgresql/pq_xtables.cxx | 8 +- 111 files changed, 975 insertions(+), 973 deletions(-) (limited to 'connectivity/source/drivers') diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx index 847b1dd1359b..823dfa252c52 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx @@ -417,7 +417,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_LOWER) == DBPROPVAL_IC_LOWER ; } -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED ; } @@ -437,14 +437,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLExc return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_UPPER) == DBPROPVAL_IC_UPPER ; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { - return sal_True; + return true; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { - return sal_True; + return true; } sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) @@ -478,7 +478,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return isCapable(DBLITERAL_CORRELATION_NAME); } -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { return getInt32Property(OUString("Catalog Location")) == DBPROPVAL_CL_START; } @@ -552,7 +552,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return bValue; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_DML_STATEMENTS) == DBPROPVAL_SU_DML_STATEMENTS; } @@ -580,14 +580,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_INDEX_DEFINITION) == DBPROPVAL_SU_INDEX_DEFINITION; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return (getInt32Property(OUString("Schema Usage")) & DBPROPVAL_SU_TABLE_DEFINITION) == DBPROPVAL_SU_TABLE_DEFINITION; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) @@ -595,9 +595,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) @@ -747,7 +747,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLE return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED; } -sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(OUString("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED; } diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index a3d09d46e992..408c1a832b66 100644 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx @@ -115,9 +115,9 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc() // open read-only as long as updating isn't implemented Sequence aArgs(2); aArgs[0].Name = "Hidden"; - aArgs[0].Value <<= (sal_Bool) sal_True; + aArgs[0].Value <<= true; aArgs[1].Name = "ReadOnly"; - aArgs[1].Value <<= (sal_Bool) sal_True; + aArgs[1].Value <<= true; if ( !m_sPassword.isEmpty() ) { diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 8048e88cf364..fad14523d368 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -283,7 +283,7 @@ sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxColumnsInTable( ) throw(SQLExce -static sal_Bool lcl_IsEmptyOrHidden( const Reference& xSheets, const OUString& rName ) +static bool lcl_IsEmptyOrHidden( const Reference& xSheets, const OUString& rName ) { Any aAny = xSheets->getByName( rName ); Reference xSheet; @@ -294,11 +294,11 @@ static sal_Bool lcl_IsEmptyOrHidden( const Reference& xSheets, co Reference xProp( xSheet, UNO_QUERY ); if (xProp.is()) { - sal_Bool bVisible = sal_Bool(); + bool bVisible; Any aVisAny = xProp->getPropertyValue("IsVisible"); if ( aVisAny >>= bVisible ) if (!bVisible) - return sal_True; // hidden + return true; // hidden } // use the same data area as in OCalcTable to test for empty table @@ -317,17 +317,17 @@ static sal_Bool lcl_IsEmptyOrHidden( const Reference& xSheets, co // single cell -> check content Reference xCell = xCursor->getCellByPosition( 0, 0 ); if ( xCell.is() && xCell->getType() == CellContentType_EMPTY ) - return sal_True; + return true; } } } - return sal_False; + return false; } -static sal_Bool lcl_IsUnnamed( const Reference& xRanges, const OUString& rName ) +static bool lcl_IsUnnamed( const Reference& xRanges, const OUString& rName ) { - sal_Bool bUnnamed = sal_False; + bool bUnnamed = false; Any aAny = xRanges->getByName( rName ); Reference xRange; @@ -339,7 +339,7 @@ static sal_Bool lcl_IsUnnamed( const Reference& xRanges, const try { Any aUserAny = xRangeProp->getPropertyValue("IsUserDefined"); - sal_Bool bUserDefined = sal_Bool(); + bool bUserDefined; if ( aUserAny >>= bUserDefined ) bUnnamed = !bUserDefined; } @@ -371,11 +371,11 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( OUString aTable("TABLE"); - sal_Bool bTableFound = sal_True; + bool bTableFound = true; sal_Int32 nLength = types.getLength(); if(nLength) { - bTableFound = sal_False; + bTableFound = false; const OUString* pIter = types.getConstArray(); const OUString* pEnd = pIter + nLength; @@ -383,7 +383,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( { if(*pIter == aTable) { - bTableFound = sal_True; + bTableFound = true; break; } } diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx index 9d50f67ef48b..e0748bb83c88 100644 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx @@ -38,7 +38,7 @@ using namespace com::sun::star::sdbcx; OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) - ,m_bBookmarkable(sal_True) + ,m_bBookmarkable(true) { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType()); } @@ -89,9 +89,9 @@ sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const Any& bookmark ) throw( checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false; - return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True); + return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true); } sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException, std::exception) @@ -100,9 +100,9 @@ sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark, checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false; - Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_False); + Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),false); return relative(rows); } @@ -137,10 +137,10 @@ Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const Sequence< Any return Sequence< sal_Int32 >(); } -sal_Bool OCalcResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) +bool OCalcResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) { // Calc table has no index - return sal_False; + return false; } ::cppu::IPropertyArrayHelper & OCalcResultSet::getInfoHelper() diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 23faa3b9b4de..3fd7505d7bf4 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -226,8 +226,8 @@ static bool lcl_HasTextInColumn( const Reference& xSheet, sal_Int3 } static void lcl_GetColumnInfo( const Reference& xSheet, const Reference& xFormats, - sal_Int32 nDocColumn, sal_Int32 nStartRow, sal_Bool bHasHeaders, - OUString& rName, sal_Int32& rDataType, sal_Bool& rCurrency ) + sal_Int32 nDocColumn, sal_Int32 nStartRow, bool bHasHeaders, + OUString& rName, sal_Int32& rDataType, bool& rCurrency ) { //SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::lcl_GetColumnInfo" ); //! avoid duplicate field names @@ -251,7 +251,7 @@ static void lcl_GetColumnInfo( const Reference& xSheet, const Refe Reference xProp( xDataCell, UNO_QUERY ); if ( xProp.is() ) { - rCurrency = sal_False; // set to true for currency below + rCurrency = 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 @@ -286,7 +286,7 @@ static void lcl_GetColumnInfo( const Reference& xSheet, const Refe rDataType = DataType::DECIMAL; else if ( nNumType & NumberFormat::CURRENCY ) { - rCurrency = sal_True; + rCurrency = true; rDataType = DataType::DECIMAL; } else if ( ( nNumType & NumberFormat::DATETIME ) == NumberFormat::DATETIME ) @@ -314,7 +314,7 @@ static void lcl_GetColumnInfo( const Reference& xSheet, const Refe static void lcl_SetValue( ORowSetValue& rValue, const Reference& xSheet, - sal_Int32 nStartCol, sal_Int32 nStartRow, sal_Bool bHasHeaders, + sal_Int32 nStartCol, sal_Int32 nStartRow, bool bHasHeaders, const ::Date& rNullDate, sal_Int32 nDBRow, sal_Int32 nDBColumn, sal_Int32 nType ) { @@ -349,7 +349,7 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference& x break; case DataType::BIT: if ( eCellType == CellContentType_VALUE ) - rValue = (sal_Bool)( xCell->getValue() != 0.0 ); + rValue = xCell->getValue() != 0.0; else rValue.setNull(); break; @@ -453,13 +453,13 @@ void OCalcTable::fillColumns() OUString aTypeName; ::comphelper::UStringMixEqual aCase(m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); - const sal_Bool bStoresMixedCaseQuotedIdentifiers = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); + const bool bStoresMixedCaseQuotedIdentifiers = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); for (sal_Int32 i = 0; i < m_nDataCols; i++) { OUString aColumnName; sal_Int32 eType = DataType::OTHER; - sal_Bool bCurrency = sal_False; + bool bCurrency = false; lcl_GetColumnInfo( m_xSheet, m_xFormats, m_nStartCol + i, m_nStartRow, m_bHasHeaders, aColumnName, eType, bCurrency ); @@ -538,7 +538,7 @@ OCalcTable::OCalcTable(sdbcx::OCollection* _pTables,OCalcConnection* _pConnectio ,m_nStartRow(0) ,m_nDataCols(0) ,m_nDataRows(0) - ,m_bHasHeaders(sal_False) + ,m_bHasHeaders(false) ,m_aNullDate(::Date::EMPTY) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::OCalcTable" ); @@ -558,7 +558,7 @@ void OCalcTable::construct() if ( m_xSheet.is() ) { lcl_GetDataArea( m_xSheet, m_nDataCols, m_nDataRows ); - m_bHasHeaders = sal_True; + m_bHasHeaders = true; // whole sheet is always assumed to include a header row } } @@ -578,7 +578,7 @@ void OCalcTable::construct() // Header flag is always stored with database range // Get flag from FilterDescriptor - sal_Bool bRangeHeader = sal_True; + bool bRangeHeader = true; Reference xFiltProp( xDBRange->getFilterDescriptor(), UNO_QUERY ); if ( xFiltProp.is() ) xFiltProp->getPropertyValue("ContainsHeader") >>= bRangeHeader; @@ -734,7 +734,7 @@ sal_Int32 OCalcTable::getCurrentLastPos() const return m_nDataRows; } -sal_Bool OCalcTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) +bool OCalcTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::seekRow" ); @@ -800,25 +800,25 @@ Error: m_nFilePos = nTempPos; // previous position } // aStatus.Set(SDB_STAT_NO_DATA_FOUND); - return sal_False; + return false; End: nCurPos = m_nFilePos; - return sal_True; + return true; } -sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, - sal_Bool _bUseTableDefs, sal_Bool bRetrieveData ) +bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, + bool _bUseTableDefs, bool bRetrieveData ) { SAL_INFO( "connectivity.drivers", "calc Ocke.Janssen@sun.com OCalcTable::fetchRow" ); // read the bookmark - sal_Bool bIsCurRecordDeleted = sal_False; + bool bIsCurRecordDeleted = false; _rRow->setDeleted(bIsCurRecordDeleted); *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return sal_True; + return true; // fields @@ -841,7 +841,7 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, m_aNullDate, m_nFilePos, i, nType ); } } - return sal_True; + return true; } void OCalcTable::FileClose() diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index 335be8ab969a..55c2fe0384d1 100644 --- a/connectivity/source/drivers/calc/Cservices.cxx +++ b/connectivity/source/drivers/calc/Cservices.cxx @@ -52,7 +52,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx index 80e9aed2c9a5..6e8503d8f660 100644 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ b/connectivity/source/drivers/dbase/DCode.cxx @@ -83,7 +83,7 @@ OFILEOperandAttr::OFILEOperandAttr(sal_uInt16 _nPos, } -sal_Bool OFILEOperandAttr::isIndexed() const +bool OFILEOperandAttr::isIndexed() const { return m_xIndex.is(); } diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 601e1854bbf1..06700541cb9e 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -376,7 +376,7 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::isReadOnly" ); ::osl::MutexGuard aGuard( m_aMutex ); - sal_Bool bReadOnly = sal_False; + bool bReadOnly = false; static OUString sReadOnly( "IsReadOnly" ); ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext()); aFile.getPropertyValue(sReadOnly) >>= bReadOnly; @@ -384,16 +384,16 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run return bReadOnly; } -sal_Bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" ); - return sal_True; + return true; } -sal_Bool ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw" ); - return sal_True; + return true; } diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index afbf1aba24e6..05a8088e1652 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -63,7 +63,7 @@ ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) , m_nPageCount(0) , m_nRootPage(0) , m_pTable(_pTable) - , m_bUseCollector(sal_False) + , m_bUseCollector(false) { memset(&m_aHeader, 0, sizeof(m_aHeader)); construct(); @@ -79,7 +79,7 @@ ODbaseIndex::ODbaseIndex( ODbaseTable* _pTable, , m_nPageCount(0) , m_nRootPage(0) , m_pTable(_pTable) - , m_bUseCollector(sal_False) + , m_bUseCollector(false) { construct(); } @@ -138,12 +138,12 @@ ONDXPagePtr ODbaseIndex::getRoot() { m_nRootPage = m_aHeader.db_rootpage; m_nPageCount = m_aHeader.db_pagecount; - m_aRoot = CreatePage(m_nRootPage,NULL,sal_True); + m_aRoot = CreatePage(m_nRootPage,NULL,true); } return m_aRoot; } -sal_Bool ODbaseIndex::openIndexFile() +bool ODbaseIndex::openIndexFile() { if(!m_pFileStream) { @@ -180,7 +180,7 @@ OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp, return new OIndexIterator(this, pOp, pOperand); } -sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) +bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); // Search a specific value in Index @@ -202,13 +202,13 @@ sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSet catch (Exception&) { OSL_ASSERT(false); - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) +bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -219,7 +219,7 @@ sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) } -sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) +bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -228,35 +228,35 @@ sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) // Does the value already exist // Use Find() always to determine the actual leaf if (!ConvertToKey(&aKey, nRec, rValue) || (getRoot()->Find(aKey) && isUnique())) - return sal_False; + return false; ONDXNode aNewNode(aKey); // insert in the current leaf if (!m_aCurLeaf.Is()) - return sal_False; + return false; - sal_Bool bResult = m_aCurLeaf->Insert(aNewNode); + bool bResult = m_aCurLeaf->Insert(aNewNode); Release(bResult); return bResult; } -sal_Bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, +bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, const ORowSetValue& rNewValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); ONDXKey aKey; if (!ConvertToKey(&aKey, nRec, rNewValue) || (isUnique() && getRoot()->Find(aKey))) - return sal_False; + return false; else return Delete(nRec, rOldValue) && Insert(nRec,rNewValue); } -sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) +bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -264,13 +264,13 @@ sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) // Always use Find() to determine the actual leaf ONDXKey aKey; if (!ConvertToKey(&aKey, nRec, rValue) || !getRoot()->Find(aKey)) - return sal_False; + return false; ONDXNode aNewNode(aKey); // insert in the current leaf if (!m_aCurLeaf.Is()) - return sal_False; + return false; #if OSL_DEBUG_LEVEL > 1 m_aRoot->PrintPage(); #endif @@ -284,10 +284,10 @@ void ODbaseIndex::Collect(ONDXPage* pPage) m_aCollector.push_back(pPage); } -void ODbaseIndex::Release(sal_Bool bSave) +void ODbaseIndex::Release(bool bSave) { // Release the Index-recources - m_bUseCollector = sal_False; + m_bUseCollector = false; if (m_aCurLeaf.Is()) { @@ -330,7 +330,7 @@ void ODbaseIndex::closeImpl() } } -ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, sal_Bool bLoad) +ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, bool bLoad) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -395,7 +395,7 @@ void ODbaseIndex::createINFEntry() sal_uInt16 nSuffix = aInfFile.GetKeyCount(); OString aNewEntry,aKeyName; - sal_Bool bCase = isCaseSensitive(); + bool bCase = isCaseSensitive(); while (aNewEntry.isEmpty()) { aNewEntry = OString("NDX"); @@ -413,7 +413,7 @@ void ODbaseIndex::createINFEntry() aInfFile.WriteKey(aNewEntry, OUStringToOString(sEntry, m_pTable->getConnection()->getTextEncoding())); } -sal_Bool ODbaseIndex::DropImpl() +bool ODbaseIndex::DropImpl() { closeImpl(); @@ -453,7 +453,7 @@ sal_Bool ODbaseIndex::DropImpl() } } } - return sal_True; + return true; } void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const OUString& _sFile) @@ -464,7 +464,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const OU m_pTable->getConnection()->throwGenericSQLException(_nErrorId,*this); } -sal_Bool ODbaseIndex::CreateImpl() +bool ODbaseIndex::CreateImpl() { // Create the Index const OUString sFile = getCompletePath(); @@ -554,9 +554,9 @@ sal_Bool ODbaseIndex::CreateImpl() m_nPageCount = 2; m_aCurLeaf = m_aRoot = CreatePage(m_nRootPage); - m_aRoot->SetModified(sal_True); + m_aRoot->SetModified(true); - m_bUseCollector = sal_True; + m_bUseCollector = true; sal_Int32 nRowsLeft = 0; Reference xRow(xSet,UNO_QUERY); @@ -601,7 +601,7 @@ sal_Bool ODbaseIndex::CreateImpl() } Release(); createINFEntry(); - return sal_True; + return true; } diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx index f64995820935..b1c0a178bc29 100644 --- a/connectivity/source/drivers/dbase/DIndexIter.cxx +++ b/connectivity/source/drivers/dbase/DIndexIter.cxx @@ -36,16 +36,16 @@ OIndexIterator::~OIndexIterator() sal_uIntPtr OIndexIterator::First() { - return Find(sal_True); + return Find(true); } sal_uIntPtr OIndexIterator::Next() { - return Find(sal_False); + return Find(false); } -sal_uIntPtr OIndexIterator::Find(sal_Bool bFirst) +sal_uIntPtr OIndexIterator::Find(bool bFirst) { sal_uIntPtr nRes = NODE_NOTFOUND; @@ -129,7 +129,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) } -sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst) +sal_uIntPtr OIndexIterator::GetCompare(bool bFirst) { ONDXKey* pKey = NULL; sal_Int32 ePredicateType = PTR_CAST(file::OOp_COMPARE,m_pOperator)->getPredicateType(); @@ -199,7 +199,7 @@ sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst) } -sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst) +sal_uIntPtr OIndexIterator::GetLike(bool bFirst) { if (bFirst) { @@ -219,7 +219,7 @@ sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst) } -sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst) +sal_uIntPtr OIndexIterator::GetNull(bool bFirst) { if (bFirst) { @@ -241,7 +241,7 @@ sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst) } -sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst) +sal_uIntPtr OIndexIterator::GetNotNull(bool bFirst) { ONDXKey* pKey; if (bFirst) @@ -249,7 +249,7 @@ sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst) // go through all NULL values first for (sal_uIntPtr nRec = GetNull(bFirst); nRec != NODE_NOTFOUND; - nRec = GetNull(sal_False)) + nRec = GetNull(false)) ; pKey = m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : NULL; } diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index 94fd6103ce99..2d7652d61fcd 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -42,7 +42,7 @@ using namespace com::sun::star::sdbcx; ODbaseResultSet::ODbaseResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) - ,m_bBookmarkable(sal_True) + ,m_bBookmarkable(true) { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType()); } @@ -93,9 +93,9 @@ sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw( checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false; - return m_pTable ? Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True) : sal_False; + return m_pTable ? Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true) : sal_False; } sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException, std::exception) @@ -106,7 +106,7 @@ sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, return sal_False; - Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_False); + Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),false); return relative(rows); } @@ -158,7 +158,7 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< An return Sequence< sal_Int32 >(); } -sal_Bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex) +bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex) { Reference xTunnel(_xIndex,UNO_QUERY); if(xTunnel.is()) @@ -181,11 +181,11 @@ sal_Bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_x } m_pFileSet->setFrozen(); delete pIter; - return sal_True; + return true; } } } - return sal_False; + return false; } ::cppu::IPropertyArrayHelper & ODbaseResultSet::getInfoHelper() diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index be3e010813e9..47e548aed9aa 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -317,7 +317,7 @@ void ODbaseTable::fillColumns() m_aScales.reserve(nFieldCount); OUString aTypeName; - const sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); + const bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); const bool bFoxPro = m_aHeader.db_typ == VisualFoxPro || m_aHeader.db_typ == VisualFoxProAuto || m_aHeader.db_typ == FoxProMemo; sal_Int32 i = 0; @@ -328,13 +328,13 @@ void ODbaseTable::fillColumns() if ( FIELD_DESCRIPTOR_TERMINATOR == aDBFColumn.db_fnm[0] ) // 0x0D stored as the Field Descriptor terminator. break; - sal_Bool bIsRowVersion = bFoxPro && ( aDBFColumn.db_frei2[0] & 0x01 ) == 0x01; + bool bIsRowVersion = bFoxPro && ( aDBFColumn.db_frei2[0] & 0x01 ) == 0x01; const OUString aColumnName((const char *)aDBFColumn.db_fnm, strlen((const char *)aDBFColumn.db_fnm), m_eEncoding); m_aRealFieldLengths.push_back(aDBFColumn.db_flng); sal_Int32 nPrecision = aDBFColumn.db_flng; sal_Int32 eType; - sal_Bool bIsCurrency = sal_False; + bool bIsCurrency = false; char cType[2]; cType[0] = aDBFColumn.db_typ; @@ -365,7 +365,7 @@ void ODbaseTable::fillColumns() aTypeName = "BOOLEAN"; break; case 'Y': - bIsCurrency = sal_True; + bIsCurrency = true; eType = DataType::DOUBLE; aTypeName = "DOUBLE"; break; @@ -442,7 +442,7 @@ void ODbaseTable::fillColumns() ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConnection) : ODbaseTable_BASE(_pTables,_pConnection) , m_pMemoStream(NULL) - , m_bWriteableMemo(sal_False) + , m_bWriteableMemo(false) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::ODbaseTable" ); // initialize the header @@ -463,7 +463,7 @@ ODbaseTable::ODbaseTable(sdbcx::OCollection* _pTables, ODbaseConnection* _pConne _SchemaName, _CatalogName) , m_pMemoStream(NULL) - , m_bWriteableMemo(sal_False) + , m_bWriteableMemo(false) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::ODbaseTable" ); memset(&m_aHeader, 0, sizeof(m_aHeader)); @@ -495,7 +495,7 @@ void ODbaseTable::construct() if ( !m_pFileStream ) { - m_bWriteable = sal_False; + m_bWriteable = false; m_pFileStream = createStream_simpleError( sFileName, STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE); } @@ -518,7 +518,7 @@ void ODbaseTable::construct() m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE); if ( !m_pMemoStream ) { - m_bWriteableMemo = sal_False; + m_bWriteableMemo = false; m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYNONE); } if (m_pMemoStream) @@ -554,7 +554,7 @@ void ODbaseTable::construct() } } -sal_Bool ODbaseTable::ReadMemoHeader() +bool ODbaseTable::ReadMemoHeader() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::ReadMemoHeader" ); m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); @@ -601,7 +601,7 @@ sal_Bool ODbaseTable::ReadMemoHeader() SAL_WARN( "connectivity.drivers", "ODbaseTable::ReadMemoHeader: unsupported memo type!" ); break; } - return sal_True; + return true; } OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName ) @@ -779,7 +779,7 @@ sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (R : ODbaseTable_BASE::getSomething(rId); } -sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) +bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool _bUseTableDefs, bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::fetchRow" ); // Read the data @@ -792,7 +792,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return sal_True; + return true; sal_Size nByteOffset = 1; // Fields: @@ -965,13 +965,13 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s break; case DataType::BIT: { - sal_Bool b; + bool b; switch (* ((const char *)pData)) { case 'T': case 'Y': - case 'J': b = sal_True; break; - default: b = sal_False; break; + case 'J': b = true; break; + default: b = false; break; } *(_rRow->get())[i] = b; } @@ -998,7 +998,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s nByteOffset += nLen; OSL_ENSURE( nByteOffset <= m_nBufferSize ,"ByteOffset > m_nBufferSize!"); } - return sal_True; + return true; } @@ -1016,7 +1016,7 @@ void ODbaseTable::FileClose() ODbaseTable_BASE::FileClose(); } -sal_Bool ODbaseTable::CreateImpl() +bool ODbaseTable::CreateImpl() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::CreateImpl" ); OSL_ENSURE(!m_pFileStream, "SequenceError"); @@ -1056,7 +1056,7 @@ sal_Bool ODbaseTable::CreateImpl() if (pFileStream && pFileStream->Seek(STREAM_SEEK_TO_END)) { - return sal_False; + return false; } delete pFileStream; } @@ -1065,9 +1065,9 @@ sal_Bool ODbaseTable::CreateImpl() { } - sal_Bool bMemoFile = sal_False; + bool bMemoFile = false; - sal_Bool bOk = CreateFile(aURL, bMemoFile); + bool bOk = CreateFile(aURL, bMemoFile); FileClose(); @@ -1081,7 +1081,7 @@ sal_Bool ODbaseTable::CreateImpl() catch(const Exception&) // an exception is thrown when no file exists { } - return sal_False; + return false; } if (bMemoFile) @@ -1090,7 +1090,7 @@ sal_Bool ODbaseTable::CreateImpl() aURL.setExtension("dbt"); // extension for memo file Content aMemo1Content(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference(), comphelper::getProcessComponentContext()); - sal_Bool bMemoAlreadyExists = sal_False; + bool bMemoAlreadyExists = false; try { bMemoAlreadyExists = aMemo1Content.isDocument(); @@ -1121,14 +1121,14 @@ sal_Bool ODbaseTable::CreateImpl() aURL.setExtension(aExt); // kill dbf file Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference(), comphelper::getProcessComponentContext()); aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); - return sal_False; + return false; } m_aHeader.db_typ = dBaseIIIMemo; } else m_aHeader.db_typ = dBaseIII; - return sal_True; + return true; } void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const OUString& _sColumnName) @@ -1151,16 +1151,16 @@ void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const OUStri } // creates in principle dBase IV file format -sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo) +bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::CreateFile" ); - bCreateMemo = sal_False; + bCreateMemo = false; Date aDate( Date::SYSTEM ); // current date m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC ); if (!m_pFileStream) - return sal_False; + return false; sal_uInt8 nDbaseType = dBaseIII; Reference xColumns(getColumns(),UNO_QUERY); @@ -1355,7 +1355,7 @@ sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMe nRecLength += 8; break; case 'M': - bCreateMemo = sal_True; + bCreateMemo = true; (*m_pFileStream).WriteUChar( (sal_uInt8)10 ); (*m_pFileStream).WriteUChar( (sal_uInt8)0 ); nRecLength += 10; @@ -1395,19 +1395,19 @@ sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMe catch(const Exception&) { } throw; } - return sal_True; + return true; } // creates in principle dBase III file format -sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) +bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::CreateMemoFile" ); // filehandling macro for table creation m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | STREAM_SHARE_DENYWRITE); if (!m_pMemoStream) - return sal_False; + return false; m_pMemoStream->SetStreamSize(512); @@ -1417,16 +1417,16 @@ sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) m_pMemoStream->Flush(); delete m_pMemoStream; m_pMemoStream = NULL; - return sal_True; + return true; } -sal_Bool ODbaseTable::Drop_Static(const OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes ) +bool ODbaseTable::Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, OCollection* _pIndexes ) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::Drop_Static" ); INetURLObject aURL; aURL.SetURL(_sUrl); - sal_Bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE)); + bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE)); if(bDropped) { @@ -1458,7 +1458,7 @@ sal_Bool ODbaseTable::Drop_Static(const OUString& _sUrl,sal_Bool _bHasMemoFields try { ::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aDeleteContent.executeCommand( "delete", makeAny( sal_Bool( sal_True ) ) ); + aDeleteContent.executeCommand( "delete", makeAny( true ) ); } catch(const Exception&) { @@ -1469,7 +1469,7 @@ sal_Bool ODbaseTable::Drop_Static(const OUString& _sUrl,sal_Bool _bHasMemoFields return bDropped; } -sal_Bool ODbaseTable::DropImpl() +bool ODbaseTable::DropImpl() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::DropImpl" ); FileClose(); @@ -1477,7 +1477,7 @@ sal_Bool ODbaseTable::DropImpl() if(!m_pIndexes) refreshIndexes(); // look for indexes which must be deleted as well - sal_Bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); + bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); if(!bDropped) {// we couldn't drop the table so we have to reopen it construct(); @@ -1488,7 +1488,7 @@ sal_Bool ODbaseTable::DropImpl() } -sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Reference& _xCols) +bool ODbaseTable::InsertRow(OValueRefVector& rRow, bool bFlush, const Reference& _xCols) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::InsertRow" ); // fill buffer with blanks @@ -1501,7 +1501,7 @@ sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Ref sal_Size nTempPos = m_nFilePos; m_nFilePos = (sal_Size)m_aHeader.db_anz + 1; - sal_Bool bInsertRow = UpdateBuffer( rRow, NULL, _xCols, true ); + bool bInsertRow = UpdateBuffer( rRow, NULL, _xCols, true ); if ( bInsertRow ) { sal_Size nFileSize = 0, nMemoFileSize = 0; @@ -1546,7 +1546,7 @@ sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Ref } -sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference& _xCols) +bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow, const Reference& _xCols) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::UpdateRow" ); // fill buffer with blanks @@ -1572,11 +1572,11 @@ sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,con { m_pFileStream->Flush(); } - return sal_True; + return true; } -sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) +bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::DeleteRow" ); // Set the Delete-Flag (be it set or not): @@ -1586,8 +1586,8 @@ sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) OValueRefRow aRow = new OValueRefVector(_rCols.get().size()); - if (!fetchRow(aRow,_rCols,sal_True,sal_True)) - return sal_False; + if (!fetchRow(aRow,_rCols,true,true)) + return false; Reference xCol; OUString aColName; @@ -1626,7 +1626,7 @@ sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) m_pFileStream->Seek(nFilePos); (*m_pFileStream).WriteUChar( (sal_uInt8)'*' ); // mark the row in the table as deleted m_pFileStream->Flush(); - return sal_True; + return true; } Reference ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos) @@ -1664,12 +1664,12 @@ static double toDouble(const OString& rString) } -sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, const Reference& _xCols, const bool bForceAllFields) +bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, const Reference& _xCols, const bool bForceAllFields) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::UpdateBuffer" ); OSL_ENSURE(m_pBuffer,"Buffer is NULL!"); if ( !m_pBuffer ) - return sal_False; + return false; sal_Int32 nByteOffset = 1; // Update fields: @@ -1997,11 +1997,11 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, nByteOffset += nLen; OSL_ENSURE( nByteOffset <= m_nBufferSize ,"ByteOffset > m_nBufferSize!"); } - return sal_True; + return true; } -sal_Bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr) +bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::WriteMemo" ); // if the BlockNo 0 is given, the block will be appended at the end @@ -2021,7 +2021,7 @@ sal_Bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockN } // append or overwrite - sal_Bool bAppend = rBlockNr == 0; + bool bAppend = rBlockNr == 0; if (!bAppend) { @@ -2132,7 +2132,7 @@ sal_Bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockN (*m_pMemoStream).WriteUInt32( m_aMemoHeader.db_next ); m_pMemoStream->Flush(); } - return sal_True; + return true; } @@ -2361,7 +2361,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) pNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sTempName)); { Reference xAppend(pNewTable->getColumns(),UNO_QUERY); - sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); + bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); // copy the structure for(sal_Int32 i=0;i < m_pColumns->getCount();++i) { @@ -2394,7 +2394,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) ::dbtools::throwGenericSQLException( sError, *this ); } - sal_Bool bAlreadyDroped = sal_False; + bool bAlreadyDroped = false; try { pNewTable->construct(); @@ -2403,7 +2403,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) // drop the old table if(DropImpl()) { - bAlreadyDroped = sal_True; + bAlreadyDroped = true; pNewTable->renameImpl(m_Name); // release the temp file } @@ -2434,7 +2434,7 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos) pNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sTempName)); { Reference xAppend(pNewTable->getColumns(),UNO_QUERY); - sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); + bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); // copy the structure for(sal_Int32 i=0;i < m_pColumns->getCount();++i) { @@ -2523,7 +2523,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) (aRow->get())[nPos]->setBound(false); - sal_Bool bOk = sal_True; + bool bOk = true; sal_Int32 nCurPos; OValueRefVector::Vector::iterator aIter; for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.db_anz;++nRowPos) @@ -2531,7 +2531,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos ); if ( bOk ) { - bOk = fetchRow( aRow, *m_aColumns, sal_True, sal_True); + bOk = fetchRow( aRow, *m_aColumns, true, 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 @@ -2548,7 +2548,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) } } } - bOk = _pNewTable->InsertRow(*aInsertRow,sal_True,_pNewTable->m_pColumns); + bOk = _pNewTable->InsertRow(*aInsertRow,true,_pNewTable->m_pColumns); OSL_ENSURE(bOk,"Row could not be inserted!"); } else @@ -2581,7 +2581,7 @@ void ODbaseTable::refreshHeader() readHeader(); } -sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) +bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::seekRow" ); @@ -2658,14 +2658,14 @@ Error: case IResultSetHelper::BOOKMARK: m_nFilePos = nTempPos; // last position } - return sal_False; + return false; End: nCurPos = m_nFilePos; - return sal_True; + return true; } -sal_Bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable) +bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable) { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::ReadMemo" ); bool bIsText = true; @@ -2679,7 +2679,7 @@ sal_Bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable) OStringBuffer aBStr; static char aBuf[514]; aBuf[512] = 0; // avoid random value - sal_Bool bReady = sal_False; + bool bReady = false; do { @@ -2711,7 +2711,7 @@ sal_Bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable) } else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) { - return sal_False; + return false; } sal_uInt32 nLength(0); @@ -2739,7 +2739,7 @@ sal_Bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable) } // if ( nLength ) } } - return sal_True; + return true; } void ODbaseTable::AllocBuffer() @@ -2762,7 +2762,7 @@ void ODbaseTable::AllocBuffer() } } -sal_Bool ODbaseTable::WriteBuffer() +bool ODbaseTable::WriteBuffer() { SAL_INFO( "connectivity.drivers", "dbase Ocke.Janssen@sun.com ODbaseTable::WriteBuffer" ); OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 47ebfb88736f..c91a9b35fd2b 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -101,7 +101,7 @@ void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName) } catch(const Exception&) { - if(ODbaseTable::Drop_Static(ODbaseTable::getEntry(static_cast(m_rParent).getConnection(),_sElementName),sal_False,NULL)) + if(ODbaseTable::Drop_Static(ODbaseTable::getEntry(static_cast(m_rParent).getConnection(),_sElementName),false,NULL)) return; } diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx index 10815e70b2d6..72c6e2a38f0d 100644 --- a/connectivity/source/drivers/dbase/Dservices.cxx +++ b/connectivity/source/drivers/dbase/Dservices.cxx @@ -52,7 +52,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index a81732561586..8bc902c1886e 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -70,7 +70,7 @@ ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent) :nPagePos(nPos) - ,bModified(sal_False) + ,bModified(false) ,nCount(0) ,aParent(pParent) ,rIndex(rInd) @@ -92,16 +92,16 @@ void ONDXPage::QueryDelete() if (IsModified() && rIndex.m_pFileStream) WriteONDXPage( *rIndex.m_pFileStream, *this ); - bModified = sal_False; + bModified = false; if (rIndex.UseCollector()) { if (aChild.Is()) - aChild->Release(sal_False); + aChild->Release(false); for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++) { if (ppNodes[i].GetChild().Is()) - ppNodes[i].GetChild()->Release(sal_False); + ppNodes[i].GetChild()->Release(false); ppNodes[i] = ONDXNode(); } @@ -136,7 +136,7 @@ sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const } -sal_Bool ONDXPage::Find(const ONDXKey& rKey) +bool ONDXPage::Find(const ONDXKey& rKey) { // searches the given key // Speciality: At the end of the method @@ -146,7 +146,7 @@ sal_Bool ONDXPage::Find(const ONDXKey& rKey) while (i < nCount && rKey > ((*this)[i]).GetKey()) i++; - sal_Bool bResult = sal_False; + bool bResult = false; if (!IsLeaf()) { @@ -158,7 +158,7 @@ sal_Bool ONDXPage::Find(const ONDXKey& rKey) { rIndex.m_aCurLeaf = this; rIndex.m_nCurNode = i - 1; - bResult = sal_False; + bResult = false; } else { @@ -170,14 +170,14 @@ sal_Bool ONDXPage::Find(const ONDXKey& rKey) } -sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) +bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) { // When creating an index there can be multiple nodes added, // these are sorted ascending - sal_Bool bAppend = nRowsLeft > 0; + bool bAppend = nRowsLeft > 0; if (IsFull()) { - sal_Bool bResult = sal_True; + bool bResult = true; ONDXNode aSplitNode; if (bAppend) aSplitNode = rNode; @@ -290,11 +290,11 @@ sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } -sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) +bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) { sal_uInt16 nMaxCount = rIndex.getHeader().db_maxkeys; if (nPos >= nMaxCount) - return sal_False; + return false; if (nCount) { @@ -316,19 +316,19 @@ sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) rNode.GetChild()->SetParent(this); } - bModified = sal_True; + bModified = true; - return sal_True; + return true; } -sal_Bool ONDXPage::Append(ONDXNode& rNode) +bool ONDXPage::Append(ONDXNode& rNode) { DBG_ASSERT(!IsFull(), "kein Append moeglich"); return Insert(nCount, rNode); } -void ONDXPage::Release(sal_Bool bSave) +void ONDXPage::Release(bool bSave) { // free pages if (aChild.Is()) @@ -347,7 +347,7 @@ void ONDXPage::Release(sal_Bool bSave) aParent = NULL; } -void ONDXPage::ReleaseFull(sal_Bool bSave) +void ONDXPage::ReleaseFull(bool bSave) { ONDXPagePtr aTempParent = aParent; Release(bSave); @@ -364,7 +364,7 @@ void ONDXPage::ReleaseFull(sal_Bool bSave) } } -sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos) +bool ONDXPage::Delete(sal_uInt16 nNodePos) { if (IsLeaf()) { @@ -410,7 +410,7 @@ sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos) else if (IsRoot()) // make sure that the position of the root is kept rIndex.SetRootPos(nPagePos); - return sal_True; + return true; } @@ -460,7 +460,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) // inner nodes have no record number if (rIndex.isUnique()) aResultNode.GetKey().ResetRecord(); - bModified = sal_True; + bModified = true; return aResultNode; } @@ -476,7 +476,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) nMaxNodes_2 = nMaxNodes / 2; // Determine if page is right or left neighbour - sal_Bool bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // sal_True, whenn xPage the right side is + bool bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // sal_True, whenn xPage the right side is sal_uInt16 nNewCount = (*xPage).Count() + Count(); if (IsLeaf()) @@ -509,7 +509,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) (*aParent)[nParentNodePos-1].SetChild(this,aParent); else // or set as right node aParent->SetChild(this); - aParent->SetModified(sal_True); + aParent->SetModified(true); } @@ -523,12 +523,12 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) aParent = NULL; rIndex.SetRootPos(nPagePos); rIndex.m_aRoot = this; - SetModified(sal_True); + SetModified(true); } else aParent->SearchAndReplace((*this)[nLastNode].GetKey(),(*this)[nCount-1].GetKey()); - xPage->SetModified(sal_False); + xPage->SetModified(false); xPage->ReleaseFull(); // is not needed anymore } // balance the elements nNewCount >= (nMaxNodes_2 * 2) @@ -595,7 +595,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) // afterwards parent node will be reset (*aParent)[nParentNodePos].SetChild(); - aParent->SetModified(sal_True); + aParent->SetModified(true); if(aParent->IsRoot() && aParent->Count() == 1) { @@ -604,7 +604,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) aParent = NULL; rIndex.SetRootPos(nPagePos); rIndex.m_aRoot = this; - SetModified(sal_True); + SetModified(true); } else if(nParentNodePos) // replace the node value @@ -612,7 +612,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) // thats why the node must be updated here aParent->SearchAndReplace((*aParent)[nParentNodePos-1].GetKey(),(*aParent)[nParentNodePos].GetKey()); - xPage->SetModified(sal_False); + xPage->SetModified(false); xPage->ReleaseFull(); } // balance the elements @@ -643,7 +643,7 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) (*aParent)[nParentNodePos].SetChild(this,aParent); } - aParent->SetModified(sal_True); + aParent->SetModified(true); } } } @@ -731,7 +731,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) // ONDXKey -sal_Bool ONDXKey::IsText(sal_Int32 eType) +bool ONDXKey::IsText(sal_Int32 eType) { return eType == DataType::VARCHAR || eType == DataType::CHAR; } @@ -931,7 +931,7 @@ void ONDXPage::PrintPage() } #endif -sal_Bool ONDXPage::IsFull() const +bool ONDXPage::IsFull() const { return Count() == rIndex.getHeader().db_maxkeys; } @@ -976,7 +976,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, if (pPage) { (*pPage)[nPos].GetKey() = rReplace; - pPage->SetModified(sal_True); + pPage->SetModified(true); } } } @@ -1002,7 +1002,7 @@ void ONDXPage::Remove(sal_uInt16 nPos) (*this)[i] = (*this)[i+1]; nCount--; - bModified = sal_True; + bModified = true; } diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 724b478b48f4..bbc3f0194d69 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -400,9 +400,9 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesLowerCaseIdentifiers( ) throw(S return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool OEvoabDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) @@ -420,14 +420,14 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::storesUpperCaseIdentifiers( ) throw(S return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { - return sal_False; + return false; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { - return sal_False; + return false; } sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException, std::exception) @@ -464,10 +464,9 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsDifferentTableCorrelationNames return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool OEvoabDatabaseMetaData::impl_isCatalogAtStart_throw( ) { - sal_Bool bValue = sal_False; - return bValue; + return false; } sal_Bool SAL_CALL OEvoabDatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException, std::exception) @@ -525,9 +524,9 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsTransactionIsolationLevel( sal return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException, std::exception) @@ -550,14 +549,14 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsSchemasInIndexDefinitions( ) return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { - return sal_False; + return false; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception) @@ -565,9 +564,9 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsCatalogsInIndexDefinitions( ) return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException, std::exception) @@ -713,10 +712,10 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsMixedCaseIdentifiers( ) throw return sal_False; } -sal_Bool OEvoabDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool OEvoabDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { // Any case may be used - return sal_True; + return true; } sal_Bool SAL_CALL OEvoabDatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException, std::exception) diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx index 4c51fc50ab39..5d08f3944d06 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx @@ -69,19 +69,19 @@ namespace connectivity protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw() SAL_OVERRIDE; // cached database information - virtual OUString impl_getIdentifierQuoteString_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_isCatalogAtStart_throw( ) SAL_OVERRIDE; - virtual OUString impl_getCatalogSeparator_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsCatalogsInTableDefinitions_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsSchemasInTableDefinitions_throw( ) SAL_OVERRIDE ; - virtual sal_Bool impl_supportsCatalogsInDataManipulation_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsSchemasInDataManipulation_throw( ) SAL_OVERRIDE ; - virtual sal_Bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE ; - virtual sal_Bool impl_supportsAlterTableWithAddColumn_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsAlterTableWithDropColumn_throw( ) SAL_OVERRIDE; - virtual sal_Int32 impl_getMaxStatements_throw( ) SAL_OVERRIDE; - virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; + virtual OUString impl_getIdentifierQuoteString_throw( ) SAL_OVERRIDE; + virtual bool impl_isCatalogAtStart_throw( ) SAL_OVERRIDE; + virtual OUString impl_getCatalogSeparator_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsCatalogsInTableDefinitions_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsSchemasInTableDefinitions_throw( ) SAL_OVERRIDE ; + virtual bool impl_supportsCatalogsInDataManipulation_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsSchemasInDataManipulation_throw( ) SAL_OVERRIDE ; + virtual bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE ; + virtual bool impl_supportsAlterTableWithAddColumn_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsAlterTableWithDropColumn_throw( ) SAL_OVERRIDE; + virtual sal_Int32 impl_getMaxStatements_throw( ) SAL_OVERRIDE; + virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) SAL_OVERRIDE; + virtual bool impl_storesMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; virtual ~OEvoabDatabaseMetaData(); public: diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 24ce44f3299f..e3befff7e5d9 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -58,12 +58,12 @@ typedef connectivity::OMetaConnection OConnection_BASE; OConnection::OConnection(OFileDriver* _pDriver) : OSubComponent((::cppu::OWeakObject*)_pDriver, this) , m_pDriver(_pDriver) - , m_bClosed(sal_False) - , m_bAutoCommit(sal_False) - , m_bReadOnly(sal_False) - , m_bShowDeleted(sal_False) - , m_bCaseSensitiveExtension( sal_True ) - , m_bCheckSQL92(sal_False) + , m_bClosed(false) + , m_bAutoCommit(false) + , m_bReadOnly(false) + , m_bShowDeleted(false) + , m_bCaseSensitiveExtension( true ) + , m_bCheckSQL92(false) , m_bDefaultTextEncoding(false) { m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW; @@ -81,7 +81,7 @@ void SAL_CALL OConnection::release() throw() } -sal_Bool OConnection::matchesExtension( const OUString& _rExt ) const +bool OConnection::matchesExtension( const OUString& _rExt ) const { if ( isCaseSensitveExtension() ) return ( getExtension() == _rExt ); @@ -374,7 +374,7 @@ void OConnection::disposing() ::osl::MutexGuard aGuard(m_aMutex); OConnection_BASE::disposing(); - m_bClosed = sal_True; + m_bClosed = true; m_xDir.clear(); m_xContent.clear(); m_xCatalog = WeakReference< XTablesSupplier>(); diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 7605202c87dc..06b17ca4f3e8 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -115,7 +115,7 @@ namespace return -1; // the second context - sal_Bool bCanAccess = sal_False; + bool bCanAccess = false; ::ucbhelper::Content aContent2; try { @@ -175,11 +175,11 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( static const OUString aTable("TABLE"); - sal_Bool bTableFound = sal_True; + bool bTableFound = true; sal_Int32 nLength = types.getLength(); if(nLength) { - bTableFound = sal_False; + bTableFound = false; const OUString* pBegin = types.getConstArray(); const OUString* pEnd = pBegin + nLength; @@ -187,7 +187,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( { if(*pBegin == aTable) { - bTableFound = sal_True; + bTableFound = true; break; } } @@ -219,9 +219,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( INetURLObject aURL; xResultSet->beforeFirst(); - sal_Bool bKnowCaseSensivity = sal_False; - sal_Bool bCaseSensitiveDir = sal_True; - sal_Bool bCheckEnabled = m_pConnection->isCheckEnabled(); + bool bKnowCaseSensivity = false; + bool bCaseSensitiveDir = true; + bool bCheckEnabled = m_pConnection->isCheckEnabled(); while(xResultSet->next()) { @@ -233,22 +233,22 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( ODatabaseMetaDataResultSet::ORow aRow(3); aRow.reserve(6); - sal_Bool bNewRow = sal_False; + bool bNewRow = false; if ( !bKnowCaseSensivity ) { - bKnowCaseSensivity = sal_True; + bKnowCaseSensivity = true; sal_Int16 nCase = isCaseSensitiveParentFolder( m_pConnection->getURL(), aURL.getName() ); switch( nCase ) { case 1: - bCaseSensitiveDir = sal_True; + bCaseSensitiveDir = true; break; case -1: - bKnowCaseSensivity = sal_False; + bKnowCaseSensivity = false; /** run through */ case 0: - bCaseSensitiveDir = sal_False; + bCaseSensitiveDir = false; } if ( bKnowCaseSensivity ) { @@ -274,13 +274,13 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( if ( match(tableNamePattern,aName,'\0') && ( !bCheckEnabled || ( bCheckEnabled && ((nChar < '0' || nChar > '9')))) ) { aRow.push_back(new ORowSetValueDecorator(aName)); - bNewRow = sal_True; + bNewRow = true; } } } else // no extension, filter myself { - sal_Bool bErg = sal_False; + bool bErg = false; do { if (aURL.getExtension().isEmpty()) @@ -289,11 +289,11 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( if(match(tableNamePattern,aURL.getBase(),'\0') && ( !bCheckEnabled || ( bCheckEnabled && ((nChar < '0' || nChar > '9')))) ) { aRow.push_back(new ORowSetValueDecorator(OUString(aURL.getBase()))); - bNewRow = sal_True; + bNewRow = true; } break; } - else if ( ( bErg = xResultSet->next() ) != sal_False ) + else if ( ( bErg = xResultSet->next() ) ) { aName = xRow->getString(1); aURL.SetSmartURL(aName); @@ -474,10 +474,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return sal_False; } -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" ); - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) @@ -498,16 +498,16 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLExc return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw" ); - return sal_False; + return false; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw" ); - return sal_False; + return false; } sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException, std::exception) @@ -547,10 +547,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return sal_True; } -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_isCatalogAtStart_throw" ); - return sal_True; + return true; } sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException, std::exception) @@ -619,10 +619,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw" ); - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException, std::exception) @@ -649,16 +649,16 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw" ); - return sal_False; + return false; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw" ); - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception) @@ -667,10 +667,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw" ); - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException, std::exception) @@ -860,10 +860,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLE return sal_True; } -sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw" ); - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException, std::exception) diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 9fac363c7874..f4ed968dcdc5 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -100,7 +100,7 @@ void OPreparedStatement::construct(const OUString& sql) throw(SQLException, Run } OValueRefRow aTemp; - OResultSet::setBoundedColumns(m_aEvaluateRow,aTemp,m_xParamColumns,xNames,sal_False,m_xDBMetaData,m_aColMapping); + OResultSet::setBoundedColumns(m_aEvaluateRow,aTemp,m_xParamColumns,xNames,false,m_xDBMetaData,m_aColMapping); } Reference OPreparedStatement::makeResultSet() @@ -610,7 +610,7 @@ void OPreparedStatement::parseParamterElem(const OUString& _sColumnName, OSQLPar if(nParameter == -1) nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol); // Save number of parameter in the variable: - SetAssignValue(_sColumnName, OUString(), sal_True, nParameter); + SetAssignValue(_sColumnName, OUString(), true, nParameter); } diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index c0b85c75050c..e51b25c3ed44 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -98,15 +98,15 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIte ,m_nLastVisitedPos(-1) ,m_nRowCountResult(-1) ,m_nColumnCount(0) - ,m_bWasNull(sal_False) - ,m_bEOF(sal_False) - ,m_bLastRecord(sal_False) - ,m_bInserted(sal_False) - ,m_bRowUpdated(sal_False) - ,m_bRowInserted(sal_False) - ,m_bRowDeleted(sal_False) + ,m_bWasNull(false) + ,m_bEOF(false) + ,m_bLastRecord(false) + ,m_bInserted(false) + ,m_bRowUpdated(false) + ,m_bRowInserted(false) + ,m_bRowDeleted(false) ,m_bShowDeleted(pStmt->getOwnConnection()->showDeleted()) - ,m_bIsCount(sal_False) + ,m_bIsCount(false) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::OResultSet" ); osl_atomic_increment( &m_refCount ); @@ -439,7 +439,7 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException, st if(last()) next(); - m_bEOF = sal_True; + m_bEOF = true; } @@ -455,7 +455,7 @@ sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException, st SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::first" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::FIRST,1,sal_True) : sal_False; + return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::FIRST,1,true) : sal_False; } @@ -465,7 +465,7 @@ sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException, std // here I know definitely that I stand on the last record ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_True) : sal_False; + return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,true) : sal_False; } sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception) @@ -473,7 +473,7 @@ sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, Runt SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::absolute" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::ABSOLUTE,row,sal_True) : sal_False; + return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::ABSOLUTE,row,true) : sal_False; } sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception) @@ -481,7 +481,7 @@ sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, Runt SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::relative" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::RELATIVE,row,sal_True) : sal_False; + return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::RELATIVE,row,true) : sal_False; } sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException, std::exception) @@ -489,7 +489,7 @@ sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException, SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::previous" ); ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::PRIOR,0,sal_True) : sal_False; + return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::PRIOR,0,true) : sal_False; } Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException, std::exception) @@ -581,7 +581,7 @@ sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException, std ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::NEXT,1,sal_True) : sal_False; + return m_pTable ? m_aSkipDeletedSet.skipDeleted(IResultSetHelper::NEXT,1,true) : sal_False; } @@ -623,8 +623,8 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException, st // we know that we append new rows at the end // so we have to know where the end is - m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_False); - m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, sal_True, m_xColsIdx); + m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,false); + m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, true, m_xColsIdx); if(m_bRowInserted && m_pFileSet.is()) { sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue(); @@ -682,10 +682,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 = false; + m_bRowUpdated = false; + m_bRowInserted = false; + m_bRowDeleted = false; if(m_aInsertRow.is()) { @@ -708,7 +708,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 = true; OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin()+1; for(;aIter != m_aInsertRow->get().end();++aIter) @@ -880,10 +880,10 @@ IPropertyArrayHelper & OResultSet::getInfoHelper() } -sal_Bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, +bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, sal_Int32 nFirstOffset, - sal_Bool bEvaluate, - sal_Bool bRetrieveData) + bool bEvaluate, + bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::ExecuteRow" ); OSL_ENSURE(m_pSQLAnalyzer,"OResultSet::ExecuteRow: Analyzer isn't set!"); @@ -893,31 +893,31 @@ sal_Bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, sal_Int32 nOffset = nFirstOffset; if (!m_pTable) - return sal_False; + return false; const OSQLColumns & rTableCols = *(m_pTable->getTableColumns()); - sal_Bool bHasRestriction = m_pSQLAnalyzer->hasRestriction(); + bool bHasRestriction = m_pSQLAnalyzer->hasRestriction(); again: // protect from reading over the end when someboby is inserting while we are reading // this method works only for dBase at the moment !!!! if (eCursorPosition == IResultSetHelper::NEXT && m_nFilePos == m_nLastVisitedPos) { - return sal_False; + return false; } if (!m_pTable || !m_pTable->seekRow(eCursorPosition, nOffset, m_nFilePos)) { - return sal_False; + return false; } if (!bEvaluate) // If no evaluation runs, then just fill the results-row { - m_pTable->fetchRow(m_aRow,rTableCols, sal_True,bRetrieveData); + m_pTable->fetchRow(m_aRow,rTableCols, true,bRetrieveData); } else { - m_pTable->fetchRow(m_aEvaluateRow, rTableCols, sal_True,bRetrieveData || bHasRestriction); + m_pTable->fetchRow(m_aEvaluateRow, rTableCols, true,bRetrieveData || bHasRestriction); if ( ( !m_bShowDeleted && m_aEvaluateRow->isDeleted() @@ -935,7 +935,7 @@ again: nOffset = (*m_aEvaluateIter); else { - return sal_False; + return false; } } else if (m_pFileSet.is()) @@ -963,7 +963,7 @@ again: } else { - return sal_False; + return false; } // Try again ... goto again; @@ -990,38 +990,38 @@ again: } else if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_UPDATE) { - sal_Bool bOK = sal_True; + bool bOK = true; if (bEvaluate) { // read the actual result-row - bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,sal_True); + bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), true,true); } if (bOK) { // just give the values to be changed: if(!m_pTable->UpdateRow(*m_aAssignValues,m_aEvaluateRow, m_xColsIdx)) - return sal_False; + return false; } } else if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_DELETE) { - sal_Bool bOK = sal_True; + bool bOK = true; if (bEvaluate) { - bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,sal_True); + bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), true,true); } if (bOK) { if(!m_pTable->DeleteRow(*m_xColumns)) - return sal_False; + return false; } } - return sal_True; + return true; } -sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData) +bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::Move" ); @@ -1035,7 +1035,7 @@ sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 if (!m_pFileSet.is()) //no Index available { // Normal FETCH - ExecuteRow(eCursorPosition,nOffset,sal_False,bRetrieveData); + ExecuteRow(eCursorPosition,nOffset,false,bRetrieveData); // now set the bookmark for outside this is the logical pos and not the file pos *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1063,7 +1063,7 @@ sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 case IResultSetHelper::ABSOLUTE: case IResultSetHelper::BOOKMARK: if ( m_nRowPos == (nOffset -1) ) - return sal_True; + return true; m_nRowPos = nOffset -1; break; } @@ -1081,7 +1081,7 @@ sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 if (m_nRowPos < (sal_Int32)m_pFileSet->get().size()) { // Fetch via Index - ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],sal_False,bRetrieveData); + ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],false,bRetrieveData); // now set the bookmark for outside *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1102,33 +1102,33 @@ sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 m_aFileSetIter = m_pFileSet->get().end()-1; m_pTable->seekRow(IResultSetHelper::BOOKMARK, *m_aFileSetIter, m_nFilePos); } - sal_Bool bOK = sal_True; + bool bOK = true; // Determine the number of further Fetches while (bOK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size()) { if (m_pEvaluationKeySet) { if (m_nRowPos >= (sal_Int32)m_pEvaluationKeySet->size()) - return sal_False; + return false; else if (m_nRowPos == 0) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); - bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,true, bRetrieveData); } else { ++m_aEvaluateIter; - bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,true, bRetrieveData); } } else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True, sal_False);//bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,true, false);//bRetrieveData); } if (bOK) { // read the results again - m_pTable->fetchRow(m_aRow, *(m_pTable->getTableColumns()), sal_True,bRetrieveData); + m_pTable->fetchRow(m_aRow, *(m_pTable->getTableColumns()), true,bRetrieveData); // now set the bookmark for outside *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1190,16 +1190,16 @@ sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 } else { - m_bEOF = sal_True; + m_bEOF = true; m_nRowPos = 1; - return sal_False; + return false; } } else // Fetch only possible at SELECT! - return sal_False; + return false; - return sal_True; + return true; Error: // is the Cursor positioned before the first row @@ -1227,7 +1227,7 @@ Error: m_nRowPos = nTempPos; // last Position } } - return sal_False; + return false; } void OResultSet::sortRows() @@ -1311,19 +1311,19 @@ void OResultSet::sortRows() while (m_aEvaluateIter != m_pEvaluationKeySet->end()) { - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),true); ++m_aEvaluateIter; } } else { - while ( ExecuteRow( IResultSetHelper::NEXT, 1, sal_False, sal_True ) ) + while ( ExecuteRow( IResultSetHelper::NEXT, 1, false, true ) ) { m_aSelectRow->get()[0]->setValue( m_aRow->get()[0]->getValue() ); if ( m_pSQLAnalyzer->hasFunctions() ) m_pSQLAnalyzer->setSelectionEvaluationResult( m_aSelectRow, m_aColMapping ); const sal_Int32 nBookmark = (*m_aRow->get().begin())->getValue(); - ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, sal_True, sal_False ); + ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, true, false ); } } @@ -1337,7 +1337,7 @@ void OResultSet::sortRows() -sal_Bool OResultSet::OpenImpl() +bool OResultSet::OpenImpl() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::OpenImpl" ); OSL_ENSURE(m_pSQLAnalyzer,"No analyzer set with setSqlAnalyzer!"); @@ -1395,7 +1395,7 @@ sal_Bool OResultSet::OpenImpl() // for now simply iterate over all rows and // do all actions (or just count) { - sal_Bool bOK = sal_True; + bool bOK = true; if (m_pEvaluationKeySet) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); @@ -1405,9 +1405,9 @@ sal_Bool OResultSet::OpenImpl() while (bOK) { if (m_pEvaluationKeySet) - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),true); else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,true); if (bOK) { @@ -1427,7 +1427,7 @@ sal_Bool OResultSet::OpenImpl() } else { - sal_Bool bDistinct = sal_False; + bool bDistinct = false; assert(m_pParseTree != 0); OSQLParseNode *pDistinct = m_pParseTree->getChild(1); @@ -1452,7 +1452,7 @@ sal_Bool OResultSet::OpenImpl() m_aOrderbyAscending.push_back(SQL_ASC); } } - bDistinct = sal_True; + bDistinct = true; } if (IsSorted()) @@ -1497,7 +1497,7 @@ sal_Bool OResultSet::OpenImpl() for( size_t j = nMaxRow-1; j > 0; --j) { nPos = (m_pFileSet->get())[j]; - ExecuteRow(IResultSetHelper::BOOKMARK,nPos,sal_False); + ExecuteRow(IResultSetHelper::BOOKMARK,nPos,false); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); { // copy row values OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin(); @@ -1510,7 +1510,7 @@ sal_Bool OResultSet::OpenImpl() // compare with next row nKey = (m_pFileSet->get())[j-1]; - ExecuteRow(IResultSetHelper::BOOKMARK,nKey,sal_False); + ExecuteRow(IResultSetHelper::BOOKMARK,nKey,false); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin(); OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin(); @@ -1546,7 +1546,7 @@ sal_Bool OResultSet::OpenImpl() // run the actions (or simply count): { - sal_Bool bOK = sal_True; + bool bOK = true; if (m_pEvaluationKeySet) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); @@ -1556,9 +1556,9 @@ sal_Bool OResultSet::OpenImpl() while (bOK) { if (m_pEvaluationKeySet) - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),true); else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,true); if (bOK) { @@ -1580,10 +1580,10 @@ sal_Bool OResultSet::OpenImpl() m_nRowCountResult = 0; OSL_ENSURE(m_aAssignValues.is(),"No assign values set!"); - if(!m_pTable->InsertRow(*m_aAssignValues, sal_True,m_xColsIdx)) + if(!m_pTable->InsertRow(*m_aAssignValues, true,m_xColsIdx)) { m_nFilePos = 0; - return sal_False; + return false; } m_nRowCountResult = 1; @@ -1596,7 +1596,7 @@ sal_Bool OResultSet::OpenImpl() // reset FilePos m_nFilePos = 0; - return sal_True; + return true; } Sequence< sal_Int8 > OResultSet::getUnoTunnelImplementationId() @@ -1629,7 +1629,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, const OValueRefRow& _rSelectRow, const ::rtl::Reference& _rxColumns, const Reference& _xNames, - sal_Bool _bSetColumnMapping, + bool _bSetColumnMapping, const Reference& _xMetaData, ::std::vector& _rColMapping) { @@ -1802,13 +1802,13 @@ void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount) } } -sal_Bool OResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) +bool OResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::fillIndexValues" ); - return sal_False; + return false; } -sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) +bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::move" ); return Move(_eCursorPosition,_nOffset,_bRetrieveData); @@ -1820,13 +1820,13 @@ sal_Int32 OResultSet::getDriverPos() const return (m_aRow->get())[0]->getValue(); } -sal_Bool OResultSet::deletedVisible() const +bool OResultSet::deletedVisible() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::deletedVisible" ); return m_bShowDeleted; } -sal_Bool OResultSet::isRowDeleted() const +bool OResultSet::isRowDeleted() const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OResultSet::isRowDeleted" ); return m_aRow->isDeleted(); diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index c3c892aeb506..af6936e5aabc 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -69,7 +69,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) ,m_nResultSetType(ResultSetType::FORWARD_ONLY) ,m_nFetchDirection(FetchDirection::FORWARD) ,m_nResultSetConcurrency(ResultSetConcurrency::UPDATABLE) - ,m_bEscapeProcessing(sal_True) + ,m_bEscapeProcessing(true) ,rBHelper(OStatement_BASE::rBHelper) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::OStatement_Base" ); @@ -474,7 +474,7 @@ void OStatement_Base::createColumnMapping() Reference xNames(m_xColNames,UNO_QUERY); // now check which columns are bound - OResultSet::setBoundedColumns(m_aRow,m_aSelectRow,xColumns,xNames,sal_True,m_xDBMetaData,m_aColMapping); + OResultSet::setBoundedColumns(m_aRow,m_aSelectRow,xColumns,xNames,true,m_xDBMetaData,m_aColMapping); } void OStatement_Base::initializeResultSet(OResultSet* _pResult) @@ -662,7 +662,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnN else if (SQL_ISTOKEN(pRow_Value_Constructor_Elem,NULL)) { // set NULL - SetAssignValue(aColumnName, OUString(), sal_True); + SetAssignValue(aColumnName, OUString(), true); } else if (SQL_ISRULE(pRow_Value_Constructor_Elem,parameter)) parseParamterElem(aColumnName,pRow_Value_Constructor_Elem); @@ -674,7 +674,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< OUString>& aColumnN void OStatement_Base::SetAssignValue(const OUString& aColumnName, const OUString& aValue, - sal_Bool bSetNull, + bool bSetNull, sal_uInt32 nParameter) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::SetAssignValue" ); diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 712cbc2a1df0..65c388695b32 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -44,7 +44,7 @@ OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection) ,m_nFilePos(0) ,m_pBuffer(NULL) ,m_nBufferSize(0) - ,m_bWriteable(sal_False) + ,m_bWriteable(false) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::OFileTable" ); construct(); @@ -68,7 +68,7 @@ OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, , m_nFilePos(0) , m_pBuffer(NULL) , m_nBufferSize(0) - , m_bWriteable(sal_False) + , m_bWriteable(false) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::OFileTable" ); m_aColumns = new OSQLColumns(); @@ -187,22 +187,22 @@ void SAL_CALL OFileTable::release() throw() OTable_TYPEDEF::release(); } -sal_Bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, sal_Bool /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) +bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, bool /*bFlush*/, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::InsertRow" ); - return sal_False; + return false; } -sal_Bool OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) +bool OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::DeleteRow" ); - return sal_False; + return false; } -sal_Bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) +bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OFileTable::UpdateRow" ); - return sal_False; + return false; } void OFileTable::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& /*descriptor*/) diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 0e6ff98ac37e..6f3b65b03c17 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -36,8 +36,8 @@ using namespace ::com::sun::star::container; OSQLAnalyzer::OSQLAnalyzer(OConnection* _pConnection) :m_pConnection(_pConnection) - ,m_bHasSelectionCode(sal_False) - ,m_bSelectionFirstTime(sal_True) + ,m_bHasSelectionCode(false) + ,m_bSelectionFirstTime(true) { m_aCompiler = new OPredicateCompiler(this); m_aInterpreter = new OPredicateInterpreter(m_aCompiler); @@ -207,16 +207,16 @@ OOperandAttr* OSQLAnalyzer::createOperandAttr(sal_Int32 _nPos, return new OOperandAttr(static_cast(_nPos),_xCol); } -sal_Bool OSQLAnalyzer::hasRestriction() const +bool OSQLAnalyzer::hasRestriction() const { return m_aCompiler->hasCode(); } -sal_Bool OSQLAnalyzer::hasFunctions() const +bool OSQLAnalyzer::hasFunctions() const { if ( m_bSelectionFirstTime ) { - m_bSelectionFirstTime = sal_False; + m_bSelectionFirstTime = false; for ( ::std::vector< TPredicates >::const_iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end() && !m_bHasSelectionCode ;++aIter) { if ( aIter->first.is() ) diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index c1d299fc4db2..a3e827e5275e 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -106,9 +106,9 @@ void OOperandValue::setValue(const ORowSetValue& _rVal) m_aValue = _rVal; } -sal_Bool OOperandAttr::isIndexed() const +bool OOperandAttr::isIndexed() const { - return sal_False; + return false; } OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) @@ -192,10 +192,10 @@ OOperandConst::OOperandConst(const OSQLParseNode& rColumnRef, const OUString& aS sal_uInt16 OOperator::getRequestedOperands() const {return 2;} -sal_Bool OBoolOperator::operate(const OOperand*, const OOperand*) const +bool OBoolOperator::operate(const OOperand*, const OOperand*) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OBoolOperator::operate" ); - return sal_False; + return false; } @@ -215,7 +215,7 @@ void OBoolOperator::Exec(OCodeStack& rCodeStack) delete pRight; } -sal_Bool OOp_NOT::operate(const OOperand* pLeft, const OOperand* ) const +bool OOp_NOT::operate(const OOperand* pLeft, const OOperand* ) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_AND::operate" ); return !pLeft->isValid(); @@ -239,14 +239,14 @@ sal_uInt16 OOp_NOT::getRequestedOperands() const } -sal_Bool OOp_AND::operate(const OOperand* pLeft, const OOperand* pRight) const +bool OOp_AND::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_AND::operate" ); return pLeft->isValid() && pRight->isValid(); } -sal_Bool OOp_OR::operate(const OOperand* pLeft, const OOperand* pRight) const +bool OOp_OR::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_OR::operate" ); return pLeft->isValid() || pRight->isValid(); @@ -272,28 +272,28 @@ void OOp_ISNULL::Exec(OCodeStack& rCodeStack) } -sal_Bool OOp_ISNULL::operate(const OOperand* pOperand, const OOperand*) const +bool OOp_ISNULL::operate(const OOperand* pOperand, const OOperand*) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::operate" ); return pOperand->getValue().isNull(); } -sal_Bool OOp_ISNOTNULL::operate(const OOperand* pOperand, const OOperand*) const +bool OOp_ISNOTNULL::operate(const OOperand* pOperand, const OOperand*) const { return !OOp_ISNULL::operate(pOperand); } -sal_Bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const +bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_ISNULL::operate" ); - sal_Bool bMatch; + bool bMatch; ORowSetValue aLH(pLeft->getValue()); ORowSetValue aRH(pRight->getValue()); if (aLH.isNull() || aRH.isNull()) - bMatch = sal_False; + bMatch = false; else { bMatch = match(aRH.getString(), aLH.getString(), cEscape); @@ -302,23 +302,23 @@ sal_Bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const } -sal_Bool OOp_NOTLIKE::operate(const OOperand* pLeft, const OOperand* pRight) const +bool OOp_NOTLIKE::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_NOTLIKE::operate" ); return !OOp_LIKE::operate(pLeft, pRight); } -sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) const +bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) const { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOp_COMPARE::operate" ); ORowSetValue aLH(pLeft->getValue()); ORowSetValue aRH(pRight->getValue()); if (aLH.isNull() || aRH.isNull()) // if (!aLH.getValue() || !aRH.getValue()) - return sal_False; + return false; - sal_Bool bResult = sal_False; + bool bResult = false; sal_Int32 eDBType = pLeft->getDBType(); // Comparison (depending on Data-type): @@ -343,7 +343,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con 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; + default: bResult = false; } } break; case DataType::TINYINT: @@ -370,7 +370,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con 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; + default: bResult = false; } } break; default: diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index c7bfcd5b816d..e79b4a93af30 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -46,7 +46,7 @@ using namespace com::sun::star; OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs) : m_pAnalyzer(pAnalyzer) , m_nParamCounter(0) - , m_bORCondition(sal_False) + , m_bORCondition(false) { } @@ -153,7 +153,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) if (SQL_ISTOKEN(pPredicateNode->getChild(1),OR)) // OR-Operator { m_aCodeList.push_back(new OOp_OR()); - m_bORCondition = sal_True; + m_bORCondition = true; } else if (SQL_ISTOKEN(pPredicateNode->getChild(1),AND)) // AND-Operator m_aCodeList.push_back(new OOp_AND()); @@ -335,7 +335,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_BETWEEN,NULL); } - sal_Bool bNot = SQL_ISTOKEN(pPart2->getChild(0),NOT); + bool bNot = SQL_ISTOKEN(pPart2->getChild(0),NOT); OOperand* pColumnOp = execute(pColumn); OOperand* pOb1 = execute(p1stValue); @@ -543,13 +543,13 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr } -sal_Bool OPredicateInterpreter::evaluate(OCodeList& rCodeList) +bool OPredicateInterpreter::evaluate(OCodeList& rCodeList) { - static sal_Bool bResult; + static bool bResult; OCodeList::iterator aIter = rCodeList.begin(); if (!(*aIter)) - return sal_True; // no Predicate + return true; // no Predicate for(;aIter != rCodeList.end();++aIter) { @@ -602,7 +602,7 @@ OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) thro { DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); - sal_Bool bUpper = SQL_ISTOKEN(pPredicateNode->getChild(0),UPPER); + bool bUpper = SQL_ISTOKEN(pPredicateNode->getChild(0),UPPER); execute(pPredicateNode->getChild(2)); OOperator* pOperator = NULL; diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index 2c46886d5d47..fc6a9479e8cf 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -80,12 +80,12 @@ Connection::Connection(FirebirdDriver* _pDriver) , m_pDriver(_pDriver) , m_sConnectionURL() , m_sFirebirdURL() - , m_bIsEmbedded(sal_False) + , m_bIsEmbedded(false) , m_xEmbeddedStorage(0) , m_bIsFile(false) , m_sUser() - , m_bIsAutoCommit(sal_False) - , m_bIsReadOnly(sal_False) + , m_bIsAutoCommit(false) + , m_bIsReadOnly(false) , m_aTransactionIsolation(TransactionIsolation::REPEATABLE_READ) , m_aDBHandle(0) , m_aTransactionHandle(0) diff --git a/connectivity/source/drivers/firebird/Connection.hxx b/connectivity/source/drivers/firebird/Connection.hxx index 9e5c0e7b3bc0..4aafb04f7016 100644 --- a/connectivity/source/drivers/firebird/Connection.hxx +++ b/connectivity/source/drivers/firebird/Connection.hxx @@ -96,7 +96,7 @@ namespace connectivity /* EMBEDDED MODE DATA */ /** Denotes that we have a .fdb stored within a .odb file. */ - sal_Bool m_bIsEmbedded; + bool m_bIsEmbedded; /** * Handle for the parent DatabaseDocument. We need to notify this @@ -128,8 +128,8 @@ namespace connectivity ::rtl::OUString m_sUser; /* CONNECTION PROPERTIES */ - sal_Bool m_bIsAutoCommit; - sal_Bool m_bIsReadOnly; + bool m_bIsAutoCommit; + bool m_bIsReadOnly; sal_Int32 m_aTransactionIsolation; isc_db_handle m_aDBHandle; @@ -182,7 +182,7 @@ namespace connectivity FirebirdDriver* getDriver() const {return m_pDriver;} ::rtl::OUString getConnectionURL() const {return m_sConnectionURL;} - sal_Bool isEmbedded() const {return m_bIsEmbedded;} + bool isEmbedded() const {return m_bIsEmbedded;} ::rtl::OUString getUserName() const {return m_sUser;} isc_db_handle& getDBHandle() {return m_aDBHandle;} isc_tr_handle& getTransaction() diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index 4d2d83f28000..bff558ce3e50 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1365,7 +1365,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( sal_Int16 nSystemFlag = xRow->getShort(2); sal_Int16 nTableType = xRow->getShort(3); xRow->getBlob(5); // We have to retrieve a column to verify it is null. - sal_Bool aIsView = !xRow->wasNull(); + bool aIsView = !xRow->wasNull(); OUString sTableType; if (nSystemFlag == 1) diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index dda95afbbb17..c14e1f26ad16 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -262,7 +262,7 @@ namespace connectivity osl_atomic_increment( &_refCount ); } - void checkDisposed(sal_Bool _bThrow) throw ( DisposedException ) + void checkDisposed(bool _bThrow) throw ( DisposedException ) { if (_bThrow) throw DisposedException(); diff --git a/connectivity/source/drivers/firebird/ResultSet.hxx b/connectivity/source/drivers/firebird/ResultSet.hxx index a0c999d5129c..a4c1a68b1d5a 100644 --- a/connectivity/source/drivers/firebird/ResultSet.hxx +++ b/connectivity/source/drivers/firebird/ResultSet.hxx @@ -68,7 +68,7 @@ namespace connectivity public ::comphelper::OPropertyArrayUsageHelper { private: - sal_Bool m_bIsBookmarkable; + bool m_bIsBookmarkable; sal_Int32 m_nFetchSize; sal_Int32 m_nResultSetType; sal_Int32 m_nFetchDirection; diff --git a/connectivity/source/drivers/firebird/Services.cxx b/connectivity/source/drivers/firebird/Services.cxx index 25fb67e4ea03..0efd42299925 100644 --- a/connectivity/source/drivers/firebird/Services.cxx +++ b/connectivity/source/drivers/firebird/Services.cxx @@ -56,7 +56,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx index 93770c2ffdd6..46000c9ea763 100644 --- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx +++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx @@ -283,7 +283,7 @@ sal_Bool OStatementCommonBase::convertFastPropertyValue( (void) rOldValue; (void) nHandle; (void) rValue; - sal_Bool bConverted = sal_False; + bool bConverted = false; // here we have to try to convert return bConverted; } diff --git a/connectivity/source/drivers/firebird/SubComponent.hxx b/connectivity/source/drivers/firebird/SubComponent.hxx index 795449afe1e0..89a59c4b6bc3 100644 --- a/connectivity/source/drivers/firebird/SubComponent.hxx +++ b/connectivity/source/drivers/firebird/SubComponent.hxx @@ -55,7 +55,7 @@ namespace connectivity ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, ::com::sun::star::lang::XComponent* _pObject); - void checkDisposed(sal_Bool _bThrow) throw ( ::com::sun::star::lang::DisposedException ); + void checkDisposed(bool _bThrow) throw ( ::com::sun::star::lang::DisposedException ); template diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx index 0a03cb1170cf..3f3982053b3e 100644 --- a/connectivity/source/drivers/flat/EConnection.cxx +++ b/connectivity/source/drivers/flat/EConnection.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::lang; OFlatConnection::OFlatConnection(ODriver* _pDriver) : OConnection(_pDriver) ,m_nMaxRowsToScan(50) - ,m_bHeaderLine(sal_True) + ,m_bHeaderLine(true) ,m_cFieldDelimiter(';') ,m_cStringDelimiter('"') ,m_cDecimalDelimiter(',') @@ -101,7 +101,7 @@ void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValu osl_atomic_decrement( &m_refCount ); OConnection::construct(url,info); - m_bShowDeleted = sal_True; // we do not supported rows for this type + m_bShowDeleted = true; // we do not supported rows for this type } Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(SQLException, RuntimeException, std::exception) diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 62c504f5b87b..3d743a93af92 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -39,7 +39,7 @@ using namespace com::sun::star::sdbcx; OFlatResultSet::OFlatResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator) : file::OResultSet(pStmt,_aSQLIterator) - ,m_bBookmarkable(sal_True) + ,m_bBookmarkable(true) { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, PropertyAttribute::READONLY,&m_bBookmarkable, ::getBooleanCppuType()); } @@ -109,9 +109,9 @@ sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark ) throw( checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false; - return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_True); + return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true); } sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException, std::exception) @@ -120,9 +120,9 @@ sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark, checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False; + m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false; - Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),sal_False); + Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),false); return relative(rows); } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index c58376a48711..1ba4323abbc4 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -122,7 +122,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) m_aPrecisions.assign(nFieldCount+1,-1); m_aScales.assign(nFieldCount+1,-1); - const sal_Bool bCase = m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers(); + const bool bCase = m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers(); CharClass aCharClass( pConnection->getDriver()->getComponentContext(), LanguageTag( _aLocale)); // read description const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter(); @@ -203,7 +203,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, { if ( io_nType != DataType::VARCHAR ) { - sal_Bool bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER; + bool bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER; sal_uLong nIndex = 0; if ( bNumeric ) @@ -213,7 +213,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, if (aField.isEmpty() || (m_cStringDelimiter && m_cStringDelimiter == aField[0])) { - bNumeric = sal_False; + bNumeric = false; if ( m_cStringDelimiter != '\0' ) aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); else @@ -229,11 +229,11 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, if (aField2.isEmpty()) { - bNumeric = sal_False; + bNumeric = false; } else { - bNumeric = sal_True; + bNumeric = true; sal_Int32 nDot = 0; sal_Int32 nDecimalDelCount = 0; sal_Int32 nSpaceCount = 0; @@ -251,7 +251,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, !aCharClass.isDigit(aField2,j) && ( j != 0 || (c != '+' && c != '-' ) ) ) { - bNumeric = sal_False; + bNumeric = false; break; } if (cDecimalDelimiter && c == cDecimalDelimiter) @@ -265,7 +265,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, } if (nDecimalDelCount > 1 || nDot > 1 ) // if there is more than one dot it isn't a number - bNumeric = sal_False; + bNumeric = false; if (bNumeric && cThousandDelimiter) { // Is the delimiter correct? @@ -278,7 +278,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, continue; else { - bNumeric = sal_False; + bNumeric = false; break; } } @@ -602,15 +602,15 @@ sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (Ru : OFlatTable_BASE::getSomething(rId); } -sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, sal_Bool bIsTable, sal_Bool bRetrieveData) +bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bIsTable, bool bRetrieveData) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::fetchRow" ); *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return sal_True; + return true; - sal_Bool result = sal_False; + bool result = false; if ( m_bNeedToReadLine ) { m_pFileStream->Seek(m_nFilePos); @@ -619,7 +619,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, s { setRowPos(m_nRowPos, rowPos); m_bNeedToReadLine = false; - result = sal_True; + result = true; } // else let run through so that we set _rRow to all NULL } @@ -764,7 +764,7 @@ namespace }; } -sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) +bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) { SAL_INFO( "connectivity.drivers", "flat Ocke.Janssen@sun.com OFlatTable::seekRow" ); OSL_ENSURE(m_pFileStream,"OFlatTable::seekRow: FileStream is NULL!"); @@ -779,7 +779,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int { assert(m_nRowPos >= 0); if(m_nMaxRowCount != 0 && m_nRowPos > m_nMaxRowCount) - return sal_False; + return false; ++m_nRowPos; if(m_aRowPosToFilePos.size() > static_cast< vector< TRowPositionInFile >::size_type >(m_nRowPos)) { @@ -803,7 +803,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int if(!readLine(&newRowPos.second, &newRowPos.first, false)) { m_nMaxRowCount = m_nRowPos - 1; - return sal_False; + return false; } nCurPos = newRowPos.second; @@ -816,7 +816,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int assert(m_nRowPos >= 0); if(m_nRowPos == 0) - return sal_False; + return false; --m_nRowPos; { @@ -841,7 +841,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int { const sal_Int32 nNewRowPos = m_nRowPos + nOffset; if (nNewRowPos < 0) - return sal_False; + return false; // ABSOLUTE will take care of case nNewRowPos > nMaxRowCount return seekRow(IResultSetHelper::ABSOLUTE, nNewRowPos, nCurPos); } @@ -852,7 +852,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int if (m_nMaxRowCount == 0) { if (!seekRow(IResultSetHelper::LAST, 0, nCurPos)) - return sal_False; + return false; } // m_nMaxRowCount can still be zero, but now it means there a genuinely zero rows in the table nOffset = m_nMaxRowCount + nOffset; @@ -860,7 +860,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int if(nOffset < 0) { seekRow(IResultSetHelper::ABSOLUTE, 0, nCurPos); - return sal_False; + return false; } if(m_nMaxRowCount && nOffset > m_nMaxRowCount) { @@ -868,7 +868,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int const TRowPositionInFile &lastRowPos(m_aRowPosToFilePos.back()); m_nFilePos = lastRowPos.second; nCurPos = lastRowPos.second; - return sal_False; + return false; } assert(m_nRowPos >=0); @@ -887,7 +887,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int while(m_nRowPos < nOffset) { if(!seekRow(IResultSetHelper::NEXT, 1, nCurPos)) - return sal_False; + return false; } assert(m_nRowPos == nOffset); } @@ -903,7 +903,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int if(aFind == m_aRowPosToFilePos.end() || aFind->first != nOffset) //invalid bookmark - return sal_False; + return false; m_bNeedToReadLine = true; m_nFilePos = aFind->first; @@ -913,7 +913,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int } } - return sal_True; + return true; } diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx index 29465c6cb3d2..1fbe4efe43e4 100644 --- a/connectivity/source/drivers/flat/Eservices.cxx +++ b/connectivity/source/drivers/flat/Eservices.cxx @@ -52,7 +52,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 6e8714453f5c..25529f81c36b 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -73,7 +73,7 @@ void OHCatalog::refreshViews() Sequence< OUString > aTypes(1); aTypes[0] = "VIEW"; - sal_Bool bSupportsViews = sal_False; + bool bSupportsViews = false; try { Reference xRes = m_xMetaData->getTableTypes(); diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index 088e277d7cc5..a369180ea23c 100644 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx @@ -33,21 +33,21 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; OHSQLColumns::OHSQLColumns( ::cppu::OWeakObject& _rParent - ,sal_Bool _bCase + ,bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector - ,sal_Bool _bUseHardRef + ,bool _bUseHardRef ) : OColumnsHelper(_rParent,_bCase,_rMutex,_rVector,_bUseHardRef) { } Reference< XPropertySet > OHSQLColumns::createDescriptor() { - return new OHSQLColumn(sal_True); + return new OHSQLColumn(true); } -OHSQLColumn::OHSQLColumn( sal_Bool _bCase) +OHSQLColumn::OHSQLColumn( bool _bCase) : connectivity::sdbcx::OColumn( _bCase ) { construct(); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 6c79e7419228..f11de6f82ab4 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -93,7 +93,7 @@ namespace connectivity ODriverDelegator::ODriverDelegator(const Reference< XComponentContext >& _rxContext) : ODriverDelegator_BASE(m_aMutex) ,m_xContext(_rxContext) - ,m_bInShutDownConnections(sal_False) + ,m_bInShutDownConnections(false) { } @@ -536,7 +536,7 @@ namespace connectivity void ODriverDelegator::shutdownConnection(const TWeakPairVector::iterator& _aIter ) { OSL_ENSURE(m_aConnections.end() != _aIter,"Iterator equals .end()"); - sal_Bool bLastOne = sal_True; + bool bLastOne = true; try { Reference _xConnection(_aIter->first.get(),UNO_QUERY); @@ -601,7 +601,7 @@ namespace connectivity void ODriverDelegator::shutdownConnections() { - m_bInShutDownConnections = sal_True; + m_bInShutDownConnections = true; TWeakPairVector::iterator aEnd = m_aConnections.end(); for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i) { @@ -615,7 +615,7 @@ namespace connectivity } } m_aConnections.clear(); - m_bInShutDownConnections = sal_True; + m_bInShutDownConnections = true; } void ODriverDelegator::flushConnections() @@ -658,7 +658,7 @@ namespace connectivity if ( xStmt.is() ) xStmt->execute( OUString( "SET WRITE_DELAY 0" ) ); - sal_Bool bPreviousAutoCommit = xConnection->getAutoCommit(); + bool bPreviousAutoCommit = xConnection->getAutoCommit(); xConnection->setAutoCommit( sal_False ); xConnection->commit(); xConnection->setAutoCommit( bPreviousAutoCommit ); diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index c42d8b461f2b..08e660d67b13 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -270,14 +270,14 @@ namespace connectivity if ( ((_nMode & ElementModes::WRITE) != ElementModes::WRITE ) ) { - sal_Bool bIsStream = sal_True; + bool bIsStream = true; try { bIsStream = aStoragePair.first.first->isStreamElement(sStrippedName); } catch(const Exception&) { - bIsStream = sal_False; + bIsStream = false; } if ( !bIsStream ) return pHelper; // readonly file without data stream diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index ff96a9abe38d..6ee8f5bf77a4 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -111,7 +111,7 @@ void OHSQLTable::construct() sdbcx::OCollection* OHSQLTable::createColumns(const TStringVector& _rNames) { - OHSQLColumns* pColumns = new OHSQLColumns(*this,sal_True,m_aMutex,_rNames); + OHSQLColumns* pColumns = new OHSQLColumns(*this,true,m_aMutex,_rNames); pColumns->setParent(this); return pColumns; } @@ -195,7 +195,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; // check also the auto_increment - sal_Bool bOldAutoIncrement = sal_False,bAutoIncrement = sal_False; + bool bOldAutoIncrement = false,bAutoIncrement = false; xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; @@ -280,7 +280,7 @@ void OHSQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, c (void)_rColName; #endif - OHSQLColumn* pColumn = new OHSQLColumn(sal_True); + OHSQLColumn* pColumn = new OHSQLColumn(true); Reference xProp = pColumn; ::comphelper::copyProperties(_xDescriptor,xProp); xProp->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE),makeAny(nNewType)); diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index abd6b81f406b..cd5c1816c7dc 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -119,7 +119,7 @@ sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Refere void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) { Reference< XInterface > xObject( getObject( _nPos ) ); - sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); + bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { Reference< XConnection > xConnection = static_cast(m_rParent).getConnection(); @@ -131,7 +131,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString aSql( "DROP " ); Reference xProp(xObject,UNO_QUERY); - sal_Bool bIsView; + bool bIsView; if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == "VIEW"))) // here we have a view aSql += "VIEW "; else diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index 4749a0651e39..6cf719ab401d 100644 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx @@ -59,7 +59,7 @@ namespace connectivity { namespace hsqldb //= HView - HView::HView( const Reference< XConnection >& _rxConnection, sal_Bool _bCaseSensitive, + HView::HView( const Reference< XConnection >& _rxConnection, bool _bCaseSensitive, const OUString& _rSchemaName, const OUString& _rName ) :HView_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, OUString(), _rSchemaName, OUString() ) ,m_xConnection( _rxConnection ) diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 43175cbb43f3..1790e4c6d36b 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -55,7 +55,7 @@ HViews::HViews( const Reference< XConnection >& _rxConnection, ::cppu::OWeakObje :sdbcx::OCollection( _rParent, true, _rMutex, _rVector ) ,m_xConnection( _rxConnection ) ,m_xMetaData( _rxConnection->getMetaData() ) - ,m_bInDrop( sal_False ) + ,m_bInDrop( false ) { } @@ -105,7 +105,7 @@ void HViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) return; Reference< XInterface > xObject( getObject( _nPos ) ); - sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); + bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { OUString aSql( "DROP VIEW" ); @@ -122,9 +122,9 @@ void HViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) void HViews::dropByNameImpl(const OUString& elementName) { - m_bInDrop = sal_True; + m_bInDrop = true; OCollection_TYPE::dropByName(elementName); - m_bInDrop = sal_False; + m_bInDrop = false; } void HViews::createView( const Reference< XPropertySet >& descriptor ) diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index ccc8f28ebbc8..1cd0d912e72e 100644 --- a/connectivity/source/drivers/hsqldb/Hservices.cxx +++ b/connectivity/source/drivers/hsqldb/Hservices.cxx @@ -53,7 +53,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index 48dde51a76c2..5bfdf8be3c3e 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -122,7 +122,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( // execute Java-Call static jmethodID mID(NULL); obtainMethodId(t.pEnv, cMethodName,cSignature, mID); - OSL_VERIFY_RES( !isExceptionOccurred(t.pEnv,sal_True),"Exception occurred!"); + OSL_VERIFY_RES( !isExceptionOccurred(t.pEnv, true),"Exception occurred!"); jvalue args[4]; args[3].l = 0; @@ -130,7 +130,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( if ( typeFilterCount ) { jobjectArray pObjArray = static_cast< jobjectArray >( t.pEnv->NewObjectArray( (jsize)typeFilterCount, java_lang_String::st_getMyClass(), 0 ) ); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); const OUString* typeFilter = _types.getConstArray(); bool bIncludeAllTypes = false; for ( sal_Int32 i=0; i SAL_CALL java_sql_DatabaseMetaData::getTables( } jstring aT = convertwchar_tToJavaString( t.pEnv, *typeFilter ); t.pEnv->SetObjectArrayElement( pObjArray, (jsize)i, aT ); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); } if ( bIncludeAllTypes ) @@ -150,7 +150,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( // the SDBC API allows to pass "%" as table type filter, but in JDBC, "all table types" // is represented by the table type being t.pEnv->DeleteLocalRef( pObjArray ); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); } else { @@ -178,23 +178,23 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables( if ( aCatalogFilter.hasValue() ) { t.pEnv->DeleteLocalRef((jstring)args[0].l); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); } if(args[1].l) { t.pEnv->DeleteLocalRef((jstring)args[1].l); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); } if(!tableNamePattern.isEmpty()) { t.pEnv->DeleteLocalRef((jstring)args[2].l); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); } //for(INT16 i=0;iDeleteLocalRef( (jobjectArray)args[3].l ); - OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" ); + OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, true ), "Exception occurred!" ); } if ( jThrow ) @@ -542,7 +542,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference( } -sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) +bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) { m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD, _pMethodName ); jboolean out( java_lang_Object::callBooleanMethod(_pMethodName,_inout_MethodID) ); @@ -577,7 +577,7 @@ sal_Int32 java_sql_DatabaseMetaData::impl_callIntMethod( const char* _pMethodNam } -sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) +bool java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) { m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_METHOD_ARG1, _pMethodName, _nArgument ); @@ -687,7 +687,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesLowerCaseIdentifiers( ) thro return impl_callBooleanMethod( "storesLowerCaseIdentifiers", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool java_sql_DatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "storesMixedCaseQuotedIdentifiers", mID ); @@ -711,13 +711,13 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::storesUpperCaseIdentifiers( ) thro return impl_callBooleanMethod( "storesUpperCaseIdentifiers", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsAlterTableWithAddColumn", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsAlterTableWithDropColumn", mID ); @@ -759,7 +759,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsDifferentTableCorrelationNa return impl_callBooleanMethod( "supportsDifferentTableCorrelationNames", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool java_sql_DatabaseMetaData::impl_isCatalogAtStart_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "isCatalogAtStart", mID ); @@ -831,7 +831,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsTransactionIsolationLevel( return impl_callBooleanMethodWithIntArg( "supportsTransactionIsolationLevel", mID, level ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInDataManipulation", mID ); @@ -861,13 +861,13 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsSchemasInIndexDefinitions( return impl_callBooleanMethod( "supportsSchemasInIndexDefinitions", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsSchemasInTableDefinitions", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInTableDefinitions", mID ); @@ -879,7 +879,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsCatalogsInIndexDefinitions( return impl_callBooleanMethod( "supportsCatalogsInIndexDefinitions", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsCatalogsInDataManipulation", mID ); @@ -1073,7 +1073,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsMixedCaseIdentifiers( ) th return impl_callBooleanMethod( "supportsMixedCaseIdentifiers", mID ); } -sal_Bool java_sql_DatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool java_sql_DatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { static jmethodID mID(NULL); return impl_callBooleanMethod( "supportsMixedCaseQuotedIdentifiers", mID ); diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx index aee35fdb0ef4..45676d4d32fb 100644 --- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx +++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx @@ -99,7 +99,7 @@ OUString java_sql_DriverPropertyInfo::value() return aStr; } -sal_Bool java_sql_DriverPropertyInfo::required() +bool java_sql_DriverPropertyInfo::required() { jboolean out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 2b7c3dd9f063..4dc8c3d8563a 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -266,9 +266,9 @@ java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver ) ,m_pDriverClassLoader() ,m_Driver_theClass(NULL) ,m_aLogger( _rDriver.getLogger() ) - ,m_bParameterSubstitution(sal_False) - ,m_bIgnoreDriverPrivileges(sal_True) - ,m_bIgnoreCurrency(sal_False) + ,m_bParameterSubstitution(false) + ,m_bIgnoreDriverPrivileges(true) + ,m_bIgnoreCurrency(false) { } @@ -662,7 +662,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas // contains the statement which should be used when query for automatically generated values OUString sGeneratedValueStatement; // set to when we should allow to query for generated values - sal_Bool bAutoRetrievingEnabled = sal_False; + bool bAutoRetrievingEnabled = false; // first try if the jdbc driver is already registered at the driver manager SDBThreadAttach t; @@ -770,7 +770,7 @@ OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString return sURL; } -sal_Bool java_sql_Connection::construct(const OUString& url, +bool java_sql_Connection::construct(const OUString& url, const Sequence< PropertyValue >& info) { { // initialize the java vm @@ -784,7 +784,7 @@ sal_Bool java_sql_Connection::construct(const OUString& url, throwGenericSQLException(STR_NO_JAVA,*this); OUString sGeneratedValueStatement; // contains the statement which should be used when query for automatically generated values - sal_Bool bAutoRetrievingEnabled = sal_False; // set to when we should allow to query for generated values + bool bAutoRetrievingEnabled = false; // set to when we should allow to query for generated values OUString sDriverClassPath,sDriverClass; Sequence< NamedValue > aSystemProperties; diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 3f94d4bb7948..bd53f32ce6d3 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -66,7 +66,7 @@ java_sql_Statement_Base::java_sql_Statement_Base( JNIEnv * pEnv, java_sql_Connec ,m_aLogger( _rCon.getLogger(), java::sql::ConnectionLog::STATEMENT ) ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY) ,m_nResultSetType(ResultSetType::FORWARD_ONLY) - ,m_bEscapeProcessing(sal_True) + ,m_bEscapeProcessing(true) ,rBHelper(java_sql_Statement_BASE::rBHelper) { m_pConnection->acquire(); @@ -740,7 +740,7 @@ void java_sql_Statement_Base::getFastPropertyValue( rValue <<= THIS->getFetchSize(); break; case PROPERTY_ID_ESCAPEPROCESSING: - rValue <<= (sal_Bool)m_bEscapeProcessing; + rValue <<= m_bEscapeProcessing; break; case PROPERTY_ID_USEBOOKMARKS: default: diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index ef437409ba00..5b7fb4f040e1 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::lang; ::rtl::Reference< jvmaccess::VirtualMachine > getJavaVM2(const ::rtl::Reference< jvmaccess::VirtualMachine >& _rVM = ::rtl::Reference< jvmaccess::VirtualMachine >(), - sal_Bool _bSet = sal_False) + bool _bSet = false) { static ::rtl::Reference< jvmaccess::VirtualMachine > s_VM; if ( _rVM.is() || _bSet ) @@ -87,7 +87,7 @@ void SDBThreadAttach::releaseRef() osl_atomic_decrement(&getJavaVMRefCount()); if ( getJavaVMRefCount() == 0 ) { - getJavaVM2(::rtl::Reference< jvmaccess::VirtualMachine >(),sal_True); + getJavaVM2(::rtl::Reference< jvmaccess::VirtualMachine >(),true); } } @@ -228,7 +228,7 @@ void java_lang_Object::obtainMethodId(JNIEnv* _pEnv,const char* _pMethodName, co } // if ( !_inout_MethodID ) } -sal_Bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const +bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const { jboolean out( sal_False ); @@ -242,7 +242,7 @@ sal_Bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodI return out; } -sal_Bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const +bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const { jboolean out( sal_False ); SDBThreadAttach t; @@ -271,7 +271,7 @@ sal_Int32 java_lang_Object::callIntMethod( const char* _pMethodName, jmethodID& // call method jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) ); if ( _bIgnoreException ) - isExceptionOccurred(t.pEnv,sal_True); + isExceptionOccurred(t.pEnv,true); else ThrowSQLException( t.pEnv, NULL ); @@ -310,7 +310,7 @@ void java_lang_Object::callVoidMethodWithIntArg( const char* _pMethodName, jmeth // call method t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument ); if ( _bIgnoreException ) - isExceptionOccurred(t.pEnv,sal_True); + isExceptionOccurred(t.pEnv,true); else ThrowSQLException( t.pEnv, NULL ); } @@ -323,7 +323,7 @@ void java_lang_Object::callVoidMethodWithBoolArg( const char* _pMethodName, jmet // call method t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) ); if ( _bIgnoreException ) - isExceptionOccurred(t.pEnv,sal_True); + isExceptionOccurred(t.pEnv,true); else ThrowSQLException( t.pEnv, NULL ); } diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index a23d11b99541..41de077601ba 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -979,7 +979,7 @@ sal_Bool java_sql_ResultSet::convertFastPropertyValue( throw (::com::sun::star::lang::IllegalArgumentException) { SAL_INFO( "connectivity.drivers", "jdbc Ocke.Janssen@sun.com java_sql_ResultSet::convertFastPropertyValue" ); - sal_Bool bRet = sal_False; + bool bRet = false; switch(nHandle) { case PROPERTY_ID_CURSORNAME: diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 600294db836a..38aff165b243 100644 --- a/connectivity/source/drivers/jdbc/jservices.cxx +++ b/connectivity/source/drivers/jdbc/jservices.cxx @@ -52,7 +52,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 1bc79f7a04a5..8c5218860540 100644 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx @@ -181,13 +181,13 @@ jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference< return 0; } -sal_Bool connectivity::isExceptionOccurred(JNIEnv *pEnv,sal_Bool _bClear) +bool connectivity::isExceptionOccurred(JNIEnv *pEnv,bool _bClear) { if ( !pEnv ) - return sal_False; + return false; jthrowable pThrowable = pEnv->ExceptionOccurred(); - sal_Bool bRet = pThrowable != NULL; + bool bRet = pThrowable != NULL; if ( pThrowable ) { if ( _bClear ) diff --git a/connectivity/source/drivers/mork/MConnection.hxx b/connectivity/source/drivers/mork/MConnection.hxx index 55a3c9f1a539..a7d9c8528c74 100644 --- a/connectivity/source/drivers/mork/MConnection.hxx +++ b/connectivity/source/drivers/mork/MConnection.hxx @@ -102,7 +102,7 @@ namespace connectivity static OUString getDriverImplementationName(); - sal_Bool getForceLoadTables() {return true;} + bool getForceLoadTables() {return true;} // Added to enable me to use SQLInterpreter which requires an // XNameAccess i/f to access tables. diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx index 094a9a2165e7..55f8a67f4be8 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx @@ -240,9 +240,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return sal_False; } -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException, std::exception) @@ -260,14 +260,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLExc return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { - return sal_False; + return false; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { - return sal_False; + return false; } sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException, std::exception) @@ -304,9 +304,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return sal_True; } -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { - return sal_True; + return true; } sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException, std::exception) @@ -365,9 +365,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException, std::exception) @@ -390,14 +390,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { - return sal_False; + return false; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException, std::exception) @@ -405,9 +405,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException, std::exception) @@ -557,10 +557,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLE return sal_True; } -sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { // Any case may be used - return sal_True; + return true; } sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException, std::exception) diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.hxx b/connectivity/source/drivers/mork/MDatabaseMetaData.hxx index ea473c8a428f..a297fce092c0 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaData.hxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaData.hxx @@ -50,19 +50,19 @@ namespace connectivity private: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw() SAL_OVERRIDE; // cached database information - virtual OUString impl_getIdentifierQuoteString_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_isCatalogAtStart_throw( ) SAL_OVERRIDE; - virtual OUString impl_getCatalogSeparator_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsCatalogsInTableDefinitions_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsSchemasInTableDefinitions_throw( ) SAL_OVERRIDE ; - virtual sal_Bool impl_supportsCatalogsInDataManipulation_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsSchemasInDataManipulation_throw( ) SAL_OVERRIDE ; - virtual sal_Bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE ; - virtual sal_Bool impl_supportsAlterTableWithAddColumn_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsAlterTableWithDropColumn_throw( ) SAL_OVERRIDE; - virtual sal_Int32 impl_getMaxStatements_throw( ) SAL_OVERRIDE; - virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; + virtual OUString impl_getIdentifierQuoteString_throw( ) SAL_OVERRIDE; + virtual bool impl_isCatalogAtStart_throw( ) SAL_OVERRIDE; + virtual OUString impl_getCatalogSeparator_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsCatalogsInTableDefinitions_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsSchemasInTableDefinitions_throw( ) SAL_OVERRIDE ; + virtual bool impl_supportsCatalogsInDataManipulation_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsSchemasInDataManipulation_throw( ) SAL_OVERRIDE ; + virtual bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE ; + virtual bool impl_supportsAlterTableWithAddColumn_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsAlterTableWithDropColumn_throw( ) SAL_OVERRIDE; + virtual sal_Int32 impl_getMaxStatements_throw( ) SAL_OVERRIDE; + virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) SAL_OVERRIDE; + virtual bool impl_storesMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; // as I mentioned before this interface is really BIG // XDatabaseMetaData diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx index 4aba2596cfd0..c4a239ade780 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx @@ -47,7 +47,7 @@ MDatabaseMetaDataHelper::~MDatabaseMetaDataHelper() { } -sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection* _pCon, +bool MDatabaseMetaDataHelper::getTableStrings( OConnection* _pCon, ::std::vector< OUString >& _rStrings) { SAL_INFO("connectivity.mork", "=> MDatabaseMetaDataHelper::getTableStrings()"); @@ -66,10 +66,10 @@ sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection* _pCon, _rStrings.push_back(groupTableName); } - return( sal_True ); + return true; } -sal_Bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, +bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, const OUString& tableNamePattern, ODatabaseMetaDataResultSet::ORows& _rRows) { @@ -88,7 +88,7 @@ sal_Bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, ::std::vector< OUString > tables; if ( !getTableStrings( _pCon, tables ) ) - return sal_False; + return false; for ( size_t i = 0; i < tables.size(); i++ ) { ODatabaseMetaDataResultSet::ORow aRow(3); @@ -114,7 +114,7 @@ sal_Bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon, } _rRows = aRows; - return(sal_True); + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.hxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.hxx index eed91ab2ad03..90dc6d7a518c 100644 --- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.hxx +++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.hxx @@ -31,10 +31,10 @@ namespace connectivity ~MDatabaseMetaDataHelper(); - sal_Bool getTableStrings( OConnection* _pCon, + bool getTableStrings( OConnection* _pCon, ::std::vector< OUString >& _rStrings); - sal_Bool getTables( OConnection* _pCon, + bool getTables( OConnection* _pCon, const OUString& tableNamePattern, ODatabaseMetaDataResultSet::ORows& _rRows); }; diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx index a141bdfe8332..fa9e7d886dce 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx @@ -47,7 +47,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString :OCommonStatement(_pConnection) ,m_nNumParams(0) ,m_sSqlStatement(sql) - ,m_bPrepared(sal_False) + ,m_bPrepared(false) ,m_pResultSet() { } @@ -93,7 +93,7 @@ OCommonStatement::StatementType OPreparedStatement::parseSql( const OUString& sq describeParameter(); Reference xNames(m_xColNames,UNO_QUERY); - OResultSet::setBoundedColumns( m_aRow, m_xParamColumns, xNames, sal_False, m_xDBMetaData, m_aColMapping ); + OResultSet::setBoundedColumns( m_aRow, m_xParamColumns, xNames, false, m_xDBMetaData, m_aColMapping ); return eStatementType; } @@ -153,7 +153,7 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OCommonStatement_IBASE::rBHelper.bDisposed); - sal_Bool bReadOnly = sal_True; + bool bReadOnly = true; if ( m_pResultSet.is() ) bReadOnly = m_pResultSet->determineReadOnly(); // if we do not have a result set, then we have not been executed, yet. In this case, assuming readonly=true is diff --git a/connectivity/source/drivers/mork/MPreparedStatement.hxx b/connectivity/source/drivers/mork/MPreparedStatement.hxx index 25f1801ff86f..7454645c8dc8 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.hxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.hxx @@ -63,7 +63,7 @@ namespace connectivity OUString m_sSqlStatement; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; - sal_Bool m_bPrepared; + bool m_bPrepared; ::rtl::Reference< OResultSet > m_pResultSet; ::rtl::Reference m_xParamColumns; // the parameter columns OValueRow m_aParameterRow; diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index e6293c7df705..c7ab09c63df3 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -76,8 +76,8 @@ void MQueryHelperResultEntry::setValue( const OString &key, const OUString & rVa MQueryHelper::MQueryHelper(const OColumnAlias& _ca) :m_nIndex( 0 ) - ,m_bHasMore( sal_True ) - ,m_bAtEnd( sal_False ) + ,m_bHasMore( true ) + ,m_bAtEnd( false ) ,m_rColumnAlias( _ca ) ,m_aError() { @@ -121,7 +121,7 @@ void MQueryHelper::append(MQueryHelperResultEntry* resEnt) if ( resEnt != NULL ) { m_aResults.push_back( resEnt ); - m_bAtEnd = sal_False; + m_bAtEnd = false; } } @@ -138,8 +138,8 @@ void MQueryHelper::clear_results() void MQueryHelper::reset() { m_nIndex = 0; - m_bHasMore = sal_True; - m_bAtEnd = sal_False; + m_bHasMore = true; + m_bAtEnd = false; clear_results(); m_aError.reset(); } @@ -166,12 +166,12 @@ sal_Int32 MQueryHelper::getResultCount() const -sal_Bool MQueryHelper::queryComplete() const +bool MQueryHelper::queryComplete() const { - return sal_True; + return true; } -sal_Bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow ) +bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow ) { /* while (!queryComplete() && getResultCount() <= (sal_uInt32)nDBRow) @@ -186,7 +186,7 @@ sal_Bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow ) } -sal_Bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ) +bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ) { SAL_INFO("connectivity.mork", "MQueryHelper::getRowValue()" ); MQueryHelperResultEntry* xResEntry = getByIndex( nDBRow ); @@ -195,7 +195,7 @@ sal_Bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const if (xResEntry == NULL ) { rValue.setNull(); - return sal_False; + return false; } switch ( nType ) { @@ -208,7 +208,7 @@ sal_Bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const break; } - return sal_True; + return true; } sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection) @@ -271,7 +271,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection) entry->setValue(key, valueOUString); } ::std::vector< sal_Bool > vector = entryMatchedByExpression(this, &m_aExpr, entry); - sal_Bool result = sal_True; + bool result = true; for (::std::vector::iterator iter = vector.begin(); iter != vector.end(); ++iter) { result = result && *iter; @@ -303,11 +303,11 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection) // Set the 'name' property of the boolString. OString attrName = _aQuery->getColumnAlias().getProgrammaticNameOrFallbackToUTF8Alias( evStr->getName() ); SAL_INFO("connectivity.mork", "Name = " << attrName.getStr()); - sal_Bool requiresValue = sal_True; + bool requiresValue = true; OUString currentValue = entry->getValue(attrName); if (evStr->getCond() == MQueryOp::Exists || evStr->getCond() == MQueryOp::DoesNotExist) { - requiresValue = sal_False; + requiresValue = false; } if (requiresValue) { @@ -356,13 +356,13 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection) ::std::vector subquery_result = entryMatchedByExpression(_aQuery, queryExpression, entry); MQueryExpression::bool_cond condition = queryExpression->getExpressionCondition(); if (condition == MQueryExpression::OR) { - sal_Bool result = sal_False; + bool result = false; for (::std::vector::iterator iter = subquery_result.begin(); iter != subquery_result.end(); ++iter) { result = result || *iter; } resultVector.push_back(result); } else if (condition == MQueryExpression::AND) { - sal_Bool result = sal_True; + bool result = true; for (::std::vector::iterator iter = subquery_result.begin(); iter != subquery_result.end(); ++iter) { result = result && *iter; } diff --git a/connectivity/source/drivers/mork/MQueryHelper.hxx b/connectivity/source/drivers/mork/MQueryHelper.hxx index 52ee78c0398d..7dca2716b9a3 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.hxx +++ b/connectivity/source/drivers/mork/MQueryHelper.hxx @@ -68,9 +68,9 @@ namespace connectivity MQueryExpressionBase( node_type _eNodeType ) : m_eNodeType( _eNodeType ) {} public: - sal_Bool isUnknown( ) const { return m_eNodeType == Unknown; } - sal_Bool isStringExpr( ) const { return m_eNodeType == StringExpr; } - sal_Bool isExpr( ) const { return m_eNodeType == Expr; } + bool isUnknown( ) const { return m_eNodeType == Unknown; } + bool isStringExpr( ) const { return m_eNodeType == StringExpr; } + bool isExpr( ) const { return m_eNodeType == Expr; } }; class MQueryExpressionString : public MQueryExpressionBase { @@ -167,8 +167,8 @@ namespace connectivity ::osl::Condition m_aCondition; resultsArray m_aResults; sal_uInt32 m_nIndex; - sal_Bool m_bHasMore; - sal_Bool m_bAtEnd; + bool m_bHasMore; + bool m_bAtEnd; void append(MQueryHelperResultEntry* resEnt ); void clear_results(); OColumnAlias m_rColumnAlias; @@ -192,18 +192,18 @@ namespace connectivity void reset(); MQueryHelperResultEntry* getByIndex( sal_uInt32 nRow ); - sal_Bool isError() const; - sal_Bool queryComplete() const; + bool isError() const; + bool queryComplete() const; sal_Int32 getResultCount() const; - sal_Bool checkRowAvailable( sal_Int32 nDBRow ); - sal_Bool getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ); - sal_Int32 executeQuery(OConnection* xConnection); - const OColumnAlias& getColumnAlias() const { return m_rColumnAlias; } - bool hadError() const { return m_aError.is(); } - inline ErrorDescriptor& getError() { return m_aError; } - - void setAddressbook( OUString&); - void setExpression( MQueryExpression &_expr ); + bool checkRowAvailable( sal_Int32 nDBRow ); + bool getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType ); + sal_Int32 executeQuery(OConnection* xConnection); + const OColumnAlias& getColumnAlias() const { return m_rColumnAlias; } + bool hadError() const { return m_aError.is(); } + inline ErrorDescriptor& getError() { return m_aError; } + + void setAddressbook( OUString&); + void setExpression( MQueryExpression &_expr ); }; } diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index 4d8b23f6b410..94110cd0ebd1 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -101,7 +101,7 @@ OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< conne ,m_pTable(NULL) ,m_CurrentRowCount(0) ,m_nParamIndex(0) - ,m_bIsAlwaysFalseQuery(sal_False) + ,m_bIsAlwaysFalseQuery(false) ,m_pKeySet(NULL) ,m_pSortIndex(NULL) ,m_nNewRow(0) @@ -198,7 +198,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 /*c sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException, std::exception) { ResultSetEntryGuard aGuard( *this ); - m_bWasNull = sal_True; + m_bWasNull = true; return sal_False; } @@ -324,17 +324,17 @@ sal_uInt32 OResultSet::currentRowCount() -sal_Bool OResultSet::fetchCurrentRow( ) throw(SQLException, RuntimeException) +bool OResultSet::fetchCurrentRow( ) throw(SQLException, RuntimeException) { OSL_TRACE("fetchCurrentRow, m_nRowPos = %u", m_nRowPos ); return fetchRow(getCurrentCardNumber()); } -sal_Bool OResultSet::pushCard(sal_uInt32 /*cardNumber*/) throw(SQLException, RuntimeException) +bool OResultSet::pushCard(sal_uInt32 /*cardNumber*/) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OResultSet::pushCard()" ); - return sal_True; + return true; /* if (cardNumber == 0) return sal_True; @@ -361,7 +361,7 @@ sal_Bool OResultSet::pushCard(sal_uInt32 /*cardNumber*/) throw(SQLException, Run */ } -sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw(SQLException, RuntimeException) +bool OResultSet::fetchRow(sal_Int32 cardNumber,bool bForceReload) throw(SQLException, RuntimeException) { SAL_INFO("connectivity.mork", "=> OResultSet::fetchRow()" ); @@ -370,7 +370,7 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( { // Check whether we've already fetched the row... if ( !(m_aRow->get())[0].isNull() && (sal_Int32)(m_aRow->get())[0] == (sal_Int32)cardNumber ) - return sal_True; + return true; //Check whether the old row has been changed if (cardNumber == m_nUpdatedRow) { @@ -382,8 +382,8 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( // else // m_aQuery.resyncRow(cardNumber); - if ( validRow( cardNumber ) == sal_False ) - return sal_False; + if ( validRow( cardNumber ) == false ) + return false; (m_aRow->get())[0] = (sal_Int32)cardNumber; sal_Int32 nCount = m_aColumnNames.getLength(); @@ -401,17 +401,17 @@ sal_Bool OResultSet::fetchRow(sal_Int32 cardNumber,sal_Bool bForceReload) throw( } } } - return sal_True; + return true; } const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { - if ( fetchRow( cardNumber ) == sal_False ) + if ( fetchRow( cardNumber ) == false ) { OSL_FAIL("fetchRow() returned False" ); - m_bWasNull = sal_True; + m_bWasNull = true; return *ODatabaseMetaDataResultSet::getEmptyValue(); } @@ -617,7 +617,7 @@ Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException, s void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("In/Out: OResultSet::refreshRow" ); - if (fetchRow(getCurrentCardNumber(),sal_True)) { + if (fetchRow(getCurrentCardNumber(),true)) { //force fetch current row will cause we lose all change to the current row m_pStatement->getOwnConnection()->throwSQLException( STR_ERROR_REFRESH_ROW, *this ); } @@ -878,7 +878,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT if ( columnName.equalsAscii("0") && op == MQueryOp::Is && matchString.equalsAscii("1") ) { OSL_TRACE("Query always evaluates to FALSE"); - m_bIsAlwaysFalseQuery = sal_True; + m_bIsAlwaysFalseQuery = true; } queryExpression.getExpressions().push_back( new MQueryExpressionString( columnName, op, matchString )); } @@ -1082,7 +1082,7 @@ void OResultSet::fillRowData() // Generate Match Conditions for Query const OSQLParseNode* pParseTree = m_pSQLIterator->getWhereTree(); - m_bIsAlwaysFalseQuery = sal_False; + m_bIsAlwaysFalseQuery = false; if ( pParseTree != NULL ) { // Extract required info @@ -1124,7 +1124,7 @@ void OResultSet::fillRowData() } -static sal_Bool matchRow( OValueRow& row1, OValueRow& row2 ) +static bool matchRow( OValueRow& row1, OValueRow& row2 ) { OValueVector::Vector::iterator row1Iter = row1->get().begin(); OValueVector::Vector::iterator row2Iter = row2->get().begin(); @@ -1135,12 +1135,12 @@ static sal_Bool matchRow( OValueRow& row1, OValueRow& row2 ) { // Compare values, if at anytime there's a mismatch return false if ( !( (*row1Iter) == (*row2Iter) ) ) - return sal_False; + return false; } } // If we get to here the rows match - return sal_True; + return true; } sal_Int32 OResultSet::getRowForCardNumber(sal_Int32 nCardNum) @@ -1201,7 +1201,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep } else { - sal_Bool bDistinct = sal_False; + bool bDistinct = false; OSQLParseNode *pDistinct = m_pParseTree->getChild(1); if (pDistinct && pDistinct->getTokenID() == SQL_TOKEN_DISTINCT) { @@ -1210,7 +1210,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep m_aOrderbyColumnNumber.push_back(m_aColMapping[1]); m_aOrderbyAscending.push_back(SQL_DESC); } - bDistinct = sal_True; + bDistinct = true; } OSortIndex::TKeyTypeVector eKeyType(m_aOrderbyColumnNumber.size()); @@ -1341,7 +1341,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep void OResultSet::setBoundedColumns(const OValueRow& _rRow, const ::rtl::Reference& _rxColumns, const Reference& _xNames, - sal_Bool _bSetColumnMapping, + bool _bSetColumnMapping, const Reference& _xMetaData, ::std::vector& _rColMapping) { @@ -1419,7 +1419,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, -sal_Bool OResultSet::isCount() const +bool OResultSet::isCount() const { return (m_pParseTree && m_pParseTree->count() > 2 && @@ -1434,7 +1434,7 @@ sal_Bool OResultSet::isCount() const // Check for valid row in m_aQuery -sal_Bool OResultSet::validRow( sal_uInt32 nRow) +bool OResultSet::validRow( sal_uInt32 nRow) { sal_Int32 nNumberOfRecords = m_aQueryHelper.getResultCount(); @@ -1442,10 +1442,10 @@ sal_Bool OResultSet::validRow( sal_uInt32 nRow) #if OSL_DEBUG_LEVEL > 0 OSL_TRACE("validRow: waiting..."); #endif - if (m_aQueryHelper.checkRowAvailable( nRow ) == sal_False) + if (m_aQueryHelper.checkRowAvailable( nRow ) == false) { OSL_TRACE("validRow(%u): return False", nRow); - return sal_False; + return false; } if ( m_aQueryHelper.hadError() ) @@ -1459,15 +1459,15 @@ sal_Bool OResultSet::validRow( sal_uInt32 nRow) if (( nRow == 0 ) || ( nRow > (sal_uInt32)nNumberOfRecords && m_aQueryHelper.queryComplete()) ){ OSL_TRACE("validRow(%u): return False", nRow); - return sal_False; + return false; } #if OSL_DEBUG_LEVEL > 0 OSL_TRACE("validRow(%u): return True", nRow); #endif - return sal_True; + return true; } -sal_Bool OResultSet::fillKeySet(sal_Int32 nMaxCardNumber) +bool OResultSet::fillKeySet(sal_Int32 nMaxCardNumber) { impl_ensureKeySet(); if (m_CurrentRowCount < nMaxCardNumber) @@ -1480,7 +1480,7 @@ sal_Bool OResultSet::fillKeySet(sal_Int32 nMaxCardNumber) m_pKeySet->get().push_back( nKeyValue ); m_CurrentRowCount = nMaxCardNumber; } - return sal_True; + return true; } sal_Int32 OResultSet::deletedCount() @@ -1490,7 +1490,7 @@ sal_Int32 OResultSet::deletedCount() } -sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) +bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) { SAL_INFO("connectivity.mork", "=> OResultSet::seekRow()" ); @@ -1536,7 +1536,7 @@ sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) if ( nCurPos <= 0 ) { m_nRowPos = 0; OSL_TRACE("seekRow: return False, m_nRowPos = %u", m_nRowPos ); - return sal_False; + return false; } sal_Int32 nCurCard = nCurPos; if ( nCurPos < (sal_Int32)m_pKeySet->get().size() ) //The requested row is exist in m_pKeySet, so we just use it @@ -1550,14 +1550,14 @@ sal_Bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset ) fillKeySet(nNumberOfRecords); m_nRowPos = static_cast(m_pKeySet->get().size() + 1); OSL_TRACE("seekRow: return False, m_nRowPos = %u", m_nRowPos ); - return sal_False; + return false; } //Insert new retrieved items for later use fillKeySet(nNumberOfRecords); m_nRowPos = (sal_uInt32)nCurPos; OSL_TRACE("seekRow: return True, m_nRowPos = %u", m_nRowPos ); fetchCurrentRow(); - return sal_True; + return true; } void OResultSet::setColumnMapping(const ::std::vector& _aColumnMapping) @@ -1574,7 +1574,7 @@ void OResultSet::setColumnMapping(const ::std::vector& _aColumnMappin { OSL_TRACE("getBookmark, m_nRowPos = %u", m_nRowPos ); ResultSetEntryGuard aGuard( *this ); - if ( fetchCurrentRow() == sal_False ) { + if ( fetchCurrentRow() == false ) { m_pStatement->getOwnConnection()->throwSQLException( STR_ERROR_GET_ROW, *this ); } @@ -1663,7 +1663,7 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x) throw { OSL_TRACE("updateValue, m_nRowPos = %u", m_nRowPos ); ResultSetEntryGuard aGuard( *this ); - if ( fetchCurrentRow() == sal_False ) { + if ( fetchCurrentRow() == false ) { m_pStatement->getOwnConnection()->throwSQLException( STR_ERROR_GET_ROW, *this ); } @@ -1683,7 +1683,7 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException { OSL_TRACE("updateNull, m_nRowPos = %u", m_nRowPos ); ResultSetEntryGuard aGuard( *this ); - if ( fetchCurrentRow() == sal_False ) + if ( fetchCurrentRow() == false ) m_pStatement->getOwnConnection()->throwSQLException( STR_ERROR_GET_ROW, *this ); checkPendingUpdate(); @@ -1849,7 +1849,7 @@ void SAL_CALL OResultSet::moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQL } } -sal_Bool OResultSet::determineReadOnly() +bool OResultSet::determineReadOnly() { // OSL_FAIL( "OResultSet::determineReadOnly( ) not implemented" ); diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx index 719b5f8714fe..c6ea4c7ea52b 100644 --- a/connectivity/source/drivers/mork/MResultSet.hxx +++ b/connectivity/source/drivers/mork/MResultSet.hxx @@ -76,7 +76,7 @@ namespace connectivity ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData; sal_uInt32 m_nRowPos; sal_uInt32 m_nOldRowPos; - sal_Bool m_bWasNull; + bool m_bWasNull; sal_Int32 m_nFetchSize; sal_Int32 m_nResultSetType; sal_Int32 m_nFetchDirection; @@ -235,7 +235,7 @@ protected: OValueRow m_aParameterRow; ::std::vector< OUString> m_aAttributeStrings; sal_Int32 m_nParamIndex; - sal_Bool m_bIsAlwaysFalseQuery; + bool m_bIsAlwaysFalseQuery; ::rtl::Reference m_pKeySet; OSortIndex* m_pSortIndex; sal_Int32 m_nNewRow; //inserted row @@ -252,9 +252,9 @@ protected: void analyseWhereClause( const OSQLParseNode* parseTree, MQueryExpression &queryExpression); - sal_Bool isCount() const; + bool isCount() const; - sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty(); } + bool IsSorted() const { return !m_aOrderbyColumnNumber.empty(); } enum eRowPosition { NEXT_POS, PRIOR_POS, FIRST_POS, LAST_POS, ABSOLUTE_POS, RELATIVE_POS @@ -262,16 +262,16 @@ protected: sal_uInt32 currentRowCount(); - sal_Bool fetchRow(sal_Int32 rowIndex,sal_Bool bForceReload=sal_False) throw( ::com::sun::star::sdbc::SQLException, + bool fetchRow(sal_Int32 rowIndex,bool bForceReload=false) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - sal_Bool fetchCurrentRow() throw( ::com::sun::star::sdbc::SQLException, + bool fetchCurrentRow() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - sal_Bool pushCard(sal_uInt32 rowIndex) throw( ::com::sun::star::sdbc::SQLException, + bool pushCard(sal_uInt32 rowIndex) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - sal_Bool validRow( sal_uInt32 nRow ); - sal_Bool seekRow( eRowPosition pos, sal_Int32 nOffset = 0 ); + bool validRow( sal_uInt32 nRow ); + 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 + 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); @@ -281,7 +281,7 @@ protected: sal_Int32 getCurrentCardNumber(); public: - sal_Bool determineReadOnly(); + bool determineReadOnly(); // MozAddressbook Specific methods void SAL_CALL executeQuery() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -311,7 +311,7 @@ public: const OValueRow& _rRow, const ::rtl::Reference& _rxColumns, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xNames, - sal_Bool _bSetColumnMapping, + bool _bSetColumnMapping, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData, ::std::vector& _rColMapping); diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.cxx b/connectivity/source/drivers/mork/MResultSetMetaData.cxx index 0859aff8ba54..f323d8d93adf 100644 --- a/connectivity/source/drivers/mork/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mork/MResultSetMetaData.cxx @@ -173,7 +173,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 /*column*/ ) throw sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException, std::exception) { checkColumnIndex(column); - sal_Bool bReadOnly = (m_xColumns->get())[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) && + 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/mork/MResultSetMetaData.hxx b/connectivity/source/drivers/mork/MResultSetMetaData.hxx index 65fd45d4cfb2..b72b85388a52 100644 --- a/connectivity/source/drivers/mork/MResultSetMetaData.hxx +++ b/connectivity/source/drivers/mork/MResultSetMetaData.hxx @@ -40,7 +40,7 @@ namespace connectivity OUString m_aTableName; ::rtl::Reference m_xColumns; OTable* m_pTable; - sal_Bool m_bReadOnly; + bool m_bReadOnly; protected: virtual ~OResultSetMetaData(); @@ -48,7 +48,7 @@ namespace connectivity // a constructor that is needed to return the object: // OResultSetMetaData(OConnection* _pConnection) : m_pConnection(_pConnection){} OResultSetMetaData(const ::rtl::Reference& _rxColumns, - const OUString& _aTableName,OTable* _pTable,sal_Bool aReadOnly + const OUString& _aTableName,OTable* _pTable,bool aReadOnly ) :m_aTableName(_aTableName) ,m_xColumns(_rxColumns) diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx index bbed981b91c3..d37061b3ab4b 100644 --- a/connectivity/source/drivers/mork/MStatement.cxx +++ b/connectivity/source/drivers/mork/MStatement.cxx @@ -432,7 +432,7 @@ sal_Bool OCommonStatement::convertFastPropertyValue( const Any& /*rValue*/ ) throw (::com::sun::star::lang::IllegalArgumentException) { - sal_Bool bConverted = sal_False; + bool bConverted = false; // here we have to try to convert return bConverted; } @@ -517,7 +517,7 @@ void OCommonStatement::createColumnMapping() for ( i = 0; i < m_aColMapping.size(); i++ ) OSL_TRACE("BEFORE Mapped: %d -> %d", i, m_aColMapping[i] ); #endif - OResultSet::setBoundedColumns(m_aRow,xColumns,xNames,sal_True,m_xDBMetaData,m_aColMapping); + OResultSet::setBoundedColumns(m_aRow,xColumns,xNames,true,m_xDBMetaData,m_aColMapping); #if OSL_DEBUG_LEVEL > 0 for ( i = 0; i < m_aColMapping.size(); i++ ) OSL_TRACE("AFTER Mapped: %d -> %d", i, m_aColMapping[i] ); diff --git a/connectivity/source/drivers/mork/MTable.hxx b/connectivity/source/drivers/mork/MTable.hxx index 521421b27614..d0b2f5490fe9 100644 --- a/connectivity/source/drivers/mork/MTable.hxx +++ b/connectivity/source/drivers/mork/MTable.hxx @@ -43,7 +43,7 @@ namespace connectivity OConnection* getConnection() { return m_pConnection;} - sal_Bool isReadOnly() const { return sal_False; } + bool isReadOnly() const { return false; } OUString getTableName() const { return m_Name; } OUString getSchema() const { return m_SchemaName; } diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx index ef3b63bf8801..1b38325b0494 100644 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx @@ -245,9 +245,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return sal_False; } -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseIdentifiers( ) throw(SQLException, RuntimeException) @@ -265,14 +265,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLExc return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { - return sal_False; + return false; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { - return sal_False; + return false; } sal_Int32 SAL_CALL ODatabaseMetaData::getMaxIndexLength( ) throw(SQLException, RuntimeException) @@ -309,9 +309,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return sal_True; } -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { - return sal_True; + return true; } sal_Bool SAL_CALL ODatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw(SQLException, RuntimeException) @@ -370,9 +370,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92FullSQL( ) throw(SQLException, RuntimeException) @@ -395,14 +395,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { - return sal_False; + return false; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) throw(SQLException, RuntimeException) @@ -410,9 +410,9 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro return sal_False; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { - return sal_False; + return false; } sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins( ) throw(SQLException, RuntimeException) @@ -562,10 +562,10 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLE return sal_True; } -sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { // Any case may be used - return sal_True; + return true; } sal_Bool SAL_CALL ODatabaseMetaData::nullsAreSortedAtEnd( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx index fbefd5dadc9b..49fa119d5858 100644 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx @@ -48,19 +48,19 @@ namespace connectivity private: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw(); // cached database information - virtual OUString impl_getIdentifierQuoteString_throw( ); - virtual sal_Bool impl_isCatalogAtStart_throw( ); - virtual OUString impl_getCatalogSeparator_throw( ); - virtual sal_Bool impl_supportsCatalogsInTableDefinitions_throw( ); - virtual sal_Bool impl_supportsSchemasInTableDefinitions_throw( ) ; - virtual sal_Bool impl_supportsCatalogsInDataManipulation_throw( ); - virtual sal_Bool impl_supportsSchemasInDataManipulation_throw( ) ; - virtual sal_Bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) ; - virtual sal_Bool impl_supportsAlterTableWithAddColumn_throw( ); - virtual sal_Bool impl_supportsAlterTableWithDropColumn_throw( ); - virtual sal_Int32 impl_getMaxStatements_throw( ); - virtual sal_Int32 impl_getMaxTablesInSelect_throw( ); - virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ); + virtual OUString impl_getIdentifierQuoteString_throw( ); + virtual bool impl_isCatalogAtStart_throw( ); + virtual OUString impl_getCatalogSeparator_throw( ); + virtual bool impl_supportsCatalogsInTableDefinitions_throw( ); + virtual bool impl_supportsSchemasInTableDefinitions_throw( ) ; + virtual bool impl_supportsCatalogsInDataManipulation_throw( ); + virtual bool impl_supportsSchemasInDataManipulation_throw( ) ; + virtual bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) ; + virtual bool impl_supportsAlterTableWithAddColumn_throw( ); + virtual bool impl_supportsAlterTableWithDropColumn_throw( ); + virtual sal_Int32 impl_getMaxStatements_throw( ); + virtual sal_Int32 impl_getMaxTablesInSelect_throw( ); + virtual bool impl_storesMixedCaseQuotedIdentifiers_throw( ); // as I mentioned before this interface is really BIG // XDatabaseMetaData diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index 01f7c59ce22d..c73159fc85d6 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -58,7 +58,7 @@ MozillaBootstrap::~MozillaBootstrap() void MozillaBootstrap::Init() { - sal_Bool aProfileExists=sal_False; + bool aProfileExists=false; #ifndef MINIMAL_PROFILEDISCOVER //This must be call before any mozilla code diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx index 6ff17b7fedc5..7b27b45c6cc1 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx @@ -23,14 +23,16 @@ #include -sal_Bool MNS_Init(sal_Bool& aProfileExists); -sal_Bool MNS_Term(sal_Bool aForce=sal_False); +bool MNS_Init(bool& aProfileExists); +bool MNS_Term(bool aForce = false); + +bool MNS_InitXPCOM(sal_Bool* aProfileExists); -sal_Bool MNS_InitXPCOM(sal_Bool* aProfileExists); typedef struct UI_Thread_ARGS { - sal_Bool* bProfileExists; -}UI_Thread_ARGS; + bool* bProfileExists; +} UI_Thread_ARGS; + void MNS_XPCOM_EventLoop(); #endif // _CONNECTIVITY_MAB_NS_INIT_HXX_ diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index e66a79b6b13b..b151d81dc214 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -360,12 +360,12 @@ namespace connectivity } #endif - sal_Bool ProfileAccess::isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) + bool ProfileAccess::isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) { #ifdef MINIMAL_PROFILEDISCOVER (void)product; /* avoid warning about unused parameter */ (void)profileName; /* avoid warning about unused parameter */ - return sal_True; + return true; #else OUString path = getProfilePath(product,profileName); if (path.isEmpty()) @@ -394,16 +394,16 @@ namespace connectivity #endif } - sal_Bool ProfileAccess::getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) + bool ProfileAccess::getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException) { sal_Int32 index=product; ProductStruct &m_Product = m_ProductProfileList[index]; if (!m_Product.mProfileList.size() || m_Product.mProfileList.find(profileName) == m_Product.mProfileList.end()) { - return sal_False; + return false; } else - return sal_True; + return true; } } } diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx index 0c11e2b5d26b..f5ee6a6f6f5a 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx @@ -95,8 +95,8 @@ namespace connectivity ::sal_Int32 getProfileCount( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); ::sal_Int32 getProfileList( ::com::sun::star::mozilla::MozillaProductType product, ::com::sun::star::uno::Sequence< OUString >& list ) throw (::com::sun::star::uno::RuntimeException); OUString getDefaultProfile( ::com::sun::star::mozilla::MozillaProductType product ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); + bool SAL_CALL isProfileLocked( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); + bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); protected: ProductStruct m_ProductProfileList[4]; sal_Int32 LoadProductsInfo(); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx index 0d40bff8ab8f..2eeef78a0386 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx @@ -34,7 +34,8 @@ namespace connectivity{ class OConnection; } } -sal_Bool isProfileLocked(connectivity::mozab::OConnection* _pCon); + +bool isProfileLocked(connectivity::mozab::OConnection* _pCon); class nsIAbDirectory; sal_Int32 getDirectoryType(const nsIAbDirectory* directory); diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index ff93286f7ff4..30b6cd2df9f2 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -33,21 +33,21 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; OMySQLColumns::OMySQLColumns( ::cppu::OWeakObject& _rParent - ,sal_Bool _bCase + ,bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector - ,sal_Bool _bUseHardRef + ,bool _bUseHardRef ) : OColumnsHelper(_rParent,_bCase,_rMutex,_rVector,_bUseHardRef) { } Reference< XPropertySet > OMySQLColumns::createDescriptor() { - return new OMySQLColumn(sal_True); + return new OMySQLColumn(true); } -OMySQLColumn::OMySQLColumn( sal_Bool _bCase) +OMySQLColumn::OMySQLColumn( bool _bCase) : connectivity::sdbcx::OColumn( _bCase ) { construct(); diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index e60208700d54..588845ecd201 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -113,12 +113,12 @@ namespace connectivity D_NATIVE } T_DRIVERTYPE; - sal_Bool isOdbcUrl(const OUString& _sUrl) + bool isOdbcUrl(const OUString& _sUrl) { return _sUrl.copy(0,16) == "sdbc:mysql:odbc:"; } - sal_Bool isNativeUrl(const OUString& _sUrl) + bool isNativeUrl(const OUString& _sUrl) { return (!_sUrl.compareTo(OUString("sdbc:mysql:mysqlc:"), sizeof("sdbc:mysql:mysqlc:")-1)); } @@ -319,7 +319,7 @@ namespace connectivity { Sequence< PropertyValue > info; - sal_Bool bOK = url.startsWith( "sdbc:mysql:odbc:" ) + bool bOK = url.startsWith( "sdbc:mysql:odbc:" ) || url.startsWith( "sdbc:mysql:jdbc:" ) || ( url.startsWith( "sdbc:mysql:mysqlc:" ) && loadDriver( url, info ).is() diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index eeb2315c8026..942be52625ae 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -130,7 +130,7 @@ void OMySQLTable::construct() sdbcx::OCollection* OMySQLTable::createColumns(const TStringVector& _rNames) { - OMySQLColumns* pColumns = new OMySQLColumns(*this,sal_True,m_aMutex,_rNames); + OMySQLColumns* pColumns = new OMySQLColumns(*this,true,m_aMutex,_rNames); pColumns->setParent(this); return pColumns; } @@ -207,7 +207,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISNULLABLE)) >>= nNewNullable; // check also the auto_increment - sal_Bool bOldAutoIncrement = sal_False,bAutoIncrement = sal_False; + bool bOldAutoIncrement = false,bAutoIncrement = false; xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; bool bColumnNameChanged = false; diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 1ac19ec7ba00..d346b38033a9 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -124,7 +124,7 @@ sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Refere void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) { Reference< XInterface > xObject( getObject( _nPos ) ); - sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); + bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { Reference< XConnection > xConnection = static_cast(m_rParent).getConnection(); @@ -136,7 +136,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString aSql( "DROP " ); Reference xProp(xObject,UNO_QUERY); - sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == "VIEW"; + bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == "VIEW"; if(bIsView) // here we have a view aSql += "VIEW "; else diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index 29cd61436281..0d7430400b29 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -99,7 +99,7 @@ void OViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) return; Reference< XInterface > xObject( getObject( _nPos ) ); - sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); + bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { OUString aSql( "DROP VIEW" ); @@ -116,9 +116,9 @@ void OViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) void OViews::dropByNameImpl(const OUString& elementName) { - m_bInDrop = sal_True; + m_bInDrop = true; OCollection_TYPE::dropByName(elementName); - m_bInDrop = sal_False; + m_bInDrop = false; } void OViews::createView( const Reference< XPropertySet >& descriptor ) diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index 5bb4b86a2fd3..38a8d0316807 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -51,13 +51,13 @@ OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver) ,m_aConnectionHandle(NULL) ,m_pDriverHandleCopy(_pDriverHandle) ,m_nStatementCount(0) - ,m_bClosed(sal_True) - ,m_bUseCatalog(sal_False) - ,m_bUseOldDateFormat(sal_False) - ,m_bParameterSubstitution(sal_False) - ,m_bIgnoreDriverPrivileges(sal_False) - ,m_bPreventGetVersionColumns(sal_False) - ,m_bReadOnly(sal_True) + ,m_bClosed(true) + ,m_bUseCatalog(false) + ,m_bUseOldDateFormat(false) + ,m_bParameterSubstitution(false) + ,m_bIgnoreDriverPrivileges(false) + ,m_bPreventGetVersionColumns(false) + ,m_bReadOnly(true) { m_pDriver->acquire(); } @@ -96,7 +96,7 @@ oslGenericFunction OConnection::getOdbcFunction(sal_Int32 _nIndex) const return m_pDriver->getOdbcFunction(_nIndex); } -SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr,sal_Int32 nTimeOut, sal_Bool bSilent) +SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr, sal_Int32 nTimeOut, bool bSilent) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -156,7 +156,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr,sal_Int32 nTim } catch(Exception&) { - m_bReadOnly = sal_True; + m_bReadOnly = true; } try { @@ -206,7 +206,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal const char* pRetriStmt = "AutoRetrievingStatement"; sal_Int32 nTimeout = 20; - sal_Bool bSilent = sal_True; + bool bSilent = true; const PropertyValue *pBegin = info.getConstArray(); const PropertyValue *pEnd = pBegin + info.getLength(); for(;pBegin != pEnd;++pBegin) @@ -223,7 +223,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal OSL_VERIFY( pBegin->Value >>= m_bParameterSubstitution ); else if( pBegin->Name.equalsAscii(pRetrieving)) { - sal_Bool bAutoRetrievingEnabled = sal_False; + bool bAutoRetrievingEnabled = false; OSL_VERIFY( pBegin->Value >>= bAutoRetrievingEnabled ); enableAutoRetrievingEnabled(bAutoRetrievingEnabled); } @@ -273,7 +273,7 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal SQLRETURN nSQLRETURN = OpenConnection(aDSN,nTimeout, bSilent); if (nSQLRETURN == SQL_ERROR || nSQLRETURN == SQL_NO_DATA) { - OTools::ThrowException(this,nSQLRETURN,m_aConnectionHandle,SQL_HANDLE_DBC,*this,sal_False); + OTools::ThrowException(this,nSQLRETURN,m_aConnectionHandle,SQL_HANDLE_DBC,*this,false); } return nSQLRETURN; } @@ -501,7 +501,7 @@ void OConnection::disposing() if(!m_bClosed) N3SQLDisconnect(m_aConnectionHandle); - m_bClosed = sal_True; + m_bClosed = true; dispose_ChildImpl(); } @@ -514,7 +514,7 @@ OConnection* OConnection::cloneConnection() SQLHANDLE OConnection::createStatementHandle() { OConnection* pConnectionTemp = this; - sal_Bool bNew = sal_False; + bool bNew = false; try { sal_Int32 nMaxStatements = getMetaData()->getMaxStatements(); @@ -524,7 +524,7 @@ SQLHANDLE OConnection::createStatementHandle() pConnection->acquire(); pConnection->Construct(m_sURL,getConnectionInfo()); pConnectionTemp = pConnection; - bNew = sal_True; + bNew = true; } } catch(SQLException&) diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx index 5045213c9402..1b79ffb5439d 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx @@ -40,8 +40,8 @@ ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon : ::connectivity::ODatabaseMetaDataBase(_pCon,_pCon->getConnectionInfo()) ,m_aConnectionHandle(_pHandle) ,m_pConnection(_pCon) - ,m_bUseCatalog(sal_True) - ,m_bOdbc3(sal_True) + ,m_bUseCatalog(true) + ,m_bOdbc3(true) { OSL_ENSURE(m_pConnection,"ODatabaseMetaData::ODatabaseMetaData: No connection set!"); if(!m_pConnection->isCatalogUsed()) @@ -472,7 +472,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesLowerCaseIdentifiers( ) throw(SQLExc return nValue == SQL_IC_LOWER; } -sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); @@ -500,14 +500,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::storesUpperCaseIdentifiers( ) throw(SQLExc return nValue == SQL_IC_UPPER; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ALTER_TABLE,nValue,*this); return (nValue & SQL_AT_ADD_COLUMN) == SQL_AT_ADD_COLUMN; } -sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) +bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_ALTER_TABLE,nValue,*this); @@ -559,7 +559,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames( ) return nValue != SQL_CN_NONE; } -sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) +bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { SQLUSMALLINT nValue=0; if ( m_bUseCatalog ) @@ -644,7 +644,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int3 return (nValue & static_cast(level)) == static_cast(level); } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); @@ -679,14 +679,14 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInIndexDefinitions( ) throw return (nValue & SQL_SU_INDEX_DEFINITION) == SQL_SU_INDEX_DEFINITION; } -sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { SQLUINTEGER nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_SCHEMA_USAGE,nValue,*this); return (nValue & SQL_SU_TABLE_DEFINITION) == SQL_SU_TABLE_DEFINITION; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { SQLUINTEGER nValue=0; if(m_bUseCatalog) @@ -702,7 +702,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInIndexDefinitions( ) thro return (nValue & SQL_CU_INDEX_DEFINITION) == SQL_CU_INDEX_DEFINITION; } -sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) +bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { SQLUINTEGER nValue=0; if(m_bUseCatalog) @@ -925,7 +925,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_In // OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CORRELATION_NAME,nValue,*this); break; } - sal_Bool bConvert = sal_False; + bool bConvert = false; switch(toType) { case DataType::BIT: @@ -1069,7 +1069,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseIdentifiers( ) throw(SQLE return nValue == SQL_IC_MIXED; } -sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) +bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { SQLUSMALLINT nValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_QUOTED_IDENTIFIER_CASE,nValue,*this); @@ -1584,7 +1584,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 set } OTools::GetInfo(m_pConnection,m_aConnectionHandle,nAskFor,nValue,*this); - sal_Bool bRet = sal_False; + bool bRet = false; switch(concurrency) { case ResultSetConcurrency::READ_ONLY: diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 27ffcbb3cfcb..ea040e68b89a 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -63,8 +63,8 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet(OConnection* _pConnection ,m_nRowPos(-1) ,m_nDriverColumnCount(0) ,m_nCurrentFetchState(0) - ,m_bWasNull(sal_True) - ,m_bEOF(sal_False) + ,m_bWasNull(true) + ,m_bEOF(false) { OSL_ENSURE(m_pConnection,"ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet: No parent set!"); if( SQL_NULL_HANDLE == m_aStatementHandle ) @@ -188,7 +188,7 @@ template < typename T, SQLSMALLINT sqlTypeId > T ODatabaseMetaDataResultSet::get } } else - m_bWasNull = sal_True; + m_bWasNull = true; return nVal; } @@ -214,7 +214,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex columnIndex = mapColumn(columnIndex); - sal_Bool bRet = sal_False; + bool bRet = false; if(columnIndex <= m_nDriverColumnCount) { sal_Int32 nType = getMetaData()->getColumnType(columnIndex); @@ -265,7 +265,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co return OTools::getBytesValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_BINARY,m_bWasNull,**this); } else - m_bWasNull = sal_True; + m_bWasNull = true; return Sequence(); } @@ -287,7 +287,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co return Date(aDate.day,aDate.month,aDate.year); } else - m_bWasNull = sal_True; + m_bWasNull = true; return Date(); } @@ -304,7 +304,7 @@ double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) t if(columnIndex <= m_nDriverColumnCount) OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_DOUBLE,m_bWasNull,**this,&nValue,sizeof nValue); else - m_bWasNull = sal_True; + m_bWasNull = true; return nValue; } @@ -321,7 +321,7 @@ float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) thr if(columnIndex <= m_nDriverColumnCount) OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_FLOAT,m_bWasNull,**this,&nVal,sizeof nVal); else - m_bWasNull = sal_True; + m_bWasNull = true; return nVal; } @@ -402,7 +402,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) if(columnIndex <= m_nDriverColumnCount) aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,impl_getColumnType_nothrow(columnIndex),m_bWasNull,**this,m_nTextEncoding); else - m_bWasNull = sal_True; + m_bWasNull = true; return aVal; } @@ -422,7 +422,7 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) if(columnIndex <= m_nDriverColumnCount) OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIME : SQL_C_TYPE_TIME,m_bWasNull,**this,&aTime,sizeof aTime); else - m_bWasNull = sal_True; + m_bWasNull = true; return Time(0, aTime.second,aTime.minute,aTime.hour, false); } @@ -438,9 +438,9 @@ OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) columnIndex = mapColumn(columnIndex); TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0}; if(columnIndex <= m_nDriverColumnCount) - OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime); + OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP, m_bWasNull, **this, &aTime, sizeof aTime); else - m_bWasNull = sal_True; + m_bWasNull = true; return DateTime(aTime.fraction, aTime.second, aTime.minute, aTime.hour, aTime.day, aTime.month, aTime.year, false); } @@ -518,11 +518,11 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, Runt checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - m_bEOF = sal_False; + m_bEOF = false; m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_FIRST,0); OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); - sal_Bool bRet = ( m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO ); + bool bRet = ( m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO ); if( bRet ) m_nRowPos = 1; return bRet; @@ -538,9 +538,9 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, Runti m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_LAST,0); OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); // here I know definitely that I stand on the last record - sal_Bool bRet = ( m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO ); + bool bRet = ( m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO ); if( bRet ) - m_bEOF = sal_True; + m_bEOF = true; return bRet; } @@ -550,11 +550,11 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 row ) throw(SQ checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - m_bEOF = sal_False; + m_bEOF = false; m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_ABSOLUTE,row); OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); - sal_Bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; + bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; if(bRet) m_nRowPos = row; return bRet; @@ -566,11 +566,11 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 row ) throw(SQ checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - m_bEOF = sal_False; + m_bEOF = false; m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_RELATIVE,row); OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); - sal_Bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; + bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; if(bRet) m_nRowPos += row; return bRet; @@ -582,11 +582,11 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, R checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - m_bEOF = sal_False; + m_bEOF = false; m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_PRIOR,0); OTools::ThrowException(m_pConnection,m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this); - sal_Bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; + bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; if(bRet) --m_nRowPos; else if ( m_nCurrentFetchState == SQL_NO_DATA ) @@ -647,13 +647,13 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - m_bEOF = sal_False; + m_bEOF = false; SQLRETURN nOldFetchStatus = m_nCurrentFetchState; // 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); - sal_Bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; + bool bRet = m_nCurrentFetchState == SQL_SUCCESS || m_nCurrentFetchState == SQL_SUCCESS_WITH_INFO; if(bRet || ( m_nCurrentFetchState == SQL_NO_DATA && nOldFetchStatus != SQL_NO_DATA ) ) ++m_nRowPos; return bRet; @@ -1113,8 +1113,8 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const OUStri checkColumnCount(); } -void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& catalog, const OUString& schema, - const OUString& table,sal_Int32 scope, sal_Bool nullable ) +void ODatabaseMetaDataResultSet::openSpecialColumns(bool _bRowVer,const Any& catalog, const OUString& schema, + const OUString& table,sal_Int32 scope, bool nullable ) throw(SQLException, RuntimeException) { // Some ODBC drivers really don't like getting an empty string as tableName @@ -1161,13 +1161,13 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const Any& void ODatabaseMetaDataResultSet::openVersionColumns(const Any& catalog, const OUString& schema, const OUString& table) throw(SQLException, RuntimeException) { - openSpecialColumns(sal_True,catalog,schema,table,SQL_SCOPE_TRANSACTION,sal_False); + openSpecialColumns(true,catalog,schema,table,SQL_SCOPE_TRANSACTION,false); } void ODatabaseMetaDataResultSet::openBestRowIdentifier( const Any& catalog, const OUString& schema, - const OUString& table,sal_Int32 scope,sal_Bool nullable ) throw(SQLException, RuntimeException) + const OUString& table,sal_Int32 scope,bool nullable ) throw(SQLException, RuntimeException) { - openSpecialColumns(sal_False,catalog,schema,table,scope,nullable); + openSpecialColumns(false,catalog,schema,table,scope,nullable); } void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const OUString* schema, @@ -1273,7 +1273,7 @@ void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog, const O } void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const OUString& schema, - const OUString& table,sal_Bool unique,sal_Bool approximate ) + const OUString& table, bool unique, bool approximate ) throw(SQLException, RuntimeException) { const OUString *pSchemaPat = NULL; @@ -1299,7 +1299,7 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const OUStri (SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 , (SDB_ODBC_CHAR *) pPKN, SQL_NTS, unique ? SQL_INDEX_UNIQUE : SQL_INDEX_ALL, - approximate); + approximate ? 1 : 0); OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); checkColumnCount(); } diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 4dea825c7b4a..33094290490c 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -79,17 +79,17 @@ T3SQLFreeHandle pODBC3SQLFreeHandle; T3SQLGetCursorName pODBC3SQLGetCursorName; T3SQLNativeSql pODBC3SQLNativeSql; -sal_Bool LoadFunctions(oslModule pODBCso); +bool LoadFunctions(oslModule pODBCso); // Take care of Dynamicly loading of the DLL/shared lib and Addresses: // Returns sal_True at success -sal_Bool LoadLibrary_ODBC3(OUString &_rPath) +bool LoadLibrary_ODBC3(OUString &_rPath) { - static sal_Bool bLoaded = sal_False; + static bool bLoaded = false; static oslModule pODBCso = NULL; if (bLoaded) - return sal_True; + return true; #ifdef WNT _rPath = "ODBC32.DLL"; #endif @@ -107,125 +107,125 @@ sal_Bool LoadLibrary_ODBC3(OUString &_rPath) if ( !pODBCso ) pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW ); if( !pODBCso) - return sal_False; + return false; return bLoaded = LoadFunctions(pODBCso); } -sal_Bool LoadFunctions(oslModule pODBCso) +bool LoadFunctions(oslModule pODBCso) { if( ( pODBC3SQLAllocHandle = (T3SQLAllocHandle)osl_getFunctionSymbol(pODBCso, OUString("SQLAllocHandle").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLConnect = (T3SQLConnect)osl_getFunctionSymbol(pODBCso, OUString("SQLConnect").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLDriverConnect = (T3SQLDriverConnect)osl_getFunctionSymbol(pODBCso, OUString("SQLDriverConnect").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLBrowseConnect = (T3SQLBrowseConnect)osl_getFunctionSymbol(pODBCso, OUString("SQLBrowseConnect").pData )) == NULL ) - return sal_False; + return false; if(( pODBC3SQLDataSources = (T3SQLDataSources)osl_getFunctionSymbol(pODBCso, OUString("SQLDataSources").pData )) == NULL ) - return sal_False; + return false; if(( pODBC3SQLDrivers = (T3SQLDrivers)osl_getFunctionSymbol(pODBCso, OUString("SQLDrivers").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetInfo = (T3SQLGetInfo)osl_getFunctionSymbol(pODBCso, OUString("SQLGetInfo").pData )) == NULL ) - return sal_False; + return false; if(( pODBC3SQLGetFunctions = (T3SQLGetFunctions)osl_getFunctionSymbol(pODBCso, OUString("SQLGetFunctions").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetTypeInfo = (T3SQLGetTypeInfo)osl_getFunctionSymbol(pODBCso, OUString("SQLGetTypeInfo").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLSetConnectAttr = (T3SQLSetConnectAttr)osl_getFunctionSymbol(pODBCso, OUString("SQLSetConnectAttr").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetConnectAttr = (T3SQLGetConnectAttr)osl_getFunctionSymbol(pODBCso, OUString("SQLGetConnectAttr").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLSetEnvAttr = (T3SQLSetEnvAttr)osl_getFunctionSymbol(pODBCso, OUString("SQLSetEnvAttr").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetEnvAttr = (T3SQLGetEnvAttr)osl_getFunctionSymbol(pODBCso, OUString("SQLGetEnvAttr").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLSetStmtAttr = (T3SQLSetStmtAttr)osl_getFunctionSymbol(pODBCso, OUString("SQLSetStmtAttr").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetStmtAttr = (T3SQLGetStmtAttr)osl_getFunctionSymbol(pODBCso, OUString("SQLGetStmtAttr").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLPrepare = (T3SQLPrepare)osl_getFunctionSymbol(pODBCso, OUString("SQLPrepare").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLBindParameter = (T3SQLBindParameter)osl_getFunctionSymbol(pODBCso, OUString("SQLBindParameter").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLSetCursorName = (T3SQLSetCursorName)osl_getFunctionSymbol(pODBCso, OUString("SQLSetCursorName").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLExecute = (T3SQLExecute)osl_getFunctionSymbol(pODBCso, OUString("SQLExecute").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLExecDirect = (T3SQLExecDirect)osl_getFunctionSymbol(pODBCso, OUString("SQLExecDirect").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLDescribeParam = (T3SQLDescribeParam)osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeParam").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLNumParams = (T3SQLNumParams)osl_getFunctionSymbol(pODBCso, OUString("SQLNumParams").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLParamData = (T3SQLParamData)osl_getFunctionSymbol(pODBCso, OUString("SQLParamData").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLPutData = (T3SQLPutData)osl_getFunctionSymbol(pODBCso, OUString("SQLPutData").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLRowCount = (T3SQLRowCount)osl_getFunctionSymbol(pODBCso, OUString("SQLRowCount").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLNumResultCols = (T3SQLNumResultCols)osl_getFunctionSymbol(pODBCso, OUString("SQLNumResultCols").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLDescribeCol = (T3SQLDescribeCol)osl_getFunctionSymbol(pODBCso, OUString("SQLDescribeCol").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLColAttribute = (T3SQLColAttribute)osl_getFunctionSymbol(pODBCso, OUString("SQLColAttribute").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLBindCol = (T3SQLBindCol)osl_getFunctionSymbol(pODBCso, OUString("SQLBindCol").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLFetch = (T3SQLFetch)osl_getFunctionSymbol(pODBCso, OUString("SQLFetch").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLFetchScroll = (T3SQLFetchScroll)osl_getFunctionSymbol(pODBCso, OUString("SQLFetchScroll").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetData = (T3SQLGetData)osl_getFunctionSymbol(pODBCso, OUString("SQLGetData").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLSetPos = (T3SQLSetPos)osl_getFunctionSymbol(pODBCso, OUString("SQLSetPos").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLBulkOperations = (T3SQLBulkOperations)osl_getFunctionSymbol(pODBCso, OUString("SQLBulkOperations").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLMoreResults = (T3SQLMoreResults)osl_getFunctionSymbol(pODBCso, OUString("SQLMoreResults").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetDiagRec = (T3SQLGetDiagRec)osl_getFunctionSymbol(pODBCso, OUString("SQLGetDiagRec").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLColumnPrivileges = (T3SQLColumnPrivileges)osl_getFunctionSymbol(pODBCso, OUString("SQLColumnPrivileges").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLColumns = (T3SQLColumns)osl_getFunctionSymbol(pODBCso, OUString("SQLColumns").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLForeignKeys = (T3SQLForeignKeys)osl_getFunctionSymbol(pODBCso, OUString("SQLForeignKeys").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLPrimaryKeys = (T3SQLPrimaryKeys)osl_getFunctionSymbol(pODBCso, OUString("SQLPrimaryKeys").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLProcedureColumns = (T3SQLProcedureColumns)osl_getFunctionSymbol(pODBCso, OUString("SQLProcedureColumns").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLProcedures = (T3SQLProcedures)osl_getFunctionSymbol(pODBCso, OUString("SQLProcedures").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLSpecialColumns = (T3SQLSpecialColumns)osl_getFunctionSymbol(pODBCso, OUString("SQLSpecialColumns").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLStatistics = (T3SQLStatistics)osl_getFunctionSymbol(pODBCso, OUString("SQLStatistics").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLTablePrivileges = (T3SQLTablePrivileges)osl_getFunctionSymbol(pODBCso, OUString("SQLTablePrivileges").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLTables = (T3SQLTables)osl_getFunctionSymbol(pODBCso, OUString("SQLTables").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLFreeStmt = (T3SQLFreeStmt)osl_getFunctionSymbol(pODBCso, OUString("SQLFreeStmt").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLCloseCursor = (T3SQLCloseCursor)osl_getFunctionSymbol(pODBCso, OUString("SQLCloseCursor").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLCancel = (T3SQLCancel)osl_getFunctionSymbol(pODBCso, OUString("SQLCancel").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLEndTran = (T3SQLEndTran)osl_getFunctionSymbol(pODBCso, OUString("SQLEndTran").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLDisconnect = (T3SQLDisconnect)osl_getFunctionSymbol(pODBCso, OUString("SQLDisconnect").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLFreeHandle = (T3SQLFreeHandle)osl_getFunctionSymbol(pODBCso, OUString("SQLFreeHandle").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLGetCursorName = (T3SQLGetCursorName)osl_getFunctionSymbol(pODBCso, OUString("SQLGetCursorName").pData )) == NULL ) - return sal_False; + return false; if( ( pODBC3SQLNativeSql = (T3SQLNativeSql)osl_getFunctionSymbol(pODBCso, OUString("SQLNativeSql").pData )) == NULL ) - return sal_False; + return false; - return sal_True; + return true; } diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index 7a604db27e2a..70bfc7723bdf 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -68,7 +68,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString :OStatement_BASE2(_pConnection) ,numParams(0) ,boundParams(NULL) - ,m_bPrepared(sal_False) + ,m_bPrepared(false) { m_sSqlStatement = sql; try @@ -159,7 +159,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc checkDisposed(OStatement_BASE::rBHelper.bDisposed); - sal_Bool needData = sal_False; + bool needData = false; // Reset warnings @@ -195,7 +195,7 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc // more data required if ( !paramIndex || ( *paramIndex == -1 ) ) - needData = sal_False; + needData = false; else { // Now we have the proper parameter @@ -267,7 +267,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE prepareStatement(); if (execute()) - rs = getResultSet(sal_False); + rs = getResultSet(false); else { // No ResultSet was produced. Raise an exception @@ -920,7 +920,7 @@ void OPreparedStatement::prepareStatement() OString aSql(OUStringToOString(m_sSqlStatement,getOwnConnection()->getTextEncoding())); SQLRETURN nReturn = N3SQLPrepare(m_aStatementHandle,(SDB_ODBC_CHAR *) aSql.getStr(),aSql.getLength()); OTools::ThrowException(m_pConnection,nReturn,m_aStatementHandle,SQL_HANDLE_STMT,*this); - m_bPrepared = sal_True; + m_bPrepared = true; initBoundParam(); } } diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index 30d7bfd0699a..c94534be7088 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx @@ -25,7 +25,7 @@ namespace connectivity { - sal_Bool LoadLibrary_ODBC3(OUString &_rPath); + bool LoadLibrary_ODBC3(OUString &_rPath); // extern declaration of the function pointer extern T3SQLAllocHandle pODBC3SQLAllocHandle; extern T3SQLConnect pODBC3SQLConnect; diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index c2394d0d1ff3..d729b2470963 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -87,7 +87,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) - ,m_bFetchDataInOrder(sal_True) + ,m_bFetchDataInOrder(true) ,m_aStatementHandle(_pStatementHandle) ,m_aConnectionHandle(pStmt->getConnectionHandle()) ,m_pStatement(pStmt) @@ -99,14 +99,14 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : ,m_nRowPos(0) ,m_nUseBookmarks(ODBC_SQL_NOT_DEFINED) ,m_nCurrentFetchState(0) - ,m_bWasNull(sal_True) - ,m_bEOF(sal_True) - ,m_bLastRecord(sal_False) - ,m_bFreeHandle(sal_False) - ,m_bInserting(sal_False) - ,m_bRowInserted(sal_False) - ,m_bRowDeleted(sal_False) - ,m_bUseFetchScroll(sal_False) + ,m_bWasNull(true) + ,m_bEOF(true) + ,m_bLastRecord(false) + ,m_bFreeHandle(false) + ,m_bInserting(false) + ,m_bRowInserted(false) + ,m_bRowDeleted(false) + ,m_bUseFetchScroll(false) { osl_atomic_increment( &m_refCount ); try @@ -121,7 +121,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : try { nCurType = getStmtOption(SQL_ATTR_CURSOR_TYPE); - SQLUINTEGER nValueLen = m_pStatement->getCursorProperties(nCurType,sal_False); + SQLUINTEGER nValueLen = m_pStatement->getCursorProperties(nCurType,false); if( (nValueLen & SQL_CA2_SENSITIVITY_DELETIONS) != SQL_CA2_SENSITIVITY_DELETIONS || (nValueLen & SQL_CA2_CRC_EXACT) != SQL_CA2_CRC_EXACT) m_pSkipDeletedSet = new OSkipDeletedSet(this); @@ -147,7 +147,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : } catch(const Exception&) { - m_bFetchDataInOrder = sal_True; + m_bFetchDataInOrder = true; } try { @@ -163,7 +163,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : } catch(const Exception&) { - m_bUseFetchScroll = sal_False; + m_bUseFetchScroll = false; } osl_atomic_decrement( &m_refCount ); @@ -197,7 +197,7 @@ void OResultSet::disposing(void) m_xMetaData.clear(); } -SQLRETURN OResultSet::unbind(sal_Bool _bUnbindHandle) +SQLRETURN OResultSet::unbind(bool _bUnbindHandle) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::unbind" ); SQLRETURN nRet = 0; @@ -354,7 +354,7 @@ void OResultSet::allocBuffer() void OResultSet::releaseBuffer() { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::releaseBuffer" ); - unbind(sal_False); + unbind(false); m_aLengthVector.clear(); } @@ -457,7 +457,7 @@ template < typename T > T OResultSet::impl_getValue( const sal_Int32 _nColumnInd } // this function exists for the implicit conversion to sal_Bool (compared to a direct call to impl_getValue) -sal_Bool OResultSet::impl_getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) +bool OResultSet::impl_getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return impl_getValue(columnIndex, SQL_C_BIT); } @@ -724,7 +724,7 @@ void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException, st if(last()) next(); - m_bEOF = sal_True; + m_bEOF = true; } @@ -742,32 +742,32 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException, std::e sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::first" ); - return moveImpl(IResultSetHelper::FIRST,0,sal_True); + return moveImpl(IResultSetHelper::FIRST,0,true); } sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::last" ); - return moveImpl(IResultSetHelper::LAST,0,sal_True); + return moveImpl(IResultSetHelper::LAST,0,true); } sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::absolute" ); - return moveImpl(IResultSetHelper::ABSOLUTE,row,sal_True); + return moveImpl(IResultSetHelper::ABSOLUTE,row,true); } sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::relative" ); - return moveImpl(IResultSetHelper::RELATIVE,row,sal_True); + return moveImpl(IResultSetHelper::RELATIVE,row,true); } sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::previous" ); - return moveImpl(IResultSetHelper::PRIOR,0,sal_True); + return moveImpl(IResultSetHelper::PRIOR,0,true); } Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException, std::exception) @@ -784,8 +784,8 @@ sal_Bool SAL_CALL OResultSet::rowDeleted() throw(SQLException, RuntimeException, ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - sal_Bool bRet = m_bRowDeleted; - m_bRowDeleted = sal_False; + bool bRet = m_bRowDeleted; + m_bRowDeleted = false; return bRet; } @@ -796,8 +796,8 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - sal_Bool bInserted = m_bRowInserted; - m_bRowInserted = sal_False; + bool bInserted = m_bRowInserted; + m_bRowInserted = false; return bInserted; } @@ -816,7 +816,7 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::next" ); - return moveImpl(IResultSetHelper::NEXT,1,sal_True); + return moveImpl(IResultSetHelper::NEXT,1,true); } @@ -867,7 +867,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException, st &nRealLen ); - sal_Bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) ); + bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) ); if ( bPositionByBookmark ) { nRet = N3SQLBulkOperations( m_aStatementHandle, SQL_ADD ); @@ -921,7 +921,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException, st m_aPosToBookmarks[aBookmark] = nRowPos; } } - m_bRowInserted = sal_True; + m_bRowInserted = true; } @@ -935,7 +935,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException, st try { - sal_Bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) ); + bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) ); if ( bPositionByBookmark ) { getBookmark(); @@ -1019,7 +1019,7 @@ void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeExcepti // 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); - m_bInserting = sal_True; + m_bInserting = true; } @@ -1374,10 +1374,10 @@ OUString OResultSet::getCursorName() const return OUString::createFromAscii((const char*)pName); } -sal_Bool OResultSet::isBookmarkable() const +bool OResultSet::isBookmarkable() const { if(!m_aConnectionHandle) - return sal_False; + return false; const SQLULEN nCursorType = getStmtOption(SQL_ATTR_CURSOR_TYPE); @@ -1387,7 +1387,7 @@ sal_Bool OResultSet::isBookmarkable() const switch(nCursorType) { case SQL_CURSOR_FORWARD_ONLY: - return sal_False; + return false; case SQL_CURSOR_STATIC: OTools::GetInfo(m_pStatement->getOwnConnection(),m_aConnectionHandle,SQL_STATIC_CURSOR_ATTRIBUTES1,nAttr,NULL); break; @@ -1401,7 +1401,7 @@ sal_Bool OResultSet::isBookmarkable() const } catch(const Exception&) { - return sal_False; + return false; } if ( m_nUseBookmarks == ODBC_SQL_NOT_DEFINED ) @@ -1671,7 +1671,7 @@ void SAL_CALL OResultSet::release() throw() return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool /*_bRetrieveData*/) +bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool /*_bRetrieveData*/) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OResultSet::move" ); SQLSMALLINT nFetchOrientation = SQL_FETCH_NEXT; @@ -1706,10 +1706,10 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 } SAL_WARN( "connectivity.drivers","Bookmark not found!"); } - return sal_False; + return false; } - m_bEOF = sal_False; + m_bEOF = false; invalidateCache(); SQLRETURN nOldFetchStatus = m_nCurrentFetchState; @@ -1739,7 +1739,7 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 m_nRowPos = 1; break; case IResultSetHelper::LAST: - m_bEOF = sal_True; + m_bEOF = true; break; case IResultSetHelper::RELATIVE: m_nRowPos += _nOffset; @@ -1784,17 +1784,17 @@ sal_Int32 OResultSet::getDriverPos() const return nValue ? nValue : m_nRowPos; } -sal_Bool OResultSet::deletedVisible() const +bool OResultSet::deletedVisible() const { - return sal_False; + return false; } -sal_Bool OResultSet::isRowDeleted() const +bool OResultSet::isRowDeleted() const { return m_pRowStatusArray[0] == SQL_ROW_DELETED; } -sal_Bool OResultSet::moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) +bool OResultSet::moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx index 832c4d3f025e..44c99e6c3f5d 100644 --- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx @@ -145,7 +145,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(S } catch(SQLException& ) // in this case we have an odbc 2.0 driver { - m_bUseODBC2Types = sal_True; + m_bUseODBC2Types = true; nType = OTools::MapOdbcType2Jdbc(getNumColAttrib(column,SQL_DESC_CONCISE_TYPE )); } } @@ -245,7 +245,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQ } catch(const SQLException& ) // in this case we have an odbc 2.0 driver { - m_bUseODBC2Types = sal_True; + m_bUseODBC2Types = true; nType = getNumColAttrib(column,SQL_COLUMN_PRECISION ); } return nType; @@ -261,7 +261,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com: } catch(const SQLException& ) // in this case we have an odbc 2.0 driver { - m_bUseODBC2Types = sal_True; + m_bUseODBC2Types = true; nType = getNumColAttrib(column,SQL_COLUMN_SCALE ); } return nType; diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx index b929882ef859..84971de8c525 100644 --- a/connectivity/source/drivers/odbc/OStatement.cxx +++ b/connectivity/source/drivers/odbc/OStatement.cxx @@ -258,9 +258,9 @@ SQLLEN OStatement_Base::getRowCount () throw( SQLException) // true if the concurrency has been changed -sal_Bool OStatement_Base::lockIfNecessary (const OUString& sql) throw( SQLException) +bool OStatement_Base::lockIfNecessary (const OUString& sql) throw( SQLException) { - sal_Bool rc = sal_False; + bool rc = false; // First, convert the statement to upper case @@ -286,7 +286,7 @@ sal_Bool OStatement_Base::lockIfNecessary (const OUString& sql) throw( SQLExcept // Catch any warnings and place on the warning stack setWarning (warn); } - rc = sal_True; + rc = true; } return rc; @@ -338,7 +338,7 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLExcep OString aSql(OUStringToOString(sql,getOwnConnection()->getTextEncoding())); - sal_Bool hasResultSet = sal_False; + bool hasResultSet = false; SQLWarning aWarning; // Reset the statement handle and warning @@ -370,7 +370,7 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLExcep if (getColumnCount () > 0) { - hasResultSet = sal_True; + hasResultSet = true; } return hasResultSet; @@ -380,7 +380,7 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& sql ) throw(SQLExcep // getResultSet returns the current result as a ResultSet. It // returns NULL if the current result is not a ResultSet. -Reference< XResultSet > OStatement_Base::getResultSet (sal_Bool checkCount) throw( SQLException) +Reference< XResultSet > OStatement_Base::getResultSet (bool checkCount) throw( SQLException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); @@ -452,7 +452,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString& if (execute (sql)) { - xRS = getResultSet (sal_False); + xRS = getResultSet (false); m_xResultSet = xRS; } else @@ -557,7 +557,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( ) throw(SQLExce checkDisposed(OStatement_BASE::rBHelper.bDisposed); - m_xResultSet = getResultSet(sal_True); + m_xResultSet = getResultSet(true); return m_xResultSet; } @@ -587,7 +587,7 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, Runtim SQLWarning warning; - sal_Bool hasResultSet = sal_False; + bool hasResultSet = false; // clear previous warnings @@ -618,7 +618,7 @@ sal_Bool SAL_CALL OStatement_Base::getMoreResults( ) throw(SQLException, Runtim // result set. if (getColumnCount () == 0) - hasResultSet = sal_False; + hasResultSet = false; } // Set the warning for the statement, if one was generated @@ -765,7 +765,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); setStmtOption(SQL_ATTR_ROW_BIND_TYPE, SQL_BIND_BY_COLUMN); - sal_Bool bUseBookmark = isUsingBookmarks(); + bool bUseBookmark = isUsingBookmarks(); SQLULEN nSet( SQL_UNSPECIFIED ); switch(_par0) { @@ -779,12 +779,12 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) case ResultSetType::SCROLL_SENSITIVE: if(bUseBookmark) { - SQLUINTEGER nCurProp = getCursorProperties(SQL_CURSOR_DYNAMIC,sal_True); + SQLUINTEGER nCurProp = getCursorProperties(SQL_CURSOR_DYNAMIC,true); if((nCurProp & SQL_CA1_BOOKMARK) != SQL_CA1_BOOKMARK) // check if bookmark for this type isn't supported { // we have to test the next one - nCurProp = getCursorProperties(SQL_CURSOR_KEYSET_DRIVEN,sal_True); - sal_Bool bNotBookmarks = ((nCurProp & SQL_CA1_BOOKMARK) != SQL_CA1_BOOKMARK); - nCurProp = getCursorProperties(SQL_CURSOR_KEYSET_DRIVEN,sal_False); + nCurProp = getCursorProperties(SQL_CURSOR_KEYSET_DRIVEN,true); + bool bNotBookmarks = ((nCurProp & SQL_CA1_BOOKMARK) != SQL_CA1_BOOKMARK); + nCurProp = getCursorProperties(SQL_CURSOR_KEYSET_DRIVEN,false); nSet = SQL_CURSOR_KEYSET_DRIVEN; if( bNotBookmarks || ((nCurProp & SQL_CA2_SENSITIVITY_DELETIONS) != SQL_CA2_SENSITIVITY_DELETIONS) || @@ -815,7 +815,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0) setStmtOption(SQL_ATTR_CURSOR_SENSITIVITY, nSet); } -void OStatement_Base::setEscapeProcessing( const sal_Bool _bEscapeProc ) +void OStatement_Base::setEscapeProcessing( const bool _bEscapeProc ) { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); SQLULEN nEscapeProc( _bEscapeProc ? SQL_NOSCAN_OFF : SQL_NOSCAN_ON ); @@ -864,13 +864,13 @@ void OStatement_Base::setCursorName(const OUString &_par0) N3SQLSetCursorName(m_aStatementHandle,(SDB_ODBC_CHAR*)aName.getStr(),(SQLSMALLINT)aName.getLength()); } -sal_Bool OStatement_Base::isUsingBookmarks() const +bool OStatement_Base::isUsingBookmarks() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); return SQL_UB_OFF != getStmtOption(SQL_ATTR_USE_BOOKMARKS, SQL_UB_OFF); } -sal_Bool OStatement_Base::getEscapeProcessing() const +bool OStatement_Base::getEscapeProcessing() const { OSL_ENSURE( m_aStatementHandle, "StatementHandle is null!" ); return SQL_NOSCAN_OFF == getStmtOption(SQL_ATTR_USE_BOOKMARKS, SQL_NOSCAN_OFF);; @@ -915,7 +915,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue( const Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException) { - sal_Bool bConverted = sal_False; + bool bConverted = false; try { switch(nHandle) @@ -1088,7 +1088,7 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OStatement_Base: return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper()); } -SQLUINTEGER OStatement_Base::getCursorProperties(SQLINTEGER _nCursorType,sal_Bool bFirst) +SQLUINTEGER OStatement_Base::getCursorProperties(SQLINTEGER _nCursorType, bool bFirst) { SQLUINTEGER nValueLen = 0; try diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx index 03663f77aeb8..b3691ea3d8ec 100644 --- a/connectivity/source/drivers/odbc/OTools.cxx +++ b/connectivity/source/drivers/odbc/OTools.cxx @@ -115,7 +115,7 @@ void OTools::getValue( OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _nType, - sal_Bool &_bWasNull, + bool &_bWasNull, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, void* _pValue, SQLLEN _nSize) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) @@ -146,7 +146,7 @@ void OTools::getValue( OConnection* _pConnection, _pValue, _nSize, &pcbValue), - _aStatementHandle,SQL_HANDLE_STMT,_xInterface,sal_False); + _aStatementHandle,SQL_HANDLE_STMT,_xInterface,false); _bWasNull = pcbValue == SQL_NULL_DATA; } @@ -160,7 +160,7 @@ void OTools::bindValue( OConnection* _pConnection, SQLLEN * const pLen, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, rtl_TextEncoding _nTextEncoding, - sal_Bool _bUseOldTimeDate) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) + bool _bUseOldTimeDate) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::bindValue" ); SQLRETURN nRetcode; @@ -168,7 +168,7 @@ void OTools::bindValue( OConnection* _pConnection, SQLSMALLINT fCType; SQLLEN nMaxLen = _nMaxLen; - OTools::getBindTypes( sal_False, + OTools::getBindTypes( false, _bUseOldTimeDate, _nType, fCType, @@ -295,7 +295,7 @@ void OTools::ThrowException(const OConnection* _pConnection, const SQLHANDLE _pContext, const SQLSMALLINT _nHandleType, const Reference< XInterface >& _xInterface, - const sal_Bool _bNoFound, + const bool _bNoFound, const rtl_TextEncoding _nTextEncoding) throw(SQLException) { switch(_rRetCode) @@ -354,7 +354,7 @@ Sequence OTools::getBytesValue(const OConnection* _pConnection, const SQLHANDLE _aStatementHandle, const sal_Int32 columnIndex, const SQLSMALLINT _fSqlType, - sal_Bool &_bWasNull, + bool &_bWasNull, const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::getBytesValue" ); @@ -407,7 +407,7 @@ OUString OTools::getStringValue(OConnection* _pConnection, SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _fSqlType, - sal_Bool &_bWasNull, + bool &_bWasNull, const Reference< XInterface >& _xInterface, rtl_TextEncoding _nTextEncoding) throw(SQLException, RuntimeException) { @@ -575,7 +575,7 @@ void OTools::GetInfo(OConnection* _pConnection, void OTools::GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, - sal_Bool &_rValue, + bool &_rValue, const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException) { SQLSMALLINT nValueLen; @@ -693,8 +693,8 @@ SQLSMALLINT OTools::jdbcTypeToOdbc(sal_Int32 jdbcType) return odbcType; } -void OTools::getBindTypes(sal_Bool _bUseWChar, - sal_Bool _bUseOldTimeDate, +void OTools::getBindTypes(bool _bUseWChar, + bool _bUseOldTimeDate, SQLSMALLINT _nOdbcType, SQLSMALLINT& fCType, SQLSMALLINT& fSqlType diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx index aa19997fc71a..25b3e3a9e2db 100644 --- a/connectivity/source/drivers/odbc/oservices.cxx +++ b/connectivity/source/drivers/odbc/oservices.cxx @@ -53,7 +53,7 @@ struct ProviderRequest } inline - sal_Bool CREATE_PROVIDER( + bool CREATE_PROVIDER( const OUString& Implname, const Sequence< OUString > & Services, ::cppu::ComponentInstantiation Factory, diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index 1d8ac87a1c26..e6fb435d077d 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -283,7 +283,7 @@ sal_Bool BaseResultSet::first( ) throw (SQLException, RuntimeException, std::ex { MutexGuard guard( m_refMutex->mutex ); checkClosed(); - sal_Bool bRet = ( m_rowCount > 0 ); + bool bRet = ( m_rowCount > 0 ); if( bRet ) m_row = 0; return bRet; @@ -293,7 +293,7 @@ sal_Bool BaseResultSet::last( ) throw (SQLException, RuntimeException, std::exc { MutexGuard guard( m_refMutex->mutex ); checkClosed(); - sal_Bool bRet = ( m_rowCount > 0 ); + bool bRet = ( m_rowCount > 0 ); if( bRet ) m_row = m_rowCount -1; return bRet; @@ -342,7 +342,7 @@ sal_Bool BaseResultSet::previous( ) throw (SQLException, RuntimeException, std: { MutexGuard guard( m_refMutex->mutex ); checkClosed(); - sal_Bool bRet = ( m_row != -1 ); + bool bRet = ( m_row != -1 ); if( bRet ) m_row --; return bRet; @@ -604,7 +604,7 @@ sal_Bool BaseResultSet::convertFastPropertyValue( Any & /* rConvertedValue */, Any & /* rOldValue */, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException) { - sal_Bool bRet; + bool bRet; switch( nHandle ) { case BASERESULTSET_CURSOR_NAME: @@ -617,7 +617,7 @@ sal_Bool BaseResultSet::convertFastPropertyValue( case BASERESULTSET_ESCAPE_PROCESSING: case BASERESULTSET_IS_BOOKMARKABLE: { - sal_Bool val; + bool val; bRet = ( rValue >>= val ); m_props[nHandle] = makeAny( val ); break; diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx index 2c60de222036..12ab1aede0b1 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx @@ -75,7 +75,7 @@ protected: sal_Int32 m_row; sal_Int32 m_rowCount; sal_Int32 m_fieldCount; - sal_Bool m_wasNull; + bool m_wasNull; public: inline cppu::OBroadcastHelper & getRBHelper() { return OComponentHelper::rBHelper;} diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx index c3736d516cea..ffa2c5517e4a 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.hxx +++ b/connectivity/source/drivers/postgresql/pq_connection.hxx @@ -107,7 +107,7 @@ struct ConnectionSettings maxIndexKeys(0), pTablesImpl(0), pViewsImpl(0), - showSystemColumns( sal_False ), + showSystemColumns( false ), logFile( 0 ), loglevel( LogLevel::INFO ) {} @@ -123,7 +123,7 @@ struct ConnectionSettings Views *pViewsImpl; // needed to implement renaming of tables / views OUString user; OUString catalog; - sal_Bool showSystemColumns; + bool showSystemColumns; FILE *logFile; sal_Int32 loglevel; }; diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index ac194d48a9c0..78f02e106fdb 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -2471,7 +2471,7 @@ static sal_Int32 seqContains( const Sequence< sal_Int32 > &seq, sal_Int32 value OUString currentTable = xRow->getString( C_TABLENAME ); OUString currentIndexName = xRow->getString( C_INDEXNAME ); sal_Bool isNonUnique = ! xRow->getBoolean( C_IS_UNIQUE ); - sal_Bool isPrimary = xRow->getBoolean( C_IS_PRIMARY ); + bool isPrimary = xRow->getBoolean( C_IS_PRIMARY ); (void)isPrimary; sal_Int32 indexType = xRow->getBoolean( C_IS_CLUSTERED ) ? com::sun::star::sdbc::IndexType::CLUSTERED : diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 7269c3ca6999..bfb50101a1d6 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -766,7 +766,7 @@ sal_Bool PreparedStatement::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException) { - sal_Bool bRet; + bool bRet; rOldValue = m_props[nHandle]; switch( nHandle ) { @@ -779,7 +779,7 @@ sal_Bool PreparedStatement::convertFastPropertyValue( } case PREPARED_STATEMENT_ESCAPE_PROCESSING: { - sal_Bool val; + bool val; bRet = ( rValue >>= val ); rConvertedValue = makeAny( val ); break; diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx index b2be7c4f8c2e..56886677c7c8 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx @@ -84,7 +84,7 @@ private: ::rtl::Reference< RefCountedMutex > m_refMutex; OStringVector m_vars; OStringVector m_splittedStatement; - sal_Bool m_multipleResultAvailable; + bool m_multipleResultAvailable; sal_Int32 m_multipleResultUpdateCount; sal_Int32 m_lastOidInserted; OUString m_lastTableInserted; diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx index f041721117bf..1e57850187d0 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx @@ -242,9 +242,9 @@ sal_Int32 ResultSetMetaData::getIntColumnProperty( const OUString & name, int in return ret; } -sal_Bool ResultSetMetaData::getBoolColumnProperty( const OUString & name, int index, sal_Bool def ) +bool ResultSetMetaData::getBoolColumnProperty( const OUString & name, int index, bool def ) { - sal_Bool ret = def; + bool ret = def; try { MutexGuard guard( m_refMutex->mutex ); @@ -293,7 +293,7 @@ sal_Bool ResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw (SQLException, RuntimeException, std::exception) { - sal_Bool ret = getBoolColumnProperty( getStatics().IS_AUTO_INCREMENT, column, sal_False ); + bool ret = getBoolColumnProperty( getStatics().IS_AUTO_INCREMENT, column, false ); return ret; } @@ -312,7 +312,7 @@ sal_Bool ResultSetMetaData::isSearchable( sal_Int32 column ) throw (SQLException sal_Bool ResultSetMetaData::isCurrency( sal_Int32 column ) throw (SQLException, RuntimeException, std::exception) { - return getBoolColumnProperty( getStatics().IS_CURRENCY, column, sal_False ); + return getBoolColumnProperty( getStatics().IS_CURRENCY, column, false ); } sal_Int32 ResultSetMetaData::isNullable( sal_Int32 column ) diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx index a784637b2c1b..bfecaf8853ef 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx @@ -90,7 +90,7 @@ class ResultSetMetaData : com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > getColumnByIndex( int index ); sal_Int32 getIntColumnProperty( const OUString & name, int index, int def ); - sal_Bool getBoolColumnProperty( const OUString & name, int index, sal_Bool def ); + bool getBoolColumnProperty( const OUString & name, int index, bool def ); public: ResultSetMetaData( diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx index eb67bbf83b03..dc34aa715e59 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx @@ -94,7 +94,7 @@ sal_Int32 SequenceResultSetMetaData::isNullable( sal_Int32 column ) throw (SQLException, RuntimeException, std::exception) { checkColumnIndex( column ); - return m_columnData[column-1].isNullable; + return m_columnData[column-1].isNullable ? 1 : 0; } sal_Bool SequenceResultSetMetaData::isSigned( sal_Int32 /* column */ ) diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 2a1d9a33bd20..14a781755160 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -467,13 +467,13 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data ) *(data->pLastTableInserted) = OUString(); *(data->pLastQuery) = cmd; - sal_Bool ret = sal_False; + bool ret = false; switch( state ) { case PGRES_COMMAND_OK: { *(data->pMultipleResultUpdateCount) = atoi( PQcmdTuples( result ) ); - *(data->pMultipleResultAvailable) = sal_False; + *(data->pMultipleResultAvailable) = false; // in case an oid value is available, we retrieve it *(data->pLastOidInserted) = PQoidValue( result ); @@ -623,8 +623,8 @@ bool executePostgresCommand( const OString & cmd, struct CommandData *data ) new ResultSet( data->refMutex, data->owner, data->ppSettings,result, schema, table ) ); - *(data->pMultipleResultAvailable) = sal_True; - ret = sal_True; + *(data->pMultipleResultAvailable) = true; + ret = true; if( isLog( pSettings, LogLevel::SQL ) ) { OStringBuffer buf( 128 ); @@ -922,7 +922,7 @@ sal_Bool Statement::convertFastPropertyValue( throw (IllegalArgumentException) { rOldValue = m_props[nHandle]; - sal_Bool bRet; + bool bRet; switch( nHandle ) { case STATEMENT_CURSOR_NAME: @@ -934,7 +934,7 @@ sal_Bool Statement::convertFastPropertyValue( } case STATEMENT_ESCAPE_PROCESSING: { - sal_Bool val; + bool val; bRet = ( rValue >>= val ); rConvertedValue = makeAny( val ); break; diff --git a/connectivity/source/drivers/postgresql/pq_statement.hxx b/connectivity/source/drivers/postgresql/pq_statement.hxx index 089ff1acc6a2..78d6d5a1b059 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.hxx +++ b/connectivity/source/drivers/postgresql/pq_statement.hxx @@ -76,7 +76,7 @@ private: ConnectionSettings *m_pSettings; com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > m_lastResultset; ::rtl::Reference< RefCountedMutex > m_refMutex; - sal_Bool m_multipleResultAvailable; + bool m_multipleResultAvailable; sal_Int32 m_multipleResultUpdateCount; sal_Int32 m_lastOidInserted; OUString m_lastTableInserted; @@ -183,7 +183,7 @@ struct CommandData ConnectionSettings **ppSettings; sal_Int32 *pLastOidInserted; sal_Int32 *pMultipleResultUpdateCount; - sal_Bool *pMultipleResultAvailable; + bool *pMultipleResultAvailable; OUString *pLastTableInserted; ::com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > *pLastResultset; OString *pLastQuery; diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx index 8ef277d82194..0b6a15ca1d92 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.cxx +++ b/connectivity/source/drivers/postgresql/pq_statics.cxx @@ -61,11 +61,11 @@ struct DefColumnMetaData sal_Int32 type; sal_Int32 precision; sal_Int32 scale; - sal_Bool isCurrency; - sal_Bool isNullable; - sal_Bool isAutoIncrement; - sal_Bool isReadOnly; - sal_Bool isSigned; + bool isCurrency; + bool isNullable; + bool isAutoIncrement; + bool isReadOnly; + bool isSigned; }; struct BaseTypeDef { const char * typeName; sal_Int32 value; }; @@ -681,25 +681,25 @@ Statics & getStatics() // that is what is returned by getTypeInfo().getMetaData() DefColumnMetaData defTypeInfoMetaData[] = { - { "TYPE_NAME", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,0,0,0,0, false }, // 0 - { "DATA_TYPE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,0,0,0,0, true }, // 1 - { "PRECISION", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,0,0,0,0, true }, // 2 - { "LITERAL_PREFIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,0,0,0,0, false }, // 3 - { "LITERAL_SUFFIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,0,0,0,0, false }, // 4 - { "CREATE_PARAMS", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,0,0,0,0, false }, // 5 - { "NULLABLE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,0,0,0,0, true }, // 6 - { "CASE_SENSITIVE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,0,0,0,0, false }, // 7 - { "SEARCHABLE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,0,0,0,0, true }, // 8 - { "UNSIGNED_ATTRIBUTE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,0,0,0,0, false }, // 9 - { "FIXED_PREC_SCALE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,0,0,0,0, false }, // 10 - { "AUTO_INCREMENT", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,0,0,0,0, false }, // 11 - { "LOCAL_TYPE_NAME", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,0,0,0,0, false }, // 12 - { "MINIMUM_SCALE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,0,0,0,0, true}, // 13 - { "MAXIMUM_SCALE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,0,0,0,0, true }, // 14 - { "SQL_DATA_TYPE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,0,0,0,0, true }, // 15 - { "SQL_DATETIME_SUB", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,0,0,0,0 , true}, // 16 - { "NUM_PREC_RADIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,0,0,0,0, true }, // 17 - {0,0,0,0,0,0,0,0,0,0,0, 0} + { "TYPE_NAME", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,false,false,false,false, false }, // 0 + { "DATA_TYPE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,false,false,false,false, true }, // 1 + { "PRECISION", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false, true }, // 2 + { "LITERAL_PREFIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,false,false,false,false, false }, // 3 + { "LITERAL_SUFFIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,false,false,false,false, false }, // 4 + { "CREATE_PARAMS", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,false,false,false,false, false }, // 5 + { "NULLABLE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false, true }, // 6 + { "CASE_SENSITIVE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,false,false,false,false, false }, // 7 + { "SEARCHABLE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,false,false,false,false, true }, // 8 + { "UNSIGNED_ATTRIBUTE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,false,false,false,false, false }, // 9 + { "FIXED_PREC_SCALE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,false,false,false,false, false }, // 10 + { "AUTO_INCREMENT", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::BIT, 0,50,false,false,false,false, false }, // 11 + { "LOCAL_TYPE_NAME", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::VARCHAR, 0,50,false,false,false,false, false }, // 12 + { "MINIMUM_SCALE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,false,false,false,false, true}, // 13 + { "MAXIMUM_SCALE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::SMALLINT, 0,50,false,false,false,false, true }, // 14 + { "SQL_DATA_TYPE", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false, true }, // 15 + { "SQL_DATETIME_SUB", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false , true}, // 16 + { "NUM_PREC_RADIX", "TYPEINFO", "pg_catalog", "", com::sun::star::sdbc::DataType::INTEGER, 0,50,false,false,false,false, true }, // 17 + {0,0,0,0,0,0,0,false,false,false,false, false} }; for( i = 0 ; defTypeInfoMetaData[i].columnName ; i++ ) diff --git a/connectivity/source/drivers/postgresql/pq_statics.hxx b/connectivity/source/drivers/postgresql/pq_statics.hxx index ee6bfde61dbd..e67297363581 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.hxx +++ b/connectivity/source/drivers/postgresql/pq_statics.hxx @@ -61,11 +61,11 @@ struct ColumnMetaData sal_Int32 _type, sal_Int32 _precision, sal_Int32 _scale, - sal_Bool _isCurrency, - sal_Bool _isNullable, - sal_Bool _isAutoIncrement, - sal_Bool _isReadOnly, - sal_Bool _isSigned ) : + bool _isCurrency, + bool _isNullable, + bool _isAutoIncrement, + bool _isReadOnly, + bool _isSigned ) : columnName( _columnName ), tableName( _tableName ), schemaTableName( _schemaTableName ), @@ -87,11 +87,11 @@ struct ColumnMetaData sal_Int32 type; sal_Int32 precision; sal_Int32 scale; - sal_Bool isCurrency; - sal_Bool isNullable; - sal_Bool isAutoIncrement; - sal_Bool isReadOnly; - sal_Bool isSigned; + bool isCurrency; + bool isNullable; + bool isAutoIncrement; + bool isReadOnly; + bool isSigned; }; typedef std::vector< ColumnMetaData, Allocator< ColumnMetaData > > ColumnMetaDataVector; @@ -101,8 +101,8 @@ struct TypeDetails sal_Int32 dataType; sal_Int32 minScale; sal_Int32 maxScale; // in case nothing is given in getTypeInfo - sal_Bool isAutoIncrement; - sal_Bool isSearchable; + bool isAutoIncrement; + bool isSearchable; }; typedef ::boost::unordered_map diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index f95d02aa2978..1a552d6135e7 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -209,10 +209,10 @@ OUString extractStringProperty( return value; } -sal_Bool extractBoolProperty( +bool extractBoolProperty( const Reference< XPropertySet > & descriptor, const OUString &name ) { - sal_Bool value = sal_False; + bool value = false; descriptor->getPropertyValue( name ) >>= value; return value; } @@ -278,7 +278,7 @@ DisposeGuard::~DisposeGuard() TransactionGuard::TransactionGuard( const Reference< XStatement > &stmt ) : m_stmt( stmt ), - m_commited( sal_False ) + m_commited( false ) { m_stmt->executeUpdate( getStatics().BEGIN ); } @@ -286,7 +286,7 @@ TransactionGuard::TransactionGuard( const Reference< XStatement > &stmt ) void TransactionGuard::commit() { m_stmt->executeUpdate( getStatics().COMMIT ); - m_commited = sal_True; + m_commited = true; } void TransactionGuard::executeUpdate( const OUString & sql ) @@ -1153,7 +1153,7 @@ OUString querySingleValue( bool implSetObject( const Reference< XParameters >& _rxParameters, const sal_Int32 _nColumnIndex, const Any& _rValue) { - sal_Bool bSuccessfullyReRouted = sal_True; + bool bSuccessfullyReRouted = true; switch (_rValue.getValueTypeClass()) { case typelib_TypeClass_HYPER: @@ -1207,7 +1207,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, _rxParameters->setBytes(_nColumnIndex, *(Sequence*)_rValue.getValue()); } else - bSuccessfullyReRouted = sal_False; + bSuccessfullyReRouted = false; break; case typelib_TypeClass_STRUCT: if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::DateTime*)0)) @@ -1217,7 +1217,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, else if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::Time*)0)) _rxParameters->setTime(_nColumnIndex, *(com::sun::star::util::Time*)_rValue.getValue()); else - bSuccessfullyReRouted = sal_False; + bSuccessfullyReRouted = false; break; case typelib_TypeClass_INTERFACE: @@ -1232,7 +1232,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, } // run through default: - bSuccessfullyReRouted = sal_False; + bSuccessfullyReRouted = false; } diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx b/connectivity/source/drivers/postgresql/pq_tools.hxx index 23757046d34e..039d4b52cca1 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.hxx +++ b/connectivity/source/drivers/postgresql/pq_tools.hxx @@ -88,7 +88,7 @@ sal_Int32 extractIntProperty( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & descriptor, const OUString &name ); -sal_Bool extractBoolProperty( +bool extractBoolProperty( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & descriptor, const OUString &name ); @@ -155,7 +155,7 @@ public: class TransactionGuard { com::sun::star::uno::Reference< com::sun::star::sdbc::XStatement > m_stmt; - sal_Bool m_commited; + bool m_commited; public: /// takes over ownership of given statemet TransactionGuard( const com::sun::star::uno::Reference< com::sun::star::sdbc::XStatement > &stmt ); diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index accede94c50d..8e8bdc56ce66 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -147,7 +147,7 @@ void IndexColumns::refresh() columnMetaData2SDBCX( pIndexColumn, xRow ); pIndexColumn->setPropertyValue_NoBroadcast_public( - st.IS_ASCENDING , makeAny( (sal_Bool ) sal_False ) ); + st.IS_ASCENDING , makeAny( false ) ); m_values[ index ] = makeAny( prop ); m_name2index[ columnName ] = index; diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index 58ad44d5bca3..32d571249fb3 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -205,7 +205,7 @@ void Indexes::appendByDescriptor( Statics & st = getStatics(); OUString name = extractStringProperty( descriptor, st.NAME ); - sal_Bool isUnique = extractBoolProperty( descriptor, st.IS_UNIQUE ); + bool isUnique = extractBoolProperty( descriptor, st.IS_UNIQUE ); OUStringBuffer buf( 128 ); diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx index 78f9048b4cd1..fc75b13c707a 100644 --- a/connectivity/source/drivers/postgresql/pq_xtables.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx @@ -186,8 +186,8 @@ static void appendColumnList( Reference< XPropertySet > column( xEnum->nextElement(), UNO_QUERY ); OUString name = extractStringProperty( column, st.NAME ); OUString defaultValue = extractStringProperty( column, st.DEFAULT_VALUE ); - sal_Bool isNullable = extractBoolProperty( column, st.IS_NULLABLE ); - sal_Bool isAutoIncrement = extractBoolProperty( column, st.IS_AUTO_INCREMENT ); + bool isNullable = extractBoolProperty( column, st.IS_NULLABLE ); + bool isAutoIncrement = extractBoolProperty( column, st.IS_AUTO_INCREMENT ); bufferQuoteIdentifier( buf, name, settings ); @@ -199,12 +199,12 @@ static void appendColumnList( if( com::sun::star::sdbc::DataType::INTEGER == dataType ) { buf.append( " serial "); - isNullable = sal_False; + isNullable = false; } else if( com::sun::star::sdbc::DataType::BIGINT == dataType ) { buf.append( " serial8 " ); - isNullable = sal_False; + isNullable = false; } else buf.append( type ); -- cgit v1.2.3