diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-16 09:14:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-16 11:51:51 +0200 |
commit | 199d333f131474729a105afa5a3da61205f61df2 (patch) | |
tree | 01c0270df697b8857af0ad52fd8bd4502ccf86a0 /connectivity/source/commontools | |
parent | 2f316b07a502b527876462d524061dbf6c9a04d5 (diff) |
connectivity: sal_Bool->bool
Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56
Diffstat (limited to 'connectivity/source/commontools')
20 files changed, 80 insertions, 80 deletions
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 ) ) { |