diff options
198 files changed, 1494 insertions, 1491 deletions
diff --git a/connectivity/qa/connectivity/mork/DriverTest.cxx b/connectivity/qa/connectivity/mork/DriverTest.cxx index 47023e19a54b..ea0164989481 100644 --- a/connectivity/qa/connectivity/mork/DriverTest.cxx +++ b/connectivity/qa/connectivity/mork/DriverTest.cxx @@ -145,7 +145,7 @@ void MorkDriverTest::test_select_default_all() CPPUNIT_ASSERT_MESSAGE("cannot extract row from result set!", xDelegatorRow.is()); } - sal_Bool result = xResultSet->first(); + bool result = xResultSet->first(); CPPUNIT_ASSERT_MESSAGE("fetch first row failed!", result); OUString mail = xDelegatorRow->getString(1); CPPUNIT_ASSERT_MESSAGE("first row is not john@doe.org!", mail.equalsAscii("john@doe.org")); @@ -182,7 +182,7 @@ void MorkDriverTest::test_select_list_table_joe_doe_5() CPPUNIT_ASSERT_MESSAGE("cannot extract row from result set!", xDelegatorRow.is()); } - sal_Bool result = xResultSet->first(); + bool result = xResultSet->first(); CPPUNIT_ASSERT_MESSAGE("fetch first row failed!", result); OUString mail = xDelegatorRow->getString(1); CPPUNIT_ASSERT_MESSAGE("last row is not john@doe5.org!", mail.equalsAscii("john@doe5.org")); diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index da7d7226b389..f571e8e39db6 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -180,7 +180,7 @@ namespace connectivity namespace dbtools { -sal_Bool isCharOk(sal_Unicode c,const OUString& _rSpecials) +bool isCharOk(sal_Unicode c,const OUString& _rSpecials) { return ( ((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90)) || ((c >= 48) && (c <= 57)) || @@ -224,7 +224,7 @@ OUString convertName2SQLName(const OUString& rName,const OUString& _rSpecials) OUString aNewName(rName); const sal_Unicode* pStr = rName.getStr(); sal_Int32 nLength = rName.getLength(); - sal_Bool bValid(*pStr < 128 && !isdigit(*pStr)); + bool bValid(*pStr < 128 && !isdigit(*pStr)); for (sal_Int32 i=0; bValid && i < nLength; ++pStr,++i ) if(!isCharOk(*pStr,_rSpecials)) { diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index c5669adf33f4..bb44707fa1e3 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -242,7 +242,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, { // Does the String need to be formatted? sal_Int16 nTypeClass = nKeyType & ~NumberFormat::DEFINED; - sal_Bool bTextFormat = nTypeClass == NumberFormat::TEXT; + bool bTextFormat = nTypeClass == NumberFormat::TEXT; sal_Int32 nKeyToUse = bTextFormat ? 0 : nKey; sal_Int16 nRealUsedTypeClass = nTypeClass; // for a Text-Format the formatter needs some more freedom, otherwise @@ -370,7 +370,7 @@ double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const D default: { - sal_Bool bIsSigned = sal_True; + bool bIsSigned = true; OSL_VERIFY( xProp->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ISSIGNED ) ) >>= bIsSigned ); if ( !bIsSigned ) { diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 2802d2cd2407..8598bfccbf88 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -58,8 +58,8 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet() ,m_aStatement(NULL) ,m_xMetaData(NULL) ,m_nColPos(0) - ,m_bBOF(sal_True) - ,m_bEOF(sal_True) + ,m_bBOF(true) + ,m_bEOF(true) { construct(); } @@ -71,8 +71,8 @@ ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet( MetaDataResultSetType _e ,m_aStatement(NULL) ,m_xMetaData(NULL) ,m_nColPos(0) - ,m_bBOF(sal_True) - ,m_bEOF(sal_True) + ,m_bBOF(true) + ,m_bEOF(true) { construct(); @@ -159,7 +159,7 @@ Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(Runtime void ODatabaseMetaDataResultSet::setRows(const ORows& _rRows) { m_aRows = _rRows; - m_bBOF = sal_True; + m_bBOF = true; m_bEOF = m_aRows.empty(); } @@ -451,7 +451,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti if ( m_bBOF ) { m_aRowsIter = m_aRows.begin(); - m_bBOF = sal_False; + m_bBOF = false; } else { @@ -465,7 +465,7 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, Runti bool bSuccess = m_aRowsIter != m_aRows.end(); if ( !bSuccess ) { - m_bEOF = sal_True; + m_bEOF = true; m_bBOF = m_aRows.empty(); } return bSuccess; @@ -777,7 +777,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA { case TypeClass_BOOLEAN: { - sal_Bool bValue = sal_False; + bool bValue = false; *pRowIter >>= bValue; aValue = new ORowSetValueDecorator(ORowSetValue(bValue)); } diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index 55184727eb56..c296337b4f80 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -104,13 +104,13 @@ public: switch(meFunct) { case ENUM_FUNC_EQUATION: - aRet = new ORowSetValueDecorator(sal_Bool(mpFirstArg->evaluate(_aRow )->getValue() == mpSecondArg->evaluate(_aRow )->getValue()) ); + aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue() == mpSecondArg->evaluate(_aRow )->getValue() ); break; case ENUM_FUNC_AND: - aRet = new ORowSetValueDecorator( sal_Bool(mpFirstArg->evaluate(_aRow )->getValue().getBool() && mpSecondArg->evaluate(_aRow )->getValue().getBool()) ); + aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue().getBool() && mpSecondArg->evaluate(_aRow )->getValue().getBool() ); break; case ENUM_FUNC_OR: - aRet = new ORowSetValueDecorator( sal_Bool(mpFirstArg->evaluate(_aRow )->getValue().getBool() || mpSecondArg->evaluate(_aRow )->getValue().getBool()) ); + aRet = new ORowSetValueDecorator( mpFirstArg->evaluate(_aRow )->getValue().getBool() || mpSecondArg->evaluate(_aRow )->getValue().getBool() ); break; default: break; diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 05ac27588d0a..28583442d2be 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -50,7 +50,7 @@ namespace connectivity class OColumnsHelperImpl { public: - OColumnsHelperImpl(sal_Bool _bCase) + OColumnsHelperImpl(bool _bCase) : m_aColumnInfo(_bCase) { } @@ -84,9 +84,9 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) if ( !m_pImpl ) m_pImpl = new OColumnsHelperImpl(isCaseSensitive()); - sal_Bool bQueryInfo = sal_True; - sal_Bool bAutoIncrement = sal_False; - sal_Bool bIsCurrency = sal_False; + bool bQueryInfo = true; + bool bAutoIncrement = false; + bool bIsCurrency = false; sal_Int32 nDataType = DataType::OTHER; ColumnInformationMap::iterator aFind = m_pImpl->m_aColumnInfo.find(_rName); @@ -98,7 +98,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) } if ( aFind != m_pImpl->m_aColumnInfo.end() ) { - bQueryInfo = sal_False; + bQueryInfo = false; bAutoIncrement = aFind->second.first.first; bIsCurrency = aFind->second.first.second; nDataType = aFind->second.second; diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 0a9071b89874..66c09c1e4bb0 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -263,7 +263,7 @@ OUString SAL_CALL ODatabaseMetaDataBase::getIdentifierQuoteString( ) throw(SQLE sal_Bool SAL_CALL ODatabaseMetaDataBase::isCatalogAtStart( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_isCatalogAtStart,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_isCatalogAtStart_throw)); + return callImplMethod(m_isCatalogAtStart,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_isCatalogAtStart_throw)); } OUString SAL_CALL ODatabaseMetaDataBase::getCatalogSeparator( ) throw(SQLException, RuntimeException, std::exception) @@ -273,37 +273,37 @@ OUString SAL_CALL ODatabaseMetaDataBase::getCatalogSeparator( ) throw(SQLExcept sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsCatalogsInTableDefinitions,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsCatalogsInTableDefinitions_throw)); + return callImplMethod(m_supportsCatalogsInTableDefinitions,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsCatalogsInTableDefinitions_throw)); } sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsSchemasInTableDefinitions,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsSchemasInTableDefinitions_throw)); + return callImplMethod(m_supportsSchemasInTableDefinitions,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsSchemasInTableDefinitions_throw)); } sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsCatalogsInDataManipulation,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsCatalogsInDataManipulation_throw)); + return callImplMethod(m_supportsCatalogsInDataManipulation,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsCatalogsInDataManipulation_throw)); } sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsSchemasInDataManipulation,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsSchemasInDataManipulation_throw)); + return callImplMethod(m_supportsSchemasInDataManipulation,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsSchemasInDataManipulation_throw)); } sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsMixedCaseQuotedIdentifiers,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsMixedCaseQuotedIdentifiers_throw)); + return callImplMethod(m_supportsMixedCaseQuotedIdentifiers,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsMixedCaseQuotedIdentifiers_throw)); } sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsAlterTableWithAddColumn,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsAlterTableWithAddColumn_throw)); + return callImplMethod(m_supportsAlterTableWithAddColumn,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsAlterTableWithAddColumn_throw)); } sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_supportsAlterTableWithDropColumn,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsAlterTableWithDropColumn_throw)); + return callImplMethod(m_supportsAlterTableWithDropColumn,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_supportsAlterTableWithDropColumn_throw)); } sal_Int32 SAL_CALL ODatabaseMetaDataBase::getMaxStatements( ) throw(SQLException, RuntimeException, std::exception) @@ -318,7 +318,7 @@ sal_Int32 SAL_CALL ODatabaseMetaDataBase::getMaxTablesInSelect( ) throw(SQLExce sal_Bool SAL_CALL ODatabaseMetaDataBase::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException, std::exception) { - return callImplMethod(m_storesMixedCaseQuotedIdentifiers,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_storesMixedCaseQuotedIdentifiers_throw)); + return callImplMethod(m_storesMixedCaseQuotedIdentifiers,::std::mem_fun_t< bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_storesMixedCaseQuotedIdentifiers_throw)); } diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx index 31d1367ff11b..179dca464fc1 100644 --- a/connectivity/source/commontools/TIndexColumns.cxx +++ b/connectivity/source/commontools/TIndexColumns.cxx @@ -56,7 +56,7 @@ sdbcx::ObjectType OIndexColumns::createObject(const OUString& _rName) Reference< XResultSet > xResult = m_pIndex->getTable()->getConnection()->getMetaData()->getIndexInfo( Catalog, aSchema, aTable, sal_False, sal_False); - sal_Bool bAsc = sal_True; + bool bAsc = true; if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index f98bc1bed1f2..642aa323f03b 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -78,11 +78,11 @@ sdbcx::ObjectType OIndexesHelper::createObject(const OUString& _rName) Reference< XRow > xRow(xResult,UNO_QUERY); while( xResult->next() ) { - sal_Bool bUnique = !xRow->getBoolean(4); + bool bUnique = !xRow->getBoolean(4); if((aQualifier.isEmpty() || xRow->getString(5) == aQualifier ) && xRow->getString(6) == aName) { sal_Int32 nClustered = xRow->getShort(7); - sal_Bool bPrimarKeyIndex = sal_False; + bool bPrimarKeyIndex = false; xRow.clear(); xResult.clear(); try @@ -160,7 +160,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const Reference<XColumnsSupplier> xColumnSup(descriptor,UNO_QUERY); Reference<XIndexAccess> xColumns(xColumnSup->getColumns(),UNO_QUERY); Reference< XPropertySet > xColProp; - sal_Bool bAddIndexAppendix = ::dbtools::getBooleanDataSourceSetting( m_pTable->getConnection(), "AddIndexAppendix" ); + bool bAddIndexAppendix = ::dbtools::getBooleanDataSourceSetting( m_pTable->getConnection(), "AddIndexAppendix" ); sal_Int32 nCount = xColumns->getCount(); for(sal_Int32 i = 0 ; i < nCount; ++i) { diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx index 2aff5eedcc9a..135d77a2233a 100644 --- a/connectivity/source/commontools/TKeys.cxx +++ b/connectivity/source/commontools/TKeys.cxx @@ -81,7 +81,7 @@ Reference< XPropertySet > OKeysHelper::createDescriptor() /** returns the keyrule string for the primary key */ -OUString getKeyRuleString(sal_Bool _bUpdate,sal_Int32 _nKeyRule) +OUString getKeyRuleString(bool _bUpdate,sal_Int32 _nKeyRule) { const char* pKeyRule = NULL; switch ( _nKeyRule ) @@ -202,8 +202,8 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re } aSql.appendAscii(")"); - aSql.append(getKeyRuleString(sal_True ,nUpdateRule)); - aSql.append(getKeyRuleString(sal_False ,nDeleteRule)); + aSql.append(getKeyRuleString(true ,nUpdateRule)); + aSql.append(getKeyRuleString(false ,nDeleteRule)); } Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx index 9fc99fc649ea..d52a1a0b7541 100644 --- a/connectivity/source/commontools/TPrivilegesResultSet.cxx +++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx @@ -33,7 +33,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& , const OUString& schemaPattern , const OUString& tableNamePattern) : ODatabaseMetaDataResultSet(eTablePrivileges) - , m_bResetValues(sal_True) + , m_bResetValues(true) { osl_atomic_increment( &m_refCount ); { @@ -101,7 +101,7 @@ const ORowSetValue& OResultSetPrivileges::getValue(sal_Int32 columnIndex) if ( m_xRow->wasNull() ) (*m_aRowsIter)[3]->setNull(); - m_bResetValues = sal_False; + m_bResetValues = false; } } return ODatabaseMetaDataResultSet::getValue(columnIndex); @@ -119,12 +119,12 @@ sal_Bool SAL_CALL OResultSetPrivileges::next( ) throw(SQLException, RuntimeExce ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed ); - sal_Bool bReturn = sal_False; + bool bReturn = false; if ( m_xTables.is() ) { if ( m_bBOF ) { - m_bResetValues = sal_True; + m_bResetValues = true; if ( !m_xTables->next() ) return sal_False; } @@ -132,7 +132,7 @@ sal_Bool SAL_CALL OResultSetPrivileges::next( ) throw(SQLException, RuntimeExce bReturn = ODatabaseMetaDataResultSet::next(); if ( !bReturn ) { - m_bBOF = sal_False; + m_bBOF = false; m_bResetValues = bReturn = m_xTables->next(); } } diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx index b5925246556a..52268ea2f717 100644 --- a/connectivity/source/commontools/TSkipDeletedSet.cxx +++ b/connectivity/source/commontools/TSkipDeletedSet.cxx @@ -37,7 +37,7 @@ OSkipDeletedSet::~OSkipDeletedSet() //m_aBookmarks.clear(); } -sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) +bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::skipDeleted" ); OSL_ENSURE(_eCursorPosition != IResultSetHelper::BOOKMARK,"OSkipDeletedSet::SkipDeleted can't be called for BOOKMARK"); @@ -64,8 +64,8 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio break; } - sal_Bool bDone = sal_True; - sal_Bool bDataFound = sal_False; + bool bDone = true; + bool bDataFound = false; if (_eCursorPosition == IResultSetHelper::LAST) { @@ -92,7 +92,7 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio // and then move forward until we are after the last row while(bDataFound) { - bDataFound = m_pHelper->move(IResultSetHelper::NEXT, 1, sal_False); // we don't need the data here + bDataFound = m_pHelper->move(IResultSetHelper::NEXT, 1, false); // we don't need the data here if( bDataFound && ( m_bDeletedVisible || !m_pHelper->isRowDeleted()) ) { // we weren't on the last row we remember it and move on m_aBookmarksPositions.push_back(m_pHelper->getDriverPos()); @@ -125,7 +125,7 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first); } else - bDone = sal_False; + bDone = false; } while (bDataFound && !bDone) // Iterate until we are at the valid set @@ -141,7 +141,7 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first); } else - bDone = sal_False; + bDone = false; } if(bDataFound && bDone) @@ -162,10 +162,10 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio return bDataFound; } -sal_Bool OSkipDeletedSet::moveAbsolute(sal_Int32 _nPos,sal_Bool _bRetrieveData) +bool OSkipDeletedSet::moveAbsolute(sal_Int32 _nPos,bool _bRetrieveData) { SAL_INFO( "connectivity.commontools", "commontools Ocke.Janssen@sun.com OSkipDeletedSet::moveAbsolute" ); - sal_Bool bDataFound = sal_False; + bool bDataFound = false; sal_Int32 nNewPos = _nPos; if(nNewPos > 0) { diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 28ee408e4d9f..4cae6249981e 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -95,7 +95,7 @@ OSortIndex::OSortIndex( const ::std::vector<OKeyType>& _aKeyType, const ::std::vector<TAscendingOrder>& _aAscending) :m_aKeyType(_aKeyType) ,m_aAscending(_aAscending) - ,m_bFrozen(sal_False) + ,m_bFrozen(false) { } @@ -132,7 +132,7 @@ void OSortIndex::Freeze() aIter->second = NULL; } - m_bFrozen = sal_True; + m_bFrozen = true; } diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index a536f688013a..81aae73f9978 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -153,7 +153,7 @@ namespace dbtools 31, 31, 30, 31, 30, 31 }; - static sal_Bool implIsLeapYear(sal_Int32 _nYear) + static bool implIsLeapYear(sal_Int32 _nYear) { return ( ( ((_nYear % 4) == 0) && ((_nYear % 100) != 0) @@ -200,7 +200,7 @@ namespace dbtools { sal_Int32 nTempDays; sal_Int32 i = 0; - sal_Bool bCalc; + bool bCalc; do { @@ -208,11 +208,11 @@ namespace dbtools rYear = (sal_uInt16)((nTempDays / 365) - i); nTempDays -= (rYear-1) * 365; nTempDays -= ((rYear-1) / 4) - ((rYear-1) / 100) + ((rYear-1) / 400); - bCalc = sal_False; + bCalc = false; if ( nTempDays < 1 ) { i++; - bCalc = sal_True; + bCalc = true; } else { @@ -221,7 +221,7 @@ namespace dbtools if ( (nTempDays != 366) || !implIsLeapYear( rYear ) ) { i--; - bCalc = sal_True; + bCalc = true; } } } diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index cdfda5314716..11fb067622d9 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -129,7 +129,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::uno: SQLExceptionInfo::SQLExceptionInfo(const staruno::Any& _rError) { const staruno::Type& aSQLExceptionType = ::getCppuType(static_cast< ::com::sun::star::sdbc::SQLException*>(0)); - sal_Bool bValid = isAssignableFrom(aSQLExceptionType, _rError.getValueType()); + bool bValid = isAssignableFrom(aSQLExceptionType, _rError.getValueType()); if (bValid) m_aContent = _rError; // no assertion here : if used with the NextException member of an SQLException bValid==sal_False is allowed. diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index adb041552f19..97342aecb7e6 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -278,7 +278,7 @@ Reference< XConnection > getConnection_allowException( { Reference<XPropertySet> xProp(xDataSource,UNO_QUERY); OUString sPwd, sUser; - sal_Bool bPwdReq = sal_False; + bool bPwdReq = false; try { xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd; @@ -821,7 +821,7 @@ static OUString impl_doComposeTableName( const Reference< XDatabaseMetaData >& _ OUStringBuffer aComposedName; OUString sCatalogSep; - sal_Bool bCatlogAtStart = sal_True; + bool bCatlogAtStart = true; if ( !_rCatalog.isEmpty() && aNameComps.bCatalogs ) { sCatalogSep = _rxMetaData->getCatalogSeparator(); @@ -1006,9 +1006,9 @@ try // for formatted fields (either old or new) we have some special treatments Reference< XServiceInfo > xSI( xOldProps, UNO_QUERY ); - sal_Bool bOldIsFormatted = xSI.is() && xSI->supportsService( sFormattedServiceName ); + bool bOldIsFormatted = xSI.is() && xSI->supportsService( sFormattedServiceName ); xSI = Reference< XServiceInfo >( xNewProps, UNO_QUERY ); - sal_Bool bNewIsFormatted = xSI.is() && xSI->supportsService( sFormattedServiceName ); + bool bNewIsFormatted = xSI.is() && xSI->supportsService( sFormattedServiceName ); if (!bOldIsFormatted && !bNewIsFormatted) return; // nothing to do @@ -1068,7 +1068,7 @@ try Any aEffectiveDefault( xOldProps->getPropertyValue(sPropEffectiveDefault) ); if (aEffectiveDefault.hasValue()) { - sal_Bool bIsString = aEffectiveDefault.getValueType().getTypeClass() == TypeClass_STRING; + bool bIsString = aEffectiveDefault.getValueType().getTypeClass() == TypeClass_STRING; OSL_ENSURE(bIsString || aEffectiveDefault.getValueType().getTypeClass() == TypeClass_DOUBLE, "TransferFormComponentProperties : invalid property type !"); // The Effective-Properties should always be void or string or double .... @@ -1243,7 +1243,7 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere sal_Int32 nCommandType = CommandType::COMMAND; OUString sCommand; - sal_Bool bEscapeProcessing = sal_False; + bool bEscapeProcessing = false; OSL_VERIFY( _rxRowSet->getPropertyValue("CommandType") >>= nCommandType ); OSL_VERIFY( _rxRowSet->getPropertyValue("Command") >>= sCommand ); @@ -1254,7 +1254,7 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere aComposer.setOrder( getString( _rxRowSet->getPropertyValue("Order") ) ); // append filter - sal_Bool bApplyFilter = sal_True; + bool bApplyFilter = true; _rxRowSet->getPropertyValue("ApplyFilter") >>= bApplyFilter; if ( bApplyFilter ) aComposer.setFilter( getString( _rxRowSet->getPropertyValue("Filter") ) ); diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index efe0273e66b9..187812f1914b 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -87,7 +87,7 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const if ( xPropInfo.is() && xPropInfo->hasPropertyByName(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION)) ) xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION)) >>= sAutoIncrementValue; // look if we have to use precisions - sal_Bool bUseLiteral = sal_False; + bool bUseLiteral = false; OUString sPrefix,sPostfix,sCreateParams; { Reference<XResultSet> xRes = xMetaData->getTypeInfo(); @@ -107,7 +107,7 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const if( sTypeName.equalsIgnoreAsciiCase(sTypeName2Cmp) && nType == nDataType && !sCreateParams.isEmpty() && !xRow->wasNull()) { - bUseLiteral = sal_True; + bUseLiteral = true; break; } } @@ -171,7 +171,7 @@ OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,cons ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - sal_Bool bIsAutoIncrement = sal_False; + bool bIsAutoIncrement = false; xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bIsAutoIncrement; const OUString sQuoteString = xMetaData->getIdentifierQuoteString(); @@ -282,7 +282,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor, Reference<XIndexAccess> xColumns; Reference<XColumnsSupplier> xColumnSup; OUString sCatalog,sSchema,sTable,sComposedName; - sal_Bool bPKey = sal_False; + bool bPKey = false; for(sal_Int32 i=0;i<xKeys->getCount();++i) { if ( (xKeys->getByIndex(i) >>= xColProp) && xColProp.is() ) @@ -295,7 +295,7 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor, if(bPKey) ::dbtools::throwFunctionSequenceException(_xConnection); - bPKey = sal_True; + bPKey = true; xColumnSup = Reference<XColumnsSupplier>(xColProp,UNO_QUERY); xColumns = Reference<XIndexAccess>(xColumnSup->getColumns(),UNO_QUERY); if(!xColumns.is() || !xColumns->getCount()) @@ -429,7 +429,7 @@ namespace sField13 = xRow->getString(13); ::comphelper::disposeComponent(xRow); - sal_Bool bAutoIncrement = _bIsAutoIncrement + bool bAutoIncrement = _bIsAutoIncrement ,bIsCurrency = _bIsCurrency; if ( _bQueryForInfo ) { @@ -832,7 +832,7 @@ void collectColumnInformation(const Reference< XConnection>& _xConnection, { ::utl::SharedUNOComponent< XStatement > xStmt( _xConnection->createStatement() ); Reference< XPropertySet > xStatementProps( xStmt, UNO_QUERY_THROW ); - xStatementProps->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ), makeAny( (sal_Bool)sal_False ) ); + xStatementProps->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ), makeAny( false ) ); Reference< XResultSet > xResult( xStmt->executeQuery( sSelect ), UNO_QUERY_THROW ); Reference< XResultSetMetaDataSupplier > xSuppMeta( xResult, UNO_QUERY_THROW ); Reference< XResultSetMetaData > xMeta( xSuppMeta->getMetaData(), UNO_QUERY_THROW ); diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx index 83fa8e401a39..1c97944fb4bd 100644 --- a/connectivity/source/commontools/filtermanager.cxx +++ b/connectivity/source/commontools/filtermanager.cxx @@ -55,7 +55,7 @@ namespace dbtools OSL_ENSURE( m_xComponentAggregate.is(), "FilterManager::initialize: invalid arguments!" ); if ( m_xComponentAggregate.is() ) - m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_APPLYFILTER), makeAny( (sal_Bool)sal_True ) ); + m_xComponentAggregate->setPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_APPLYFILTER), makeAny( true ) ); } diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index fd1193e56264..9771003366d5 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -968,7 +968,7 @@ namespace dbtools } - void ParameterManager::setBoolean( sal_Int32 _nIndex, sal_Bool x ) + void ParameterManager::setBoolean( sal_Int32 _nIndex, bool x ) { VISIT_PARAMETER( setBoolean( _nIndex, x ) ); } diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index f665f7a7be34..41cf0b3ae581 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -226,8 +226,8 @@ namespace dbtools OSL_FAIL( "OPredicateInputController::implPredicateTree: caught an exception while dealing with the formats!" ); } - sal_Bool bDecDiffers = ( nCtxDecSep != nFmtDecSep ); - sal_Bool bFmtDiffers = ( nCtxThdSep != nFmtThdSep ); + bool bDecDiffers = ( nCtxDecSep != nFmtDecSep ); + bool bFmtDiffers = ( nCtxThdSep != nFmtThdSep ); if ( bDecDiffers || bFmtDiffers ) { // okay, at least one differs // "translate" the value into the "format locale" @@ -297,7 +297,7 @@ namespace dbtools // '-characters to the text. If we would give this to predicateTree this would add // two additional '-characters which we don't want. So check the field format. // FS - 06.01.00 - 71532 - sal_Bool bValidQuotedText = sValue.startsWith("'") && sValue.endsWith("'"); + bool bValidQuotedText = sValue.startsWith("'") && sValue.endsWith("'"); // again : as normalizePredicateString always did a conversion on the value text, // bValidQuotedText == sal_True implies that we have a text field, as no other field // values will be formatted with the quote characters diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index 5ed6acf6ec2e..9838787f4fcd 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -63,7 +63,7 @@ namespace dbtools OUString sFilter; OUString sOrder; sal_Int32 nCommandType; - sal_Bool bEscapeProcessing; + bool bEscapeProcessing; bool bComposerDirty; bool bDisposeComposer; @@ -73,7 +73,7 @@ namespace dbtools ,sFilter() ,sOrder() ,nCommandType( CommandType::COMMAND ) - ,bEscapeProcessing( sal_True ) + ,bEscapeProcessing( true ) ,bComposerDirty( true ) ,bDisposeComposer( true ) { @@ -147,7 +147,7 @@ namespace dbtools Reference< XPropertySet > xQuery( xQueries->getByName( _rData.sCommand ), UNO_QUERY_THROW ); // a native query ? - sal_Bool bQueryEscapeProcessing = sal_False; + bool bQueryEscapeProcessing = false; xQuery->getPropertyValue("EscapeProcessing") >>= bQueryEscapeProcessing; if ( !bQueryEscapeProcessing ) break; @@ -178,7 +178,7 @@ namespace dbtools } // the filter - sal_Bool bApplyFilter = sal_True; + bool bApplyFilter = true; const OUString sPropApply( "ApplyFilter" ); if ( ::comphelper::hasProperty( sPropApply, xQuery ) ) { diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index fc289fbccee8..adb2b0e0272a 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -89,16 +89,16 @@ OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver, OConnectionPool::~OConnectionPool() { - clear(sal_False); + clear(false); } struct TRemoveEventListenerFunctor : ::std::unary_function<TPooledConnections::value_type,void> ,::std::unary_function<TActiveConnectionMap::value_type,void> { OConnectionPool* m_pConnectionPool; - sal_Bool m_bDispose; + bool m_bDispose; - TRemoveEventListenerFunctor(OConnectionPool* _pConnectionPool,sal_Bool _bDispose = sal_False) + TRemoveEventListenerFunctor(OConnectionPool* _pConnectionPool,bool _bDispose = false) : m_pConnectionPool(_pConnectionPool) ,m_bDispose(_bDispose) { @@ -139,11 +139,11 @@ struct TConnectionPoolFunctor : ::std::unary_function<TConnectionMap::value_type } void operator()(const TConnectionMap::value_type& _aValue) { - ::std::for_each(_aValue.second.aConnections.begin(),_aValue.second.aConnections.end(),TRemoveEventListenerFunctor(m_pConnectionPool,sal_True)); + ::std::for_each(_aValue.second.aConnections.begin(),_aValue.second.aConnections.end(),TRemoveEventListenerFunctor(m_pConnectionPool,true)); } }; -void OConnectionPool::clear(sal_Bool _bDispose) +void OConnectionPool::clear(bool _bDispose) { MutexGuard aGuard(m_aMutex); @@ -250,7 +250,7 @@ void OConnectionPool::invalidatePooledConnections() { if(!(--(aIter->second.nALiveCount))) // connections are invalid { - ::std::for_each(aIter->second.aConnections.begin(),aIter->second.aConnections.end(),TRemoveEventListenerFunctor(this,sal_True)); + ::std::for_each(aIter->second.aConnections.begin(),aIter->second.aConnections.end(),TRemoveEventListenerFunctor(this,true)); aIter->second.aConnections.clear(); diff --git a/connectivity/source/cpool/ZConnectionPool.hxx b/connectivity/source/cpool/ZConnectionPool.hxx index efdaebe01229..befd0d3d0504 100644 --- a/connectivity/source/cpool/ZConnectionPool.hxx +++ b/connectivity/source/cpool/ZConnectionPool.hxx @@ -136,7 +136,7 @@ namespace connectivity const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XProxyFactory >& _rxProxyFactory); // delete all refs - void clear(sal_Bool _bDispose); + void clear(bool _bDispose); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnectionWithInfo( const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index 9d345b9fe69a..c445045524e3 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -97,7 +97,7 @@ OPoolCollection::OPoolCollection(const Reference< XComponentContext >& _rxContex OPoolCollection::~OPoolCollection() { - clearConnectionPools(sal_False); + clearConnectionPools(false); } Reference< XConnection > SAL_CALL OPoolCollection::getConnection( const OUString& _rURL ) throw(SQLException, RuntimeException, std::exception) @@ -216,10 +216,10 @@ Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const OUString& _ return xDriver; } -sal_Bool OPoolCollection::isDriverPoolingEnabled(const OUString& _sDriverImplName, +bool OPoolCollection::isDriverPoolingEnabled(const OUString& _sDriverImplName, Reference< XInterface >& _rxDriverNode) { - sal_Bool bEnabled = sal_False; + bool bEnabled = false; Reference<XInterface> xConnectionPoolRoot = getConfigPoolRoot(); // then look for which of them settings are stored in the configuration Reference< XNameAccess > xDirectAccess(openNode(getDriverSettingsNodeName(),xConnectionPoolRoot),UNO_QUERY); @@ -244,13 +244,13 @@ sal_Bool OPoolCollection::isDriverPoolingEnabled(const OUString& _sDriverImplNam return bEnabled; } -sal_Bool OPoolCollection::isPoolingEnabled() +bool OPoolCollection::isPoolingEnabled() { // the config node where all pooling relevant info are stored under Reference<XInterface> xConnectionPoolRoot = getConfigPoolRoot(); // the global "enabled" flag - sal_Bool bEnabled = sal_False; + bool bEnabled = false; if(xConnectionPoolRoot.is()) getNodeValue(getEnablePoolingNodeName(),xConnectionPoolRoot) >>= bEnabled; return bEnabled; @@ -263,12 +263,12 @@ Reference<XInterface> OPoolCollection::getConfigPoolRoot() return m_xConfigNode; } -sal_Bool OPoolCollection::isPoolingEnabledByUrl(const OUString& _sUrl, +bool OPoolCollection::isPoolingEnabledByUrl(const OUString& _sUrl, Reference< XDriver >& _rxDriver, OUString& _rsImplName, Reference< XInterface >& _rxDriverNode) { - sal_Bool bEnabled = sal_False; + bool bEnabled = false; _rxDriver = m_xManager->getDriverByURL(_sUrl); if (_rxDriver.is() && isPoolingEnabled()) { @@ -285,7 +285,7 @@ sal_Bool OPoolCollection::isPoolingEnabledByUrl(const OUString& _sUrl, return bEnabled; } -void OPoolCollection::clearConnectionPools(sal_Bool _bDispose) +void OPoolCollection::clearConnectionPools(bool _bDispose) { OConnectionPools::const_iterator aIter = m_aPools.begin(); while(aIter != m_aPools.end()) @@ -453,7 +453,7 @@ void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::Pr MutexGuard aGuard(m_aMutex); if(evt.Source == m_xConfigNode) { - sal_Bool bEnabled = sal_True; + bool bEnabled = true; evt.NewValue >>= bEnabled; if(!bEnabled ) { @@ -462,7 +462,7 @@ void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::Pr OConnectionPools::iterator aIter = m_aPools.begin(); for(;aIter != m_aPools.end();++aIter) { - aIter->second->clear(sal_False); + aIter->second->clear(false); aIter->second->release(); } m_aPools.clear(); @@ -471,7 +471,7 @@ void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::Pr } else if(evt.Source.is()) { - sal_Bool bEnabled = sal_True; + bool bEnabled = true; evt.NewValue >>= bEnabled; if(!bEnabled) { @@ -493,7 +493,7 @@ void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::Pr OConnectionPools::iterator aFind = m_aPools.find(sThisDriverName); if(aFind != m_aPools.end() && aFind->second) { - aFind->second->clear(sal_False); + aFind->second->clear(false); aFind->second->release(); m_aPools.erase(aFind); } @@ -503,7 +503,7 @@ void SAL_CALL OPoolCollection::propertyChange( const ::com::sun::star::beans::Pr void OPoolCollection::clearDesktop() { - clearConnectionPools(sal_True); + clearConnectionPools(true); if ( m_xDesktop.is() ) m_xDesktop->removeTerminateListener(this); m_xDesktop.clear(); diff --git a/connectivity/source/cpool/ZPoolCollection.hxx b/connectivity/source/cpool/ZPoolCollection.hxx index 9f7580003bd3..fa28c0361a49 100644 --- a/connectivity/source/cpool/ZPoolCollection.hxx +++ b/connectivity/source/cpool/ZPoolCollection.hxx @@ -91,10 +91,10 @@ namespace connectivity const OUString& _rPath) const; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > openNode( const OUString& _rPath, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xTreeNode) const throw(); - sal_Bool isPoolingEnabled(); - sal_Bool isDriverPoolingEnabled(const OUString& _sDriverImplName, + bool isPoolingEnabled(); + bool isDriverPoolingEnabled(const OUString& _sDriverImplName, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDriverNode); - sal_Bool isPoolingEnabledByUrl( const OUString& _sUrl, + bool isPoolingEnabledByUrl( const OUString& _sUrl, ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >& _rxDriver, OUString& _rsImplName, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDriverNode); @@ -102,7 +102,7 @@ namespace connectivity OConnectionPool* getConnectionPool( const OUString& _sImplName, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >& _xDriver, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDriverNode); - void clearConnectionPools(sal_Bool _bDispose); + void clearConnectionPools(bool _bDispose); void clearDesktop(); protected: virtual ~OPoolCollection(); 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<PropertyValue> 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<XSpreadsheets>& xSheets, const OUString& rName ) +static bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, const OUString& rName ) { Any aAny = xSheets->getByName( rName ); Reference<XSpreadsheet> xSheet; @@ -294,11 +294,11 @@ static sal_Bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, co Reference<XPropertySet> 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<XSpreadsheets>& xSheets, co // single cell -> check content Reference<XCell> 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<XDatabaseRanges>& xRanges, const OUString& rName ) +static bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& xRanges, const OUString& rName ) { - sal_Bool bUnnamed = sal_False; + bool bUnnamed = false; Any aAny = xRanges->getByName( rName ); Reference<XDatabaseRange> xRange; @@ -339,7 +339,7 @@ static sal_Bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& 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<XSpreadsheet>& xSheet, sal_Int3 } static void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Reference<XNumberFormats>& 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<XSpreadsheet>& xSheet, const Refe Reference<XPropertySet> 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<XSpreadsheet>& 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<XSpreadsheet>& xSheet, const Refe static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& 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<XSpreadsheet>& 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<XPropertySet> 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> 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<XUnoTunnel> 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<XCommandEnvironment>(), 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<XCommandEnvironment>(), 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<XIndexAccess> 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<XIndexAccess>& _xCols) +bool ODbaseTable::InsertRow(OValueRefVector& rRow, bool bFlush, const Reference<XIndexAccess>& _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<XIndexAccess>& _xCols) +bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow, const Reference<XIndexAccess>& _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<XPropertySet> 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<XPropertySet> 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<XIndexAccess>& _xCols, const bool bForceAllFields) +bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, const Reference<XIndexAccess>& _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> 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> 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<OFileCatalog&>(m_rParent).getConnection(),_sElementName),sal_False,NULL)) + if(ODbaseTable::Drop_Static(ODbaseTable::getEntry(static_cast<OFileCatalog&>(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<OConnection, OConnection_BASE>((::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<XResultSet> 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<connectivity::OSQLColumns>& _rxColumns, const Reference<XIndexAccess>& _xNames, - sal_Bool _bSetColumnMapping, + bool _bSetColumnMapping, const Reference<XDatabaseMetaData>& _xMetaData, ::std::vector<sal_Int32>& _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<XIndexAccess> 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<sal_uInt16>(_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<OResultSet> { 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 <class TYPE> 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<XResultSet> 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> _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<XPropertySet> 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<OHCatalog&>(m_rParent).getConnection(); @@ -131,7 +131,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString aSql( "DROP " ); Reference<XPropertySet> 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<typeFilterCount; ++i, ++typeFilter ) @@ -142,7 +142,7 @@ Reference< XResultSet > 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 <null/> 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;i<len;i++) if ( args[3].l ) { t.pEnv->DeleteLocalRef( (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 <TRUE/> 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 <TRUE/> when we should allow to query for generated values + bool bAutoRetrievingEnabled = false; // set to <TRUE/> 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<XIndexAccess> 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<connectivity::OSQLColumns> 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<sal_Bool>::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<sal_Bool> 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<sal_Bool>::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<sal_Bool>::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<connectivity::OSQLColumns>& _rxColumns, const Reference<XIndexAccess>& _xNames, - sal_Bool _bSetColumnMapping, + bool _bSetColumnMapping, const Reference<XDatabaseMetaData>& _xMetaData, ::std::vector<sal_Int32>& _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<sal_uInt32>(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<sal_Int32>& _aColumnMapping) @@ -1574,7 +1574,7 @@ void OResultSet::setColumnMapping(const ::std::vector<sal_Int32>& _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<OKeySet> 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<connectivity::OSQLColumns>& _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<sal_Int32>& _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<connectivity::OSQLColumns> 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<connectivity::OSQLColumns>& _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/types.h> -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<OMySQLCatalog&>(m_rParent).getConnection(); @@ -136,7 +136,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString aSql( "DROP " ); Reference<XPropertySet> 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<SQLUINTEGER>(level)) == static_cast<SQLUINTEGER>(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<sal_Int8>(); } @@ -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<SQLULEN, SQL_IS_UINTEGER>(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<sal_Int8>(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<SQLULEN, SQL_IS_UINTEGER>(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<SQLULEN, SQL_IS_UINTEGER>(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<SQLULEN, SQL_IS_UINTEGER>(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<SQLULEN, SQL_IS_UINTEGER>(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<SQLULEN, SQL_IS_UINTEGER>(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<sal_Int8> 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<sal_Int8>*)_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 ); diff --git a/connectivity/source/inc/AutoRetrievingBase.hxx b/connectivity/source/inc/AutoRetrievingBase.hxx index b97558b1a82f..60ad96e49872 100644 --- a/connectivity/source/inc/AutoRetrievingBase.hxx +++ b/connectivity/source/inc/AutoRetrievingBase.hxx @@ -27,15 +27,15 @@ namespace connectivity class OOO_DLLPUBLIC_DBTOOLS OAutoRetrievingBase { OUString m_sGeneratedValueStatement; // contains the statement which should be used when query for automatically generated values - sal_Bool m_bAutoRetrievingEnabled; // set to when we should allow to query for generated values + bool m_bAutoRetrievingEnabled; // set to when we should allow to query for generated values protected: - OAutoRetrievingBase() : m_bAutoRetrievingEnabled(sal_False) {} + OAutoRetrievingBase() : m_bAutoRetrievingEnabled(false) {} virtual ~OAutoRetrievingBase(){} - inline void enableAutoRetrievingEnabled(sal_Bool _bAutoEnable) { m_bAutoRetrievingEnabled = _bAutoEnable; } + inline void enableAutoRetrievingEnabled(bool _bAutoEnable) { m_bAutoRetrievingEnabled = _bAutoEnable; } inline void setAutoRetrievingStatement(const OUString& _sStmt) { m_sGeneratedValueStatement = _sStmt; } public: - inline sal_Bool isAutoRetrievingEnabled() const { return m_bAutoRetrievingEnabled; } + inline bool isAutoRetrievingEnabled() const { return m_bAutoRetrievingEnabled; } inline const OUString& getAutoRetrievingStatement() const { return m_sGeneratedValueStatement; } /** transform the statement to query for auto generated values diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx index a964301f22b4..c0dbdefd6fb6 100644 --- a/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/FDatabaseMetaDataResultSet.hxx @@ -128,8 +128,8 @@ namespace connectivity protected: ORows m_aRows; ORows::iterator m_aRowsIter; - sal_Bool m_bBOF; - sal_Bool m_bEOF; + bool m_bBOF; + bool m_bEOF; virtual const ORowSetValue& getValue(sal_Int32 columnIndex); diff --git a/connectivity/source/inc/OColumn.hxx b/connectivity/source/inc/OColumn.hxx index 6a68e8aa6d9b..ac7542a13bb3 100644 --- a/connectivity/source/inc/OColumn.hxx +++ b/connectivity/source/inc/OColumn.hxx @@ -42,14 +42,14 @@ namespace connectivity sal_Int32 m_Scale; sal_Int32 m_ColumnType; - sal_Bool m_AutoIncrement; - sal_Bool m_CaseSensitive; - sal_Bool m_Searchable; - sal_Bool m_Currency; - sal_Bool m_Signed; - sal_Bool m_ReadOnly; - sal_Bool m_Writable; - sal_Bool m_DefinitelyWritable; + bool m_AutoIncrement; + bool m_CaseSensitive; + bool m_Searchable; + bool m_Currency; + bool m_Signed; + bool m_ReadOnly; + bool m_Writable; + bool m_DefinitelyWritable; public: OColumn() @@ -59,14 +59,14 @@ namespace connectivity , m_Scale(0) , m_ColumnType(0) - , m_AutoIncrement(sal_False) - , m_CaseSensitive(sal_False) - , m_Searchable(sal_True) - , m_Currency(sal_False) - , m_Signed(sal_False) - , m_ReadOnly(sal_True) - , m_Writable(sal_False) - , m_DefinitelyWritable(sal_False) + , m_AutoIncrement(false) + , m_CaseSensitive(false) + , m_Searchable(true) + , m_Currency(false) + , m_Signed(false) + , m_ReadOnly(true) + , m_Writable(false) + , m_DefinitelyWritable(false) {} OColumn(const OUString &_aTableName, @@ -78,14 +78,14 @@ namespace connectivity sal_Int32 _aScale=0, sal_Int32 _aColumnType=0, - sal_Bool _aAutoIncrement=sal_False, - sal_Bool _aCaseSensitive=sal_False, - sal_Bool _aSearchable=sal_True, - sal_Bool _aCurrency=sal_False, - sal_Bool _aSigned=sal_False, - sal_Bool _aReadOnly=sal_True, - sal_Bool _aWritable=sal_False, - sal_Bool _aDefinitelyWritable=sal_False, + bool _aAutoIncrement=false, + bool _aCaseSensitive=false, + bool _aSearchable=true, + bool _aCurrency=false, + bool _aSigned=false, + bool _aReadOnly=true, + bool _aWritable=false, + bool _aDefinitelyWritable=false, const OUString &_aColumnLabel = OUString(), const OUString &_aColumnTypeName = OUString(), @@ -124,14 +124,14 @@ namespace connectivity inline static void SAL_CALL operator delete( void *,void* ) SAL_THROW(()) { } - sal_Bool isAutoIncrement() const { return m_AutoIncrement; } - sal_Bool isCaseSensitive() const { return m_CaseSensitive; } - sal_Bool isSearchable() const { return m_Searchable; } - sal_Bool isCurrency() const { return m_Currency; } - sal_Bool isSigned() const { return m_Signed; } - sal_Bool isReadOnly() const { return m_ReadOnly; } - sal_Bool isWritable() const { return m_Writable; } - sal_Bool isDefinitelyWritable() const { return m_DefinitelyWritable; } + bool isAutoIncrement() const { return m_AutoIncrement; } + bool isCaseSensitive() const { return m_CaseSensitive; } + bool isSearchable() const { return m_Searchable; } + bool isCurrency() const { return m_Currency; } + bool isSigned() const { return m_Signed; } + bool isReadOnly() const { return m_ReadOnly; } + bool isWritable() const { return m_Writable; } + bool isDefinitelyWritable() const { return m_DefinitelyWritable; } sal_Int32 isNullable() const { return m_Nullable; } sal_Int32 getColumnDisplaySize() const { return m_ColumnDisplaySize; } diff --git a/connectivity/source/inc/OTypeInfo.hxx b/connectivity/source/inc/OTypeInfo.hxx index ae2931833c6a..7d4d3cedaa73 100644 --- a/connectivity/source/inc/OTypeInfo.hxx +++ b/connectivity/source/inc/OTypeInfo.hxx @@ -43,11 +43,11 @@ namespace connectivity sal_Int16 nSearchType; // Can we search for the type? sal_Int16 nNumPrecRadix; // indicating the radix, which is usually 2 or 10 - sal_Bool bCurrency : 1; // Currency - sal_Bool bAutoIncrement : 1; // Is it an autoincrementing field? - sal_Bool bNullable : 1; // Can the field be NULL? - sal_Bool bCaseSensitive : 1; // Is the type case sensitive? - sal_Bool bUnsigned : 1; // Is the type unsigned? + bool bCurrency : 1; // Currency + bool bAutoIncrement : 1; // Is it an autoincrementing field? + bool bNullable : 1; // Can the field be NULL? + bool bCaseSensitive : 1; // Is the type case sensitive? + bool bUnsigned : 1; // Is the type unsigned? OTypeInfo() :nPrecision(0) @@ -55,11 +55,11 @@ namespace connectivity ,nMinimumScale(0) ,nType( ::com::sun::star::sdbc::DataType::OTHER) ,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL) - ,bCurrency(sal_False) - ,bAutoIncrement(sal_False) - ,bNullable(sal_True) - ,bCaseSensitive(sal_False) - ,bUnsigned(sal_False) + ,bCurrency(false) + ,bAutoIncrement(false) + ,bNullable(true) + ,bCaseSensitive(false) + ,bUnsigned(false) {} inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) @@ -71,8 +71,8 @@ namespace connectivity inline static void SAL_CALL operator delete( void * /*pMem*/,void* /*_pHint*/ ) SAL_THROW(()) { } - sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; } - sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; } + bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; } + bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; } inline OUString getDBName() const { return aTypeName; } }; diff --git a/connectivity/source/inc/TDatabaseMetaDataBase.hxx b/connectivity/source/inc/TDatabaseMetaDataBase.hxx index 00b29b5480fb..af0b2a94fee5 100644 --- a/connectivity/source/inc/TDatabaseMetaDataBase.hxx +++ b/connectivity/source/inc/TDatabaseMetaDataBase.hxx @@ -41,19 +41,19 @@ namespace connectivity ::connectivity::ODatabaseMetaDataResultSet::ORows m_aTypeInfoRows; // cached database information - ::std::pair<bool,sal_Bool> m_isCatalogAtStart; - ::std::pair<bool,OUString> m_sCatalogSeparator; - ::std::pair<bool,OUString> m_sIdentifierQuoteString; - ::std::pair<bool,sal_Bool> m_supportsCatalogsInTableDefinitions; - ::std::pair<bool,sal_Bool> m_supportsSchemasInTableDefinitions; - ::std::pair<bool,sal_Bool> m_supportsCatalogsInDataManipulation; - ::std::pair<bool,sal_Bool> m_supportsSchemasInDataManipulation; - ::std::pair<bool,sal_Bool> m_supportsMixedCaseQuotedIdentifiers; - ::std::pair<bool,sal_Bool> m_supportsAlterTableWithAddColumn; - ::std::pair<bool,sal_Bool> m_supportsAlterTableWithDropColumn; + ::std::pair<bool,bool> m_isCatalogAtStart; + ::std::pair<bool,OUString> m_sCatalogSeparator; + ::std::pair<bool,OUString> m_sIdentifierQuoteString; + ::std::pair<bool,bool> m_supportsCatalogsInTableDefinitions; + ::std::pair<bool,bool> m_supportsSchemasInTableDefinitions; + ::std::pair<bool,bool> m_supportsCatalogsInDataManipulation; + ::std::pair<bool,bool> m_supportsSchemasInDataManipulation; + ::std::pair<bool,bool> m_supportsMixedCaseQuotedIdentifiers; + ::std::pair<bool,bool> m_supportsAlterTableWithAddColumn; + ::std::pair<bool,bool> m_supportsAlterTableWithDropColumn; ::std::pair<bool,sal_Int32> m_MaxStatements; ::std::pair<bool,sal_Int32> m_MaxTablesInSelect; - ::std::pair<bool,sal_Bool> m_storesMixedCaseQuotedIdentifiers; + ::std::pair<bool,bool> m_storesMixedCaseQuotedIdentifiers; template <typename T> T callImplMethod(::std::pair<bool,T>& _rCache,const ::std::mem_fun_t<T,ODatabaseMetaDataBase>& _pImplMethod) { @@ -74,19 +74,19 @@ namespace connectivity protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw() = 0; // cached database information - virtual OUString impl_getIdentifierQuoteString_throw( ) = 0; - virtual sal_Bool impl_isCatalogAtStart_throw( ) = 0; - virtual OUString impl_getCatalogSeparator_throw( ) = 0; - virtual sal_Bool impl_supportsCatalogsInTableDefinitions_throw( ) = 0; - virtual sal_Bool impl_supportsSchemasInTableDefinitions_throw( ) = 0; - virtual sal_Bool impl_supportsCatalogsInDataManipulation_throw( ) = 0; - virtual sal_Bool impl_supportsSchemasInDataManipulation_throw( ) = 0; - virtual sal_Bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) = 0; - virtual sal_Bool impl_supportsAlterTableWithAddColumn_throw( ) = 0; - virtual sal_Bool impl_supportsAlterTableWithDropColumn_throw( ) = 0; - virtual sal_Int32 impl_getMaxStatements_throw( ) = 0; - virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) = 0; - virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ) = 0; + virtual OUString impl_getIdentifierQuoteString_throw( ) = 0; + virtual bool impl_isCatalogAtStart_throw( ) = 0; + virtual OUString impl_getCatalogSeparator_throw( ) = 0; + virtual bool impl_supportsCatalogsInTableDefinitions_throw( ) = 0; + virtual bool impl_supportsSchemasInTableDefinitions_throw( ) = 0; + virtual bool impl_supportsCatalogsInDataManipulation_throw( ) = 0; + virtual bool impl_supportsSchemasInDataManipulation_throw( ) = 0; + virtual bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) = 0; + virtual bool impl_supportsAlterTableWithAddColumn_throw( ) = 0; + virtual bool impl_supportsAlterTableWithDropColumn_throw( ) = 0; + virtual sal_Int32 impl_getMaxStatements_throw( ) = 0; + virtual sal_Int32 impl_getMaxTablesInSelect_throw( ) = 0; + virtual bool impl_storesMixedCaseQuotedIdentifiers_throw( ) = 0; public: diff --git a/connectivity/source/inc/TPrivilegesResultSet.hxx b/connectivity/source/inc/TPrivilegesResultSet.hxx index 41c23210aea0..d76c16082528 100644 --- a/connectivity/source/inc/TPrivilegesResultSet.hxx +++ b/connectivity/source/inc/TPrivilegesResultSet.hxx @@ -30,7 +30,7 @@ namespace connectivity { ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xTables; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow> m_xRow; - sal_Bool m_bResetValues; + bool m_bResetValues; protected: virtual const ORowSetValue& getValue(sal_Int32 columnIndex) SAL_OVERRIDE; public: diff --git a/connectivity/source/inc/TResultSetHelper.hxx b/connectivity/source/inc/TResultSetHelper.hxx index 6fa5874348d4..a1f68813e13f 100644 --- a/connectivity/source/inc/TResultSetHelper.hxx +++ b/connectivity/source/inc/TResultSetHelper.hxx @@ -39,10 +39,10 @@ namespace connectivity BOOKMARK }; public: - virtual sal_Bool move(Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) = 0; + virtual bool move(Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) = 0; virtual sal_Int32 getDriverPos() const = 0; - virtual sal_Bool deletedVisible() const = 0; - virtual sal_Bool isRowDeleted() const = 0; + virtual bool deletedVisible() const = 0; + virtual bool isRowDeleted() const = 0; protected: ~IResultSetHelper() {} diff --git a/connectivity/source/inc/TSkipDeletedSet.hxx b/connectivity/source/inc/TSkipDeletedSet.hxx index 833216b9ae92..7b58ef40e7dc 100644 --- a/connectivity/source/inc/TSkipDeletedSet.hxx +++ b/connectivity/source/inc/TSkipDeletedSet.hxx @@ -36,7 +36,7 @@ namespace connectivity IResultSetHelper* m_pHelper; // used for moving in the resultset bool m_bDeletedVisible; - sal_Bool moveAbsolute(sal_Int32 _nOffset,sal_Bool _bRetrieveData); + bool moveAbsolute(sal_Int32 _nOffset,bool _bRetrieveData); public: OSkipDeletedSet(IResultSetHelper* _pHelper); ~OSkipDeletedSet(); @@ -60,7 +60,7 @@ namespace connectivity @return true when the movement was successful otherwise false */ - sal_Bool skipDeleted(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData); + bool skipDeleted(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData); /** clear the map and the vector used in this class */ diff --git a/connectivity/source/inc/TSortIndex.hxx b/connectivity/source/inc/TSortIndex.hxx index 83dda81b9678..c70654a7fca4 100644 --- a/connectivity/source/inc/TSortIndex.hxx +++ b/connectivity/source/inc/TSortIndex.hxx @@ -54,7 +54,7 @@ namespace connectivity TIntValuePairVector m_aKeyValues; TKeyTypeVector m_aKeyType; ::std::vector<TAscendingOrder> m_aAscending; - sal_Bool m_bFrozen; + bool m_bFrozen; public: @@ -95,7 +95,7 @@ namespace connectivity // look at the name - sal_Bool IsFrozen() const { return m_bFrozen; } + bool IsFrozen() const { return m_bFrozen; } // returns the current size of the keyvalues size_t Count() const { return m_aKeyValues.size(); } @@ -110,17 +110,17 @@ namespace connectivity */ class OOO_DLLPUBLIC_DBTOOLS OKeySet : public ORefVector<sal_Int32> { - sal_Bool m_bFrozen; + bool m_bFrozen; public: OKeySet() : ORefVector<sal_Int32>() - , m_bFrozen(sal_False){} + , m_bFrozen(false){} OKeySet(Vector::size_type _nSize) : ORefVector<sal_Int32>(_nSize) - , m_bFrozen(sal_False){} + , m_bFrozen(false){} - sal_Bool isFrozen() const { return m_bFrozen; } - void setFrozen(sal_Bool _bFrozen=sal_True) { m_bFrozen = _bFrozen; } + bool isFrozen() const { return m_bFrozen; } + void setFrozen(bool _bFrozen=true) { m_bFrozen = _bFrozen; } }; } #endif // CONNECTIVITY_TSORTINDEX_HXX diff --git a/connectivity/source/inc/ado/ADatabaseMetaData.hxx b/connectivity/source/inc/ado/ADatabaseMetaData.hxx index f06e0975b40f..89a9d04ace5b 100644 --- a/connectivity/source/inc/ado/ADatabaseMetaData.hxx +++ b/connectivity/source/inc/ado/ADatabaseMetaData.hxx @@ -59,19 +59,19 @@ namespace connectivity 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( ); public: ODatabaseMetaData(OConnection* _pCon); diff --git a/connectivity/source/inc/ado/Aolevariant.hxx b/connectivity/source/inc/ado/Aolevariant.hxx index 459d07fecc40..d40594f65e1d 100644 --- a/connectivity/source/inc/ado/Aolevariant.hxx +++ b/connectivity/source/inc/ado/Aolevariant.hxx @@ -126,6 +126,7 @@ namespace connectivity operator OUString() const; + operator bool() const { return getBool() == 1; } operator sal_Bool() const { return getBool(); } operator sal_Int8() const { return getInt8(); } operator sal_Int16() const { return getInt16(); } @@ -137,7 +138,7 @@ namespace connectivity operator ::com::sun::star::util::Date() const ; operator ::com::sun::star::util::Time() const ; operator ::com::sun::star::util::DateTime()const ; - OUString getString() const; + OUString getString() const; sal_Bool getBool() const; IUnknown* getIUnknown() const; IDispatch* getIDispatch() const; diff --git a/connectivity/source/inc/calc/CResultSet.hxx b/connectivity/source/inc/calc/CResultSet.hxx index aaf60c27e78e..5db2b181ae20 100644 --- a/connectivity/source/inc/calc/CResultSet.hxx +++ b/connectivity/source/inc/calc/CResultSet.hxx @@ -40,13 +40,13 @@ namespace connectivity public OCalcResultSet_BASE, public OCalcResultSet_BASE3 { - sal_Bool m_bBookmarkable; + bool m_bBookmarkable; protected: // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE; // OPropertySetHelper virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE; - virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex) SAL_OVERRIDE; + virtual bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex) SAL_OVERRIDE; public: DECLARE_SERVICE_INFO(); @@ -72,7 +72,7 @@ namespace connectivity // XDeleteRows virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool isRowDeleted() const SAL_OVERRIDE { return sal_False; } + virtual bool isRowDeleted() const SAL_OVERRIDE { return false; } }; } diff --git a/connectivity/source/inc/calc/CTable.hxx b/connectivity/source/inc/calc/CTable.hxx index 82f09391d381..8a2efdaf83ce 100644 --- a/connectivity/source/inc/calc/CTable.hxx +++ b/connectivity/source/inc/calc/CTable.hxx @@ -51,7 +51,7 @@ namespace connectivity sal_Int32 m_nStartRow; sal_Int32 m_nDataCols; sal_Int32 m_nDataRows; - sal_Bool m_bHasHeaders; + bool m_bHasHeaders; ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > m_xFormats; ::Date m_aNullDate; @@ -73,8 +73,8 @@ namespace connectivity ); virtual sal_Int32 getCurrentLastPos() const SAL_OVERRIDE; - virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE; - virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) SAL_OVERRIDE; + virtual bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE; + virtual bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool _bUseTableDefs, bool bRetrieveData) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; //XTypeProvider diff --git a/connectivity/source/inc/dbase/DCode.hxx b/connectivity/source/inc/dbase/DCode.hxx index c5bdcf11c416..5135a956572f 100644 --- a/connectivity/source/inc/dbase/DCode.hxx +++ b/connectivity/source/inc/dbase/DCode.hxx @@ -50,7 +50,7 @@ namespace connectivity const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xIndexes=NULL); - virtual sal_Bool isIndexed() const SAL_OVERRIDE; + virtual bool isIndexed() const SAL_OVERRIDE; virtual file::OEvaluateSet* preProcess(file::OBoolOperator* pOp, file::OOperand* pRight = 0) SAL_OVERRIDE; TYPEINFO_OVERRIDE(); }; diff --git a/connectivity/source/inc/dbase/DDatabaseMetaData.hxx b/connectivity/source/inc/dbase/DDatabaseMetaData.hxx index 6ae8c1dacfc3..7c5a60ef3d8d 100644 --- a/connectivity/source/inc/dbase/DDatabaseMetaData.hxx +++ b/connectivity/source/inc/dbase/DDatabaseMetaData.hxx @@ -47,8 +47,8 @@ namespace connectivity virtual sal_Bool SAL_CALL supportsAlterTableWithAddColumn( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsAlterTableWithDropColumn( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool impl_storesMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; - virtual sal_Bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; + virtual bool impl_storesMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; + virtual bool impl_supportsMixedCaseQuotedIdentifiers_throw( ) SAL_OVERRIDE; protected: virtual ~ODbaseDatabaseMetaData(); public: diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx index ac4b9c6a89ea..833378cccf5c 100644 --- a/connectivity/source/inc/dbase/DIndex.hxx +++ b/connectivity/source/inc/dbase/DIndex.hxx @@ -81,7 +81,7 @@ namespace connectivity m_nRootPage; ODbaseTable* m_pTable; - sal_Bool m_bUseCollector : 1; // Use the Garbage Collector + bool m_bUseCollector : 1; // Use the Garbage Collector OUString getCompletePath(); void closeImpl(); @@ -93,7 +93,7 @@ namespace connectivity ODbaseIndex(ODbaseTable* _pTable); ODbaseIndex(ODbaseTable* _pTable,const NDXHeader& _aHeader,const OUString& _Name); - sal_Bool openIndexFile(); + bool openIndexFile(); virtual void refreshColumns() SAL_OVERRIDE; // com::sun::star::lang::XUnoTunnel @@ -114,31 +114,31 @@ namespace connectivity sal_uInt32 GetRootPos() {return m_nRootPage;} sal_uInt32 GetPageCount() {return m_nPageCount;} - sal_Bool IsText() const {return m_aHeader.db_keytype == 0;} + bool IsText() const {return m_aHeader.db_keytype == 0;} sal_uInt16 GetMaxNodes() const {return m_aHeader.db_maxkeys;} - virtual sal_Bool Insert(sal_uInt32 nRec, const ORowSetValue& rValue); - virtual sal_Bool Update(sal_uInt32 nRec, const ORowSetValue&, const ORowSetValue&); - virtual sal_Bool Delete(sal_uInt32 nRec, const ORowSetValue& rValue); - virtual sal_Bool Find(sal_uInt32 nRec, const ORowSetValue& rValue); + virtual bool Insert(sal_uInt32 nRec, const ORowSetValue& rValue); + virtual bool Update(sal_uInt32 nRec, const ORowSetValue&, const ORowSetValue&); + virtual bool Delete(sal_uInt32 nRec, const ORowSetValue& rValue); + virtual bool Find(sal_uInt32 nRec, const ORowSetValue& rValue); void createINFEntry(); - sal_Bool CreateImpl(); - sal_Bool DropImpl(); + bool CreateImpl(); + bool DropImpl(); DECLARE_SERVICE_INFO(); protected: - ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, sal_Bool bLoad = sal_False); + ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, bool bLoad = false); void Collect(ONDXPage*); ONDXPagePtr getRoot(); - sal_Bool isUnique() const { return m_IsUnique; } - sal_Bool UseCollector() const {return m_bUseCollector;} + bool isUnique() const { return m_IsUnique; } + bool UseCollector() const {return m_bUseCollector;} // Tree operations void Insert(ONDXPagePtr aCurPage, ONDXNode& rNode); - void Release(sal_Bool bSave = sal_True); - sal_Bool ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue); + void Release(bool bSave = true); + bool ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue); }; SvStream& WriteODbaseIndex(SvStream &rStream, ODbaseIndex&); diff --git a/connectivity/source/inc/dbase/DIndexIter.hxx b/connectivity/source/inc/dbase/DIndexIter.hxx index ac9e1e5eb6fd..6c72c75a8c4b 100644 --- a/connectivity/source/inc/dbase/DIndexIter.hxx +++ b/connectivity/source/inc/dbase/DIndexIter.hxx @@ -42,11 +42,11 @@ namespace connectivity sal_uInt16 m_nCurNode; protected: - sal_uIntPtr Find(sal_Bool bFirst); - sal_uIntPtr GetCompare(sal_Bool bFirst); - sal_uIntPtr GetLike(sal_Bool bFirst); - sal_uIntPtr GetNull(sal_Bool bFirst); - sal_uIntPtr GetNotNull(sal_Bool bFirst); + sal_uIntPtr Find(bool bFirst); + sal_uIntPtr GetCompare(bool bFirst); + sal_uIntPtr GetLike(bool bFirst); + sal_uIntPtr GetNull(bool bFirst); + sal_uIntPtr GetNotNull(bool bFirst); ONDXKey* GetFirstKey(ONDXPage* pPage, const file::OOperand& rKey); diff --git a/connectivity/source/inc/dbase/DResultSet.hxx b/connectivity/source/inc/dbase/DResultSet.hxx index 43b067c59af8..3f167dface22 100644 --- a/connectivity/source/inc/dbase/DResultSet.hxx +++ b/connectivity/source/inc/dbase/DResultSet.hxx @@ -40,13 +40,13 @@ namespace connectivity public ODbaseResultSet_BASE, public ODbaseResultSet_BASE3 { - sal_Bool m_bBookmarkable; + bool m_bBookmarkable; protected: // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE; // OPropertySetHelper virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE; - virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex) SAL_OVERRIDE; + virtual bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex) SAL_OVERRIDE; virtual file::OSQLAnalyzer* createAnalyzer(); public: DECLARE_SERVICE_INFO(); diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index 834bfec2c979..c0ad186ffa38 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -87,7 +87,7 @@ namespace connectivity DBFMemoHeader m_aMemoHeader; SvStream* m_pMemoStream; rtl_TextEncoding m_eEncoding; - sal_Bool m_bWriteableMemo; + bool m_bWriteableMemo; void alterColumn(sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor , @@ -96,15 +96,15 @@ namespace connectivity void fillColumns(); OUString createTempFile(); void copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos); - sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo); - sal_Bool CreateMemoFile(const INetURLObject& aFile); - sal_Bool HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;} - sal_Bool ReadMemoHeader(); - sal_Bool ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable); - - sal_Bool WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr); - sal_Bool WriteBuffer(); - sal_Bool UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols, bool bForceAllFields); + bool CreateFile(const INetURLObject& aFile, bool& bCreateMemo); + bool CreateMemoFile(const INetURLObject& aFile); + bool HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;} + bool ReadMemoHeader(); + bool ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable); + + bool WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr); + bool WriteBuffer(); + bool UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols, bool bForceAllFields); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> isUniqueByColumnName(sal_Int32 _nColumnPos); void AllocBuffer(); @@ -133,8 +133,8 @@ namespace connectivity void construct() SAL_OVERRIDE; // can throw any exception virtual sal_Int32 getCurrentLastPos() const SAL_OVERRIDE; - virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE; - virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) SAL_OVERRIDE; + virtual bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE; + virtual bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, bool _bUseTableDefs, bool bRetrieveData) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; //XTypeProvider @@ -150,19 +150,19 @@ namespace connectivity // XRename virtual void SAL_CALL rename( const OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - sal_Bool DropImpl(); - sal_Bool CreateImpl(); + bool DropImpl(); + bool CreateImpl(); - virtual sal_Bool InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols) SAL_OVERRIDE; - virtual sal_Bool DeleteRow(const OSQLColumns& _rCols) SAL_OVERRIDE; - virtual sal_Bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols) SAL_OVERRIDE; + virtual bool InsertRow(OValueRefVector& rRow, bool bFlush, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols) SAL_OVERRIDE; + virtual bool DeleteRow(const OSQLColumns& _rCols) SAL_OVERRIDE; + virtual bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols) SAL_OVERRIDE; virtual void addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor) SAL_OVERRIDE; virtual void dropColumn(sal_Int32 _nPos) SAL_OVERRIDE; static OUString getEntry(file::OConnection* _pConnection,const OUString& _sURL ); - static sal_Bool Drop_Static(const OUString& _sUrl,sal_Bool _bHasMemoFields,sdbcx::OCollection* _pIndexes ); + static bool Drop_Static(const OUString& _sUrl, bool _bHasMemoFields, sdbcx::OCollection* _pIndexes ); virtual void refreshHeader() SAL_OVERRIDE; diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index b00537a11f82..d79358b4f0af 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -64,17 +64,17 @@ namespace connectivity void setRecord(sal_uInt32 _nRec) { nRecord = _nRec; } void ResetRecord() { nRecord = 0; } - sal_Bool operator == (const ONDXKey& rKey) const; - sal_Bool operator != (const ONDXKey& rKey) const; - sal_Bool operator < (const ONDXKey& rKey) const; - sal_Bool operator <= (const ONDXKey& rKey) const; - sal_Bool operator > (const ONDXKey& rKey) const; - sal_Bool operator >= (const ONDXKey& rKey) const; + bool operator == (const ONDXKey& rKey) const; + bool operator != (const ONDXKey& rKey) const; + bool operator < (const ONDXKey& rKey) const; + bool operator <= (const ONDXKey& rKey) const; + bool operator > (const ONDXKey& rKey) const; + bool operator >= (const ONDXKey& rKey) const; - sal_Bool Load (SvFileStream& rStream, sal_Bool bText); - sal_Bool Write(SvFileStream& rStream, sal_Bool bText); + bool Load (SvFileStream& rStream, bool bText); + bool Write(SvFileStream& rStream, bool bText); - static sal_Bool IsText(sal_Int32 eType); + static bool IsText(sal_Int32 eType); private: int Compare(const ONDXKey& rKey) const; @@ -106,7 +106,7 @@ namespace connectivity ONDXPagePtr& operator=(ONDXPage* pPageRef); sal_uInt32 GetPagePos() const {return nPagePos;} - sal_Bool HasPage() const {return nPagePos != 0;} + bool HasPage() const {return nPagePos != 0;} // sal_Bool Is() const { return isValid(); } }; @@ -120,7 +120,7 @@ namespace connectivity friend SvStream& operator >> (SvStream &rStream, ONDXPage&); sal_uInt32 nPagePos; // Position in the index file - sal_Bool bModified : 1; + bool bModified : 1; sal_uInt16 nCount; ONDXPagePtr aParent, // Parent page @@ -132,13 +132,13 @@ namespace connectivity // Node operations sal_uInt16 Count() const {return nCount;} - sal_Bool Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft = 0); - sal_Bool Insert(sal_uInt16 nIndex, ONDXNode& rNode); - sal_Bool Append(ONDXNode& rNode); - sal_Bool Delete(sal_uInt16); + bool Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft = 0); + bool Insert(sal_uInt16 nIndex, ONDXNode& rNode); + bool Append(ONDXNode& rNode); + bool Delete(sal_uInt16); void Remove(sal_uInt16); - void Release(sal_Bool bSave = sal_True); - void ReleaseFull(sal_Bool bSave = sal_True); + void Release(bool bSave = true); + void ReleaseFull(bool bSave = true); // Split and merge ONDXNode Split(ONDXPage& rPage); @@ -148,13 +148,13 @@ namespace connectivity ONDXNode& operator[] (sal_uInt16 nPos); const ONDXNode& operator[] (sal_uInt16 nPos) const; - sal_Bool IsRoot() const; - sal_Bool IsLeaf() const; - sal_Bool IsModified() const; - sal_Bool HasParent(); - sal_Bool HasChild() const; + bool IsRoot() const; + bool IsLeaf() const; + bool IsModified() const; + bool HasParent(); + bool HasChild() const; - sal_Bool IsFull() const; + bool IsFull() const; sal_uInt32 GetPagePos() const {return nPagePos;} ONDXPagePtr& GetChild(ODbaseIndex* pIndex = 0); @@ -178,10 +178,10 @@ namespace connectivity virtual void QueryDelete() SAL_OVERRIDE; - void SetModified(sal_Bool bMod) {bModified = bMod;} + void SetModified(bool bMod) {bModified = bMod;} void SetPagePos(sal_uInt32 nPage) {nPagePos = nPage;} - sal_Bool Find(const ONDXKey&); // Descend recursively + bool Find(const ONDXKey&); // Descend recursively sal_uInt16 FindPos(const ONDXKey& rKey) const; #if OSL_DEBUG_LEVEL > 1 @@ -192,11 +192,11 @@ namespace connectivity SvStream& WriteONDXPagePtr(SvStream &rStream, const ONDXPagePtr&); SvStream& operator >> (SvStream &rStream, ONDXPagePtr&); - inline sal_Bool ONDXPage::IsRoot() const {return !aParent.Is();} - inline sal_Bool ONDXPage::IsLeaf() const {return !aChild.HasPage();} - inline sal_Bool ONDXPage::IsModified() const {return bModified;} - inline sal_Bool ONDXPage::HasParent() {return aParent.Is();} - inline sal_Bool ONDXPage::HasChild() const {return aChild.HasPage();} + inline bool ONDXPage::IsRoot() const {return !aParent.Is();} + inline bool ONDXPage::IsLeaf() const {return !aChild.HasPage();} + inline bool ONDXPage::IsModified() const {return bModified;} + inline bool ONDXPage::HasParent() {return aParent.Is();} + inline bool ONDXPage::HasChild() const {return aChild.HasPage();} inline ONDXPagePtr ONDXPage::GetParent() {return aParent;} inline void ONDXPage::SetParent(ONDXPagePtr aPa = ONDXPagePtr()) @@ -232,7 +232,7 @@ namespace connectivity :aChild(aPagePtr),aKey(rKey) {} // Does the node point to a page? - sal_Bool HasChild() const {return aChild.HasPage();} + bool HasChild() const {return aChild.HasPage();} // If an index is provided, we may be able to retrieve the page ONDXPagePtr& GetChild(ODbaseIndex* pIndex = NULL, ONDXPage* = NULL); @@ -294,29 +294,29 @@ namespace connectivity return *this; } - inline sal_Bool ONDXKey::operator == (const ONDXKey& rKey) const + inline bool ONDXKey::operator == (const ONDXKey& rKey) const { if(&rKey == this) - return sal_True; + return true; return Compare(rKey) == 0; } - inline sal_Bool ONDXKey::operator != (const ONDXKey& rKey) const + inline bool ONDXKey::operator != (const ONDXKey& rKey) const { return !operator== (rKey); } - inline sal_Bool ONDXKey::operator < (const ONDXKey& rKey) const + inline bool ONDXKey::operator < (const ONDXKey& rKey) const { return Compare(rKey) < 0; } - inline sal_Bool ONDXKey::operator > (const ONDXKey& rKey) const + inline bool ONDXKey::operator > (const ONDXKey& rKey) const { return Compare(rKey) > 0; } - inline sal_Bool ONDXKey::operator <= (const ONDXKey& rKey) const + inline bool ONDXKey::operator <= (const ONDXKey& rKey) const { return !operator > (rKey); } - inline sal_Bool ONDXKey::operator >= (const ONDXKey& rKey) const + inline bool ONDXKey::operator >= (const ONDXKey& rKey) const { return !operator< (rKey); } diff --git a/connectivity/source/inc/file/FConnection.hxx b/connectivity/source/inc/file/FConnection.hxx index 58dd3c03f2ea..a53c8423b586 100644 --- a/connectivity/source/inc/file/FConnection.hxx +++ b/connectivity/source/inc/file/FConnection.hxx @@ -62,12 +62,12 @@ namespace connectivity ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XDynamicResultSet > m_xDir; // directory ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> m_xContent; - sal_Bool m_bClosed; - sal_Bool m_bAutoCommit; - sal_Bool m_bReadOnly; - sal_Bool m_bShowDeleted; - sal_Bool m_bCaseSensitiveExtension; - sal_Bool m_bCheckSQL92; + bool m_bClosed; + bool m_bAutoCommit; + bool m_bReadOnly; + bool m_bShowDeleted; + bool m_bCaseSensitiveExtension; + bool m_bCheckSQL92; bool m_bDefaultTextEncoding; @@ -128,13 +128,13 @@ namespace connectivity // create a catalog or return the catalog already created virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > createCatalog(); - sal_Bool matchesExtension( const OUString& _rExt ) const; + bool matchesExtension( const OUString& _rExt ) const; inline const OUString& getExtension() const { return m_aFilenameExtension; } - inline sal_Bool isCaseSensitveExtension() const { return m_bCaseSensitiveExtension; } + inline bool isCaseSensitveExtension() const { return m_bCaseSensitiveExtension; } inline OFileDriver* getDriver() const { return m_pDriver; } - inline sal_Bool showDeleted() const { return m_bShowDeleted; } - inline sal_Bool isCheckEnabled() const { return m_bCheckSQL92; } + inline bool showDeleted() const { return m_bShowDeleted; } + inline bool isCheckEnabled() const { return m_bCheckSQL92; } inline bool isTextEncodingDefaulted() const { return m_bDefaultTextEncoding; } public: @@ -145,7 +145,7 @@ namespace connectivity GrantAccess() { } }; - void setCaseSensitiveExtension( sal_Bool _bIsCS, GrantAccess ) { m_bCaseSensitiveExtension = _bIsCS; } + void setCaseSensitiveExtension( bool _bIsCS, GrantAccess ) { m_bCaseSensitiveExtension = _bIsCS; } }; } } diff --git a/connectivity/source/inc/file/FDatabaseMetaData.hxx b/connectivity/source/inc/file/FDatabaseMetaData.hxx index 07f36bcd9a2a..27cdd86bc739 100644 --- a/connectivity/source/inc/file/FDatabaseMetaData.hxx +++ b/connectivity/source/inc/file/FDatabaseMetaData.hxx @@ -37,19 +37,19 @@ namespace connectivity { 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; protected: OConnection* m_pConnection; // I need the native class not only the interface virtual ~ODatabaseMetaData(); diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx index 9c99d4f1b22e..ed79248f47b0 100644 --- a/connectivity/source/inc/file/FResultSet.hxx +++ b/connectivity/source/inc/file/FResultSet.hxx @@ -121,31 +121,31 @@ namespace connectivity sal_Int32 m_nLastVisitedPos; sal_Int32 m_nRowCountResult; sal_Int32 m_nColumnCount; - sal_Bool m_bWasNull; - sal_Bool m_bEOF; // after last record - sal_Bool m_bLastRecord; - sal_Bool m_bInserted; // true when moveToInsertRow was called + bool m_bWasNull; + bool m_bEOF; // after last record + bool m_bLastRecord; + bool m_bInserted; // true when moveToInsertRow was called // set to false when cursor moved or cancel - sal_Bool m_bRowUpdated; - sal_Bool m_bRowInserted; - sal_Bool m_bRowDeleted; - sal_Bool m_bShowDeleted; - sal_Bool m_bIsCount; + bool m_bRowUpdated; + bool m_bRowInserted; + bool m_bRowDeleted; + bool m_bShowDeleted; + bool m_bIsCount; void initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount); void construct(); //sal_Bool evaluate(); - sal_Bool ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, + bool ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, sal_Int32 nOffset = 1, - sal_Bool bEvaluate = sal_True, - sal_Bool bRetrieveData = sal_True); + bool bEvaluate = true, + bool bRetrieveData = true); OKeyValue* GetOrderbyKeyValue(OValueRefRow& _rRow); - sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] >= 0;} + bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] >= 0;} // return true when the select statement is "select count(*) from table" - inline sal_Bool isCount() const { return m_bIsCount; } + inline bool isCount() const { return m_bIsCount; } void checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException); const ORowSetValue& getValue(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException); @@ -157,8 +157,8 @@ namespace connectivity using OResultSet_BASE::rBHelper; - sal_Bool Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData); - virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex); + bool Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, bool bRetrieveData); + virtual bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex); // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE; @@ -270,7 +270,7 @@ namespace connectivity // special methods inline sal_Int32 mapColumn(sal_Int32 column); - virtual sal_Bool OpenImpl(); + virtual bool OpenImpl(); virtual void doTableSpecials(const OSQLTable& _xTable); inline sal_Int32 getRowCountResult() const { return m_nRowCountResult; } @@ -296,15 +296,15 @@ namespace connectivity const OValueRefRow& _rSelectRow, const ::rtl::Reference<connectivity::OSQLColumns>& _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<sal_Int32>& _rColMapping); // IResultSetHelper - virtual sal_Bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) SAL_OVERRIDE; + virtual bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) SAL_OVERRIDE; virtual sal_Int32 getDriverPos() const SAL_OVERRIDE; - virtual sal_Bool deletedVisible() const SAL_OVERRIDE; - virtual sal_Bool isRowDeleted() const SAL_OVERRIDE; + virtual bool deletedVisible() const SAL_OVERRIDE; + virtual bool isRowDeleted() const SAL_OVERRIDE; }; inline sal_Int32 OResultSet::mapColumn(sal_Int32 column) diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx index e84985c78fe6..a8d1e07b30e6 100644 --- a/connectivity/source/inc/file/FStatement.hxx +++ b/connectivity/source/inc/file/FStatement.hxx @@ -96,7 +96,7 @@ namespace connectivity sal_Int32 m_nResultSetType; sal_Int32 m_nFetchDirection; sal_Int32 m_nResultSetConcurrency; - sal_Bool m_bEscapeProcessing; + bool m_bEscapeProcessing; ::cppu::OBroadcastHelper& rBHelper; @@ -118,7 +118,7 @@ namespace connectivity void GetAssignValues(); void SetAssignValue(const OUString& aColumnName, const OUString& aValue, - sal_Bool bSetNull = sal_False, + bool bSetNull = false, sal_uInt32 nParameter=SQL_NO_PARAMETER); void ParseAssignValues( const ::std::vector< OUString>& aColumnNameList, connectivity::OSQLParseNode* pRow_Value_Constructor_Elem, sal_Int32 nIndex); diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx index f087a1716029..d341703f0023 100644 --- a/connectivity/source/inc/file/FTable.hxx +++ b/connectivity/source/inc/file/FTable.hxx @@ -44,7 +44,7 @@ namespace connectivity sal_Int32 m_nFilePos; // current IResultSetHelper::Movement sal_uInt8* m_pBuffer; sal_uInt16 m_nBufferSize; // size of the ReadBuffer, if pBuffer != NULL - sal_Bool m_bWriteable; // svstream cann't say if we are writeable + bool m_bWriteable; // svstream cann't say if we are writeable // so we have to virtual void FileClose(); @@ -73,13 +73,13 @@ namespace connectivity OConnection* getConnection() const { return m_pConnection;} virtual sal_Int32 getCurrentLastPos() const {return -1;} - virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) = 0; - virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) = 0; + virtual bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) = 0; + virtual bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool _bUseTableDefs, bool bRetrieveData) = 0; ::rtl::Reference<OSQLColumns> getTableColumns() const {return m_aColumns;} - virtual sal_Bool InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); - virtual sal_Bool DeleteRow(const OSQLColumns& _rCols); - virtual sal_Bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + virtual bool InsertRow(OValueRefVector& rRow, bool bFlush, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + virtual bool DeleteRow(const OSQLColumns& _rCols); + virtual bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); virtual void addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor); virtual void dropColumn(sal_Int32 _nPos); // refresh the header of file based tables to see changes done by someone @@ -88,7 +88,7 @@ namespace connectivity OUString SAL_CALL getName() throw(std::exception) SAL_OVERRIDE { return m_Name; } OUString getSchema() { return m_SchemaName; } - sal_Bool isReadOnly() const { return !m_bWriteable; } + bool isReadOnly() const { return !m_bWriteable; } // m_pFileStream && !m_pFileStream->IsWritable(); } // com::sun::star::lang::XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx index 3a9647ef260a..796c2d6b0ba3 100644 --- a/connectivity/source/inc/file/fanalyzer.hxx +++ b/connectivity/source/inc/file/fanalyzer.hxx @@ -38,8 +38,8 @@ namespace connectivity ::rtl::Reference<OPredicateInterpreter> m_aInterpreter; OConnection* m_pConnection; - mutable sal_Bool m_bHasSelectionCode; - mutable sal_Bool m_bSelectionFirstTime; + mutable bool m_bHasSelectionCode; + mutable bool m_bSelectionFirstTime; void bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList); @@ -71,9 +71,9 @@ namespace connectivity void dispose(); void start(OSQLParseNode* pSQLParseNode); - virtual sal_Bool hasRestriction() const; - virtual sal_Bool hasFunctions() const; - inline sal_Bool evaluateRestriction() { return m_aInterpreter->start(); } + virtual bool hasRestriction() const; + virtual bool hasFunctions() const; + inline bool evaluateRestriction() { return m_aInterpreter->start(); } void setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std::vector<sal_Int32>& _rColumnMapping); void setOrigColumns(const OFileColumns& rCols); virtual OOperandAttr* createOperandAttr(sal_Int32 _nPos, diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index 938ffc728284..842f4cf0eaa2 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -77,7 +77,7 @@ namespace connectivity virtual sal_Int32 getDBType() const {return m_eDBType;} virtual OEvaluateSet* preProcess(OBoolOperator* pOp, OOperand* pRight = 0); - inline sal_Bool isValid() const; + inline bool isValid() const; TYPEINFO_OVERRIDE(); }; @@ -108,7 +108,7 @@ namespace connectivity OOperandAttr(sal_uInt16 _nPos, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn); - virtual sal_Bool isIndexed() const; + virtual bool isIndexed() const; virtual OEvaluateSet* preProcess(OBoolOperator* pOp, OOperand* pRight = 0) SAL_OVERRIDE; TYPEINFO_OVERRIDE(); }; @@ -171,7 +171,7 @@ namespace connectivity class OOperandResultBOOL : public OOperandResult { public: - OOperandResultBOOL(sal_Bool bResult) : OOperandResult(::com::sun::star::sdbc::DataType::BIT) + OOperandResultBOOL(bool bResult) : OOperandResult(::com::sun::star::sdbc::DataType::BIT) { m_aValue = bResult ? 1.0 : 0.0; m_aValue.setBound(true); @@ -215,7 +215,7 @@ namespace connectivity public: TYPEINFO_OVERRIDE(); virtual void Exec(OCodeStack&) SAL_OVERRIDE; - virtual sal_Bool operate(const OOperand*, const OOperand*) const; + virtual bool operate(const OOperand*, const OOperand*) const; }; class OOp_NOT : public OBoolOperator @@ -225,7 +225,7 @@ namespace connectivity protected: virtual void Exec(OCodeStack&) SAL_OVERRIDE; - virtual sal_Bool operate(const OOperand*, const OOperand* = NULL) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand* = NULL) const SAL_OVERRIDE; virtual sal_uInt16 getRequestedOperands() const SAL_OVERRIDE; }; @@ -235,7 +235,7 @@ namespace connectivity TYPEINFO_OVERRIDE(); protected: - virtual sal_Bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; }; class OOp_OR : public OBoolOperator @@ -243,7 +243,7 @@ namespace connectivity public: TYPEINFO_OVERRIDE(); protected: - virtual sal_Bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; }; class OOO_DLLPUBLIC_FILE OOp_ISNULL : public OBoolOperator @@ -253,14 +253,14 @@ namespace connectivity public: virtual void Exec(OCodeStack&) SAL_OVERRIDE; virtual sal_uInt16 getRequestedOperands() const SAL_OVERRIDE; - virtual sal_Bool operate(const OOperand*, const OOperand* = NULL) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand* = NULL) const SAL_OVERRIDE; }; class OOO_DLLPUBLIC_FILE OOp_ISNOTNULL : public OOp_ISNULL { public: TYPEINFO_OVERRIDE(); - virtual sal_Bool operate(const OOperand*, const OOperand* = NULL) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand* = NULL) const SAL_OVERRIDE; }; class OOO_DLLPUBLIC_FILE OOp_LIKE : public OBoolOperator @@ -273,7 +273,7 @@ namespace connectivity public: OOp_LIKE(const sal_Unicode cEsc = L'\0'):cEscape(cEsc){}; - virtual sal_Bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; }; class OOp_NOTLIKE : public OOp_LIKE @@ -283,7 +283,7 @@ namespace connectivity public: OOp_NOTLIKE(const sal_Unicode cEsc = L'\0'):OOp_LIKE(cEsc){}; - virtual sal_Bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; }; class OOO_DLLPUBLIC_FILE OOp_COMPARE : public OBoolOperator @@ -296,7 +296,7 @@ namespace connectivity :aPredicateType(aPType) {} inline sal_Int32 getPredicateType() const { return aPredicateType; } - virtual sal_Bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; + virtual bool operate(const OOperand*, const OOperand*) const SAL_OVERRIDE; }; // Numerical operators @@ -335,7 +335,7 @@ namespace connectivity virtual double operate(const double& fLeft,const double& fRight) const SAL_OVERRIDE; }; - inline sal_Bool OOperand::isValid() const + inline bool OOperand::isValid() const { return getValue().getDouble() != double(0.0); } diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index 91cba8de82f1..1ad755422ad8 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -43,7 +43,7 @@ namespace connectivity OSQLAnalyzer* m_pAnalyzer; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xIndexes; sal_Int32 m_nParamCounter; - sal_Bool m_bORCondition; + bool m_bORCondition; public: OPredicateCompiler(OSQLAnalyzer* pAnalyzer); @@ -63,9 +63,9 @@ namespace connectivity OOperand* execute(connectivity::OSQLParseNode* pPredicateNode); void Clean(); - sal_Bool isClean() const {return m_aCodeList.empty();} - sal_Bool hasCode() const {return !isClean();} - sal_Bool hasORCondition() const {return m_bORCondition;} + bool isClean() const {return m_aCodeList.empty();} + bool hasCode() const {return !isClean();} + bool hasORCondition() const {return m_bORCondition;} void setOrigColumns(const OFileColumns& rCols) { m_orgColumns = rCols; } const OFileColumns getOrigColumns() const { return m_orgColumns; } protected: @@ -89,10 +89,10 @@ namespace connectivity OPredicateInterpreter(const ::rtl::Reference<OPredicateCompiler>& rComp) : m_rCompiler(rComp){} virtual ~OPredicateInterpreter(); - sal_Bool evaluate(OCodeList& rCodeList); + bool evaluate(OCodeList& rCodeList); void evaluateSelection(OCodeList& rCodeList,ORowSetValueDecoratorRef& _rVal); - inline sal_Bool start() + inline bool start() { return evaluate(m_rCompiler->m_aCodeList); } diff --git a/connectivity/source/inc/flat/EConnection.hxx b/connectivity/source/inc/flat/EConnection.hxx index 6f20bac01cee..6b7fa29e9225 100644 --- a/connectivity/source/inc/flat/EConnection.hxx +++ b/connectivity/source/inc/flat/EConnection.hxx @@ -31,7 +31,7 @@ namespace connectivity { private: sal_Int32 m_nMaxRowsToScan; - sal_Bool m_bHeaderLine; // column names in first row + bool m_bHeaderLine; // column names in first row sal_Unicode m_cFieldDelimiter; // look at the name sal_Unicode m_cStringDelimiter; sal_Unicode m_cDecimalDelimiter; @@ -43,7 +43,7 @@ namespace connectivity virtual void construct(const OUString& _rUrl,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo ) throw( ::com::sun::star::sdbc::SQLException) SAL_OVERRIDE; // own methods - inline sal_Bool isHeaderLine() const { return m_bHeaderLine; } + inline bool isHeaderLine() const { return m_bHeaderLine; } inline sal_Unicode getFieldDelimiter() const { return m_cFieldDelimiter; } inline sal_Unicode getStringDelimiter() const { return m_cStringDelimiter; } inline sal_Unicode getDecimalDelimiter() const { return m_cDecimalDelimiter; } diff --git a/connectivity/source/inc/flat/EResultSet.hxx b/connectivity/source/inc/flat/EResultSet.hxx index bf48705eff67..a3b4cead88d7 100644 --- a/connectivity/source/inc/flat/EResultSet.hxx +++ b/connectivity/source/inc/flat/EResultSet.hxx @@ -39,7 +39,7 @@ namespace connectivity public OFlatResultSet_BASE, public OFlatResultSet_BASE3 { - sal_Bool m_bBookmarkable; + bool m_bBookmarkable; protected: // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE; diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx index 97edc6994997..393369ab0735 100644 --- a/connectivity/source/inc/flat/ETable.hxx +++ b/connectivity/source/inc/flat/ETable.hxx @@ -57,7 +57,7 @@ namespace connectivity bool m_bNeedToReadLine; private: void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); - sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo); + bool CreateFile(const INetURLObject& aFile, bool& bCreateMemo); bool readLine(sal_Int32 *pEndPos = NULL, sal_Int32 *pStartPos = NULL, bool nonEmpty = false); void setRowPos(::std::vector<TRowPositionInFile>::size_type rowNum, const TRowPositionInFile &rowPos); void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, sal_Int32& nStartPosFirstLine, sal_Int32& nStartPosFirstLine2, @@ -88,8 +88,8 @@ namespace connectivity void construct() SAL_OVERRIDE; // can throw any exception - virtual sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE; - virtual sal_Bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, sal_Bool bIsTable, sal_Bool bRetrieveData) SAL_OVERRIDE; + virtual bool seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Int32& nCurPos) SAL_OVERRIDE; + virtual bool fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bIsTable, bool bRetrieveData) SAL_OVERRIDE; virtual void refreshHeader() SAL_OVERRIDE; virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/connectivity/source/inc/hsqldb/HColumns.hxx b/connectivity/source/inc/hsqldb/HColumns.hxx index d2d0bb2a77c6..b98f429a366a 100644 --- a/connectivity/source/inc/hsqldb/HColumns.hxx +++ b/connectivity/source/inc/hsqldb/HColumns.hxx @@ -31,10 +31,10 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor() SAL_OVERRIDE; public: OHSQLColumns( ::cppu::OWeakObject& _rParent - ,sal_Bool _bCase + ,bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector - ,sal_Bool _bUseHardRef = sal_True + ,bool _bUseHardRef = true ); }; @@ -51,7 +51,7 @@ namespace connectivity virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE; public: - OHSQLColumn(sal_Bool _bCase); + OHSQLColumn(bool _bCase); virtual void construct() SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/connectivity/source/inc/hsqldb/HDriver.hxx b/connectivity/source/inc/hsqldb/HDriver.hxx index fc79fb112812..0b0fac3d0867 100644 --- a/connectivity/source/inc/hsqldb/HDriver.hxx +++ b/connectivity/source/inc/hsqldb/HDriver.hxx @@ -64,7 +64,7 @@ namespace connectivity // for this Driver ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > m_xDriver; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - sal_Bool m_bInShutDownConnections; + bool m_bInShutDownConnections; /** load the driver we want to delegate. The <member>m_xDriver</member> may be <NULL/> if the driver could not be loaded. diff --git a/connectivity/source/inc/hsqldb/HView.hxx b/connectivity/source/inc/hsqldb/HView.hxx index e211daf59d05..2bb3cfbfe2ea 100644 --- a/connectivity/source/inc/hsqldb/HView.hxx +++ b/connectivity/source/inc/hsqldb/HView.hxx @@ -43,7 +43,7 @@ namespace connectivity { namespace hsqldb public: HView( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, - sal_Bool _bCaseSensitive, + bool _bCaseSensitive, const OUString& _rSchemaName, const OUString& _rName ); diff --git a/connectivity/source/inc/hsqldb/HViews.hxx b/connectivity/source/inc/hsqldb/HViews.hxx index bdd33e553008..1ac2a61d4798 100644 --- a/connectivity/source/inc/hsqldb/HViews.hxx +++ b/connectivity/source/inc/hsqldb/HViews.hxx @@ -29,7 +29,7 @@ namespace connectivity { ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; - sal_Bool m_bInDrop; + bool m_bInDrop; protected: virtual sdbcx::ObjectType createObject(const OUString& _rName) SAL_OVERRIDE; diff --git a/connectivity/source/inc/java/lang/Object.hxx b/connectivity/source/inc/java/lang/Object.hxx index 5fba9d11b24d..628bff320f28 100644 --- a/connectivity/source/inc/java/lang/Object.hxx +++ b/connectivity/source/inc/java/lang/Object.hxx @@ -111,8 +111,8 @@ namespace connectivity static jclass findMyClass(const char* _pClassName); void obtainMethodId(JNIEnv* _pEnv, const char* _pMethodName, const char* _pSignature, jmethodID& _inout_MethodID) const; - sal_Bool callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const; - sal_Bool callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const; + bool callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const; + bool callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const; jobject callResultSetMethod( JNIEnv& _rEnv, const char* _pMethodName, jmethodID& _inout_MethodID ) const; sal_Int32 callIntMethod( const char* _pMethodName, jmethodID& _inout_MethodID,bool _bIgnoreException = false ) const; sal_Int32 callIntMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const; diff --git a/connectivity/source/inc/java/sql/Connection.hxx b/connectivity/source/inc/java/sql/Connection.hxx index dec1231f00fd..a99eb4d56676 100644 --- a/connectivity/source/inc/java/sql/Connection.hxx +++ b/connectivity/source/inc/java/sql/Connection.hxx @@ -52,9 +52,9 @@ namespace connectivity jclass m_Driver_theClass; java::sql::ConnectionLog m_aLogger; - sal_Bool m_bParameterSubstitution; - sal_Bool m_bIgnoreDriverPrivileges; - sal_Bool m_bIgnoreCurrency; + bool m_bParameterSubstitution; + bool m_bIgnoreDriverPrivileges; + bool m_bIgnoreCurrency; ::com::sun::star::uno::Any m_aCatalogRestriction; ::com::sun::star::uno::Any m_aSchemaRestriction; @@ -88,14 +88,14 @@ namespace connectivity DECLARE_SERVICE_INFO(); // A ctor that is needed for returning the object java_sql_Connection( const java_sql_Driver& _rDriver ); - sal_Bool construct( const OUString& url, + bool construct( const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info); const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getConnectionInfo() const { return m_aConnectionInfo; } - inline sal_Bool isIgnoreDriverPrivilegesEnabled() const { return m_bIgnoreDriverPrivileges;} - inline sal_Bool isIgnoreCurrencyEnabled() const { return m_bIgnoreCurrency; } + inline bool isIgnoreDriverPrivilegesEnabled() const { return m_bIgnoreDriverPrivileges;} + inline bool isIgnoreCurrencyEnabled() const { return m_bIgnoreCurrency; } inline const ::com::sun::star::uno::Any& getCatalogRestriction() const { return m_aCatalogRestriction; } inline const ::com::sun::star::uno::Any& getSchemaRestriction() const { return m_aSchemaRestriction; } diff --git a/connectivity/source/inc/java/sql/DatabaseMetaData.hxx b/connectivity/source/inc/java/sql/DatabaseMetaData.hxx index f9c338971adb..7753fda1dca4 100644 --- a/connectivity/source/inc/java/sql/DatabaseMetaData.hxx +++ b/connectivity/source/inc/java/sql/DatabaseMetaData.hxx @@ -50,19 +50,19 @@ namespace connectivity 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 sal_Bool SAL_CALL allProceduresAreCallable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL allTablesAreSelectable( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -200,10 +200,10 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getUDTs( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const ::com::sun::star::uno::Sequence< sal_Int32 >& types ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - sal_Bool impl_callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ); + bool impl_callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ); OUString impl_callStringMethod( const char* _pMethodName, jmethodID& _inout_MethodID ); sal_Int32 impl_callIntMethod( const char* _pMethodName, jmethodID& _inout_MethodID ); - sal_Bool impl_callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ); + bool impl_callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_callResultSetMethod( const char* _pMethodName, jmethodID& _inout_MethodID ); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > diff --git a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx index 5dbde09a91cd..49bf97de6d9a 100644 --- a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx +++ b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx @@ -44,7 +44,7 @@ namespace connectivity OUString name(); OUString description(); OUString value(); - sal_Bool required(); + bool required(); ::com::sun::star::uno::Sequence< OUString> choices(); }; } diff --git a/connectivity/source/inc/java/sql/JStatement.hxx b/connectivity/source/inc/java/sql/JStatement.hxx index 7696cf7a3b88..3c025d0051e2 100644 --- a/connectivity/source/inc/java/sql/JStatement.hxx +++ b/connectivity/source/inc/java/sql/JStatement.hxx @@ -87,7 +87,7 @@ namespace connectivity // Properties sal_Int32 m_nResultSetConcurrency; sal_Int32 m_nResultSetType; - sal_Bool m_bEscapeProcessing; + bool m_bEscapeProcessing; ::cppu::OBroadcastHelper& rBHelper; diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx index 211916c7da59..a4e3a416ab33 100644 --- a/connectivity/source/inc/java/tools.hxx +++ b/connectivity/source/inc/java/tools.hxx @@ -72,7 +72,7 @@ namespace connectivity @return <TRUE/> if an exception is occurred */ - sal_Bool isExceptionOccurred(JNIEnv *pEnv,sal_Bool _bClear); + bool isExceptionOccurred(JNIEnv *pEnv,bool _bClear); jobject createByteInputStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length); jobject createCharArrayReader(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x,sal_Int32 length); diff --git a/connectivity/source/inc/mysql/YColumns.hxx b/connectivity/source/inc/mysql/YColumns.hxx index c379248ffd0b..7810fadf891c 100644 --- a/connectivity/source/inc/mysql/YColumns.hxx +++ b/connectivity/source/inc/mysql/YColumns.hxx @@ -31,10 +31,10 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor() SAL_OVERRIDE; public: OMySQLColumns( ::cppu::OWeakObject& _rParent - ,sal_Bool _bCase + ,bool _bCase ,::osl::Mutex& _rMutex ,const TStringVector &_rVector - ,sal_Bool _bUseHardRef = sal_True + ,bool _bUseHardRef = true ); }; @@ -51,7 +51,7 @@ namespace connectivity virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE; public: - OMySQLColumn(sal_Bool _bCase); + OMySQLColumn(bool _bCase); virtual void construct() SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/connectivity/source/inc/mysql/YViews.hxx b/connectivity/source/inc/mysql/YViews.hxx index 24bc37757ddf..34e050c9f6a8 100644 --- a/connectivity/source/inc/mysql/YViews.hxx +++ b/connectivity/source/inc/mysql/YViews.hxx @@ -28,7 +28,7 @@ namespace connectivity class OViews : public sdbcx::OCollection { ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; - sal_Bool m_bInDrop; + bool m_bInDrop; // OCatalog* m_pParent; protected: virtual sdbcx::ObjectType createObject(const OUString& _rName) SAL_OVERRIDE; @@ -42,7 +42,7 @@ namespace connectivity OViews(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const TStringVector &_rVector) : sdbcx::OCollection(_rParent, true, _rMutex, _rVector) ,m_xMetaData(_rMetaData) - ,m_bInDrop(sal_False) + ,m_bInDrop(false) {} // only the name is identical to ::cppu::OComponentHelper diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx b/connectivity/source/inc/odbc/OBoundParam.hxx index 1c59b3f1210b..ce09e86def23 100644 --- a/connectivity/source/inc/odbc/OBoundParam.hxx +++ b/connectivity/source/inc/odbc/OBoundParam.hxx @@ -137,7 +137,7 @@ namespace connectivity // Sets the flag indicating if this is an OUTPUT parameter - void setOutputParameter (sal_Bool output) + void setOutputParameter (bool output) { outputParameter = output; } @@ -147,7 +147,7 @@ namespace connectivity // Gets the OUTPUT parameter flag - sal_Bool isOutputParameter () + bool isOutputParameter () { return outputParameter; } @@ -177,7 +177,7 @@ namespace connectivity sal_Int32 sqlType; // Java SQL type used to // register an OUT parameter - sal_Bool outputParameter; // true for OUTPUT parameters + bool outputParameter; // true for OUTPUT parameters }; } } diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx index 077bc85814b5..ade4b76e53ad 100644 --- a/connectivity/source/inc/odbc/OConnection.hxx +++ b/connectivity/source/inc/odbc/OConnection.hxx @@ -60,25 +60,25 @@ namespace connectivity // DatabaseMetaData.getTypeInfo. - ::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by - // an operation - OUString m_sUser; // the user name + ::com::sun::star::sdbc::SQLWarning m_aLastWarning; // Last SQLWarning generated by + // an operation + OUString m_sUser; // the user name ODBCDriver* m_pDriver; // Pointer to the owning // driver object SQLHANDLE m_aConnectionHandle; SQLHANDLE m_pDriverHandleCopy; // performance reason sal_Int32 m_nStatementCount; - sal_Bool m_bClosed; - sal_Bool m_bUseCatalog; // should we use the catalog on filebased databases - sal_Bool m_bUseOldDateFormat; - sal_Bool m_bParameterSubstitution; - sal_Bool m_bIgnoreDriverPrivileges; - sal_Bool m_bPreventGetVersionColumns; // #i60273# - sal_Bool m_bReadOnly; + bool m_bClosed; + bool m_bUseCatalog; // should we use the catalog on filebased databases + bool m_bUseOldDateFormat; + bool m_bParameterSubstitution; + bool m_bIgnoreDriverPrivileges; + bool m_bPreventGetVersionColumns; // #i60273# + bool m_bReadOnly; - SQLRETURN OpenConnection(const OUString& aConnectStr,sal_Int32 nTimeOut, sal_Bool bSilent); + SQLRETURN OpenConnection(const OUString& aConnectStr,sal_Int32 nTimeOut, bool bSilent); virtual OConnection* cloneConnection(); // creates a new connection @@ -127,11 +127,11 @@ namespace connectivity SQLHANDLE getConnection() { return m_aConnectionHandle; } // should we use the catalog on filebased databases - inline sal_Bool isCatalogUsed() const { return m_bUseCatalog; } - inline sal_Bool isParameterSubstitutionEnabled() const { return m_bParameterSubstitution; } - inline sal_Bool isIgnoreDriverPrivilegesEnabled() const { return m_bIgnoreDriverPrivileges; } - inline sal_Bool preventGetVersionColumns() const { return m_bPreventGetVersionColumns; } - inline sal_Bool useOldDateFormat() const { return m_bUseOldDateFormat; } + inline bool isCatalogUsed() const { return m_bUseCatalog; } + inline bool isParameterSubstitutionEnabled() const { return m_bParameterSubstitution; } + inline bool isIgnoreDriverPrivilegesEnabled() const { return m_bIgnoreDriverPrivileges; } + inline bool preventGetVersionColumns() const { return m_bPreventGetVersionColumns; } + inline bool useOldDateFormat() const { return m_bUseOldDateFormat; } inline SQLHANDLE getDriverHandle() const { return m_pDriverHandleCopy;} inline ODBCDriver* getDriver() const { return m_pDriver;} inline OUString getUserName() const { return m_sUser; } diff --git a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx index 4870bec23fdd..3b40e4455b32 100644 --- a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx +++ b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx @@ -37,23 +37,23 @@ namespace connectivity { SQLHANDLE m_aConnectionHandle; OConnection* m_pConnection; - sal_Bool m_bUseCatalog; - sal_Bool m_bOdbc3; + bool m_bUseCatalog; + bool m_bOdbc3; // 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; protected: OUString getURLImpl(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > impl_getTypeInfo_throw() SAL_OVERRIDE; diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx index 48b618c6ba8b..c76e81bb0a1c 100644 --- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx @@ -75,8 +75,8 @@ namespace connectivity sal_Int32 m_nRowPos; sal_Int32 m_nDriverColumnCount; // column count of the driver which can sometimes be less than the metadata count SQLRETURN m_nCurrentFetchState; - sal_Bool m_bWasNull; - sal_Bool m_bEOF; // after last record + bool m_bWasNull; + bool m_bEOF; // after last record // set the columncount of the driver void checkColumnCount(); @@ -209,7 +209,7 @@ namespace connectivity void openVersionColumns(const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table)throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void openBestRowIdentifier( const ::com::sun::star::uno::Any& catalog, const OUString& schema, - const OUString& table,sal_Int32 scope,sal_Bool nullable )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + const OUString& table,sal_Int32 scope, bool nullable )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void openForeignKeys( const ::com::sun::star::uno::Any& catalog, const OUString* schema,const OUString* table, const ::com::sun::star::uno::Any& catalog2, const OUString* schema2,const OUString* table2)throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void openExportedKeys(const ::com::sun::star::uno::Any& catalog, const OUString& schema,const OUString& table)throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -217,10 +217,10 @@ namespace connectivity void openPrimaryKeys(const ::com::sun::star::uno::Any& catalog, const OUString& schema,const OUString& table)throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void openTablePrivileges(const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern)throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - void openSpecialColumns(sal_Bool _bRowVer,const ::com::sun::star::uno::Any& catalog, const OUString& schema, - const OUString& table,sal_Int32 scope, sal_Bool nullable )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void openSpecialColumns(bool _bRowVer,const ::com::sun::star::uno::Any& catalog, const OUString& schema, + const OUString& table,sal_Int32 scope, bool nullable )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void openIndexInfo( const ::com::sun::star::uno::Any& catalog, const OUString& schema, - const OUString& table,sal_Bool unique,sal_Bool approximate )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + const OUString& table,bool unique,bool approximate )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); protected: using OPropertySetHelper::getFastPropertyValue; diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx index c6424f685069..23fe63e588b9 100644 --- a/connectivity/source/inc/odbc/OFunctions.hxx +++ b/connectivity/source/inc/odbc/OFunctions.hxx @@ -28,7 +28,7 @@ namespace connectivity { // sal_Bool LoadFunctions(oslModule pODBCso, sal_Bool _bDS=sal_True); -sal_Bool LoadLibrary_ODBC3(OUString &_rPath); +bool LoadLibrary_ODBC3(OUString &_rPath); // sal_Bool LoadLibrary_ADABAS(OUString &_rPath); // Connecting to a data source diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx b/connectivity/source/inc/odbc/OPreparedStatement.hxx index 50460eed8e02..5be9ad902e1a 100644 --- a/connectivity/source/inc/odbc/OPreparedStatement.hxx +++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx @@ -69,7 +69,7 @@ namespace connectivity // Array of bound parameter objects. Each parameter marker will have a // corresponding object to hold bind information, and resulting data. ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; - sal_Bool m_bPrepared; + bool m_bPrepared; void FreeParams(); void putParamData (sal_Int32 index) throw(::com::sun::star::sdbc::SQLException); @@ -86,7 +86,7 @@ namespace connectivity void setParameter(sal_Int32 parameterIndex, sal_Int32 _nType, sal_Int16 _nScale, const OUString &_sData); void setParameter(sal_Int32 parameterIndex, sal_Int32 _nType, const com::sun::star::uno::Sequence< sal_Int8 > &_Data); - sal_Bool isPrepared() const { return m_bPrepared;} + bool isPrepared() const { return m_bPrepared;} void prepareStatement(); void checkParameterIndex(sal_Int32 _parameterIndex); diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx index fb176dc7f301..69b78debee0e 100644 --- a/connectivity/source/inc/odbc/OResultSet.hxx +++ b/connectivity/source/inc/odbc/OResultSet.hxx @@ -130,7 +130,7 @@ namespace connectivity // Else, we read and cache all columns whose number is <= a requested column. // m_aRow[colNumber].getBound() says if it contains an up-to-date value or not. TDataRow m_aRow; - sal_Bool m_bFetchDataInOrder; + bool m_bFetchDataInOrder; SQLHANDLE m_aStatementHandle; SQLHANDLE m_aConnectionHandle; OStatement_Base* m_pStatement; @@ -142,16 +142,16 @@ namespace connectivity sal_Int32 m_nRowPos; mutable sal_uInt32 m_nUseBookmarks; SQLRETURN m_nCurrentFetchState; - sal_Bool m_bWasNull; - sal_Bool m_bEOF; // after last record - sal_Bool m_bLastRecord; - sal_Bool m_bFreeHandle; - sal_Bool m_bInserting; - sal_Bool m_bRowInserted; - sal_Bool m_bRowDeleted; - sal_Bool m_bUseFetchScroll; + bool m_bWasNull; + bool m_bEOF; // after last record + bool m_bLastRecord; + bool m_bFreeHandle; + bool m_bInserting; + bool m_bRowInserted; + bool m_bRowDeleted; + bool m_bUseFetchScroll; - sal_Bool isBookmarkable() const; + bool isBookmarkable() const; sal_Int32 getResultSetConcurrency() const; sal_Int32 getResultSetType() const; sal_Int32 getFetchDirection() const; @@ -171,9 +171,9 @@ namespace connectivity void releaseBuffer(); void updateValue(sal_Int32 columnIndex,SQLSMALLINT _nType,void* _pValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void fillNeededData(SQLRETURN _nRet); - sal_Bool moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData); + bool moveImpl(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData); TVoidPtr allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex); - SQLRETURN unbind(sal_Bool _bUnbindHandle = sal_True); + SQLRETURN unbind(bool _bUnbindHandle = true); SWORD impl_getColumnType_nothrow(sal_Int32 columnIndex); // helper to implement XRow::getXXX in simple cases @@ -182,7 +182,7 @@ namespace connectivity // for simple cases template < typename T > T impl_getValue( const sal_Int32 _nColumnIndex, SQLSMALLINT nType ); // these cases need some special treatment - sal_Bool impl_getBoolean( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + bool impl_getBoolean( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Sequence< sal_Int8 > impl_getBytes( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::util::Date impl_getDate( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::util::Time impl_getTime( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -329,10 +329,10 @@ namespace connectivity virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // IResultSetHelper - virtual sal_Bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, sal_Bool _bRetrieveData) SAL_OVERRIDE; + virtual bool move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nOffset, bool _bRetrieveData) SAL_OVERRIDE; virtual sal_Int32 getDriverPos() const SAL_OVERRIDE; - virtual sal_Bool deletedVisible() const SAL_OVERRIDE; - virtual sal_Bool isRowDeleted() const SAL_OVERRIDE; + virtual bool deletedVisible() const SAL_OVERRIDE; + virtual bool isRowDeleted() const SAL_OVERRIDE; protected: using OPropertySetHelper::getFastPropertyValue; diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx index fa08e6106664..bf8a86b77986 100644 --- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx +++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx @@ -46,7 +46,7 @@ namespace connectivity SQLHANDLE m_aStatementHandle; OConnection* m_pConnection; sal_Int32 m_nColCount; - sal_Bool m_bUseODBC2Types; + bool m_bUseODBC2Types; OUString getCharColAttrib(sal_Int32 column,sal_Int32 ident) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); sal_Int32 getNumColAttrib(sal_Int32 column,sal_Int32 ident) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -56,14 +56,14 @@ namespace connectivity :m_aStatementHandle( _pStmt ) ,m_pConnection(_pConnection) ,m_nColCount(-1) - ,m_bUseODBC2Types(sal_False) + ,m_bUseODBC2Types(false) {} OResultSetMetaData(OConnection* _pConnection, SQLHANDLE _pStmt ,const ::std::vector<sal_Int32> & _vMapping) :m_vMapping(_vMapping) ,m_aStatementHandle( _pStmt ) ,m_pConnection(_pConnection) ,m_nColCount(_vMapping.size()-1) - ,m_bUseODBC2Types(sal_False) + ,m_bUseODBC2Types(false) {} virtual ~OResultSetMetaData(); diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx index 97628b363b2e..ce3d94d5dc4a 100644 --- a/connectivity/source/inc/odbc/OStatement.hxx +++ b/connectivity/source/inc/odbc/OStatement.hxx @@ -86,8 +86,8 @@ namespace connectivity sal_Int32 getFetchDirection() const; sal_Int32 getFetchSize() const; OUString getCursorName() const; - sal_Bool isUsingBookmarks() const; - sal_Bool getEscapeProcessing() const; + bool isUsingBookmarks() const; + bool getEscapeProcessing() const; template < typename T, SQLINTEGER BufferLength > T getStmtOption (SQLINTEGER fOption, T dflt = 0) const; void setQueryTimeOut(sal_Int64 _par0) ; @@ -96,7 +96,7 @@ namespace connectivity void setFetchDirection(sal_Int32 _par0) ; void setFetchSize(sal_Int32 _par0) ; void setCursorName(const OUString &_par0); - void setEscapeProcessing( const sal_Bool _bEscapeProc ); + void setEscapeProcessing( const bool _bEscapeProc ); template < typename T, SQLINTEGER BufferLength > SQLRETURN setStmtOption (SQLINTEGER fOption, T value) const; virtual void setResultSetConcurrency(sal_Int32 _par0) ; @@ -106,7 +106,7 @@ namespace connectivity void reset () throw( ::com::sun::star::sdbc::SQLException); void clearMyResultSet () throw( ::com::sun::star::sdbc::SQLException); void setWarning (const ::com::sun::star::sdbc::SQLWarning &ex) throw( ::com::sun::star::sdbc::SQLException); - sal_Bool lockIfNecessary (const OUString& sql) throw( ::com::sun::star::sdbc::SQLException); + bool lockIfNecessary (const OUString& sql) throw( ::com::sun::star::sdbc::SQLException); sal_Int32 getColumnCount () throw( ::com::sun::star::sdbc::SQLException); @@ -114,7 +114,7 @@ namespace connectivity // getResultSet returns the current result as a ResultSet. It // returns NULL if the current result is not a ResultSet. - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > getResultSet (sal_Bool checkCount) throw( ::com::sun::star::sdbc::SQLException); + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > getResultSet (bool checkCount) throw( ::com::sun::star::sdbc::SQLException); /** creates the driver specific resultset (factory) */ @@ -194,7 +194,7 @@ namespace connectivity @return the cursor properties */ - SQLUINTEGER getCursorProperties(SQLINTEGER _nCursorType,sal_Bool bFirst); + SQLUINTEGER getCursorProperties(SQLINTEGER _nCursorType, bool bFirst); protected: using OPropertySetHelper::getFastPropertyValue; diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx index 780a6eafdb2a..312713261719 100644 --- a/connectivity/source/inc/odbc/OTools.hxx +++ b/connectivity/source/inc/odbc/OTools.hxx @@ -101,7 +101,7 @@ namespace connectivity SQLHANDLE _pContext, SQLSMALLINT _nHandleType, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, - sal_Bool _bNoFound=sal_True, + bool _bNoFound=true, rtl_TextEncoding _nTextEncoding = RTL_TEXTENCODING_MS_1252) throw(::com::sun::star::sdbc::SQLException); @@ -134,7 +134,7 @@ namespace connectivity static void GetInfo(OConnection* _pConnection, SQLHANDLE _aConnectionHandle, SQLUSMALLINT _nInfo, - sal_Bool &_rValue, + bool &_rValue, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); static sal_Int32 MapOdbcType2Jdbc(SQLSMALLINT _nType); @@ -176,8 +176,8 @@ namespace connectivity @param fCType the C type for the ODBC type @param fSqlType the SQL type for the ODBC type */ - static void getBindTypes(sal_Bool _bUseWChar, - sal_Bool _bUseOldTimeDate, + static void getBindTypes(bool _bUseWChar, + bool _bUseOldTimeDate, SQLSMALLINT _nOdbcType, SQLSMALLINT& fCType, SQLSMALLINT& fSqlType); @@ -186,7 +186,7 @@ namespace connectivity SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _fSqlType, - sal_Bool &_bWasNull, + bool &_bWasNull, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, rtl_TextEncoding _nTextEncoding) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -194,13 +194,13 @@ namespace connectivity SQLHANDLE _aStatementHandle, sal_Int32 columnIndex, SQLSMALLINT _fSqlType, - sal_Bool &_bWasNull, + bool &_bWasNull, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); static void 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); @@ -215,14 +215,14 @@ namespace connectivity SQLLEN *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); }; template <class T> void 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, T& _rValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index ba4771e01149..9208b54975b3 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -207,7 +207,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W // obtain the preference list Any aPreferences = xDriverManagerNode->getByName(sDriverPreferenceLocation); #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif aPreferences >>= _rPrecedence; OSL_ENSURE(bSuccess || !aPreferences.hasValue(), "lcl_getDriverPrecedence: invalid value for the preferences node (no string sequence but not NULL)!"); @@ -286,7 +286,7 @@ void OSDBCDriverManager::bootstrapDrivers() { // we got a factory for the driver DriverAccess aDriverDescriptor; - sal_Bool bValidDescriptor = sal_False; + bool bValidDescriptor = false; // can it tell us something about the implementation name? xSI = xSI.query( xFactory ); @@ -294,7 +294,7 @@ void OSDBCDriverManager::bootstrapDrivers() { // yes -> no need to load the driver immediately (load it later when needed) aDriverDescriptor.sImplementationName = xSI->getImplementationName(); aDriverDescriptor.xComponentFactory = xFactory; - bValidDescriptor = sal_True; + bValidDescriptor = true; m_aEventLogger.log( LogLevel::CONFIG, "found SDBC driver $1$, no need to load it", @@ -316,7 +316,7 @@ void OSDBCDriverManager::bootstrapDrivers() if ( xSI.is() ) { aDriverDescriptor.sImplementationName = xSI->getImplementationName(); - bValidDescriptor = sal_True; + bValidDescriptor = true; m_aEventLogger.log( LogLevel::CONFIG, "found SDBC driver $1$, needed to load it", diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx index 4afbde76b52a..9dceeffccb0c 100644 --- a/connectivity/source/parse/PColumn.cxx +++ b/connectivity/source/parse/PColumn.cxx @@ -247,7 +247,7 @@ OOrderColumn::~OOrderColumn() void OOrderColumn::construct() { registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING, - PropertyAttribute::READONLY, const_cast< sal_Bool* >( &m_bAscending ), ::getCppuType( &m_bAscending ) ); + PropertyAttribute::READONLY, const_cast< bool* >( &m_bAscending ), ::getCppuType( &m_bAscending ) ); } ::cppu::IPropertyArrayHelper* OOrderColumn::createArrayHelper() const diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 34916935a249..3e3d74dbb8df 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -321,7 +321,7 @@ void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQu // get the command and the EscapeProcessing properties from the sub query OUString sSubQueryCommand; - sal_Bool bEscapeProcessing = sal_False; + bool bEscapeProcessing = false; try { Reference< XPropertySet > xQueryProperties( _rQuery, UNO_QUERY_THROW ); @@ -984,7 +984,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele OUString sColumnName; OUString aTableRange; sal_Int32 nType = DataType::VARCHAR; - sal_Bool bFkt(sal_False); + bool bFkt(false); pColumnRef = pColumnRef->getChild(0); while ( pColumnRef->getKnownRuleID() != OSQLParseNode::subquery && @@ -1014,7 +1014,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele // LEM FIXME: the if condition is not quite right // many expressions are rules, e.g. "5+3" // or even: "colName + 1" - bFkt = sal_True; + bFkt = true; nType = getFunctionReturnType(pColumnRef); } } @@ -1121,7 +1121,7 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode* pSelectNo OSQLParseNode * pOptAscDesc = pColumnRef->getParent()->getChild(1); OSL_ENSURE(pOptAscDesc != NULL,"OSQLParseTreeIterator: error in parse tree!"); - sal_Bool bAscending = ! (pOptAscDesc && SQL_ISTOKEN(pOptAscDesc,DESC)); + bool bAscending = ! (pOptAscDesc && SQL_ISTOKEN(pOptAscDesc,DESC)); setOrderByColumnName(sColumnName, aTableRange,bAscending); } else @@ -1476,7 +1476,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode } else { - sal_Bool bNotFound = sal_True; + bool bNotFound = true; OSQLColumns::Vector::const_iterator aIter = ::connectivity::find( m_aSelectColumns->get().begin(), m_aSelectColumns->get().end(), @@ -1488,7 +1488,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode pNewColumn->setName(sParameterName); pNewColumn->setRealName(_aColumnName); m_aParameters->get().push_back(pNewColumn); - bNotFound = sal_False; + bNotFound = false; } else if(!_aColumnName.isEmpty())// search in the tables for the right one { @@ -1501,7 +1501,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode pNewColumn->setName(sParameterName); pNewColumn->setRealName(_aColumnName); m_aParameters->get().push_back(pNewColumn); - bNotFound = sal_False; + bNotFound = false; } } if ( bNotFound ) @@ -1790,7 +1790,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _ { OSQLTables::const_iterator aFind = m_pImpl->m_pTables->find(rTableRange); - sal_Bool bError = sal_False; + bool bError = false; if (aFind != m_pImpl->m_pTables->end() && aFind->second.is()) { if (bFkt) @@ -1826,11 +1826,11 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _ _rColumns->get().push_back(xCol); } else - bError = sal_True; + bError = true; } } else - bError = sal_True; + bError = true; // Table does not exist or lacking field if (bError) diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index d5875599bec9..dbf154914317 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -77,13 +77,13 @@ connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER; namespace { - sal_Bool lcl_saveConvertToNumber(const Reference< XNumberFormatter > & _xFormatter,sal_Int32 _nKey,const OUString& _sValue,double& _nrValue) + bool lcl_saveConvertToNumber(const Reference< XNumberFormatter > & _xFormatter,sal_Int32 _nKey,const OUString& _sValue,double& _nrValue) { - sal_Bool bRet = sal_False; + bool bRet = false; try { _nrValue = _xFormatter->convertStringToNumber(_nKey, _sValue); - bRet = sal_True; + bRet = true; } catch(Exception&) { @@ -680,7 +680,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer& rStri OUString sCommand; OSL_VERIFY( xQuery->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_COMMAND ) ) >>= sCommand ); - sal_Bool bEscapeProcessing = sal_False; + bool bEscapeProcessing = false; OSL_VERIFY( xQuery->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_ESCAPEPROCESSING ) ) >>= bEscapeProcessing ); // the query we found here might itself be based on another query, so parse it recursively @@ -788,8 +788,8 @@ bool OSQLParseNode::getTableComponents(const OSQLParseNode* _pTableNode, OSL_ENSURE(_pTableNode,"Wrong use of getTableComponents! _pTableNode is not allowed to be null!"); if(_pTableNode) { - const sal_Bool bSupportsCatalog = _xMetaData.is() && _xMetaData->supportsCatalogsInDataManipulation(); - const sal_Bool bSupportsSchema = _xMetaData.is() && _xMetaData->supportsSchemasInDataManipulation(); + const bool bSupportsCatalog = _xMetaData.is() && _xMetaData->supportsCatalogsInDataManipulation(); + const bool bSupportsSchema = _xMetaData.is() && _xMetaData->supportsSchemasInDataManipulation(); const OSQLParseNode* pTableNode = _pTableNode; // clear the parameter given _rCatalog = Any(); diff --git a/connectivity/source/simpledbt/parsenode_s.cxx b/connectivity/source/simpledbt/parsenode_s.cxx index b32d8a73c55a..fc30c5fcf147 100644 --- a/connectivity/source/simpledbt/parsenode_s.cxx +++ b/connectivity/source/simpledbt/parsenode_s.cxx @@ -36,7 +36,7 @@ namespace connectivity //= OSimpleParseNode - OSimpleParseNode::OSimpleParseNode(const OSQLParseNode* _pNode, sal_Bool _bTakeOwnership) + OSimpleParseNode::OSimpleParseNode(const OSQLParseNode* _pNode, bool _bTakeOwnership) :m_pFullNode(_pNode) ,m_bOwner(_bTakeOwnership) { diff --git a/connectivity/source/simpledbt/parsenode_s.hxx b/connectivity/source/simpledbt/parsenode_s.hxx index 202a1cef9277..7e9fcbb42e83 100644 --- a/connectivity/source/simpledbt/parsenode_s.hxx +++ b/connectivity/source/simpledbt/parsenode_s.hxx @@ -38,10 +38,10 @@ namespace connectivity { protected: const OSQLParseNode* m_pFullNode; - sal_Bool m_bOwner; + bool m_bOwner; public: - OSimpleParseNode(const OSQLParseNode* _pNode, sal_Bool _bTakeOwnership = sal_True); + OSimpleParseNode(const OSQLParseNode* _pNode, bool _bTakeOwnership = true); virtual ~OSimpleParseNode(); // ISQLParseNode diff --git a/connectivity/source/simpledbt/parser_s.cxx b/connectivity/source/simpledbt/parser_s.cxx index 629bf65d78b7..e514abbcf485 100644 --- a/connectivity/source/simpledbt/parser_s.cxx +++ b/connectivity/source/simpledbt/parser_s.cxx @@ -65,7 +65,7 @@ namespace connectivity OSimpleParseNode* pReturn = NULL; OSQLParseNode* pFullNode = const_cast<OSimpleSQLParser*>(this)->m_aFullParser.predicateTree(rErrorMessage, rStatement, _rxFormatter, _rxField); if (pFullNode) - pReturn = new OSimpleParseNode(pFullNode, sal_True); + pReturn = new OSimpleParseNode(pFullNode, true); return pReturn; } diff --git a/include/connectivity/PColumn.hxx b/include/connectivity/PColumn.hxx index 69fdbb2188e9..e5b4c73db2d5 100644 --- a/include/connectivity/PColumn.hxx +++ b/include/connectivity/PColumn.hxx @@ -123,7 +123,7 @@ namespace connectivity class OOO_DLLPUBLIC_DBTOOLS OOrderColumn : public OOrderColumn_BASE, public OOrderColumn_PROP { - const sal_Bool m_bAscending; + const bool m_bAscending; protected: virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE; diff --git a/include/connectivity/parameters.hxx b/include/connectivity/parameters.hxx index 37d70250d3a4..7695e9fdaf00 100644 --- a/include/connectivity/parameters.hxx +++ b/include/connectivity/parameters.hxx @@ -221,7 +221,7 @@ namespace dbtools // XParameters equivalents void setNull ( sal_Int32 _nIndex, sal_Int32 sqlType); void setObjectNull ( sal_Int32 _nIndex, sal_Int32 sqlType, const OUString& typeName); - void setBoolean ( sal_Int32 _nIndex, sal_Bool x); + void setBoolean ( sal_Int32 _nIndex, bool x); void setByte ( sal_Int32 _nIndex, sal_Int8 x); void setShort ( sal_Int32 _nIndex, sal_Int16 x); void setInt ( sal_Int32 _nIndex, sal_Int32 x); |