diff options
Diffstat (limited to 'dbaccess/source/core')
90 files changed, 916 insertions, 916 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx index 5194ca3ae517..37958b0e1623 100644 --- a/dbaccess/source/core/api/BookmarkSet.cxx +++ b/dbaccess/source/core/api/BookmarkSet.cxx @@ -54,13 +54,13 @@ Any SAL_CALL OBookmarkSet::getBookmark() throw(SQLException, RuntimeException) return m_xRowLocate->getBookmark(); } -sal_Bool SAL_CALL OBookmarkSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) +bool SAL_CALL OBookmarkSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OBookmarkSet::moveToBookmark" ); return m_xRowLocate->moveToBookmark(bookmark); } -sal_Bool SAL_CALL OBookmarkSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL OBookmarkSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OBookmarkSet::moveRelativeToBookmark" ); return m_xRowLocate->moveRelativeToBookmark(bookmark,rows); @@ -72,7 +72,7 @@ sal_Int32 SAL_CALL OBookmarkSet::compareBookmarks( const Any& _first, const Any& return m_xRowLocate->compareBookmarks(_first,_second); } -sal_Bool SAL_CALL OBookmarkSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) +bool SAL_CALL OBookmarkSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OBookmarkSet::hasOrderedBookmarks" ); return m_xRowLocate->hasOrderedBookmarks(); diff --git a/dbaccess/source/core/api/BookmarkSet.hxx b/dbaccess/source/core/api/BookmarkSet.hxx index 62b514006ed6..2f86adcafa1b 100644 --- a/dbaccess/source/core/api/BookmarkSet.hxx +++ b/dbaccess/source/core/api/BookmarkSet.hxx @@ -44,10 +44,10 @@ namespace dbaccess virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XRowLocate virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XDeleteRows virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ,const connectivity::OSQLTable& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index c9bf7a10de06..f0de794fb17d 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -131,7 +131,7 @@ void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHan break; case PROPERTY_ID_ISREADONLY: { - sal_Bool bVal = sal_False; + bool bVal = false; rValue >>= bVal; m_isReadOnly.reset(bVal); } @@ -147,7 +147,7 @@ sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedV sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException) { - sal_Bool bModified = sal_False; + bool bModified = false; switch( nHandle ) { case PROPERTY_ID_VALUE: @@ -198,7 +198,7 @@ void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue) } ORowSetDataColumns::ORowSetDataColumns( - sal_Bool _bCase, + bool _bCase, const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx index 18d3b928b5c9..bd6e64154029 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.hxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx @@ -84,7 +84,7 @@ namespace dbaccess virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; public: ORowSetDataColumns( - sal_Bool _bCase, + bool _bCase, const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index b3b7098e3b3f..0523a641d8b7 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -58,9 +58,9 @@ using namespace ::osl; OCacheSet::OCacheSet(sal_Int32 i_nMaxRows) :m_nMaxRows(i_nMaxRows) - ,m_bInserted(sal_False) - ,m_bUpdated(sal_False) - ,m_bDeleted(sal_False) + ,m_bInserted(false) + ,m_bUpdated(false) + ,m_bDeleted(false) { SAL_INFO("dbaccess", "OCacheSet::OCacheSet" ); @@ -530,32 +530,32 @@ Reference< XArray > SAL_CALL OCacheSet::getArray( sal_Int32 columnIndex ) throw( } // XResultSet -sal_Bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::next" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return m_xDriverSet->next(); } -sal_Bool SAL_CALL OCacheSet::isBeforeFirst( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::isBeforeFirst" ); return m_xDriverSet->isBeforeFirst(); } -sal_Bool SAL_CALL OCacheSet::isAfterLast( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::isAfterLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::isAfterLast" ); return m_xDriverSet->isAfterLast(); } -sal_Bool SAL_CALL OCacheSet::isFirst( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::isFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::isFirst" ); return m_xDriverSet->isFirst(); } -sal_Bool SAL_CALL OCacheSet::isLast( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::isLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::isLast" ); return m_xDriverSet->isLast(); @@ -564,28 +564,28 @@ sal_Bool SAL_CALL OCacheSet::isLast( ) throw(SQLException, RuntimeException) void SAL_CALL OCacheSet::beforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::beforeFirst" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_xDriverSet->beforeFirst(); } void SAL_CALL OCacheSet::afterLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::afterLast" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_xDriverSet->afterLast(); } -sal_Bool SAL_CALL OCacheSet::first( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::first( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::first" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return m_xDriverSet->first(); } -sal_Bool SAL_CALL OCacheSet::last( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::last( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::last" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return m_xDriverSet->last(); } @@ -595,38 +595,38 @@ sal_Int32 SAL_CALL OCacheSet::getRow( ) throw(SQLException, RuntimeException) return m_xDriverSet->getRow(); } -sal_Bool SAL_CALL OCacheSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::absolute" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return m_xDriverSet->absolute(row); } -sal_Bool SAL_CALL OCacheSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::relative" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return m_xDriverSet->relative(rows); } -sal_Bool SAL_CALL OCacheSet::previous( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::previous( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::previous" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return m_xDriverSet->previous(); } -sal_Bool OCacheSet::last_checked( sal_Bool /*i_bFetchRow*/) +bool OCacheSet::last_checked( sal_Bool /*i_bFetchRow*/) { return last(); } -sal_Bool OCacheSet::previous_checked( sal_Bool /*i_bFetchRow*/ ) +bool OCacheSet::previous_checked( sal_Bool /*i_bFetchRow*/ ) { return previous(); } -sal_Bool OCacheSet::absolute_checked( sal_Int32 row,sal_Bool /*i_bFetchRow*/ ) +bool OCacheSet::absolute_checked( sal_Int32 row,sal_Bool /*i_bFetchRow*/ ) { return absolute(row); } @@ -637,19 +637,19 @@ void SAL_CALL OCacheSet::refreshRow( ) throw(SQLException, RuntimeException) m_xDriverSet->refreshRow(); } -sal_Bool SAL_CALL OCacheSet::rowUpdated( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::rowUpdated" ); return m_xDriverSet->rowUpdated(); } -sal_Bool SAL_CALL OCacheSet::rowInserted( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::rowInserted( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::rowInserted" ); return m_xDriverSet->rowInserted(); } -sal_Bool SAL_CALL OCacheSet::rowDeleted( ) throw(SQLException, RuntimeException) +bool SAL_CALL OCacheSet::rowDeleted( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OCacheSet::rowDeleted" ); return m_xDriverSet->rowDeleted(); diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx index a06af916f9a2..a42c3ee57fa3 100644 --- a/dbaccess/source/core/api/CacheSet.hxx +++ b/dbaccess/source/core/api/CacheSet.hxx @@ -50,9 +50,9 @@ namespace dbaccess ORowSetRow m_aInsertRow; OUString m_aComposedTableName; sal_Int32 m_nMaxRows; - sal_Bool m_bInserted; - sal_Bool m_bUpdated; - sal_Bool m_bDeleted; + bool m_bInserted; + bool m_bUpdated; + bool m_bDeleted; OUString m_sRowSetFilter; OCacheSet(sal_Int32 i_nMaxRows); @@ -100,30 +100,30 @@ namespace dbaccess virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // ::com::sun::star::sdbc::XResultSet - virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL beforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL afterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // ::com::sun::star::sdbcx::XRowLocate virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; - virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; - virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; + virtual bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; + virtual bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; - virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; + virtual bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; // ::com::sun::star::sdbcx::XDeleteRows virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows,const connectivity::OSQLTable& _xTable ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; @@ -141,9 +141,9 @@ namespace dbaccess virtual bool columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow,const ORowSetValueVector::Vector& i_aRow); virtual bool updateColumnValues(const ORowSetValueVector::Vector& io_aCachedRow,ORowSetValueVector::Vector& io_aRow,const ::std::vector<sal_Int32>& i_aChangedColumns); virtual void fillMissingValues(ORowSetValueVector::Vector& io_aRow) const; - virtual sal_Bool previous_checked( sal_Bool i_bFetchRow ); - virtual sal_Bool absolute_checked( sal_Int32 row,sal_Bool i_bFetchRow ); - virtual sal_Bool last_checked( sal_Bool i_bFetchRow); + virtual bool previous_checked( sal_Bool i_bFetchRow ); + virtual bool absolute_checked( sal_Int32 row,sal_Bool i_bFetchRow ); + virtual bool last_checked( sal_Bool i_bFetchRow); }; } #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_CACHESET_HXX diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 25c356b28c20..4264c7f3f24f 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -168,7 +168,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto // first, filter for the table names sal_Int32 nTableFilterCount = _tableFilter.getLength(); - sal_Bool dontFilterTableNames = ( ( nTableFilterCount == 1 ) && _tableFilter[0] == "%" ); + bool dontFilterTableNames = ( ( nTableFilterCount == 1 ) && _tableFilter[0] == "%" ); if( dontFilterTableNames ) { aFilteredTables = _unfilteredTables; @@ -198,7 +198,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto // second, filter for the table types sal_Int32 nTableTypeFilterCount = _tableTypeFilter.getLength(); - sal_Bool dontFilterTableTypes = ( ( nTableTypeFilterCount == 1 ) && _tableTypeFilter[0] == "%" ); + bool dontFilterTableTypes = ( ( nTableTypeFilterCount == 1 ) && _tableTypeFilter[0] == "%" ); dontFilterTableTypes = dontFilterTableTypes || ( nTableTypeFilterCount == 0 ); // (for TableTypeFilter, unlike TableFilter, "empty" means "do not filter at all") if ( !dontFilterTableTypes ) @@ -238,12 +238,12 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto OFilteredContainer::OFilteredContainer(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const Reference< XConnection >& _xCon, - sal_Bool _bCase, + bool _bCase, IRefreshListener* _pRefreshListener, ::dbtools::IWarningsContainer* _pWarningsContainer ,oslInterlockedCount& _nInAppend) :OCollection(_rParent,_bCase,_rMutex,::std::vector< OUString>()) - ,m_bConstructed(sal_False) + ,m_bConstructed(false) ,m_pWarningsContainer(_pWarningsContainer) ,m_pRefreshListener(_pRefreshListener) ,m_nInAppend(_nInAppend) @@ -283,7 +283,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto reFill( lcl_filter( aUnfilteredTables, _rTableFilter, _rTableTypeFilter, m_xMetaData, m_xMasterContainer ) ); - m_bConstructed = sal_True; + m_bConstructed = true; } else { @@ -334,7 +334,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto if ( tableType == tableTypeEnd ) { // the only table type which can be part of this container is not allowed // by the externally provided table type filter. - m_bConstructed = sal_True; + m_bConstructed = true; return; } } @@ -392,7 +392,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto return; } - m_bConstructed = sal_True; + m_bConstructed = true; } void OFilteredContainer::disposing() @@ -406,7 +406,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto m_xMetaData = NULL; m_pWarningsContainer = NULL; m_pRefreshListener = NULL; - m_bConstructed = sal_False; + m_bConstructed = false; } void OFilteredContainer::impl_refresh() throw(RuntimeException) @@ -414,7 +414,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto SAL_INFO("dbaccess", "api OFilteredContainer::impl_refresh" ); if ( m_pRefreshListener ) { - m_bConstructed = sal_False; + m_bConstructed = false; Reference<XRefreshable> xRefresh(m_xMasterContainer,UNO_QUERY); if ( xRefresh.is() ) xRefresh->refresh(); diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx index 54366b41314a..301596443723 100644 --- a/dbaccess/source/core/api/HelperCollections.cxx +++ b/dbaccess/source/core/api/HelperCollections.cxx @@ -38,18 +38,18 @@ namespace dbaccess using namespace ::osl; OPrivateColumns::OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, - sal_Bool _bCase, + bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - sal_Bool _bUseAsIndex + bool _bUseAsIndex ) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector,_bUseAsIndex) ,m_aColumns(_rColumns) { } OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns, - sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex ) + bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex ) { ::std::vector< OUString > aNames; aNames.reserve( _rColumns->get().size() ); @@ -63,7 +63,7 @@ namespace dbaccess xColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumName; aNames.push_back( sColumName ); } - return new OPrivateColumns( _rColumns, _bCase, _rParent, _rMutex, aNames, sal_False ); + return new OPrivateColumns( _rColumns, _bCase, _rParent, _rMutex, aNames, false ); } void SAL_CALL OPrivateColumns::disposing(void) diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx index 39a472ec596c..5a74ad6ca8c4 100644 --- a/dbaccess/source/core/api/HelperCollections.hxx +++ b/dbaccess/source/core/api/HelperCollections.hxx @@ -54,18 +54,18 @@ namespace dbaccess } public: OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, - sal_Bool _bCase, + bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector, - sal_Bool _bUseAsIndex = sal_False + bool _bUseAsIndex = false ); /** creates a columns instance as above, but taking the names from the columns itself */ static OPrivateColumns* createWithIntrinsicNames( const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns, - sal_Bool _bCase, + bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex ); @@ -87,7 +87,7 @@ namespace dbaccess } public: OPrivateTables( const OSQLTables& _rTables, - sal_Bool _bCase, + bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< OUString> &_rVector diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 78f6a3754b45..59a97552a25f 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -121,7 +121,7 @@ OKeySet::OKeySet(const connectivity::OSQLTable& _xTable, ,m_xComposer(_xComposer) ,m_sUpdateTableName(_rUpdateTableName) ,m_rRowCount(o_nRowCount) - ,m_bRowCountFinal(sal_False) + ,m_bRowCountFinal(false) { SAL_INFO("dbaccess", "OKeySet::OKeySet" ); @@ -218,7 +218,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, continue; Reference<XPropertySet> xProp( xTblColumns->getByName( keyColumn->second.sRealName ), UNO_QUERY ); - sal_Bool bAuto = sal_False; + bool bAuto = false; if ( ( xProp->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= bAuto ) && bAuto ) m_aAutoColumns.push_back( keyColumn->first ); } @@ -342,7 +342,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet, const OUStrin void OKeySet::reset(const Reference< XResultSet>& _xDriverSet) { OCacheSet::construct(_xDriverSet, m_sRowSetFilter); - m_bRowCountFinal = sal_False; + m_bRowCountFinal = false; m_aKeyMap.clear(); OKeySetValue keySetValue((ORowSetValueVector *)NULL,::std::pair<sal_Int32,Reference<XRow> >(0,(Reference<XRow>)NULL)); m_aKeyMap.insert(OKeySetMatrix::value_type(0,keySetValue)); @@ -433,19 +433,19 @@ Any SAL_CALL OKeySet::getBookmark() throw(SQLException, RuntimeException) return makeAny(m_aKeyIter->first); } -sal_Bool SAL_CALL OKeySet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::moveToBookmark" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_aKeyIter = m_aKeyMap.find(::comphelper::getINT32(bookmark)); invalidateRow(); return m_aKeyIter != m_aKeyMap.end(); } -sal_Bool SAL_CALL OKeySet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::moveRelativeToBookmark" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_aKeyIter = m_aKeyMap.find(::comphelper::getINT32(bookmark)); if(m_aKeyIter != m_aKeyMap.end()) { @@ -466,10 +466,10 @@ sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& _first, const Any& _sec return (nFirst != nSecond) ? CompareBookmark::NOT_EQUAL : CompareBookmark::EQUAL; } -sal_Bool SAL_CALL OKeySet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::hasOrderedBookmarks" ); - return sal_True; + return true; } sal_Int32 SAL_CALL OKeySet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) @@ -547,7 +547,7 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows } } - sal_Bool bOk = xPrep->executeUpdate() > 0; + bool bOk = xPrep->executeUpdate() > 0; Sequence< sal_Int32 > aRet(rows.getLength()); memset(aRet.getArray(),bOk,sizeof(sal_Int32)*aRet.getLength()); if(bOk) @@ -561,7 +561,7 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows if(m_aKeyIter == m_aKeyMap.find(nPos) && m_aKeyIter != m_aKeyMap.end()) ++m_aKeyIter; m_aKeyMap.erase(nPos); - m_bDeleted = sal_True; + m_bDeleted = true; } } return aRet; @@ -756,7 +756,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end(); sal_Int32 j = 1; bool bRefetch = true; - sal_Bool bModified = sal_False; + bool bModified = false; for(;aIter != aEnd;++aIter,++j) { if((_rInsertRow->get())[aIter->second.nPosition].isModified()) @@ -767,7 +767,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi } aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + aComma); aValues.append(aPara); - bModified = sal_True; + bModified = true; } } if ( !bModified ) @@ -809,7 +809,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ } m_bInserted = xPrep->executeUpdate() > 0; - sal_Bool bAutoValuesFetched = sal_False; + bool bAutoValuesFetched = false; if ( m_bInserted ) { // first insert the default values into the insertrow @@ -842,7 +842,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ if ( aFind != m_pKeyColumnNames->end() ) (_rInsertRow->get())[aFind->second.nPosition].fill(i, aFind->second.nType, xRow); } - bAutoValuesFetched = sal_True; + bAutoValuesFetched = true; } } } @@ -1081,14 +1081,14 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit if(m_aKeyIter == m_aKeyMap.find(nBookmark) && m_aKeyIter != m_aKeyMap.end()) ++m_aKeyIter; m_aKeyMap.erase(nBookmark); - m_bDeleted = sal_True; + m_bDeleted = true; } } void SAL_CALL OKeySet::cancelRowUpdates( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::cancelRowUpdates" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; } void SAL_CALL OKeySet::moveToInsertRow( ) throw(SQLException, RuntimeException) @@ -1142,13 +1142,13 @@ Reference<XNameAccess> OKeySet::getKeyColumns() const return xKeyColumns; } -sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::next" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; if(isAfterLast()) - return sal_False; + return false; ++m_aKeyIter; if(!m_bRowCountFinal && m_aKeyIter == m_aKeyMap.end()) { @@ -1171,19 +1171,19 @@ sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException) return !isAfterLast(); } -sal_Bool SAL_CALL OKeySet::isBeforeFirst( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::isBeforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::isBeforeFirst" ); return m_aKeyIter == m_aKeyMap.begin(); } -sal_Bool SAL_CALL OKeySet::isAfterLast( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::isAfterLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::isAfterLast" ); return m_bRowCountFinal && m_aKeyIter == m_aKeyMap.end(); } -sal_Bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::isFirst" ); OKeySetMatrix::iterator aTemp = m_aKeyMap.begin(); @@ -1191,11 +1191,11 @@ sal_Bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException) return m_aKeyIter == aTemp && m_aKeyIter != m_aKeyMap.end(); } -sal_Bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::isLast" ); if(!m_bRowCountFinal) - return sal_False; + return false; OKeySetMatrix::iterator aTemp = m_aKeyMap.end(); --aTemp; @@ -1205,7 +1205,7 @@ sal_Bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException) void SAL_CALL OKeySet::beforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::beforeFirst" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_aKeyIter = m_aKeyMap.begin(); invalidateRow(); } @@ -1213,16 +1213,16 @@ void SAL_CALL OKeySet::beforeFirst( ) throw(SQLException, RuntimeException) void SAL_CALL OKeySet::afterLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::afterLast" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; fillAllRows(); m_aKeyIter = m_aKeyMap.end(); invalidateRow(); } -sal_Bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::first" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_aKeyIter = m_aKeyMap.begin(); ++m_aKeyIter; if(m_aKeyIter == m_aKeyMap.end()) @@ -1238,15 +1238,15 @@ sal_Bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException) return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin(); } -sal_Bool SAL_CALL OKeySet::last( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::last( ) throw(SQLException, RuntimeException) { return last_checked(sal_True); } -sal_Bool OKeySet::last_checked( sal_Bool /* i_bFetchRow */ ) +bool OKeySet::last_checked( sal_Bool /* i_bFetchRow */ ) { SAL_INFO("dbaccess", "OKeySet::last_checked" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; bool fetchedRow = fillAllRows(); m_aKeyIter = m_aKeyMap.end(); @@ -1267,15 +1267,15 @@ sal_Int32 SAL_CALL OKeySet::getRow( ) throw(SQLException, RuntimeException) return ::std::distance(m_aKeyMap.begin(),m_aKeyIter); } -sal_Bool SAL_CALL OKeySet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { return absolute_checked(row,sal_True); } -sal_Bool OKeySet::absolute_checked( sal_Int32 row, sal_Bool /* i_bFetchRow */ ) +bool OKeySet::absolute_checked( sal_Int32 row, sal_Bool /* i_bFetchRow */ ) { SAL_INFO("dbaccess", "OKeySet::absolute" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; OSL_ENSURE(row,"absolute(0) isn't allowed!"); bool fetchedRow = false; if(row < 0) @@ -1294,7 +1294,7 @@ sal_Bool OKeySet::absolute_checked( sal_Int32 row, sal_Bool /* i_bFetchRow */ ) if(!m_bRowCountFinal) { // but there may still be rows to fetch. - sal_Bool bNext = sal_True; + bool bNext = true; for(sal_Int32 i=m_aKeyMap.size()-1;i < row && bNext;++i) bNext = fetchRow(); // it is guaranteed that the above loop has executed at least once, @@ -1332,21 +1332,21 @@ sal_Bool OKeySet::absolute_checked( sal_Int32 row, sal_Bool /* i_bFetchRow */ ) return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin(); } -sal_Bool SAL_CALL OKeySet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::relative" ); if(!rows) { invalidateRow(); - return sal_True; + return true; } return absolute(getRow()+rows); } -sal_Bool OKeySet::previous_checked( sal_Bool /* i_bFetchRow */ ) +bool OKeySet::previous_checked( sal_Bool /* i_bFetchRow */ ) { SAL_INFO("dbaccess", "OKeySet::previous" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; if(m_aKeyIter != m_aKeyMap.begin()) { --m_aKeyIter; @@ -1355,7 +1355,7 @@ sal_Bool OKeySet::previous_checked( sal_Bool /* i_bFetchRow */ ) return m_aKeyIter != m_aKeyMap.begin(); } -sal_Bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException) { return previous_checked(sal_True); } @@ -1419,7 +1419,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException) return; } - sal_Bool bOK = doTryRefetch_throw(); + bool bOK = doTryRefetch_throw(); if ( !bOK ) { // This row has disappeared; remove it. @@ -1462,11 +1462,11 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException) } } -sal_Bool OKeySet::fetchRow() +bool OKeySet::fetchRow() { SAL_INFO("dbaccess", "OKeySet::fetchRow" ); // fetch the next row and append on the keyset - sal_Bool bRet = sal_False; + bool bRet = false; if ( !m_bRowCountFinal && (!m_nMaxRows || sal_Int32(m_aKeyMap.size()) < m_nMaxRows) ) bRet = m_xDriverSet->next(); if ( bRet ) @@ -1496,7 +1496,7 @@ sal_Bool OKeySet::fetchRow() m_aKeyIter = m_aKeyMap.insert(OKeySetMatrix::value_type(m_aKeyMap.rbegin()->first+1,OKeySetValue(aKeyRow,::std::pair<sal_Int32,Reference<XRow> >(0,(Reference<XRow>)NULL)))).first; } else - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; return bRet; } @@ -1669,23 +1669,23 @@ Reference< XArray > SAL_CALL OKeySet::getArray( sal_Int32 columnIndex ) throw(SQ return m_xRow->getArray(columnIndex); } -sal_Bool SAL_CALL OKeySet::rowUpdated( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::rowUpdated" ); return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 2; } -sal_Bool SAL_CALL OKeySet::rowInserted( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::rowInserted( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::rowInserted" ); return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 1; } -sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException) +bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OKeySet::rowDeleted" ); - sal_Bool bDeleted = m_bDeleted; - m_bDeleted = sal_False; + bool bDeleted = m_bDeleted; + m_bDeleted = false; return bDeleted; } diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index d2e5c31b2eae..5cc816b3b61e 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -42,17 +42,17 @@ namespace dbaccess sal_Int32 nPosition; sal_Int32 nType; sal_Int32 nScale; - sal_Bool bNullable; + bool bNullable; SelectColumnDescription() :nPosition( 0 ) ,nType( 0 ) ,nScale( 0 ) - ,bNullable(sal_False) + ,bNullable(false) { } - SelectColumnDescription( sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale,sal_Bool _bNullable, const OUString& _rDefaultValue ) + SelectColumnDescription( sal_Int32 _nPosition, sal_Int32 _nType, sal_Int32 _nScale,bool _bNullable, const OUString& _rDefaultValue ) :sDefaultValue( _rDefaultValue ) ,nPosition( _nPosition ) ,nType( _nType ) @@ -109,7 +109,7 @@ namespace dbaccess ::std::vector< OUString > m_aFilterColumns; sal_Int32& m_rRowCount; - sal_Bool m_bRowCountFinal; + bool m_bRowCountFinal; /** copies the values from the insert row into the key row * @@ -122,7 +122,7 @@ namespace dbaccess ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getKeyColumns() const; // returns true if it did any work bool fillAllRows(); - sal_Bool fetchRow(); + bool fetchRow(); void invalidateRow(); void impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData); @@ -185,35 +185,35 @@ namespace dbaccess virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbc::XResultSet - virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL beforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL afterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL ensureRowForData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XRowLocate virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; @@ -228,9 +228,9 @@ namespace dbaccess virtual void SAL_CALL moveToCurrentRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool previous_checked( sal_Bool i_bFetchRow ) SAL_OVERRIDE; - virtual sal_Bool absolute_checked( sal_Int32 row,sal_Bool i_bFetchRow ) SAL_OVERRIDE; - virtual sal_Bool last_checked( sal_Bool i_bFetchRow) SAL_OVERRIDE; + virtual bool previous_checked( sal_Bool i_bFetchRow ) SAL_OVERRIDE; + virtual bool absolute_checked( sal_Int32 row,sal_Bool i_bFetchRow ) SAL_OVERRIDE; + virtual bool last_checked( sal_Bool i_bFetchRow) SAL_OVERRIDE; }; } #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_KEYSET_HXX diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 341cbf84875f..2a60e228e6fc 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -414,7 +414,7 @@ void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const OUString& if(m_aKeyIter == m_aKeyMap.find(nBookmark) && m_aKeyIter != m_aKeyMap.end()) ++m_aKeyIter; m_aKeyMap.erase(nBookmark); - m_bDeleted = sal_True; + m_bDeleted = true; } } diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 508489e68ed6..6eeb20b83264 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -107,7 +107,7 @@ extern "C" void SAL_CALL createRegistryInfo_ORowSet() const Reference< XInterface >* pxInt = pxIntBegin + aListenerSeq.getLength(); \ \ _rGuard.clear(); \ - sal_Bool bCheck = sal_True; \ + bool bCheck = true; \ while( pxInt > pxIntBegin && bCheck ) \ { \ try \ @@ -145,18 +145,18 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ ,m_nPrivileges(0) ,m_nLastKnownRowCount(0) ,m_nInAppend(0) - ,m_bLastKnownRowCountFinal(sal_False) - ,m_bUseEscapeProcessing(sal_True) - ,m_bApplyFilter(sal_False) - ,m_bCommandFacetsDirty( sal_True ) + ,m_bLastKnownRowCountFinal(false) + ,m_bUseEscapeProcessing(true) + ,m_bApplyFilter(false) + ,m_bCommandFacetsDirty( true ) ,m_bParametersDirty( true ) - ,m_bModified(sal_False) - ,m_bRebuildConnOnExecute(sal_False) - ,m_bIsBookmarkable(sal_True) - ,m_bNew(sal_False) - ,m_bCanUpdateInsertedRows(sal_True) - ,m_bOwnConnection(sal_False) - ,m_bPropChangeNotifyEnabled(sal_True) + ,m_bModified(false) + ,m_bRebuildConnOnExecute(false) + ,m_bIsBookmarkable(true) + ,m_bNew(false) + ,m_bCanUpdateInsertedRows(true) + ,m_bOwnConnection(false) + ,m_bPropChangeNotifyEnabled(true) { m_nResultSetType = ResultSetType::SCROLL_SENSITIVE; m_nResultSetConcurrency = ResultSetConcurrency::UPDATABLE; @@ -305,7 +305,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const || ( nHandle == PROPERTY_ID_USER ) ) { - m_bCommandFacetsDirty = sal_True; + m_bCommandFacetsDirty = true; } @@ -315,11 +315,11 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const // the new connection { Reference< XConnection > xNewConnection(m_aActiveConnection,UNO_QUERY); - setActiveConnection(xNewConnection, sal_False); + setActiveConnection(xNewConnection, false); } - m_bOwnConnection = sal_False; - m_bRebuildConnOnExecute = sal_False; + m_bOwnConnection = false; + m_bRebuildConnOnExecute = false; break; case PROPERTY_ID_DATASOURCENAME: @@ -331,7 +331,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const setFastPropertyValue(PROPERTY_ID_ACTIVE_CONNECTION, aNewConn); } else - m_bRebuildConnOnExecute = sal_True; + m_bRebuildConnOnExecute = true; break; case PROPERTY_ID_FETCHSIZE: if(m_pCache) @@ -347,7 +347,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const // are we active at the moment ? if (m_xStatement.is()) // yes -> the next execute needs to rebuild our connection because of this new property - m_bRebuildConnOnExecute = sal_True; + m_bRebuildConnOnExecute = true; else { // no -> drop our active connection (if we have one) as it doesn't correspond to this new property value anymore Reference< XConnection > xNewConn; @@ -356,7 +356,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const setFastPropertyValue(PROPERTY_ID_ACTIVE_CONNECTION, aNewConn); } } - m_bOwnConnection = sal_True; + m_bOwnConnection = true; break; case PROPERTY_ID_TYPEMAP: m_xTypeMap.set(m_aTypeMap, css::uno::UNO_QUERY); @@ -589,23 +589,23 @@ void ORowSet::freeResources( bool _bComplete ) m_xTypeMap = NULL; m_aBookmark = Any(); - m_bBeforeFirst = sal_True; - m_bAfterLast = sal_False; - m_bNew = sal_False; - m_bModified = sal_False; - m_bIsInsertRow = sal_False; - m_bLastKnownRowCountFinal = sal_False; + m_bBeforeFirst = true; + m_bAfterLast = false; + m_bNew = false; + m_bModified = false; + m_bIsInsertRow = false; + m_bLastKnownRowCountFinal = false; m_nLastKnownRowCount = 0; if ( m_aOldRow.is() ) m_aOldRow->clearRow(); impl_disposeParametersContainer_nothrow(); - m_bCommandFacetsDirty = sal_True; + m_bCommandFacetsDirty = true; } } -void ORowSet::setActiveConnection( Reference< XConnection >& _rxNewConn, sal_Bool _bFireEvent ) +void ORowSet::setActiveConnection( Reference< XConnection >& _rxNewConn, bool _bFireEvent ) { if (_rxNewConn.get() == m_xActiveConnection.get()) // nothing to do @@ -883,7 +883,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException, std:: throwFunctionSequenceException(*this); // remember old value for fire - sal_Bool bOld = m_bNew; + bool bOld = m_bNew; ORowSetRow aOldValues; if ( !m_aCurrentRow.isNull() ) @@ -893,14 +893,14 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException, std:: notifyAllListenersRowBeforeChange(aGuard,aEvt); ::std::vector< Any > aBookmarks; - sal_Bool bInserted = m_pCache->insertRow(aBookmarks); + bool bInserted = m_pCache->insertRow(aBookmarks); // make sure that our row is set to the new inserted row before clearing the insert flags in the cache m_pCache->resetInsertRow(bInserted); // notification order // - column values - setCurrentRow( sal_False, sal_True, aOldValues, aGuard ); // we don't move here + setCurrentRow( false, true, aOldValues, aGuard ); // we don't move here // read-only flag restored impl_restoreDataColumnsWriteable_throw(); @@ -916,7 +916,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException, std:: // - IsModified if(!m_bModified) - fireProperty(PROPERTY_ID_ISMODIFIED,sal_False,sal_True); + fireProperty(PROPERTY_ID_ISMODIFIED,false,true); OSL_ENSURE( !m_bModified, "ORowSet::insertRow: just updated, but _still_ modified?" ); // - IsNew @@ -962,7 +962,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException, std:: aEvt.Rows += aBookmarks.size(); m_aBookmark = m_pCache->getBookmark(); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && (*m_pCache->m_aMatrixIter).is() ) { if ( m_pCache->isResultSetChanged() ) @@ -982,7 +982,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException, std:: // - IsModified if(!m_bModified) - fireProperty(PROPERTY_ID_ISMODIFIED,sal_False,sal_True); + fireProperty(PROPERTY_ID_ISMODIFIED,false,true); OSL_ENSURE( !m_bModified, "ORowSet::updateRow: just updated, but _still_ modified?" ); // - RowCount/IsRowCountFinal @@ -1046,7 +1046,7 @@ void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException, std:: fireRowcount(); } -void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQLException, RuntimeException ) ) +void ORowSet::implCancelRowUpdates( bool _bNotifyModified ) SAL_THROW( ( SQLException, RuntimeException ) ) { ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed); @@ -1072,7 +1072,7 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL m_aBookmark = m_pCache->getBookmark(); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; m_aCurrentRow.setBookmark(m_aBookmark); // notification order @@ -1081,13 +1081,13 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL { // - column values ORowSetBase::firePropertyChange(aOldValues); - fireProperty(PROPERTY_ID_ISMODIFIED,sal_False,sal_True); + fireProperty(PROPERTY_ID_ISMODIFIED,false,true); } } void SAL_CALL ORowSet::cancelRowUpdates( ) throw(SQLException, RuntimeException, std::exception) { - implCancelRowUpdates( sal_True ); + implCancelRowUpdates( true ); } void SAL_CALL ORowSet::addRowSetListener( const Reference< XRowSetListener >& listener ) throw(RuntimeException, std::exception) @@ -1132,7 +1132,7 @@ void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard, _rGuard.reset(); } -sal_Bool ORowSet::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard) +bool ORowSet::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard) { EventObject aEvt(*m_pMySelf); NOTIFY_LISTERNERS_CHECK(m_aApproveListeners,XRowSetApproveListener,approveCursorMove); @@ -1149,7 +1149,7 @@ void ORowSet::notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rG void ORowSet::fireRowcount() { sal_Int32 nCurrentRowCount( impl_getRowCount() ); - sal_Bool bCurrentRowCountFinal( m_pCache->m_bRowCountFinal ); + bool bCurrentRowCountFinal( m_pCache->m_bRowCountFinal ); if ( m_nLastKnownRowCount != nCurrentRowCount ) { @@ -1187,7 +1187,7 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException, { positionCache( MOVE_FORWARD ); m_pCache->next(); - setCurrentRow( sal_True, sal_False, aOldValues, aGuard); + setCurrentRow( true, false, aOldValues, aGuard); } else positionCache( MOVE_NONE_REFRESH_ONLY ); @@ -1200,12 +1200,12 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException, ) aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) ); - const sal_Bool bNewState = m_bNew; - const sal_Bool bModState = m_bModified; + const bool bNewState = m_bNew; + const bool bModState = m_bModified; m_pCache->moveToInsertRow(); m_aCurrentRow = m_pCache->m_aInsertRow; - m_bIsInsertRow = sal_True; + m_bIsInsertRow = true; // set read-only flag to false impl_setDataColumnsWriteable_throw(); @@ -1238,7 +1238,7 @@ void ORowSet::impl_setDataColumnsWriteable_throw() ::std::vector<bool, std::allocator<bool> >::iterator aReadIter = m_aReadOnlyDataColumns.begin(); for(;aIter != m_aDataColumns.end();++aIter,++aReadIter) { - sal_Bool bReadOnly = sal_False; + bool bReadOnly = false; (*aIter)->getPropertyValue(PROPERTY_ISREADONLY) >>= bReadOnly; *aReadIter = bReadOnly; @@ -1253,7 +1253,7 @@ void ORowSet::impl_restoreDataColumnsWriteable_throw() ::std::vector<bool, std::allocator<bool> >::iterator aReadIter = m_aReadOnlyDataColumns.begin(); for(;aReadIter != m_aReadOnlyDataColumns.end();++aIter,++aReadIter) { - (*aIter)->setPropertyValue(PROPERTY_ISREADONLY,makeAny((sal_Bool)*aReadIter )); + (*aIter)->setPropertyValue(PROPERTY_ISREADONLY, makeAny( (bool)*aReadIter ) ); } m_aReadOnlyDataColumns.clear(); } @@ -1464,7 +1464,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl setActiveConnection( xXConnection ); } calcConnection( _rxHandler ); - m_bRebuildConnOnExecute = sal_False; + m_bRebuildConnOnExecute = false; Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext ); Reference<XParametersSupplier> xParameters(xComposer, UNO_QUERY); @@ -1572,7 +1572,7 @@ void SAL_CALL ORowSet::execute( ) throw(SQLException, RuntimeException, std::ex } calcConnection(NULL); - m_bRebuildConnOnExecute = sal_False; + m_bRebuildConnOnExecute = false; // do the real execute execute_NoApprove_NoNewConn(aGuard); @@ -1587,7 +1587,7 @@ void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxSta // there *might* be a data source setting which tells use to be more defensive with those settings // #i15113# - sal_Bool bRespectDriverRST = sal_False; + bool bRespectDriverRST = false; Any aSetting; if ( getDataSourceSetting( ::dbaccess::getDataSource( m_xActiveConnection ), "RespectDriverResultSetType", aSetting ) ) { @@ -1708,7 +1708,7 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw() } m_pCache->setFetchSize(m_nFetchSize); m_aCurrentRow = m_pCache->createIterator(this); - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; m_aOldRow = m_pCache->registerOldRow(); return xResultSet; @@ -1922,7 +1922,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi // retrieve the column number |i| Reference<XPropertySet> xColumn; { - sal_Bool bReFetchName = sal_False; + bool bReFetchName = false; if (m_xColumns->hasByName(sColumnLabel)) m_xColumns->getByName(sColumnLabel) >>= xColumn; if (!xColumn.is() && m_xColumns->hasByName(sName)) @@ -1932,7 +1932,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi if ( aAllColumns.find( xColumn ) != aAllColumns.end() ) { xColumn = NULL; - bReFetchName = sal_True; + bReFetchName = true; sColumnLabel = ""; } if(!xColumn.is()) @@ -2202,7 +2202,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH } } setActiveConnection(xNewConn); - m_bOwnConnection = sal_True; + m_bOwnConnection = true; } return m_xActiveConnection; } @@ -2225,7 +2225,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw() if ( !m_xActiveConnection.is() ) throw SQLException(DBA_RES(RID_STR_CONNECTION_INVALID),*this,SQLSTATE_GENERAL,1000,Any() ); - sal_Bool bCase = sal_True; + bool bCase = true; try { Reference<XDatabaseMetaData> xMeta = m_xActiveConnection->getMetaData(); @@ -2263,9 +2263,9 @@ void ORowSet::impl_resetTables_nothrow() DELETEZ( m_pTables ); } -sal_Bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute ) +bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute ) { - sal_Bool bUseEscapeProcessing = impl_buildActiveCommand_throw( ); + bool bUseEscapeProcessing = impl_buildActiveCommand_throw( ); _out_rCommandToExecute = m_aActiveCommand; if ( !bUseEscapeProcessing ) return bUseEscapeProcessing; @@ -2312,17 +2312,17 @@ sal_Bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute ) _out_rCommandToExecute = m_xComposer->getQueryWithSubstitution(); - m_bCommandFacetsDirty = sal_False; + m_bCommandFacetsDirty = false; return bUseEscapeProcessing; } -sal_Bool ORowSet::impl_buildActiveCommand_throw() +bool ORowSet::impl_buildActiveCommand_throw() { // create the sql command // from a table name or get the command out of a query (not a view) // the last use the command as it is - sal_Bool bDoEscapeProcessing = m_bUseEscapeProcessing; + bool bDoEscapeProcessing = m_bUseEscapeProcessing; m_aActiveCommand = ""; OUString sCommand; @@ -2373,7 +2373,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw() xQuery->getPropertyValue(PROPERTY_ESCAPE_PROCESSING) >>= bDoEscapeProcessing; if ( bDoEscapeProcessing != m_bUseEscapeProcessing ) { - sal_Bool bOldValue = m_bUseEscapeProcessing; + bool bOldValue = m_bUseEscapeProcessing; m_bUseEscapeProcessing = bDoEscapeProcessing; fireProperty(PROPERTY_ID_ESCAPE_PROCESSING,bOldValue,bDoEscapeProcessing); } @@ -2663,26 +2663,26 @@ void ORowSet::doCancelModification( ) impl_restoreDataColumnsWriteable_throw(); m_pCache->cancelRowModification(); } - m_bModified = sal_False; - m_bIsInsertRow = sal_False; + m_bModified = false; + m_bIsInsertRow = false; } -sal_Bool ORowSet::isModification( ) +bool ORowSet::isModification( ) { return isNew(); } -sal_Bool ORowSet::isModified( ) +bool ORowSet::isModified( ) { return m_bModified; } -sal_Bool ORowSet::isNew( ) +bool ORowSet::isNew( ) { return m_bNew; } -sal_Bool ORowSet::isPropertyChangeNotificationEnabled() const +bool ORowSet::isPropertyChangeNotificationEnabled() const { return m_bPropChangeNotifyEnabled; } @@ -2693,7 +2693,7 @@ void ORowSet::checkUpdateIterator() { m_pCache->setUpdateIterator(m_aCurrentRow); m_aCurrentRow = m_pCache->m_aInsertRow; - m_bIsInsertRow = sal_True; + m_bIsInsertRow = true; } } @@ -2721,7 +2721,7 @@ void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException, std: // notification order: if ( m_bModified && m_pCache ) - implCancelRowUpdates( sal_False ); // do _not_ notify the IsModify - will do this ourself below + implCancelRowUpdates( false ); // do _not_ notify the IsModify - will do this ourself below // - column values ORowSetBase::refreshRow(); @@ -2757,13 +2757,13 @@ ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowS ,m_pParent(&rParent) ,m_nFetchDirection(rParent.m_nFetchDirection) ,m_nFetchSize(rParent.m_nFetchSize) - ,m_bIsBookmarkable(sal_True) + ,m_bIsBookmarkable(true) { m_nResultSetType = rParent.m_nResultSetType; m_nResultSetConcurrency = ResultSetConcurrency::READ_ONLY; m_pMySelf = this; - m_bClone = sal_True; + m_bClone = true; m_bBeforeFirst = rParent.m_bBeforeFirst; m_bAfterLast = rParent.m_bAfterLast; m_pCache = rParent.m_pCache; @@ -2960,19 +2960,19 @@ void ORowSetClone::doCancelModification( ) { } -sal_Bool ORowSetClone::isModification( ) +bool ORowSetClone::isModification( ) { - return sal_False; + return false; } -sal_Bool ORowSetClone::isModified( ) +bool ORowSetClone::isModified( ) { - return sal_False; + return false; } -sal_Bool ORowSetClone::isNew( ) +bool ORowSetClone::isNew( ) { - return sal_False; + return false; } void SAL_CALL ORowSetClone::execute( ) throw(SQLException, RuntimeException, std::exception) diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx index a793f5046161..e4cf71b312ea 100644 --- a/dbaccess/source/core/api/RowSet.hxx +++ b/dbaccess/source/core/api/RowSet.hxx @@ -124,18 +124,18 @@ namespace dbaccess sal_Int32 m_nPrivileges; sal_Int32 m_nLastKnownRowCount; oslInterlockedCount m_nInAppend; - sal_Bool m_bLastKnownRowCountFinal; - sal_Bool m_bUseEscapeProcessing ; - sal_Bool m_bApplyFilter ; - sal_Bool m_bCommandFacetsDirty; // any of the facets which define the active command is dirty + bool m_bLastKnownRowCountFinal; + bool m_bUseEscapeProcessing ; + bool m_bApplyFilter ; + bool m_bCommandFacetsDirty; // any of the facets which define the active command is dirty bool m_bParametersDirty; // parameters changed since execute - sal_Bool m_bModified ; - sal_Bool m_bRebuildConnOnExecute ; - sal_Bool m_bIsBookmarkable ; - sal_Bool m_bNew ; - sal_Bool m_bCanUpdateInsertedRows; - sal_Bool m_bOwnConnection; - sal_Bool m_bPropChangeNotifyEnabled; + bool m_bModified ; + bool m_bRebuildConnOnExecute ; + bool m_bIsBookmarkable ; + bool m_bNew ; + bool m_bCanUpdateInsertedRows; + bool m_bOwnConnection; + bool m_bPropChangeNotifyEnabled; private: /** builds m_aActiveCommand from our settings @@ -145,7 +145,7 @@ namespace dbaccess from our own EscapeProcessing property, and possibly overruled by the respective property of a query we're based on. */ - sal_Bool impl_buildActiveCommand_throw(); + bool impl_buildActiveCommand_throw(); /** initializes our query composer, and everything which has to do with it @@ -173,7 +173,7 @@ namespace dbaccess @throws com::sun::star::uno::RuntimeException if any of the components involved throws a com::sun::star::uno::RuntimeException */ - sal_Bool impl_initComposer_throw( OUString& _out_rCommandToExecute ); + bool impl_initComposer_throw( OUString& _out_rCommandToExecute ); /** returns the table container of our active connection @@ -232,15 +232,15 @@ namespace dbaccess virtual void fireRowcount() SAL_OVERRIDE; void notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const ::com::sun::star::sdb::RowChangeEvent &rEvt); void notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,const ::com::sun::star::sdb::RowsChangeEvent& rEvt); - virtual sal_Bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard) SAL_OVERRIDE; + virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard) SAL_OVERRIDE; virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard) SAL_OVERRIDE; virtual void notifyAllListeners(::osl::ResettableMutexGuard& _rGuard) SAL_OVERRIDE; - virtual void doCancelModification( ) SAL_OVERRIDE; - virtual sal_Bool isModification( ) SAL_OVERRIDE; - virtual sal_Bool isModified( ) SAL_OVERRIDE; - virtual sal_Bool isNew( ) SAL_OVERRIDE; - virtual sal_Bool isPropertyChangeNotificationEnabled() const SAL_OVERRIDE; + virtual void doCancelModification( ) SAL_OVERRIDE; + virtual bool isModification( ) SAL_OVERRIDE; + virtual bool isModified( ) SAL_OVERRIDE; + virtual bool isNew( ) SAL_OVERRIDE; + virtual bool isPropertyChangeNotificationEnabled() const SAL_OVERRIDE; virtual ~ORowSet(); @@ -412,9 +412,9 @@ namespace dbaccess void approveExecution() throw (::com::sun::star::sdb::RowSetVetoException, ::com::sun::star::uno::RuntimeException); /// set m_xActiveConnection, fire a PropertyChangeEvent if necessary, do the event listener handling etc - void setActiveConnection( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxNewConn, sal_Bool _bFireEvent = sal_True ); + void setActiveConnection( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxNewConn, bool _bFireEvent = true ); - void implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) ); + void implCancelRowUpdates( bool _bNotifyModified ) SAL_THROW( ( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) ); /** sets the given result set type/concurrency at the given statement, while respecting possibly related data source settings @@ -467,14 +467,14 @@ namespace dbaccess ORowSet* m_pParent; sal_Int32 m_nFetchDirection; sal_Int32 m_nFetchSize; - sal_Bool m_bIsBookmarkable; + bool m_bIsBookmarkable; protected: // the clone can not insert anything virtual void doCancelModification( ) SAL_OVERRIDE; - virtual sal_Bool isModification( ) SAL_OVERRIDE; - virtual sal_Bool isModified( ) SAL_OVERRIDE; - virtual sal_Bool isNew( ) SAL_OVERRIDE; + virtual bool isModification( ) SAL_OVERRIDE; + virtual bool isModified( ) SAL_OVERRIDE; + virtual bool isNew( ) SAL_OVERRIDE; virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE; public: diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 104927481355..204e37e947d2 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -88,11 +88,11 @@ ORowSetBase::ORowSetBase( const Reference<XComponentContext>& _rContext, ::cppu: ,m_nDeletedPosition(-1) ,m_nResultSetType( ResultSetType::FORWARD_ONLY ) ,m_nResultSetConcurrency( ResultSetConcurrency::READ_ONLY ) - ,m_bClone(sal_False) - ,m_bIgnoreResult(sal_False) - ,m_bBeforeFirst(sal_True) // changed from sal_False - ,m_bAfterLast(sal_False) - ,m_bIsInsertRow(sal_False) + ,m_bClone(false) + ,m_bIgnoreResult(false) + ,m_bBeforeFirst(true) // changed from sal_False + ,m_bAfterLast(false) + ,m_bIsInsertRow(false) { SAL_INFO("dbaccess", "ORowSetBase::ORowSetBase" ); @@ -200,7 +200,7 @@ sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException, return impl_wasNull(); } -sal_Bool ORowSetBase::impl_wasNull() +bool ORowSetBase::impl_wasNull() { SAL_INFO("dbaccess", "ORowSetBase::impl_wasNull" ); return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True; @@ -233,7 +233,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex) // currentrow is null when the clone moves the window positionCache( MOVE_NONE_REFRESH_ONLY ); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getValue: we don't stand on a valid row! Row is null."); bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() ); @@ -373,7 +373,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS { positionCache( MOVE_NONE_REFRESH_ONLY ); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; OSL_ENSURE(!m_aCurrentRow.isNull(),"ORowSetBase::getBinaryStream: we don't stand on a valid row! Row is null."); bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() ); @@ -464,11 +464,11 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx checkCache(); - sal_Bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); + bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); if ( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); + bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary @@ -482,7 +482,7 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); } else { @@ -507,11 +507,11 @@ sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_ checkPositioningAllowed(); - sal_Bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); + bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); if ( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || rowDeleted(); + bool bWasNew = m_pCache->m_bNew || rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary @@ -525,7 +525,7 @@ sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_ // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); } else movementFailed(); @@ -614,11 +614,11 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException, st ::osl::ResettableMutexGuard aGuard( *m_pMutex ); checkCache(); - sal_Bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); + bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); if ( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); + bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary @@ -626,7 +626,7 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException, st ORowSetRow aOldValues = getOldRow(bWasNew); positionCache( MOVE_FORWARD ); - sal_Bool bAfterLast = m_pCache->isAfterLast(); + bool bAfterLast = m_pCache->isAfterLast(); bRet = m_pCache->next(); doCancelModification( ); @@ -635,7 +635,7 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException, st // notification order // - column values // - cursorMoved - setCurrentRow( bRet, sal_True, aOldValues, aGuard ); + setCurrentRow( bRet, true, aOldValues, aGuard ); OSL_ENSURE(!m_bBeforeFirst,"BeforeFirst is true. I don't know why?"); } else @@ -679,7 +679,7 @@ sal_Bool SAL_CALL ORowSetBase::isAfterLast( ) throw(SQLException, RuntimeExcept return m_bAfterLast; } -sal_Bool ORowSetBase::isOnFirst() +bool ORowSetBase::isOnFirst() { SAL_INFO("dbaccess", "ORowSetBase::isOnFirst" ); return isFirst(); @@ -700,13 +700,13 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException, if ( impl_rowDeleted() ) return ( m_nDeletedPosition == 1 ); - sal_Bool bIsFirst = m_pCache->isFirst(); + bool bIsFirst = m_pCache->isFirst(); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::isFirst() = " << bIsFirst << " Clone = " << m_bClone); return bIsFirst; } -sal_Bool ORowSetBase::isOnLast() +bool ORowSetBase::isOnLast() { SAL_INFO("dbaccess", "ORowSetBase::isOnLast" ); return isLast(); @@ -731,7 +731,7 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException, return ( m_nDeletedPosition == impl_getRowCount() ); } - sal_Bool bIsLast = m_pCache->isLast(); + bool bIsLast = m_pCache->isLast(); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::isLast() = " << bIsLast << " Clone = " << m_bClone); return bIsLast; @@ -747,7 +747,7 @@ void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException, checkPositioningAllowed(); // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); + bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); if((bWasNew || !m_bBeforeFirst) && notifyAllListenersCursorBeforeMove(aGuard) ) { @@ -763,7 +763,7 @@ void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException, // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); // - IsModified // - Isnew @@ -788,7 +788,7 @@ void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException, s ::osl::ResettableMutexGuard aGuard( *m_pMutex ); checkPositioningAllowed(); - sal_Bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); + bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); if((bWasNew || !m_bAfterLast) && notifyAllListenersCursorBeforeMove(aGuard) ) { @@ -806,7 +806,7 @@ void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException, s // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); // - IsModified // - Isnew @@ -819,8 +819,8 @@ void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException, s SAL_INFO("dbaccess", "DBACCESS ORowSetBase::afterLast() Clone = " << m_bClone); } -sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aCheckFunctor, - ::std::mem_fun_t<sal_Bool,ORowSetCache>& _aMovementFunctor) +bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<bool,ORowSetBase>& _aCheckFunctor, + ::std::mem_fun_t<bool,ORowSetCache>& _aMovementFunctor) { SAL_INFO("dbaccess", "ORowSetBase::move" ); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::move() Clone = " << m_bClone); @@ -828,18 +828,18 @@ sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& ::osl::ResettableMutexGuard aGuard( *m_pMutex ); checkPositioningAllowed(); - sal_Bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); + bool bRet( notifyAllListenersCursorBeforeMove( aGuard ) ); if( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || rowDeleted(); + bool bWasNew = m_pCache->m_bNew || rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary ORowSetRow aOldValues = getOldRow(bWasNew); - sal_Bool bMoved = ( bWasNew || !_aCheckFunctor(this) ); + bool bMoved = ( bWasNew || !_aCheckFunctor(this) ); bRet = _aMovementFunctor(m_pCache); doCancelModification( ); @@ -849,7 +849,7 @@ sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& // notification order // - column values // - cursorMoved - setCurrentRow( bMoved, sal_True, aOldValues, aGuard ); + setCurrentRow( bMoved, true, aOldValues, aGuard ); } else { // first goes wrong so there is no row @@ -871,8 +871,8 @@ sal_Bool SAL_CALL ORowSetBase::first( ) throw(SQLException, RuntimeException, s { SAL_INFO("dbaccess", "ORowSetBase::first" ); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::first() Clone = " << m_bClone); - ::std::mem_fun_t<sal_Bool,ORowSetBase> ioF_tmp(&ORowSetBase::isOnFirst); - ::std::mem_fun_t<sal_Bool,ORowSetCache> F_tmp(&ORowSetCache::first); + ::std::mem_fun_t<bool,ORowSetBase> ioF_tmp(&ORowSetBase::isOnFirst); + ::std::mem_fun_t<bool,ORowSetCache> F_tmp(&ORowSetCache::first); return move(ioF_tmp,F_tmp); } @@ -880,8 +880,8 @@ sal_Bool SAL_CALL ORowSetBase::last( ) throw(SQLException, RuntimeException, st { SAL_INFO("dbaccess", "ORowSetBase::last" ); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::last() Clone = " << m_bClone); - ::std::mem_fun_t<sal_Bool,ORowSetBase> ioL_tmp(&ORowSetBase::isOnLast); - ::std::mem_fun_t<sal_Bool,ORowSetCache> L_tmp(&ORowSetCache::last); + ::std::mem_fun_t<bool,ORowSetBase> ioL_tmp(&ORowSetBase::isOnLast); + ::std::mem_fun_t<bool,ORowSetCache> L_tmp(&ORowSetCache::last); return move(ioL_tmp,L_tmp); } @@ -930,12 +930,12 @@ sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, Run ::osl::ResettableMutexGuard aGuard( *m_pMutex ); checkPositioningAllowed(); - sal_Bool bRet = ( row > 0 ) + bool bRet = ( row > 0 ) && notifyAllListenersCursorBeforeMove( aGuard ); if ( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || rowDeleted(); + bool bWasNew = m_pCache->m_bNew || rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary @@ -950,7 +950,7 @@ sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, Run // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); } else { // absolute movement goes wrong we stand left or right side of the rows @@ -981,7 +981,7 @@ sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, Ru checkPositioningAllowed(); - sal_Bool bRet = + bool bRet = ( ( !m_bAfterLast || rows <= 0 ) && ( !m_bBeforeFirst || rows >= 0 ) && notifyAllListenersCursorBeforeMove( aGuard ) @@ -990,7 +990,7 @@ sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, Ru if ( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || rowDeleted(); + bool bWasNew = m_pCache->m_bNew || rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary @@ -1006,7 +1006,7 @@ sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, Ru // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); } else { @@ -1033,13 +1033,13 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException checkPositioningAllowed(); - sal_Bool bRet = !m_bBeforeFirst + bool bRet = !m_bBeforeFirst && notifyAllListenersCursorBeforeMove(aGuard); if ( bRet ) { // check if we are inserting a row - sal_Bool bWasNew = m_pCache->m_bNew || rowDeleted(); + bool bWasNew = m_pCache->m_bNew || rowDeleted(); ORowSetNotifier aNotifier( this ); // this will call cancelRowModification on the cache if necessary @@ -1056,7 +1056,7 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException // notification order // - column values // - cursorMoved - setCurrentRow( sal_True, sal_True, aOldValues, aGuard ); + setCurrentRow( true, true, aOldValues, aGuard ); } else { @@ -1077,7 +1077,7 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException return bRet; } -void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard ) +void ORowSetBase::setCurrentRow( bool _bMoved, bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard ) { SAL_INFO("dbaccess", "ORowSetBase::setCurrentRow" ); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::setCurrentRow() Clone = " << m_bClone); @@ -1089,7 +1089,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR m_aBookmark = m_pCache->getBookmark(); OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!"); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is null!"); m_aCurrentRow.setBookmark(m_aBookmark); OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd(),"Position of matrix iterator isn't valid!"); @@ -1097,7 +1097,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!"); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!"); #if OSL_DEBUG_LEVEL > 0 ORowSetRow rRow = (*m_aCurrentRow); @@ -1108,7 +1108,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR { positionCache( MOVE_NONE_REFRESH_ONLY ); m_aCurrentRow = m_pCache->m_aMatrixIter; - m_bIsInsertRow = sal_False; + m_bIsInsertRow = false; OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!"); } } @@ -1160,7 +1160,7 @@ void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException, if(!(m_bBeforeFirst || m_bAfterLast)) { - sal_Bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); + bool bWasNew = m_pCache->m_bNew || impl_rowDeleted(); ORowSetRow aOldValues = getOldRow(bWasNew); positionCache( MOVE_NONE_REFRESH_ONLY ); m_pCache->refreshRow(); @@ -1201,7 +1201,7 @@ sal_Bool SAL_CALL ORowSetBase::rowDeleted( ) throw(SQLException, RuntimeExcepti return impl_rowDeleted(); } -sal_Bool ORowSetBase::impl_rowDeleted( ) +bool ORowSetBase::impl_rowDeleted( ) { return !m_aBookmark.hasValue() && !m_bBeforeFirst && !m_bAfterLast; } @@ -1268,10 +1268,10 @@ void ORowSetBase::fireRowcount() SAL_INFO("dbaccess", "ORowSetBase::fireRowcount" ); } -sal_Bool ORowSetBase::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& /*_rGuard*/) +bool ORowSetBase::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& /*_rGuard*/) { SAL_INFO("dbaccess", "ORowSetBase::notifyAllListenersCursorBeforeMove" ); - return sal_True; + return true; } void ORowSetBase::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& /*_rGuard*/) @@ -1284,12 +1284,12 @@ void ORowSetBase::notifyAllListeners(::osl::ResettableMutexGuard& /*_rGuard*/) SAL_INFO("dbaccess", "ORowSetBase::notifyAllListeners" ); } -sal_Bool ORowSetBase::isPropertyChangeNotificationEnabled() const +bool ORowSetBase::isPropertyChangeNotificationEnabled() const { - return sal_True; + return true; } -void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld ) +void ORowSetBase::fireProperty( sal_Int32 _nProperty, bool _bNew, bool _bOld ) { SAL_INFO("dbaccess", "ORowSetBase::fireProperty" ); Any aNew = css::uno::makeAny( _bNew ); @@ -1302,14 +1302,14 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection ) SAL_INFO("dbaccess", "ORowSetBase::positionCache" ); SAL_INFO("dbaccess", "DBACCESS ORowSetBase::positionCache() Clone = " << m_bClone); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if ( m_aBookmark.hasValue() ) { if ( _ePrepareForDirection == MOVE_NONE_REFRESH_ONLY || m_pCache->compareBookmarks( m_aBookmark, m_pCache->getBookmark() ) != CompareBookmark::EQUAL ) bSuccess = m_pCache->moveToBookmark( m_aBookmark ); else - bSuccess = sal_True; + bSuccess = true; } else { @@ -1332,7 +1332,7 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection ) else { m_pCache->beforeFirst(); - bSuccess = sal_True; + bSuccess = true; } break; @@ -1340,14 +1340,14 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection ) if ( m_pCache->m_bRowCountFinal && ( m_nDeletedPosition == impl_getRowCount() ) ) { m_pCache->afterLast(); - bSuccess = sal_True; + bSuccess = true; } else bSuccess = m_pCache->absolute( m_nDeletedPosition ); break; case MOVE_NONE_REFRESH_ONLY: - bSuccess = sal_False; // will be asserted below + bSuccess = false; // will be asserted below break; } } @@ -1380,7 +1380,7 @@ void ORowSetBase::movementFailed() SAL_INFO("dbaccess", "DBACCESS ORowSetBase::movementFailed() Clone = " << m_bClone); } -ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew) +ORowSetRow ORowSetBase::getOldRow(bool _bWasNew) { SAL_INFO("dbaccess", "ORowSetBase::getOldRow" ); OSL_ENSURE(m_aOldRow.is(),"RowSetRowHElper isn't valid!"); @@ -1455,10 +1455,10 @@ struct ORowSetNotifierImpl ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet ) :m_pRowSet( _pRowSet ) - ,m_bWasNew( sal_False ) - ,m_bWasModified( sal_False ) + ,m_bWasNew( false ) + ,m_bWasModified( false ) #ifdef DBG_UTIL - ,m_bNotifyCalled( sal_False ) + ,m_bNotifyCalled( false ) #endif { @@ -1476,10 +1476,10 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet ) ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector::Vector& i_aRow ) :m_pImpl(new ORowSetNotifierImpl) ,m_pRowSet( _pRowSet ) - ,m_bWasNew( sal_False ) - ,m_bWasModified( sal_False ) + ,m_bWasNew( false ) + ,m_bWasModified( false ) #ifdef DBG_UTIL - ,m_bNotifyCalled( sal_False ) + ,m_bNotifyCalled( false ) #endif { @@ -1500,15 +1500,15 @@ void ORowSetNotifier::fire() if ( m_bWasModified && ( m_bWasModified != m_pRowSet->isModified( ORowSetBase::GrantNotifierAccess() ) ) ) - m_pRowSet->fireProperty( PROPERTY_ID_ISMODIFIED, sal_False, sal_True, ORowSetBase::GrantNotifierAccess() ); + m_pRowSet->fireProperty( PROPERTY_ID_ISMODIFIED, false, true, ORowSetBase::GrantNotifierAccess() ); if ( m_bWasNew && ( m_bWasNew != m_pRowSet->isNew( ORowSetBase::GrantNotifierAccess() ) ) ) - m_pRowSet->fireProperty( PROPERTY_ID_ISNEW, sal_False, sal_True, ORowSetBase::GrantNotifierAccess() ); + m_pRowSet->fireProperty( PROPERTY_ID_ISNEW, false, true, ORowSetBase::GrantNotifierAccess() ); #ifdef DBG_UTIL - m_bNotifyCalled = sal_True; + m_bNotifyCalled = true; #endif } @@ -1529,7 +1529,7 @@ void ORowSetNotifier::firePropertyChange() m_pRowSet->firePropertyChange((*aIter)-1 ,m_pImpl->aRow[(*aIter)-1], ORowSetBase::GrantNotifierAccess()); } if ( !m_pImpl->aChangedColumns.empty() ) - m_pRowSet->fireProperty(PROPERTY_ID_ISMODIFIED,sal_True,sal_False, ORowSetBase::GrantNotifierAccess()); + m_pRowSet->fireProperty(PROPERTY_ID_ISMODIFIED,true,false, ORowSetBase::GrantNotifierAccess()); } } diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index a0bbc3eb5847..33ff986f73f8 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -102,11 +102,11 @@ namespace dbaccess sal_Int32 m_nDeletedPosition; // is set only when a row was deleted sal_Int32 m_nResultSetType; // fetch property sal_Int32 m_nResultSetConcurrency; - sal_Bool m_bClone; // I'm clone or not - sal_Bool m_bIgnoreResult ; - sal_Bool m_bBeforeFirst : 1; - sal_Bool m_bAfterLast : 1; - sal_Bool m_bIsInsertRow : 1; + bool m_bClone; // I'm clone or not + bool m_bIgnoreResult ; + bool m_bBeforeFirst : 1; + bool m_bAfterLast : 1; + bool m_bIsInsertRow : 1; protected: ORowSetBase( @@ -124,7 +124,7 @@ namespace dbaccess // fire if rowcount changed virtual void fireRowcount(); // notify row changed - virtual sal_Bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard); + virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard); // notify cursor moved virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard); // notify all that rowset changed @@ -133,17 +133,17 @@ namespace dbaccess // cancel the insertion, if necessary (means if we're on the insert row) virtual void doCancelModification( ) = 0; // return <TRUE/> if and only if we're using the insert row (means: we're updating _or_ inserting) - virtual sal_Bool isModification( ) = 0; + virtual bool isModification( ) = 0; // return <TRUE/> if and only if the current row is modified // TODO: isn't this the same as isModification? - virtual sal_Bool isModified( ) = 0; + virtual bool isModified( ) = 0; // return <TRUE/> if and only if the current row is the insert row - virtual sal_Bool isNew( ) = 0; + virtual bool isNew( ) = 0; // return <TRUE/> if the property change notification should be fired // upon property change. - virtual sal_Bool isPropertyChangeNotificationEnabled() const; + virtual bool isPropertyChangeNotificationEnabled() const; // notify the change of a boolean property - void fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld ); + void fireProperty( sal_Int32 _nProperty, bool _bNew, bool _bOld ); // OPropertyStateContainer virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const SAL_OVERRIDE; @@ -181,7 +181,7 @@ namespace dbaccess // the cache has to be checked before calling this method const connectivity::ORowSetValue& impl_getValue(sal_Int32 columnIndex); // sets the current and the bookmark - void setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard); + void setCurrentRow( bool _bMoved, bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard); void checkPositioningAllowed() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // checks if the cache is null void checkCache(); @@ -190,7 +190,7 @@ namespace dbaccess // m_aOldRow to NULL void movementFailed(); - ORowSetRow getOldRow(sal_Bool _bWasNew); + ORowSetRow getOldRow(bool _bWasNew); /** move the cache the position defined by the member functor @param _aCheckFunctor Return <TRUE/> when we already stand on the row we want to. @@ -199,19 +199,19 @@ namespace dbaccess @return <TRUE/> if movement was successful. */ - sal_Bool SAL_CALL move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aCheckFunctor, - ::std::mem_fun_t<sal_Bool,ORowSetCache>& _aMovementFunctor); + bool SAL_CALL move( ::std::mem_fun_t<bool,ORowSetBase>& _aCheckFunctor, + ::std::mem_fun_t<bool,ORowSetCache>& _aMovementFunctor); /** same meaning as isFirst. Only need by mem_fun @return <TRUE/> if so. */ - sal_Bool isOnFirst(); + bool isOnFirst(); /** same meaning as isLast. Only need by mem_fun @return <TRUE/> if so. */ - sal_Bool isOnLast(); + bool isOnLast(); /** returns the current row count @@ -225,9 +225,9 @@ namespace dbaccess sal_Int32 impl_getRowCount() const; // the checkCache has to be called before calling this methods - sal_Bool impl_wasNull(); + bool impl_wasNull(); sal_Int32 impl_getRow(); - sal_Bool impl_rowDeleted(); + bool impl_rowDeleted(); public: virtual ~ORowSetBase(); @@ -331,11 +331,11 @@ namespace dbaccess // cancel the insertion, if necessary (means if we're on the insert row) inline void doCancelModification( const GrantNotifierAccess& ) { doCancelModification(); } - inline sal_Bool isModification( const GrantNotifierAccess& ) { return isModification(); } - inline sal_Bool isModified( const GrantNotifierAccess& ) { return isModified(); } - inline sal_Bool isNew( const GrantNotifierAccess& ) { return isNew(); } - inline sal_Bool isInsertRow() { return m_bIsInsertRow; } // isNew() || isModified(); } - inline void fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld, const GrantNotifierAccess& ) + inline bool isModification( const GrantNotifierAccess& ) { return isModification(); } + inline bool isModified( const GrantNotifierAccess& ) { return isModified(); } + inline bool isNew( const GrantNotifierAccess& ) { return isNew(); } + inline bool isInsertRow() { return m_bIsInsertRow; } // isNew() || isModified(); } + inline void fireProperty( sal_Int32 _nProperty, bool _bNew, bool _bOld, const GrantNotifierAccess& ) { fireProperty( _nProperty, _bNew, _bOld ); } @@ -360,11 +360,11 @@ namespace dbaccess ORowSetBase* m_pRowSet; // not aquired! This is not necessary because this class here is to be used on the stack within // a method of ORowSetBase (or derivees) - sal_Bool m_bWasNew; - sal_Bool m_bWasModified; + bool m_bWasNew; + bool m_bWasModified; #ifdef DBG_UTIL - sal_Bool m_bNotifyCalled; + bool m_bNotifyCalled; #endif public: diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 47845b2b5435..6897395f7b2e 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -82,8 +82,8 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer, const Reference<XComponentContext>& _rContext, const OUString& _rUpdateTableName, - sal_Bool& _bModified, - sal_Bool& _bNew, + bool& _bModified, + bool& _bNew, const ORowSetValueVector& _aParameterValueForCache, const OUString& i_sRowSetFilter, sal_Int32 i_nMaxRows) @@ -100,10 +100,10 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, ,m_nPosition(0) ,m_nStartPos(0) ,m_nEndPos(0) - ,m_bRowCountFinal(sal_False) - ,m_bBeforeFirst(sal_True) - ,m_bAfterLast( sal_False ) - ,m_bUpdated(sal_False) + ,m_bRowCountFinal(false) + ,m_bBeforeFirst(true) + ,m_bAfterLast( false ) + ,m_bUpdated(false) ,m_bModified(_bModified) ,m_bNew(_bNew) { @@ -111,7 +111,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, // first try if the result can be used to do inserts and updates Reference< XPropertySet> xProp(_xRs,UNO_QUERY); Reference< XPropertySetInfo > xPropInfo = xProp->getPropertySetInfo(); - sal_Bool bBookmarkable = sal_False; + bool bBookmarkable = false; try { Reference< XResultSetUpdate> xUp(_xRs,UNO_QUERY_THROW); @@ -145,10 +145,10 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, } // check if all keys of the updateable table are fetched - sal_Bool bAllKeysFound = sal_False; + bool bAllKeysFound = false; sal_Int32 nTablesCount = 0; - sal_Bool bNeedKeySet = !bBookmarkable || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) && + bool bNeedKeySet = !bBookmarkable || (xPropInfo->hasPropertyByName(PROPERTY_RESULTSETCONCURRENCY) && ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_RESULTSETCONCURRENCY)) == ResultSetConcurrency::READ_ONLY); Reference< XIndexAccess> xUpdateTableKeys; @@ -256,7 +256,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, } catch(const SQLException&) { - bNeedKeySet = sal_True; + bNeedKeySet = true; } } @@ -293,7 +293,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, // check privileges m_nPrivileges = Privilege::SELECT; - sal_Bool bNoInsert = sal_False; + bool bNoInsert = false; Sequence< OUString> aNames(xColumns->getElementNames()); const OUString* pIter = aNames.getConstArray(); @@ -308,7 +308,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; if(nNullable == ColumnValue::NO_NULLS && aColumnNames.find(*pIter) == aColumnNames.end()) { // we found a column where null is not allowed so we can't insert new values - bNoInsert = sal_True; + bNoInsert = true; break; // one column is enough } } @@ -504,11 +504,11 @@ Any ORowSetCache::getBookmark( ) return lcl_getBookmark(((*m_aMatrixIter)->get())[0],m_pCacheSet); } -sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark ) +bool ORowSetCache::moveToBookmark( const Any& bookmark ) { if ( m_pCacheSet->moveToBookmark(bookmark) ) { - m_bBeforeFirst = sal_False; + m_bBeforeFirst = false; m_nPosition = m_pCacheSet->getRow(); checkPositionFlags(); @@ -529,14 +529,14 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark ) m_aMatrixIter = m_pMatrix->end(); } else - return sal_False; + return false; return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is(); } -sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) +bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) { - sal_Bool bRet( moveToBookmark( bookmark ) ); + bool bRet( moveToBookmark( bookmark ) ); if ( bRet ) { m_nPosition = m_pCacheSet->getRow() + rows; @@ -553,7 +553,7 @@ sal_Int32 ORowSetCache::compareBookmarks( const Any& _first, const Any& _second return (!_first.hasValue() || !_second.hasValue()) ? CompareBookmark::NOT_COMPARABLE : m_pCacheSet->compareBookmarks(_first,_second); } -sal_Bool ORowSetCache::hasOrderedBookmarks( ) +bool ORowSetCache::hasOrderedBookmarks( ) { return m_pCacheSet->hasOrderedBookmarks(); } @@ -669,11 +669,11 @@ void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal } // XResultSet -sal_Bool ORowSetCache::next( ) +bool ORowSetCache::next( ) { if(!isAfterLast()) { - m_bBeforeFirst = sal_False; + m_bBeforeFirst = false; ++m_nPosition; // after we increment the position we have to check if we are already after the last row @@ -691,51 +691,51 @@ sal_Bool ORowSetCache::next( ) return !m_bAfterLast; } -sal_Bool ORowSetCache::isBeforeFirst( ) +bool ORowSetCache::isBeforeFirst( ) { return m_bBeforeFirst; } -sal_Bool ORowSetCache::isAfterLast( ) +bool ORowSetCache::isAfterLast( ) { return m_bAfterLast; } -sal_Bool ORowSetCache::isFirst( ) +bool ORowSetCache::isFirst( ) { return m_nPosition == 1; // ask resultset for } -sal_Bool ORowSetCache::isLast( ) +bool ORowSetCache::isLast( ) { return m_nPosition == m_nRowCount; } -sal_Bool ORowSetCache::beforeFirst( ) +bool ORowSetCache::beforeFirst( ) { if(!m_bBeforeFirst) { - m_bAfterLast = sal_False; + m_bAfterLast = false; m_nPosition = 0; - m_bBeforeFirst = sal_True; + m_bBeforeFirst = true; m_pCacheSet->beforeFirst(); moveWindow(); m_aMatrixIter = m_pMatrix->end(); } - return sal_True; + return true; } -sal_Bool ORowSetCache::afterLast( ) +bool ORowSetCache::afterLast( ) { if(!m_bAfterLast) { - m_bBeforeFirst = sal_False; - m_bAfterLast = sal_True; + m_bBeforeFirst = false; + m_bAfterLast = true; if(!m_bRowCountFinal) { m_pCacheSet->last_checked(sal_False); - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; m_nRowCount = m_pCacheSet->getRow();// + 1 removed } m_pCacheSet->afterLast(); @@ -743,10 +743,10 @@ sal_Bool ORowSetCache::afterLast( ) m_nPosition = 0; m_aMatrixIter = m_pMatrix->end(); } - return sal_True; + return true; } -sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos) +bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos) { OSL_ENSURE(_nNewStartPos != _nNewEndPos,"ORowSetCache::fillMatrix: StartPos and EndPos can not be equal!"); // If _nNewStartPos >= 0, then fill the whole window with new data @@ -756,7 +756,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndP ORowSetMatrix::iterator aIter; sal_Int32 i; - sal_Bool bCheck; + bool bCheck; sal_Int32 requestedStartPos; if ( _nNewStartPos == -1 ) { @@ -790,7 +790,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndP m_nRowCount = m_pCacheSet->getRow(); // here we have the row count if(!m_nRowCount) m_nRowCount = i-1; // it can be that getRow return zero - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; } const ORowSetMatrix::iterator aEnd = aIter; ORowSetMatrix::iterator aRealEnd = m_pMatrix->end(); @@ -829,7 +829,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndP { if(m_pCacheSet->previous_checked(sal_False)) // because we stand after the last row m_nRowCount = m_pCacheSet->getRow(); // here we have the row count - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; } else m_nRowCount = std::max(i,m_nRowCount); @@ -841,7 +841,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndP // If m_nPosition is out of the current window, // move it and update m_nStartPos and m_nEndPos // Caller is responsible for updating m_aMatrixIter -sal_Bool ORowSetCache::moveWindow() +bool ORowSetCache::moveWindow() { OSL_ENSURE(m_nStartPos >= 0,"ORowSetCache::moveWindow: m_nStartPos is less than 0!"); OSL_ENSURE(m_nEndPos >= m_nStartPos,"ORowSetCache::moveWindow: m_nStartPos not smaller than m_nEndPos"); @@ -856,7 +856,7 @@ sal_Bool ORowSetCache::moveWindow() OSL_ENSURE(m_aMatrixIter != m_pMatrix->end(), "New m_aMatrixIter is at end(), but should not."); if(!m_aMatrixIter->is()) { - sal_Bool bOk( m_pCacheSet->absolute( m_nPosition ) ); + bool bOk( m_pCacheSet->absolute( m_nPosition ) ); if ( bOk ) { *m_aMatrixIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); @@ -874,13 +874,13 @@ sal_Bool ORowSetCache::moveWindow() { // because we stand after the last row m_nRowCount = m_pCacheSet->previous_checked(sal_False) ? m_pCacheSet->getRow() : 0; - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; } } - return sal_True; + return true; } - sal_Bool bRet = sal_True; + bool bRet = true; sal_Int32 nDiff = (m_nFetchSize - 1) / 2; sal_Int32 nNewStartPos = (m_nPosition - nDiff) - 1; //m_nPosition is 1-based, but m_nStartPos is 0-based @@ -903,7 +903,7 @@ sal_Bool ORowSetCache::moveWindow() // it has to go to the end. // then we fill in the rows between new and old start pos. - sal_Bool bCheck; + bool bCheck; bCheck = m_pCacheSet->absolute(nNewStartPos + 1); // m_nEndPos < nNewEndPos when window not filled (e.g. there are less rows in total than window size) @@ -965,7 +965,7 @@ sal_Bool ORowSetCache::moveWindow() else { // normally this should never happen OSL_FAIL("What the hell is happen here!"); - return sal_False; + return false; } } else @@ -985,7 +985,7 @@ sal_Bool ORowSetCache::moveWindow() // There is some unused space in *m_pMatrix; fill it CHECK_MATRIX_POS(nRowsInCache); sal_Int32 nPos = m_nEndPos + 1; - sal_Bool bCheck = m_pCacheSet->absolute(nPos); + bool bCheck = m_pCacheSet->absolute(nPos); ORowSetMatrix::iterator aIter = m_pMatrix->begin() + nRowsInCache; const sal_Int32 nRowsToFetch = std::min(nNewEndPos-m_nEndPos, m_nFetchSize-nRowsInCache); const ORowSetMatrix::const_iterator aEnd = aIter + nRowsToFetch; @@ -1008,7 +1008,7 @@ sal_Bool ORowSetCache::moveWindow() ORowSetMatrix::iterator aDataEnd = m_pMatrix->begin() + (m_nEndPos - m_nStartPos); sal_Int32 nPos = m_nEndPos + 1; - sal_Bool bCheck = m_pCacheSet->absolute(nPos); + bool bCheck = m_pCacheSet->absolute(nPos); bCheck = fill(aIter, aEnd, nPos, bCheck); // refill the region we don't need anymore //aIter and nPos are now the position *after* last filled in one! @@ -1025,7 +1025,7 @@ sal_Bool ORowSetCache::moveWindow() // now I can say how many rows we have // we have to read one row forward to ensure that we know when we are on last row // but only when we don't know it already - sal_Bool bOk = sal_True; + bool bOk = true; if(!m_bRowCountFinal) bOk = m_pCacheSet->next(); if(!bOk) @@ -1033,7 +1033,7 @@ sal_Bool ORowSetCache::moveWindow() m_pCacheSet->previous_checked(sal_False); // because we stand after the last row m_nRowCount = nPos; // here we have the row count OSL_ENSURE(nPos == m_pCacheSet->getRow(),"nPos is not valid!"); - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; } else if(!m_bRowCountFinal) m_nRowCount = std::max(nPos+1, m_nRowCount); //+1 because we successfully moved to row after nPos @@ -1060,7 +1060,7 @@ sal_Bool ORowSetCache::moveWindow() m_pCacheSet->previous_checked(sal_False); // because we stand after the last row m_nRowCount = std::max(m_nRowCount, nPos); // here we have the row count OSL_ENSURE(nPos == m_pCacheSet->getRow(),"nPos isn't valid!"); - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; } } @@ -1095,23 +1095,23 @@ sal_Bool ORowSetCache::moveWindow() return bRet; } -sal_Bool ORowSetCache::first( ) +bool ORowSetCache::first( ) { // First move to the first row. // Then check if the cache window is at the beginning. // If not, then position the window and fill it with data. // We move the window smartly, i.e. we clear only the rows that are out of range - sal_Bool bRet = m_pCacheSet->first(); + bool bRet = m_pCacheSet->first(); if(bRet) { - m_bBeforeFirst = m_bAfterLast = sal_False; + m_bBeforeFirst = m_bAfterLast = false; m_nPosition = 1; moveWindow(); m_aMatrixIter = m_pMatrix->begin(); } else { - m_bRowCountFinal = m_bBeforeFirst = m_bAfterLast = sal_True; + m_bRowCountFinal = m_bBeforeFirst = m_bAfterLast = true; m_nRowCount = m_nPosition = 0; OSL_ENSURE(m_bBeforeFirst || m_bNew,"ORowSetCache::first return false and BeforeFirst isn't true"); @@ -1120,15 +1120,15 @@ sal_Bool ORowSetCache::first( ) return bRet; } -sal_Bool ORowSetCache::last( ) +bool ORowSetCache::last( ) { - sal_Bool bRet = m_pCacheSet->last(); + bool bRet = m_pCacheSet->last(); if(bRet) { - m_bBeforeFirst = m_bAfterLast = sal_False; + m_bBeforeFirst = m_bAfterLast = false; if(!m_bRowCountFinal) { - m_bRowCountFinal = sal_True; + m_bRowCountFinal = true; m_nRowCount = m_pCacheSet->getRow(); // not + 1 } m_nPosition = m_pCacheSet->getRow(); @@ -1140,7 +1140,7 @@ sal_Bool ORowSetCache::last( ) } else { - m_bRowCountFinal = m_bBeforeFirst = m_bAfterLast = sal_True; + m_bRowCountFinal = m_bBeforeFirst = m_bAfterLast = true; m_nRowCount = m_nPosition = 0; OSL_ENSURE(m_bBeforeFirst,"ORowSetCache::last return false and BeforeFirst isn't true"); m_aMatrixIter = m_pMatrix->end(); @@ -1160,7 +1160,7 @@ sal_Int32 ORowSetCache::getRow( ) return (isBeforeFirst() || isAfterLast()) ? 0 : m_nPosition; } -sal_Bool ORowSetCache::absolute( sal_Int32 row ) +bool ORowSetCache::absolute( sal_Int32 row ) { if(!row ) throw SQLException(DBACORE_RESSTRING(RID_STR_NO_ABS_ZERO),NULL,SQLSTATE_GENERAL,1000,Any() ); @@ -1174,13 +1174,13 @@ sal_Bool ORowSetCache::absolute( sal_Int32 row ) m_nPosition = m_nRowCount + row + 1; // + row because row is negative and +1 because row==-1 means last row if(m_nPosition < 1) { - m_bBeforeFirst = sal_True; - m_bAfterLast = sal_False; + m_bBeforeFirst = true; + m_bAfterLast = false; m_aMatrixIter = m_pMatrix->end(); } else { - m_bBeforeFirst = sal_False; + m_bBeforeFirst = false; m_bAfterLast = m_nPosition > m_nRowCount; moveWindow(); OSL_ENSURE(((m_nPosition - m_nStartPos) - 1) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!"); @@ -1194,7 +1194,7 @@ sal_Bool ORowSetCache::absolute( sal_Int32 row ) { m_nPosition = row; // the position flags - m_bBeforeFirst = sal_False; + m_bBeforeFirst = false; checkPositionFlags(); if(!m_bAfterLast) @@ -1213,9 +1213,9 @@ sal_Bool ORowSetCache::absolute( sal_Int32 row ) return !(m_bAfterLast || m_bBeforeFirst); } -sal_Bool ORowSetCache::relative( sal_Int32 rows ) +bool ORowSetCache::relative( sal_Int32 rows ) { - sal_Bool bErg = sal_True; + bool bErg = true; if(rows) { sal_Int32 nNewPosition = m_nPosition + rows; @@ -1234,23 +1234,23 @@ sal_Bool ORowSetCache::relative( sal_Int32 rows ) } else { - m_bBeforeFirst = sal_True; - bErg = sal_False; + m_bBeforeFirst = true; + bErg = false; } } return bErg; } -sal_Bool ORowSetCache::previous( ) +bool ORowSetCache::previous( ) { - sal_Bool bRet = sal_False; + bool bRet = false; if(!isBeforeFirst()) { if(m_bAfterLast) // we stand after the last row so one before is the last row bRet = last(); else { - m_bAfterLast = sal_False; + m_bAfterLast = false; --m_nPosition; moveWindow(); OSL_ENSURE(((m_nPosition - m_nStartPos) - 1) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!"); @@ -1259,7 +1259,7 @@ sal_Bool ORowSetCache::previous( ) if(!m_nPosition) { - m_bBeforeFirst = sal_True; + m_bBeforeFirst = true; m_aMatrixIter = m_pMatrix->end(); } else @@ -1285,30 +1285,30 @@ void ORowSetCache::refreshRow( ) } } -sal_Bool ORowSetCache::rowUpdated( ) +bool ORowSetCache::rowUpdated( ) { return m_pCacheSet->rowUpdated(); } -sal_Bool ORowSetCache::rowInserted( ) +bool ORowSetCache::rowInserted( ) { return m_pCacheSet->rowInserted(); } // XResultSetUpdate -sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks) +bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks) { if ( !m_bNew || !m_aInsertRow->is() ) throw SQLException(DBACORE_RESSTRING(RID_STR_NO_MOVETOINSERTROW_CALLED),NULL,SQLSTATE_GENERAL,1000,Any() ); m_pCacheSet->insertRow(*m_aInsertRow,m_aUpdateTable); - sal_Bool bRet( rowInserted() ); + bool bRet( rowInserted() ); if ( bRet ) { ++m_nRowCount; Any aBookmark = ((*m_aInsertRow)->get())[0].makeAny(); - m_bAfterLast = m_bBeforeFirst = sal_False; + m_bAfterLast = m_bBeforeFirst = false; if(aBookmark.hasValue()) { moveToBookmark(aBookmark); @@ -1331,12 +1331,12 @@ sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks) return bRet; } -void ORowSetCache::resetInsertRow(sal_Bool _bClearInsertRow) +void ORowSetCache::resetInsertRow(bool _bClearInsertRow) { if ( _bClearInsertRow ) clearInsertRow(); - m_bNew = sal_False; - m_bModified = sal_False; + m_bNew = false; + m_bModified = false; } void ORowSetCache::cancelRowModification() @@ -1349,7 +1349,7 @@ void ORowSetCache::cancelRowModification() if ( aCacheIter->second.pRowSet->isInsertRow() && aCacheIter->second.aIterator == m_aInsertRow ) aCacheIter->second.aIterator = m_pMatrix->end(); } - resetInsertRow(sal_False); + resetInsertRow(false); } void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector< Any >& o_aBookmarks ) @@ -1380,7 +1380,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector } } - m_bModified = sal_False; + m_bModified = false; } bool ORowSetCache::deleteRow( ) @@ -1411,7 +1411,7 @@ bool ORowSetCache::deleteRow( ) void ORowSetCache::cancelRowUpdates( ) { - m_bNew = m_bModified = sal_False; + m_bNew = m_bModified = false; if(!m_nPosition) { OSL_FAIL("cancelRowUpdates:Invalid positions pos == 0"); @@ -1429,8 +1429,8 @@ void ORowSetCache::cancelRowUpdates( ) void ORowSetCache::moveToInsertRow( ) { - m_bNew = sal_True; - m_bUpdated = m_bAfterLast = sal_False; + m_bNew = true; + m_bUpdated = m_bAfterLast = false; m_aInsertRow = m_pInsertMatrix->begin(); if(!m_aInsertRow->is()) @@ -1530,9 +1530,9 @@ void ORowSetCache::checkUpdateConditions(sal_Int32 columnIndex) throwFunctionSequenceException(m_xSet.get()); } -sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,const Reference< XConnection>& _xConnection,const OUString& _sUpdateTableName) +bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,const Reference< XConnection>& _xConnection,const OUString& _sUpdateTableName) { - sal_Bool bOk = sal_False; + bool bOk = false; if (pNode->count() == 3 && // expression in parentheses SQL_ISPUNCTUATION(pNode->getChild(0),"(") && SQL_ISPUNCTUATION(pNode->getChild(2),")")) @@ -1555,7 +1555,7 @@ sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode SQL_ISRULE(pNode->getChild(2),column_ref) && pNode->getChild(1)->getNodeType() == SQL_NODE_EQUAL)) { - bOk = sal_False; + bOk = false; } OUString sColumnName,sTableRange; OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), _xConnection, sColumnName, sTableRange ); @@ -1569,11 +1569,11 @@ sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode return bOk; } -sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection, - const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer, - const OUString& _sUpdateTableName ) +bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection, + const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer, + const OUString& _sUpdateTableName ) { - sal_Bool bOk = sal_False; + bool bOk = false; OUString sSql = _xAnalyzer->getQuery(); OUString sErrorMsg; ::connectivity::OSQLParser aSqlParser( m_aContext ); @@ -1597,8 +1597,8 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection, else if(SQL_ISRULE(pJoinType,outer_join_type)) pOuterType = pJoinType; - sal_Bool bCheck = sal_False; - sal_Bool bLeftSide = sal_False; + bool bCheck = false; + bool bLeftSide = false; if(pOuterType) { // found outer join bLeftSide = SQL_ISTOKEN(pOuterType->getChild(0),LEFT); @@ -1675,7 +1675,7 @@ void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow) } } -sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPos) +bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos, sal_Int32 _nNewEndPos) { const TOldRowSetRows::const_iterator aOldRowEnd = m_aOldRows.end(); for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter) @@ -1684,14 +1684,14 @@ sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPo (*aOldRowIter)->setRow(new ORowSetValueVector( *((*aOldRowIter)->getRow()) ) ); } sal_Int32 nNewSt = _nNewStartPos; - sal_Bool bRet = fillMatrix(nNewSt,_nNewEndPos); + bool bRet = fillMatrix(nNewSt,_nNewEndPos); m_nStartPos = nNewSt; m_nEndPos = _nNewEndPos; rotateCacheIterator(static_cast<ORowSetMatrix::difference_type>(m_nFetchSize+1)); // invalidate every iterator return bRet; } -sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix::const_iterator& _aEnd,sal_Int32& _nPos,sal_Bool _bCheck) +bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter, const ORowSetMatrix::const_iterator& _aEnd, sal_Int32& _nPos, bool _bCheck) { const sal_Int32 nColumnCount = m_xMetaData->getColumnCount(); for(; _bCheck && _aIter != _aEnd; _aIter++, _nPos++) @@ -1724,7 +1724,7 @@ void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet) m_xMetaData.set(Reference< XResultSetMetaDataSupplier >(_xDriverSet,UNO_QUERY)->getMetaData()); m_pCacheSet->reset(_xDriverSet); - m_bRowCountFinal = sal_False; + m_bRowCountFinal = false; m_nRowCount = 0; reFillMatrix(m_nStartPos,m_nEndPos); } diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx index d1e263da3b66..c00aadd58568 100644 --- a/dbaccess/source/core/api/RowSetCache.hxx +++ b/dbaccess/source/core/api/RowSetCache.hxx @@ -89,19 +89,19 @@ namespace dbaccess sal_Int32 m_nStartPos; // start pos of the window zero based (inclusive) sal_Int32 m_nEndPos; // end pos of the window zero based (exclusive) - sal_Bool m_bRowCountFinal ; - sal_Bool m_bBeforeFirst ; - sal_Bool m_bAfterLast ; - sal_Bool m_bUpdated ; - sal_Bool& m_bModified ; // points to the rowset member m_bModified - sal_Bool& m_bNew ; // points to the rowset member m_bNew - - sal_Bool fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix::const_iterator& _aEnd,sal_Int32& _nPos,sal_Bool _bCheck); - sal_Bool reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 nNewEndPos); - sal_Bool fillMatrix(sal_Int32 &_nNewStartPos,sal_Int32 &_nNewEndPos); - sal_Bool moveWindow(); + bool m_bRowCountFinal ; + bool m_bBeforeFirst ; + bool m_bAfterLast ; + bool m_bUpdated ; + bool& m_bModified ; // points to the rowset member m_bModified + bool& m_bNew ; // points to the rowset member m_bNew + + bool fill(ORowSetMatrix::iterator& _aIter, const ORowSetMatrix::const_iterator& _aEnd, sal_Int32& _nPos, bool _bCheck); + bool reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 nNewEndPos); + bool fillMatrix(sal_Int32 &_nNewStartPos,sal_Int32 &_nNewEndPos); + bool moveWindow(); // returns true when a keyset needs to be created. - sal_Bool impl_createBookmarkSet_nothrow(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xRs); + bool impl_createBookmarkSet_nothrow(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xRs); void firePropertyChange(sal_Int32 _nColumnIndex,const ::connectivity::ORowSetValue& _rOldValue); @@ -118,10 +118,10 @@ namespace dbaccess // checks and set the flags isAfterLast isLast and position when afterlast is true void checkPositionFlags(); void checkUpdateConditions(sal_Int32 columnIndex); - sal_Bool checkJoin( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, + bool checkJoin( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer, const OUString& _sUpdateTableName); - sal_Bool checkInnerJoin(const ::connectivity::OSQLParseNode *pNode + bool checkInnerJoin(const ::connectivity::OSQLParseNode *pNode ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection ,const OUString& _sUpdateTableName); @@ -138,8 +138,8 @@ namespace dbaccess const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xAnalyzer, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext, const OUString& _rUpdateTableName, - sal_Bool& _bModified, - sal_Bool& _bNew, + bool& _bModified, + bool& _bNew, const ORowSetValueVector& _aParameterValueForCache, const OUString& i_sRowSetFilter, sal_Int32 i_nMaxRows); @@ -161,10 +161,10 @@ namespace dbaccess // ::com::sun::star::sdbcx::XRowLocate ::com::sun::star::uno::Any getBookmark( ); - sal_Bool moveToBookmark( const ::com::sun::star::uno::Any& bookmark ); - sal_Bool moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ); + bool moveToBookmark( const ::com::sun::star::uno::Any& bookmark ); + bool moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ); sal_Int32 compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ); - sal_Bool hasOrderedBookmarks( ); + bool hasOrderedBookmarks( ); sal_Int32 hashBookmark( const ::com::sun::star::uno::Any& bookmark ); // ::com::sun::star::sdbc::XRowUpdate @@ -178,26 +178,26 @@ namespace dbaccess ); // ::com::sun::star::sdbc::XResultSet - sal_Bool next( ); - sal_Bool isBeforeFirst( ); - sal_Bool isAfterLast( ); - sal_Bool isFirst( ); - sal_Bool isLast( ); - sal_Bool beforeFirst( ); - sal_Bool afterLast( ); - sal_Bool first( ); - sal_Bool last( ); + bool next( ); + bool isBeforeFirst( ); + bool isAfterLast( ); + bool isFirst( ); + bool isLast( ); + bool beforeFirst( ); + bool afterLast( ); + bool first( ); + bool last( ); sal_Int32 getRow( ); - sal_Bool absolute( sal_Int32 row ); - sal_Bool relative( sal_Int32 rows ); - sal_Bool previous( ); + bool absolute( sal_Int32 row ); + bool relative( sal_Int32 rows ); + bool previous( ); void refreshRow( ); - sal_Bool rowUpdated( ); - sal_Bool rowInserted( ); + bool rowUpdated( ); + bool rowInserted( ); // ::com::sun::star::sdbc::XResultSetUpdate - sal_Bool insertRow(::std::vector< ::com::sun::star::uno::Any >& o_aBookmarks); - void resetInsertRow(sal_Bool _bClearInsertRow); + bool insertRow(::std::vector< ::com::sun::star::uno::Any >& o_aBookmarks); + void resetInsertRow(bool _bClearInsertRow); void updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector< ::com::sun::star::uno::Any >& o_aBookmarks ); bool deleteRow(); diff --git a/dbaccess/source/core/api/RowSetCacheIterator.cxx b/dbaccess/source/core/api/RowSetCacheIterator.cxx index 020c19f93072..72ad03f7aca6 100644 --- a/dbaccess/source/core/api/RowSetCacheIterator.cxx +++ b/dbaccess/source/core/api/RowSetCacheIterator.cxx @@ -111,10 +111,10 @@ void ORowSetCacheIterator::setBookmark(const ::com::sun::star::uno::Any& _rBo m_aIter->second.aBookmark = _rBookmark; } -sal_Bool ORowSetCacheIterator::isNull() const +bool ORowSetCacheIterator::isNull() const { SAL_INFO("dbaccess", "ORowSetCacheIterator::isNull" ); - sal_Bool bRet = !m_pCache || !m_pRowSet || m_aIter == m_pCache->m_aCacheIterators.end(); + bool bRet = !m_pCache || !m_pRowSet || m_aIter == m_pCache->m_aCacheIterators.end(); if ( !bRet ) { bRet = ( m_pRowSet->isInsertRow() diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx index 8a52eb039c62..083a82ff2308 100644 --- a/dbaccess/source/core/api/RowSetCacheIterator.hxx +++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx @@ -56,7 +56,7 @@ namespace dbaccess ORowSetCacheIterator(const ORowSetCacheIterator& _rRH); ORowSetCacheIterator& operator =(const ORowSetCacheIterator&); - sal_Bool isNull() const; + bool isNull() const; ORowSetCacheIterator& operator =(const ORowSetMatrix::iterator&); operator ORowSetMatrix::iterator(); diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx index aca6a3558e03..38b27f4650b9 100644 --- a/dbaccess/source/core/api/RowSetRow.hxx +++ b/dbaccess/source/core/api/RowSetRow.hxx @@ -66,7 +66,7 @@ namespace dbaccess public: ORowSetValueCompare(const ::com::sun::star::uno::Any& _rAny) : m_rAny(_rAny){} - sal_Bool operator ()(const ORowSetRow& _rRH) + bool operator ()(const ORowSetRow& _rRH) { switch((_rRH->get())[0].getTypeKind()) { diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index d91e7adef86d..4d7999ee7c5f 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -487,7 +487,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc OUString sRealName, sTableName; xColumn->getPropertyValue(PROPERTY_REALNAME) >>= sRealName; xColumn->getPropertyValue(PROPERTY_TABLENAME) >>= sTableName; - sal_Bool bFunction = sal_False; + bool bFunction = false; xColumn->getPropertyValue("Function") >>= bFunction; if ( sRealName == aName ) { @@ -615,7 +615,7 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r // remember the 4 current "additive" clauses ::std::vector< OUString > aAdditiveClauses( SQLPartCount ); for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) ) - aAdditiveClauses[ eLoopParts ] = getSQLPart( eLoopParts, m_aAdditiveIterator, sal_False ); + aAdditiveClauses[ eLoopParts ] = getSQLPart( eLoopParts, m_aAdditiveIterator, false ); // clear the tables and columns clearCurrentCollections(); @@ -624,7 +624,7 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const OUString& _r // get the 4 elementary parts of the statement for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) ) - m_aElementaryParts[ eLoopParts ] = getSQLPart( eLoopParts, m_aSqlIterator, sal_False ); + m_aElementaryParts[ eLoopParts ] = getSQLPart( eLoopParts, m_aSqlIterator, false ); // reset the AdditiveIterator: m_aPureSelectSQL may have changed try @@ -663,14 +663,14 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const ::osl::MutexGuard aGuard( m_aMutex ); // if nothing is changed, do nothing - if ( getSQLPart( _ePart, m_aAdditiveIterator, sal_False ) == _rClause ) + if ( getSQLPart( _ePart, m_aAdditiveIterator, false ) == _rClause ) return; // collect the 4 single parts as they're currently set ::std::vector< OUString > aClauses; aClauses.reserve( (size_t)SQLPartCount ); for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) ) - aClauses.push_back( getSQLPart( eLoopParts, m_aSqlIterator, sal_True ) ); + aClauses.push_back( getSQLPart( eLoopParts, m_aSqlIterator, true ) ); // overwrite the one part in question here boost::scoped_ptr< TokenComposer > pComposer; @@ -700,7 +700,7 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const aSql = m_aPureSelectSQL; // again, first get all the old additive parts for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) ) - aClauses[ eLoopParts ] = getSQLPart( eLoopParts, m_aAdditiveIterator, sal_True ); + aClauses[ eLoopParts ] = getSQLPart( eLoopParts, m_aAdditiveIterator, true ); // then overwrite the one in question aClauses[ _ePart ] = getComposedClause( OUString(), _rClause, *pComposer, getKeyword( _ePart ) ); // and parse it, so that m_aAdditiveIterator is up to date @@ -775,7 +775,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr ::std::vector< OUString> aNames; ::rtl::Reference< OSQLColumns> aSelectColumns; - sal_Bool bCase = sal_True; + bool bCase = true; Reference< XNameAccess> xQueryColumns; if ( m_nCommandType == CommandType::QUERY ) { @@ -798,13 +798,13 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr // preserve the original WHERE clause // #i102234# - OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, sal_False ); + OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, false ); if ( !sOriginalWhereClause.isEmpty() ) { aSQL.append( " AND ( " + sOriginalWhereClause + " ) " ); } - OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, sal_True ); + OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, true ); if ( !sGroupBy.isEmpty() ) aSQL.append( sGroupBy ); @@ -878,7 +878,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr } else sColumnLabel = xResultSetMeta->getColumnLabel(i); - sal_Bool bFound = sal_False; + bool bFound = false; OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),sColumnLabel,aCaseCompare); size_t nFoundSelectColumnPos = aFind - aSelectColumns->get().begin(); if ( aFind != aSelectColumns->get().end() ) @@ -900,7 +900,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr (*aFind)->getPropertyValue(PROPERTY_NAME) >>= sColumnName; aUsedSelectColumns.insert( nFoundSelectColumnPos ); aNames.push_back(sColumnName); - bFound = sal_True; + bFound = true; } } @@ -983,7 +983,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr return m_aCurrentColumns[SelectColumns]; } -sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OSQLParseTreeIterator& _rIterator, +bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OSQLParseTreeIterator& _rIterator, ::std::vector< ::std::vector < PropertyValue > >& rFilters, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::setORCriteria" ); @@ -998,7 +998,7 @@ sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OS // a searchcondition can only look like this: search_condition SQL_TOKEN_OR boolean_term else if (SQL_ISRULE(pCondition,search_condition)) { - sal_Bool bResult = sal_True; + bool bResult = true; for (int i = 0; bResult && i < 3; i+=2) { // Is the first element a OR logic expression again? @@ -1020,7 +1020,7 @@ sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OS } } -sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition, +bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition, OSQLParseTreeIterator& _rIterator, ::std::vector < PropertyValue >& rFilter, const Reference< XNumberFormatter > & xFormatter) const { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::setANDCriteria" ); @@ -1029,7 +1029,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition, { // this should not occur SAL_WARN("dbaccess","boolean_primary in And-Criteria"); - return sal_False; + return false; } // The first element is an AND logical expression again else if ( SQL_ISRULE(pCondition,boolean_term) && pCondition->count() == 3 ) @@ -1093,19 +1093,19 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition, rFilter.push_back(aItem); } else - return sal_False; + return false; } else if (SQL_ISRULE(pCondition,existence_test) || SQL_ISRULE(pCondition,unique_test)) { // this couldn't be handled here, too complex // as we need a field name - return sal_False; + return false; } else - return sal_False; + return false; - return sal_True; + return true; } sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredicate) const @@ -1138,7 +1138,7 @@ sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredica return nPredicate; } -sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCondition, OSQLParseTreeIterator& _rIterator, +bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCondition, OSQLParseTreeIterator& _rIterator, ::std::vector < PropertyValue >& rFilter, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::setComparsionPredicate" ); @@ -1214,7 +1214,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); } else - return sal_False; + return false; aItem.Name = getColumnName(pCondition->getChild(nPos),_rIterator); aItem.Value <<= aValue; @@ -1258,7 +1258,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon aItem.Value <<= aValue; rFilter.push_back(aItem); } - return sal_True; + return true; } // Functions for analysing SQL @@ -1275,7 +1275,7 @@ OUString SAL_CALL OSingleSelectQueryComposer::getFilter( ) throw(RuntimeExcepti SAL_INFO("dbaccess", "OSingleSelectQueryComposer::getFilter" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - return getSQLPart(Where,m_aAdditiveIterator,sal_False); + return getSQLPart(Where,m_aAdditiveIterator,false); } OUString SAL_CALL OSingleSelectQueryComposer::getOrder( ) throw(RuntimeException, std::exception) @@ -1283,7 +1283,7 @@ OUString SAL_CALL OSingleSelectQueryComposer::getOrder( ) throw(RuntimeExceptio SAL_INFO("dbaccess", "OSingleSelectQueryComposer::getOrder" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - return getSQLPart(Order,m_aAdditiveIterator,sal_False); + return getSQLPart(Order,m_aAdditiveIterator,false); } OUString SAL_CALL OSingleSelectQueryComposer::getGroup( ) throw (RuntimeException, std::exception) @@ -1291,7 +1291,7 @@ OUString SAL_CALL OSingleSelectQueryComposer::getGroup( ) throw (RuntimeExcepti SAL_INFO("dbaccess", "OSingleSelectQueryComposer::getGroup" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - return getSQLPart(Group,m_aAdditiveIterator,sal_False); + return getSQLPart(Group,m_aAdditiveIterator,false); } OUString OSingleSelectQueryComposer::getHavingClause() throw (RuntimeException, std::exception) @@ -1299,7 +1299,7 @@ OUString OSingleSelectQueryComposer::getHavingClause() throw (RuntimeException, SAL_INFO("dbaccess", "OSingleSelectQueryComposer::getHavingClause" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - return getSQLPart(Having,m_aAdditiveIterator,sal_False); + return getSQLPart(Having,m_aAdditiveIterator,false); } OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet >& column) const @@ -1387,7 +1387,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( ) OSQLColumns::Vector::const_iterator aEnd = aCols->get().end(); for(OSQLColumns::Vector::const_iterator aIter = aCols->get().begin(); aIter != aEnd;++aIter) aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME))); - m_aCurrentColumns[ParameterColumns] = new OPrivateColumns(aCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,sal_True); + m_aCurrentColumns[ParameterColumns] = new OPrivateColumns(aCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,true); } return m_aCurrentColumns[ParameterColumns]; @@ -1442,7 +1442,7 @@ Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumn OSQLColumns::Vector::const_iterator aEnd = _rCols->get().end(); for(OSQLColumns::Vector::const_iterator aIter = _rCols->get().begin(); aIter != aEnd;++aIter) aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME))); - m_aCurrentColumns[_eType] = new OPrivateColumns(_rCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,sal_True); + m_aCurrentColumns[_eType] = new OPrivateColumns(_rCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,true); } return m_aCurrentColumns[_eType]; @@ -1548,7 +1548,7 @@ void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Seque setHavingClause(lcl_getCondition(filter,aPredicateInput,getColumns())); } -void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& >& _aSetFunctor,sal_Int32 filterOperator) +void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& >& _aSetFunctor,sal_Int32 filterOperator) { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::setConditionByColumn" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); @@ -1677,7 +1677,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert case DataType::BIT: case DataType::BOOLEAN: { - sal_Bool bValue = sal_False; + bool bValue = false; m_xTypeConverter->convertToSimpleType(aValue, TypeClass_BOOLEAN) >>= bValue; OUString sColumnExp = aSQL.makeStringAndClear(); @@ -1824,7 +1824,7 @@ OUString OSingleSelectQueryComposer::getKeyword( SQLPart _ePart ) const return sKeyword; } -OUString OSingleSelectQueryComposer::getSQLPart( SQLPart _ePart, OSQLParseTreeIterator& _rIterator, sal_Bool _bWithKeyword ) +OUString OSingleSelectQueryComposer::getSQLPart( SQLPart _ePart, OSQLParseTreeIterator& _rIterator, bool _bWithKeyword ) { SAL_INFO("dbaccess", "OSingleSelectQueryComposer::getSQLPart" ); TGetParseNode F_tmp(&OSQLParseTreeIterator::getSimpleWhereTree); diff --git a/dbaccess/source/core/api/StaticSet.cxx b/dbaccess/source/core/api/StaticSet.cxx index b9de978a8fd7..f4a4609f7b19 100644 --- a/dbaccess/source/core/api/StaticSet.cxx +++ b/dbaccess/source/core/api/StaticSet.cxx @@ -51,17 +51,17 @@ Any SAL_CALL OStaticSet::getBookmark() throw(SQLException, RuntimeException) return makeAny(getRow()); } -sal_Bool SAL_CALL OStaticSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::moveToBookmark" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return absolute(::comphelper::getINT32(bookmark)); } -sal_Bool SAL_CALL OStaticSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::moveRelativeToBookmark" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; return absolute(::comphelper::getINT32(bookmark)+rows); } @@ -74,10 +74,10 @@ sal_Int32 SAL_CALL OStaticSet::compareBookmarks( const Any& _first, const Any& _ return (nFirst < nSecond) ? CompareBookmark::LESS : ((nFirst > nSecond) ? CompareBookmark::GREATER : CompareBookmark::EQUAL); } -sal_Bool SAL_CALL OStaticSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::hasOrderedBookmarks" ); - return sal_True; + return true; } sal_Int32 SAL_CALL OStaticSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) @@ -86,10 +86,10 @@ sal_Int32 SAL_CALL OStaticSet::hashBookmark( const Any& bookmark ) throw(SQLExce return ::comphelper::getINT32(bookmark); } -sal_Bool OStaticSet::fetchRow() +bool OStaticSet::fetchRow() { SAL_INFO("dbaccess", "OStaticSet::fetchRow" ); - sal_Bool bRet = sal_False; + bool bRet = false; if ( !m_bEnd && (!m_nMaxRows || sal_Int32(m_aSet.size()) < m_nMaxRows) ) bRet = m_xDriverSet->next(); if ( bRet ) @@ -100,7 +100,7 @@ sal_Bool OStaticSet::fetchRow() OCacheSet::fillValueRow(*m_aSetIter,((*m_aSetIter)->get())[0]); } else - m_bEnd = sal_True; + m_bEnd = true; return bRet; } @@ -118,18 +118,18 @@ void OStaticSet::fillAllRows() (pRow->get())[0] = getRow(); OCacheSet::fillValueRow(pRow,(pRow->get())[0]); } - m_bEnd = sal_True; + m_bEnd = true; } } // XResultSet -sal_Bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::next" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; if(isAfterLast()) - return sal_False; + return false; if(!m_bEnd) // not yet all records fetched { ++m_aSetIter; @@ -141,25 +141,25 @@ sal_Bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException) return !isAfterLast(); } -sal_Bool SAL_CALL OStaticSet::isBeforeFirst( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::isBeforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::isBeforeFirst" ); return m_aSetIter == m_aSet.begin(); } -sal_Bool SAL_CALL OStaticSet::isAfterLast( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::isAfterLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::isAfterLast" ); return m_aSetIter == m_aSet.end() && m_bEnd; } -sal_Bool SAL_CALL OStaticSet::isFirst( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::isFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::isFirst" ); return m_aSetIter == m_aSet.begin()+1; } -sal_Bool SAL_CALL OStaticSet::isLast( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::isLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::isLast" ); return m_aSetIter == m_aSet.end()-1 && m_bEnd; @@ -168,22 +168,22 @@ sal_Bool SAL_CALL OStaticSet::isLast( ) throw(SQLException, RuntimeException) void SAL_CALL OStaticSet::beforeFirst( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::beforeFirst" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_aSetIter = m_aSet.begin(); } void SAL_CALL OStaticSet::afterLast( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::afterLast" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; fillAllRows(); m_aSetIter = m_aSet.end(); } -sal_Bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::first" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; m_aSetIter = m_aSet.begin()+1; if(m_aSetIter == m_aSet.end() && !fetchRow()) m_aSetIter = m_aSet.end(); @@ -191,10 +191,10 @@ sal_Bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException) return m_aSetIter != m_aSet.end(); } -sal_Bool SAL_CALL OStaticSet::last( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::last( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::last" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; fillAllRows(); m_aSetIter = m_aSet.end()-1; @@ -212,10 +212,10 @@ sal_Int32 SAL_CALL OStaticSet::getRow( ) throw(SQLException, RuntimeException) return nPos; } -sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::absolute" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; OSL_ENSURE(row,"OStaticSet::absolute: INVALID row number!"); // if row greater 0 than count from end - row means last if(row < 0) @@ -236,7 +236,7 @@ sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, Runt { if(!m_bEnd) { - sal_Bool bNext = sal_True; + bool bNext = true; for(sal_Int32 i=m_aSet.size()-1;i < row && bNext;++i) bNext = fetchRow(); } @@ -253,20 +253,20 @@ sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, Runt return m_aSetIter != m_aSet.end() && m_aSetIter != m_aSet.begin(); } -sal_Bool SAL_CALL OStaticSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::relative" ); if(!rows) - return sal_True; + return true; sal_Int32 nCurPos = getRow(); return absolute(nCurPos+rows); } -sal_Bool SAL_CALL OStaticSet::previous( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::previous( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::previous" ); - m_bInserted = m_bUpdated = m_bDeleted = sal_False; + m_bInserted = m_bUpdated = m_bDeleted = false; if(m_aSetIter != m_aSet.begin()) --m_aSetIter; @@ -279,19 +279,19 @@ void SAL_CALL OStaticSet::refreshRow( ) throw(SQLException, RuntimeException) SAL_INFO("dbaccess", "OStaticSet::refreshRow" ); } -sal_Bool SAL_CALL OStaticSet::rowUpdated( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::rowUpdated( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::rowUpdated" ); return m_bUpdated; } -sal_Bool SAL_CALL OStaticSet::rowInserted( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::rowInserted( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::rowInserted" ); return m_bInserted; } -sal_Bool SAL_CALL OStaticSet::rowDeleted( ) throw(SQLException, RuntimeException) +bool SAL_CALL OStaticSet::rowDeleted( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "OStaticSet::rowDeleted" ); return m_bDeleted; @@ -303,10 +303,10 @@ Sequence< sal_Int32 > SAL_CALL OStaticSet::deleteRows( const Sequence< Any >& ro Sequence< sal_Int32 > aRet(rows.getLength()); const Any* pBegin = rows.getConstArray(); const Any* pEnd = pBegin + rows.getLength(); - for(sal_Int32 i=0;pBegin != pEnd; ++pBegin,++i) + for(sal_Int32 i=0; pBegin != pEnd; ++pBegin,++i) { deleteRow(*(m_aSet.begin() + comphelper::getINT32(*pBegin)),_xTable); - aRet.getArray()[i] = m_bDeleted; + aRet.getArray()[i] = m_bDeleted ? 1 : 0; } return aRet; } @@ -320,7 +320,7 @@ void SAL_CALL OStaticSet::insertRow( const ORowSetRow& _rInsertRow,const connect m_aSet.push_back(new ORowVector< ORowSetValue >(*_rInsertRow)); // we don't know where the new row is so we append it to the current rows m_aSetIter = m_aSet.end() - 1; ((*m_aSetIter)->get())[0] = (_rInsertRow->get())[0] = getBookmark(); - m_bEnd = sal_False; + m_bEnd = false; } } @@ -366,7 +366,7 @@ void OStaticSet::reset(const Reference< XResultSet> &_xDriverSet) m_aSet.swap(t); } m_aSetIter = m_aSet.end(); - m_bEnd = sal_False; + m_bEnd = false; m_aSet.push_back(NULL); // this is the beforefirst record } diff --git a/dbaccess/source/core/api/StaticSet.hxx b/dbaccess/source/core/api/StaticSet.hxx index e6346f7e47b6..c8b9d4b06737 100644 --- a/dbaccess/source/core/api/StaticSet.hxx +++ b/dbaccess/source/core/api/StaticSet.hxx @@ -30,13 +30,13 @@ namespace dbaccess { ORowSetMatrix m_aSet; ORowSetMatrix::iterator m_aSetIter; - sal_Bool m_bEnd; - sal_Bool fetchRow(); + bool m_bEnd; + bool fetchRow(); void fillAllRows(); public: OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows) , m_aSetIter(m_aSet.end()) - , m_bEnd(sal_False) + , m_bEnd(false) { m_aSet.push_back(NULL); // this is the beforefirst record } @@ -46,30 +46,30 @@ namespace dbaccess virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XRowLocate virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbc::XResultSet - virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isBeforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isAfterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL isLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL beforeFirst( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL afterLast( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL first( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL last( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL absolute( sal_Int32 row ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL relative( sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL previous( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL rowUpdated( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL rowInserted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL rowDeleted( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XDeleteRows virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows,const connectivity::OSQLTable& _xTable ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbc::XResultSetUpdate diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 00f042c4a64d..84010da0823d 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -109,7 +109,7 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue( const Any& rValue ) throw (::com::sun::star::lang::IllegalArgumentException) { - sal_Bool bRet = sal_True; + bool bRet = true; switch(nHandle) { case PROPERTY_ID_PRIVILEGES: @@ -305,7 +305,7 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c void ODBTableDecorator::construct() { SAL_INFO("dbaccess", "ODBTableDecorator::construct" ); - sal_Bool bNotFound = sal_True; + bool bNotFound = true; Reference<XPropertySet> xProp(m_xTable,UNO_QUERY); if ( xProp.is() ) { diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index 3be031ff5d66..e48a5ce82dfa 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -56,7 +56,7 @@ namespace dbaccess return sSupportService; } // View - View::View( const Reference< XConnection >& _rxConnection, sal_Bool _bCaseSensitive, + View::View( const Reference< XConnection >& _rxConnection, bool _bCaseSensitive, const OUString& _rCatalogName,const OUString& _rSchemaName, const OUString& _rName ) :View_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, OUString(), _rSchemaName, _rCatalogName ) { diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx b/dbaccess/source/core/api/WrappedResultSet.cxx index 81e484f5c0c9..a1c41100503d 100644 --- a/dbaccess/source/core/api/WrappedResultSet.cxx +++ b/dbaccess/source/core/api/WrappedResultSet.cxx @@ -60,13 +60,13 @@ Any SAL_CALL WrappedResultSet::getBookmark() throw(SQLException, RuntimeExceptio return makeAny(m_xDriverSet->getRow()); } -sal_Bool SAL_CALL WrappedResultSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) +bool SAL_CALL WrappedResultSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "WrappedResultSet::moveToBookmark" ); return m_xRowLocate->moveToBookmark( bookmark ); } -sal_Bool SAL_CALL WrappedResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) +bool SAL_CALL WrappedResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "WrappedResultSet::moveRelativeToBookmark" ); return m_xRowLocate->moveRelativeToBookmark( bookmark,rows ); @@ -78,7 +78,7 @@ sal_Int32 SAL_CALL WrappedResultSet::compareBookmarks( const Any& _first, const return m_xRowLocate->compareBookmarks( _first,_second ); } -sal_Bool SAL_CALL WrappedResultSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) +bool SAL_CALL WrappedResultSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "WrappedResultSet::hasOrderedBookmarks" ); return m_xRowLocate->hasOrderedBookmarks(); diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx b/dbaccess/source/core/api/WrappedResultSet.hxx index cbae7c6e6829..1c77944f25ae 100644 --- a/dbaccess/source/core/api/WrappedResultSet.hxx +++ b/dbaccess/source/core/api/WrappedResultSet.hxx @@ -47,10 +47,10 @@ namespace dbaccess virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XRowLocate virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; // ::com::sun::star::sdbcx::XDeleteRows virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ,const connectivity::OSQLTable& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index fb5e44905bf3..2949515ddf41 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -151,18 +151,18 @@ void OColumn::registerPropertyNoMember( const OUString& _rName, sal_Int32 _nHand OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - sal_Bool _bCaseSensitive,const ::std::vector< OUString> &_rVector, + bool _bCaseSensitive,const ::std::vector< OUString> &_rVector, IColumnFactory* _pColFactory, ::connectivity::sdbcx::IRefreshableColumns* _pRefresh, - sal_Bool _bAddColumn, - sal_Bool _bDropColumn, - sal_Bool _bUseHardRef) + bool _bAddColumn, + bool _bDropColumn, + bool _bUseHardRef) : OColumns_BASE(_rParent,_bCaseSensitive,_rMutex,_rVector,_bUseHardRef) ,m_pMediator(NULL) ,m_xDrvColumns(NULL) ,m_pColFactoryImpl(_pColFactory) ,m_pRefreshColumns(_pRefresh) - ,m_bInitialized(sal_False) + ,m_bInitialized(false) ,m_bAddColumn(_bAddColumn) ,m_bDropColumn(_bDropColumn) { @@ -170,18 +170,18 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent, OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns, - sal_Bool _bCaseSensitive,const ::std::vector< OUString> &_rVector, + bool _bCaseSensitive,const ::std::vector< OUString> &_rVector, IColumnFactory* _pColFactory, ::connectivity::sdbcx::IRefreshableColumns* _pRefresh, - sal_Bool _bAddColumn, - sal_Bool _bDropColumn, - sal_Bool _bUseHardRef) + bool _bAddColumn, + bool _bDropColumn, + bool _bUseHardRef) : OColumns_BASE(_rParent,_bCaseSensitive,_rMutex,_rVector,_bUseHardRef) ,m_pMediator(NULL) ,m_xDrvColumns(_rxDrvColumns) ,m_pColFactoryImpl(_pColFactory) ,m_pRefreshColumns(_pRefresh) - ,m_bInitialized(sal_False) + ,m_bInitialized(false) ,m_bAddColumn(_bAddColumn) ,m_bDropColumn(_bDropColumn) { @@ -305,7 +305,7 @@ Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeExcepti Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException, std::exception) { - sal_Bool bAppendFound = sal_False,bDropFound = sal_False; + bool bAppendFound = false,bDropFound = false; sal_Int32 nSize = 0; Type aAppendType = getCppuType( (Reference<XAppend>*)0); @@ -320,9 +320,9 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException, std::ex for (;pBegin != pEnd ; ++pBegin) { if(aAppendType == *pBegin) - bAppendFound = sal_True; + bAppendFound = true; else if(aDropType == *pBegin) - bDropFound = sal_True; + bDropFound = true; } nSize = (bDropFound ? (bAppendFound ? 0 : 1) : (bAppendFound ? 1 : 2)); } @@ -384,7 +384,7 @@ sdbcx::ObjectType OColumns::appendObject( const OUString& _rForName, const Refer if ( m_pColFactoryImpl ) m_pColFactoryImpl->columnAppended( descriptor ); - ::dbaccess::notifyDataSourceModified(m_xParent,sal_True); + ::dbaccess::notifyDataSourceModified(m_xParent,true); return xReturn; } @@ -414,7 +414,7 @@ void OColumns::dropObject(sal_Int32 _nPos, const OUString& _sElementName) if ( m_pColFactoryImpl ) m_pColFactoryImpl->columnDropped(_sElementName); - ::dbaccess::notifyDataSourceModified(m_xParent,sal_True); + ::dbaccess::notifyDataSourceModified(m_xParent,true); } Reference< XInterface > SAL_CALL OColumns::getParent( ) throw (RuntimeException, std::exception) diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx index f56d0c40e716..d6b673402646 100644 --- a/dbaccess/source/core/api/columnsettings.cxx +++ b/dbaccess/source/core/api/columnsettings.cxx @@ -50,7 +50,7 @@ namespace dbaccess // OColumnSettings OColumnSettings::OColumnSettings() - :m_bHidden(sal_False) + :m_bHidden(false) { } @@ -105,7 +105,7 @@ namespace dbaccess case PROPERTY_ID_HIDDEN: { - sal_Bool bHidden = sal_False; + bool bHidden = false; OSL_VERIFY( _rPropertyValue >>= bHidden ); return !bHidden; } diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx index eeb64c4b68f1..8221ca4bbcb6 100644 --- a/dbaccess/source/core/api/datasettings.cxx +++ b/dbaccess/source/core/api/datasettings.cxx @@ -96,7 +96,7 @@ void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem) registerProperty(PROPERTY_FONTTYPE, PROPERTY_ID_FONTTYPE, PropertyAttribute::BOUND,&_pItem->m_aFont.Type, ::getCppuType(&_pItem->m_aFont.Type)); } -ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,sal_Bool _bQuery) +ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,bool _bQuery) :OPropertyStateContainer(_rBHelper) ,ODataSettings_Base() ,m_bQuery(_bQuery) @@ -104,7 +104,7 @@ ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,sal_Bool _bQuery) } ODataSettings_Base::ODataSettings_Base() - :m_bApplyFilter(sal_False) + :m_bApplyFilter(false) ,m_aFont(::comphelper::getDefaultFont()) ,m_nFontEmphasis(::com::sun::star::awt::FontEmphasisMark::NONE) ,m_nFontRelief(::com::sun::star::awt::FontRelief::NONE) diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index 8c4e8fac59c2..5908d2c3a518 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -114,7 +114,7 @@ Sequence< OUString > OTableColumnDescriptor::getSupportedServiceNames( ) throw void OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception, std::exception) { OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue ); - ::dbaccess::notifyDataSourceModified( m_xParent, sal_True ); + ::dbaccess::notifyDataSourceModified( m_xParent, true ); } Reference< XInterface > SAL_CALL OTableColumnDescriptor::getParent( ) throw (RuntimeException, std::exception) @@ -181,7 +181,7 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency ); OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName ); - m_bRowVersion = sal_False; + m_bRowVersion = false; Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW ); if ( xPSI->hasPropertyByName( PROPERTY_DEFAULTVALUE ) ) @@ -367,7 +367,7 @@ void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException) { - sal_Bool bModified( sal_False ); + bool bModified( false ); if ( OColumn::isRegisteredProperty( nHandle ) ) { bModified = OColumn::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue ); @@ -378,7 +378,7 @@ sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & if ( rOldValue != rValue ) { rConvertedValue = rValue; - bModified = sal_True; + bModified = true; } } return bModified; @@ -519,7 +519,7 @@ void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32 sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException) { - sal_Bool bModified(sal_False); + bool bModified(false); if ( m_bPureWrap ) { // do not delegate to OColumnWrapper: It would, for the properties which were registered with registerProperty, @@ -531,7 +531,7 @@ sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvert if ( rOldValue != rValue ) { rConvertedValue = rValue; - bModified = sal_True; + bModified = true; } } else diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index 43ce3a201edc..5dae905b1e7c 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -72,12 +72,12 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition ,const Reference< XComponentContext >& _xORB) :OContentHelper(_xORB,NULL,TContentPtr(new OContentHelper_Impl)) ,OQueryDescriptor_Base(m_aMutex,*this) - ,ODataSettings(OContentHelper::rBHelper,sal_True) + ,ODataSettings(OContentHelper::rBHelper,true) ,m_xCommandDefinition(_rxCommandDefinition) ,m_xConnection(_rxConn) ,m_pColumnMediator( NULL ) ,m_pWarnings( NULL ) - ,m_bCaseSensitiv(sal_True) + ,m_bCaseSensitiv(true) ,m_eDoingCurrently(NONE) { registerProperties(); diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx index e0a14916aee2..ecaa325b043a 100644 --- a/dbaccess/source/core/api/query.hxx +++ b/dbaccess/source/core/api/query.hxx @@ -65,7 +65,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xCommandPropInfo; ::rtl::Reference< OContainerMediator > m_pColumnMediator; ::dbtools::IWarningsContainer* m_pWarnings; - sal_Bool m_bCaseSensitiv : 1; // assume case sensitivity of the column names ? + bool m_bCaseSensitiv : 1; // assume case sensitivity of the column names ? // possible actions on our "aggregate" enum AGGREGATE_ACTION { NONE, SETTING_PROPERTIES, FLUSHING }; diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index daa92bc88574..fcf016fbf3ce 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -363,9 +363,9 @@ Reference< XContent > OQueryContainer::createObject( const OUString& _rName) return implCreateWrapper(_rName); } -sal_Bool OQueryContainer::checkExistence(const OUString& _rName) +bool OQueryContainer::checkExistence(const OUString& _rName) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !m_bInPropertyChange ) { bRet = m_xCommandDefinitions->hasByName(_rName); diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index 623122425ee5..909da3273dbe 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -47,7 +47,7 @@ namespace dbaccess OQueryDescriptor::OQueryDescriptor() :OQueryDescriptor_Base(m_aMutex,*this) - ,ODataSettings(m_aBHelper,sal_True) + ,ODataSettings(m_aBHelper,true) { registerProperties(); ODataSettings::registerPropertiesFor(this); @@ -55,7 +55,7 @@ OQueryDescriptor::OQueryDescriptor() OQueryDescriptor::OQueryDescriptor(const OQueryDescriptor_Base& _rSource) :OQueryDescriptor_Base(_rSource,*this) - ,ODataSettings(m_aBHelper,sal_True) + ,ODataSettings(m_aBHelper,true) { registerProperties(); ODataSettings::registerPropertiesFor(this); @@ -119,17 +119,17 @@ Reference< XPropertySetInfo > SAL_CALL OQueryDescriptor::getPropertySetInfo( ) OQueryDescriptor_Base::OQueryDescriptor_Base(::osl::Mutex& _rMutex,::cppu::OWeakObject& _rMySelf) - :m_bColumnsOutOfDate(sal_True) + :m_bColumnsOutOfDate(true) ,m_rMutex(_rMutex) { - m_pColumns = new OColumns(_rMySelf, m_rMutex, sal_True,::std::vector< OUString>(), this,this); + m_pColumns = new OColumns(_rMySelf, m_rMutex, true,::std::vector< OUString>(), this,this); } OQueryDescriptor_Base::OQueryDescriptor_Base(const OQueryDescriptor_Base& _rSource,::cppu::OWeakObject& _rMySelf) - :m_bColumnsOutOfDate(sal_True) + :m_bColumnsOutOfDate(true) ,m_rMutex(_rSource.m_rMutex) { - m_pColumns = new OColumns(_rMySelf, m_rMutex, sal_True,::std::vector< OUString>(), this,this); + m_pColumns = new OColumns(_rMySelf, m_rMutex, true,::std::vector< OUString>(), this,this); m_sCommand = _rSource.m_sCommand; m_bEscapeProcessing = _rSource.m_bEscapeProcessing; @@ -160,7 +160,7 @@ sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 IMPLEMENT_IMPLEMENTATION_ID(OQueryDescriptor_Base) -void OQueryDescriptor_Base::setColumnsOutOfDate( sal_Bool _bOutOfDate ) +void OQueryDescriptor_Base::setColumnsOutOfDate( bool _bOutOfDate ) { m_bColumnsOutOfDate = _bOutOfDate; if ( !m_bColumnsOutOfDate ) @@ -192,7 +192,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru // have queries with cyclic references: // foo := SELECT * FROM bar // bar := SELECT * FROM foo - setColumnsOutOfDate( sal_False ); + setColumnsOutOfDate( false ); // rebuild them try @@ -201,7 +201,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru } catch ( const Exception& ) { - setColumnsOutOfDate( sal_True ); + setColumnsOutOfDate( true ); throw; } } diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx index 30ffa14a0254..6182b481ca0a 100644 --- a/dbaccess/source/core/api/querydescriptor.hxx +++ b/dbaccess/source/core/api/querydescriptor.hxx @@ -51,7 +51,7 @@ class OQueryDescriptor_Base ,public ::connectivity::sdbcx::IRefreshableColumns { private: - sal_Bool m_bColumnsOutOfDate : 1; // the columns have to be rebuild on the next getColumns ? + bool m_bColumnsOutOfDate : 1; // the columns have to be rebuild on the next getColumns ? ::osl::Mutex& m_rMutex; protected: @@ -59,8 +59,8 @@ protected: OUString m_sElementName; virtual ~OQueryDescriptor_Base(); - void setColumnsOutOfDate( sal_Bool _bOutOfDate = sal_True ); - sal_Bool isColumnsOutOfDate() const { return m_bColumnsOutOfDate; } + void setColumnsOutOfDate( bool _bOutOfDate = true ); + bool isColumnsOutOfDate() const { return m_bColumnsOutOfDate; } sal_Int32 getColumnCount() const { return m_pColumns ? m_pColumns->getCount() : 0; } void clearColumns( ); diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx index b7aedc26a4e8..f739c43a1c8e 100644 --- a/dbaccess/source/core/api/resultcolumn.cxx +++ b/dbaccess/source/core/api/resultcolumn.cxx @@ -55,7 +55,7 @@ void OResultColumn::impl_determineIsRowVersion_nothrow() { if ( m_aIsRowVersion.hasValue() ) return; - m_aIsRowVersion <<= (sal_Bool)(sal_False); + m_aIsRowVersion <<= false; OSL_ENSURE( m_xDBMetaData.is(), "OResultColumn::impl_determineIsRowVersion_nothrow: no DBMetaData!" ); if ( !m_xDBMetaData.is() ) @@ -80,7 +80,7 @@ void OResultColumn::impl_determineIsRowVersion_nothrow() { if ( xResultRow->getString( 2 ) == sColumnName ) { - m_aIsRowVersion <<= (sal_Bool)(sal_True); + m_aIsRowVersion <<= true; break; } } diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index 1cc22b2b1a88..8f9e48a88fe9 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -51,14 +51,14 @@ using namespace dbtools; OResultSet::OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xResultSet, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xStatement, - sal_Bool _bCaseSensitive) + bool _bCaseSensitive) :OResultSetBase(m_aMutex) ,OPropertySetHelper(OResultSetBase::rBHelper) ,m_xDelegatorResultSet(_xResultSet) ,m_aWarnings( Reference< XWarningsSupplier >( _xResultSet, UNO_QUERY ) ) ,m_nResultSetType(0) ,m_nResultSetConcurrency(0) - ,m_bIsBookmarkable(sal_False) + ,m_bIsBookmarkable(false) { SAL_INFO("dbaccess", "OResultSet::OResultSet" ); diff --git a/dbaccess/source/core/api/resultset.hxx b/dbaccess/source/core/api/resultset.hxx index 00c30ee8f05e..55030b32ec13 100644 --- a/dbaccess/source/core/api/resultset.hxx +++ b/dbaccess/source/core/api/resultset.hxx @@ -78,12 +78,12 @@ namespace dbaccess OColumns* m_pColumns; sal_Int32 m_nResultSetType; sal_Int32 m_nResultSetConcurrency; - sal_Bool m_bIsBookmarkable : 1; + bool m_bIsBookmarkable : 1; public: OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xResultSet, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xStatement, - sal_Bool _bCaseSensitive); + bool _bCaseSensitive); virtual ~OResultSet(); // ::com::sun::star::lang::XTypeProvider diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index efba5c1861cb..afb9bc3fa2d1 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -46,8 +46,8 @@ OStatementBase::OStatementBase(const Reference< XConnection > & _xConn, const Reference< XInterface > & _xStatement) :OSubComponent(m_aMutex, _xConn) ,OPropertySetHelper(OComponentHelper::rBHelper) - ,m_bUseBookmarks( sal_False ) - ,m_bEscapeProcessing( sal_True ) + ,m_bUseBookmarks( false ) + ,m_bEscapeProcessing( true ) { SAL_INFO("dbaccess", "OStatementBase::OStatementBase" ); @@ -208,7 +208,7 @@ Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (Runtim sal_Bool OStatementBase::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException ) { //SAL_INFO("dbaccess", "OStatementBase::convertFastPropertyValue" ); - sal_Bool bModified(sal_False); + bool bModified(false); switch (nHandle) { case PROPERTY_ID_USEBOOKMARKS: @@ -232,7 +232,7 @@ sal_Bool OStatementBase::convertFastPropertyValue( Any & rConvertedValue, Any & { rOldValue = aCurrentValue; rConvertedValue = rValue; - bModified = sal_True; + bModified = true; } } break; @@ -482,7 +482,7 @@ Reference< XResultSet > OStatement::executeQuery( const OUString& _rSQL ) throw( if ( xInnerResultSet.is() ) { Reference< XDatabaseMetaData > xMeta = xConnection->getMetaData(); - sal_Bool bCaseSensitive = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(); + bool bCaseSensitive = xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(); xResultSet = new OResultSet( xInnerResultSet, *this, bCaseSensitive ); // keep the resultset weak diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index e4feb8c481a5..438902d41c1b 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -67,7 +67,7 @@ using namespace ::connectivity::sdbcx; namespace { - sal_Bool lcl_isPropertySetDefaulted(const Sequence< OUString>& _aNames,const Reference<XPropertySet>& _xProp) + bool lcl_isPropertySetDefaulted(const Sequence< OUString>& _aNames,const Reference<XPropertySet>& _xProp) { Reference<XPropertyState> xState(_xProp,UNO_QUERY); if ( xState.is() ) @@ -89,7 +89,7 @@ namespace } return ( pIter == pEnd ); } - return sal_False; + return false; } } @@ -98,7 +98,7 @@ namespace OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const Reference< XConnection >& _xCon, - sal_Bool _bCase, + bool _bCase, const Reference< XNameContainer >& _xTableDefinitions, IRefreshListener* _pRefreshListener, ::dbtools::IWarningsContainer* _pWarningsContainer @@ -106,7 +106,7 @@ OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent, :OFilteredContainer(_rParent,_rMutex,_xCon,_bCase,_pRefreshListener,_pWarningsContainer,_nInAppend) ,m_xTableDefinitions(_xTableDefinitions) ,m_pTableMediator( NULL ) - ,m_bInDrop(sal_False) + ,m_bInDrop(false) { } @@ -310,7 +310,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer Reference<XColumnsSupplier> xSup(descriptor,UNO_QUERY); Reference<XDataDescriptorFactory> xFac(xColumnDefinitions,UNO_QUERY); Reference<XAppend> xAppend(xColumnDefinitions,UNO_QUERY); - sal_Bool bModified = sal_False; + bool bModified = false; if ( xSup.is() && xColumnDefinitions.is() && xFac.is() && xAppend.is() ) { Reference<XNameAccess> xNames = xSup->getColumns(); @@ -329,7 +329,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer { ::comphelper::copyProperties( xColumn, xProp ); xAppend->appendByDescriptor( xProp ); - bModified = sal_True; + bModified = true; } } } @@ -342,7 +342,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer , OUString(PROPERTY_TEXTRELIEF) }; Sequence< OUString> aNames(s_pTableProps,sizeof(s_pTableProps)/sizeof(s_pTableProps[0])); if ( bModified || !lcl_isPropertySetDefaulted(aNames,xTableDefinition) ) - ::dbaccess::notifyDataSourceModified(m_xTableDefinitions,sal_True); + ::dbaccess::notifyDataSourceModified(m_xTableDefinitions,true); return createObject( _rForName ); } @@ -351,7 +351,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) { SAL_INFO("dbaccess", "dbaccess Ocke.Janssen@sun.com OTableContainer::dropObject" ); - m_bInDrop = sal_True; + m_bInDrop = true; try { Reference< XDrop > xDrop(m_xMasterContainer,UNO_QUERY); @@ -361,7 +361,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) { OUString sCatalog,sSchema,sTable,sComposedName; - sal_Bool bIsView = sal_False; + bool bIsView = false; Reference<XPropertySet> xTable(getObject(_nPos),UNO_QUERY); if ( xTable.is() && m_xMetaData.is() ) { @@ -406,10 +406,10 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) } catch(const Exception&) { - m_bInDrop = sal_False; + m_bInDrop = false; throw; } - m_bInDrop = sal_False; + m_bInDrop = false; } void SAL_CALL OTableContainer::elementInserted( const ContainerEvent& Event ) throw (RuntimeException, std::exception) diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index 270450edba13..7725bdf82dc6 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -61,7 +61,7 @@ using namespace ::connectivity::sdbcx; OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent ,::osl::Mutex& _rMutex ,const Reference< XConnection >& _xCon - ,sal_Bool _bCase + ,bool _bCase ,IRefreshListener* _pRefreshListener ,::dbtools::IWarningsContainer* _pWarningsContainer ,oslInterlockedCount& _nInAppend) diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx index bd10672d6952..88f21841b4bc 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx @@ -123,7 +123,7 @@ void OComponentDefinition::registerProperties() OComponentDefinition::OComponentDefinition(const Reference< XComponentContext >& _xORB ,const Reference< XInterface >& _xParentContainer ,const TContentPtr& _pImpl - ,sal_Bool _bTable) + ,bool _bTable) :OContentHelper(_xORB,_xParentContainer,_pImpl) ,ODataSettings(OContentHelper::rBHelper,!_bTable) ,m_bTable(_bTable) @@ -139,7 +139,7 @@ OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxCo ,const OUString& _rElementName ,const Reference< XComponentContext >& _xORB ,const TContentPtr& _pImpl - ,sal_Bool _bTable) + ,bool _bTable) :OContentHelper(_xORB,_rxContainer,_pImpl) ,ODataSettings(OContentHelper::rBHelper,!_bTable) ,m_bTable(_bTable) @@ -239,7 +239,7 @@ Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeExcepti for ( ; aIter != aEnd; ++aIter ) aNames.push_back( aIter->first ); - m_pColumns.reset( new OColumns( *this, m_aMutex, sal_True, aNames, this, NULL, sal_True, sal_False, sal_False ) ); + m_pColumns.reset( new OColumns( *this, m_aMutex, true, aNames, this, NULL, true, false, false ) ); m_pColumns->setParent( *this ); } return m_pColumns.get(); diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx index 1c9ada9066bc..25b2e1ebb505 100644 --- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx +++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx @@ -92,7 +92,7 @@ protected: ::std::auto_ptr< OColumns > m_pColumns; ::comphelper::ImplementationReference< OColumnPropertyListener,::com::sun::star::beans::XPropertyChangeListener> m_xColumnPropertyListener; - sal_Bool m_bTable; + bool m_bTable; virtual ~OComponentDefinition(); virtual void SAL_CALL disposing() SAL_OVERRIDE; @@ -101,7 +101,7 @@ protected: OComponentDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer ,const TContentPtr& _pImpl - ,sal_Bool _bTable = sal_True); + ,bool _bTable = true); const OComponentDefinition_Impl& getDefinition() const { return dynamic_cast< const OComponentDefinition_Impl& >( *m_pImpl.get() ); } OComponentDefinition_Impl& getDefinition() { return dynamic_cast< OComponentDefinition_Impl& >( *m_pImpl.get() ); } @@ -112,7 +112,7 @@ public: ,const OUString& _rElementName ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ,const TContentPtr& _pImpl - ,sal_Bool _bTable = sal_True + ,bool _bTable = true ); virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 006ebcaffaf8..ce43d56f4cdb 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -624,7 +624,7 @@ void SAL_CALL OContentHelper::rename( const OUString& newName ) throw (SQLExcept void OContentHelper::notifyDataSourceModified() { - ::dbaccess::notifyDataSourceModified(m_xParentContainer,sal_True); + ::dbaccess::notifyDataSourceModified(m_xParentContainer,true); } } // namespace dbaccess diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 2f5b6869a716..87e62ca36343 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -342,7 +342,7 @@ void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEv ::osl::MutexGuard aGuard( m_aMutex ); if ( m_pModelImplementation ) - m_pModelImplementation->setModified( sal_True ); + m_pModelImplementation->setModified( true ); if ( m_pModelImplementation && m_bPropagateCommitToRoot ) { @@ -406,11 +406,11 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _r ,m_bDocumentInitialized( false ) ,m_aContext( _rxContext ) ,m_nLoginTimeout(0) - ,m_bReadOnly(sal_False) - ,m_bPasswordRequired(sal_False) - ,m_bSuppressVersionColumns(sal_True) - ,m_bModified(sal_False) - ,m_bDocumentReadOnly(sal_False) + ,m_bReadOnly(false) + ,m_bPasswordRequired(false) + ,m_bSuppressVersionColumns(true) + ,m_bModified(false) + ,m_bDocumentReadOnly(false) ,m_pSharedConnectionManager(NULL) ,m_nControllerLockCount(0) { @@ -442,11 +442,11 @@ ODatabaseModelImpl::ODatabaseModelImpl( ,m_aContext( _rxContext ) ,m_sName(_rRegistrationName) ,m_nLoginTimeout(0) - ,m_bReadOnly(sal_False) - ,m_bPasswordRequired(sal_False) - ,m_bSuppressVersionColumns(sal_True) - ,m_bModified(sal_False) - ,m_bDocumentReadOnly(sal_False) + ,m_bReadOnly(false) + ,m_bPasswordRequired(false) + ,m_bSuppressVersionColumns(true) + ,m_bModified(false) + ,m_bDocumentReadOnly(false) ,m_pSharedConnectionManager(NULL) ,m_nControllerLockCount(0) { @@ -609,7 +609,7 @@ bool ODatabaseModelImpl::objectHasMacros( const Reference< XStorage >& _rxContai void ODatabaseModelImpl::reset() { - m_bReadOnly = sal_False; + m_bReadOnly = false; ::std::vector< TContentPtr > aEmptyContainers( 4 ); m_aContainer.swap( aEmptyContainers ); @@ -707,7 +707,7 @@ void ODatabaseModelImpl::dispose() try { - sal_Bool bCouldStore = commitEmbeddedStorage( true ); + bool bCouldStore = commitEmbeddedStorage( true ); // "true" means that committing the embedded storage should not trigger committing the root // storage. This is because we are going to commit the root storage ourself, anyway disposeStorages(); @@ -832,7 +832,7 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage() } catch( const Exception& ) { - m_bDocumentReadOnly = sal_True; + m_bDocumentReadOnly = true; aStorageCreationArgs[1] <<= ElementModes::READ; try { @@ -897,7 +897,7 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference< return bSuccess; } -void ODatabaseModelImpl::setModified( sal_Bool _bModified ) +void ODatabaseModelImpl::setModified( bool _bModified ) { if ( isModifyLocked() ) return; @@ -1017,25 +1017,25 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings() { // known JDBC settings AsciiPropertyValue( "JavaDriverClass", makeAny( OUString() ) ), - AsciiPropertyValue( "JavaDriverClassPath", makeAny( OUString() ) ), - AsciiPropertyValue( "IgnoreCurrency", makeAny( (sal_Bool)sal_False ) ), + AsciiPropertyValue( "JavaDriverClassPath", makeAny( OUString() ) ), + AsciiPropertyValue( "IgnoreCurrency", makeAny( false ) ), // known settings for file-based drivers AsciiPropertyValue( "Extension", makeAny( OUString() ) ), AsciiPropertyValue( "CharSet", makeAny( OUString() ) ), - AsciiPropertyValue( "HeaderLine", makeAny( (sal_Bool)sal_True ) ), + AsciiPropertyValue( "HeaderLine", makeAny( true ) ), AsciiPropertyValue( "FieldDelimiter", makeAny( OUString( "," ) ) ), AsciiPropertyValue( "StringDelimiter", makeAny( OUString( "\"" ) ) ), AsciiPropertyValue( "DecimalDelimiter", makeAny( OUString( "." ) ) ), AsciiPropertyValue( "ThousandDelimiter", makeAny( OUString() ) ), - AsciiPropertyValue( "ShowDeleted", makeAny( (sal_Bool)sal_False ) ), + AsciiPropertyValue( "ShowDeleted", makeAny( false ) ), // known ODBC settings AsciiPropertyValue( "SystemDriverSettings", makeAny( OUString() ) ), - AsciiPropertyValue( "UseCatalog", makeAny( (sal_Bool)sal_False ) ), + AsciiPropertyValue( "UseCatalog", makeAny( false ) ), AsciiPropertyValue( "TypeInfoSettings", makeAny( Sequence< Any >()) ), // settings related to auto increment handling AsciiPropertyValue( "AutoIncrementCreation", makeAny( OUString() ) ), AsciiPropertyValue( "AutoRetrievingStatement", makeAny( OUString() ) ), - AsciiPropertyValue( "IsAutoRetrievingEnabled", makeAny( (sal_Bool)sal_False ) ), + AsciiPropertyValue( "IsAutoRetrievingEnabled", makeAny( false ) ), // known LDAP driver settings AsciiPropertyValue( "HostName", makeAny( OUString() ) ), AsciiPropertyValue( "PortNumber", makeAny( (sal_Int32)389 ) ), @@ -1045,28 +1045,28 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings() AsciiPropertyValue( "LocalSocket", makeAny( OUString() ) ), AsciiPropertyValue( "NamedPipe", makeAny( OUString() ) ), // misc known driver settings - AsciiPropertyValue( "ParameterNameSubstitution", makeAny( (sal_Bool)sal_False ) ), - AsciiPropertyValue( "AddIndexAppendix", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "IgnoreDriverPrivileges", makeAny( (sal_Bool)sal_True ) ), + AsciiPropertyValue( "ParameterNameSubstitution", makeAny( false ) ), + AsciiPropertyValue( "AddIndexAppendix", makeAny( true ) ), + AsciiPropertyValue( "IgnoreDriverPrivileges", makeAny( true ) ), AsciiPropertyValue( "ImplicitCatalogRestriction", ::cppu::UnoType< OUString >::get() ), AsciiPropertyValue( "ImplicitSchemaRestriction", ::cppu::UnoType< OUString >::get() ), AsciiPropertyValue( "PrimaryKeySupport", ::cppu::UnoType< sal_Bool >::get() ), - AsciiPropertyValue( "ShowColumnDescription", makeAny( (sal_Bool)sal_False ) ), + AsciiPropertyValue( "ShowColumnDescription", makeAny( false ) ), // known SDB level settings - AsciiPropertyValue( "NoNameLengthLimit", makeAny( (sal_Bool)sal_False ) ), - AsciiPropertyValue( "AppendTableAliasName", makeAny( (sal_Bool)sal_False ) ), - AsciiPropertyValue( "GenerateASBeforeCorrelationName", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "ColumnAliasInOrderBy", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "EnableSQL92Check", makeAny( (sal_Bool)sal_False ) ), + AsciiPropertyValue( "NoNameLengthLimit", makeAny( false ) ), + AsciiPropertyValue( "AppendTableAliasName", makeAny( false ) ), + AsciiPropertyValue( "GenerateASBeforeCorrelationName", makeAny( true ) ), + AsciiPropertyValue( "ColumnAliasInOrderBy", makeAny( true ) ), + AsciiPropertyValue( "EnableSQL92Check", makeAny( false ) ), AsciiPropertyValue( "BooleanComparisonMode", makeAny( BooleanComparisonMode::EQUAL_INTEGER ) ), AsciiPropertyValue( "TableTypeFilterMode", makeAny( (sal_Int32)3 ) ), - AsciiPropertyValue( "RespectDriverResultSetType", makeAny( (sal_Bool)sal_False ) ), - AsciiPropertyValue( "UseSchemaInSelect", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "UseCatalogInSelect", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "EnableOuterJoinEscape", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "PreferDosLikeLineEnds", makeAny( (sal_Bool)sal_False ) ), - AsciiPropertyValue( "FormsCheckRequiredFields", makeAny( (sal_Bool)sal_True ) ), - AsciiPropertyValue( "EscapeDateTime", makeAny( (sal_Bool)sal_True ) ), + AsciiPropertyValue( "RespectDriverResultSetType", makeAny( false ) ), + AsciiPropertyValue( "UseSchemaInSelect", makeAny( true ) ), + AsciiPropertyValue( "UseCatalogInSelect", makeAny( true ) ), + AsciiPropertyValue( "EnableOuterJoinEscape", makeAny( true ) ), + AsciiPropertyValue( "PreferDosLikeLineEnds", makeAny( false ) ), + AsciiPropertyValue( "FormsCheckRequiredFields", makeAny( true ) ), + AsciiPropertyValue( "EscapeDateTime", makeAny( true ) ), // known services to handle database tasks AsciiPropertyValue( "TableAlterationServiceName", makeAny( OUString() ) ), @@ -1368,7 +1368,7 @@ void ODatabaseModelImpl::showBrokenSignatureWarning( const Reference< XInteracti void ODatabaseModelImpl::storageIsModified() { - setModified( sal_True ); + setModified( true ); } ModelDependentComponent::ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model ) diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx index 258764dd4a99..e162cca1a611 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.hxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx @@ -230,11 +230,11 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> m_aLayoutInformation; sal_Int32 m_nLoginTimeout; - sal_Bool m_bReadOnly : 1; - sal_Bool m_bPasswordRequired : 1; - sal_Bool m_bSuppressVersionColumns : 1; - sal_Bool m_bModified : 1; - sal_Bool m_bDocumentReadOnly : 1; + bool m_bReadOnly : 1; + bool m_bPasswordRequired : 1; + bool m_bSuppressVersionColumns : 1; + bool m_bModified : 1; + bool m_bDocumentReadOnly : 1; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyBag > m_xSettings; ::com::sun::star::uno::Sequence< OUString > m_aTableFilter; @@ -280,7 +280,7 @@ public: // XEventListener void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); - void setModified( sal_Bool bModified ); + void setModified( bool bModified ); void dispose(); diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx index 0d6f09623a6a..40276e6ae5ef 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx @@ -101,7 +101,7 @@ Sequence< OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( ) t void SAL_CALL OBookmarkContainer::insertByName( const OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_True); + checkValid(true); if (checkExistence(_rName)) throw ElementExistException(); @@ -131,7 +131,7 @@ void SAL_CALL OBookmarkContainer::removeByName( const OUString& _rName ) throw(N OUString sOldBookmark; { MutexGuard aGuard(m_rMutex); - checkValid(sal_True); + checkValid(true); // check the arguments if (_rName.isEmpty()) @@ -161,7 +161,7 @@ void SAL_CALL OBookmarkContainer::removeByName( const OUString& _rName ) throw(N void SAL_CALL OBookmarkContainer::replaceByName( const OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException, std::exception) { ClearableMutexGuard aGuard(m_rMutex); - checkValid(sal_True); + checkValid(true); // check the arguments if (_rName.isEmpty()) @@ -211,14 +211,14 @@ void SAL_CALL OBookmarkContainer::removeContainerListener( const Reference< XCon Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); return ::getCppuType( static_cast< OUString* >(NULL) ); } sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); return !m_aBookmarks.empty(); } @@ -226,7 +226,7 @@ sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException, st Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) throw(RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); return new ::comphelper::OEnumerationByIndex(static_cast<XIndexAccess*>(this)); } @@ -234,14 +234,14 @@ Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) thr sal_Int32 SAL_CALL OBookmarkContainer::getCount( ) throw(RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); return m_aBookmarks.size(); } Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); if ((_nIndex < 0) || (_nIndex >= (sal_Int32)m_aBookmarksIndexed.size())) throw IndexOutOfBoundsException(); @@ -252,7 +252,7 @@ Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutO Any SAL_CALL OBookmarkContainer::getByName( const OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); if (!checkExistence(_rName)) throw NoSuchElementException(); @@ -263,7 +263,7 @@ Any SAL_CALL OBookmarkContainer::getByName( const OUString& _rName ) throw(NoSuc Sequence< OUString > SAL_CALL OBookmarkContainer::getElementNames( ) throw(RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); Sequence< OUString > aNames(m_aBookmarks.size()); OUString* pNames = aNames.getArray(); @@ -282,7 +282,7 @@ Sequence< OUString > SAL_CALL OBookmarkContainer::getElementNames( ) throw(Runt sal_Bool SAL_CALL OBookmarkContainer::hasByName( const OUString& _rName ) throw(RuntimeException, std::exception) { MutexGuard aGuard(m_rMutex); - checkValid(sal_False); + checkValid(false); return checkExistence(_rName); } @@ -332,7 +332,7 @@ void OBookmarkContainer::implReplace(const OUString& _rName, const OUString& _rN m_aBookmarks[_rName] = _rNewLink; } -void OBookmarkContainer::checkValid(sal_Bool /*_bIntendWriteAccess*/) const throw (RuntimeException, DisposedException) +void OBookmarkContainer::checkValid(bool /*_bIntendWriteAccess*/) const throw (RuntimeException, DisposedException) { } diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx index 2053c779ac42..cbc2ca920a13 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx @@ -136,14 +136,14 @@ protected: if sal_True and the configuration is readonly, a runtime exception with a description string is thrown. */ - void checkValid(sal_Bool _bIntendWriteAccess) const throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::DisposedException); + void checkValid(bool _bIntendWriteAccess) const throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::DisposedException); /** quickly checks if there already is an element with a given name. No access to the configuration occurs, i.e. if there is such an object which is not already loaded, it won't be loaded now. @param _rName the object name to check @return sal_True if there already exists such an object */ - inline sal_Bool checkExistence(const OUString& _rName); + inline bool checkExistence(const OUString& _rName); void implAppend( const OUString& _rName, @@ -158,7 +158,7 @@ protected: }; -inline sal_Bool OBookmarkContainer::checkExistence(const OUString& _rName) +inline bool OBookmarkContainer::checkExistence(const OUString& _rName) { return m_aBookmarks.find(_rName) != m_aBookmarks.end(); } diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx index f7bb22ed93a5..ee0a871e761b 100644 --- a/dbaccess/source/core/dataaccess/commandcontainer.cxx +++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx @@ -42,7 +42,7 @@ namespace dbaccess OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::uno::XComponentContext >& _xORB ,const Reference< XInterface >& _xParentContainer ,const TContentPtr& _pImpl - ,sal_Bool _bTables + ,bool _bTables ) :ODefinitionContainer(_xORB,_xParentContainer,_pImpl,!_bTables) ,m_bTables(_bTables) diff --git a/dbaccess/source/core/dataaccess/commandcontainer.hxx b/dbaccess/source/core/dataaccess/commandcontainer.hxx index 169e7750c607..38984af8c519 100644 --- a/dbaccess/source/core/dataaccess/commandcontainer.hxx +++ b/dbaccess/source/core/dataaccess/commandcontainer.hxx @@ -36,7 +36,7 @@ typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XSingleServiceFactory class OCommandContainer : public ODefinitionContainer ,public OCommandContainer_BASE { - sal_Bool m_bTables; + bool m_bTables; public: /** constructs the container.<BR> @@ -45,7 +45,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer ,const TContentPtr& _pImpl - ,sal_Bool _bTables + ,bool _bTables ); DECLARE_XINTERFACE( ) diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx index 14a527eb518e..7b5bc4328eb9 100644 --- a/dbaccess/source/core/dataaccess/commanddefinition.cxx +++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx @@ -83,7 +83,7 @@ void OCommandDefinition::setCommand(const OUString& p1) throw( ::com::sun::star: setPropertyValue(PROPERTY_COMMAND, Any(p1) ); } -sal_Bool OCommandDefinition::getEscapeProcessing() throw( ::com::sun::star::uno::RuntimeException ) +bool OCommandDefinition::getEscapeProcessing() throw( ::com::sun::star::uno::RuntimeException ) { return getCommandDefinition().m_bEscapeProcessing; } @@ -126,7 +126,7 @@ void OCommandDefinition::setUpdateSchemaName(const OUString& p1) throw( ::com::s OCommandDefinition::OCommandDefinition(const Reference< XComponentContext >& _xORB ,const Reference< XInterface >& _rxContainer ,const TContentPtr& _pImpl) - :OComponentDefinition(_xORB,_rxContainer,_pImpl,sal_False) + :OComponentDefinition(_xORB,_rxContainer,_pImpl,false) { registerProperties(); } @@ -139,7 +139,7 @@ OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContai ,const OUString& _rElementName ,const Reference< XComponentContext >& _xORB ,const TContentPtr& _pImpl) - :OComponentDefinition(_rxContainer,_rElementName,_xORB,_pImpl,sal_False) + :OComponentDefinition(_rxContainer,_rElementName,_xORB,_pImpl,false) { registerProperties(); } diff --git a/dbaccess/source/core/dataaccess/commanddefinition.hxx b/dbaccess/source/core/dataaccess/commanddefinition.hxx index b253461dfbc4..940be33fd606 100644 --- a/dbaccess/source/core/dataaccess/commanddefinition.hxx +++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx @@ -128,7 +128,7 @@ public: virtual OUString getName() throw( ::com::sun::star::uno::RuntimeException ); virtual OUString getCommand() throw( ::com::sun::star::uno::RuntimeException ); virtual void setCommand(const OUString&) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool getEscapeProcessing() throw( ::com::sun::star::uno::RuntimeException ); + virtual bool getEscapeProcessing() throw( ::com::sun::star::uno::RuntimeException ); virtual void setEscapeProcessing(sal_Bool) throw( ::com::sun::star::uno::RuntimeException ); virtual OUString getUpdateTableName() throw( ::com::sun::star::uno::RuntimeException ); virtual void setUpdateTableName(const OUString&) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 2ab39b11a9c6..1af1083f5504 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -296,9 +296,9 @@ OConnection::OConnection(ODatabaseSource& _rDB ,m_pViews(NULL) ,m_aWarnings( Reference< XWarningsSupplier >( _rxMaster, UNO_QUERY ) ) ,m_nInAppend(0) - ,m_bSupportsViews(sal_False) - ,m_bSupportsUsers(sal_False) - ,m_bSupportsGroups(sal_False) + ,m_bSupportsViews(false) + ,m_bSupportsUsers(false) + ,m_bSupportsGroups(false) { SAL_INFO("dbaccess", "OConnection::OConnection" ); osl_atomic_increment(&m_refCount); @@ -321,7 +321,7 @@ OConnection::OConnection(ODatabaseSource& _rDB { m_xQueries = OQueryContainer::create(Reference< XNameContainer >(_rDB.getQueryDefinitions(), UNO_QUERY), this, _rxORB, &m_aWarnings).get(); - sal_Bool bCase = sal_True; + bool bCase = true; Reference<XDatabaseMetaData> xMeta; try { @@ -347,7 +347,7 @@ OConnection::OConnection(ODatabaseSource& _rDB OUString sValue = xRow->getString(1); if( !xRow->wasNull() && sValue == sView) { - m_bSupportsViews = sal_True; + m_bSupportsViews = true; break; } } @@ -358,7 +358,7 @@ OConnection::OConnection(ODatabaseSource& _rDB Reference< XViewsSupplier > xMaster(getMasterTables(),UNO_QUERY); if (xMaster.is() && xMaster->getViews().is()) - m_bSupportsViews = sal_True; + m_bSupportsViews = true; } if(m_bSupportsViews) { diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx index 64e5d5adc9ab..574f5b5dcc6a 100644 --- a/dbaccess/source/core/dataaccess/connection.hxx +++ b/dbaccess/source/core/dataaccess/connection.hxx @@ -99,9 +99,9 @@ protected: OViewContainer* m_pViews; ::dbtools::WarningsContainer m_aWarnings; oslInterlockedCount m_nInAppend; - sal_Bool m_bSupportsViews; // true when the getTableTypes return "VIEW" as type - sal_Bool m_bSupportsUsers; - sal_Bool m_bSupportsGroups; + bool m_bSupportsViews; // true when the getTableTypes return "VIEW" as type + bool m_bSupportsUsers; + bool m_bSupportsGroups; protected: virtual ~OConnection(); diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx index 33e675ff8f7c..41ea09a242cc 100644 --- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx +++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx @@ -115,10 +115,10 @@ namespace dbaccess OUString m_sOrder; OUString m_sHavingClause; OUString m_sGroupBy; - sal_Bool m_bEscapeProcessing; + bool m_bEscapeProcessing; Reference< XResultSet > m_xResultSet; Sequence< Any > m_aSelection; - sal_Bool m_bBookmarkSelection; + bool m_bBookmarkSelection; OUString m_sColumnName; Reference< XPropertySet > m_xColumn; // </properties> @@ -143,10 +143,10 @@ namespace dbaccess ,m_sOrder() ,m_sHavingClause() ,m_sGroupBy() - ,m_bEscapeProcessing( sal_True ) + ,m_bEscapeProcessing( true ) ,m_xResultSet() ,m_aSelection() - ,m_bBookmarkSelection( sal_True ) + ,m_bBookmarkSelection( true ) ,m_sColumnName() ,m_xColumn() { diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 6a181bb4234f..a55911465e8c 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -474,7 +474,7 @@ void ODatabaseDocument::impl_reset_nothrow() { DBG_UNHANDLED_EXCEPTION(); } - m_pImpl->m_bDocumentReadOnly = sal_False; + m_pImpl->m_bDocumentReadOnly = false; } namespace @@ -544,7 +544,7 @@ void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationExceptio m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" ); - impl_setModified_nothrow( sal_False, aGuard ); + impl_setModified_nothrow( false, aGuard ); // <- SYNCHRONIZED m_aEventNotifier.notifyDocumentEvent( "OnCreate" ); @@ -593,7 +593,7 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Argumen // note that we do *not* call impl_setInitialized() here: The initialization is only complete // when the XModel::attachResource has been called, not sooner. - impl_setModified_nothrow( sal_False, aGuard ); + impl_setModified_nothrow( false, aGuard ); // <- SYNCHRONIZED } @@ -755,7 +755,7 @@ sal_Bool SAL_CALL ODatabaseDocument::attachResource( const OUString& _rURL, cons return impl_attachResource( _rURL, _rArguments, aGuard ); } -sal_Bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentURL, +bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentURL, const Sequence< PropertyValue >& i_rMediaDescriptor, DocumentGuard& _rDocGuard ) { if ( ( i_rLogicalDocumentURL == getURL() ) @@ -765,7 +765,7 @@ sal_Bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocum { // this is a BAD hack of the Basic importer code ... there should be a dedicated API for this, // not this bad mis-using of existing interfaces - return sal_False; + return false; // (we do not support macro signatures, so we can ignore this call) } @@ -793,7 +793,7 @@ sal_Bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocum m_aEventNotifier.notifyDocumentEvent( "OnLoadFinished" ); } - return sal_True; + return true; } OUString SAL_CALL ODatabaseDocument::getURL( ) throw (RuntimeException, std::exception) @@ -1041,7 +1041,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph ModifyLock aLock( *this ); // ignore all changes of our "modified" state during storing - sal_Bool bLocationChanged = ( _rURL != m_pImpl->getDocFileLocation() ); + bool bLocationChanged = ( _rURL != m_pImpl->getDocFileLocation() ); if ( bLocationChanged ) { // create storage for target URL @@ -1069,7 +1069,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph xNewRootStorage = m_pImpl->switchToStorage( xTargetStorage ); - m_pImpl->m_bDocumentReadOnly = sal_False; + m_pImpl->m_bDocumentReadOnly = false; } // store to current storage @@ -1109,7 +1109,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveDone" : "OnSaveAsDone", NULL, makeAny( _rURL ) ); // reset our "modified" flag, and clear the guard - impl_setModified_nothrow( sal_False, _rGuard ); + impl_setModified_nothrow( false, _rGuard ); // <- SYNCHRONIZED // notify storage listeners @@ -1294,7 +1294,7 @@ void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw (Prope // a proper "modified" flag } -void ODatabaseDocument::impl_setModified_nothrow( sal_Bool _bModified, DocumentGuard& _rGuard ) +void ODatabaseDocument::impl_setModified_nothrow( bool _bModified, DocumentGuard& _rGuard ) { // SYNCHRONIZED -> bool bModifiedChanged = ( m_pImpl->m_bModified != _bModified ) && ( !m_pImpl->isModifyLocked() ); @@ -1425,7 +1425,7 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa return xContainer; } -void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliverOwnership ) +void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( bool _bDeliverOwnership ) { Controllers aCopy = m_aControllers; @@ -1563,7 +1563,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xC Reference< XPropertySet > xStreamProp( xOutputStream, UNO_QUERY_THROW ); xStreamProp->setPropertyValue( INFO_MEDIATYPE, makeAny( OUString( "text/xml" ) ) ); - xStreamProp->setPropertyValue( "Compressed", makeAny( (sal_Bool)sal_True ) ); + xStreamProp->setPropertyValue( "Compressed", makeAny( true ) ); // write the stuff WriteThroughComponent( xOutputStream, xComponent, pServiceName, _rArguments, rMediaDesc ); @@ -2031,7 +2031,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons ::comphelper::NamedValueCollection aInitArgs( _Arguments ); aInitArgs.put( "Frame", _Frame ); if ( _ViewName == "Preview" ) - aInitArgs.put( "Preview", sal_Bool( sal_True ) ); + aInitArgs.put( "Preview", true ); Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW ); xInitController->initialize( aInitArgs.getWrappedPropertyValues() ); diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index f43f57224e0f..4dff3fcf911e 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -503,7 +503,7 @@ private: @raises ::com::sun::star::util::CloseVetoException if the closing was vetoed by any instance */ - void impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliverOwnership ); + void impl_closeControllerFrames_nolck_throw( bool _bDeliverOwnership ); /** disposes the frames of all controllers which are still left in m_aControllers. */ @@ -570,7 +570,7 @@ private: @postcond our mutex is not locked */ - void impl_setModified_nothrow( sal_Bool _bModified, DocumentGuard& _rGuard ); + void impl_setModified_nothrow( bool _bModified, DocumentGuard& _rGuard ); /** stores the document to the given storage @@ -610,7 +610,7 @@ private: @param _rDocGuard is the guard which currently protects the document instance */ - sal_Bool impl_attachResource( + bool impl_attachResource( const OUString& i_rLogicalDocumentURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rMediaDescriptor, DocumentGuard& _rDocGuard diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index c1b5ba58aba8..cd27afa8e8c2 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -185,8 +185,8 @@ void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) t } OAuthenticationContinuation::OAuthenticationContinuation() - :m_bRemberPassword(sal_True), // TODO: a meaningful default - m_bCanSetUserName(sal_True) + :m_bRemberPassword(true), // TODO: a meaningful default + m_bCanSetUserName(true) { } @@ -416,7 +416,7 @@ namespace for ( ; pDataSourceSetting != pEnd ; ++pDataSourceSetting ) { - sal_Bool bAllowSetting = sal_False; + bool bAllowSetting = false; const AsciiPropertyValue* pSetting = _pKnownSettings; for ( ; pSetting->AsciiName; ++pSetting ) { @@ -429,7 +429,7 @@ namespace { if ( pAllowedDriverSetting->Name.equalsAscii( pSetting->AsciiName ) ) { // the driver also allows this setting - bAllowSetting = sal_True; + bAllowSetting = true; break; } } @@ -771,7 +771,7 @@ Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (Runt sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException ) { - sal_Bool bModified(sal_False); + bool bModified(false); if ( m_pImpl.is() ) { switch (nHandle) @@ -953,7 +953,7 @@ void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const rValue >>= m_pImpl->m_aLayoutInformation; break; } - m_pImpl->setModified(sal_True); + m_pImpl->setModified(true); } } @@ -1062,28 +1062,28 @@ sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeExc Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO("dbaccess", "ODatabaseSource::connectWithCompletion" ); - return connectWithCompletion(_rxHandler,sal_False); + return connectWithCompletion(_rxHandler,false); } Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, const OUString& password) throw( SQLException, RuntimeException, std::exception ) { SAL_INFO("dbaccess", "ODatabaseSource::getConnection" ); - return getConnection(user,password,sal_False); + return getConnection(user,password,false); } Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnection( const OUString& user, const OUString& password ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO("dbaccess", "ODatabaseSource::getIsolatedConnection" ); - return getConnection(user,password,sal_True); + return getConnection(user,password,true); } Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnectionWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException, std::exception) { SAL_INFO("dbaccess", "ODatabaseSource::getIsolatedConnectionWithCompletion" ); - return connectWithCompletion(_rxHandler,sal_True); + return connectWithCompletion(_rxHandler,true); } -Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler,sal_Bool _bIsolated ) throw(SQLException, RuntimeException) +Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler,bool _bIsolated ) throw(SQLException, RuntimeException) { SAL_INFO("dbaccess", "ODatabaseSource::connectWithCompletion" ); ModelMethodGuard aGuard( *this ); @@ -1095,7 +1095,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const } OUString sUser(m_pImpl->m_sUser), sPassword(m_pImpl->m_aPassword); - sal_Bool bNewPasswordGiven = sal_False; + bool bNewPasswordGiven = false; if (m_pImpl->m_bPasswordRequired && sPassword.isEmpty()) { // we need a password, but don't have one yet. @@ -1147,7 +1147,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const if (pAuthenticate->getRememberPassword()) { m_pImpl->m_aPassword = pAuthenticate->getPassword(); - bNewPasswordGiven = sal_True; + bNewPasswordGiven = true; } m_pImpl->m_sFailedPassword = OUString(); } @@ -1185,7 +1185,7 @@ Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const OUString return xConn; } -Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, const OUString& password,sal_Bool _bIsolated) throw( SQLException, RuntimeException ) +Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, const OUString& password,bool _bIsolated) throw( SQLException, RuntimeException ) { SAL_INFO("dbaccess", "ODatabaseSource::getConnection" ); ModelMethodGuard aGuard( *this ); @@ -1248,7 +1248,7 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw( if ( !xContainer.is() ) { TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_QUERY ) ); - xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, sal_False ); + xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, false ); } m_pImpl->m_xCommandDefinitions = xContainer; } @@ -1265,7 +1265,7 @@ Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException, if ( !xContainer.is() ) { TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_TABLE ) ); - xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, sal_True ); + xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, true ); m_pImpl->m_xTableDefinitions = xContainer; } return xContainer; @@ -1328,7 +1328,7 @@ void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (R // #i55274# OSL_ENSURE( m_pImpl->isEmbeddedDatabase(), "ODatabaseSource::flushed: no embedded database?!" ); - sal_Bool bWasModified = m_pImpl->m_bModified; + bool bWasModified = m_pImpl->m_bModified; m_pImpl->commitEmbeddedStorage(); m_pImpl->setModified( bWasModified ); } @@ -1350,7 +1350,7 @@ void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& /*Event*/ SAL_INFO("dbaccess", "ODatabaseSource::elementInserted" ); ModelMethodGuard aGuard( *this ); if ( m_pImpl.is() ) - m_pImpl->setModified(sal_True); + m_pImpl->setModified(true); } void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException, std::exception) @@ -1358,7 +1358,7 @@ void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ ) SAL_INFO("dbaccess", "ODatabaseSource::elementRemoved" ); ModelMethodGuard aGuard( *this ); if ( m_pImpl.is() ) - m_pImpl->setModified(sal_True); + m_pImpl->setModified(true); } void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException, std::exception) @@ -1366,7 +1366,7 @@ void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/ SAL_INFO("dbaccess", "ODatabaseSource::elementReplaced" ); ModelMethodGuard aGuard( *this ); if ( m_pImpl.is() ) - m_pImpl->setModified(sal_True); + m_pImpl->setModified(true); } // XDocumentDataSource diff --git a/dbaccess/source/core/dataaccess/datasource.hxx b/dbaccess/source/core/dataaccess/datasource.hxx index ba3c053a530a..72d1e776bf34 100644 --- a/dbaccess/source/core/dataaccess/datasource.hxx +++ b/dbaccess/source/core/dataaccess/datasource.hxx @@ -208,8 +208,8 @@ private: const OUString& user, const OUString& password ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( const OUString& user, const OUString& password , sal_Bool _bIsolated) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connectWithCompletion( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& handler , sal_Bool _bIsolated) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( const OUString& user, const OUString& password , bool _bIsolated) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connectWithCompletion( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& handler , bool _bIsolated) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void clearConnections(); diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index f91c34e4a3d9..8a15334ec4c4 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -94,11 +94,11 @@ ODefinitionContainer::ODefinitionContainer( const Reference< XComponentContext :OContentHelper(_xORB,_xParentContainer,_pImpl) ,m_aApproveListeners(m_aMutex) ,m_aContainerListeners(m_aMutex) - ,m_bInPropertyChange(sal_False) + ,m_bInPropertyChange(false) ,m_bCheckSlash(_bCheckSlash) { - m_pImpl->m_aProps.bIsDocument = sal_False; - m_pImpl->m_aProps.bIsFolder = sal_True; + m_pImpl->m_aProps.bIsDocument = false; + m_pImpl->m_aProps.bIsFolder = true; const ODefinitionContainer_Impl& rDefinitions( getDefinitions() ); ODefinitionContainer_Impl::const_iterator aEnd = rDefinitions.end(); @@ -604,7 +604,7 @@ void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& e ClearableMutexGuard aGuard(m_aMutex); if( evt.PropertyName == (OUString) PROPERTY_NAME || evt.PropertyName == "Title" ) { - m_bInPropertyChange = sal_True; + m_bInPropertyChange = true; try { OUString sNewName,sOldName; @@ -620,7 +620,7 @@ void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& e DBG_UNHANDLED_EXCEPTION(); throw RuntimeException(); } - m_bInPropertyChange = sal_False; + m_bInPropertyChange = false; } } @@ -659,7 +659,7 @@ void ODefinitionContainer::removeObjectListener(const Reference< XContent >& _xN } } -sal_Bool ODefinitionContainer::checkExistence(const OUString& _rName) +bool ODefinitionContainer::checkExistence(const OUString& _rName) { return m_aDocumentMap.find(_rName) != m_aDocumentMap.end(); } diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 3e39a2a1a433..dad805bc7157 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -91,7 +91,7 @@ void SAL_CALL LocalNameApproval::approveElement( const OUString& _rName, const R ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xORB ,const Reference< XInterface >& _xParentContainer ,const TContentPtr& _pImpl - , sal_Bool _bFormsContainer + , bool _bFormsContainer ) :ODefinitionContainer(_xORB,_xParentContainer,_pImpl) ,OPropertyStateContainer(OContentHelper::rBHelper) @@ -178,7 +178,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments OUString sName, sPersistentName, sURL, sMediaType, sDocServiceName; Reference< XCommandProcessor > xCopyFrom; Reference< XConnection > xConnection; - sal_Bool bAsTemplate( sal_False ); + bool bAsTemplate( false ); Sequence< sal_Int8 > aClassID; ::comphelper::NamedValueCollection aArgs( _aArguments ); @@ -215,7 +215,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments const Sequence< PropertyValue > aCreationArgs( aArgs.getPropertyValues() ); const ODefinitionContainer_Impl& rDefinitions( getDefinitions() ); - sal_Bool bNew = sPersistentName.isEmpty(); + bool bNew = sPersistentName.isEmpty(); if ( bNew ) { const static OUString sBaseName("Obj"); @@ -416,7 +416,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com Environment ); // Unreachable } - sal_Bool bOpenFolder = + bool bOpenFolder = ( ( aOpenCommand.Mode == OpenMode::ALL ) || ( aOpenCommand.Mode == OpenMode::FOLDERS ) || ( aOpenCommand.Mode == OpenMode::DOCUMENTS ) ); @@ -479,11 +479,11 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com namespace { - sal_Bool lcl_queryContent(const OUString& _sName,Reference< XNameContainer >& _xNameContainer,Any& _rRet,OUString& _sSimpleName) + bool lcl_queryContent(const OUString& _sName,Reference< XNameContainer >& _xNameContainer,Any& _rRet,OUString& _sSimpleName) { sal_Int32 nIndex = 0; OUString sName = _sName.getToken(0,'/',nIndex); - sal_Bool bRet = _xNameContainer->hasByName(sName); + bool bRet = _xNameContainer->hasByName(sName); if ( bRet ) { _rRet = _xNameContainer->getByName(_sSimpleName = sName); diff --git a/dbaccess/source/core/dataaccess/documentcontainer.hxx b/dbaccess/source/core/dataaccess/documentcontainer.hxx index 64df8853969f..c30eebb75e71 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.hxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.hxx @@ -45,7 +45,7 @@ class ODocumentContainer : public ODefinitionContainer , public ::comphelper::OPropertyStateContainer , public ::comphelper::OPropertyArrayUsageHelper< ODocumentContainer > { - sal_Bool m_bFormsContainer; + bool m_bFormsContainer; public: /** constructs the container.<BR> @@ -54,7 +54,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer ,const TContentPtr& _pImpl - , sal_Bool _bFormsContainer + , bool _bFormsContainer ); // ::com::sun::star::uno::XInterface diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index b77b9348ce57..1228452da874 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -413,14 +413,14 @@ OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const OUString& _ // ODocumentDefinition ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XComponentContext >& _xORB, - const TContentPtr& _pImpl, sal_Bool _bForm ) + const TContentPtr& _pImpl, bool _bForm ) :OContentHelper(_xORB,_rxContainer,_pImpl) ,OPropertyStateContainer(OContentHelper::rBHelper) ,m_pInterceptor(NULL) ,m_bForm(_bForm) - ,m_bOpenInDesign(sal_False) - ,m_bInExecute(sal_False) - ,m_bRemoveListener(sal_False) + ,m_bOpenInDesign(false) + ,m_bInExecute(false) + ,m_bRemoveListener(false) ,m_pClientHelper(NULL) { registerProperties(); @@ -563,10 +563,10 @@ IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const class OExecuteImpl { - sal_Bool& m_rbSet; + bool& m_rbSet; public: - OExecuteImpl(sal_Bool& _rbSet) : m_rbSet(_rbSet){ m_rbSet=sal_True; } - ~OExecuteImpl(){ m_rbSet = sal_False; } + OExecuteImpl(bool& _rbSet) : m_rbSet(_rbSet){ m_rbSet=true; } + ~OExecuteImpl(){ m_rbSet = false; } }; namespace @@ -972,9 +972,9 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co { Any aRet; - sal_Bool bOpen = aCommand.Name == "open"; - sal_Bool bOpenInDesign = aCommand.Name == "openDesign"; - sal_Bool bOpenForMail = aCommand.Name == "openForMail"; + bool bOpen = aCommand.Name == "open"; + bool bOpenInDesign = aCommand.Name == "openDesign"; + bool bOpenForMail = aCommand.Name == "openForMail"; if ( bOpen || bOpenInDesign || bOpenForMail ) { // opening the document involves a lot of VCL code, which is not thread-safe, but needs the SolarMutex locked. @@ -1224,11 +1224,11 @@ void ODocumentDefinition::onCommandInsert( const OUString& _sURL, const Referenc aGuard.clear(); } -sal_Bool ODocumentDefinition::save(sal_Bool _bApprove) +bool ODocumentDefinition::save(bool _bApprove) { // default handling: instantiate an interaction handler and let it handle the parameter request if ( !m_bOpenInDesign ) - return sal_False; + return false; try { @@ -1277,9 +1277,9 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove) xHandler->handle(xRequest); if ( pAbort->wasSelected() ) - return sal_False; + return false; if ( pDisApprove->wasSelected() ) - return sal_True; + return true; if ( pDocuSave && pDocuSave->wasSelected() ) { Reference<XNameContainer> xNC( pDocuSave->getContent(), UNO_QUERY_THROW ); @@ -1307,21 +1307,21 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove) { OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!"); } - return sal_True; + return true; } -sal_Bool ODocumentDefinition::saveAs() +bool ODocumentDefinition::saveAs() { // default handling: instantiate an interaction handler and let it handle the parameter request if ( !m_bOpenInDesign ) - return sal_False; + return false; { osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); if ( m_pImpl->m_aProps.aTitle.isEmpty() ) { aGuard.clear(); - return save(sal_False); // (sal_False) : we don't want an approve dialog + return save(false); // (sal_False) : we don't want an approve dialog } } try @@ -1351,9 +1351,9 @@ sal_Bool ODocumentDefinition::saveAs() xHandler->handle(xRequest); if ( pAbort->wasSelected() ) - return sal_False; + return false; if ( pDisApprove->wasSelected() ) - return sal_True; + return true; if ( pDocuSave->wasSelected() ) { ::osl::MutexGuard aGuard(m_aMutex); @@ -1414,7 +1414,7 @@ sal_Bool ODocumentDefinition::saveAs() { OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!"); } - return sal_True; + return true; } namespace @@ -1461,7 +1461,7 @@ namespace } } -sal_Bool ODocumentDefinition::objectSupportsEmbeddedScripts() const +bool ODocumentDefinition::objectSupportsEmbeddedScripts() const { bool bAllowDocumentMacros = !m_pImpl->m_pDataSource || ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == ODatabaseModelImpl::eSubDocumentMacros ); @@ -1522,8 +1522,8 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC // create the OutplaceFrameProperties, and put them into the descriptor of the embedded object ::comphelper::NamedValueCollection OutplaceFrameProperties; - OutplaceFrameProperties.put( "TopWindow", (sal_Bool)sal_True ); - OutplaceFrameProperties.put( "SupportPersistentWindowState", (sal_Bool)sal_True ); + OutplaceFrameProperties.put( "TopWindow", true ); + OutplaceFrameProperties.put( "SupportPersistentWindowState", true ); Reference< XFrame > xParentFrame; if ( m_pImpl->m_pDataSource ) @@ -1536,7 +1536,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC if ( xCloseable.is() ) { xCloseable->addCloseListener(this); - m_bRemoveListener = sal_True; + m_bRemoveListener = true; } } OSL_ENSURE( xParentFrame.is(), "ODocumentDefinition::fillLoadArgs: no parent frame!" ); @@ -1546,10 +1546,10 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC aEmbeddedDescriptor.put( "OutplaceFrameProperties", OutplaceFrameProperties.getNamedValues() ); // tell the embedded object to have (or not have) script support - aEmbeddedDescriptor.put( "EmbeddedScriptSupport", (sal_Bool)objectSupportsEmbeddedScripts() ); + aEmbeddedDescriptor.put( "EmbeddedScriptSupport", objectSupportsEmbeddedScripts() ); // tell the embedded object to not participate in the document recovery game - the DB doc will handle it - aEmbeddedDescriptor.put( "DocumentRecoverySupport", (sal_Bool)sal_False ); + aEmbeddedDescriptor.put( "DocumentRecoverySupport", false ); // pass the descriptor of the embedded object to the caller aEmbeddedDescriptor >>= _out_rEmbeddedObjectDescriptor; @@ -1583,13 +1583,13 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { Reference< XEmbeddedObjectCreator> xEmbedFactory = OOoEmbeddedObjectFactory::create(m_aContext); OUString sDocumentService; - sal_Bool bSetSize = sal_False; + bool bSetSize = false; sal_Int32 nEntryConnectionMode = EntryInitModes::DEFAULT_INIT; Sequence< sal_Int8 > aClassID = _aClassID; if ( aClassID.getLength() ) { nEntryConnectionMode = EntryInitModes::TRUNCATE_INIT; - bSetSize = sal_True; + bSetSize = true; } else { @@ -1914,7 +1914,7 @@ sal_Bool SAL_CALL ODocumentDefinition::close( ) throw (WrappedTargetException, { ::osl::MutexGuard aGuard( m_aMutex ); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { bSuccess = impl_close_throw(); @@ -1975,10 +1975,10 @@ Reference< XStorage> ODocumentDefinition::getContainerStorage() const : Reference< XStorage>(); } -sal_Bool ODocumentDefinition::isModified() +bool ODocumentDefinition::isModified() { osl::ClearableGuard< osl::Mutex > aGuard(m_aMutex); - sal_Bool bRet = sal_False; + bool bRet = false; if ( m_xEmbeddedObject.is() ) { Reference<XModifiable> xModel(getComponent(),UNO_QUERY); @@ -2014,7 +2014,7 @@ bool ODocumentDefinition::prepareClose() // document has not yet been activated, i.e. has no UI, yet return true; - sal_Bool bCouldSuspend = xController->suspend( sal_True ); + bool bCouldSuspend = xController->suspend( sal_True ); if ( !bCouldSuspend ) // controller vetoed the closing return false; @@ -2027,7 +2027,7 @@ bool ODocumentDefinition::prepareClose() Reference< XTopWindow > xTopWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW ); xTopWindow->toFront(); } - if ( !save( sal_True ) ) + if ( !save( true ) ) { if ( bCouldSuspend ) // revert suspension @@ -2119,7 +2119,7 @@ void SAL_CALL ODocumentDefinition::disposing( const lang::EventObject& /*Source* } void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_rNewValue, const Any& i_rOldValue, - sal_Bool i_bVetoable, const NotifierAccess ) + bool i_bVetoable, const NotifierAccess ) { fire( &i_nHandle, &i_rNewValue, &i_rOldValue, 1, i_bVetoable ); } @@ -2132,15 +2132,15 @@ NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefiniti ,m_aNewValue( makeAny( i_rNewName ) ) ,m_rClearForNotify( i_rClearForNotify ) { - impl_fireEvent_throw( sal_True ); + impl_fireEvent_throw( true ); } NameChangeNotifier::~NameChangeNotifier() { - impl_fireEvent_throw( sal_False ); + impl_fireEvent_throw( false ); } -void NameChangeNotifier::impl_fireEvent_throw( const sal_Bool i_bVetoable ) +void NameChangeNotifier::impl_fireEvent_throw( const bool i_bVetoable ) { m_rClearForNotify.clear(); m_rDocumentDefinition.firePropertyChange( diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx index a3b72d746a01..9a328e10119a 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.hxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx @@ -65,10 +65,10 @@ class ODocumentDefinition ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xLastKnownConnection; OInterceptor* m_pInterceptor; - sal_Bool m_bForm; // <TRUE/> if it is a form - sal_Bool m_bOpenInDesign; - sal_Bool m_bInExecute; - sal_Bool m_bRemoveListener; + bool m_bForm; // <TRUE/> if it is a form + bool m_bOpenInDesign; + bool m_bInExecute; + bool m_bRemoveListener; OEmbeddedClientHelper* m_pClientHelper; protected: @@ -80,7 +80,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&, const TContentPtr& _pImpl, - sal_Bool _bForm + bool _bForm ); void initialLoad( @@ -144,11 +144,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getContainerStorage() const; - sal_Bool save(sal_Bool _bApprove); - sal_Bool saveAs(); + bool save(bool _bApprove); + bool saveAs(); void closeObject(); - sal_Bool isModified(); - inline sal_Bool isNewReport() const { return !m_bForm && !m_pImpl->m_aProps.bAsTemplate; } + bool isModified(); + inline bool isNewReport() const { return !m_bForm && !m_pImpl->m_aProps.bAsTemplate; } static void fillReportData( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext, @@ -189,7 +189,7 @@ public: sal_Int32 i_nHandle, const ::com::sun::star::uno::Any& i_rNewValue, const ::com::sun::star::uno::Any& i_rOldValue, - sal_Bool i_bVetoable, + bool i_bVetoable, const NotifierAccess ); @@ -332,7 +332,7 @@ private: /** determines whether the document we represent supports embedded scripts and macros */ - sal_Bool objectSupportsEmbeddedScripts() const; + bool objectSupportsEmbeddedScripts() const; //- commands @@ -363,9 +363,9 @@ private: ODocumentDefinition& m_rDocumentDefinition; const ::com::sun::star::uno::Any m_aOldValue; const ::com::sun::star::uno::Any m_aNewValue; - ::osl::ResettableMutexGuard& m_rClearForNotify; + ::osl::ResettableMutexGuard& m_rClearForNotify; - void impl_fireEvent_throw( const sal_Bool i_bVetoable ); + void impl_fireEvent_throw( const bool i_bVetoable ); }; } // namespace dbaccess diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx index 27f3031ee441..f4f305fa1f64 100644 --- a/dbaccess/source/core/dataaccess/intercept.cxx +++ b/dbaccess/source/core/dataaccess/intercept.cxx @@ -119,7 +119,7 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_SAVE ] ) { - m_pContentHolder->save( sal_False ); + m_pContentHolder->save( false ); return; } diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx index ac6e3e5354f4..aedd0ba27a6a 100644 --- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx +++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx @@ -64,13 +64,13 @@ struct DataSupplier_Impl ResultList m_aResults; rtl::Reference< ODocumentContainer > m_xContent; sal_Int32 m_nOpenMode; - sal_Bool m_bCountFinal; + bool m_bCountFinal; DataSupplier_Impl( const rtl::Reference< ODocumentContainer >& rContent, sal_Int32 nOpenMode ) : m_xContent(rContent) , m_nOpenMode( nOpenMode ) - , m_bCountFinal( sal_False ) {} + , m_bCountFinal( false ) {} ~DataSupplier_Impl(); }; @@ -236,7 +236,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex ) } if ( !bFound ) - m_pImpl->m_bCountFinal = sal_True; + m_pImpl->m_bCountFinal = true; rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); if ( xResultSet.is() ) @@ -272,7 +272,7 @@ sal_uInt32 DataSupplier::totalCount() m_pImpl->m_aResults.push_back( new ResultListEntry( m_pImpl->m_xContent->getContent(*pIter)->getContentProperties() ) ); - m_pImpl->m_bCountFinal = sal_True; + m_pImpl->m_bCountFinal = true; rtl::Reference< ::ucbhelper::ResultSet > xResultSet = getResultSet().get(); if ( xResultSet.is() ) diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx index 0cd416b26d81..62b2a3a9d3dd 100644 --- a/dbaccess/source/core/inc/ContentHelper.hxx +++ b/dbaccess/source/core/inc/ContentHelper.hxx @@ -52,15 +52,15 @@ namespace dbaccess OUString aTitle; // Title ::boost::optional< OUString > aContentType; // ContentType (aka MediaType aka MimeType) - sal_Bool bIsDocument; // IsDocument - sal_Bool bIsFolder; // IsFolder - sal_Bool bAsTemplate; // AsTemplate + bool bIsDocument; // IsDocument + bool bIsFolder; // IsFolder + bool bAsTemplate; // AsTemplate OUString sPersistentName;// persistent name of the document ContentProperties() - :bIsDocument( sal_True ) - ,bIsFolder( sal_False ) - ,bAsTemplate( sal_False ) + :bIsDocument( true ) + ,bIsFolder( false ) + ,bAsTemplate( false ) { } }; diff --git a/dbaccess/source/core/inc/DatabaseDataProvider.hxx b/dbaccess/source/core/inc/DatabaseDataProvider.hxx index 5c5c7200ec34..20c954e74ac0 100644 --- a/dbaccess/source/core/inc/DatabaseDataProvider.hxx +++ b/dbaccess/source/core/inc/DatabaseDataProvider.hxx @@ -214,7 +214,7 @@ private: void impl_fillRowSet_throw(); void impl_executeRowSet_throw(::osl::ResettableMutexGuard& _rClearForNotifies); bool impl_fillParameters_nothrow( ::osl::ResettableMutexGuard& _rClearForNotifies); - void impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const ::com::sun::star::uno::Sequence< OUString >& i_aColumnNames); + void impl_fillInternalDataProvider_throw(bool _bHasCategories,const ::com::sun::star::uno::Sequence< OUString >& i_aColumnNames); void impl_invalidateParameter_nothrow(); ::com::sun::star::uno::Any impl_getNumberFormatKey_nothrow(const OUString & _sRangeRepresentation) const; @@ -254,14 +254,14 @@ private: OUString m_Command; OUString m_DataSourceName; - ::sal_Int32 m_CommandType; - sal_Int32 m_RowLimit; + sal_Int32 m_CommandType; + sal_Int32 m_RowLimit; OUString m_Filter; OUString m_HavingClause; OUString m_Order; OUString m_GroupBy; - sal_Bool m_EscapeProcessing; - sal_Bool m_ApplyFilter; + bool m_EscapeProcessing; + bool m_ApplyFilter; }; } // namespace dbaccess diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx index 45e86ac676bf..908ea6a588d0 100644 --- a/dbaccess/source/core/inc/FilteredContainer.hxx +++ b/dbaccess/source/core/inc/FilteredContainer.hxx @@ -36,7 +36,7 @@ namespace dbaccess class OFilteredContainer : public ::connectivity::sdbcx::OCollection { private: - mutable sal_Bool m_bConstructed; // late ctor called + mutable bool m_bConstructed; // late ctor called protected: ::dbtools::IWarningsContainer* m_pWarningsContainer; @@ -102,7 +102,7 @@ namespace dbaccess OFilteredContainer( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCon, - sal_Bool _bCase, + bool _bCase, IRefreshListener* _pRefreshListener, ::dbtools::IWarningsContainer* _pWarningsContainer, oslInterlockedCount& _nInAppend @@ -127,7 +127,7 @@ namespace dbaccess const ::com::sun::star::uno::Sequence< OUString >& _rTableTypeFilter ); - inline sal_Bool isInitialized() const { return m_bConstructed; } + inline bool isInitialized() const { return m_bConstructed; } }; } // namespace diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx index ee594c6a0c97..0f27db60894c 100644 --- a/dbaccess/source/core/inc/PropertyForward.hxx +++ b/dbaccess/source/core/inc/PropertyForward.hxx @@ -42,7 +42,7 @@ namespace dbaccess ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xDestInfo; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xDestContainer; OUString m_sName; - sal_Bool m_bInInsert; + bool m_bInInsert; protected: virtual ~OPropertyForward(); diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index e79f61e2b267..d17199a84e96 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -109,11 +109,11 @@ namespace dbaccess // </properties> - sal_Bool setORCriteria(::connectivity::OSQLParseNode* pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, + bool setORCriteria(::connectivity::OSQLParseNode* pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, ::std::vector< ::std::vector < ::com::sun::star::beans::PropertyValue > >& rFilters, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const; - sal_Bool setANDCriteria(::connectivity::OSQLParseNode* pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, + bool setANDCriteria(::connectivity::OSQLParseNode* pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, ::std::vector < ::com::sun::star::beans::PropertyValue > & rFilters, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const; - sal_Bool setComparsionPredicate(::connectivity::OSQLParseNode* pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, + bool setComparsionPredicate(::connectivity::OSQLParseNode* pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, ::std::vector < ::com::sun::star::beans::PropertyValue > & rFilters, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const; OUString getColumnName(::connectivity::OSQLParseNode* pColumnRef,::connectivity::OSQLParseTreeIterator& _rIterator) const; @@ -132,7 +132,7 @@ namespace dbaccess void setQuery_Impl( const OUString& command ); void setConditionByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column - , sal_Bool andCriteria + , bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& >& _aSetFunctor ,sal_Int32 filterOperator); @@ -164,7 +164,7 @@ namespace dbaccess @return The part of the select statement. */ - OUString getSQLPart( SQLPart _ePart, ::connectivity::OSQLParseTreeIterator& _rIterator, sal_Bool _bWithKeyword ); + OUString getSQLPart( SQLPart _ePart, ::connectivity::OSQLParseTreeIterator& _rIterator, bool _bWithKeyword ); /** retrieves the keyword for the given SQLPart */ diff --git a/dbaccess/source/core/inc/View.hxx b/dbaccess/source/core/inc/View.hxx index f9b076bfbe73..a486a26004c7 100644 --- a/dbaccess/source/core/inc/View.hxx +++ b/dbaccess/source/core/inc/View.hxx @@ -40,7 +40,7 @@ namespace dbaccess public: View( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, - sal_Bool _bCaseSensitive, + bool _bCaseSensitive, const OUString& _rCatalogName, const OUString& _rSchemaName, const OUString& _rName diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx index 84872921fdfd..84a9c2a2a4a8 100644 --- a/dbaccess/source/core/inc/column.hxx +++ b/dbaccess/source/core/inc/column.hxx @@ -157,9 +157,9 @@ namespace dbaccess IColumnFactory* m_pColFactoryImpl; ::connectivity::sdbcx::IRefreshableColumns* m_pRefreshColumns; - sal_Bool m_bInitialized : 1; - sal_Bool m_bAddColumn : 1; - sal_Bool m_bDropColumn : 1; + bool m_bInitialized : 1; + bool m_bAddColumn : 1; + bool m_bDropColumn : 1; virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName) SAL_OVERRIDE; @@ -174,8 +174,8 @@ namespace dbaccess } /** flag which determines whether the container is filled or not */ - inline sal_Bool isInitialized() const { return m_bInitialized; } - inline void setInitialized() {m_bInitialized = sal_True;} + inline bool isInitialized() const { return m_bInitialized; } + inline void setInitialized() {m_bInitialized = true;} inline void setMediator(OContainerMediator* _pMediator) { m_pMediator = _pMediator; } public: @@ -189,25 +189,25 @@ namespace dbaccess OColumns( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - sal_Bool _bCaseSensitive, + bool _bCaseSensitive, const ::std::vector< OUString>& _rVector, IColumnFactory* _pColFactory, ::connectivity::sdbcx::IRefreshableColumns* _pRefresh, - sal_Bool _bAddColumn = sal_False, - sal_Bool _bDropColumn = sal_False, - sal_Bool _bUseHardRef = sal_True); + bool _bAddColumn = false, + bool _bDropColumn = false, + bool _bUseHardRef = true); OColumns( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns, - sal_Bool _bCaseSensitive, + bool _bCaseSensitive, const ::std::vector< OUString> &_rVector, IColumnFactory* _pColFactory, ::connectivity::sdbcx::IRefreshableColumns* _pRefresh, - sal_Bool _bAddColumn = sal_False, - sal_Bool _bDropColumn = sal_False, - sal_Bool _bUseHardRef = sal_True); + bool _bAddColumn = false, + bool _bDropColumn = false, + bool _bUseHardRef = true); virtual ~OColumns(); //XInterface diff --git a/dbaccess/source/core/inc/columnsettings.hxx b/dbaccess/source/core/inc/columnsettings.hxx index aa4a9cd35c14..a0a14613dc4a 100644 --- a/dbaccess/source/core/inc/columnsettings.hxx +++ b/dbaccess/source/core/inc/columnsettings.hxx @@ -69,7 +69,7 @@ namespace dbaccess ::com::sun::star::uno::Any m_aControlDefault; // the default value which should be displayed as by a control when moving to a new row ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; - sal_Bool m_bHidden; + bool m_bHidden; // </properties> protected: diff --git a/dbaccess/source/core/inc/commandbase.hxx b/dbaccess/source/core/inc/commandbase.hxx index 7b0460f4b5a9..55fc7872c7c7 100644 --- a/dbaccess/source/core/inc/commandbase.hxx +++ b/dbaccess/source/core/inc/commandbase.hxx @@ -35,14 +35,14 @@ public: // need public access ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> m_aLayoutInformation; OUString m_sCommand; - sal_Bool m_bEscapeProcessing; // no BitField ! so it can be used with a OPropertyStateContainer + bool m_bEscapeProcessing; // no BitField ! so it can be used with a OPropertyStateContainer OUString m_sUpdateTableName; OUString m_sUpdateSchemaName; OUString m_sUpdateCatalogName; // </properties> protected: - OCommandBase() : m_bEscapeProcessing(sal_True) { } + OCommandBase() : m_bEscapeProcessing(true) { } }; diff --git a/dbaccess/source/core/inc/datasettings.hxx b/dbaccess/source/core/inc/datasettings.hxx index 10ff27db8304..0a51ab47f3fc 100644 --- a/dbaccess/source/core/inc/datasettings.hxx +++ b/dbaccess/source/core/inc/datasettings.hxx @@ -42,7 +42,7 @@ public: OUString m_sHavingClause; OUString m_sGroupBy; OUString m_sOrder; - sal_Bool m_bApplyFilter; // no BitField ! the base class needs a pointer to this member ! + bool m_bApplyFilter; // no BitField ! the base class needs a pointer to this member ! ::com::sun::star::awt::FontDescriptor m_aFont; ::com::sun::star::uno::Any m_aRowHeight; ::com::sun::star::uno::Any m_aTextColor; @@ -63,9 +63,9 @@ protected: class ODataSettings : public ::comphelper::OPropertyStateContainer , public ODataSettings_Base { - sal_Bool m_bQuery; + bool m_bQuery; protected: - ODataSettings(::cppu::OBroadcastHelper& _rBHelper,sal_Bool _bQuery = sal_False); + ODataSettings(::cppu::OBroadcastHelper& _rBHelper,bool _bQuery = false); virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const SAL_OVERRIDE; /** register the properties from the param given. The parameter instance must be alive as long as tis object live. diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx index 8552adef4264..0fad23fb64fa 100644 --- a/dbaccess/source/core/inc/definitioncolumn.hxx +++ b/dbaccess/source/core/inc/definitioncolumn.hxx @@ -57,9 +57,9 @@ namespace dbaccess sal_Int32 m_nPrecision; sal_Int32 m_nScale; sal_Int32 m_nIsNullable; - sal_Bool m_bAutoIncrement; - sal_Bool m_bRowVersion; - sal_Bool m_bCurrency; + bool m_bAutoIncrement; + bool m_bRowVersion; + bool m_bCurrency; // </properties> public: @@ -70,9 +70,9 @@ namespace dbaccess ,m_nPrecision( 0 ) ,m_nScale( 0 ) ,m_nIsNullable( ::com::sun::star::sdbc::ColumnValue::NULLABLE_UNKNOWN ) - ,m_bAutoIncrement( sal_False ) - ,m_bRowVersion( sal_False ) - ,m_bCurrency( sal_False ) + ,m_bAutoIncrement( false ) + ,m_bRowVersion( false ) + ,m_bCurrency( false ) { impl_registerProperties(); } diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx index ec01ae70335d..fac93736f1b7 100644 --- a/dbaccess/source/core/inc/definitioncontainer.hxx +++ b/dbaccess/source/core/inc/definitioncontainer.hxx @@ -125,7 +125,7 @@ protected: ::cppu::OInterfaceContainerHelper m_aContainerListeners; - sal_Bool m_bInPropertyChange; + bool m_bInPropertyChange; bool m_bCheckSlash; protected: @@ -239,7 +239,7 @@ protected: @param _rName the object name to check @return sal_True if there already exists such an object */ - virtual sal_Bool checkExistence(const OUString& _rName); + virtual bool checkExistence(const OUString& _rName); /** append a new object to the container. No plausibility checks are done, e.g. if the object is non-NULL or if the name is already used by another object or anything like this. This method is for derived classes diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx index 163e04d86963..ea786ff72691 100644 --- a/dbaccess/source/core/inc/querycontainer.hxx +++ b/dbaccess/source/core/inc/querycontainer.hxx @@ -86,7 +86,7 @@ namespace dbaccess // ODefinitionContainer virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > createObject( const OUString& _rName) SAL_OVERRIDE; - virtual sal_Bool checkExistence(const OUString& _rName) SAL_OVERRIDE; + virtual bool checkExistence(const OUString& _rName) SAL_OVERRIDE; // helper virtual void SAL_CALL disposing() SAL_OVERRIDE; diff --git a/dbaccess/source/core/inc/sdbcoretools.hxx b/dbaccess/source/core/inc/sdbcoretools.hxx index 3508062d7c08..689890385781 100644 --- a/dbaccess/source/core/inc/sdbcoretools.hxx +++ b/dbaccess/source/core/inc/sdbcoretools.hxx @@ -31,7 +31,7 @@ namespace dbaccess { - void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,sal_Bool _bModified); + void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,bool _bModified); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDataSource( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDependentObject ); diff --git a/dbaccess/source/core/inc/statement.hxx b/dbaccess/source/core/inc/statement.hxx index f9402b5a5414..d7bc85a5b1c4 100644 --- a/dbaccess/source/core/inc/statement.hxx +++ b/dbaccess/source/core/inc/statement.hxx @@ -57,8 +57,8 @@ protected: ::com::sun::star::uno::WeakReferenceHelper m_aResultSet; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xAggregateAsSet; ::com::sun::star::uno::Reference< ::com::sun::star::util::XCancellable > m_xAggregateAsCancellable; - sal_Bool m_bUseBookmarks; - sal_Bool m_bEscapeProcessing; + bool m_bUseBookmarks; + bool m_bEscapeProcessing; virtual ~OStatementBase(); diff --git a/dbaccess/source/core/inc/tablecontainer.hxx b/dbaccess/source/core/inc/tablecontainer.hxx index ed41344415cd..b2c023f6e822 100644 --- a/dbaccess/source/core/inc/tablecontainer.hxx +++ b/dbaccess/source/core/inc/tablecontainer.hxx @@ -48,7 +48,7 @@ namespace dbaccess { ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xTableDefinitions; ::rtl::Reference< OContainerMediator > m_pTableMediator; - sal_Bool m_bInDrop; // set when we are in the drop method + bool m_bInDrop; // set when we are in the drop method // OFilteredContainer virtual void addMasterContainerListener() SAL_OVERRIDE; @@ -88,7 +88,7 @@ namespace dbaccess OTableContainer( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCon, - sal_Bool _bCase, + bool _bCase, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xTableDefinitions, IRefreshListener* _pRefreshListener, ::dbtools::IWarningsContainer* _pWarningsContainer, diff --git a/dbaccess/source/core/inc/viewcontainer.hxx b/dbaccess/source/core/inc/viewcontainer.hxx index bde6ad2cd2ee..5d15c31f4e81 100644 --- a/dbaccess/source/core/inc/viewcontainer.hxx +++ b/dbaccess/source/core/inc/viewcontainer.hxx @@ -61,7 +61,7 @@ namespace dbaccess OViewContainer( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCon, - sal_Bool _bCase, + bool _bCase, IRefreshListener* _pRefreshListener, ::dbtools::IWarningsContainer* _pWarningsContainer, oslInterlockedCount& _nInAppend diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 45f186243f91..11d08cf3121e 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -64,8 +64,8 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex m_xContext(context), m_CommandType(sdb::CommandType::COMMAND), // #i94114 m_RowLimit(0), - m_EscapeProcessing(sal_True), - m_ApplyFilter(sal_True) + m_EscapeProcessing(true), + m_ApplyFilter(true) { m_xInternal.set( m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.chart.InternalDataProvider",m_xContext ), uno::UNO_QUERY ); m_xRangeConversion.set(m_xInternal,uno::UNO_QUERY); @@ -179,7 +179,7 @@ sal_Bool SAL_CALL DatabaseDataProvider::createDataSourcePossible(const uno::Sequ } else if ( pArgIter->Name == "FirstCellAsLabel" ) { - sal_Bool bFirstCellAsLabel = sal_True; + bool bFirstCellAsLabel = true; pArgIter->Value >>= bFirstCellAsLabel; if ( !bFirstCellAsLabel ) return sal_False; @@ -207,7 +207,7 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat } ::comphelper::NamedValueCollection aArgs( _aArguments ); - const sal_Bool bHasCategories = aArgs.getOrDefault( "HasCategories", sal_True ); + const bool bHasCategories = aArgs.getOrDefault( "HasCategories", sal_True ); uno::Sequence< OUString > aColumnNames = aArgs.getOrDefault( "ColumnDescriptions", uno::Sequence< OUString >() ); @@ -249,7 +249,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArgum // internal data always contains labels aArguments.put( "FirstCellAsLabel", uno::makeAny( sal_True ) ); - sal_Bool bHasCategories = sal_False; + bool bHasCategories = false; if( _xDataSource.is()) { uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences(_xDataSource->getDataSequences()); @@ -265,7 +265,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArgum && aRole == "categories" ) { - bHasCategories = sal_True; + bHasCategories = true; break; } } @@ -514,7 +514,7 @@ void SAL_CALL DatabaseDataProvider::setApplyFilter( sal_Bool the_value ) throw ( osl::MutexGuard g(m_aMutex); m_xAggregateSet->setPropertyValue( PROPERTY_APPLYFILTER, uno::makeAny( the_value ) ); } - set(PROPERTY_APPLYFILTER,the_value,m_ApplyFilter); + set(PROPERTY_APPLYFILTER,(bool)the_value,m_ApplyFilter); } OUString SAL_CALL DatabaseDataProvider::getHavingClause() throw (uno::RuntimeException, std::exception) @@ -570,7 +570,7 @@ sal_Bool SAL_CALL DatabaseDataProvider::getEscapeProcessing() throw (uno::Runtim void SAL_CALL DatabaseDataProvider::setEscapeProcessing(sal_Bool the_value) throw (uno::RuntimeException, std::exception) { - set(PROPERTY_ESCAPE_PROCESSING,the_value,m_EscapeProcessing); + set(PROPERTY_ESCAPE_PROCESSING,(bool)the_value,m_EscapeProcessing); } ::sal_Int32 SAL_CALL DatabaseDataProvider::getRowLimit() throw (uno::RuntimeException, std::exception) @@ -653,7 +653,7 @@ namespace }; } -void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const uno::Sequence< OUString >& i_aColumnNames) +void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategories,const uno::Sequence< OUString >& i_aColumnNames) { // clear the data before fill the new one uno::Reference< sdbcx::XColumnsSupplier > xColSup(m_xRowSet,uno::UNO_QUERY_THROW); diff --git a/dbaccess/source/core/misc/PropertyForward.cxx b/dbaccess/source/core/misc/PropertyForward.cxx index fe659deef89e..95857d7287a1 100644 --- a/dbaccess/source/core/misc/PropertyForward.cxx +++ b/dbaccess/source/core/misc/PropertyForward.cxx @@ -43,7 +43,7 @@ namespace dbaccess :m_xSource( _xSource, UNO_SET_THROW ) ,m_xDestContainer( _xDestContainer, UNO_SET_THROW ) ,m_sName( _sName ) - ,m_bInInsert( sal_False ) + ,m_bInInsert( false ) { osl_atomic_increment(&m_refCount); @@ -92,10 +92,10 @@ namespace dbaccess ::comphelper::copyProperties( m_xSource, m_xDest ); - m_bInInsert = sal_True; + m_bInInsert = true; Reference< XAppend > xAppend( m_xDestContainer, UNO_QUERY_THROW ); xAppend->appendByDescriptor( m_xDest ); - m_bInInsert = sal_False; + m_bInInsert = false; } m_xDestInfo.set( m_xDest->getPropertySetInfo(), UNO_SET_THROW ); diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index cb21950e70cb..7524ff20b785 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -248,31 +248,31 @@ OUString ODsnTypeCollection::getJavaDriverClass(const OUString& _sURL) const return aFeatures.getOrDefault("JavaDriverClass",OUString()); } -sal_Bool ODsnTypeCollection::isFileSystemBased(const OUString& _sURL) const +bool ODsnTypeCollection::isFileSystemBased(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("FileSystemBased",sal_False); } -sal_Bool ODsnTypeCollection::supportsTableCreation(const OUString& _sURL) const +bool ODsnTypeCollection::supportsTableCreation(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsTableCreation",sal_False); } -sal_Bool ODsnTypeCollection::supportsColumnDescription(const OUString& _sURL) const +bool ODsnTypeCollection::supportsColumnDescription(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsColumnDescription",sal_False); } -sal_Bool ODsnTypeCollection::supportsBrowsing(const OUString& _sURL) const +bool ODsnTypeCollection::supportsBrowsing(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsBrowsing",sal_False); } -sal_Bool ODsnTypeCollection::supportsDBCreation(const OUString& _sURL) const +bool ODsnTypeCollection::supportsDBCreation(const OUString& _sURL) const { const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL); return aFeatures.getOrDefault("SupportsDBCreation",sal_False); diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx index 83c7016ccb6d..7fb06c620238 100644 --- a/dbaccess/source/core/misc/sdbcoretools.cxx +++ b/dbaccess/source/core/misc/sdbcoretools.cxx @@ -49,7 +49,7 @@ namespace dbaccess using namespace ::com::sun::star::embed; using namespace ::com::sun::star::container; - void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,sal_Bool _bModified) + void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,bool _bModified) { Reference< XInterface > xDs = getDataSource( _rxObject ); Reference<XDocumentDataSource> xDocumentDataSource(xDs,UNO_QUERY); diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx index 5e2e11bc89e2..4b0665dc50bb 100644 --- a/dbaccess/source/core/misc/services.cxx +++ b/dbaccess/source/core/misc/services.cxx @@ -55,7 +55,7 @@ namespace dba{ // It consists of three functions which must be exported by the module. extern "C" void SAL_CALL createRegistryInfo_DBA() { - static sal_Bool bInit = sal_False; + static bool bInit = false; if (!bInit) { createRegistryInfo_OCommandDefinition(); @@ -64,7 +64,7 @@ extern "C" void SAL_CALL createRegistryInfo_DBA() createRegistryInfo_ODatabaseDocument(); createRegistryInfo_ODatabaseSource(); createRegistryInfo_DataAccessDescriptorFactory(); - bInit = sal_True; + bInit = true; } } |