diff options
362 files changed, 3360 insertions, 3360 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; } } diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 29e3c4c99cbe..1f3303294b4c 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -465,7 +465,7 @@ namespace dbmm Reference< XModifiable > xModify( m_pData->xDocument, UNO_QUERY_THROW ); xModify->setModified( sal_False ); // after this reload, don't show the migration warning, again - aDocumentArgs.put( "SuppressMigrationWarning", sal_Bool(sal_True) ); + aDocumentArgs.put( "SuppressMigrationWarning", true ); } // remove anything from the args which might refer to the old document diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index fb401c0a2a82..499ea4bcfd93 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -281,7 +281,7 @@ namespace dbmm try { ::comphelper::NamedValueCollection aLoadArgs; - aLoadArgs.put( "Hidden", (sal_Bool)sal_True ); + aLoadArgs.put( "Hidden", true ); aLoadArgs.put( "StatusIndicator", _rxProgress ); Reference< XCommandProcessor > xCommandProcessor( _rDocument.xCommandProcessor, UNO_SET_THROW ); diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index 9d1b95b8178c..92eaf50056a5 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -126,14 +126,14 @@ OUString SAL_CALL DBTypeDetection::detect( ::com::sun::star::uno::Sequence< ::co try { ::comphelper::NamedValueCollection aMedia( Descriptor ); - sal_Bool bStreamFromDescr = sal_False; + bool bStreamFromDescr = false; OUString sURL = aMedia.getOrDefault( "URL", OUString() ); Reference< XInputStream > xInStream( aMedia.getOrDefault( "InputStream", Reference< XInputStream >() ) ); Reference< XPropertySet > xStorageProperties; if ( xInStream.is() ) { - bStreamFromDescr = sal_True; + bStreamFromDescr = true; xStorageProperties.set( ::comphelper::OStorageHelper::GetStorageFromInputStream( xInStream, m_aContext ), UNO_QUERY ); } @@ -257,7 +257,7 @@ public: virtual void SAL_CALL cancel(void) throw(std::exception) SAL_OVERRIDE; private: - sal_Bool impl_executeNewDatabaseWizard( Reference< XModel >& _rxModel, sal_Bool& _bShouldStartTableWizard ); + bool impl_executeNewDatabaseWizard( Reference< XModel >& _rxModel, bool& _bShouldStartTableWizard ); }; @@ -306,7 +306,7 @@ Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) thro namespace { - sal_Bool lcl_urlAllowsInteraction( const Reference<XComponentContext> & _rContext, const OUString& _rURL ) + bool lcl_urlAllowsInteraction( const Reference<XComponentContext> & _rContext, const OUString& _rURL ) { bool bDoesAllow = false; try @@ -344,7 +344,7 @@ namespace } } -sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _rxModel, sal_Bool& _bShouldStartTableWizard ) +bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _rxModel, bool& _bShouldStartTableWizard ) { Sequence< Any > aWizardArgs(2); aWizardArgs[0] <<= PropertyValue( @@ -364,10 +364,10 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r // execute it if ( RET_OK != xAdminDialog->execute() ) - return sal_False; + return false; Reference<XPropertySet> xProp(xAdminDialog,UNO_QUERY); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; xProp->getPropertyValue("OpenDatabase") >>= bSuccess; xProp->getPropertyValue("StartTableWizard") >>= _bShouldStartTableWizard; return bSuccess; @@ -379,7 +379,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU { // first check if preview is true, if so return with out creating a controller. Preview is not supported ::comphelper::NamedValueCollection aMediaDesc( rArgs ); - sal_Bool bPreview = aMediaDesc.getOrDefault( "Preview", sal_False ); + bool bPreview = aMediaDesc.getOrDefault( "Preview", sal_False ); if ( bPreview ) { if (rListener.is()) @@ -390,10 +390,10 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU Reference< XModel > xModel = aMediaDesc.getOrDefault( "Model", Reference< XModel >() ); OUString sSalvagedURL = aMediaDesc.getOrDefault( "SalvagedFile", _rURL ); - sal_Bool bCreateNew = sal_False; // does the URL denote the private:factory URL? - sal_Bool bStartTableWizard = sal_False; // start the table wizard after everything was loaded successfully? + bool bCreateNew = false; // does the URL denote the private:factory URL? + bool bStartTableWizard = false; // start the table wizard after everything was loaded successfully? - sal_Bool bSuccess = sal_True; + bool bSuccess = true; // If there's no interaction handler in the media descriptor, put one. // By definition, loading via loadComponentFromURL (and thus via the content loader here) @@ -496,7 +496,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); - bSuccess = sal_False; + bSuccess = false; } } @@ -513,12 +513,12 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU xController->attachFrame( rFrame ); xModel->setCurrentController( xController.get() ); - bSuccess = sal_True; + bSuccess = true; } catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - bSuccess = sal_False; + bSuccess = false; } } diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx index 4627516d6de7..d055cda4f18a 100644 --- a/dbaccess/source/filter/xml/xmlColumn.cxx +++ b/dbaccess/source/filter/xml/xmlColumn.cxx @@ -51,7 +51,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport SvXMLImportContext( rImport, nPrfx, _sLocalName ) ,m_xParentContainer(_xParentContainer) ,m_xTable(_xTable) - ,m_bHidden(sal_False) + ,m_bHidden(false) { OSL_ENSURE(_xAttrList.is(),"Attribute list is NULL!"); diff --git a/dbaccess/source/filter/xml/xmlColumn.hxx b/dbaccess/source/filter/xml/xmlColumn.hxx index 06eb9100074e..5d2aa6b6c7d9 100644 --- a/dbaccess/source/filter/xml/xmlColumn.hxx +++ b/dbaccess/source/filter/xml/xmlColumn.hxx @@ -36,7 +36,7 @@ namespace dbaxml OUString m_sCellStyleName; OUString m_sHelpMessage; ::com::sun::star::uno::Any m_aDefaultValue; - sal_Bool m_bHidden; + bool m_bHidden; ODBFilter& GetOwnImport(); public: diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx index 74f5ae0a4729..b96a36a610d2 100644 --- a/dbaccess/source/filter/xml/xmlComponent.cxx +++ b/dbaccess/source/filter/xml/xmlComponent.cxx @@ -44,7 +44,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport ,const OUString& _sComponentServiceName ) : SvXMLImportContext( rImport, nPrfx, _sLocalName ) - ,m_bAsTemplate(sal_False) + ,m_bAsTemplate(false) { OSL_ENSURE(_xAttrList.is(),"Attribute list is NULL!"); diff --git a/dbaccess/source/filter/xml/xmlComponent.hxx b/dbaccess/source/filter/xml/xmlComponent.hxx index 3ac21b30850c..4cc4d3f814cd 100644 --- a/dbaccess/source/filter/xml/xmlComponent.hxx +++ b/dbaccess/source/filter/xml/xmlComponent.hxx @@ -30,7 +30,7 @@ namespace dbaxml OUString m_sName; OUString m_sHREF; OUString m_sComponentServiceName; - sal_Bool m_bAsTemplate; + bool m_bAsTemplate; ODBFilter& GetOwnImport(); public: diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index 2e14cacb2ac5..b9540a49306a 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -45,7 +45,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport ,OXMLDataSourceSetting* _pContainer) : SvXMLImportContext( rImport, nPrfx, _sLocalName ) ,m_pContainer(_pContainer) - ,m_bIsList(sal_False) + ,m_bIsList(false) { m_aPropType = ::getVoidCppuType(); diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx index 8c1ae065f397..ed939fe2b420 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx @@ -32,7 +32,7 @@ namespace dbaxml ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aInfoSequence; OXMLDataSourceSetting* m_pContainer; ::com::sun::star::uno::Type m_aPropType; // the type of the property the instance imports currently - sal_Bool m_bIsList; + bool m_bIsList; ODBFilter& GetOwnImport(); ::com::sun::star::uno::Any convertString(const ::com::sun::star::uno::Type& _rExpectedType, const OUString& _rReadCharacters); diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 4471e5897263..7d8030f5adac 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -193,7 +193,7 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16 : SvXMLExport( util::MeasureUnit::MM_10TH, _rxContext, getImplementationName_Static(), XML_DATABASE, EXPORT_OASIS | nExportFlag) ,m_aTypeCollection(_rxContext) -,m_bAllreadyFilled(sal_False) +,m_bAllreadyFilled(false) { GetMM100UnitConverter().SetCoreMeasureUnit(util::MeasureUnit::MM_10TH); GetMM100UnitConverter().SetXMLMeasureUnit(util::MeasureUnit::CM); @@ -281,7 +281,7 @@ void ODBExport::exportDataSource() { Reference<XPropertySet> xProp( getDataSource(), UNO_SET_THROW ); - sal_Bool bAutoIncrementEnabled = sal_True; + bool bAutoIncrementEnabled = true; TStringPair aAutoIncrement; Reference< XPropertySet > xDataSourceSettings; @@ -696,7 +696,7 @@ void ODBExport::exportDataSourceSettings() ::std::vector< TypedPropertyValue >::iterator aEnd = m_aDataSourceSettings.end(); for ( ; aIter != aEnd; ++aIter ) { - sal_Bool bIsSequence = TypeClass_SEQUENCE == aIter->Type.getTypeClass(); + bool bIsSequence = TypeClass_SEQUENCE == aIter->Type.getTypeClass(); Type aSimpleType; if ( bIsSequence ) @@ -817,13 +817,13 @@ void ODBExport::exportLogin() Reference<XPropertySet> xProp(getDataSource()); OUString sValue; xProp->getPropertyValue(PROPERTY_USER) >>= sValue; - sal_Bool bAddLogin = !sValue.isEmpty(); + bool bAddLogin = !sValue.isEmpty(); if ( bAddLogin ) AddAttribute(XML_NAMESPACE_DB, XML_USER_NAME,sValue); - sal_Bool bValue = sal_False; + bool bValue = false; if ( xProp->getPropertyValue(PROPERTY_ISPASSWORDREQUIRED) >>= bValue ) { - bAddLogin = sal_True; + bAddLogin = true; AddAttribute(XML_NAMESPACE_DB, XML_IS_PASSWORD_REQUIRED,bValue ? XML_TRUE : XML_FALSE); } if ( bAddLogin ) @@ -833,7 +833,7 @@ void ODBExport::exportLogin() void ODBExport::exportCollection(const Reference< XNameAccess >& _xCollection ,enum ::xmloff::token::XMLTokenEnum _eComponents ,enum ::xmloff::token::XMLTokenEnum _eSubComponents - ,sal_Bool _bExportContext + ,bool _bExportContext ,const ::comphelper::mem_fun1_t<ODBExport,XPropertySet* >& _aMemFunc ) { @@ -865,7 +865,7 @@ void ODBExport::exportComponent(XPropertySet* _xProp) { OUString sValue; _xProp->getPropertyValue(PROPERTY_PERSISTENT_NAME) >>= sValue; - sal_Bool bIsForm = sal_True; + bool bIsForm = true; _xProp->getPropertyValue("IsForm") >>= bIsForm; if ( bIsForm ) sValue = "forms/" + sValue; @@ -874,7 +874,7 @@ void ODBExport::exportComponent(XPropertySet* _xProp) AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sValue); AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE); - sal_Bool bAsTemplate = sal_False; + bool bAsTemplate = false; _xProp->getPropertyValue(PROPERTY_AS_TEMPLATE) >>= bAsTemplate; AddAttribute(XML_NAMESPACE_DB, XML_AS_TEMPLATE,bAsTemplate ? XML_TRUE : XML_FALSE); SvXMLElementExport aComponents(*this,XML_NAMESPACE_DB, XML_COMPONENT, true, true); @@ -901,12 +901,12 @@ void ODBExport::exportQuery(XPropertySet* _xProp) exportColumns(xCol); exportFilter(_xProp,PROPERTY_FILTER,XML_FILTER_STATEMENT); exportFilter(_xProp,PROPERTY_ORDER,XML_ORDER_STATEMENT); - exportTableName(_xProp,sal_True); + exportTableName(_xProp,true); } void ODBExport::exportTable(XPropertySet* _xProp) { - exportTableName(_xProp,sal_False); + exportTableName(_xProp,false); if ( _xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION) ) AddAttribute(XML_NAMESPACE_DB, XML_DESCRIPTION,getString(_xProp->getPropertyValue(PROPERTY_DESCRIPTION))); @@ -946,7 +946,7 @@ void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,cons } } -void ODBExport::exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate) +void ODBExport::exportTableName(XPropertySet* _xProp,bool _bUpdate) { OUString sValue; _xProp->getPropertyValue(_bUpdate ? OUString(PROPERTY_UPDATE_TABLENAME) : OUString(PROPERTY_NAME)) >>= sValue; @@ -1021,7 +1021,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup) Reference<XAttributeList> xAtt = pAtt; exportStyleName(xProp.get(),*pAtt); - sal_Bool bHidden = getBOOL(xProp->getPropertyValue(PROPERTY_HIDDEN)); + bool bHidden = getBOOL(xProp->getPropertyValue(PROPERTY_HIDDEN)); OUString sValue; xProp->getPropertyValue(PROPERTY_HELPTEXT) >>= sValue; @@ -1078,7 +1078,7 @@ void ODBExport::exportForms() if ( xCollection.is() && xCollection->hasElements() ) { ::comphelper::mem_fun1_t<ODBExport,XPropertySet* > aMemFunc(&ODBExport::exportComponent); - exportCollection(xCollection,XML_FORMS,XML_COMPONENT_COLLECTION,sal_True,aMemFunc); + exportCollection(xCollection,XML_FORMS,XML_COMPONENT_COLLECTION,true,aMemFunc); } } } @@ -1099,13 +1099,13 @@ void ODBExport::exportReports() if ( xCollection.is() && xCollection->hasElements() ) { ::comphelper::mem_fun1_t<ODBExport,XPropertySet* > aMemFunc(&ODBExport::exportComponent); - exportCollection(xCollection,XML_REPORTS,XML_COMPONENT_COLLECTION,sal_True,aMemFunc); + exportCollection(xCollection,XML_REPORTS,XML_COMPONENT_COLLECTION,true,aMemFunc); } } } } -void ODBExport::exportQueries(sal_Bool _bExportContext) +void ODBExport::exportQueries(bool _bExportContext) { Any aValue; OUString sService; @@ -1131,7 +1131,7 @@ void ODBExport::exportQueries(sal_Bool _bExportContext) } } -void ODBExport::exportTables(sal_Bool _bExportContext) +void ODBExport::exportTables(bool _bExportContext) { Reference<XTablesSupplier> xSup(getDataSource(),UNO_QUERY); if ( xSup.is() ) @@ -1193,7 +1193,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp) else { ::comphelper::mem_fun1_t<ODBExport,XPropertySet* > aMemFunc(&ODBExport::exportAutoStyle); - exportCollection(xCollection,XML_TOKEN_INVALID,XML_TOKEN_INVALID,sal_False,aMemFunc); + exportCollection(xCollection,XML_TOKEN_INVALID,XML_TOKEN_INVALID,false,aMemFunc); } } catch(const Exception&) @@ -1252,8 +1252,8 @@ void ODBExport::_ExportContent() exportDataSource(); exportForms(); exportReports(); - exportQueries(sal_True); - exportTables(sal_True); + exportQueries(true); + exportTables(true); } void ODBExport::_ExportMasterStyles() @@ -1450,9 +1450,9 @@ void ODBExport::collectComponentStyles() if ( m_bAllreadyFilled ) return; - m_bAllreadyFilled = sal_True; - exportQueries(sal_False); - exportTables(sal_False); + m_bAllreadyFilled = true; + exportQueries(false); + exportTables(false); } }// dbaxml diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index ec0b4bcfd8fa..fee482b8e85f 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -112,7 +112,7 @@ class ODBExport : public SvXMLExport Reference<XPropertySet> m_xDataSource; ::dbaccess::ODsnTypeCollection m_aTypeCollection; - sal_Bool m_bAllreadyFilled; + bool m_bAllreadyFilled; void exportDataSource(); void exportConnectionData(); @@ -130,14 +130,14 @@ class ODBExport : public SvXMLExport void exportDataSourceSettings(); void exportForms(); void exportReports(); - void exportQueries(sal_Bool _bExportContext); - void exportTables(sal_Bool _bExportContext); + void exportQueries(bool _bExportContext); + void exportTables(bool _bExportContext); void exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt); void exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const Reference<XPropertySet>& _xProp,SvXMLAttributeList& _rAtt,TPropertyStyleMap& _rMap); void exportCollection(const Reference< XNameAccess >& _xCollection ,enum ::xmloff::token::XMLTokenEnum _eComponents ,enum ::xmloff::token::XMLTokenEnum _eSubComponents - ,sal_Bool _bExportContext + ,bool _bExportContext ,const ::comphelper::mem_fun1_t<ODBExport,XPropertySet* >& _aMemFunc ); void exportComponent(XPropertySet* _xProp); @@ -146,7 +146,7 @@ class ODBExport : public SvXMLExport void exportFilter(XPropertySet* _xProp ,const OUString& _sProp ,enum ::xmloff::token::XMLTokenEnum _eStatementType); - void exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate); + void exportTableName(XPropertySet* _xProp,bool _bUpdate); void exportAutoStyle(XPropertySet* _xProp); void exportColumns(const Reference<XColumnsSupplier>& _xColSup); void collectComponentStyles(); diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx index 82606fe19f61..ff1d3ad50176 100644 --- a/dbaccess/source/filter/xml/xmlQuery.cxx +++ b/dbaccess/source/filter/xml/xmlQuery.cxx @@ -44,7 +44,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xParentContainer ) : OXMLTable( rImport, nPrfx, _sLocalName,_xAttrList,_xParentContainer, "com.sun.star.sdb.CommandDefinition" ) - ,m_bEscapeProcessing(sal_True) + ,m_bEscapeProcessing(true) { OSL_ENSURE(_xAttrList.is(),"Attribute list is NULL!"); diff --git a/dbaccess/source/filter/xml/xmlQuery.hxx b/dbaccess/source/filter/xml/xmlQuery.hxx index ba7c0306c9ff..cb2fc048ee3d 100644 --- a/dbaccess/source/filter/xml/xmlQuery.hxx +++ b/dbaccess/source/filter/xml/xmlQuery.hxx @@ -29,7 +29,7 @@ namespace dbaxml { OUString m_sCommand; OUString m_sTable; - sal_Bool m_bEscapeProcessing; + bool m_bEscapeProcessing; protected: virtual void setProperties(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _xProp) SAL_OVERRIDE; public: diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index 21906d279c73..7799cd291a9e 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -52,7 +52,7 @@ TYPEINIT1( OTableStylesContext, SvXMLStylesContext ); OTableStyleContext::OTableStyleContext( ODBFilter& rImport, sal_uInt16 nPrfx, const OUString& rLName, const Reference< XAttributeList > & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle ) + SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle ) :XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, bDefaultStyle ) ,sNumberFormat(OUString("NumberFormat")) ,pStyles(&rStyles) @@ -144,7 +144,7 @@ OTableStylesContext::OTableStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx , const OUString& rLName , const Reference< XAttributeList > & xAttrList, - const sal_Bool bTempAutoStyles ) + const bool bTempAutoStyles ) : SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ) , sTableStyleServiceName( OUString( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME )) , sColumnStyleServiceName( OUString( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME )) diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx index bfeb2e1f67de..8c3b8b51f600 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.hxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx @@ -60,7 +60,7 @@ namespace dbaxml OTableStyleContext( ODBFilter& rImport, sal_uInt16 nPrfx, const OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle = sal_False ); + SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle = false ); virtual ~OTableStyleContext(); @@ -81,7 +81,7 @@ namespace dbaxml const OUString sCellStyleServiceName; sal_Int32 m_nNumberFormatIndex; sal_Int32 m_nMasterPageNameIndex; - sal_Bool bAutoStyles : 1; + bool bAutoStyles : 1; mutable UniReference < SvXMLImportPropertyMapper > m_xTableImpPropMapper; mutable UniReference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper; @@ -105,7 +105,7 @@ namespace dbaxml OTableStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx , const OUString& rLName , const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, - const sal_Bool bAutoStyles ); + const bool bAutoStyles ); virtual ~OTableStylesContext(); virtual void EndElement() SAL_OVERRIDE; diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index 876d85d4578d..dcc8b577a259 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -49,8 +49,8 @@ OXMLTable::OXMLTable( ODBFilter& _rImport :SvXMLImportContext( _rImport, nPrfx, _sLocalName ) ,m_xParentContainer(_xParentContainer) ,m_sServiceName(_sServiceName) - ,m_bApplyFilter(sal_False) - ,m_bApplyOrder(sal_False) + ,m_bApplyFilter(false) + ,m_bApplyOrder(false) { OSL_ENSURE(_xAttrList.is(),"Attribute list is NULL!"); diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index be5069f5c042..c497192931c3 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -38,8 +38,8 @@ namespace dbaxml OUString m_sCatalog; OUString m_sStyleName; OUString m_sServiceName; - sal_Bool m_bApplyFilter; - sal_Bool m_bApplyOrder; + bool m_bApplyFilter; + bool m_bApplyOrder; ODBFilter& GetOwnImport(); diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.cxx b/dbaccess/source/filter/xml/xmlTableFilterList.cxx index 2caf2fc68e5d..04c87a0300fa 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.cxx @@ -57,9 +57,9 @@ SvXMLImportContext* OXMLTableFilterList::CreateChildContext( { GetImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); if ( IsXMLToken( rLocalName, XML_TABLE_FILTER_PATTERN ) ) - pContext = new OXMLTableFilterPattern( GetImport(), nPrefix, rLocalName,sal_True,*this); + pContext = new OXMLTableFilterPattern( GetImport(), nPrefix, rLocalName,true,*this); else if ( IsXMLToken( rLocalName, XML_TABLE_TYPE ) ) - pContext = new OXMLTableFilterPattern( GetImport(), nPrefix, rLocalName,sal_False,*this); + pContext = new OXMLTableFilterPattern( GetImport(), nPrefix, rLocalName,false,*this); else if ( IsXMLToken( rLocalName, XML_TABLE_INCLUDE_FILTER ) ) pContext = new OXMLTableFilterList( GetImport(), nPrefix, rLocalName ); } diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx index 48c2cbdfb180..06bb8ae6b0eb 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx @@ -29,7 +29,7 @@ namespace dbaxml OXMLTableFilterPattern::OXMLTableFilterPattern( SvXMLImport& rImport, sal_uInt16 nPrfx ,const OUString& _sLocalName - ,sal_Bool _bNameFilter + ,bool _bNameFilter ,OXMLTableFilterList& _rParent) :SvXMLImportContext( rImport, nPrfx, _sLocalName ) ,m_rParent(_rParent) diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx index e6b7d9cbf7df..4101a4184409 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx +++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx @@ -27,12 +27,12 @@ namespace dbaxml class OXMLTableFilterPattern : public SvXMLImportContext { OXMLTableFilterList& m_rParent; - sal_Bool m_bNameFilter; + bool m_bNameFilter; public: OXMLTableFilterPattern( SvXMLImport& rImport ,sal_uInt16 nPrfx ,const OUString& rLName - ,sal_Bool _bNameFilter + ,bool _bNameFilter ,OXMLTableFilterList& _rParent); virtual ~OXMLTableFilterPattern(); diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index ec538fae4d29..39d946130d90 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -298,7 +298,7 @@ sal_Int32 ReadThroughComponent( if ( xStorage.is() ) { uno::Reference< io::XStream > xDocStream; - sal_Bool bEncrypted = sal_False; + bool bEncrypted = false; try { @@ -402,7 +402,7 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto if( pFocusWindow ) pFocusWindow->EnterWait(); } - sal_Bool bRet = sal_False; + bool bRet = false; if ( GetModel().is() ) bRet = implImport( rDescriptor ); @@ -418,7 +418,7 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto return bRet; } -sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) +bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException) { OUString sFileName; @@ -429,7 +429,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) sFileName = aMediaDescriptor.getOrDefault( "FileName", sFileName ); OSL_ENSURE( !sFileName.isEmpty(), "ODBFilter::implImport: no URL given!" ); - sal_Bool bRet = !sFileName.isEmpty(); + bool bRet = !sFileName.isEmpty(); if ( bRet ) { @@ -495,7 +495,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) // TODO/LATER: this is completely wrong! Filter code should never call ErrorHandler directly! But for now this is the only way! ErrorHandler::HandleError( nRet ); if( nRet & ERRCODE_WARNING_MASK ) - bRet = sal_True; + bRet = true; } } } @@ -523,11 +523,11 @@ SvXMLImportContext* ODBFilter::CreateContext( sal_uInt16 nPrefix, break; case XML_TOK_DOC_STYLES: GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = CreateStylesContext(nPrefix, rLocalName, xAttrList, sal_False); + pContext = CreateStylesContext(nPrefix, rLocalName, xAttrList, false); break; case XML_TOK_DOC_AUTOSTYLES: GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); - pContext = CreateStylesContext(nPrefix, rLocalName, xAttrList, sal_True); + pContext = CreateStylesContext(nPrefix, rLocalName, xAttrList, true); break; case XML_TOK_DOC_SCRIPT: pContext = CreateScriptContext( rLocalName ); @@ -825,7 +825,7 @@ const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const } SvXMLImportContext* ODBFilter::CreateStylesContext(sal_uInt16 _nPrefix,const OUString& rLocalName, - const uno::Reference< XAttributeList>& xAttrList, sal_Bool bIsAutoStyle ) + const uno::Reference< XAttributeList>& xAttrList, bool bIsAutoStyle ) { SvXMLImportContext *pContext = NULL; if (!pContext) diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx index d3030d7384f4..5a7cfdf26c96 100644 --- a/dbaccess/source/filter/xml/xmlfilter.hxx +++ b/dbaccess/source/filter/xml/xmlfilter.hxx @@ -85,7 +85,7 @@ private: sal_Int32 m_nPreviewMode; bool m_bNewFormat; - sal_Bool implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException); + bool implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException); /** fills the map with the Properties @param _rValue @@ -96,7 +96,7 @@ private: void fillPropertyMap(const Any& _rValue,TPropertyNameMap& _rMap); SvXMLImportContext* CreateStylesContext(sal_uInt16 nPrefix,const OUString& rLocalName, - const Reference< XAttributeList>& xAttrList, sal_Bool bIsAutoStyle ); + const Reference< XAttributeList>& xAttrList, bool bIsAutoStyle ); SvXMLImportContext* CreateScriptContext( const OUString& rLocalName ); protected: diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx index b90a801f22de..8262ce1a165f 100644 --- a/dbaccess/source/filter/xml/xmlservices.cxx +++ b/dbaccess/source/filter/xml/xmlservices.cxx @@ -29,7 +29,7 @@ using namespace ::com::sun::star::registry; extern "C" void SAL_CALL createRegistryInfo_dbaxml() { - static sal_Bool bInit = sal_False; + static bool bInit = false; if (!bInit) { createRegistryInfo_DBTypeDetection(); @@ -38,7 +38,7 @@ extern "C" void SAL_CALL createRegistryInfo_dbaxml() createRegistryInfo_OSettingsExport(); createRegistryInfo_OFullExport(); createRegistryInfo_DBContentLoader2(); - bInit = sal_True; + bInit = true; } } diff --git a/dbaccess/source/inc/OAuthenticationContinuation.hxx b/dbaccess/source/inc/OAuthenticationContinuation.hxx index a371a50b221e..12c5d061387c 100644 --- a/dbaccess/source/inc/OAuthenticationContinuation.hxx +++ b/dbaccess/source/inc/OAuthenticationContinuation.hxx @@ -35,9 +35,9 @@ namespace dbaccess class OOO_DLLPUBLIC_DBA OAuthenticationContinuation : public comphelper::OInteraction< com::sun::star::ucb::XInteractionSupplyAuthentication > { - sal_Bool m_bRemberPassword : 1; // remember the password for this session ? + bool m_bRemberPassword : 1; // remember the password for this session ? - sal_Bool m_bCanSetUserName; + bool m_bCanSetUserName; OUString m_sUser; // the user OUString m_sPassword; // the user's password @@ -57,10 +57,10 @@ public: com::sun::star::uno::Sequence< com::sun::star::ucb::RememberAuthentication > SAL_CALL getRememberAccountModes( com::sun::star::ucb::RememberAuthentication& Default ) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; void SAL_CALL setRememberAccount( com::sun::star::ucb::RememberAuthentication Remember ) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - void setCanChangeUserName( sal_Bool bVal ) { m_bCanSetUserName = bVal; } + void setCanChangeUserName( bool bVal ) { m_bCanSetUserName = bVal; } OUString getUser() const { return m_sUser; } OUString getPassword() const { return m_sPassword; } - sal_Bool getRememberPassword() const { return m_bRemberPassword; } + bool getRememberPassword() const { return m_bRemberPassword; } }; } // namespace dbaccess diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index 706fa32c95ce..d1fd9aa707ef 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -142,19 +142,19 @@ public: void extractHostNamePort(const OUString& _rDsn,OUString& _sDatabaseName,OUString& _rHostname,sal_Int32& _nPortNumber) const; /// check if the given data source allows creation of tables - sal_Bool supportsTableCreation(const OUString& _sURL) const; + bool supportsTableCreation(const OUString& _sURL) const; /// check if the given data source allows to show column description. - sal_Bool supportsColumnDescription(const OUString& _sURL) const; + bool supportsColumnDescription(const OUString& _sURL) const; // check if a Browse button may be shown to insert connection url - sal_Bool supportsBrowsing(const OUString& _sURL) const; + bool supportsBrowsing(const OUString& _sURL) const; // check if a Create New Database button may be shown to insert connection url - sal_Bool supportsDBCreation(const OUString& _sURL) const; + bool supportsDBCreation(const OUString& _sURL) const; /// check if the given data source tyoe is based on the file system - i.e. the URL is a prefix plus a file URL - sal_Bool isFileSystemBased(const OUString& _sURL) const; + bool isFileSystemBased(const OUString& _sURL) const; bool isConnectionUrlRequired(const OUString& _sURL) const; diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx index 55b25fd869c9..ba39ca0415f1 100644 --- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx +++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx @@ -28,11 +28,11 @@ using ::com::sun::star::uno::XInterface; extern "C" void SAL_CALL sdbt_initializeModule() { - static sal_Bool s_bInit = sal_False; + static bool s_bInit = false; if (!s_bInit) { createRegistryInfo_ConnectionTools(); - s_bInit = sal_True; + s_bInit = true; } } diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 9493a2cd75a3..5a4c1a28282a 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -296,8 +296,8 @@ OApplicationController::OApplicationController(const Reference< XComponentContex ,m_aSelectContainerEvent( LINK( this, OApplicationController, OnSelectContainer ) ) ,m_ePreviewMode(E_PREVIEWNONE) ,m_eCurrentType(E_NONE) - ,m_bNeedToReconnect(sal_False) - ,m_bSuspended( sal_False ) + ,m_bNeedToReconnect(false) + ,m_bSuspended( false ) ,m_pSelectionNotifier( new SelectionNotifier( getMutex(), *this ) ) { } @@ -529,9 +529,9 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt if ( getView() && getView()->IsInModalMode() ) return sal_False; - sal_Bool bCanSuspend = sal_True; + bool bCanSuspend = true; - if ( m_bSuspended != bSuspend ) + if ( (m_bSuspended ? 1 : 0) != bSuspend ) { if ( bSuspend && !closeSubComponents() ) return sal_False; @@ -555,7 +555,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt // when we save the document this must be false else some press cancel break; case RET_CANCEL: - bCanSuspend = sal_False; + bCanSuspend = false; default: break; } @@ -1211,28 +1211,28 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa case ID_NEW_TABLE_DESIGN: { ElementType eType = E_TABLE; - sal_Bool bAutoPilot = sal_False; + bool bAutoPilot = false; ::comphelper::NamedValueCollection aCreationArgs; switch( _nId ) { case SID_DB_FORM_NEW_PILOT: case SID_FORM_CREATE_REPWIZ_PRE_SEL: - bAutoPilot = sal_True; + bAutoPilot = true; // run through case SID_APP_NEW_FORM: eType = E_FORM; break; case ID_DOCUMENT_CREATE_REPWIZ: case SID_REPORT_CREATE_REPWIZ_PRE_SEL: - bAutoPilot = sal_True; + bAutoPilot = true; // run through case SID_APP_NEW_REPORT: case SID_APP_NEW_REPORT_PRE_SEL: eType = E_REPORT; break; case ID_APP_NEW_QUERY_AUTO_PILOT: - bAutoPilot = sal_True; + bAutoPilot = true; eType = E_QUERY; break; case ID_NEW_QUERY_DESIGN: @@ -1242,7 +1242,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa eType = E_QUERY; break; case ID_NEW_TABLE_DESIGN_AUTO_PILOT: - bAutoPilot = sal_True; + bAutoPilot = true; // run through case ID_NEW_TABLE_DESIGN: break; @@ -1675,7 +1675,7 @@ namespace } } -sal_Bool OApplicationController::onContainerSelect(ElementType _eType) +bool OApplicationController::onContainerSelect(ElementType _eType) { OSL_ENSURE(getContainer(),"View is NULL! -> GPF"); @@ -1697,12 +1697,12 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType) } else { - return sal_False; + return false; } } catch( const Exception& ) { - return sal_False; + return false; } } Reference< XLayoutManager > xLayoutManager = getLayoutManager( getFrame() ); @@ -1743,7 +1743,7 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType) } m_eCurrentType = _eType; - return sal_True; + return true; } bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree ) @@ -1892,7 +1892,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const pDesigner.reset( new ResultSetBrowser( getORB(), this, m_aCurrentFrame.getFrame(), _eType == E_TABLE ) ); if ( !aArguments.has( (OUString)PROPERTY_SHOWMENU ) ) - aArguments.put( (OUString)PROPERTY_SHOWMENU, makeAny( (sal_Bool)sal_True ) ); + aArguments.put( (OUString)PROPERTY_SHOWMENU, makeAny( true ) ); aDataSource <<= getDatabaseName(); } @@ -2139,7 +2139,7 @@ void OApplicationController::renameEntry() if ( xRename.is() && aDialog.get() ) { - sal_Bool bTryAgain = sal_True; + bool bTryAgain = true; while( bTryAgain ) { if ( aDialog->Execute() == RET_OK ) @@ -2177,7 +2177,7 @@ void OApplicationController::renameEntry() } getContainer()->elementReplaced( eType , sOldName, sNewName ); - bTryAgain = sal_False; + bTryAgain = false; } catch(const SQLException& ) { @@ -2196,7 +2196,7 @@ void OApplicationController::renameEntry() } } else - bTryAgain = sal_False; + bTryAgain = false; } } } @@ -2399,12 +2399,12 @@ Any OApplicationController::getCurrentSelection( Control& _rControl ) const return makeAny( aSelection ); } -sal_Bool OApplicationController::requestQuickHelp( const SvTreeListEntry* /*_pEntry*/, OUString& /*_rText*/ ) const +bool OApplicationController::requestQuickHelp( const SvTreeListEntry* /*_pEntry*/, OUString& /*_rText*/ ) const { - return sal_False; + return false; } -sal_Bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ ) +bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ ) { TransferableHelper* pTransfer = NULL; if ( getContainer() && getContainer()->getSelectionCount() ) @@ -2440,7 +2440,7 @@ sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const if ( eType != E_NONE && (eType != E_TABLE || !isConnectionReadOnly()) ) { // check for the concrete type - if(::std::find_if(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(eType,sal_True)) != _rFlavors.end()) + if(::std::find_if(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(eType,true)) != _rFlavors.end()) return DND_ACTION_COPY; if ( eType == E_FORM || eType == E_REPORT ) { @@ -2495,8 +2495,8 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.nType = pView->getElementType(); m_aAsyncDrop.nAction = _rEvt.mnAction; - m_aAsyncDrop.bError = sal_False; - m_aAsyncDrop.bHtml = sal_False; + m_aAsyncDrop.bError = false; + m_aAsyncDrop.bHtml = false; m_aAsyncDrop.aUrl = ""; // loop through the available formats and see what we can do ... diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx index 6cbc8a03255b..a8701814b32a 100644 --- a/dbaccess/source/ui/app/AppController.hxx +++ b/dbaccess/source/ui/app/AppController.hxx @@ -120,8 +120,8 @@ namespace dbaui OAsyncronousLink m_aSelectContainerEvent; PreviewMode m_ePreviewMode; // the mode of the preview ElementType m_eCurrentType; - sal_Bool m_bNeedToReconnect; // true when the settings of the data source were modified and the connection is no longer up to date - sal_Bool m_bSuspended; // is true when the controller was already suspended + bool m_bNeedToReconnect; // true when the settings of the data source were modified and the connection is no longer up to date + bool m_bSuspended; // is true when the controller was already suspended ::std::auto_ptr< SelectionNotifier > m_pSelectionNotifier; @@ -210,7 +210,7 @@ namespace dbaui @return <TRUE/> if read only or doesn't exist, otherwise <FALSE/> */ - sal_Bool isConnectionReadOnly() const; + bool isConnectionReadOnly() const; /// fills the list with the selected entries. void getSelectionElementNames( ::std::vector< OUString>& _rNames ) const; @@ -273,13 +273,13 @@ namespace dbaui @return <TRUE/> if the paste opertions was successful, otherwise <FALSE/>. */ - sal_Bool paste( ElementType _eType,const ::svx::ODataAccessDescriptor& _rPasteData ,const OUString& _sParentFolder = OUString(),sal_Bool _bMove = sal_False); + bool paste( ElementType _eType, const ::svx::ODataAccessDescriptor& _rPasteData, const OUString& _sParentFolder = OUString(), bool _bMove = false); /// returns the system clipboard. const TransferableDataHelper& getViewClipboard() const { return m_aSystemClipboard; } /// returns <TRUE/> if the clipboard supports a table format, otherwise <FALSE/>. - sal_Bool isTableFormat() const; + bool isTableFormat() const; /** fills the vector with all supported formats @param _eType @@ -341,11 +341,11 @@ namespace dbaui @return <TRUE/> if the insert opertions was successful, otherwise <FALSE/>. */ - sal_Bool insertHierachyElement( ElementType _eType + bool insertHierachyElement( ElementType _eType ,const OUString& _sParentFolder - ,sal_Bool _bCollection = sal_True + ,bool _bCollection = true ,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>() - ,sal_Bool _bMove = sal_False); + ,bool _bMove = false); /** checks if delete command or rename comamnd is allowed @param _eType The element type. @@ -354,14 +354,14 @@ namespace dbaui @return <TRUE> if the command is allowed */ - sal_Bool isRenameDeleteAllowed(ElementType _eType,sal_Bool _bDelete) const; + bool isRenameDeleteAllowed(ElementType _eType, bool _bDelete) const; /** all selected entries will be opened, or edited, or converted to a view @param _nId The slot which should be executed. @param _eOpenMode Defines the mode of opening. @see ElementOpenMode */ - void doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMode); + void doAction(sal_uInt16 _nId, ElementOpenMode _eOpenMode); /** returns the currently selected table or query name. * @@ -494,7 +494,7 @@ namespace dbaui // IApplicationController virtual bool onEntryDoubleClick(SvTreeListBox& _rTree) SAL_OVERRIDE; - virtual sal_Bool onContainerSelect(ElementType _eType) SAL_OVERRIDE; + virtual bool onContainerSelect(ElementType _eType) SAL_OVERRIDE; virtual void onSelectionChanged() SAL_OVERRIDE; virtual void onCutEntry() SAL_OVERRIDE; virtual void onCopyEntry() SAL_OVERRIDE; @@ -518,10 +518,10 @@ namespace dbaui virtual bool interceptUserInput( const NotifyEvent& _rEvent ) SAL_OVERRIDE; // IControlActionListener overridables - virtual sal_Bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const SAL_OVERRIDE; - virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SAL_OVERRIDE; - virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) SAL_OVERRIDE; - virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) SAL_OVERRIDE; + virtual bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const SAL_OVERRIDE; + virtual bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SAL_OVERRIDE; + virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) SAL_OVERRIDE; + virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) SAL_OVERRIDE; // IContextMenuProvider (base of IApplicationController) virtual PopupMenu* getContextMenu( Control& _rControl ) const SAL_OVERRIDE; diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index ecc19ee03d07..ec9edb0ffa14 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -415,9 +415,9 @@ bool OApplicationController::isDataSourceReadOnly() const return !xStore.is() || xStore->isReadonly(); } -sal_Bool OApplicationController::isConnectionReadOnly() const +bool OApplicationController::isConnectionReadOnly() const { - sal_Bool bIsConnectionReadOnly = true; + bool bIsConnectionReadOnly = true; if ( m_xMetaData.is() ) { try @@ -581,7 +581,7 @@ TransferableHelper* OApplicationController::copyObject() return NULL; } -sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAccessDescriptor& _rPasteData,const OUString& _sParentFolder ,sal_Bool _bMove) +bool OApplicationController::paste( ElementType _eType, const ::svx::ODataAccessDescriptor& _rPasteData, const OUString& _sParentFolder, bool _bMove) { try { @@ -596,14 +596,14 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc // read all necessary data OUString sCommand; - sal_Bool bEscapeProcessing = sal_True; + bool bEscapeProcessing = true; _rPasteData[daCommand] >>= sCommand; if ( _rPasteData.has(daEscapeProcessing) ) _rPasteData[daEscapeProcessing] >>= bEscapeProcessing; // plausibility check - sal_Bool bValidDescriptor = sal_False; + bool bValidDescriptor = false; OUString sDataSourceName = _rPasteData.getDataSource(); if (CommandType::QUERY == nCommandType) bValidDescriptor = sDataSourceName.getLength() && sCommand.getLength(); @@ -612,7 +612,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc if (!bValidDescriptor) { OSL_FAIL("OApplicationController::paste: invalid descriptor!"); - return sal_False; + return false; } // the target object name (as we'll suggest it to the user) @@ -640,7 +640,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc if (CommandType::QUERY == nCommandType) { // need to extract the statement and the escape processing flag from the query object - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { // the concrete query @@ -664,7 +664,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc { OSL_FAIL("OApplicationController::paste: could not extract the source query object!"); // TODO: maybe this is worth an error message to be displayed to the user .... - return sal_False; + return false; } } @@ -673,7 +673,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc if (!xQueryFactory.is()) { OSL_FAIL("OApplicationController::paste: invalid destination query container!"); - return sal_False; + return false; } // here we have everything needed to create a new query object ... @@ -698,7 +698,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS); if ( RET_OK != aAskForName.Execute() ) // cancelled by the user - return sal_False; + return false; sTargetName = aAskForName.getName(); } @@ -748,7 +748,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc } else OSL_TRACE("There should be a sequence in it!"); - return sal_True; + return true; } else if ( _rPasteData.has(daComponent) ) // forms or reports { @@ -762,7 +762,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc { DBG_UNHANDLED_EXCEPTION(); } - return sal_False; + return false; } Reference<XNameContainer> OApplicationController::getQueryDefintions() const @@ -793,7 +793,7 @@ void OApplicationController::getSupportedFormats(ElementType _eType,::std::vecto } } -sal_Bool OApplicationController::isTableFormat() const +bool OApplicationController::isTableFormat() const { return m_aTableCopyHelper.isTableFormat(getViewClipboard()); } diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index c15c149451dd..cb3cd70e7c8b 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -244,7 +244,7 @@ void OApplicationController::refreshTables() OSL_FAIL("Could not refresh tables!"); } - getContainer()->getDetailView()->clearPages(sal_False); + getContainer()->getDetailView()->clearPages(false); getContainer()->getDetailView()->createTablesPage( ensureConnection() ); } } @@ -260,12 +260,12 @@ void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& ::osl::MutexGuard aGuard( getMutex() ); if ( evt.PropertyName == PROPERTY_USER ) { - m_bNeedToReconnect = sal_True; + m_bNeedToReconnect = true; InvalidateFeature(SID_DB_APP_STATUS_USERNAME); } else if ( evt.PropertyName == PROPERTY_URL ) { - m_bNeedToReconnect = sal_True; + m_bNeedToReconnect = true; InvalidateFeature(SID_DB_APP_STATUS_DBNAME); InvalidateFeature(SID_DB_APP_STATUS_TYPE); InvalidateFeature(SID_DB_APP_STATUS_HOSTNAME); @@ -529,8 +529,8 @@ void OApplicationController::askToReconnect() { if ( m_bNeedToReconnect ) { - m_bNeedToReconnect = sal_False; - sal_Bool bClear = sal_True; + m_bNeedToReconnect = false; + bool bClear = true; if ( !m_pSubComponentManager->empty() ) { QueryBox aQry(getView(), ModuleRes(APP_CLOSEDOCUMENTS)); @@ -540,7 +540,7 @@ void OApplicationController::askToReconnect() closeSubComponents(); break; default: - bClear = sal_False; + bClear = false; break; } } @@ -548,7 +548,7 @@ void OApplicationController::askToReconnect() { ElementType eType = getContainer()->getElementType(); disconnect(); - getContainer()->getDetailView()->clearPages(sal_False); + getContainer()->getDetailView()->clearPages(false); getContainer()->selectContainer(E_NONE); // invalidate the old selection m_eCurrentType = E_NONE; getContainer()->selectContainer(eType); // reselect the current one again @@ -603,7 +603,7 @@ void OApplicationController::onDocumentOpened( const OUString& _rName, const sal } } -sal_Bool OApplicationController::insertHierachyElement(ElementType _eType,const OUString& _sParentFolder,sal_Bool _bCollection,const Reference<XContent>& _xContent,sal_Bool _bMove) +bool OApplicationController::insertHierachyElement(ElementType _eType, const OUString& _sParentFolder, bool _bCollection, const Reference<XContent>& _xContent, bool _bMove) { Reference<XHierarchicalNameContainer> xNames(getElements(_eType), UNO_QUERY); return dbaui::insertHierachyElement(getView() @@ -616,17 +616,17 @@ sal_Bool OApplicationController::insertHierachyElement(ElementType _eType,const ,_bMove); } -sal_Bool OApplicationController::isRenameDeleteAllowed(ElementType _eType,sal_Bool _bDelete) const +bool OApplicationController::isRenameDeleteAllowed(ElementType _eType, bool _bDelete) const { ElementType eType = getContainer()->getElementType(); - sal_Bool bEnabled = !isDataSourceReadOnly() && eType == _eType; + bool bEnabled = !isDataSourceReadOnly() && eType == _eType; if ( bEnabled ) { if ( E_TABLE == eType ) bEnabled = !isConnectionReadOnly() && getContainer()->isALeafSelected(); - sal_Bool bCompareRes = sal_False; + bool bCompareRes = false; if ( _bDelete ) bCompareRes = getContainer()->getSelectionCount() > 0; else @@ -646,7 +646,7 @@ sal_Bool OApplicationController::isRenameDeleteAllowed(ElementType _eType,sal_Bo } catch(Exception&) { - bEnabled = sal_False; + bEnabled = false; } } } diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 7f3af39b8326..3936c68a7449 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -128,7 +128,7 @@ namespace class OTablePreviewWindow : public Window { DECL_LINK(OnDisableInput, void*); - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; public: @@ -137,7 +137,7 @@ namespace }; OTablePreviewWindow::OTablePreviewWindow(Window* pParent, WinBits nStyle) : Window( pParent, nStyle) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } bool OTablePreviewWindow::Notify( NotifyEvent& rNEvt ) { @@ -158,11 +158,11 @@ namespace if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } - void OTablePreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) + void OTablePreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) @@ -283,7 +283,7 @@ void OAppDetailPageHelper::sort(int _nPos,SvSortMode _eSortMode ) pModel->Resort(); } -sal_Bool OAppDetailPageHelper::isSortUp() const +bool OAppDetailPageHelper::isSortUp() const { SvSortMode eSortMode = SortNone; int nPos = getVisibleControlIndex(); @@ -512,19 +512,19 @@ sal_Int32 OAppDetailPageHelper::getElementCount() return nCount; } -sal_Bool OAppDetailPageHelper::isCutAllowed() +bool OAppDetailPageHelper::isCutAllowed() { - return sal_False; + return false; } -sal_Bool OAppDetailPageHelper::isCopyAllowed() +bool OAppDetailPageHelper::isCopyAllowed() { - return sal_True; + return true; } -sal_Bool OAppDetailPageHelper::isPasteAllowed() +bool OAppDetailPageHelper::isPasteAllowed() { - return sal_True; + return true; } void OAppDetailPageHelper::copy() @@ -555,10 +555,10 @@ bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry) const return true; } -sal_Bool OAppDetailPageHelper::isALeafSelected() const +bool OAppDetailPageHelper::isALeafSelected() const { int nPos = getVisibleControlIndex(); - sal_Bool bLeafSelected = sal_False; + bool bLeafSelected = false; if ( nPos < E_ELEMENT_TYPE_COUNT ) { DBTreeListBox& rTree = *m_pLists[nPos]; @@ -683,7 +683,7 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow) pCurrent->Hide(); showPreview(NULL); - sal_Bool bHasFocus = sal_False; + bool bHasFocus = false; m_aFL.Show(); { bHasFocus = pCurrent->HasChildPathFocus(); @@ -691,7 +691,7 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow) } m_aTBPreview.Show(); m_aBorder.Show(); - switchPreview(m_ePreviewMode,sal_True); + switchPreview(m_ePreviewMode,true); if ( bHasFocus ) _pWindow->GrabFocus(); @@ -797,7 +797,7 @@ void OAppDetailPageHelper::clearPages() } } -sal_Bool OAppDetailPageHelper::isFilled() const +bool OAppDetailPageHelper::isFilled() const { size_t i = 0; for (; i < E_ELEMENT_TYPE_COUNT && !m_pLists[i]; ++i) @@ -993,12 +993,12 @@ PreviewMode OAppDetailPageHelper::getPreviewMode() return m_ePreviewMode; } -sal_Bool OAppDetailPageHelper::isPreviewEnabled() +bool OAppDetailPageHelper::isPreviewEnabled() { return m_ePreviewMode != E_PREVIEWNONE; } -void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce) +void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,bool _bForce) { if ( m_ePreviewMode != _eMode || _bForce ) { @@ -1107,7 +1107,7 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent) void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName, const OUString& _sName, - sal_Bool _bTable) + bool _bTable) { if ( isPreviewEnabled() ) { @@ -1153,7 +1153,7 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName, aArgs.put( (OUString)PROPERTY_SHOWMENU, sal_False ); Reference< XController > xPreview( pDispatcher->openExisting( makeAny( _sDataSourceName ), _sName, aArgs ), UNO_QUERY ); - sal_Bool bClearPreview = !xPreview.is(); + bool bClearPreview = !xPreview.is(); // clear the preview when the query or table could not be loaded if ( !bClearPreview ) @@ -1281,14 +1281,14 @@ void OAppDetailPageHelper::ImplInitSettings() OPreviewWindow::OPreviewWindow(Window* _pParent) : Window(_pParent) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } -sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); - sal_Bool bRet = sal_False; + bool bRet = false; if( aNewSize.Width() && aNewSize.Height() ) { @@ -1311,7 +1311,7 @@ sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rect ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); rResultRect = Rectangle( aNewPos, aNewSize ); - bRet = sal_True; + bRet = true; } return bRet; @@ -1340,12 +1340,12 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } -void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OPreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index f7702c3e269e..2f2a9f8104cc 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -61,8 +61,8 @@ namespace dbaui @return <TRUE/> when successful */ - sal_Bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; public: @@ -174,9 +174,9 @@ namespace dbaui virtual void Resize() SAL_OVERRIDE; virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; - sal_Bool isCutAllowed(); - sal_Bool isCopyAllowed(); - sal_Bool isPasteAllowed(); + bool isCutAllowed(); + bool isCopyAllowed(); + bool isPasteAllowed(); void copy(); void cut(); void paste(); @@ -207,7 +207,7 @@ namespace dbaui void selectAll(); /// returns <TRUE/> if it sorts ascending - sal_Bool isSortUp() const; + bool isSortUp() const; /// sorts all entries ascending void sortDown(); @@ -271,7 +271,7 @@ namespace dbaui @return <TRUE/> if the entry is a leaf, otherwise <FALSE/> */ - sal_Bool isALeafSelected() const; + bool isALeafSelected() const; SvTreeListEntry* getEntry( const Point& _aPosPixel ) const; @@ -279,7 +279,7 @@ namespace dbaui void clearPages(); /// returns <TRUE/> when a detail page was filled - sal_Bool isFilled() const; + bool isFilled() const; /** adds a new object to the detail page. @param _eType @@ -324,7 +324,7 @@ namespace dbaui PreviewMode getPreviewMode(); /// <TRUE/> if the preview is enabled - sal_Bool isPreviewEnabled(); + bool isPreviewEnabled(); /** switches to the given preview mode @param _eMode @@ -332,7 +332,7 @@ namespace dbaui @param _bForce Force the preview to be resetted */ - void switchPreview(PreviewMode _eMode,sal_Bool _bForce = sal_False); + void switchPreview(PreviewMode _eMode,bool _bForce = false); /** shows the Preview of the content when it is enabled. @param _xContent @@ -351,7 +351,7 @@ namespace dbaui */ void showPreview( const OUString& _sDataSourceName, const OUString& _sName, - sal_Bool _bTable); + bool _bTable); protected: void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 61dd85d40505..16ff6de6acd9 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -359,7 +359,7 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView m_aCreation.SetDefaultCollapsedEntryBmp( aFolderImage ); m_aCreation.SetDefaultExpandedEntryBmp( aFolderImage ); - ImplInitSettings(sal_True,sal_True,sal_True); + ImplInitSettings(true,true,true); } OTasksWindow::~OTasksWindow() @@ -374,12 +374,12 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } -void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) @@ -521,14 +521,14 @@ void OTasksWindow::Clear() // class OApplicationDetailView -OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode) : OSplitterView(&_rParent,sal_False ) +OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode) : OSplitterView(&_rParent,false ) ,m_aHorzSplitter(this) ,m_aTasks(this,STR_TASKS,WB_BORDER | WB_DIALOGCONTROL ) ,m_aContainer(this,0,WB_BORDER | WB_DIALOGCONTROL ) ,m_rBorderWin(_rParent) { SetUniqueId(UID_APP_DETAIL_VIEW); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); m_pControlHelper = new OAppDetailPageHelper(&m_aContainer,m_rBorderWin,_ePreviewMode); m_pControlHelper->Show(); @@ -561,7 +561,7 @@ OApplicationDetailView::~OApplicationDetailView() m_pControlHelper = NULL; } -void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) @@ -596,7 +596,7 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -740,12 +740,12 @@ OUString OApplicationDetailView::getQualifiedName( SvTreeListEntry* _pEntry ) co return m_pControlHelper->getQualifiedName( _pEntry ); } -sal_Bool OApplicationDetailView::isLeaf(SvTreeListEntry* _pEntry) const +bool OApplicationDetailView::isLeaf(SvTreeListEntry* _pEntry) const { return m_pControlHelper->isLeaf(_pEntry); } -sal_Bool OApplicationDetailView::isALeafSelected() const +bool OApplicationDetailView::isALeafSelected() const { return m_pControlHelper->isALeafSelected(); } @@ -765,7 +765,7 @@ void OApplicationDetailView::sortUp() m_pControlHelper->sortUp(); } -sal_Bool OApplicationDetailView::isFilled() const +bool OApplicationDetailView::isFilled() const { return m_pControlHelper->isFilled(); } @@ -775,7 +775,7 @@ ElementType OApplicationDetailView::getElementType() const return m_pControlHelper->getElementType(); } -void OApplicationDetailView::clearPages(sal_Bool _bTaskAlso) +void OApplicationDetailView::clearPages(bool _bTaskAlso) { if ( _bTaskAlso ) getTasksWindow().Clear(); @@ -817,17 +817,17 @@ SvTreeListEntry* OApplicationDetailView::getEntry( const Point& _aPoint ) const return m_pControlHelper->getEntry(_aPoint); } -sal_Bool OApplicationDetailView::isCutAllowed() +bool OApplicationDetailView::isCutAllowed() { return m_pControlHelper->isCutAllowed(); } -sal_Bool OApplicationDetailView::isCopyAllowed() +bool OApplicationDetailView::isCopyAllowed() { return m_pControlHelper->isCopyAllowed(); } -sal_Bool OApplicationDetailView::isPasteAllowed() { return m_pControlHelper->isPasteAllowed(); } +bool OApplicationDetailView::isPasteAllowed() { return m_pControlHelper->isPasteAllowed(); } void OApplicationDetailView::copy() { m_pControlHelper->copy(); } @@ -860,7 +860,7 @@ PreviewMode OApplicationDetailView::getPreviewMode() return m_pControlHelper->getPreviewMode(); } -sal_Bool OApplicationDetailView::isPreviewEnabled() +bool OApplicationDetailView::isPreviewEnabled() { return m_pControlHelper->isPreviewEnabled(); } @@ -877,12 +877,12 @@ void OApplicationDetailView::showPreview(const Reference< XContent >& _xContent) void OApplicationDetailView::showPreview( const OUString& _sDataSourceName, const OUString& _sName, - sal_Bool _bTable) + bool _bTable) { m_pControlHelper->showPreview(_sDataSourceName,_sName,_bTable); } -sal_Bool OApplicationDetailView::isSortUp() const +bool OApplicationDetailView::isSortUp() const { return m_pControlHelper->isSortUp(); } diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 5c511ca961e8..c11b07b9a955 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -118,7 +118,7 @@ namespace dbaui OApplicationDetailView* m_pDetailView; DECL_LINK( OnEntrySelectHdl, SvTreeListBox* ); - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; public: @@ -152,7 +152,7 @@ namespace dbaui ::std::vector< TaskPaneData > m_aTaskPaneData; MnemonicGenerator m_aExternalMnemonics; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; @@ -190,10 +190,10 @@ namespace dbaui inline OAppBorderWindow& getBorderWin() const { return m_rBorderWin; } inline OTasksWindow& getTasksWindow() const { return *static_cast< OTasksWindow* >( m_aTasks.getChildWindow() ); } - sal_Bool isCutAllowed() SAL_OVERRIDE ; - sal_Bool isCopyAllowed() SAL_OVERRIDE ; - sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + bool isCutAllowed() SAL_OVERRIDE ; + bool isCopyAllowed() SAL_OVERRIDE ; + bool isPasteAllowed() SAL_OVERRIDE; + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } void copy() SAL_OVERRIDE; void cut() SAL_OVERRIDE; void paste() SAL_OVERRIDE; @@ -213,20 +213,20 @@ namespace dbaui @return <TRUE/> if the entry is a leaf, otherwise <FALSE/> */ - sal_Bool isLeaf(SvTreeListEntry* _pEntry) const; + bool isLeaf(SvTreeListEntry* _pEntry) const; /** returns if one of the selected entries is a leaf @return <TRUE/> if the entry is a leaf, otherwise <FALSE/> */ - sal_Bool isALeafSelected() const; + bool isALeafSelected() const; /** select all entries in the detail page */ void selectAll(); /// returns <TRUE/> if it sorts ascending - sal_Bool isSortUp() const; + bool isSortUp() const; /// sort the entries in the detail page down void sortDown(); @@ -235,7 +235,7 @@ namespace dbaui void sortUp(); /// returns <TRUE/> when a detail page was filled - sal_Bool isFilled() const; + bool isFilled() const; /// return the element of currently select entry ElementType getElementType() const; @@ -244,7 +244,7 @@ namespace dbaui @param _bTaskAlso If <TRUE/> the task window will also be cleared. */ - void clearPages(sal_Bool _bTaskAlso = sal_True); + void clearPages(bool _bTaskAlso = true); /// returns the count of entries sal_Int32 getElementCount(); @@ -323,7 +323,7 @@ namespace dbaui PreviewMode getPreviewMode(); /// <TRUE/> if the preview is enabled - sal_Bool isPreviewEnabled(); + bool isPreviewEnabled(); /** switches to the given preview mode @param _eMode @@ -348,7 +348,7 @@ namespace dbaui */ void showPreview( const OUString& _sDataSourceName, const OUString& _sName, - sal_Bool _bTable); + bool _bTable); SvTreeListEntry* getEntry( const Point& _aPoint ) const; diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 05253c24c217..9fe2900c0f3c 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -43,7 +43,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind ,m_rBorderWin( _rBorderWindow ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); m_aIconControl.SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl)); m_aIconControl.setControlActionListener( &m_rBorderWin.getView()->getAppController() ); @@ -69,7 +69,7 @@ void OApplicationSwapWindow::Resize() m_aIconControl.ArrangeIcons(); } -void OApplicationSwapWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) @@ -99,7 +99,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index bc24248e09a5..2282039f9995 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -34,7 +34,7 @@ namespace dbaui ElementType m_eLastType; OAppBorderWindow& m_rBorderWin; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); DECL_LINK( OnContainerSelectHdl, SvtIconChoiceCtrl* ); DECL_LINK( ChangeToLastSelected, void* ); @@ -46,10 +46,10 @@ namespace dbaui // window overloads virtual void Resize() SAL_OVERRIDE; - sal_Bool isCutAllowed() SAL_OVERRIDE { return sal_False; } - sal_Bool isCopyAllowed() SAL_OVERRIDE { return sal_False; } - sal_Bool isPasteAllowed() SAL_OVERRIDE { return sal_False; } - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + bool isCutAllowed() SAL_OVERRIDE { return false; } + bool isCopyAllowed() SAL_OVERRIDE { return false; } + bool isPasteAllowed() SAL_OVERRIDE { return false; } + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } void copy() SAL_OVERRIDE { } void cut() SAL_OVERRIDE { } void paste() SAL_OVERRIDE { } diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index 0e66f97e02d4..0e652e0c5945 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -27,7 +27,7 @@ namespace dbaui { -OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift) +OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,bool _bShift) : Window(_pParent,_nBits | WB_DIALOGCONTROL) , m_aSpace1(this) , m_aSpace2(this) @@ -38,7 +38,7 @@ OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits, setTitle(_nTitleId); SetBorderStyle(WINDOW_BORDER_MONO); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle }; for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) @@ -120,12 +120,12 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } -void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { AllSettings aAllSettings = GetSettings(); StyleSettings aStyle = aAllSettings.GetStyleSettings(); diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx index 45d8815fb6ec..0f1bedafd939 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.hxx +++ b/dbaccess/source/ui/app/AppTitleWindow.hxx @@ -29,12 +29,12 @@ namespace dbaui FixedText m_aSpace2; FixedText m_aTitle; Window* m_pChild; - sal_Bool m_bShift; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + bool m_bShift; + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; public: - OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift = sal_True); + OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,bool _bShift = true); virtual ~OTitleWindow(); // window overloads diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index f4df7c5a4f3a..08645950ed65 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -68,7 +68,7 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev SetBorderStyle(WINDOW_BORDER_MONO); - m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | WB_DIALOGCONTROL ,sal_False); + m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | WB_DIALOGCONTROL, false); m_pPanel->SetBorderStyle(WINDOW_BORDER_MONO); OApplicationSwapWindow* pSwap = new OApplicationSwapWindow( m_pPanel, *this ); pSwap->Show(); @@ -302,19 +302,19 @@ IClipboardTest* OApplicationView::getActiveChild() const return pTest; } -sal_Bool OApplicationView::isCopyAllowed() +bool OApplicationView::isCopyAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCopyAllowed(); } -sal_Bool OApplicationView::isCutAllowed() +bool OApplicationView::isCutAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCutAllowed(); } -sal_Bool OApplicationView::isPasteAllowed() +bool OApplicationView::isPasteAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isPasteAllowed(); @@ -347,13 +347,13 @@ OUString OApplicationView::getQualifiedName( SvTreeListEntry* _pEntry ) const return getDetailView()->getQualifiedName( _pEntry ); } -sal_Bool OApplicationView::isLeaf(SvTreeListEntry* _pEntry) const +bool OApplicationView::isLeaf(SvTreeListEntry* _pEntry) const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isLeaf(_pEntry); } -sal_Bool OApplicationView::isALeafSelected() const +bool OApplicationView::isALeafSelected() const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isALeafSelected(); @@ -365,7 +365,7 @@ void OApplicationView::selectAll() getDetailView()->selectAll(); } -sal_Bool OApplicationView::isSortUp() const +bool OApplicationView::isSortUp() const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isSortUp(); @@ -383,7 +383,7 @@ void OApplicationView::sortUp() getDetailView()->sortUp(); } -sal_Bool OApplicationView::isFilled() const +bool OApplicationView::isFilled() const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isFilled(); @@ -451,7 +451,7 @@ void OApplicationView::elementReplaced(ElementType _eType getDetailView()->elementReplaced(_eType, _rOldName, _rNewName ); } -void OApplicationView::clearPages(sal_Bool _bTaskAlso) +void OApplicationView::clearPages(bool _bTaskAlso) { OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF"); getPanel()->clearSelection(); @@ -477,7 +477,7 @@ PreviewMode OApplicationView::getPreviewMode() return getDetailView()->getPreviewMode(); } -sal_Bool OApplicationView::isPreviewEnabled() +bool OApplicationView::isPreviewEnabled() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isPreviewEnabled(); @@ -500,7 +500,7 @@ void OApplicationView::showPreview(const Reference< XContent >& _xContent) void OApplicationView::showPreview( const OUString& _sDataSourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, const OUString& _sName, - sal_Bool _bTable) + bool _bTable) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); if ( isPreviewEnabled() ) diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx index f59879d888b6..43660890f693 100644 --- a/dbaccess/source/ui/app/AppView.hxx +++ b/dbaccess/source/ui/app/AppView.hxx @@ -118,10 +118,10 @@ namespace dbaui inline const ::com::sun::star::lang::Locale& getLocale() const { return m_aLocale;} // IClipboardTest - virtual sal_Bool isCutAllowed() SAL_OVERRIDE; - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE; - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + virtual bool isCutAllowed() SAL_OVERRIDE; + virtual bool isCopyAllowed() SAL_OVERRIDE; + virtual bool isPasteAllowed() SAL_OVERRIDE; + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } virtual void copy() SAL_OVERRIDE; virtual void cut() SAL_OVERRIDE; virtual void paste() SAL_OVERRIDE; @@ -146,20 +146,20 @@ namespace dbaui @return <TRUE/> if the entry is a leaf, otherwise <FALSE/> */ - sal_Bool isLeaf(SvTreeListEntry* _pEntry) const; + bool isLeaf(SvTreeListEntry* _pEntry) const; /** returns if one of the selected entries is a leaf @return <TRUE/> if the entry is a leaf, otherwise <FALSE/> */ - sal_Bool isALeafSelected() const; + bool isALeafSelected() const; /** select all entries in the detail page */ void selectAll(); /// returns <TRUE/> if it sorts ascending - sal_Bool isSortUp() const; + bool isSortUp() const; /// sort the entries in the detail page down void sortDown(); @@ -168,7 +168,7 @@ namespace dbaui void sortUp(); /// returns <TRUE/> when a detail page was filled - sal_Bool isFilled() const; + bool isFilled() const; /// return the element of currently select entry ElementType getElementType() const; @@ -183,7 +183,7 @@ namespace dbaui @param _bTaskAlso If <TRUE/> the task window will also be cleared. */ - void clearPages(sal_Bool _bTaskAlso = sal_True); + void clearPages(bool _bTaskAlso = true); /** returns the element names which are selected @param _rNames @@ -262,7 +262,7 @@ namespace dbaui PreviewMode getPreviewMode(); /// <TRUE/> if the preview is enabled - sal_Bool isPreviewEnabled(); + bool isPreviewEnabled(); /** switches to the given preview mode @param _eMode @@ -290,7 +290,7 @@ namespace dbaui void showPreview( const OUString& _sDataSourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, const OUString& _sName, - sal_Bool _bTable); + bool _bTable); SvTreeListEntry* getEntry( const Point& _aPosPixel ) const; }; diff --git a/dbaccess/source/ui/app/IApplicationController.hxx b/dbaccess/source/ui/app/IApplicationController.hxx index 47de9268cc07..8e17c4b07501 100644 --- a/dbaccess/source/ui/app/IApplicationController.hxx +++ b/dbaccess/source/ui/app/IApplicationController.hxx @@ -49,7 +49,7 @@ namespace dbaui @return <TRUE/> if the cotainer could be changed otherwise <FALSE/> */ - virtual sal_Bool onContainerSelect(ElementType _eType) = 0; + virtual bool onContainerSelect(ElementType _eType) = 0; /** called when an entry in a tree view has been selected @param _pEntry diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 23f6cc849b01..17f21dfe2b20 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -424,7 +424,7 @@ namespace dbaui return aComponents; } - sal_Bool SubComponentManager::closeSubComponents() + bool SubComponentManager::closeSubComponents() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_pData->getMutex() ); diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx index 1f644e2a62c4..33e7711865e2 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.hxx +++ b/dbaccess/source/ui/app/subcomponentmanager.hxx @@ -56,7 +56,7 @@ namespace dbaui // XDatabaseDocumentUI helpers ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> > getSubComponents() const; - sal_Bool closeSubComponents(); + bool closeSubComponents(); // container access void onSubComponentOpened( diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 1a9e93740bec..3c98652ae366 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -104,9 +104,9 @@ using namespace ::svt; #define HANDLE_SQL_ERRORS( action, successflag, context, message ) \ try \ { \ - successflag = sal_False; \ + successflag = false; \ action; \ - successflag = sal_True; \ + successflag = true; \ } \ catch(SQLException& e) \ { \ @@ -542,7 +542,7 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun ,m_sModuleIdentifier( OUString( "com.sun.star.sdb.DataSourceBrowser" ) ) ,m_pFormControllerImpl(NULL) ,m_nFormActionNestingLevel(0) - ,m_bLoadCanceled( sal_False ) + ,m_bLoadCanceled( false ) ,m_bCannotSelectUnfiltered( true ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SbaXDataBrowserController" ); @@ -601,7 +601,7 @@ void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _rxLoadable ) { - m_bLoadCanceled = sal_False; + m_bLoadCanceled = false; m_bCannotSelectUnfiltered = false; Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY ); @@ -620,7 +620,7 @@ void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLEx } } -sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable ) +bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloadForm" ); WaitObject aWO(getBrowserView()); @@ -833,11 +833,11 @@ bool SbaXDataBrowserController::Construct(Window* pParent) return LoadForm(); } -sal_Bool SbaXDataBrowserController::LoadForm() +bool SbaXDataBrowserController::LoadForm() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::LoadForm" ); reloadForm( m_xLoadable ); - return sal_True; + return true; } void SbaXDataBrowserController::AddColumnListener(const Reference< XPropertySet > & /*xCol*/) @@ -1099,7 +1099,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t && !::comphelper::getBOOL(evt.NewValue) ) { // -> the current field isn't modified anymore, too - setCurrentModified( sal_False ); + setCurrentModified( false ); } // switching to a new record ? @@ -1140,7 +1140,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t void SbaXDataBrowserController::modified(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException, std::exception ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::modified" ); - setCurrentModified( sal_True ); + setCurrentModified( true ); } void SbaXDataBrowserController::elementInserted(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException, std::exception ) @@ -1185,7 +1185,7 @@ sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( Runtim m_aAsyncDisplayError.CancelCall(); m_aAsyncInvalidateAll.CancelCall(); - sal_Bool bSuccess = SaveModified(); + bool bSuccess = SaveModified(); return bSuccess; } @@ -1411,7 +1411,7 @@ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObje SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::resetted" ); OSL_ENSURE(rEvent.Source == getControlModel(), "SbaXDataBrowserController::resetted : where did this come from ?"); (void)rEvent; - setCurrentModified( sal_False ); + setCurrentModified( false ); } sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception ) @@ -1463,8 +1463,8 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const case ID_BROWSER_INSERT_ROW: { // check if it is available - sal_Bool bInsertPrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0; - sal_Bool bAllowInsertions = sal_True; + bool bInsertPrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0; + bool bAllowInsertions = true; try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); @@ -1480,10 +1480,10 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const case SID_FM_DELETEROWS: { // check if it is available - sal_Bool bDeletePrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0; - sal_Bool bAllowDeletions = sal_True; + bool bDeletePrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0; + bool bAllowDeletions = true; sal_Int32 nRowCount = 0; - sal_Bool bInsertionRow = sal_False; + bool bInsertionRow = false; try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); @@ -1513,8 +1513,8 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const if (xCurrentController.Is() && xCurrentController->ISA(EditCellController)) { Edit& rEdit = (Edit&)xCurrentController->GetWindow(); - sal_Bool bHasLen = (rEdit.GetSelection().Len() != 0); - sal_Bool bIsReadOnly = rEdit.IsReadOnly(); + bool bHasLen = (rEdit.GetSelection().Len() != 0); + bool bIsReadOnly = rEdit.IsReadOnly(); switch (nId) { case ID_BROWSER_CUT: aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen && !bIsReadOnly; break; @@ -1604,9 +1604,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const break; // no datasource -> no edit mode sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES)); - sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts")); - sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates")); - sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes")); + bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts")); + bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates")); + bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes")); if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible) break; // no insert/update/delete -> no edit mode @@ -1660,7 +1660,7 @@ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,cons } sal_uInt16 nPos = getCurrentColumnPosition(); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { xFormSet->setPropertyValue(PROPERTY_ORDER, makeAny(_xParser->getOrder())); @@ -1690,7 +1690,7 @@ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,cons setCurrentColumnPosition(nPos); } -void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, sal_Bool _bOldFilterApplied,const ::OUString& _sOldHaving,const Reference< XSingleSelectQueryComposer >& _xParser) +void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, bool _bOldFilterApplied,const ::OUString& _sOldHaving,const Reference< XSingleSelectQueryComposer >& _xParser) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::applyParserFilter" ); Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); @@ -1702,7 +1702,7 @@ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, s sal_uInt16 nPos = getCurrentColumnPosition(); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { FormErrorHelper aError(this); @@ -1782,7 +1782,7 @@ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_ return xComposer; } -void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) +void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ExecuteFilterSortCrit" ); if (!SaveModified()) @@ -1826,7 +1826,7 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) } OUString sNewVal = bFilter ? xParser->getFilter() : xParser->getOrder(); - sal_Bool bOldFilterApplied(sal_False); + bool bOldFilterApplied(false); if (bFilter) { try { bOldFilterApplied = ::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_APPLYFILTER)); } catch(Exception&) { } ; @@ -1906,7 +1906,7 @@ void SbaXDataBrowserController::ExecuteSearch() void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& _rArgs) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::Execute" ); - sal_Bool bSortUp = sal_True; + bool bSortUp = true; switch (nId) { @@ -1951,7 +1951,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property if (SaveModified()) { Reference< XPropertySet > xActiveSet(getRowSet(), UNO_QUERY); - sal_Bool bApplied = ::comphelper::getBOOL(xActiveSet->getPropertyValue(PROPERTY_APPLYFILTER)); + bool bApplied = ::comphelper::getBOOL(xActiveSet->getPropertyValue(PROPERTY_APPLYFILTER)); xActiveSet->setPropertyValue(PROPERTY_APPLYFILTER, ::comphelper::makeBoolAny(!bApplied)); reloadForm(m_xLoadable); } @@ -2017,7 +2017,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property break; case ID_BROWSER_SORTDOWN: - bSortUp = sal_False; + bSortUp = false; // DON'T break case ID_BROWSER_SORTUP: { @@ -2034,7 +2034,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property Reference< XSingleSelectQueryComposer > xParser = createParser_nothrow(); const OUString sOldSort = xParser->getOrder(); - sal_Bool bParserSuccess = sal_False; + bool bParserSuccess = false; HANDLE_SQL_ERRORS( xParser->setOrder(OUString()); xParser->appendOrderByColumn(xField, bSortUp), bParserSuccess, @@ -2060,7 +2060,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property break; // check if the column is a aggregate function - sal_Bool bHaving = sal_False; + bool bHaving = false; OUString sName; xField->getPropertyValue(PROPERTY_NAME) >>= sName; Reference< XColumnsSupplier > xColumnsSupplier(m_xParser, UNO_QUERY); @@ -2078,7 +2078,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property const OUString sOldHaving = xParser->getHavingClause(); Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); - sal_Bool bApplied = ::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_APPLYFILTER)); + bool bApplied = ::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_APPLYFILTER)); // do we have a filter but it's not applied ? // -> completely overwrite it, else append one if (!bApplied) @@ -2086,7 +2086,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property DO_SAFE( (bHaving ? xParser->setHavingClause(OUString()) : xParser->setFilter(::OUString())), "SbaXDataBrowserController::Execute : caught an exception while resetting the new filter !" ); } - sal_Bool bParserSuccess = sal_False; + bool bParserSuccess = false; const sal_Int32 nOp = SQLFilterOperator::EQUAL; @@ -2118,11 +2118,11 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property break; case ID_BROWSER_ORDERCRIT: - ExecuteFilterSortCrit(sal_False); + ExecuteFilterSortCrit(false); break; case ID_BROWSER_FILTERCRIT: - ExecuteFilterSortCrit(sal_True); + ExecuteFilterSortCrit(true); InvalidateFeature(ID_BROWSER_FILTERED); break; @@ -2131,7 +2131,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property if (!SaveModified()) break; - sal_Bool bNeedPostReload = preReloadForm(); + bool bNeedPostReload = preReloadForm(); // reset the filter and the sort property simutaneously so only _one_ new statement has to be // sent Reference< XPropertySet > xSet(getRowSet(), UNO_QUERY); @@ -2165,7 +2165,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property case ID_BROWSER_SAVERECORD: if ( SaveModified( sal_False ) ) - setCurrentModified( sal_False ); + setCurrentModified( false ); break; case ID_BROWSER_UNDORECORD: @@ -2198,12 +2198,12 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property { } - setCurrentModified( sal_False ); + setCurrentModified( false ); } } } -sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) +bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SaveModified" ); if ( bAskFor && GetState(ID_BROWSER_SAVERECORD).bEnabled ) @@ -2216,17 +2216,17 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) { case RET_NO: Execute(ID_BROWSER_UNDORECORD,Sequence<PropertyValue>()); - return sal_True; + return true; case RET_CANCEL: - return sal_False; + return false; } } if ( !CommitCurrent() ) // das aktuelle Control committen lassen - return sal_False; + return false; Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); - sal_Bool bResult = sal_False; + bool bResult = false; try { if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ISMODIFIED))) @@ -2237,7 +2237,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) else xCursor->updateRow(); } - bResult = sal_True; + bResult = true; } catch(SQLException&) { @@ -2245,7 +2245,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) catch(Exception&) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::SaveModified : could not save the current record !"); - bResult = sal_False; + bResult = false; } InvalidateFeature(ID_BROWSER_SAVERECORD); @@ -2253,15 +2253,15 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) return bResult; } -sal_Bool SbaXDataBrowserController::CommitCurrent() +bool SbaXDataBrowserController::CommitCurrent() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CommitCurrent" ); if (!getBrowserView()) - return sal_True; + return true; Reference< ::com::sun::star::awt::XControl > xActiveControl(getBrowserView()->getGridControl()); Reference< ::com::sun::star::form::XBoundControl > xLockingTest(xActiveControl, UNO_QUERY); - sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock(); + bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock(); if (xActiveControl.is() && !bControlIsLocked) { // zunaechst das Control fragen ob es das IFace unterstuetzt @@ -2269,12 +2269,12 @@ sal_Bool SbaXDataBrowserController::CommitCurrent() if (!xBoundControl.is()) xBoundControl = Reference< ::com::sun::star::form::XBoundComponent > (xActiveControl->getModel(), UNO_QUERY); if (xBoundControl.is() && !xBoundControl->commit()) - return sal_False; + return false; } - return sal_True; + return true; } -void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet ) +void SbaXDataBrowserController::setCurrentModified( bool _bSet ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setCurrentModified" ); m_bCurrentlyModified = _bSet; @@ -2285,7 +2285,7 @@ void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet ) void SbaXDataBrowserController::RowChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::RowChanged" ); - setCurrentModified( sal_False ); + setCurrentModified( false ); } void SbaXDataBrowserController::ColumnChanged() @@ -2298,7 +2298,7 @@ void SbaXDataBrowserController::ColumnChanged() InvalidateFeature(ID_BROWSER_AUTOFILTER); InvalidateFeature(ID_BROWSER_REMOVEFILTER); - setCurrentModified( sal_False ); + setCurrentModified( false ); } void SbaXDataBrowserController::SelectionChanged() @@ -2624,22 +2624,22 @@ void SbaXDataBrowserController::leaveFormAction() m_aAsyncDisplayError.Call(); } -sal_Bool SbaXDataBrowserController::isLoaded() const +bool SbaXDataBrowserController::isLoaded() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isLoaded" ); return m_xLoadable.is() && m_xLoadable->isLoaded(); } -sal_Bool SbaXDataBrowserController::isValidCursor() const +bool SbaXDataBrowserController::isValidCursor() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isValidCursor" ); if (!m_xColumnsSupplier.is()) - return sal_False; + return false; Reference< ::com::sun::star::container::XNameAccess > xCols = m_xColumnsSupplier->getColumns(); if (!xCols.is() || !xCols->hasElements()) - return sal_False; + return false; - sal_Bool bIsValid = !(m_xRowSet->isBeforeFirst() || m_xRowSet->isAfterLast()); + bool bIsValid = !(m_xRowSet->isBeforeFirst() || m_xRowSet->isAfterLast()); if ( !bIsValid ) { Reference<XPropertySet> xProp(m_xRowSet,UNO_QUERY); @@ -2710,10 +2710,10 @@ void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun:: } } -sal_Bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & /*xGrid*/) +bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & /*xGrid*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::InitializeGridModel" ); - return sal_True; + return true; } } // namespace dbaui diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index ea2d4d6dadf3..f348dc678810 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -42,14 +42,14 @@ using namespace ::com::sun::star::lang; namespace { - sal_Bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView) + bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView) { - sal_Bool bGrabFocus = sal_False; + bool bGrabFocus = false; SbaGridControl* pVclControl = _pView->getVclControl(); Reference< ::com::sun::star::awt::XControl > xGrid = _pView->getGridControl(); if (pVclControl && xGrid.is()) { - bGrabFocus = sal_True; + bGrabFocus = true; if(!pVclControl->HasChildPathFocus()) { Reference<XChild> xChild(xGrid->getModel(),UNO_QUERY); @@ -284,7 +284,7 @@ void UnoDataBrowserView::GetFocus() m_pTreeView->GrabFocus(); else if (m_pVclControl && m_xGrid.is()) { - sal_Bool bGrabFocus = sal_False; + bool bGrabFocus = false; if(!m_pVclControl->HasChildPathFocus()) { bGrabFocus = isGrabVclControlFocusAllowed(this); @@ -307,7 +307,7 @@ bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) bool nDone = false; if(rNEvt.GetType() == EVENT_KEYINPUT) { - sal_Bool bGrabAllowed = isGrabVclControlFocusAllowed(this); + bool bGrabAllowed = isGrabVclControlFocusAllowed(this); if ( bGrabAllowed ) { const KeyEvent* pKeyEvt = rNEvt.GetKeyEvent(); diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 9a0fd8201062..e2cdbbba4395 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -93,7 +93,7 @@ namespace dbaui ODataClipboard::ODataClipboard( const Reference< XPropertySet >& i_rAliveForm, const Sequence< Any >& i_rSelectedRows, - const sal_Bool i_bBookmarkSelection, + const bool i_bBookmarkSelection, const Reference< XComponentContext >& i_rORB ) :ODataAccessObjectTransferable( i_rAliveForm ) ,m_pHtml(NULL) diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index dcfd8af5bc16..fb5bae3b9f6c 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -191,7 +191,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU if ( sComponentURL == URL_COMPONENT_DATASOURCEBROWSER ) { - sal_Bool bDisableBrowser = ( sal_False == aLoadArgs.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name + bool bDisableBrowser = ( sal_False == aLoadArgs.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name || ( sal_False == aLoadArgs.getOrDefault( (OUString)PROPERTY_ENABLE_BROWSER, sal_True ) ); if ( bDisableBrowser ) @@ -210,7 +210,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU if ( sComponentURL == URL_COMPONENT_REPORTDESIGN ) { - sal_Bool bPreview = aLoadArgs.getOrDefault( "Preview", sal_False ); + bool bPreview = aLoadArgs.getOrDefault( "Preview", sal_False ); if ( bPreview ) { // report designs cannot be previewed if ( rListener.is() ) @@ -227,7 +227,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU } } - sal_Bool bSuccess = xController.is(); + bool bSuccess = xController.is(); Reference< XModel > xDatabaseDocument; if ( bSuccess ) { diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index 712613447aac..a73f5ed0b7cd 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -101,7 +101,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree return etQueryContainer; } -void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect) +void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, bool _bSelect) { SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; if (pTextItem) @@ -114,7 +114,7 @@ void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect) } } -void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelect) +void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, bool _bSelect) { while (_pEntry) { @@ -123,7 +123,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelec } } -sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const +bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const { SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; if (pTextItem) @@ -131,7 +131,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const else { OSL_FAIL("SbaTableQueryBrowser::isSelected: invalid entry!"); } - return sal_False; + return false; } void SbaTableQueryBrowser::SelectionChanged() diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index e4d02c99bd6a..ddb081a916c8 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -60,7 +60,7 @@ namespace dbaui using namespace ::dbtools; using namespace ::svx; - TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection ) + TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection ) { try { @@ -107,7 +107,7 @@ namespace dbaui Reference<XStorable> xStore; xStore = Reference<XStorable>( xChild.is() ? getDataSourceOrModel(xChild->getParent()) : Reference<XInterface>(),UNO_QUERY ); // check for the concrete type - if ( xStore.is() && !xStore->isReadonly() && ::std::find_if(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(E_TABLE,sal_True)) != _rFlavors.end()) + if ( xStore.is() && !xStore->isReadonly() && ::std::find_if(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(E_TABLE,true)) != _rFlavors.end()) return DND_ACTION_COPY; } } @@ -135,8 +135,8 @@ namespace dbaui m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.nType = E_TABLE; m_aAsyncDrop.nAction = _rEvt.mnAction; - m_aAsyncDrop.bError = sal_False; - m_aAsyncDrop.bHtml = sal_False; + m_aAsyncDrop.bError = false; + m_aAsyncDrop.bHtml = false; m_aAsyncDrop.pDroppedAt = NULL; m_aAsyncDrop.aUrl = OUString(); @@ -170,19 +170,19 @@ namespace dbaui return DND_ACTION_NONE; } - sal_Bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel ) + bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel ) { // get the affected list entry // ensure that the entry which the user clicked at is selected SvTreeListEntry* pHitEntry = m_pTreeView->getListBox().GetEntry( _rPosPixel ); if (!pHitEntry) // no drag of no entry was hit .... - return sal_False; + return false; // it must be a query/table EntryType eEntryType = getEntryType( pHitEntry ); if (!isObject(eEntryType)) - return DND_ACTION_NONE; + return false; TransferableHelper* pTransfer = implCopyObject( pHitEntry, ( etTableOrView == eEntryType ) ? CommandType::TABLE : CommandType::QUERY); Reference< XTransferable> xEnsureDelete = pTransfer; @@ -199,7 +199,7 @@ namespace dbaui copyEntry( pSelected ); return 0; } - sal_Bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const + bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const { EntryType eType = getEntryType(_pEntry); return ( eType == etTableOrView || eType == etQuery ); diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 9a450b637fb5..e7bf020c8d06 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -63,7 +63,7 @@ SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< ::com::sun:: :SbaXDataBrowserController(_rM) ,m_aModifyListeners(getMutex()) ,m_pDataSourceImpl(NULL) - ,m_bInQueryDispatch( sal_False ) + ,m_bInQueryDispatch( false ) { } @@ -106,16 +106,16 @@ Reference< XRowSet > SbaExternalSourceBrowser::CreateForm() return m_pDataSourceImpl; } -sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/) +bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/) { - return sal_True; + return true; } -sal_Bool SbaExternalSourceBrowser::LoadForm() +bool SbaExternalSourceBrowser::LoadForm() { // as we don't have a main form (yet), we have nothing to do // we don't call FormLoaded, because this expects a working data source - return sal_True; + return true; } void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException, std::exception ) @@ -143,21 +143,21 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U { if ( pArguments->Name == "ColumnType" ) { - sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const OUString*)0)); + bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const OUString*)0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnType\" !"); if (bCorrectType) sControlType = ::comphelper::getString(pArguments->Value); } else if ( pArguments->Name == "ColumnPosition" ) { - sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0)); + bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnPosition\" !"); if (bCorrectType) nControlPos = ::comphelper::getINT16(pArguments->Value); } else if ( pArguments->Name == "ColumnProperties" ) { - sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0)); + bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnProperties\" !"); if (bCorrectType) aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue(); @@ -244,7 +244,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows if (m_bInQueryDispatch) return xReturn; - m_bInQueryDispatch = sal_True; + m_bInQueryDispatch = true; if ( ( aURL.Complete == ".uno:FormSlots/AttachToForm" ) // attach a new external form @@ -287,7 +287,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows if (!xReturn.is()) xReturn = SbaXDataBrowserController::queryDispatch(aURL, aTargetFrameName, nSearchFlags); - m_bInQueryDispatch = sal_False; + m_bInQueryDispatch = false; return xReturn; } @@ -326,9 +326,9 @@ void SAL_CALL SbaExternalSourceBrowser::unloading(const ::com::sun::star::lang:: void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) { Any aOldPos; - sal_Bool bWasInsertRow = sal_False; - sal_Bool bBeforeFirst = sal_True; - sal_Bool bAfterLast = sal_True; + bool bWasInsertRow = false; + bool bBeforeFirst = true; + bool bAfterLast = true; Reference< XRowLocate > xCursor(xMaster, UNO_QUERY); Reference< XPropertySet > xMasterProps(xMaster, UNO_QUERY); diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index d59ac626d4bf..dd7d6f800222 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -444,7 +444,7 @@ namespace if ( !!_rFeatureState.sTitle ) _out_rStates.push_back( makeAny( *_rFeatureState.sTitle ) ); if ( !!_rFeatureState.bChecked ) - _out_rStates.push_back( makeAny( (sal_Bool)*_rFeatureState.bChecked ) ); + _out_rStates.push_back( makeAny( *_rFeatureState.bChecked ) ); if ( !!_rFeatureState.bInvisible ) _out_rStates.push_back( makeAny( Visibility( !*_rFeatureState.bInvisible ) ) ); if ( _rFeatureState.aValue.hasValue() ) @@ -464,7 +464,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, { // check if we really need to notify the listeners : this method may be called much more often than needed, so check // the cached state of the feature - sal_Bool bAlreadyCached = ( m_aStateCache.find(nFeat) != m_aStateCache.end() ); + bool bAlreadyCached = ( m_aStateCache.find(nFeat) != m_aStateCache.end() ); if ( bAlreadyCached ) if ( ( rCachedState.bEnabled == aFeatState.bEnabled ) && ( rCachedState.bChecked == aFeatState.bChecked ) @@ -542,7 +542,7 @@ void OGenericUnoController::InvalidateFeature_Impl() ++s_nRecursions; #endif - sal_Bool bEmpty = sal_True; + bool bEmpty = true; FeatureListener aNextFeature; { ::osl::MutexGuard aGuard( m_aFeatureMutex); @@ -610,7 +610,7 @@ void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Referen aListener.xListener = _xListener; aListener.bForceBroadcast = _bForceBroadcast; - sal_Bool bWasEmpty; + bool bWasEmpty; { ::osl::MutexGuard aGuard( m_aFeatureMutex ); bWasEmpty = m_aFeaturesToInvalidate.empty(); @@ -748,7 +748,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene { Dispatch::iterator iterSearch = m_arrStatusListener.begin(); - sal_Bool bRemoveForAll = _rURL.Complete.isEmpty(); + bool bRemoveForAll = _rURL.Complete.isEmpty(); while ( iterSearch != m_arrStatusListener.end() ) { DispatchTarget& rCurrent = *iterSearch; @@ -1231,7 +1231,7 @@ void OGenericUnoController::openHelpAgent(OUString const& _suHelpStringURL ) OUString sLanguage( "Language=" ); if (suURL.indexOf(sLanguage) == -1) { - AppendConfigToken(suURL, sal_False /* sal_False := add '&' */ ); + AppendConfigToken(suURL, false /* sal_False := add '&' */ ); } URL aURL; aURL.Complete = suURL; diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 29987bbadad2..1790b90779e4 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -583,10 +583,10 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt ) FmGridHeader::MouseButtonDown(_rMEvt); } -sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos) +bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos) { sal_uInt16 nId = GetItemId(_rMousePos); - sal_Bool bResizingCol = sal_False; + bool bResizingCol = false; if (HEADERBAR_ITEM_NOTFOUND != nId) { Rectangle aColRect = GetItemRect(nId); @@ -610,10 +610,10 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo _rMousePos.Y() - GetSizePixel().Height() ) ); - return sal_True; + return true; } - return sal_False; + return false; } void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu) @@ -621,7 +621,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM FmGridHeader::PreExecuteColumnContextMenu(nColId, rMenu); // some items are valid only if the db isn't readonly - sal_Bool bDBIsReadOnly = ((SbaGridControl*)GetParent())->IsReadOnlyDB(); + bool bDBIsReadOnly = ((SbaGridControl*)GetParent())->IsReadOnlyDB(); if (bDBIsReadOnly) { @@ -639,7 +639,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM } // prepend some new items - sal_Bool bColAttrs = (nColId != (sal_uInt16)-1) && (nColId != 0); + bool bColAttrs = (nColId != (sal_uInt16)-1) && (nColId != 0); if ( bColAttrs && !bDBIsReadOnly) { PopupMenu aNewItems(ModuleRes(RID_SBA_GRID_COLCTXMENU)); @@ -711,7 +711,7 @@ SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM, ,m_pMasterListener(NULL) ,m_nAsyncDropEvent(0) ,m_nCurrentActionColId((sal_uInt16)-1) - ,m_bActivatingForDrop(sal_False) + ,m_bActivatingForDrop(false) { } @@ -786,7 +786,7 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId) Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH); sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1; - DlgSize aDlgColWidth(this, nCurWidth, sal_False); + DlgSize aDlgColWidth(this, nCurWidth, false); if (aDlgColWidth.Execute()) { sal_Int32 nValue = aDlgColWidth.GetValue(); @@ -815,7 +815,7 @@ void SbaGridControl::SetRowHeight() Any aHeight = xCols->getPropertyValue(PROPERTY_ROW_HEIGHT); sal_Int32 nCurHeight = aHeight.hasValue() ? ::comphelper::getINT32(aHeight) : -1; - DlgSize aDlgRowHeight(this, nCurHeight, sal_True); + DlgSize aDlgRowHeight(this, nCurHeight, true); if (aDlgRowHeight.Execute()) { sal_Int32 nValue = aDlgRowHeight.GetValue(); @@ -979,10 +979,10 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos) return xEmptyReturn; } -sal_Bool SbaGridControl::IsReadOnlyDB() const +bool SbaGridControl::IsReadOnlyDB() const { // assume yes if anything fails - sal_Bool bDBIsReadOnly = sal_True; + bool bDBIsReadOnly = true; // the db is the implemented by the parent of the grid control's model ... Reference< XChild > xColumns(GetPeer()->getColumns(), UNO_QUERY); @@ -1012,7 +1012,7 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt) sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? (sal_uInt16)-1 : nColPos-1; // 'the handle column' and 'no valid column' will both result in a view position of -1 ! - sal_Bool bHitEmptySpace = (nRow > GetRowCount()) || (nViewPos == (sal_uInt16)-1); + bool bHitEmptySpace = (nRow > GetRowCount()) || (nViewPos == (sal_uInt16)-1); if (bHitEmptySpace && (rMEvt.GetClicks() == 2) && rMEvt.IsMod1()) Control::MouseButtonDown(rMEvt); @@ -1025,7 +1025,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SolarMutexGuard aGuard; // in the new DnD API, the solar mutex is not locked when StartDrag get's called - sal_Bool bHandled = sal_False; + bool bHandled = false; do { @@ -1038,7 +1038,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? (sal_uInt16)-1 : nColPos-1; // 'the handle column' and 'no valid column' will both result in a view position of -1 ! - sal_Bool bCurrentRowVirtual = IsCurrentAppending() && IsModified(); + bool bCurrentRowVirtual = IsCurrentAppending() && IsModified(); // the current row doesn't really exist : the user's appendign a new one and already has entered some data, // so the row contains data which has no counter part within the data source @@ -1051,7 +1051,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) if ((nColPos == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount)) break; - sal_Bool bHitHandle = (nColPos == 0); + bool bHitHandle = (nColPos == 0); // check which kind of dragging has to be initiated if ( bHitHandle // the handle column @@ -1079,7 +1079,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) getMouseEvent().Clear(); DoRowDrag((sal_Int16)nRow); - bHandled = sal_True; + bHandled = true; } else if ( (nRow < 0) // the header && (!bHitHandle) // non-handle column @@ -1092,7 +1092,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) getMouseEvent().Clear(); DoColumnDrag(nViewPos); - bHandled = sal_True; + bHandled = true; } else if ( !bHitHandle // non-handle column && (nRow >= 0) // non-header row @@ -1104,7 +1104,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) getMouseEvent().Clear(); DoFieldDrag(nViewPos, (sal_Int16)nRow); - bHandled = sal_True; + bHandled = true; } } while (false); @@ -1172,19 +1172,19 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC // build the sequence of numbers of selected rows Sequence< Any > aSelectedRows; - sal_Bool bSelectionBookmarks = sal_True; + bool bSelectionBookmarks = true; // collect the affected rows if ((GetSelectRowCount() == 0) && (nRowPos >= 0)) { aSelectedRows.realloc( 1 ); aSelectedRows[0] <<= (sal_Int32)(nRowPos + 1); - bSelectionBookmarks = sal_False; + bSelectionBookmarks = false; } else if ( !IsAllSelected() && GetSelectRowCount() ) { aSelectedRows = getSelectionBookmarks(); - bSelectionBookmarks = sal_True; + bSelectionBookmarks = true; } Reference< XResultSet> xRowSetClone; @@ -1232,8 +1232,8 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) /// unary_function Functor object for class ZZ returntype is void struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool> { - sal_Bool bQueryDrop; - SbaGridControlPrec(sal_Bool _bQueryDrop) + bool bQueryDrop; + SbaGridControlPrec(bool _bQueryDrop) : bQueryDrop(_bQueryDrop) { } @@ -1321,9 +1321,9 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) css::uno::UNO_QUERY); if (xColControl.is()) { - m_bActivatingForDrop = sal_True; + m_bActivatingForDrop = true; GoToRowColumnId(nRow, nCol); - m_bActivatingForDrop = sal_False; + m_bActivatingForDrop = false; nAction = DND_ACTION_COPY; } @@ -1339,7 +1339,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) if(nAction != DND_ACTION_COPY && GetEmptyRow().Is()) { const DataFlavorExVector& _rFlavors = GetDataFlavors(); - if(::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(sal_True)) != _rFlavors.end()) + if(::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(true)) != _rFlavors.end()) nAction = DND_ACTION_COPY; } @@ -1400,7 +1400,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) if(GetEmptyRow().Is()) { const DataFlavorExVector& _rFlavors = GetDataFlavors(); - DataFlavorExVector::const_iterator aFind = ::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(sal_True)); + DataFlavorExVector::const_iterator aFind = ::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(true)); if( aFind != _rFlavors.end()) { TransferableDataHelper aDropped( rEvt.maDropEvent.Transferable ); @@ -1434,7 +1434,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) Reference< XPropertySet > xDataSource = getDataSource(); if ( xDataSource.is() ) { - sal_Bool bCountFinal = sal_False; + bool bCountFinal = false; xDataSource->getPropertyValue(PROPERTY_ISROWCOUNTFINAL) >>= bCountFinal; if ( !bCountFinal ) setDataSource(NULL); // deattach from grid control diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 9103d70f28ca..b076da07ff76 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -219,10 +219,10 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& ,m_pCurrentlyDisplayed(NULL) ,m_nAsyncDrop(0) ,m_nBorder(1) - ,m_bQueryEscapeProcessing( sal_False ) - ,m_bShowMenu(sal_False) - ,m_bInSuspend(sal_False) - ,m_bEnableBrowser(sal_True) + ,m_bQueryEscapeProcessing( false ) + ,m_bShowMenu(false) + ,m_bInSuspend(false) + ,m_bEnableBrowser(true) { } @@ -411,7 +411,7 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); - sal_Bool bEscapeProcessing = sal_False; + bool bEscapeProcessing = false; OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing ); if ( !bEscapeProcessing ) // don't touch or interpret anything if escape processing is disabled @@ -520,10 +520,10 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() } } -sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties ) +bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties ) { if(!m_pCurrentlyDisplayed) - return sal_True; + return true; // this method set all format settings from the orignal table or query try @@ -566,10 +566,10 @@ sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - return sal_False; + return false; } - return sal_True; + return true; } void SbaTableQueryBrowser::initializePreviewMode() @@ -589,7 +589,7 @@ void SbaTableQueryBrowser::initializePreviewMode() } } -sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid) +bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid) { try { @@ -612,7 +612,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData()); OSL_ENSURE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeGridModel: No table available!" ); if ( !pData->xObjectProperties.is() ) - return sal_False; + return false; OUString* pStringIter = aProperties.getArray(); Any* pValueIter = aValues.getArray(); @@ -663,7 +663,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: Reference<XChild> xChild(xConnection,UNO_QUERY); Reference<XPropertySet> xDataSourceProp(xChild->getParent(),UNO_QUERY); - sal_Bool bSuppressVersionCol = sal_False; + bool bSuppressVersionCol = false; OSL_VERIFY( xDataSourceProp->getPropertyValue( PROPERTY_SUPPRESSVERSIONCL ) >>= bSuppressVersionCol ); // insert the column into the gridcontrol so that we see something :-) @@ -690,7 +690,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: continue; // use the result set column's type to determine the type of grid column to create - sal_Bool bFormattedIsNumeric = sal_True; + bool bFormattedIsNumeric = true; sal_Int32 nType = ::comphelper::getINT32( xColumn->getPropertyValue( PROPERTY_TYPE ) ); ::std::vector< NamedValue > aInitialValues; @@ -710,7 +710,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable ); aInitialValues.push_back( NamedValue( OUString( "TriState" ), - makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) ) + makeAny( ColumnValue::NO_NULLS != nNullable ) ) ); if ( ColumnValue::NO_NULLS == nNullable ) aDefault <<= (sal_Int16)TRISTATE_FALSE; @@ -719,7 +719,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: case DataType::LONGVARCHAR: case DataType::CLOB: - aInitialValues.push_back( NamedValue( OUString( "MultiLine" ), makeAny( (sal_Bool)sal_True ) ) ); + aInitialValues.push_back( NamedValue( OUString( "MultiLine" ), makeAny( true ) ) ); // NO break! case DataType::BINARY: case DataType::VARBINARY: @@ -730,7 +730,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: case DataType::VARCHAR: case DataType::CHAR: - bFormattedIsNumeric = sal_False; + bFormattedIsNumeric = false; // NO break! default: aCurrentModelType = "FormattedField"; @@ -738,7 +738,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: if ( xSupplier.is() ) aInitialValues.push_back( NamedValue( OUString("FormatsSupplier"), makeAny( xSupplier ) ) ); - aInitialValues.push_back( NamedValue( OUString("TreatAsNumber"), makeAny( (sal_Bool)bFormattedIsNumeric ) ) ); + aInitialValues.push_back( NamedValue( OUString("TreatAsNumber"), makeAny( bFormattedIsNumeric ) ) ); aCopyProperties.push_back( static_cast<const OUString&>(PROPERTY_FORMATKEY) ); break; } @@ -819,10 +819,10 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); - return sal_False; + return false; } - return sal_True; + return true; } Reference<XPropertySet> getColumnHelper(SvTreeListEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource) @@ -932,7 +932,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData()); OSL_ENSURE( pData->xObjectProperties.is(), "No table available!" ); - sal_Bool bDefault = !evt.NewValue.hasValue(); + bool bDefault = !evt.NewValue.hasValue(); if (bDefault) pData->xObjectProperties->setPropertyValue(PROPERTY_ROW_HEIGHT,makeAny((sal_Int32)45)); else @@ -966,10 +966,10 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; - sal_Bool bRet = sal_False; + bool bRet = false; if ( !m_bInSuspend ) { - m_bInSuspend = sal_True; + m_bInSuspend = true; if ( rBHelper.bDisposed ) throw DisposedException( OUString(), *this ); @@ -977,7 +977,7 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio if ( bRet && getView() ) getView()->Hide(); - m_bInSuspend = sal_False; + m_bInSuspend = false; } return bRet; @@ -1006,7 +1006,7 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv // if it's the slot for the document data source, remember the state Sequence< PropertyValue > aDescriptor; #if OSL_DEBUG_LEVEL > 0 - sal_Bool bProperFormat = + bool bProperFormat = #endif _rEvent.State >>= aDescriptor; OSL_ENSURE(bProperFormat, "SbaTableQueryBrowser::statusChanged: need a data access descriptor here!"); @@ -1040,14 +1040,14 @@ void SbaTableQueryBrowser::checkDocumentDataSource() { SvTreeListEntry* pDataSourceEntry = NULL; SvTreeListEntry* pContainerEntry = NULL; - SvTreeListEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, sal_False ); - sal_Bool bKnownDocDataSource = (NULL != pObjectEntry); + SvTreeListEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, false ); + bool bKnownDocDataSource = (NULL != pObjectEntry); if (!bKnownDocDataSource) { if (NULL != pDataSourceEntry) { // at least the data source is known if (NULL != pContainerEntry) - bKnownDocDataSource = sal_True; // assume we know it. + bKnownDocDataSource = true; // assume we know it. // TODO: should we expand the object container? This may be too expensive just for checking .... else { @@ -1066,13 +1066,13 @@ void SbaTableQueryBrowser::checkDocumentDataSource() } if ( !bKnownDocDataSource ) - m_aExternalFeatures[ ID_BROWSER_DOCUMENT_DATASOURCE ].bEnabled = sal_False; + m_aExternalFeatures[ ID_BROWSER_DOCUMENT_DATASOURCE ].bEnabled = false; // update the toolbox implCheckExternalSlot(ID_BROWSER_DOCUMENT_DATASOURCE); } -void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing) +void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, bool& _rEscapeProcessing) { _rDataSource = _rDescriptor.getDataSource(); if ( _rDescriptor.has(daCommand) ) @@ -1081,7 +1081,7 @@ void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescri _rDescriptor[daCommandType] >>= _rCommandType; // escape processing is the only one allowed not to be present - _rEscapeProcessing = sal_True; + _rEscapeProcessing = true; if (_rDescriptor.has(daEscapeProcessing)) _rEscapeProcessing = ::cppu::any2bool(_rDescriptor[daEscapeProcessing]); } @@ -1130,7 +1130,7 @@ OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* _pDataSour } SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType, - SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, sal_Bool _bExpandAncestors, + SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, bool _bExpandAncestors, const SharedConnection& _rxConnection ) { if (_ppDataSourceEntry) @@ -1257,13 +1257,13 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor, SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, - sal_Bool _bExpandAncestors) + bool _bExpandAncestors) { // extract the props from the descriptor OUString sDataSource; OUString sCommand; sal_Int32 nCommandType = CommandType::COMMAND; - sal_Bool bEscapeProcessing = sal_True; + bool bEscapeProcessing = true; extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing); return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors, SharedConnection() ); @@ -1401,7 +1401,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::Event { // we set the connection to null to avoid a second disposing of the connection pData->xConnection.clear(); - closeConnection(pDSLoop,sal_False); + closeConnection(pDSLoop,false); break; } @@ -1462,7 +1462,7 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw ( throw IllegalArgumentException(OUString(), *this, 1); // TODO: error message - return implSelect(aDescriptor,sal_True); + return implSelect(aDescriptor,true); } Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException, std::exception) @@ -1618,7 +1618,7 @@ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > void SbaTableQueryBrowser::criticalFail() { SbaXDataBrowserController::criticalFail(); - unloadAndCleanup( sal_False ); + unloadAndCleanup( false ); } void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) @@ -1626,12 +1626,12 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) SbaXDataBrowserController::LoadFinished(_bWasSynch); m_sQueryCommand = ""; - m_bQueryEscapeProcessing = sal_False; + m_bQueryEscapeProcessing = false; if (isValid() && !loadingCancelled()) { // did we load a query? - sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference) + bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference) if ( implGetQuerySignature( m_sQueryCommand, bTemporary ) ) m_bQueryEscapeProcessing = bTemporary; } @@ -1641,9 +1641,9 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) m_aSelectionListeners.notifyEach( &XSelectionChangeListener::selectionChanged, aEvent ); } -sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const +bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const { - sal_Bool bEnabled = sal_False; + bool bEnabled = false; ExternalFeaturesMap::const_iterator aPos = m_aExternalFeatures.find( _nId ); if ( ( m_aExternalFeatures.end() != aPos ) && aPos->second.xDispatcher.is() ) bEnabled = aPos->second.bEnabled; @@ -1706,7 +1706,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const { ::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext( getORB(), OUString( "/org.openoffice.Office.DataAccess/Policies/Features/Common" ) ) ); - sal_Bool bHaveEditDatabase( sal_True ); + bool bHaveEditDatabase( true ); OSL_VERIFY( aConfig.getNodeValue( "EditDatabaseFromDataSourceView" ) >>= bHaveEditDatabase ); aReturn.bEnabled = getORB().is() && ( pDataSourceEntry != NULL ) && bHaveEditDatabase; } @@ -1725,18 +1725,18 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const try { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (nId) { case ID_BROWSER_DOCUMENT_DATASOURCE: // the slot is enabled if we have an external dispatcher able to handle it, // and the dispatcher must have enabled the slot in general aReturn.bEnabled = getExternalSlotState( ID_BROWSER_DOCUMENT_DATASOURCE ); - bHandled = sal_True; + bHandled = true; break; case ID_BROWSER_REFRESH: aReturn.bEnabled = true; - bHandled = sal_True; + bHandled = true; break; } @@ -1871,15 +1871,15 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue // nothing to do break; - sal_Bool bFullReinit = sal_False; + bool bFullReinit = false; // check if the query signature (if the form is based on a query) has changed if ( !m_sQueryCommand.isEmpty() ) { OUString sNewQueryCommand; - sal_Bool bNewQueryEP; + bool bNewQueryEP; #if OSL_DEBUG_LEVEL > 0 - sal_Bool bIsQuery = + bool bIsQuery = #endif implGetQuerySignature( sNewQueryCommand, bNewQueryEP ); OSL_ENSURE( bIsQuery, "SbaTableQueryBrowser::Execute: was a query before, but is not anymore?" ); @@ -1903,7 +1903,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue SvTreeListEntry* pSelected = m_pCurrentlyDisplayed; // unload - unloadAndCleanup( sal_False ); + unloadAndCleanup( false ); // reselect the entry if ( pSelected ) @@ -2270,11 +2270,11 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) return 1L; } -sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) +bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) { OSL_ENSURE(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!"); if (!_pEntry) - return sal_False; + return false; EntryType eType = getEntryType( _pEntry ); @@ -2284,14 +2284,14 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) SvTreeListEntry* pDataSourceEntry = m_pTreeView->getListBox().GetRootLevelParent(_pEntry); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; switch (eType) { case etQueryContainer: if ( pEntryData->xContainer.is() ) { // nothing to do - bSuccess = sal_True; + bSuccess = true; break; } @@ -2354,21 +2354,21 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) return bSuccess; } -sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect) +bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor, bool _bSelectDirect) { // extract the props OUString sDataSource; OUString sCommand; sal_Int32 nCommandType = CommandType::COMMAND; - sal_Bool bEscapeProcessing = sal_True; + bool bEscapeProcessing = true; extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing); // select it return implSelect( sDataSource, sCommand, nCommandType, bEscapeProcessing, SharedConnection(), _bSelectDirect ); } -sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, - const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection) +bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, + const sal_Int32 _nCommandType, const bool _bEscapeProcessing, const SharedConnection& _rxConnection) { try { @@ -2395,7 +2395,7 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName getBrowserView()->getGridControl()->setDesignMode(sal_True); InitializeForm( xProp ); - sal_Bool bSuccess = sal_True; + bool bSuccess = true; { { @@ -2448,19 +2448,19 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName } InvalidateAll(); - return sal_False; + return false; } -sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OUString& _rCommand, - const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, - const SharedConnection& _rxConnection - ,sal_Bool _bSelectDirect) +bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OUString& _rCommand, + const sal_Int32 _nCommandType, const bool _bEscapeProcessing, + const SharedConnection& _rxConnection, + bool _bSelectDirect) { if (_rDataSourceName.getLength() && _rCommand.getLength() && (-1 != _nCommandType)) { SvTreeListEntry* pDataSource = NULL; SvTreeListEntry* pCommandType = NULL; - SvTreeListEntry* pCommand = getObjectEntry( _rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, sal_True, _rxConnection ); + SvTreeListEntry* pCommand = getObjectEntry( _rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, true, _rxConnection ); if (pCommand) { @@ -2484,7 +2484,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, cons { if ( m_pCurrentlyDisplayed ) { // tell the old entry (if any) it has been deselected - selectPath(m_pCurrentlyDisplayed, sal_False); + selectPath(m_pCurrentlyDisplayed, false); m_pCurrentlyDisplayed = NULL; } @@ -2492,7 +2492,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, cons return implLoadAnything(_rDataSourceName, _rCommand, _nCommandType, _bEscapeProcessing, _rxConnection); } } - return sal_False; + return false; } IMPL_LINK(SbaTableQueryBrowser, OnSelectionChange, void*, /*NOINTERESTEDIN*/) @@ -2587,20 +2587,20 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) WaitObject aWaitCursor(getBrowserView()); // tell the old entry it has been deselected - selectPath(m_pCurrentlyDisplayed, sal_False); + selectPath(m_pCurrentlyDisplayed, false); m_pCurrentlyDisplayed = NULL; // not really loaded m_pCurrentlyDisplayed = _pEntry; // tell the new entry it has been selected - selectPath(m_pCurrentlyDisplayed, sal_True); + selectPath(m_pCurrentlyDisplayed, true); // get the name of the data source currently selected ensureConnection( m_pCurrentlyDisplayed, pConData->xConnection ); if ( !pConData->xConnection.is() ) { - unloadAndCleanup( sal_False ); + unloadAndCleanup( false ); return false; } @@ -2639,7 +2639,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) sStatus = sStatus.replaceFirst("$name$", aName); BrowserViewStatusDisplay aShowStatus(static_cast<UnoDataBrowserView*>(getView()), sStatus); - sal_Bool bEscapeProcessing = sal_True; + bool bEscapeProcessing = true; if(xNameAccess.is() && xNameAccess->hasByName(sSimpleName)) { DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(_pEntry->GetUserData()); @@ -2766,7 +2766,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve OSL_ENSURE(pContainerData, "elementInserted: There must be user data for this type!"); DBTreeListUserData* pNewData = new DBTreeListUserData; - sal_Bool bIsTable = etTableContainer == pContainerData->eType; + bool bIsTable = etTableContainer == pContainerData->eType; if ( bIsTable ) { _rEvent.Element >>= pNewData->xObjectProperties;// remember the new element @@ -2788,7 +2788,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve SbaXDataBrowserController::elementInserted(_rEvent); } -sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer) +bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer) { return m_pCurrentlyDisplayed && getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer) @@ -2815,7 +2815,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven SvTreeListEntry* pTemp = m_pCurrentlyDisplayed; // unload - unloadAndCleanup( sal_False ); // don't dispose the connection + unloadAndCleanup( false ); // don't dispose the connection DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData()); pTemp->SetUserData(NULL); @@ -2863,7 +2863,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve // we need to remember the old value SvTreeListEntry* pTemp = m_pCurrentlyDisplayed; - unloadAndCleanup( sal_False ); // don't dispose the connection + unloadAndCleanup( false ); // don't dispose the connection DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData()); if (pData) @@ -2959,7 +2959,7 @@ void SbaTableQueryBrowser::disposeConnection( SvTreeListEntry* _pDSEntry ) } } -void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _bDisposeConnection) +void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry, bool _bDisposeConnection) { OSL_ENSURE(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!"); OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!"); @@ -2994,7 +2994,7 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _ disposeConnection( _pDSEntry ); } -void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection ) +void SbaTableQueryBrowser::unloadAndCleanup( bool _bDisposeConnection ) { if (!m_pCurrentlyDisplayed) // nothing to do @@ -3005,7 +3005,7 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection ) // de-select the path for the currently displayed table/query if (m_pCurrentlyDisplayed) { - selectPath(m_pCurrentlyDisplayed, sal_False); + selectPath(m_pCurrentlyDisplayed, false); } m_pCurrentlyDisplayed = NULL; @@ -3093,7 +3093,7 @@ void SbaTableQueryBrowser::impl_initialize() OUString aTableName, aCatalogName, aSchemaName; - sal_Bool bEsacpeProcessing = sal_True; + bool bEsacpeProcessing = true; sal_Int32 nInitialDisplayCommandType = CommandType::COMMAND; OUString sInitialDataSourceName; OUString sInitialCommand; @@ -3113,14 +3113,14 @@ void SbaTableQueryBrowser::impl_initialize() // disable the browser if either of ShowTreeViewButton (compatibility name) or EnableBrowser // is present and set to FALSE - sal_Bool bDisableBrowser = ( sal_False == rArguments.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name + bool bDisableBrowser = ( sal_False == rArguments.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name || ( sal_False == rArguments.getOrDefault( (OUString)PROPERTY_ENABLE_BROWSER, sal_True ) ); OSL_ENSURE( !rArguments.has( "ShowTreeViewButton" ), "SbaTableQueryBrowser::impl_initialize: ShowTreeViewButton is superseded by EnableBrowser!" ); m_bEnableBrowser = !bDisableBrowser; // hide the tree view it is disabled in general, or if the settings tell to hide it initially - sal_Bool bHideTreeView = ( !m_bEnableBrowser ) + bool bHideTreeView = ( !m_bEnableBrowser ) || ( sal_False == rArguments.getOrDefault( "ShowTreeView", sal_True ) ) // compatibility name || ( sal_False == rArguments.getOrDefault( (OUString)PROPERTY_SHOW_BROWSER, sal_True ) ); OSL_ENSURE( !rArguments.has( "ShowTreeView" ), @@ -3234,7 +3234,7 @@ void SbaTableQueryBrowser::impl_initialize() m_aDocScriptSupport = ::boost::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() ); } - if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEsacpeProcessing, xConnection, sal_True ) ) + if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEsacpeProcessing, xConnection, true ) ) { try { @@ -3253,7 +3253,7 @@ void SbaTableQueryBrowser::impl_initialize() InvalidateAll(); } -sal_Bool SbaTableQueryBrowser::haveExplorer() const +bool SbaTableQueryBrowser::haveExplorer() const { return m_pTreeView && m_pTreeView->IsVisible(); } @@ -3287,7 +3287,7 @@ void SbaTableQueryBrowser::showExplorer() InvalidateFeature(ID_BROWSER_EXPLORER); } -sal_Bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection) +bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection) { SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry); DBTreeListUserData* pDSData = @@ -3310,7 +3310,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_POP -sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection ) +bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection ) { SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry ); DBTreeListUserData* pDSData = @@ -3330,7 +3330,7 @@ bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) co #endif -sal_Bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection ) +bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection ) { OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" ); if(_pDSEntry) @@ -3480,15 +3480,15 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) } } -sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const +bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const { const DBTreeListUserData* pData = static_cast< const DBTreeListUserData* >( _pEntry->GetUserData() ); if ( ( pData->eType == etDatasource ) && !pData->sAccessor.isEmpty() ) { _rText = ::svt::OFileNotation( pData->sAccessor ).get( ::svt::OFileNotation::N_SYSTEM ); - return sal_True; + return true; } - return sal_False; + return false; } PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const @@ -3551,10 +3551,10 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const return makeAny( aSelectedObject ); } -sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_Bool& _bEscapeProcessing ) +bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, bool& _bEscapeProcessing ) { _rCommand = ""; - _bEscapeProcessing = sal_False; + _bEscapeProcessing = false; try { @@ -3570,7 +3570,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B // do we need to do anything? if ( CommandType::QUERY != nCommandType ) - return sal_False; + return false; // get the query object Reference< XQueryDefinitionsSupplier > xSuppQueries; @@ -3588,7 +3588,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B { xQuery->getPropertyValue( PROPERTY_COMMAND ) >>= _rCommand; _bEscapeProcessing = ::cppu::any2bool( xQuery->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) ); - return sal_True; + return true; } } catch( const Exception& ) @@ -3596,7 +3596,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B DBG_UNHANDLED_EXCEPTION(); } - return sal_False; + return false; } void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException, std::exception ) @@ -3673,9 +3673,9 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const return sTitle; } -sal_Bool SbaTableQueryBrowser::preReloadForm() +bool SbaTableQueryBrowser::preReloadForm() { - sal_Bool bIni = sal_False; + bool bIni = false; if ( !m_pCurrentlyDisplayed ) { // switch the grid to design mode while loading @@ -3687,14 +3687,14 @@ sal_Bool SbaTableQueryBrowser::preReloadForm() OUString sDataSource; OUString sCommand; sal_Int32 nCommandType = CommandType::COMMAND; - sal_Bool bEscapeProcessing = sal_True; + bool bEscapeProcessing = true; extractDescriptorProps(aDesc, sDataSource, sCommand, nCommandType, bEscapeProcessing); if ( !sDataSource.isEmpty() && !sCommand.isEmpty() && (-1 != nCommandType) ) { SvTreeListEntry* pDataSource = NULL; SvTreeListEntry* pCommandType = NULL; - m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, sal_True, SharedConnection() ); - bIni = sal_True; + m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, true, SharedConnection() ); + bIni = true; } } return bIni; @@ -3769,7 +3769,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo { // a table or query belonging to the deleted data source is currently beeing displayed. OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry, "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" ); - unloadAndCleanup( sal_True ); + unloadAndCleanup( true ); } else OSL_ENSURE( diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index fc4036bd600d..a6d8810f7b0b 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -40,7 +40,7 @@ OColumnControlWindow::OColumnControlWindow(Window* pParent : OFieldDescControl(pParent,NULL) , m_xContext(_rxContext) , m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES)) - , m_bAutoIncrementEnabled(sal_True) + , m_bAutoIncrementEnabled(true) { setRightAligned(); @@ -147,7 +147,7 @@ void OColumnControlWindow::setConnection(const Reference< XConnection>& _xCon) } } -sal_Bool OColumnControlWindow::isAutoIncrementValueEnabled() const +bool OColumnControlWindow::isAutoIncrementValueEnabled() const { return m_bAutoIncrementEnabled; } diff --git a/dbaccess/source/ui/control/FieldControls.cxx b/dbaccess/source/ui/control/FieldControls.cxx index e0ef82860775..a155fe26c067 100644 --- a/dbaccess/source/ui/control/FieldControls.cxx +++ b/dbaccess/source/ui/control/FieldControls.cxx @@ -26,7 +26,7 @@ namespace dbaui { namespace { -void lcl_setSpecialReadOnly( sal_Bool _bReadOnly, Window* _pWin ) +void lcl_setSpecialReadOnly( bool _bReadOnly, Window* _pWin ) { StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); const Color& rNewColor = _bReadOnly ? aSystemStyle.GetDialogColor() : aSystemStyle.GetFieldColor(); diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index a46f975d3ac8..507e18b41b9f 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -134,7 +134,7 @@ OFieldDescControl::OFieldDescControl( Window* pParent, const ResId& rResId, OTab ,m_nOldVThumb( 0 ) ,m_nOldHThumb( 0 ) ,m_nWidth(50) - ,m_bAdded(sal_False) + ,m_bAdded(false) ,m_bRightAligned(false) ,pActFieldDescr(NULL) { @@ -181,7 +181,7 @@ OFieldDescControl::OFieldDescControl( Window* pParent, OTableDesignHelpBar* pHel ,m_nOldVThumb( 0 ) ,m_nOldHThumb( 0 ) ,m_nWidth(50) - ,m_bAdded(sal_False) + ,m_bAdded(false) ,m_bRightAligned(false) ,pActFieldDescr(NULL) { @@ -295,7 +295,7 @@ void OFieldDescControl::CheckScrollBars() long nNewHWidth = szOverallSize.Width() - nVScrollWidth; long nNewVHeight = szOverallSize.Height() - nHScrollHeight; - sal_Bool bNeedHScrollBar(sal_False), bNeedVScrollBar(sal_False); + bool bNeedHScrollBar(false), bNeedVScrollBar(false); // Adjust the areas // Do I actually need ScrollBars? @@ -331,7 +331,7 @@ void OFieldDescControl::CheckScrollBars() if (!bNeedHScrollBar && (lMaxXPosition > lMaxXAvailable)) { // The vertical one now necessitates a horizontal one - bNeedHScrollBar = sal_True; + bNeedHScrollBar = true; // Adjust nLastVisible nLastVisible = static_cast<sal_uInt16>((szOverallSize.Height() - nControl_Spacing_y - nHScrollHeight) / (nControl_Spacing_y + nControlHeight)); // bNeedVScrollBar does NOT change: it's already set to sal_True and nLastVisible will only decrease @@ -449,7 +449,7 @@ sal_Int32 OFieldDescControl::GetMaxControlHeight() const return aHeight.Height(); } -void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly ) +void OFieldDescControl::SetReadOnly( bool bReadOnly ) { // Enable/disable Controls Control* ppAggregates[] = { pRequired, pNumType @@ -623,30 +623,30 @@ IMPL_LINK( OFieldDescControl, FormatClickHdl, Button *, /*pButton*/ ) return 0; SvNumberFormatter* pFormatter = pSupplierImpl->GetNumberFormatter(); - if(::dbaui::callColumnFormatDialog(this,pFormatter,pActFieldDescr->GetType(),nOldFormatKey,rOldJustify,sal_True)) + if(::dbaui::callColumnFormatDialog(this,pFormatter,pActFieldDescr->GetType(),nOldFormatKey,rOldJustify,true)) { - sal_Bool bModified = sal_False; + bool bModified = false; if(nOldFormatKey != pActFieldDescr->GetFormatKey()) { pActFieldDescr->SetFormatKey( nOldFormatKey ); - bModified = sal_True; + bModified = true; } if(rOldJustify != pActFieldDescr->GetHorJustify()) { pActFieldDescr->SetHorJustify( rOldJustify ); - bModified = sal_True; + bModified = true; } if(bModified) { - SetModified(sal_True); + SetModified(true); UpdateFormatSample(pActFieldDescr); } } return 0; } -void OFieldDescControl::SetModified(sal_Bool /*bModified*/) +void OFieldDescControl::SetModified(bool /*bModified*/) { } @@ -656,7 +656,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) return 0; if ( pListBox->GetSavedValue() != pListBox->GetSelectEntryPos() ) - SetModified(sal_True); + SetModified(true); // Special treatment for Boold fields if(pListBox == pRequired && pBoolDefault ) @@ -713,7 +713,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) if(pListBox == m_pType) { TOTypeInfoSP pTypeInfo = getTypeInfo(m_pType->GetSelectEntryPos()); - pActFieldDescr->FillFromTypeInfo(pTypeInfo,sal_True,sal_False); // SetType(pTypeInfo); + pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false); // SetType(pTypeInfo); DisplayData(pActFieldDescr); CellModified(-1, m_pType->GetPos()); @@ -1163,7 +1163,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) if ( m_bAdded ) { ::dbaui::notifySystemWindow(this,this,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); - m_bAdded = sal_False; + m_bAdded = false; } return; } @@ -1171,7 +1171,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) if ( !m_bAdded ) { ::dbaui::notifySystemWindow(this,this,::comphelper::mem_fun(&TaskPaneList::AddWindow)); - m_bAdded = sal_True; + m_bAdded = true; } TOTypeInfoSP pFieldType; @@ -1448,7 +1448,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) if(!aIter->second->bNullable && pFieldDescr->IsNullable()) pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS); if(!aIter->second->bAutoIncrement && pFieldDescr->IsAutoIncrement()) - pFieldDescr->SetAutoIncrement(sal_False); + pFieldDescr->SetAutoIncrement(false); } if ( aIter != pMap->end() ) { @@ -1459,7 +1459,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) } // Enable/disable Controls - sal_Bool bRead(IsReadOnly()); + bool bRead(IsReadOnly()); ArrangeAggregates(); CheckScrollBars(); @@ -1591,7 +1591,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr ) void OFieldDescControl::UpdateFormatSample(OFieldDescription* pFieldDescr) { if ( pFieldDescr && pFormatSample ) - pFormatSample->SetText(getControlDefault(pFieldDescr,sal_False)); + pFormatSample->SetText(getControlDefault(pFieldDescr,false)); } void OFieldDescControl::GetFocus() @@ -1626,9 +1626,9 @@ void OFieldDescControl::LoseFocus() TabPage::LoseFocus(); } -sal_Bool OFieldDescControl::isCopyAllowed() +bool OFieldDescControl::isCopyAllowed() { - sal_Bool bAllowed = (m_pActFocusWindow != NULL) && + bool bAllowed = (m_pActFocusWindow != NULL) && (m_pActFocusWindow == pDefault || m_pActFocusWindow == pFormatSample || m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength || m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName || @@ -1638,9 +1638,9 @@ sal_Bool OFieldDescControl::isCopyAllowed() return bAllowed; } -sal_Bool OFieldDescControl::isCutAllowed() +bool OFieldDescControl::isCutAllowed() { - sal_Bool bAllowed = (m_pActFocusWindow != NULL) && + bool bAllowed = (m_pActFocusWindow != NULL) && (m_pActFocusWindow == pDefault || m_pActFocusWindow == pFormatSample || m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength || m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName || @@ -1649,9 +1649,9 @@ sal_Bool OFieldDescControl::isCutAllowed() return bAllowed; } -sal_Bool OFieldDescControl::isPasteAllowed() +bool OFieldDescControl::isPasteAllowed() { - sal_Bool bAllowed = (m_pActFocusWindow != NULL) && + bool bAllowed = (m_pActFocusWindow != NULL) && (m_pActFocusWindow == pDefault || m_pActFocusWindow == pFormatSample || m_pActFocusWindow == pTextLen || m_pActFocusWindow == pLength || m_pActFocusWindow == pScale || m_pActFocusWindow == m_pColumnName || @@ -1682,10 +1682,10 @@ void OFieldDescControl::paste() static_cast<Edit*>(m_pActFocusWindow)->Paste(); } -sal_Bool OFieldDescControl::isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const +bool OFieldDescControl::isTextFormat(const OFieldDescription* _pFieldDescr, sal_uInt32& _nFormatKey) const { _nFormatKey = _pFieldDescr->GetFormatKey(); - sal_Bool bTextFormat = sal_True; + bool bTextFormat = true; try { @@ -1711,14 +1711,14 @@ sal_Bool OFieldDescControl::isTextFormat(const OFieldDescription* _pFieldDescr,s return bTextFormat; } -OUString OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDescr ,sal_Bool _bCheck) const +OUString OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDescr, bool _bCheck) const { OUString sDefault; - sal_Bool bCheck = !_bCheck || _pFieldDescr->GetControlDefault().hasValue(); + bool bCheck = !_bCheck || _pFieldDescr->GetControlDefault().hasValue(); if ( bCheck ) { sal_uInt32 nFormatKey; - sal_Bool bTextFormat = sal_False; + bool bTextFormat = false; try { diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 717953143a17..e877d505eeeb 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -390,7 +390,7 @@ namespace dbaui void ORelationControl::setWindowTables(const OTableWindow* _pSource,const OTableWindow* _pDest) { // If I edit here, hide - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if ( bWasEditing ) DeactivateCell(); @@ -688,7 +688,7 @@ namespace dbaui m_pRC_Tables->Invalidate(); } - sal_Bool OTableListBoxControl::SaveModified() + bool OTableListBoxControl::SaveModified() { return m_pRC_Tables->SaveModified(); } diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx index 603a50c37099..1d4fe29ad2e9 100644 --- a/dbaccess/source/ui/control/SqlNameEdit.cxx +++ b/dbaccess/source/ui/control/SqlNameEdit.cxx @@ -22,7 +22,7 @@ namespace dbaui { - sal_Bool isCharOk(sal_Unicode _cChar,sal_Bool _bFirstChar,sal_Bool _bUpperCase,const OUString& _sAllowedChars) + bool isCharOk(sal_Unicode _cChar,bool _bFirstChar,bool _bUpperCase,const OUString& _sAllowedChars) { return ( (_cChar >= 'A' && _cChar <= 'Z') || @@ -32,10 +32,10 @@ namespace dbaui (!_bUpperCase && (_cChar >= 'a' && _cChar <= 'z')) ); } - sal_Bool OSQLNameChecker::checkString(const OUString& _sToCheck, + bool OSQLNameChecker::checkString(const OUString& _sToCheck, OUString& _rsCorrected) { - sal_Bool bCorrected = sal_False; + bool bCorrected = false; if ( m_bCheck ) { OUString sText = _sToCheck; @@ -45,7 +45,7 @@ namespace dbaui if ( !isCharOk( sText[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) ) { _rsCorrected += sText.copy(nMatch, i - nMatch); - bCorrected = sal_True; + bCorrected = true; nMatch = i + 1; } } diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index 86504edd8e00..9cbc3306ac78 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -311,9 +311,9 @@ void OTableGrantControl::fillPrivilege(sal_Int32 _nRow) const } } -sal_Bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const +bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; switch (_nColumnId) { case COL_INSERT: diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index b14bf5ae81f5..ec3ede46ec53 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -28,13 +28,13 @@ using namespace ::dbaui; // class OSplitterView -OSplitterView::OSplitterView(Window* _pParent,sal_Bool _bVertical) : Window(_pParent,WB_DIALOGCONTROL) // ,WB_BORDER +OSplitterView::OSplitterView(Window* _pParent,bool _bVertical) : Window(_pParent,WB_DIALOGCONTROL) // ,WB_BORDER ,m_pSplitter( NULL ) ,m_pLeft(NULL) ,m_pRight(NULL) ,m_bVertical(_bVertical) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } OSplitterView::~OSplitterView() @@ -57,7 +57,7 @@ IMPL_LINK( OSplitterView, SplitHdl, Splitter*, /*pSplit*/ ) return 0L; } -void OSplitterView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OSplitterView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -94,7 +94,7 @@ void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 4799a80f7435..cab994933e2b 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -25,7 +25,7 @@ namespace dbaui { // OConnectionURLEdit -OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,sal_Bool _bShowPrefix) +OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,bool _bShowPrefix) :Edit(_pParent, _rResId) ,m_pTypeCollection(NULL) ,m_pForcedPrefix(NULL) @@ -78,7 +78,7 @@ void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNew m_pForcedPrefix->Show(m_bShowPrefix); - sal_Bool bIsEmpty = _rStr.isEmpty(); + bool bIsEmpty = _rStr.isEmpty(); // calc the prefix OUString sPrefix; if (!bIsEmpty) @@ -119,7 +119,7 @@ OUString OConnectionURLEdit::GetText() const return Edit::GetText(); } -void OConnectionURLEdit::ShowPrefix(sal_Bool _bShowPrefix) +void OConnectionURLEdit::ShowPrefix(bool _bShowPrefix) { m_bShowPrefix = _bShowPrefix; if ( m_pForcedPrefix ) diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index bd1d9a584429..bd23fa942dce 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -54,7 +54,7 @@ using namespace ::com::sun::star::view; #define SPACEBETWEENENTRIES 4 // class DBTreeListBox -DBTreeListBox::DBTreeListBox( Window* pParent, WinBits nWinStyle ,sal_Bool _bHandleEnterKey) +DBTreeListBox::DBTreeListBox( Window* pParent, WinBits nWinStyle ,bool _bHandleEnterKey) :SvTreeListBox(pParent,nWinStyle) ,m_pDragedEntry(NULL) ,m_pActionListener(NULL) @@ -64,7 +64,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, WinBits nWinStyle ,sal_Bool _bHan init(); } -DBTreeListBox::DBTreeListBox( Window* pParent, const ResId& rResId,sal_Bool _bHandleEnterKey) +DBTreeListBox::DBTreeListBox( Window* pParent, const ResId& rResId,bool _bHandleEnterKey) :SvTreeListBox(pParent,rResId) ,m_pDragedEntry(NULL) ,m_pActionListener(NULL) @@ -178,7 +178,7 @@ void DBTreeListBox::SelectHdl() void DBTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) { - sal_Bool bHitEmptySpace = (NULL == GetEntry(rMEvt.GetPosPixel(), true)); + bool bHitEmptySpace = (NULL == GetEntry(rMEvt.GetPosPixel(), true)); if (bHitEmptySpace && (rMEvt.GetClicks() == 2) && rMEvt.IsMod1()) Control::MouseButtonDown(rMEvt); else @@ -319,7 +319,7 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) { KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); - sal_Bool bHandled = sal_False; + bool bHandled = false; if(eFunc != KEYFUNC_DONTKNOW) { @@ -409,7 +409,7 @@ bool DBTreeListBox::DoubleClickHdl() return nResult == 0; } -void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,sal_Bool _bUp) +void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,bool _bUp) { SvTreeListEntry* pEntry = _pListBox->GetEntry( _rPos ); if( pEntry && pEntry != _pListBox->Last() ) @@ -420,13 +420,13 @@ void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,sal_Bool _bUp) IMPL_LINK( DBTreeListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) { - scrollWindow(this,m_aMousePos,sal_True); + scrollWindow(this,m_aMousePos,true); return 0; } IMPL_LINK( DBTreeListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) { - scrollWindow(this,m_aMousePos,sal_False); + scrollWindow(this,m_aMousePos,false); return 0; } diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 29505be1cf40..333f95c58b75 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -68,8 +68,8 @@ private: OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) : MultiLineEditSyntaxHighlight( pParent, nWinStyle ) ,m_pView(pParent) - ,m_bAccelAction( sal_False ) - ,m_bStopTimer(sal_False ) + ,m_bAccelAction( false ) + ,m_bStopTimer(false ) { SetHelpId( HID_CTL_QRYSQLEDIT ); SetModifyHdl( LINK(this, OSqlEdit, ModifyHdl) ); @@ -127,15 +127,15 @@ void OSqlEdit::KeyInput( const KeyEvent& rKEvt ) // Is this a cut, copy, paste event? KeyFuncType aKeyFunc = rKEvt.GetKeyCode().GetFunction(); if( (aKeyFunc==KEYFUNC_CUT)||(aKeyFunc==KEYFUNC_COPY)||(aKeyFunc==KEYFUNC_PASTE) ) - m_bAccelAction = sal_True; + m_bAccelAction = true; MultiLineEditSyntaxHighlight::KeyInput( rKEvt ); if( m_bAccelAction ) - m_bAccelAction = sal_False; + m_bAccelAction = false; } -sal_Bool OSqlEdit::IsInAccelAct() +bool OSqlEdit::IsInAccelAct() { // Cut, Copy, Paste by Accel. runs the action in the Edit but also the // corresponding slot in the View. Therefore, the action occurs twice. @@ -213,14 +213,14 @@ void OSqlEdit::SetText(const OUString& rNewText) void OSqlEdit::stopTimer() { - m_bStopTimer = sal_True; + m_bStopTimer = true; if (m_timerInvalidate.IsActive()) m_timerInvalidate.Stop(); } void OSqlEdit::startTimer() { - m_bStopTimer = sal_False; + m_bStopTimer = false; if (!m_timerInvalidate.IsActive()) m_timerInvalidate.Start(); } diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index c79b8bd8cf99..86dbf17aa0b3 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -192,7 +192,7 @@ namespace const Sequence< OUString> m_aViews; ::comphelper::UStringMixEqual m_aEqualFunctor; - OViewSetter(const Sequence< OUString>& _rViews,sal_Bool _bCase) : m_aViews(_rViews),m_aEqualFunctor(_bCase){} + OViewSetter(const Sequence< OUString>& _rViews,bool _bCase) : m_aViews(_rViews),m_aEqualFunctor(_bCase){} OTableTreeListBox::TNames::value_type operator() (const OUString& lhs) { OTableTreeListBox::TNames::value_type aRet; @@ -289,14 +289,14 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn implAddEntry( xMeta, aIter->first, - sal_False + false ); } if ( !m_bNoEmptyFolders && lcl_shouldDisplayEmptySchemasAndCatalogs( _rxConnection ) ) { - sal_Bool bSupportsCatalogs = xMeta->supportsCatalogsInDataManipulation(); - sal_Bool bSupportsSchemas = xMeta->supportsSchemasInDataManipulation(); + bool bSupportsCatalogs = xMeta->supportsCatalogsInDataManipulation(); + bool bSupportsSchemas = xMeta->supportsSchemasInDataManipulation(); if ( bSupportsCatalogs || bSupportsSchemas ) { @@ -328,7 +328,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn } } -sal_Bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry) const +bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry) const { if (_pEntry) { @@ -336,7 +336,7 @@ sal_Bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry) const if (pTextItem) return pTextItem->isEmphasized(); } - return sal_False; + return false; } void OTableTreeListBox::checkWildcard(SvTreeListEntry* _pEntry) @@ -363,12 +363,12 @@ void OTableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry) implEmphasize(_pEntry, SV_BUTTON_CHECKED == eState); } -void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, sal_Bool _bChecked, sal_Bool _bUpdateDescendants, sal_Bool _bUpdateAncestors) +void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked, bool _bUpdateDescendants, bool _bUpdateAncestors) { OSL_ENSURE(_pEntry, "OTableTreeListBox::implEmphasize: invalid entry (NULL)!"); // special emphasizing handling for the "all objects" entry - sal_Bool bAllObjectsEntryAffected = haveVirtualRoot() && (getAllObjectsEntry() == _pEntry); + bool bAllObjectsEntryAffected = haveVirtualRoot() && (getAllObjectsEntry() == _pEntry); if ( GetModel()->HasChildren(_pEntry) // the entry has children || bAllObjectsEntryAffected // or it is the "all objects" entry ) @@ -388,7 +388,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, sal_Bool _bCheck while (pChildLoop) { if (GetModel()->HasChildren(pChildLoop)) - implEmphasize(pChildLoop, sal_False, sal_True, sal_False); + implEmphasize(pChildLoop, false, true, false); pChildLoop = NextSibling(pChildLoop); } } @@ -397,7 +397,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, sal_Bool _bCheck { // remove the mark for all ancestors of the entry if (GetModel()->HasParent(_pEntry)) - implEmphasize(GetParent(_pEntry), sal_False, sal_False, sal_True); + implEmphasize(GetParent(_pEntry), false, false, true); } } @@ -417,7 +417,7 @@ void OTableTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& _rSt SvTreeListEntry* OTableTreeListBox::implAddEntry( const Reference< XDatabaseMetaData >& _rxMeta, const OUString& _rTableName, - sal_Bool _bCheckName + bool _bCheckName ) { OSL_PRECOND( _rxMeta.is(), "OTableTreeListBox::implAddEntry: invalid meta data!" ); @@ -438,7 +438,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry( // schema // +- catalog // +- table - sal_Bool bCatalogAtStart = _rxMeta->isCatalogAtStart(); + bool bCatalogAtStart = _rxMeta->isCatalogAtStart(); const OUString& rFirstName = bCatalogAtStart ? sCatalog : sSchema; const sal_Int32 nFirstFolderType = bCatalogAtStart ? DatabaseObjectContainer::CATALOG : DatabaseObjectContainer::SCHEMA; const OUString& rSecondName = bCatalogAtStart ? sSchema : sCatalog; diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 854b5f300246..9ddfd7bdda26 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -74,7 +74,7 @@ OCollectionView::OCollectionView( Window * pParent , m_sPath( ModuleRes( STR_PATHNAME ) ) , m_xContent(_xContent) , m_xContext(_rxContext) - , m_bCreateForm(sal_True) + , m_bCreateForm(true) { FreeResource(); @@ -272,7 +272,7 @@ IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView) void OCollectionView::initCurrentPath() { - sal_Bool bEnable = sal_False; + bool bEnable = false; try { if ( m_xContent.is() ) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index ea0654da09ae..25f37ab6dee1 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -113,20 +113,20 @@ namespace dbaui } - void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); m_aFT_Connection.Show(); m_aConnectionURL.Show(); m_aConnectionURL.ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) ); - sal_Bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); + bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); m_aPB_Connection.Show( bEnableBrowseButton ); - sal_Bool bEnableCreateButton = m_pCollection->supportsDBCreation( m_eType ); + bool bEnableCreateButton = m_pCollection->supportsDBCreation( m_eType ); m_aPB_CreateDB.Show( bEnableCreateButton ); SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, true); @@ -167,7 +167,7 @@ namespace dbaui { Reference< XFolderPicker2 > xFolderPicker = FolderPicker::create(m_xORB); - sal_Bool bDoBrowse = sal_False; + bool bDoBrowse = false; OUString sOldPath = getURLNoPrefix(); do { @@ -181,7 +181,7 @@ namespace dbaui switch (checkPathExistence(sOldPath)) { case RET_RETRY: - bDoBrowse = sal_True; + bDoBrowse = true; break; case RET_CANCEL: return 0L; @@ -198,7 +198,7 @@ namespace dbaui sSelectedDirectory = aSelectedDirectory.GetMainURL( INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8 ); setURLNoPrefix( sSelectedDirectory ); - SetRoadmapStateValue(sal_True); + SetRoadmapStateValue(true); callModifiedHdl(); } catch( const Exception& ) @@ -251,7 +251,7 @@ namespace dbaui if ( getSelectedDataSource(sDataSource,sCurrDatasource) && !sDataSource.isEmpty() ) { setURLNoPrefix(sDataSource); - SetRoadmapStateValue(sal_True); + SetRoadmapStateValue(true); callModifiedHdl(); } else @@ -362,7 +362,7 @@ namespace dbaui return true; } - void OConnectionHelper::impl_setURL( const OUString& _rURL, sal_Bool _bPrefix ) + void OConnectionHelper::impl_setURL( const OUString& _rURL, bool _bPrefix ) { OUString sURL( comphelper::string::stripEnd(_rURL, '*') ); OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" ); @@ -405,7 +405,7 @@ namespace dbaui implUpdateURLDependentStates(); } - OUString OConnectionHelper::impl_getURL( sal_Bool _bPrefix ) const + OUString OConnectionHelper::impl_getURL( bool _bPrefix ) const { // get the pure text OUString sURL = _bPrefix ? m_aConnectionURL.GetText() : OUString(m_aConnectionURL.GetTextNoPrefix()); @@ -445,22 +445,22 @@ namespace dbaui void OConnectionHelper::setURL( const OUString& _rURL ) { - impl_setURL( _rURL, sal_True ); + impl_setURL( _rURL, true ); } OUString OConnectionHelper::getURLNoPrefix( ) const { - return impl_getURL( sal_False ); + return impl_getURL( false ); } void OConnectionHelper::setURLNoPrefix( const OUString& _rURL ) { - impl_setURL( _rURL, sal_False ); + impl_setURL( _rURL, false ); } sal_Int32 OConnectionHelper::checkPathExistence(const OUString& _rURL) { - IS_PATH_EXIST e_exists = pathExists(_rURL, sal_False); + IS_PATH_EXIST e_exists = pathExists(_rURL, false); if (!m_pCollection->supportsDBCreation(m_eType) && (( e_exists == PATH_NOT_EXIST) || ( e_exists == PATH_NOT_KNOWN))) { @@ -468,16 +468,16 @@ namespace dbaui OFileNotation aTransformer(_rURL); sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM)); - m_bUserGrabFocus = sal_False; + m_bUserGrabFocus = false; QueryBox aQuery(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery); sal_Int32 nQueryResult = aQuery.Execute(); - m_bUserGrabFocus = sal_True; + m_bUserGrabFocus = true; switch (nQueryResult) { case RET_YES: { - sal_Bool bTryCreate = sal_False; + bool bTryCreate = false; do { if ( !createDirectoryDeep(_rURL) ) @@ -485,16 +485,16 @@ namespace dbaui sQuery = ModuleRes(STR_COULD_NOT_CREATE_DIRECTORY); sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM)); - m_bUserGrabFocus = sal_False; + m_bUserGrabFocus = false; QueryBox aWhatToDo(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery); nQueryResult = aWhatToDo.Execute(); - m_bUserGrabFocus = sal_True; + m_bUserGrabFocus = true; if (RET_RETRY == nQueryResult) - bTryCreate = sal_True; + bTryCreate = true; else { - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); callModifiedHdl(); return RET_RETRY; } @@ -510,7 +510,7 @@ namespace dbaui default: // cancelled - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); callModifiedHdl(); return RET_CANCEL; } @@ -520,15 +520,15 @@ namespace dbaui // TODO: error msg return RET_CANCEL; } */ - SetRoadmapStateValue(sal_True); + SetRoadmapStateValue(true); callModifiedHdl(); return RET_OK; } - IS_PATH_EXIST OConnectionHelper::pathExists(const OUString& _rURL, sal_Bool bIsFile) const + IS_PATH_EXIST OConnectionHelper::pathExists(const OUString& _rURL, bool bIsFile) const { ::ucbhelper::Content aCheckExistence; - sal_Bool bExists = sal_False; + bool bExists = false; IS_PATH_EXIST eExists = PATH_NOT_EXIST; Reference< ::com::sun::star::task::XInteractionHandler > xInteractionHandler( task::InteractionHandler::createWithParent(m_xORB, 0), UNO_QUERY ); @@ -574,7 +574,7 @@ namespace dbaui return OGenericAdministrationPage::PreNotify( _rNEvt ); } - sal_Bool OConnectionHelper::createDirectoryDeep(const OUString& _rPathURL) + bool OConnectionHelper::createDirectoryDeep(const OUString& _rPathURL) { // get an URL object analyzing the URL for us ... INetURLObject aParser; @@ -590,11 +590,11 @@ namespace dbaui { aToBeCreated.push_back(aParser.getName()); // remember the local name for creation aParser.removeSegment(); // cut the local name - eParentExists = pathExists(aParser.GetMainURL(INetURLObject::NO_DECODE), sal_False); + eParentExists = pathExists(aParser.GetMainURL(INetURLObject::NO_DECODE), false); } if (!aParser.getSegmentCount()) - return sal_False; + return false; // create all the missing levels try @@ -630,16 +630,16 @@ namespace dbaui { aNewDirectoryAttributes[0] <<= *aLocalName; if (!aParent.insertNewContent(sContentType, aNewDirectoryProperties, aNewDirectoryAttributes, aParent)) - return sal_False; + return false; } } catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - return sal_False; + return false; } - return sal_True; + return true; } void OConnectionHelper::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) @@ -654,7 +654,7 @@ namespace dbaui _rControlList.push_back( new OSaveValueWrapper<Edit>( &m_aConnectionURL ) ); } - sal_Bool OConnectionHelper::commitURL() + bool OConnectionHelper::commitURL() { OUString sURL; OUString sOldPath; @@ -674,15 +674,15 @@ namespace dbaui if ( ( ::dbaccess::DST_CALC == eType) || ( ::dbaccess::DST_MSACCESS == eType) || ( ::dbaccess::DST_MSACCESS_2007 == eType) ) { - if( pathExists(sURL, sal_True) == PATH_NOT_EXIST ) + if( pathExists(sURL, true) == PATH_NOT_EXIST ) { OUString sFile = ModuleRes( STR_FILE_DOES_NOT_EXIST ); sFile = sFile.replaceFirst("$file$", aTransformer.get(OFileNotation::N_SYSTEM)); OSQLWarningBox( this, sFile ).Execute(); setURLNoPrefix(sOldPath); - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); callModifiedHdl(); - return sal_False; + return false; } } else @@ -690,14 +690,14 @@ namespace dbaui switch (checkPathExistence(sURL)) { case RET_RETRY: - m_bUserGrabFocus = sal_False; + m_bUserGrabFocus = false; m_aConnectionURL.GrabFocus(); - m_bUserGrabFocus = sal_True; - return sal_False; + m_bUserGrabFocus = true; + return false; case RET_CANCEL: setURLNoPrefix(sOldPath); - return sal_False; + return false; } } } @@ -705,7 +705,7 @@ namespace dbaui setURLNoPrefix(sURL); m_aConnectionURL.SaveValueNoPrefix(); - return sal_True; + return true; } void OConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen) { diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index eab21c756b3b..22ad7957bcfc 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -37,7 +37,7 @@ namespace dbaui class OConnectionHelper : public OGenericAdministrationPage { - sal_Bool m_bUserGrabFocus : 1; + bool m_bUserGrabFocus : 1; public: OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs); @@ -59,7 +59,7 @@ namespace dbaui virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; // <method>OGenericAdministrationPage::fillWindows</method> virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; // setting/retrieving the current connection URL // necessary because for some types, the URL must be decoded for display purposes @@ -75,9 +75,9 @@ namespace dbaui */ sal_Int32 checkPathExistence(const OUString& _rURL); - IS_PATH_EXIST pathExists(const OUString& _rURL, sal_Bool bIsFile) const; - sal_Bool createDirectoryDeep(const OUString& _rPathNormalized); - sal_Bool commitURL(); + IS_PATH_EXIST pathExists(const OUString& _rURL, bool bIsFile) const; + bool createDirectoryDeep(const OUString& _rPathNormalized); + bool commitURL(); /** opens the FileOpen dialog and asks for a FileName @param _aFileOpen @@ -92,8 +92,8 @@ namespace dbaui private: DECL_LINK(OnBrowseConnections, PushButton*); DECL_LINK(OnCreateDatabase, PushButton*); - OUString impl_getURL( sal_Bool _bPrefix ) const; - void impl_setURL( const OUString& _rURL, sal_Bool _bPrefix ); + OUString impl_getURL( bool _bPrefix ) const; + void impl_setURL( const OUString& _rURL, bool _bPrefix ); void implUpdateURLDependentStates() const; }; diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 19b68baf96cf..9792ce2c8096 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -119,10 +119,10 @@ namespace dbaui { } - void OConnectionTabPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OConnectionTabPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); m_eType = m_pAdminDialog->getDatasourceType(_rSet); @@ -230,7 +230,7 @@ namespace dbaui OUString sUrl = pUrlItem->GetValue(); setURL( sUrl ); - const sal_Bool bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC; + const bool bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC; if ( !pJdbcDrvItem->GetValue().getLength() ) { OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType); @@ -280,13 +280,13 @@ namespace dbaui bool OConnectionTabPage::FillItemSet(SfxItemSet& _rSet) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; if (m_aUserName.GetText() != m_aUserName.GetSavedValue()) { _rSet.Put(SfxStringItem(DSID_USER, m_aUserName.GetText())); _rSet.Put(SfxStringItem(DSID_PASSWORD, OUString())); - bChangedSomething = sal_True; + bChangedSomething = true; } fillBool(_rSet,&m_aPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething); @@ -303,7 +303,7 @@ namespace dbaui IMPL_LINK(OConnectionTabPage, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; #if HAVE_FEATURE_JAVA try { @@ -327,7 +327,7 @@ namespace dbaui bool OConnectionTabPage::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); + bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC ) bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().isEmpty()); m_aTestConnection.Enable(bEnableTestConnection); diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index f037d36e334b..ac26525634db 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -60,7 +60,7 @@ namespace dbaui static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); virtual bool FillItemSet (SfxItemSet& _rCoreAttrs) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(false); } inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); } diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 922927b2397c..cc25f65f0a51 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -104,7 +104,7 @@ namespace dbaui // OConnectionTabPageSetup OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId) :OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs) - ,m_bUserGrabFocus(sal_True) + ,m_bUserGrabFocus(true) ,m_aFT_HelpText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT)) { @@ -143,14 +143,14 @@ namespace dbaui m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified)); - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); } OConnectionTabPageSetup::~OConnectionTabPageSetup() { } - void OConnectionTabPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OConnectionTabPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { m_eType = m_pAdminDialog->getDatasourceType(_rSet); // special handling for oracle, this can only happen @@ -182,7 +182,7 @@ namespace dbaui bool OConnectionTabPageSetup::FillItemSet(SfxItemSet& _rSet) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; fillString(_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething); return bChangedSomething; } diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 71386cfda2f9..f5aac6ec8400 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -36,7 +36,7 @@ namespace dbaui */ class OConnectionTabPageSetup : public OConnectionHelper { - sal_Bool m_bUserGrabFocus : 1; + bool m_bUserGrabFocus : 1; protected: FixedText m_aFT_HelpText; @@ -53,7 +53,7 @@ namespace dbaui virtual bool FillItemSet (SfxItemSet& _rCoreAttrs) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE; inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(false); } diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 307b56d297c4..bf842f00ea8d 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -107,10 +107,10 @@ using namespace ::com::sun::star; OConnectionTabPageSetup::fillWindows(_rControlList); m_pTextConnectionHelper->fillWindows(_rControlList); } - void OTextConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OTextConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); OConnectionTabPageSetup::implInitControls( _rSet, _bSaveValue); m_pTextConnectionHelper->implInitControls(_rSet, bValid); @@ -118,12 +118,12 @@ using namespace ::com::sun::star; bool OTextConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); + bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); bChangedSomething = m_pTextConnectionHelper->FillItemSet(_rSet, bChangedSomething); return bChangedSomething; } - sal_Bool OTextConnectionPageSetup::prepareLeave(){ + bool OTextConnectionPageSetup::prepareLeave(){ return m_pTextConnectionHelper->prepareLeave(); } @@ -152,13 +152,13 @@ using namespace ::com::sun::star; m_aETBaseDN.SetModifyHdl(getControlModifiedLink()); m_aNFPortNumber.SetModifyHdl(getControlModifiedLink()); m_aCBUseSSL.SetToggleHdl(getControlModifiedLink()); - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); FreeResource(); } bool OLDAPConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; fillString(_rSet,&m_aETBaseDN,DSID_CONN_LDAP_BASEDN, bChangedSomething); fillInt32(_rSet,&m_aNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething); @@ -174,7 +174,7 @@ using namespace ::com::sun::star; OUString sUrl = pCollection->getPrefix( OUString("sdbc:address:ldap:")); sUrl += m_aETHostServer.GetText(); _rSet.Put(SfxStringItem(DSID_CONNECTURL, sUrl)); - bChangedSomething = sal_True; + bChangedSomething = true; } } @@ -196,10 +196,10 @@ using namespace ::com::sun::star; _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTPortNumber)); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDefaultPortNumber)); } - void OLDAPConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OLDAPConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pBaseDN, SfxStringItem, DSID_CONN_LDAP_BASEDN, true); @@ -216,7 +216,7 @@ using namespace ::com::sun::star; IMPL_LINK(OLDAPConnectionPageSetup, OnEditModified, Edit*, /*_pEdit*/) { - sal_Bool bRoadmapState = ((!m_aETHostServer.GetText().isEmpty() ) && ( !m_aETBaseDN.GetText().isEmpty() ) && (!m_aFTPortNumber.GetText().isEmpty() )); + bool bRoadmapState = ((!m_aETHostServer.GetText().isEmpty() ) && ( !m_aETBaseDN.GetText().isEmpty() ) && (!m_aFTPortNumber.GetText().isEmpty() )); SetRoadmapStateValue(bRoadmapState); callModifiedHdl(); return 0L; @@ -256,7 +256,7 @@ using namespace ::com::sun::star; } - void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/) + void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, bool /*_bSaveValue*/) { // show the "Connect directly" option only if the driver is installed DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet.GetItem(DSID_TYPECOLLECTION)); @@ -311,7 +311,7 @@ using namespace ::com::sun::star; LayoutHelper::positionBelow( m_aHelpText, m_aMySQLSettings, UnrelatedControls, 0 ); m_aMySQLSettings.Show(); - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); FreeResource(); } @@ -336,7 +336,7 @@ using namespace ::com::sun::star; return m_aMySQLSettings.FillItemSet( _rSet ); } - void MySQLNativeSetupPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) + void MySQLNativeSetupPage::implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) { m_aMySQLSettings.implInitControls( _rSet ); @@ -396,7 +396,7 @@ using namespace ::com::sun::star; m_sDefaultJdbcDriverName = pTypeCollection->getJavaDriverClass(pUrlItem->GetValue()); } - SetRoadmapStateValue(sal_False); + SetRoadmapStateValue(false); FreeResource(); } @@ -443,7 +443,7 @@ using namespace ::com::sun::star; bool OGeneralSpecialJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; fillString(_rSet,&m_aETDriverClass,DSID_JDBCDRIVERCLASS,bChangedSomething); fillString(_rSet,&m_aETHostname,DSID_CONN_HOSTNAME,bChangedSomething); fillString(_rSet,&m_aETDatabasename,DSID_DATABASENAME,bChangedSomething); @@ -451,10 +451,10 @@ using namespace ::com::sun::star; return bChangedSomething; } - void OGeneralSpecialJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OGeneralSpecialJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pDatabaseName, SfxStringItem, DSID_DATABASENAME, true); @@ -486,7 +486,7 @@ using namespace ::com::sun::star; } callModifiedHdl(); - sal_Bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && (!m_aETHostname.GetText().isEmpty()) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() )); + bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && (!m_aETHostname.GetText().isEmpty()) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() )); SetRoadmapStateValue(bRoadmapState); } @@ -494,7 +494,7 @@ using namespace ::com::sun::star; { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; #if HAVE_FEATURE_JAVA try { @@ -520,7 +520,7 @@ using namespace ::com::sun::star; { if ( _pEdit == &m_aETDriverClass ) m_aPBTestJavaDriver.Enable( !m_aETDriverClass.GetText().isEmpty() ); - sal_Bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && ( !m_aETHostname.GetText().isEmpty() ) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() )); + bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && ( !m_aETHostname.GetText().isEmpty() ) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() )); SetRoadmapStateValue(bRoadmapState); callModifiedHdl(); return 0L; @@ -555,15 +555,15 @@ using namespace ::com::sun::star; bool OJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); + bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); fillString(_rSet,&m_aETDriverClass,DSID_JDBCDRIVERCLASS,bChangedSomething); return bChangedSomething; } - void OJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pDrvItem, SfxStringItem, DSID_JDBCDRIVERCLASS, true); @@ -585,7 +585,7 @@ using namespace ::com::sun::star; m_aETDriverClass.ClearModifyFlag(); } } - sal_Bool bEnable = pDrvItem->GetValue().getLength() != 0; + bool bEnable = pDrvItem->GetValue().getLength() != 0; m_aPBTestJavaDriver.Enable(bEnable); OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue); @@ -595,7 +595,7 @@ using namespace ::com::sun::star; bool OJDBCConnectionPageSetup::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); + bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty(); bEnableTestConnection = bEnableTestConnection && (!m_aETDriverClass.GetText().isEmpty()); return bEnableTestConnection; } @@ -603,7 +603,7 @@ using namespace ::com::sun::star; IMPL_LINK(OJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; #if HAVE_FEATURE_JAVA try { @@ -665,14 +665,14 @@ using namespace ::com::sun::star; } - void OSpreadSheetConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OSpreadSheetConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue); } bool OSpreadSheetConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); + bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); fillBool(_rSet,&m_aCBPasswordrequired,DSID_PASSWORDREQUIRED,bChangedSomething); return bChangedSomething; } @@ -720,10 +720,10 @@ using namespace ::com::sun::star; _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBPasswordRequired)); } - void OAuthentificationPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/) + void OAuthentificationPageSetup::implInitControls(const SfxItemSet& _rSet, bool /*_bSaveValue*/) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pUidItem, SfxStringItem, DSID_USER, true); SFX_ITEMSET_GET(_rSet, pAllowEmptyPwd, SfxBoolItem, DSID_PASSWORDREQUIRED, true); @@ -736,13 +736,13 @@ using namespace ::com::sun::star; bool OAuthentificationPageSetup::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; if (m_aETUserName.GetText() != m_aETUserName.GetSavedValue()) { _rSet.Put(SfxStringItem(DSID_USER, m_aETUserName.GetText())); _rSet.Put(SfxStringItem(DSID_PASSWORD, OUString())); - bChangedSomething = sal_True; + bChangedSomething = true; } fillBool(_rSet,&m_aCBPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething); return bChangedSomething; @@ -777,17 +777,17 @@ using namespace ::com::sun::star; } - sal_Bool OFinalDBPageSetup::IsDatabaseDocumentToBeRegistered() + bool OFinalDBPageSetup::IsDatabaseDocumentToBeRegistered() { return m_pRBRegisterDataSource->IsChecked() && m_pRBRegisterDataSource->IsEnabled(); } - sal_Bool OFinalDBPageSetup::IsDatabaseDocumentToBeOpened() + bool OFinalDBPageSetup::IsDatabaseDocumentToBeOpened() { return m_pCBOpenAfterwards->IsChecked() && m_pCBOpenAfterwards->IsEnabled(); } - sal_Bool OFinalDBPageSetup::IsTableWizardToBeStarted() + bool OFinalDBPageSetup::IsTableWizardToBeStarted() { return m_pCBStartTableWizard->IsChecked() && m_pCBStartTableWizard->IsEnabled(); } @@ -808,12 +808,12 @@ using namespace ::com::sun::star; _rControlList.push_back(new OSaveValueWrapper<RadioButton>(m_pRBDontregisterDataSource)); } - void OFinalDBPageSetup::implInitControls(const SfxItemSet& /*_rSet*/, sal_Bool /*_bSaveValue*/) + void OFinalDBPageSetup::implInitControls(const SfxItemSet& /*_rSet*/, bool /*_bSaveValue*/) { m_pCBOpenAfterwards->Check(); } - void OFinalDBPageSetup::enableTableWizardCheckBox( sal_Bool _bSupportsTableCreation) + void OFinalDBPageSetup::enableTableWizardCheckBox( bool _bSupportsTableCreation) { m_pCBStartTableWizard->Enable(_bSupportsTableCreation); } diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index 48bc687deb6e..f903b6824036 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -48,7 +48,7 @@ namespace dbaui virtual ~OSpreadSheetConnectionPageSetup(); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; @@ -66,8 +66,8 @@ namespace dbaui protected: virtual ~OTextConnectionPageSetup(); - virtual sal_Bool prepareLeave() SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual bool prepareLeave() SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; bool checkTestConnection() SAL_OVERRIDE; @@ -86,7 +86,7 @@ namespace dbaui virtual Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OLDAPConnectionPageSetup, OnEditModified); } protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; DECL_LINK(OnEditModified,Edit*); @@ -122,7 +122,7 @@ namespace dbaui virtual void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) SAL_OVERRIDE; virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual Link getControlModifiedLink() SAL_OVERRIDE; @@ -147,7 +147,7 @@ namespace dbaui protected: virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OGeneralSpecialJDBCConnectionPageSetup, OnEditModified); } @@ -182,7 +182,7 @@ namespace dbaui virtual bool checkTestConnection() SAL_OVERRIDE; virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; @@ -215,7 +215,7 @@ namespace dbaui protected: virtual bool FillItemSet(SfxItemSet& _rSet) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual ~OMySQLIntroPageSetup(); @@ -250,7 +250,7 @@ namespace dbaui virtual ~OAuthentificationPageSetup(); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; }; @@ -272,10 +272,10 @@ namespace dbaui FixedText* m_pFTFinalText; OFinalDBPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs); - sal_Bool IsDatabaseDocumentToBeRegistered(); - sal_Bool IsDatabaseDocumentToBeOpened(); - sal_Bool IsTableWizardToBeStarted(); - void enableTableWizardCheckBox( sal_Bool _bSupportsTableCreation); + bool IsDatabaseDocumentToBeRegistered(); + bool IsDatabaseDocumentToBeOpened(); + bool IsTableWizardToBeStarted(); + void enableTableWizardCheckBox( bool _bSupportsTableCreation); /// may be used in SetXXXHdl calls to controls, is a link to <method>OnControlModified</method> Link getControlModifiedLink() SAL_OVERRIDE { return LINK(this, OGenericAdministrationPage, OnControlModified); } @@ -285,7 +285,7 @@ namespace dbaui virtual ~OFinalDBPageSetup(); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; }; diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 6cd39e56ee71..9a326fcb2214 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -89,9 +89,9 @@ using namespace com::sun::star::frame; namespace { - sal_Bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, const TypeId _nExpectedItemType ) + bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, const TypeId _nExpectedItemType ) { - sal_Bool bCorrectType = sal_False; + bool bCorrectType = false; SfxItemPool* pPool = _rSet.GetPool(); OSL_ENSURE( pPool, "implCheckItemType: invalid item pool!" ); @@ -210,11 +210,11 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer } } -sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyValue >& _rDriverParam) +bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyValue >& _rDriverParam) { OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!"); if (!m_pItemSetHelper->getOutputSet()) - return sal_False; + return false; ::std::vector< PropertyValue > aReturn; // collecting this in a vector because it has a push_back, in opposite to sequences @@ -281,7 +281,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert // two continuations (Ok and Cancel) ::rtl::Reference< comphelper::OInteractionAbort > pAbort = new comphelper::OInteractionAbort; ::rtl::Reference< dbaccess::OAuthenticationContinuation > pAuthenticate = new dbaccess::OAuthenticationContinuation; - pAuthenticate->setCanChangeUserName( sal_False ); + pAuthenticate->setCanChangeUserName( false ); pAuthenticate->setRememberPassword( RememberAuthentication_SESSION ); // some knittings @@ -300,7 +300,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert DBG_UNHANDLED_EXCEPTION(); } if (!pAuthenticate->wasSelected()) - return sal_False; + return false; sPassword = pAuthenticate->getPassword(); if (pAuthenticate->getRememberPassword()) @@ -319,7 +319,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert // append all the other stuff (charset etc.) fillDatasourceInfo(*m_pItemSetHelper->getOutputSet(), _rDriverParam); - return sal_True; + return true; } void ODbDataSourceAdministrationHelper::successfullyConnected() @@ -454,7 +454,7 @@ OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& return pCollection->getType(pConnectURL->GetValue()); } -sal_Bool ODbDataSourceAdministrationHelper::hasAuthentication(const SfxItemSet& _rSet) const +bool ODbDataSourceAdministrationHelper::hasAuthentication(const SfxItemSet& _rSet) const { return DataSourceMetaData::getAuthentication( getDatasourceType( _rSet ) ) != AuthNone; } @@ -858,7 +858,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem* if ( !pOptBoolItem->HasValue() ) aValue.clear(); else - aValue <<= (sal_Bool)pOptBoolItem->GetValue(); + aValue <<= pOptBoolItem->GetValue(); } else if ( pInt32Item ) { @@ -930,7 +930,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet case TypeClass_BOOLEAN: if ( implCheckItemType( _rSet, _nId, SfxBoolItem::StaticType() ) ) { - sal_Bool bVal = sal_False; + bool bVal = false; _rValue >>= bVal; _rSet.Put(SfxBoolItem(_nId, bVal)); } @@ -939,7 +939,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet OptionalBoolItem aItem( _nId ); if ( _rValue.hasValue() ) { - sal_Bool bValue = sal_False; + bool bValue = false; _rValue >>= bValue; aItem.SetValue( bValue ); } @@ -1081,16 +1081,16 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest) } -sal_Bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSource) +bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSource) { // put the remembered settings into the property set Reference<XPropertySet> xDatasource = getCurrentDataSource(); if ( !xDatasource.is() ) - return sal_False; + return false; translateProperties(_rSource,xDatasource ); - return sal_True; + return true; } void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSourceOrName ) diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx index c303443f1b22..de06359af2bd 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx @@ -79,7 +79,7 @@ namespace dbaui /** translate the current dialog SfxItems into driver relevant PropertyValues @see successfullyConnected */ - sal_Bool getCurrentSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverParams); + bool getCurrentSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverParams); /** to be called if the settings got from getCurrentSettings have been used for successfully connecting @see getCurrentSettings @@ -146,7 +146,7 @@ namespace dbaui const SfxItemSet& _rSource, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDest); - sal_Bool saveChanges(const SfxItemSet& _rSource); + bool saveChanges(const SfxItemSet& _rSource); protected: /** fill a data source info array with the settings from a given item set */ @@ -164,7 +164,7 @@ namespace dbaui /** check if the data source described by the given set needs authentication<p/> The return value depends on the data source type only. */ - sal_Bool hasAuthentication(const SfxItemSet& _rSet) const; + bool hasAuthentication(const SfxItemSet& _rSet) const; #if OSL_DEBUG_LEVEL > 0 OString translatePropertyId( sal_Int32 _nId ); diff --git a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx index fd37bcdeaa6f..1907630ada63 100644 --- a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx +++ b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx @@ -13,7 +13,7 @@ namespace dbaui { QueryPropertiesDialog::QueryPropertiesDialog( - Window* pParent, const sal_Bool bDistinct, const sal_Int64 nLimit ) + Window* pParent, const bool bDistinct, const sal_Int64 nLimit ) : ModalDialog(pParent, "QueryPropertiesDialog", "dbaccess/ui/querypropertiesdialog.ui") , m_pRB_Distinct( 0 ) , m_pRB_NonDistinct( 0 ) diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx index a3baa4a101e1..8d20092b256b 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.cxx +++ b/dbaccess/source/ui/dlg/RelationDlg.cxx @@ -50,7 +50,7 @@ using namespace ::dbtools; // class ORelationDialog ORelationDialog::ORelationDialog( OJoinTableView* pParent, const TTableConnectionData::value_type& pConnectionData, - sal_Bool bAllowTableSelect ) + bool bAllowTableSelect ) : ModalDialog(pParent, "RelationDialog", "dbaccess/ui/relationdialog.ui") , m_pTableMap(pParent->GetTabWinMap()) @@ -196,7 +196,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ ) DBG_UNHANDLED_EXCEPTION(); } - m_bTriedOneUpdate = sal_True; + m_bTriedOneUpdate = true; // this means that the original connection may be lost (if m_pConnData was not a newly created but an // existent conn to be modified), which we reflect by returning RET_NO (see ::Execute) diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index 33051d3870cb..f7f2789ef8b2 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -44,7 +44,7 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent : SfxSingleTabDialog(pParent, _pItems, "TablesFilterDialog", "dbaccess/ui/tablesfilterdialog.ui") , m_pImpl( new ODbDataSourceAdministrationHelper( _rxORB, pParent, this ) ) - , m_bStopExecution(sal_False) + , m_bStopExecution(false) , m_pOutSet(_pItems) { m_pImpl->setDataSourceOrName(_aDataSourceName); @@ -79,7 +79,7 @@ short OTableSubscriptionDialog::Execute() return nRet; } -sal_Bool OTableSubscriptionDialog::getCurrentSettings(Sequence< PropertyValue >& _rDriverParams) +bool OTableSubscriptionDialog::getCurrentSettings(Sequence< PropertyValue >& _rDriverParams) { return m_pImpl->getCurrentSettings(_rDriverParams); } diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 8edd41944493..bc8b7b2c7c68 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -221,7 +221,7 @@ namespace dbaui IMPL_LINK(OTextConnectionHelper, OnSetExtensionHdl, RadioButton*, /*_pRadioButton*/) { - sal_Bool bDoEnable = m_aRBAccessOtherFiles.IsChecked(); + bool bDoEnable = m_aRBAccessOtherFiles.IsChecked(); m_aETOwnExtension.Enable(bDoEnable); m_aFTExtensionExample.Enable(bDoEnable); m_aGetExtensionHandler.Call(this); @@ -249,7 +249,7 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<ListBox>(&m_aCharSet)); } - void OTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, sal_Bool _bValid) + void OTextConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bValid) { if ( !_bValid ) return; @@ -287,7 +287,7 @@ namespace dbaui } } - sal_Bool OTextConnectionHelper::prepareLeave() + bool OTextConnectionHelper::prepareLeave() { LocalResourceAccess aStringResAccess(PAGE_TEXT, RSC_TABPAGE); // for accessing the strings which are local to our own resource block @@ -356,15 +356,15 @@ namespace dbaui pErrorWin = &m_aETOwnExtension; } else - return sal_True; + return true; ErrorBox(NULL, WB_OK, MnemonicGenerator::EraseAllMnemonicChars( aErrorText)).Execute(); pErrorWin->GrabFocus(); - return 0; + return false; } - sal_Bool OTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const sal_Bool _bChangedSomething ) + bool OTextConnectionHelper::FillItemSet( SfxItemSet& rSet, const bool _bChangedSomething ) { - sal_Bool bChangedSomething = _bChangedSomething; + bool bChangedSomething = _bChangedSomething; if ( ( m_nAvailableSections & TC_EXTENSION ) != 0 ) { @@ -372,7 +372,7 @@ namespace dbaui if( m_aOldExtension != sExtension ) { rSet.Put( SfxStringItem( DSID_TEXTFILEEXTENSION, sExtension ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } } @@ -381,7 +381,7 @@ namespace dbaui if( (m_aRowHeader.GetState() != m_aRowHeader.GetSavedValue()) ) { rSet.Put(SfxBoolItem(DSID_TEXTFILEHEADER, m_aRowHeader.IsChecked())); - bChangedSomething = sal_True; + bChangedSomething = true; } } @@ -390,30 +390,30 @@ namespace dbaui if( m_aFieldSeparator.GetText() != m_aFieldSeparator.GetSavedValue() ) { rSet.Put( SfxStringItem(DSID_FIELDDELIMITER, GetSeparator( m_aFieldSeparator, m_aFieldSeparatorList) ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } if( m_aTextSeparator.GetText() != m_aTextSeparator.GetSavedValue() ) { rSet.Put( SfxStringItem(DSID_TEXTDELIMITER, GetSeparator( m_aTextSeparator, m_aTextSeparatorList) ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } if( m_aDecimalSeparator.GetText() != m_aDecimalSeparator.GetSavedValue() ) { rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_aDecimalSeparator.GetText().copy(0, 1) ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } if( m_aThousandsSeparator.GetText() != m_aThousandsSeparator.GetSavedValue() ) { rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_aThousandsSeparator.GetText().copy(0,1) ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } } if ( ( m_nAvailableSections & TC_CHARSET ) != 0 ) { if ( m_aCharSet.StoreSelectedCharSet( rSet, DSID_CHARSET ) ) - bChangedSomething = sal_True; + bChangedSomething = true; } return bChangedSomething; diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index 156bf3377d96..168a6e1fc7a1 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -91,13 +91,13 @@ namespace dbaui void SetExtension(const OUString& _rVal); public: - void implInitControls(const SfxItemSet& _rSet, sal_Bool _bValid); + void implInitControls(const SfxItemSet& _rSet, bool _bValid); void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); void SetClickHandler(const Link& _rHandler) { m_aGetExtensionHandler = _rHandler; } OUString GetExtension(); - sal_Bool FillItemSet( SfxItemSet& rSet, const sal_Bool bChangedSomething ); - sal_Bool prepareLeave(); + bool FillItemSet( SfxItemSet& rSet, const bool bChangedSomething ); + bool prepareLeave(); }; } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index 6fbbc52220a3..aff54572bba8 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -282,7 +282,7 @@ void OUserAdmin::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlLis { } -void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) +void OUserAdmin::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { m_TableCtrl.setComponentContext(m_xORB); try diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx index 9d7d508378a8..698fde194b52 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.hxx +++ b/dbaccess/source/ui/dlg/UserAdmin.hxx @@ -71,7 +71,7 @@ public: OUString GetUser(); // must be overloaded by subclasses, but it isn't pure virtual - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; // <method>OGenericAdministrationPage::fillControls</method> virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index e2b810fb5a28..594fdc4daa92 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -167,7 +167,7 @@ namespace dbaui { (void)_bEnable; } - sal_Bool OUserAdminDlg::saveDatasource() + bool OUserAdminDlg::saveDatasource() { return PrepareLeaveCurrentPage(); } diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 8e4800cf674d..a33958dc4b7f 100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -194,7 +194,7 @@ namespace dbaui bool MySQLNativeSettings::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; OGenericAdministrationPage::fillString( _rSet, &m_aHostName, DSID_CONN_HOSTNAME, bChangedSomething ); OGenericAdministrationPage::fillString( _rSet, &m_aDatabaseName, DSID_DATABASENAME, bChangedSomething ); diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 6495e5bda1a8..9c194c8b7254 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -60,7 +60,7 @@ namespace dbaui // OGenericAdministrationPage OGenericAdministrationPage::OGenericAdministrationPage(Window* _pParent, const ResId& _rId, const SfxItemSet& _rAttrSet) :SfxTabPage(_pParent, _rId, _rAttrSet) - ,m_abEnableRoadmap(sal_False) + ,m_abEnableRoadmap(false) ,m_pAdminDialog(NULL) ,m_pItemSetHelper(NULL) ,m_pFT_HeaderText(NULL) @@ -71,7 +71,7 @@ namespace dbaui OGenericAdministrationPage::OGenericAdministrationPage(Window* _pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet) :SfxTabPage(_pParent, _rId, _rUIXMLDescription, _rAttrSet) - ,m_abEnableRoadmap(sal_False) + ,m_abEnableRoadmap(false) ,m_pAdminDialog(NULL) ,m_pItemSetHelper(NULL) ,m_pFT_HeaderText(NULL) @@ -100,7 +100,7 @@ namespace dbaui void OGenericAdministrationPage::Reset(const SfxItemSet& _rCoreAttrs) { - implInitControls(_rCoreAttrs, sal_False); + implInitControls(_rCoreAttrs, false); } void OGenericAdministrationPage::ActivatePage() { @@ -111,10 +111,10 @@ namespace dbaui } void OGenericAdministrationPage::ActivatePage(const SfxItemSet& _rSet) { - implInitControls(_rSet, sal_True); + implInitControls(_rSet, true); } - void OGenericAdministrationPage::getFlags(const SfxItemSet& _rSet, sal_Bool& _rValid, sal_Bool& _rReadonly) + void OGenericAdministrationPage::getFlags(const SfxItemSet& _rSet, bool& _rValid, bool& _rReadonly) { SFX_ITEMSET_GET(_rSet, pInvalid, SfxBoolItem, DSID_INVALID_SELECTION, true); _rValid = !pInvalid || !pInvalid->GetValue(); @@ -127,7 +127,7 @@ namespace dbaui callModifiedHdl(); return 0L; } - sal_Bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn,OUString& _sCurr) + bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn, OUString& _sCurr) { // collect all ODBC data source names StringBag aOdbcDatasources; @@ -139,7 +139,7 @@ namespace dbaui sError = sError.replaceFirst("#lib#", aEnumeration.getLibraryName()); ErrorBox aDialog(this, WB_OK, sError); aDialog.Execute(); - return sal_False; + return false; } else { @@ -151,13 +151,13 @@ namespace dbaui if ( RET_OK == aSelector.Execute() ) _sReturn = aSelector.GetSelected(); } - return sal_True; + return true; } - void OGenericAdministrationPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OGenericAdministrationPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); ::std::vector< ISaveValueWrapper* > aControlList; @@ -191,11 +191,11 @@ namespace dbaui { return true; } - void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue ) + void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, bool& _bChangedSomething, bool _bRevertValue ) { if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) ) { - sal_Bool bValue = _pCheckBox->IsChecked(); + bool bValue = _pCheckBox->IsChecked(); if ( _bRevertValue ) bValue = !bValue; @@ -209,23 +209,23 @@ namespace dbaui else _rSet.Put( SfxBoolItem( _nID, bValue ) ); - _bChangedSomething = sal_True; + _bChangedSomething = true; } } - void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething) + void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet, NumericField* _pEdit, sal_uInt16 _nID, bool& _bChangedSomething) { if( (_pEdit != NULL) && (_pEdit->GetValue() != _pEdit->GetSavedValue().toInt32()) ) { _rSet.Put(SfxInt32Item(_nID, static_cast<sal_Int32>(_pEdit->GetValue()))); - _bChangedSomething = sal_True; + _bChangedSomething = true; } } - void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething) + void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, Edit* _pEdit, sal_uInt16 _nID, bool& _bChangedSomething) { if( (_pEdit != NULL) && (_pEdit->GetText() != _pEdit->GetSavedValue()) ) { _rSet.Put(SfxStringItem(_nID, _pEdit->GetText())); - _bChangedSomething = sal_True; + _bChangedSomething = true; } } @@ -239,12 +239,12 @@ namespace dbaui IMPL_LINK(OGenericAdministrationPage, OnTestConnectionClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if ( m_pAdminDialog ) { m_pAdminDialog->saveDatasource(); - OGenericAdministrationPage::implInitControls(*m_pItemSetHelper->getOutputSet(), sal_True); - sal_Bool bShowMessage = sal_True; + OGenericAdministrationPage::implInitControls(*m_pItemSetHelper->getOutputSet(), true); + bool bShowMessage = true; try { ::std::pair< Reference<XConnection>,sal_Bool> xConnection = m_pAdminDialog->createConnection(); diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 514321e873b5..667a7a4683e0 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -94,7 +94,7 @@ namespace dbaui { private: Link m_aModifiedHandler; /// to be called if something on the page has been modified - sal_Bool m_abEnableRoadmap; + bool m_abEnableRoadmap; protected: IDatabaseSettingsDialog* m_pAdminDialog; IItemSetHelper* m_pItemSetHelper; @@ -141,14 +141,14 @@ namespace dbaui @return <FALSE/> if an error occurred, otherwise <TRUE/> */ - sal_Bool getSelectedDataSource(OUString& _sReturn,OUString& _sCurr); + bool getSelectedDataSource(OUString& _sReturn, OUString& _sCurr); // svt::IWizardPageController virtual void initializePage() SAL_OVERRIDE; virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE; virtual bool canAdvance() const SAL_OVERRIDE; - void SetRoadmapStateValue( sal_Bool _bDoEnable ) { m_abEnableRoadmap = _bDoEnable; } + void SetRoadmapStateValue( bool _bDoEnable ) { m_abEnableRoadmap = _bDoEnable; } bool GetRoadmapStateValue() const { return m_abEnableRoadmap; } protected: @@ -167,15 +167,15 @@ namespace dbaui void callModifiedHdl() const { if (m_aModifiedHandler.IsSet()) m_aModifiedHandler.Call((void*)this); } /// called from within DeactivatePage. The page is allowed to be deactivated if this method returns sal_True - virtual sal_Bool prepareLeave() { return sal_True; } + virtual bool prepareLeave() { return true; } /** called from within Reset and ActivatePage, use to initialize the controls with the items from the given set @param _bSaveValue if set to sal_True, the implementation should call SaveValue on all relevant controls */ - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue); /// analyze the invalid and the readonly flag which may be present in the set - void getFlags(const SfxItemSet& _rSet, sal_Bool& _rValid, sal_Bool& _rReadonly); + void getFlags(const SfxItemSet& _rSet, bool& _rValid, bool& _rReadonly); /** will be called inside <method>implInitControls</method> to save the value if necessary @param _rControlList @@ -204,7 +204,7 @@ namespace dbaui @param _bRevertValue set to <TRUE/> if the display value should be reverted before putting it into the set */ - static void fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue = false); + static void fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, bool& _bChangedSomething, bool _bRevertValue = false); /** fills the int value into the item set when the value changed. @param _rSet @@ -216,7 +216,7 @@ namespace dbaui @param _bChangedSomething <TRUE/> if something changed otherwise <FALSE/> */ - static void fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething); + static void fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID, bool& _bChangedSomething); /** fills the String value into the item set when the value changed. @param _rSet @@ -228,7 +228,7 @@ namespace dbaui @param _bChangedSomething <TRUE/> if something changed otherwise <FALSE/> */ - static void fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething); + static void fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID, bool& _bChangedSomething); protected: // used to set the right Pane header of a wizard to bold diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 780f1e7e8d64..05e3cd7427ae 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -199,10 +199,10 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<NumericField>(m_pMaxRowScan)); } - void SpecialSettingsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void SpecialSettingsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags( _rSet, bValid, bReadonly ); if ( !bValid ) @@ -266,7 +266,7 @@ namespace dbaui bool SpecialSettingsPage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; // the boolean items for ( BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin(); @@ -285,7 +285,7 @@ namespace dbaui if ( m_pBooleanComparisonMode->GetSelectEntryPos() != m_pBooleanComparisonMode->GetSavedValue() ) { _rSet.Put( SfxInt32Item( DSID_BOOLEANCOMPARISON, m_pBooleanComparisonMode->GetSelectEntryPos() ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } } if ( m_bHasMaxRowScan ) @@ -332,10 +332,10 @@ namespace dbaui _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pAutoRetrieving ) ); } - void GeneratedValuesPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) + void GeneratedValuesPage::implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); // collect the items @@ -346,7 +346,7 @@ namespace dbaui // forward the values to the controls if (bValid) { - sal_Bool bEnabled = pAutoRetrieveEnabledItem->GetValue(); + bool bEnabled = pAutoRetrieveEnabledItem->GetValue(); m_pAutoRetrievingEnabled->Check( bEnabled ); m_pAutoIncrement->SetText( pAutoIncrementItem->GetValue() ); @@ -359,7 +359,7 @@ namespace dbaui bool GeneratedValuesPage::FillItemSet(SfxItemSet& _rSet) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; fillString( _rSet, m_pAutoIncrement, DSID_AUTOINCREMENTVALUE, bChangedSomething ); fillBool( _rSet, m_pAutoRetrievingEnabled, DSID_AUTORETRIEVEENABLED, bChangedSomething ); @@ -488,7 +488,7 @@ namespace dbaui (void)_bEnable; } - sal_Bool AdvancedSettingsDialog::saveDatasource() + bool AdvancedSettingsDialog::saveDatasource() { return PrepareLeaveCurrentPage(); } diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index 90a6d6fc00b2..acb3532b42f9 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -80,7 +80,7 @@ namespace dbaui virtual ~SpecialSettingsPage(); // OGenericAdministrationPage overridables - virtual void implInitControls (const SfxItemSet& _rSet, sal_Bool _bSaveValue ) SAL_OVERRIDE; + virtual void implInitControls (const SfxItemSet& _rSet, bool _bSaveValue ) SAL_OVERRIDE; // <method>OGenericAdministrationPage::fillControls</method> virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; @@ -117,7 +117,7 @@ namespace dbaui virtual ~GeneratedValuesPage(); // must be overloaded by subclasses, but it isn't pure virtual - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; // <method>OGenericAdministrationPage::fillControls</method> virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index bfd15f183b28..8a39db161eb5 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -226,7 +226,7 @@ void ODbAdminDialog::enableConfirmSettings( bool _bEnable ) (void)_bEnable; } -sal_Bool ODbAdminDialog::saveDatasource() +bool ODbAdminDialog::saveDatasource() { return PrepareLeaveCurrentPage(); } @@ -247,7 +247,7 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges() // This way, next time they're asked what has changed since now and here, they really // can compare with the status they have _now_ (not the one they had before this apply call). - m_bApplied = sal_True; + m_bApplied = true; return AR_LEAVE_MODIFIED; } diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index ed4ad220fece..e5ff3b6344e0 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -76,7 +76,7 @@ ODbaseIndexDialog::ODbaseIndexDialog(Window * pParent, const OUString& aDataSrcN SetCtrls(); } -sal_Bool ODbaseIndexDialog::GetTable(const OUString& _rName, TableInfoList::iterator& _rPosition) +bool ODbaseIndexDialog::GetTable(const OUString& _rName, TableInfoList::iterator& _rPosition) { for ( _rPosition = m_aTableInfoList.begin(); _rPosition != m_aTableInfoList.end(); @@ -86,15 +86,15 @@ sal_Bool ODbaseIndexDialog::GetTable(const OUString& _rName, TableInfoList::iter if (m_bCaseSensitiv) { if (_rPosition->aTableName == _rName) - return sal_True; + return true; } else { if (_rPosition->aTableName.equalsIgnoreAsciiCase(_rName)) - return sal_True; + return true; } } - return sal_False; + return false; } void ODbaseIndexDialog::checkButtons() @@ -106,7 +106,7 @@ void ODbaseIndexDialog::checkButtons() m_pRemoveAll->Enable(0 != m_pLB_TableIndexes->GetEntryCount()); } -OTableIndex ODbaseIndexDialog::implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, sal_Bool _bMustExist) +OTableIndex ODbaseIndexDialog::implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, bool _bMustExist) { OTableIndex aReturn; @@ -147,7 +147,7 @@ void ODbaseIndexDialog::implInsertIndex(const OTableIndex& _rIndex, TableIndexLi _rDisplay.SelectEntryPos(0); } -OTableIndex ODbaseIndexDialog::RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName, sal_Bool _bMustExist ) +OTableIndex ODbaseIndexDialog::RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName, bool _bMustExist ) { OTableIndex aReturn; @@ -186,7 +186,7 @@ IMPL_LINK( ODbaseIndexDialog, AddClickHdl, PushButton*, /*pButton*/ ) { OUString aSelection = m_pLB_FreeIndexes->GetSelectEntry(); OUString aTableName = m_pCB_Tables->GetText(); - OTableIndex aIndex = RemoveFreeIndex( aSelection, sal_True ); + OTableIndex aIndex = RemoveFreeIndex( aSelection, true ); InsertTableIndex( aTableName, aIndex ); checkButtons(); @@ -197,7 +197,7 @@ IMPL_LINK( ODbaseIndexDialog, RemoveClickHdl, PushButton*, /*pButton*/ ) { OUString aSelection = m_pLB_TableIndexes->GetSelectEntry(); OUString aTableName = m_pCB_Tables->GetText(); - OTableIndex aIndex = RemoveTableIndex( aTableName, aSelection, sal_True ); + OTableIndex aIndex = RemoveTableIndex( aTableName, aSelection, true ); InsertFreeIndex( aIndex ); checkButtons(); @@ -210,7 +210,7 @@ IMPL_LINK( ODbaseIndexDialog, AddAllClickHdl, PushButton*, /*pButton*/ ) OUString aTableName = m_pCB_Tables->GetText(); for( sal_uInt16 nPos = 0; nPos < nCnt; ++nPos ) - InsertTableIndex( aTableName, RemoveFreeIndex( m_pLB_FreeIndexes->GetEntry(0), sal_True ) ); + InsertTableIndex( aTableName, RemoveFreeIndex( m_pLB_FreeIndexes->GetEntry(0), true ) ); checkButtons(); return 0; @@ -222,7 +222,7 @@ IMPL_LINK( ODbaseIndexDialog, RemoveAllClickHdl, PushButton*, /*pButton*/ ) OUString aTableName = m_pCB_Tables->GetText(); for( sal_uInt16 nPos = 0; nPos < nCnt; ++nPos ) - InsertFreeIndex( RemoveTableIndex( aTableName, m_pLB_TableIndexes->GetEntry(0), sal_True ) ); + InsertFreeIndex( RemoveTableIndex( aTableName, m_pLB_TableIndexes->GetEntry(0), true ) ); checkButtons(); return 0; @@ -278,7 +278,7 @@ void ODbaseIndexDialog::Init() // String aFileName = aURL.PathToFileName(); m_aDSN = aURL.GetMainURL(INetURLObject::NO_DECODE); ::ucbhelper::Content aFile; - sal_Bool bFolder=sal_True; + bool bFolder=true; try { aFile = ::ucbhelper::Content(m_aDSN,Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext()); @@ -353,7 +353,7 @@ void ODbaseIndexDialog::Init() aUsedIndex != aUsedIndexes.end(); ++aUsedIndex ) - RemoveFreeIndex( *aUsedIndex, sal_False ); + RemoveFreeIndex( *aUsedIndex, false ); if (m_aTableInfoList.size()) { @@ -468,7 +468,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const try { ::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aContent.executeCommand( OUString("delete"),makeAny( sal_Bool( sal_True ) ) ); + aContent.executeCommand( OUString("delete"), makeAny( true ) ); } catch (const Exception& e ) { diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index adebe92af517..e2cc016a9085 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -95,18 +95,18 @@ protected: OUString m_aDSN; TableInfoList m_aTableInfoList; TableIndexList m_aFreeIndexList; - sal_Bool m_bCaseSensitiv; + bool m_bCaseSensitiv; void Init(); void SetCtrls(); - sal_Bool GetTable(const OUString& rName, TableInfoList::iterator& _rPosition); + bool GetTable(const OUString& rName, TableInfoList::iterator& _rPosition); - OTableIndex implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, sal_Bool _bMustExist); + OTableIndex implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, bool _bMustExist); void implInsertIndex(const OTableIndex& _rIndex, TableIndexList& _rList, ListBox& _rDisplay); - OTableIndex RemoveFreeIndex( const OUString& _rName, sal_Bool _bMustExist ) { return implRemoveIndex(_rName, m_aFreeIndexList, *m_pLB_FreeIndexes, _bMustExist); } + OTableIndex RemoveFreeIndex( const OUString& _rName, bool _bMustExist ) { return implRemoveIndex(_rName, m_aFreeIndexList, *m_pLB_FreeIndexes, _bMustExist); } void InsertFreeIndex( const OTableIndex& _rIndex ) { implInsertIndex(_rIndex, m_aFreeIndexList, *m_pLB_FreeIndexes); } - OTableIndex RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName, sal_Bool _bMustExist ); + OTableIndex RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName, bool _bMustExist ); void InsertTableIndex( const OUString& _rTableName, const OTableIndex& _rIndex ); void checkButtons(); diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 22212d98d1ab..30779c7ad23b 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -70,9 +70,9 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent ) :OWizardMachine(_pParent, ModuleRes(DLG_DATABASE_TYPE_CHANGE), WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ) ,m_pOutSet(NULL) - ,m_bResetting(sal_False) - ,m_bApplied(sal_False) - ,m_bUIEnabled( sal_True ) + ,m_bResetting(false) + ,m_bApplied(false) + ,m_bUIEnabled( true ) { m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,this,this)); m_pImpl->setDataSourceOrName(_aDataSourceName); @@ -320,7 +320,7 @@ void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable ) // anormal tab dialog. } -sal_Bool ODbTypeWizDialog::saveDatasource() +bool ODbTypeWizDialog::saveDatasource() { SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState())); if ( pPage ) @@ -330,7 +330,7 @@ sal_Bool ODbTypeWizDialog::saveDatasource() if ( m_pImpl->getCurrentDataSource().is() ) m_pImpl->getCurrentDataSource()->getPropertyValue(PROPERTY_URL) >>= sOldURL; DataSourceInfoConverter::convert( getORB(), m_pCollection,sOldURL,m_eType,m_pImpl->getCurrentDataSource()); - return sal_True; + return true; } IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPage ) const diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 7067e37f7ede..39a655ba7bcb 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -111,10 +111,10 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ) , m_pOutSet(NULL) - , m_bResetting(sal_False) - , m_bApplied(sal_False) - , m_bUIEnabled( sal_True ) - , m_bIsConnectable( sal_False) + , m_bResetting(false) + , m_bApplied(false) + , m_bUIEnabled( true ) + , m_bIsConnectable( false) , m_sRM_IntroText( ModuleRes( STR_PAGETITLE_INTROPAGE ) ) , m_sRM_dBaseText( ModuleRes( STR_PAGETITLE_DBASE ) ) , m_sRM_TextText( ModuleRes( STR_PAGETITLE_TEXT ) ) @@ -358,11 +358,11 @@ void ODbTypeWizDialogSetup::activateDatabasePath() void ODbTypeWizDialogSetup::updateTypeDependentStates() { - sal_Bool bDoEnable = sal_False; - sal_Bool bIsConnectionRequired = IsConnectionUrlRequired(); + bool bDoEnable = false; + bool bIsConnectionRequired = IsConnectionUrlRequired(); if (!bIsConnectionRequired) { - bDoEnable = sal_True; + bDoEnable = true; } else if ( m_sURL == m_sOldURL ) { @@ -373,7 +373,7 @@ void ODbTypeWizDialogSetup::updateTypeDependentStates() enableButtons( WZB_FINISH, bDoEnable); } -sal_Bool ODbTypeWizDialogSetup::IsConnectionUrlRequired() +bool ODbTypeWizDialogSetup::IsConnectionUrlRequired() { return m_pCollection->isConnectionUrlRequired(m_sURL); } @@ -638,12 +638,12 @@ void ODbTypeWizDialogSetup::enterState(WizardState _nState) } } -sal_Bool ODbTypeWizDialogSetup::saveDatasource() +bool ODbTypeWizDialogSetup::saveDatasource() { SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState())); if ( pPage ) pPage->FillItemSet(*m_pOutSet); - return sal_True; + return true; } bool ODbTypeWizDialogSetup::leaveState(WizardState _nState) @@ -682,12 +682,12 @@ namespace } } -sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() +bool ODbTypeWizDialogSetup::SaveDatabaseDocument() { Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(getORB(), 0) ); try { - if (callSaveAsDialog() == sal_True) + if (callSaveAsDialog()) { m_pImpl->saveChanges(*m_pOutSet); Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); @@ -698,7 +698,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() CreateDatabase(); ::comphelper::NamedValueCollection aArgs( xModel->getArgs() ); - aArgs.put( "Overwrite", sal_Bool( sal_True ) ); + aArgs.put( "Overwrite", true ); aArgs.put( "InteractionHandler", xHandler ); aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG ); @@ -708,7 +708,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() if ( !m_pFinalPage || m_pFinalPage->IsDatabaseDocumentToBeRegistered() ) RegisterDataSourceByLocation( sPath ); - return sal_True; + return true; } } catch ( const Exception& e ) @@ -731,29 +731,29 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } } } - return sal_False; + return false; } - sal_Bool ODbTypeWizDialogSetup::IsDatabaseDocumentToBeOpened() const + bool ODbTypeWizDialogSetup::IsDatabaseDocumentToBeOpened() const { if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting ) - return sal_True; + return true; if ( m_pFinalPage != NULL ) return m_pFinalPage->IsDatabaseDocumentToBeOpened(); - return sal_True; + return true; } - sal_Bool ODbTypeWizDialogSetup::IsTableWizardToBeStarted() const + bool ODbTypeWizDialogSetup::IsTableWizardToBeStarted() const { if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting ) - return sal_False; + return false; if ( m_pFinalPage != NULL ) return m_pFinalPage->IsTableWizardToBeStarted(); - return sal_False; + return false; } void ODbTypeWizDialogSetup::CreateDatabase() @@ -794,9 +794,9 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() xDatabaseContext->registerObject(sDatabaseName, xDatasource); } - sal_Bool ODbTypeWizDialogSetup::callSaveAsDialog() + bool ODbTypeWizDialogSetup::callSaveAsDialog() { - sal_Bool bRet = sal_False; + bool bRet = false; ::sfx2::FileDialogHelper aFileDlg( ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0, this); @@ -826,7 +826,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() if ( ::utl::UCBContentHelper::IsDocument(sFileName) ) ::utl::UCBContentHelper::Kill(sFileName); m_pOutSet->Put(SfxStringItem(DSID_DOCUMENT_URL, sFileName)); - bRet = sal_True; + bRet = true; } } return bRet; @@ -836,12 +836,12 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() { Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(getORB())); :: OUString sLastSegmentName = pURL->getName(); - sal_Bool bFolderExists = sal_True; + bool bFolderExists = true; sal_Int32 i = 1; - while (bFolderExists == sal_True) + while (bFolderExists) { bFolderExists = xSimpleFileAccess->isFolder(pURL->GetMainURL( INetURLObject::NO_DECODE )); - if (bFolderExists == sal_True) + if (bFolderExists) { i++; pURL->setName(sLastSegmentName.concat(OUString::number(i))); @@ -854,7 +854,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(getORB())); OUString BaseName = _rURL.getBase(); - sal_Bool bElementExists = sal_True; + bool bElementExists = true; INetURLObject aExistenceCheck( _rURL ); for ( sal_Int32 i = 1; bElementExists; ) diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index de2718c7fc3d..2afb25309438 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -156,10 +156,10 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<ListBox>(m_pCharset)); } - void OCommonBehaviourTabPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OCommonBehaviourTabPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); // collect the items @@ -185,7 +185,7 @@ namespace dbaui bool OCommonBehaviourTabPage::FillItemSet(SfxItemSet& _rSet) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS) { @@ -195,7 +195,7 @@ namespace dbaui if ((m_nControlFlags & CBTP_USE_CHARSET) == CBTP_USE_CHARSET) { if ( m_pCharset->StoreSelectedCharSet( _rSet, DSID_CHARSET ) ) - bChangedSomething = sal_True; + bChangedSomething = true; } return bChangedSomething; @@ -241,10 +241,10 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFT_Message)); _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aIndexes)); } - void ODbaseDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void ODbaseDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); // get the DSN string (needed for the index dialog) @@ -268,7 +268,7 @@ namespace dbaui bool ODbaseDetailsPage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); fillBool(_rSet,&m_aShowDeleted,DSID_SHOWDELETEDROWS,bChangedSomething); return bChangedSomething; @@ -332,7 +332,7 @@ namespace dbaui bool OOdbcDetailsPage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); fillBool(_rSet,&m_aUseCatalog,DSID_USECATALOG,bChangedSomething); return bChangedSomething; } @@ -346,10 +346,10 @@ namespace dbaui OCommonBehaviourTabPage::fillWindows(_rControlList); _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1)); } - void OOdbcDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OOdbcDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pUseCatalogItem, SfxBoolItem, DSID_USECATALOG, true); @@ -380,7 +380,7 @@ namespace dbaui bool OUserDriverDetailsPage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); fillInt32(_rSet,&m_aNFPortNumber,DSID_CONN_PORTNUMBER,bChangedSomething); fillString(_rSet,&m_aEDHostname,DSID_CONN_HOSTNAME,bChangedSomething); @@ -401,10 +401,10 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostname)); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aPortNumber)); } - void OUserDriverDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OUserDriverDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pUseCatalogItem, SfxBoolItem, DSID_USECATALOG, true); @@ -513,7 +513,7 @@ namespace dbaui bool OGeneralSpecialJDBCDetailsPage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); if ( m_bUseClass ) fillString(_rSet,&m_aEDDriverClass,DSID_JDBCDRIVERCLASS,bChangedSomething); fillString(_rSet,&m_aEDHostname,DSID_CONN_HOSTNAME,bChangedSomething); @@ -522,10 +522,10 @@ namespace dbaui return bChangedSomething; } - void OGeneralSpecialJDBCDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OGeneralSpecialJDBCDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pDrvItem, SfxStringItem, DSID_JDBCDRIVERCLASS, true); @@ -565,7 +565,7 @@ namespace dbaui OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); OSL_ENSURE(m_bUseClass,"Who called me?"); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; #if HAVE_FEATURE_JAVA try { @@ -640,9 +640,9 @@ namespace dbaui bool MySQLNativePage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet ); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet ); - bChangedSomething |= (m_aMySQLSettings.FillItemSet( _rSet ) ? 1 : 0); + bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet ); if ( m_aUserName.GetText() != m_aUserName.GetSavedValue() ) { @@ -654,10 +654,10 @@ namespace dbaui return bChangedSomething; } - void MySQLNativePage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void MySQLNativePage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); m_aMySQLSettings.implInitControls( _rSet ); @@ -720,7 +720,7 @@ namespace dbaui bool OLDAPDetailsPage::FillItemSet( SfxItemSet& _rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); fillString(_rSet,&m_aETBaseDN,DSID_CONN_LDAP_BASEDN,bChangedSomething); fillInt32(_rSet,&m_aNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething); @@ -763,10 +763,10 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTRowCount)); _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1)); } - void OLDAPDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OLDAPDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); SFX_ITEMSET_GET(_rSet, pBaseDN, SfxStringItem, DSID_CONN_LDAP_BASEDN, true); @@ -816,10 +816,10 @@ namespace dbaui m_pTextConnectionHelper->fillWindows(_rControlList); } - void OTextDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OTextDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); m_pTextConnectionHelper->implInitControls(_rSet, bValid); @@ -828,12 +828,12 @@ namespace dbaui bool OTextDetailsPage::FillItemSet( SfxItemSet& rSet ) { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(rSet); + bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(rSet); bChangedSomething = m_pTextConnectionHelper->FillItemSet(rSet, bChangedSomething); return bChangedSomething; } - sal_Bool OTextDetailsPage::prepareLeave() + bool OTextDetailsPage::prepareLeave() { return m_pTextConnectionHelper->prepareLeave(); } diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index d0bf013f9dfb..1b0b5c9f76ae 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -76,7 +76,7 @@ namespace dbaui virtual ~OCommonBehaviourTabPage(); // must be overloaded by subclasses, but it isn't pure virtual - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; // <method>OGenericAdministrationPage::fillControls</method> virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; @@ -106,7 +106,7 @@ namespace dbaui virtual ~ODbaseDetailsPage(); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; @@ -132,7 +132,7 @@ namespace dbaui OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; private: @@ -148,7 +148,7 @@ namespace dbaui OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; private: @@ -179,7 +179,7 @@ namespace dbaui protected: virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; @@ -221,7 +221,7 @@ namespace dbaui protected: virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; }; @@ -234,7 +234,7 @@ namespace dbaui OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; private: @@ -278,9 +278,9 @@ namespace dbaui OUString m_aTextNone; protected: virtual ~OTextDetailsPage(); - virtual sal_Bool prepareLeave() SAL_OVERRIDE; + virtual bool prepareLeave() SAL_OVERRIDE; - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 3928566de3fc..f5cbc0f1bed9 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -270,7 +270,7 @@ namespace dbaui m_pSQL->GrabFocus(); } - void DirectSQLDialog::switchToHistory(sal_Int32 _nHistoryPos, sal_Bool _bUpdateListBox) + void DirectSQLDialog::switchToHistory(sal_Int32 _nHistoryPos, bool _bUpdateListBox) { CHECK_INVARIANTS("DirectSQLDialog::switchToHistory"); @@ -320,7 +320,7 @@ namespace dbaui { const sal_Int32 nSelected = m_pSQLHistory->GetSelectEntryPos(); if (LISTBOX_ENTRY_NOTFOUND != nSelected) - switchToHistory(nSelected, sal_False); + switchToHistory(nSelected, false); } return 0L; } diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 9f21fbe4e6ca..72219bb317ab 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -255,7 +255,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent, m_pImpl->m_pSchema->SetMaxTextLen(nLength); m_pImpl->m_pCatalog->SetMaxTextLen(nLength); - sal_Bool bCheck = _xConnection.is() && isSQL92CheckEnabled(_xConnection); + bool bCheck = _xConnection.is() && isSQL92CheckEnabled(_xConnection); m_pImpl->m_pTitle->setCheck(bCheck); // enable non valid sql chars as well m_pImpl->m_pSchema->setCheck(bCheck); // enable non valid sql chars as well m_pImpl->m_pCatalog->setCheck(bCheck); // enable non valid sql chars as well @@ -334,7 +334,7 @@ void OSaveAsDlg::implInitOnlyTitle(const OUString& _rLabel) m_pImpl->m_pSchema->Hide(); m_pImpl->m_pTitle->SetText(m_pImpl->m_aName); - m_pImpl->m_pTitle->setCheck(sal_False); // enable non valid sql chars as well + m_pImpl->m_pTitle->setCheck(false); // enable non valid sql chars as well } void OSaveAsDlg::implInit() diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx index 404c46c57bb7..209aecebb219 100644 --- a/dbaccess/source/ui/dlg/dlgsize.cxx +++ b/dbaccess/source/ui/dlg/dlgsize.cxx @@ -27,7 +27,7 @@ namespace dbaui #define DEF_ROW_HEIGHT 45 #define DEF_COL_WIDTH 227 -DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard ) +DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, bool bRow, sal_Int32 _nAlternativeStandard ) : ModalDialog(pParent, bRow ? OString("RowHeightDialog") : OString("ColWidthDialog"), bRow ? OUString("dbaccess/ui/rowheightdialog.ui") : OUString("dbaccess/ui/colwidthdialog.ui")) , m_nPrevValue(nVal) @@ -41,7 +41,7 @@ DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAl m_pCB_STANDARD->SetClickHdl(LINK(this,DlgSize,CbClickHdl)); m_pMF_VALUE->EnableEmptyFieldValue(true); - sal_Bool bDefault = -1 == nVal; + bool bDefault = -1 == nVal; m_pCB_STANDARD->Check(bDefault); if (bDefault) { diff --git a/dbaccess/source/ui/dlg/finteraction.cxx b/dbaccess/source/ui/dlg/finteraction.cxx index 1c3517d2a849..f90cd791b446 100644 --- a/dbaccess/source/ui/dlg/finteraction.cxx +++ b/dbaccess/source/ui/dlg/finteraction.cxx @@ -31,7 +31,7 @@ namespace dbaui // OFilePickerInteractionHandler OFilePickerInteractionHandler::OFilePickerInteractionHandler( const Reference< XInteractionHandler >& _rxMaster ) :m_xMaster( _rxMaster ) - ,m_bDoesNotExist(sal_False) + ,m_bDoesNotExist(false) { OSL_ENSURE( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); } @@ -47,7 +47,7 @@ namespace dbaui { if ( IOErrorCode_NOT_EXISTING == aIoException.Code ) { - m_bDoesNotExist = sal_True; + m_bDoesNotExist = true; return; } } diff --git a/dbaccess/source/ui/dlg/finteraction.hxx b/dbaccess/source/ui/dlg/finteraction.hxx index f4ba6ff4db26..2d86566894f2 100644 --- a/dbaccess/source/ui/dlg/finteraction.hxx +++ b/dbaccess/source/ui/dlg/finteraction.hxx @@ -37,12 +37,12 @@ namespace dbaui protected: ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xMaster; // our master handler - sal_Bool m_bDoesNotExist; + bool m_bDoesNotExist; public: OFilePickerInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxMaster ); - inline sal_Bool isDoesNotExist( ) const { return m_bDoesNotExist; } + inline bool isDoesNotExist( ) const { return m_bDoesNotExist; } protected: // XInteractionHandler diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index a588a69b066d..83d17bd1e91e 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -57,7 +57,7 @@ namespace dbaui ,m_eNotSupportedKnownType ( ::dbaccess::DST_UNKNOWN ) ,m_pSpecialMessage ( NULL ) ,m_eLastMessage ( smNone ) - ,m_bDisplayingInvalid ( sal_False ) + ,m_bDisplayingInvalid ( false ) ,m_bInitTypeList ( true ) ,m_pDatasourceType ( NULL ) ,m_pCollection ( NULL ) @@ -214,7 +214,7 @@ namespace dbaui m_aTypeSelectHandler.Call(this); } - void OGeneralPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) + void OGeneralPage::implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) { initializeTypeList(); @@ -234,7 +234,7 @@ namespace dbaui OUString OGeneralPageWizard::getEmbeddedDBName( const SfxItemSet& _rSet ) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags( _rSet, bValid, bReadonly ); // if the selection is invalid, disable everything @@ -281,7 +281,7 @@ namespace dbaui OUString OGeneralPage::getDatasourceName( const SfxItemSet& _rSet ) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags( _rSet, bValid, bReadonly ); // if the selection is invalid, disable everything @@ -455,12 +455,12 @@ namespace dbaui } } - void OGeneralPageDialog::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) + void OGeneralPageDialog::implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) { OGeneralPage::implInitControls( _rSet, _bSaveValue ); // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly ); m_pDatasourceType->Enable( bValid ); @@ -468,7 +468,7 @@ namespace dbaui bool OGeneralPageDialog::FillItemSet( SfxItemSet& _rCoreAttrs ) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; sal_uInt16 nEntry = m_pDatasourceType->GetSelectEntryPos(); OUString sURLPrefix = m_aURLPrefixes[ nEntry ]; @@ -476,7 +476,7 @@ namespace dbaui if ( m_pDatasourceType->GetSavedValue() != nEntry ) { _rCoreAttrs.Put( SfxStringItem( DSID_CONNECTURL, sURLPrefix ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } return bChangedSomething; @@ -520,7 +520,7 @@ namespace dbaui ::comphelper::getProcessComponentContext(), OUString( "/org.openoffice.Office.DataAccess/Policies/Features/Base" ) ) ); - sal_Bool bAllowCreateLocalDatabase( sal_True ); + bool bAllowCreateLocalDatabase( true ); OSL_VERIFY( aConfig.getNodeValue( "CreateLocalDatabase" ) >>= bAllowCreateLocalDatabase ); if ( !bAllowCreateLocalDatabase ) bHideCreateNew = true; @@ -560,7 +560,7 @@ namespace dbaui m_pDatasourceType->GrabFocus(); } - void OGeneralPageWizard::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) + void OGeneralPageWizard::implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) { OGeneralPage::implInitControls( _rSet, _bSaveValue ); @@ -568,7 +568,7 @@ namespace dbaui m_pEmbeddedDBType->SelectEntry( getEmbeddedDBName( _rSet ) ); // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags( _rSet, bValid, bReadonly ); SetText( OUString() ); @@ -628,20 +628,20 @@ namespace dbaui bool OGeneralPageWizard::FillItemSet(SfxItemSet& _rCoreAttrs) { - sal_Bool bChangedSomething = sal_False; + bool bChangedSomething = false; bool bCommitTypeSelection = true; if ( m_pRB_CreateDatabase->IsChecked() ) { _rCoreAttrs.Put( SfxStringItem( DSID_CONNECTURL, OUString( "sdbc:dbase:" ) ) ); - bChangedSomething = sal_True; + bChangedSomething = true; bCommitTypeSelection = false; } else if ( m_pRB_OpenExistingDatabase->IsChecked() ) { if ( m_pRB_OpenExistingDatabase->GetSavedValue() != m_pRB_OpenExistingDatabase->IsChecked() ) - bChangedSomething = sal_True; + bChangedSomething = true; // TODO bCommitTypeSelection = false; @@ -657,7 +657,7 @@ namespace dbaui ) { _rCoreAttrs.Put( SfxStringItem( DSID_CONNECTURL,sURLPrefix ) ); - bChangedSomething = sal_True; + bChangedSomething = true; } else implSetCurrentType( sURLPrefix ); diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 22dea4cbf3a0..54ea0be095eb 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -51,7 +51,7 @@ namespace dbaui SPECIAL_MESSAGE m_eLastMessage; Link m_aTypeSelectHandler; /// to be called if a new type is selected - sal_Bool m_bDisplayingInvalid : 1; // the currently displayed data source is deleted + bool m_bDisplayingInvalid : 1; // the currently displayed data source is deleted bool m_bInitTypeList : 1; bool approveDatasourceType( const OUString& _sURLPrefix, OUString& _inout_rDisplayName ); void insertDatasourceTypeEntryData( const OUString& _sType, const OUString& sDisplayName ); @@ -76,7 +76,7 @@ namespace dbaui // SfxTabPage overridables virtual void Reset( const SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) SAL_OVERRIDE; + virtual void implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) SAL_OVERRIDE; virtual OUString getDatasourceName( const SfxItemSet& _rSet ); virtual bool approveDatasourceType( ::dbaccess::DATASOURCE_TYPE eType, OUString& _inout_rDisplayName ); @@ -107,7 +107,7 @@ namespace dbaui protected: virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; - virtual void implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) SAL_OVERRIDE; + virtual void implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) SAL_OVERRIDE; virtual void setParentTitle( const OUString& _sURLPrefix ) SAL_OVERRIDE; }; @@ -174,7 +174,7 @@ namespace dbaui virtual void GetFocus() SAL_OVERRIDE; - virtual void implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) SAL_OVERRIDE; + virtual void implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) SAL_OVERRIDE; virtual OUString getDatasourceName( const SfxItemSet& _rSet ) SAL_OVERRIDE; virtual bool approveDatasourceType( ::dbaccess::DATASOURCE_TYPE eType, OUString& _inout_rDisplayName ) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index d6f948ab8377..7cc9953914ab 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -47,21 +47,21 @@ namespace dbaui using namespace ::dbtools; // helper - sal_Bool operator ==(const OIndexField& _rLHS, const OIndexField& _rRHS) + bool operator ==(const OIndexField& _rLHS, const OIndexField& _rRHS) { return (_rLHS.sFieldName == _rRHS.sFieldName) && (_rLHS.bSortAscending == _rRHS.bSortAscending); } - sal_Bool operator !=(const OIndexField& _rLHS, const OIndexField& _rRHS) + bool operator !=(const OIndexField& _rLHS, const OIndexField& _rRHS) { return !(_rLHS == _rRHS); } - sal_Bool operator ==(const IndexFields& _rLHS, const IndexFields& _rRHS) + bool operator ==(const IndexFields& _rLHS, const IndexFields& _rRHS) { if (_rLHS.size() != _rRHS.size()) - return sal_False; + return false; IndexFields::const_iterator aLeft = _rLHS.begin(); IndexFields::const_iterator aLeftEnd = _rLHS.end(); @@ -69,13 +69,13 @@ namespace dbaui for (; aLeft != aLeftEnd; ++aLeft, ++aRight) { if (*aLeft != *aRight) - return sal_False; + return false; } - return sal_True; + return true; } - sal_Bool operator !=(const IndexFields& _rLHS, const IndexFields& _rRHS) + bool operator !=(const IndexFields& _rLHS, const IndexFields& _rRHS) { return !(_rLHS == _rRHS); } @@ -83,7 +83,7 @@ namespace dbaui // DbaIndexList DbaIndexList::DbaIndexList(Window* _pParent, const ResId& _rId) :SvTreeListBox(_pParent, _rId) - ,m_bSuspendSelectHdl(sal_False) + ,m_bSuspendSelectHdl(false) { } @@ -126,13 +126,13 @@ namespace dbaui void DbaIndexList::enableSelectHandler() { OSL_ENSURE(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); - m_bSuspendSelectHdl = sal_False; + m_bSuspendSelectHdl = false; } void DbaIndexList::disableSelectHandler() { OSL_ENSURE(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); - m_bSuspendSelectHdl = sal_True; + m_bSuspendSelectHdl = true; } void DbaIndexList::SelectNoHandlerCall( SvTreeListEntry* _pEntry ) @@ -142,9 +142,9 @@ namespace dbaui enableSelectHandler(); } - sal_Bool DbaIndexList::Select( SvTreeListEntry* pEntry, sal_Bool _bSelect ) + bool DbaIndexList::Select( SvTreeListEntry* pEntry, sal_Bool _bSelect ) { - sal_Bool bReturn = SvTreeListBox::Select(pEntry, _bSelect); + bool bReturn = SvTreeListBox::Select(pEntry, _bSelect); if (m_aSelectHdl.IsSet() && !m_bSuspendSelectHdl && _bSelect) m_aSelectHdl.Call(this); @@ -172,7 +172,7 @@ namespace dbaui ,m_aHelp (this, ModuleRes(HB_HELP)) ,m_pIndexes(NULL) ,m_pPreviousSelection(NULL) - ,m_bEditAgain(sal_False) + ,m_bEditAgain(false) ,m_xContext(_rxContext) { @@ -256,7 +256,7 @@ namespace dbaui m_aActions.EnableItem(ID_INDEX_NEW, !m_aIndexes.IsEditingActive()); SvTreeListEntry* pSelected = m_aIndexes.FirstSelected(); - sal_Bool bSelectedAnything = NULL != pSelected; + bool bSelectedAnything = NULL != pSelected; if (pSelected) { @@ -304,7 +304,7 @@ namespace dbaui } - sal_Bool DbaIndexDialog::implCommit(SvTreeListEntry* _pEntry) + bool DbaIndexDialog::implCommit(SvTreeListEntry* _pEntry) { OSL_ENSURE(_pEntry, "DbaIndexDialog::implCommit: invalid entry!"); @@ -313,8 +313,8 @@ namespace dbaui // if it's not a new index, remove it // (we can't modify indexes, only drop'n'insert) if (!aCommitPos->isNew()) - if (!implDropIndex(_pEntry, sal_False)) - return sal_False; + if (!implDropIndex(_pEntry, false)) + return false; // create the new index SQLExceptionInfo aExceptionInfo; @@ -384,7 +384,7 @@ namespace dbaui updateToolbox(); } - void DbaIndexDialog::OnDropIndex(sal_Bool _bConfirm) + void DbaIndexDialog::OnDropIndex(bool _bConfirm) { // the selected index SvTreeListEntry* pSelected = m_aIndexes.FirstSelected(); @@ -402,21 +402,21 @@ namespace dbaui } // do the drop - implDropIndex(pSelected, sal_True); + implDropIndex(pSelected, true); // reflect the new selection in the toolbox updateToolbox(); } } - sal_Bool DbaIndexDialog::implDropIndex(SvTreeListEntry* _pEntry, sal_Bool _bRemoveFromCollection) + bool DbaIndexDialog::implDropIndex(SvTreeListEntry* _pEntry, bool _bRemoveFromCollection) { // do the drop Indexes::iterator aDropPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); OSL_ENSURE(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!"); SQLExceptionInfo aExceptionInfo; - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { if (_bRemoveFromCollection) @@ -468,7 +468,7 @@ namespace dbaui // save the changes made 'til here // Upon leaving the edit mode, the control will be re-initialized with the // settings from the current entry - implSaveModified(sal_False); + implSaveModified(false); m_aIndexes.EditEntry(pSelected); updateToolbox(); @@ -496,7 +496,7 @@ namespace dbaui if (aResetPos->isNew()) { - OnDropIndex(sal_False); + OnDropIndex(false); return; } @@ -591,7 +591,7 @@ namespace dbaui IMPL_LINK( DbaIndexDialog, OnEditIndexAgain, SvTreeListEntry*, _pEntry ) { - m_bEditAgain = sal_False; + m_bEditAgain = false; m_aIndexes.EditEntry(_pEntry); return 0L; } @@ -614,7 +614,7 @@ namespace dbaui aError.Execute(); updateToolbox(); - m_bEditAgain = sal_True; + m_bEditAgain = true; PostUserEvent(LINK(this, DbaIndexDialog, OnEditIndexAgain), _pEntry); return 0L; } @@ -631,42 +631,42 @@ namespace dbaui if (aPosition->sName != aPosition->getOriginalName()) { - aPosition->setModified(sal_True); + aPosition->setModified(true); updateToolbox(); } return 1L; } - sal_Bool DbaIndexDialog::implSaveModified(sal_Bool _bPlausibility) + bool DbaIndexDialog::implSaveModified(bool _bPlausibility) { if (m_pPreviousSelection) { // try to commit the previously selected index if (m_pFields->IsModified() && !m_pFields->SaveModified()) - return sal_False; + return false; Indexes::iterator aPreviouslySelected = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); // the unique flag aPreviouslySelected->bUnique = m_aUnique.IsChecked(); if (m_aUnique.GetSavedValue() != m_aUnique.GetState()) - aPreviouslySelected->setModified(sal_True); + aPreviouslySelected->setModified(true); // the fields m_pFields->commitTo(aPreviouslySelected->aFields); if (m_pFields->GetSavedValue() != aPreviouslySelected->aFields) - aPreviouslySelected->setModified(sal_True); + aPreviouslySelected->setModified(true); // plausibility checks if (_bPlausibility && !implCheckPlausibility(aPreviouslySelected)) - return sal_False; + return false; } - return sal_True; + return true; } - sal_Bool DbaIndexDialog::implCheckPlausibility(const Indexes::const_iterator& _rPos) + bool DbaIndexDialog::implCheckPlausibility(const Indexes::const_iterator& _rPos) { // need at least one field if (0 == _rPos->aFields.size()) @@ -674,7 +674,7 @@ namespace dbaui ErrorBox aError(this, ModuleRes(ERR_NEED_INDEX_FIELDS)); aError.Execute(); m_pFields->GrabFocus(); - return sal_False; + return false; } // no double fields @@ -692,29 +692,29 @@ namespace dbaui ErrorBox aError(this, WB_OK, sMessage); aError.Execute(); m_pFields->GrabFocus(); - return sal_False; + return false; } aExistentFields.insert(aFieldCheck->sFieldName); } - return sal_True; + return true; } - sal_Bool DbaIndexDialog::implCommitPreviouslySelected() + bool DbaIndexDialog::implCommitPreviouslySelected() { if (m_pPreviousSelection) { Indexes::iterator aPreviouslySelected = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); if (!implSaveModified()) - return sal_False; + return false; // commit the index (if necessary) if (aPreviouslySelected->isModified() && !implCommit(m_pPreviousSelection)) - return sal_False; + return false; } - return sal_True; + return true; } IMPL_LINK( DbaIndexDialog, OnModified, void*, /*NOTINTERESTEDIN*/ ) @@ -722,7 +722,7 @@ namespace dbaui OSL_ENSURE(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!"); Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); - aPosition->setModified(sal_True); + aPosition->setModified(true); updateToolbox(); return 1L; @@ -774,7 +774,7 @@ namespace dbaui } } - sal_Bool bHaveSelection = (NULL != m_aIndexes.FirstSelected()); + bool bHaveSelection = (NULL != m_aIndexes.FirstSelected()); // disable/enable the detail controls m_aIndexDetails.Enable(bHaveSelection); diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 97649f354470..f241969f605b 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -89,7 +89,7 @@ namespace dbaui } // IndexFieldsControl - IndexFieldsControl::IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,sal_Bool _bAddIndexAppendix) + IndexFieldsControl::IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix) :EditBrowseBox(_pParent, _rId, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, BROWSER_STANDARD_FLAGS) ,m_aSeekRow(m_aFields.end()) ,m_pSortingCell(NULL) @@ -141,7 +141,7 @@ namespace dbaui _rDev.SetClipRegion(Region(_rRect)); // allow for a disabled control ... - sal_Bool bEnabled = IsEnabled(); + bool bEnabled = IsEnabled(); Color aOriginalColor = _rDev.GetTextColor(); if (!bEnabled) _rDev.SetTextColor(GetSettings().GetStyleSettings().GetDisableColor()); @@ -262,7 +262,7 @@ namespace dbaui return NULL; IndexFields::const_iterator aRow; - sal_Bool bNewField = !implGetFieldDesc(_nRow, aRow); + bool bNewField = !implGetFieldDesc(_nRow, aRow); DbaMouseDownListBoxController* pReturn = NULL; switch (_nColumnId) @@ -286,13 +286,13 @@ namespace dbaui return pReturn; } - sal_Bool IndexFieldsControl::implGetFieldDesc(long _nRow, IndexFields::const_iterator& _rPos) + bool IndexFieldsControl::implGetFieldDesc(long _nRow, IndexFields::const_iterator& _rPos) { _rPos = m_aFields.end(); if ((_nRow < 0) || (_nRow >= (sal_Int32)m_aFields.size())) - return sal_False; + return false; _rPos = m_aFields.begin() + _nRow; - return sal_True; + return true; } bool IndexFieldsControl::IsModified() const @@ -310,7 +310,7 @@ namespace dbaui case COLUMN_ID_FIELDNAME: { OUString sFieldSelected = m_pFieldNameCell->GetSelectEntry(); - sal_Bool bEmptySelected = sFieldSelected.isEmpty(); + bool bEmptySelected = sFieldSelected.isEmpty(); if (isNewField()) { if (!bEmptySelected) @@ -372,7 +372,7 @@ namespace dbaui void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, long _nRow, sal_uInt16 _nColumnId) { IndexFields::const_iterator aFieldDescription; - sal_Bool bNewField = !implGetFieldDesc(_nRow, aFieldDescription); + bool bNewField = !implGetFieldDesc(_nRow, aFieldDescription); switch (_nColumnId) { diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index cc9fffa51643..a6677a7f9d35 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -112,7 +112,7 @@ OOdbcLibWrapper::OOdbcLibWrapper() #endif -sal_Bool OOdbcLibWrapper::load(const sal_Char* _pLibPath) +bool OOdbcLibWrapper::load(const sal_Char* _pLibPath) { m_sLibPath = OUString::createFromAscii(_pLibPath); #ifdef HAVE_ODBC_SUPPORT @@ -166,7 +166,7 @@ OOdbcEnumeration::OOdbcEnumeration() ,m_pImpl(new OdbcTypesImpl) #endif { - sal_Bool bLoaded = load(ODBC_LIBRARY); + bool bLoaded = load(ODBC_LIBRARY); #ifdef ODBC_LIBRARY_1 if ( !bLoaded ) bLoaded = load(ODBC_LIBRARY_1); @@ -198,23 +198,23 @@ OOdbcEnumeration::~OOdbcEnumeration() } -sal_Bool OOdbcEnumeration::allocEnv() +bool OOdbcEnumeration::allocEnv() { OSL_ENSURE(isLoaded(), "OOdbcEnumeration::allocEnv: not loaded!"); if (!isLoaded()) - return sal_False; + return false; #ifdef HAVE_ODBC_SUPPORT if (m_pImpl->hEnvironment) // nothing to do - return sal_True; + return true; SQLRETURN nResult = NSQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &m_pImpl->hEnvironment); if (SQL_SUCCESS != nResult) // can't do anything without environment - return sal_False; + return false; NSQLSetEnvAttr(m_pImpl->hEnvironment, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER); - return sal_True; + return true; #else return sal_False; #endif diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index 5e77ae418e3d..3c3737ee9558 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -48,7 +48,7 @@ class OOdbcLibWrapper public: #ifdef HAVE_ODBC_SUPPORT - sal_Bool isLoaded() const { return NULL != m_pOdbcLib; } + bool isLoaded() const { return NULL != m_pOdbcLib; } #else sal_Bool isLoaded() const { return sal_False; } #endif @@ -65,7 +65,7 @@ protected: oslGenericFunction loadSymbol(const sal_Char* _pFunctionName); /// load the lib - sal_Bool load(const sal_Char* _pLibPath); + bool load(const sal_Char* _pLibPath); /// unload the lib void unload(); }; @@ -94,7 +94,7 @@ public: protected: /// ensure that an ODBC environment is allocated - sal_Bool allocEnv(); + bool allocEnv(); /// free any allocated ODBC environment void freeEnv(); }; diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 1cc360b06491..bd5d295d1337 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -65,7 +65,7 @@ namespace dbaui ,m_nCurrentlySelected(LISTBOX_ENTRY_NOTFOUND) ,m_xConnection(_rxConnection) ,m_aPredicateInput( rxContext, _rxConnection, getParseContext() ) - ,m_bNeedErrorOnCurrent(sal_True) + ,m_bNeedErrorOnCurrent(true) { if (rxContext.is()) @@ -172,7 +172,7 @@ namespace dbaui if (m_xConnection.is() && m_xFormatter.is()) { OUString sParamValue( m_aParam.GetText() ); - sal_Bool bValid = m_aPredicateInput.normalizePredicateString( sParamValue, xParamAsSet ); + bool bValid = m_aPredicateInput.normalizePredicateString( sParamValue, xParamAsSet ); m_aParam.SetText( sParamValue ); if ( bValid ) { @@ -185,7 +185,7 @@ namespace dbaui if (!m_bNeedErrorOnCurrent) return 1L; - m_bNeedErrorOnCurrent = sal_False; // will be reset in OnValueModified + m_bNeedErrorOnCurrent = false; // will be reset in OnValueModified OUString sName; try @@ -219,7 +219,7 @@ namespace dbaui { // no interpreting of the given values anymore .... m_aParam.SetLoseFocusHdl(Link()); // no direct call from the control anymore ... - m_bNeedErrorOnCurrent = sal_False; // in case of any indirect calls -> no error message + m_bNeedErrorOnCurrent = false; // in case of any indirect calls -> no error message m_aCancelBtn.SetClickHdl(Link()); m_aCancelBtn.Click(); } @@ -228,7 +228,7 @@ namespace dbaui // transfer the current values into the Any if (LINK(this, OParameterDialog, OnEntrySelected).Call(&m_aAllParams) != 0L) { // there was an error interpreting the current text - m_bNeedErrorOnCurrent = sal_True; + m_bNeedErrorOnCurrent = true; // we're are out of the complex web :) of direct and indirect calls to OnValueLoseFocus now, // so the next time it is called we need an error message, again .... // (TODO : there surely are better solutions for this ...) @@ -278,7 +278,7 @@ namespace dbaui m_aAllParams.SelectEntryPos(nNext); LINK(this, OParameterDialog, OnEntrySelected).Call(&m_aAllParams); - m_bNeedErrorOnCurrent = sal_True; + m_bNeedErrorOnCurrent = true; // we're are out of the complex web :) of direct and indirect calls to OnValueLoseFocus now, // so the next time it is called we need an error message, again .... // (TODO : there surely are better solutions for this ...) @@ -378,7 +378,7 @@ namespace dbaui OSL_ENSURE(static_cast<size_t>(m_nCurrentlySelected) < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY; - m_bNeedErrorOnCurrent = sal_True; + m_bNeedErrorOnCurrent = true; return 0L; } diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index b5d7f883e8f0..21b05b13ce2c 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -123,7 +123,7 @@ DlgFilterCrit::DlgFilterCrit(Window * pParent, if ( eColumnSearch == ColumnSearch::NONE ) continue; - sal_Bool bIsSearchable( sal_True ); + bool bIsSearchable( true ); OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_ISSEARCHABLE ) >>= bIsSearchable ); if ( !bIsSearchable ) continue; @@ -291,13 +291,13 @@ sal_uInt16 DlgFilterCrit::GetSelectionPos(sal_Int32 eType,const ListBox& rListBo return nPos; } -sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,PropertyValue& _rFilter) const +bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,PropertyValue& _rFilter) const { - sal_Bool bHaving = sal_False; + bool bHaving = false; try { OUString sTableName; - sal_Bool bFunction = sal_False; + bool bFunction = false; _rFilter.Name = _rField.GetSelectEntry(); Reference< XPropertySet > xColumn = getQueryColumn(_rFilter.Name); if ( xColumn.is() ) @@ -454,7 +454,7 @@ IMPL_LINK( DlgFilterCrit, PredicateLoseFocus, Edit*, _pField ) return 0L; } -void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,sal_Bool _bOr ) +void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,bool _bOr ) { OUString aCondition; _rItem.Value >>= aCondition; @@ -817,16 +817,16 @@ void DlgFilterCrit::fillLines(const Sequence<Sequence<PropertyValue > >& _aValue { const Sequence<PropertyValue >* pOrIter = _aValues.getConstArray(); const Sequence<PropertyValue >* pOrEnd = pOrIter + _aValues.getLength(); - sal_Bool bOr = sal_True; + bool bOr = true; for(sal_uInt16 i=0;pOrIter != pOrEnd; ++pOrIter) { - bOr = sal_True; + bOr = true; const PropertyValue* pAndIter = pOrIter->getConstArray(); const PropertyValue* pAndEnd = pAndIter + pOrIter->getLength(); for(;pAndIter != pAndEnd; ++pAndIter) { SetLine( i++,*pAndIter,bOr); - bOr = sal_False; + bOr = false; } } } diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index 73dc464c9c0e..47f42749ffcb 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -154,7 +154,7 @@ void DlgOrderCrit::impl_initializeOrderList_nothrow() Reference< XPropertySet > xColumn( xOrderColumns->getByIndex( i ), UNO_QUERY_THROW ); OUString sColumnName; - sal_Bool bIsAscending( sal_True ); + bool bIsAscending( true ); xColumn->getPropertyValue( sNameProperty ) >>= sColumnName; xColumn->getPropertyValue( sAscendingProperty ) >>= bIsAscending; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 0bf46c8ea410..a12bf477a511 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -158,14 +158,14 @@ namespace dbaui } // uncheck all - CheckAll(sal_False); + CheckAll(false); // check the ones which are in the list OUString sCatalog, sSchema, sName; SvTreeListEntry* pRootEntry = m_pTablesList->getAllObjectsEntry(); - sal_Bool bAllTables = sal_False; - sal_Bool bAllSchemas = sal_False; + bool bAllTables = false; + bool bAllSchemas = false; const OUString* pIncludeTable = _rTables.getConstArray(); for (sal_Int32 i=0; i<_rTables.getLength(); ++i, ++pIncludeTable) @@ -213,23 +213,23 @@ namespace dbaui { if (!_rTableFilter.getLength()) { // no tables visible - CheckAll(sal_False); + CheckAll(false); } else { if ((1 == _rTableFilter.getLength()) && _rTableFilter[0] == "%") { // all tables visible - CheckAll(sal_True); + CheckAll(true); } else implCheckTables( _rTableFilter ); } } - void OTableSubscriptionPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) + void OTableSubscriptionPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); // get the name of the data source we're working for @@ -289,7 +289,7 @@ namespace dbaui Any aTableTypeFilter = xProp->getPropertyValue(PROPERTY_TABLETYPEFILTER); Reference<XModifiable> xModi(getDataSourceOrModel(xProp),UNO_QUERY); - sal_Bool bModified = ( xModi.is() && xModi->isModified() ); + bool bModified = ( xModi.is() && xModi->isModified() ); Sequence< OUString > aNewTableFilter(1); aNewTableFilter[0] = "%"; @@ -337,7 +337,7 @@ namespace dbaui { // in addition, we need some infos about the connection used m_sCatalogSeparator = "."; // (default) - m_bCatalogAtStart = sal_True; // (default) + m_bCatalogAtStart = true; // (default) try { Reference< XDatabaseMetaData > xMeta; @@ -381,7 +381,7 @@ namespace dbaui OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } - void OTableSubscriptionPage::CheckAll( sal_Bool _bCheck ) + void OTableSubscriptionPage::CheckAll( bool _bCheck ) { SvButtonState eState = _bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED; SvTreeListEntry* pEntry = m_pTablesList->First(); @@ -457,8 +457,8 @@ namespace dbaui SvTreeListEntry* pEntry = m_pTablesList->GetModel()->Next(const_cast<SvTreeListEntry*>(pAllObjectsEntry)); while(pEntry) { - sal_Bool bCatalogWildcard = sal_False; - sal_Bool bSchemaWildcard = sal_False; + bool bCatalogWildcard = false; + bool bSchemaWildcard = false; SvTreeListEntry* pSchema = NULL; SvTreeListEntry* pCatalog = NULL; @@ -551,7 +551,7 @@ namespace dbaui bool OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs ) { - sal_Bool bValid, bReadonly; + bool bValid, bReadonly; getFlags(_rCoreAttrs, bValid, bReadonly); if (!bValid || bReadonly) diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index fd14e43aaf3d..b0cc2885dc90 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -40,7 +40,7 @@ namespace dbaui OTableTreeListBox* m_pTablesList; OUString m_sCatalogSeparator; - sal_Bool m_bCatalogAtStart : 1; + bool m_bCatalogAtStart : 1; ::osl::Mutex m_aNotifierMutex; @@ -86,9 +86,9 @@ namespace dbaui ::com::sun::star::uno::Sequence< OUString > collectDetailedSelection() const; /// (un)check all entries - void CheckAll( sal_Bool bCheck = sal_True ); + void CheckAll( bool bCheck = true ); - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE; + virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; // checks the tables according to the filter given // in oppsofite to implCheckTables, this method handles the case of an empty sequence, too ... diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx index c4ca7ca2e410..3c924945e3c8 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx +++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx @@ -57,7 +57,7 @@ namespace dbaui short TextConnectionSettingsDialog::Execute() { - m_pTextConnectionHelper->implInitControls( m_rItems, sal_True ); + m_pTextConnectionHelper->implInitControls( m_rItems, true ); return ModalDialog::Execute(); } @@ -65,7 +65,7 @@ namespace dbaui { if ( m_pTextConnectionHelper->prepareLeave() ) { - sal_Bool bUnused = sal_False; + bool bUnused = false; m_pTextConnectionHelper->FillItemSet( m_rItems, bUnused ); EndDialog( RET_OK ); return 1L; diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx index cea9025c5da7..85fcaf833e0e 100644 --- a/dbaccess/source/ui/inc/CollectionView.hxx +++ b/dbaccess/source/ui/inc/CollectionView.hxx @@ -49,7 +49,7 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; Size m_aDlgSize; Size m_a6Size; - sal_Bool m_bCreateForm; + bool m_bCreateForm; DECL_LINK(Up_Click,void*); DECL_LINK(NewFolder_Click,void*); diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx index 4f73102febf4..19c55b9b69ce 100644 --- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx +++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx @@ -40,7 +40,7 @@ namespace dbaui mutable TOTypeInfoSP m_pTypeInfo; // default type OUString m_sTypeNames; // these type names are the ones out of the resource file OUString m_sAutoIncrementValue; - sal_Bool m_bAutoIncrementEnabled; + bool m_bAutoIncrementEnabled; protected: virtual void ActivateAggregate( EControlType eType ) SAL_OVERRIDE; virtual void DeactivateAggregate( EControlType eType ) SAL_OVERRIDE; @@ -48,8 +48,8 @@ namespace dbaui virtual ::com::sun::star::lang::Locale GetLocale() const SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const SAL_OVERRIDE; virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) SAL_OVERRIDE; - virtual sal_Bool isAutoIncrementValueEnabled() const SAL_OVERRIDE; - virtual OUString getAutoIncrementValue() const SAL_OVERRIDE; + virtual bool isAutoIncrementValueEnabled() const SAL_OVERRIDE; + virtual OUString getAutoIncrementValue() const SAL_OVERRIDE; virtual void CellModified(long nRow, sal_uInt16 nColId ) SAL_OVERRIDE; public: diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx index c3dc21cb3b03..6ae780d4705a 100644 --- a/dbaccess/source/ui/inc/ConnectionLine.hxx +++ b/dbaccess/source/ui/inc/ConnectionLine.hxx @@ -53,13 +53,13 @@ namespace dbaui OConnectionLine& operator=( const OConnectionLine& rLine ); Rectangle GetBoundingRect(); - sal_Bool RecalcLine(); + bool RecalcLine(); void Draw( OutputDevice* pOutDev ); bool CheckHit( const Point& rMousePos ) const; OUString GetSourceFieldName() const { return m_pData->GetSourceFieldName(); } OUString GetDestFieldName() const { return m_pData->GetDestFieldName(); } - sal_Bool IsValid() const; + bool IsValid() const; Rectangle GetSourceTextPos() const; Rectangle GetDestTextPos() const; diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx index 09286fcc9320..8f30a76fcd03 100644 --- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx +++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx @@ -44,7 +44,7 @@ namespace dbaui /** isEditable returns the current editable state @return true if it is editable otherwise false */ - virtual sal_Bool isEditable() const; + virtual bool isEditable() const; public: OConnectionLineAccess(OTableConnection* _pLine); @@ -79,15 +79,15 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XAccessibleComponent - virtual sal_Bool SAL_CALL contains( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL contains( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException); + virtual bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException); // XAccessibleRelationSet virtual sal_Int32 SAL_CALL getRelationCount( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx index 2724d1e090f6..dea8bd578f8f 100644 --- a/dbaccess/source/ui/inc/DExport.hxx +++ b/dbaccess/source/ui/inc/DExport.hxx @@ -95,17 +95,17 @@ namespace dbaui sal_Int32 m_nRows; ///< number of rows to be searched sal_Int32 m_nRowCount; ///< current count of rows rtl_TextEncoding m_nDefToken; ///< language - sal_Bool m_bError; ///< error and termination code - sal_Bool m_bInTbl; ///< true, if parser is in RTF table - sal_Bool m_bHead; ///< true, if the header hasn't been read yet - sal_Bool m_bDontAskAgain;///< if there is an error when pasting, don't show it again - sal_Bool m_bIsAutoIncrement; ///< if PKey is set by user - sal_Bool m_bFoundTable; ///< set to true when a table was found - sal_Bool m_bCheckOnly; + bool m_bError; ///< error and termination code + bool m_bInTbl; ///< true, if parser is in RTF table + bool m_bHead; ///< true, if the header hasn't been read yet + bool m_bDontAskAgain;///< if there is an error when pasting, don't show it again + bool m_bIsAutoIncrement; ///< if PKey is set by user + bool m_bFoundTable; ///< set to true when a table was found + bool m_bCheckOnly; bool m_bAppendFirstLine; - virtual sal_Bool CreateTable(int nToken) = 0; + virtual bool CreateTable(int nToken) = 0; virtual TypeSelectionPageFactory getTypeSelectionPageFactory() = 0; @@ -114,7 +114,7 @@ namespace dbaui void adjustFormat(); void eraseTokens(); void insertValueIntoColumn(); - sal_Bool createRowSet(); + bool createRowSet(); void showErrorDialog(const ::com::sun::star::sdbc::SQLException& e); void ensureFormatter(); @@ -126,7 +126,7 @@ namespace dbaui @return true when an error occurs */ - sal_Bool executeWizard( const OUString& _sTableName, + bool executeWizard( const OUString& _sTableName, const ::com::sun::star::uno::Any& _aTextColor, const ::com::sun::star::awt::FontDescriptor& _rFont); @@ -150,7 +150,7 @@ namespace dbaui const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const TColumnVector* rList, const OTypeInfoMap* _pInfoMap, - sal_Bool _bAutoIncrementEnabled, + bool _bAutoIncrementEnabled, SvStream& _rInputStream ); @@ -160,8 +160,8 @@ namespace dbaui virtual void release() = 0; - void enableCheckOnly() { m_bCheckOnly = sal_True; } - sal_Bool isCheckEnabled() const { return m_bCheckOnly; } + void enableCheckOnly() { m_bCheckOnly = true; } + bool isCheckEnabled() const { return m_bCheckOnly; } static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > createPreparedStatment( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDestTable diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx index 9b34dd082be3..7f2e68a7d938 100644 --- a/dbaccess/source/ui/inc/FieldControls.hxx +++ b/dbaccess/source/ui/inc/FieldControls.hxx @@ -87,7 +87,7 @@ namespace dbaui public: OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); - sal_Bool IsModified() const { return GetSelectEntryPos() != GetSavedValue(); } + bool IsModified() const { return GetSelectEntryPos() != GetSavedValue(); } short GetPos() const { return m_nPos; } OUString GetHelp() const { return m_strHelpText; } diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index 11a30d33e84f..308947bd9a87 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -109,7 +109,7 @@ namespace dbaui long m_nOldHThumb; sal_Int32 m_nWidth; - sal_Bool m_bAdded; + bool m_bAdded; bool m_bRightAligned; OFieldDescription* pActFieldDescr; @@ -131,7 +131,7 @@ namespace dbaui void ScrollAggregate(Control* pText, Control* pInput, Control* pButton, long nDeltaX, long nDeltaY); void ScrollAllAggregates(); - sal_Bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const; + bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const; void Contruct(); OPropNumericEditCtrl* CreateNumericControl(sal_uInt16 _nHelpStr,short _nProperty,const OString& _sHelpId); FixedText* CreateText(sal_uInt16 _nTextRes); @@ -150,19 +150,19 @@ namespace dbaui virtual void ActivateAggregate( EControlType eType ); virtual void DeactivateAggregate( EControlType eType ); - virtual sal_Bool IsReadOnly() { return sal_False; }; + virtual bool IsReadOnly() { return false; }; virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const = 0; virtual ::com::sun::star::lang::Locale GetLocale() const = 0; virtual void CellModified(long nRow, sal_uInt16 nColId ) = 0; - virtual void SetModified(sal_Bool bModified); // base implementation is empty + virtual void SetModified(bool bModified); // base implementation is empty virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) = 0; virtual const OTypeInfoMap* getTypeInfo() const = 0; - virtual sal_Bool isAutoIncrementValueEnabled() const = 0; + virtual bool isAutoIncrementValueEnabled() const = 0; virtual OUString getAutoIncrementValue() const = 0; OUString BoolStringPersistent(const OUString& rUIString) const; @@ -183,13 +183,13 @@ namespace dbaui void SetControlText( sal_uInt16 nControlId, const OUString& rText ); OUString GetControlText( sal_uInt16 nControlId ); - void SetReadOnly( sal_Bool bReadOnly ); + void SetReadOnly( bool bReadOnly ); // when resize is called void CheckScrollBars(); - sal_Bool isCutAllowed(); - sal_Bool isCopyAllowed(); - sal_Bool isPasteAllowed(); + bool isCutAllowed(); + bool isCopyAllowed(); + bool isPasteAllowed(); void cut(); void copy(); @@ -203,7 +203,7 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData() = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection() = 0; - OUString getControlDefault( const OFieldDescription* _pFieldDescr ,sal_Bool _bCheck = sal_True) const; + OUString getControlDefault( const OFieldDescription* _pFieldDescr, bool _bCheck = true) const; inline void setEditWidth(sal_Int32 _nWidth) { m_nWidth = _nWidth; } }; diff --git a/dbaccess/source/ui/inc/FieldDescriptions.hxx b/dbaccess/source/ui/inc/FieldDescriptions.hxx index 75342e81d783..1d4812a36a46 100644 --- a/dbaccess/source/ui/inc/FieldDescriptions.hxx +++ b/dbaccess/source/ui/inc/FieldDescriptions.hxx @@ -53,16 +53,16 @@ namespace dbaui sal_Int32 m_nIsNullable; sal_Int32 m_nFormatKey; SvxCellHorJustify m_eHorJustify; - sal_Bool m_bIsAutoIncrement; - sal_Bool m_bIsPrimaryKey; - sal_Bool m_bIsCurrency; - sal_Bool m_bHidden; + bool m_bIsAutoIncrement; + bool m_bIsPrimaryKey; + bool m_bIsCurrency; + bool m_bHidden; public: OFieldDescription(); OFieldDescription( const OFieldDescription& rDescr ); OFieldDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xAffectedCol - ,sal_Bool _bUseAsDest = sal_False); + ,bool _bUseAsDest = false); ~OFieldDescription(); void SetName(const OUString& _rName); @@ -79,16 +79,16 @@ namespace dbaui void SetIsNullable(const sal_Int32& _rIsNullable); void SetFormatKey(const sal_Int32& _rFormatKey); void SetHorJustify(const SvxCellHorJustify& _rHorJustify); - void SetAutoIncrement(sal_Bool _bAuto); - void SetPrimaryKey(sal_Bool _bPKey); - void SetCurrency(sal_Bool _bIsCurrency); + void SetAutoIncrement(bool _bAuto); + void SetPrimaryKey(bool _bPKey); + void SetCurrency(bool _bIsCurrency); /** copies the content of the field eescription into the column @param _rxColumn the dest */ void copyColumnSettingsTo(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn); - void FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bForce,sal_Bool _bReset); + void FillFromTypeInfo(const TOTypeInfoSP& _pType,bool _bForce,bool _bReset); OUString GetName() const; OUString GetDescription() const; @@ -104,10 +104,10 @@ namespace dbaui SvxCellHorJustify GetHorJustify() const; TOTypeInfoSP getTypeInfo() const; TOTypeInfoSP getSpecialTypeInfo() const; - sal_Bool IsAutoIncrement() const; - sal_Bool IsPrimaryKey() const; - sal_Bool IsCurrency() const; - sal_Bool IsNullable() const; + bool IsAutoIncrement() const; + bool IsPrimaryKey() const; + bool IsCurrency() const; + bool IsNullable() const; }; } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_FIELDDESCRIPTIONS_HXX diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx index 8d158ce9b8d3..9c2eeb4fb27d 100644 --- a/dbaccess/source/ui/inc/HtmlReader.hxx +++ b/dbaccess/source/ui/inc/HtmlReader.hxx @@ -34,12 +34,12 @@ namespace dbaui sal_Int32 m_nTableCount; sal_Int16 m_nWidth; sal_Int16 m_nColumnWidth; ///< maximum column width - sal_Bool m_bMetaOptions; ///< true when we scanned the meta information - sal_Bool m_bSDNum; + bool m_bMetaOptions; ///< true when we scanned the meta information + bool m_bSDNum; protected: virtual void NextToken( int nToken ) SAL_OVERRIDE; // base class - virtual sal_Bool CreateTable(int nToken) SAL_OVERRIDE; + virtual bool CreateTable(int nToken) SAL_OVERRIDE; virtual TypeSelectionPageFactory getTypeSelectionPageFactory() SAL_OVERRIDE; @@ -65,7 +65,7 @@ namespace dbaui const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const TColumnVector* rList, const OTypeInfoMap* _pInfoMap, - sal_Bool _bAutoIncrementEnabled); + bool _bAutoIncrementEnabled); virtual SvParserState CallParser() SAL_OVERRIDE;// base class virtual void release() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/IClipBoardTest.hxx b/dbaccess/source/ui/inc/IClipBoardTest.hxx index cbb6f130e54c..b44ec42b095a 100644 --- a/dbaccess/source/ui/inc/IClipBoardTest.hxx +++ b/dbaccess/source/ui/inc/IClipBoardTest.hxx @@ -25,11 +25,11 @@ namespace dbaui class SAL_NO_VTABLE IClipboardTest { public: - virtual sal_Bool isCutAllowed() = 0; - virtual sal_Bool isCopyAllowed() = 0; - virtual sal_Bool isPasteAllowed() = 0; + virtual bool isCutAllowed() = 0; + virtual bool isCopyAllowed() = 0; + virtual bool isPasteAllowed() = 0; - virtual sal_Bool hasChildPathFocus() = 0; + virtual bool hasChildPathFocus() = 0; virtual void copy() = 0; virtual void cut() = 0; diff --git a/dbaccess/source/ui/inc/IItemSetHelper.hxx b/dbaccess/source/ui/inc/IItemSetHelper.hxx index b752b485011c..4854955b67b9 100644 --- a/dbaccess/source/ui/inc/IItemSetHelper.hxx +++ b/dbaccess/source/ui/inc/IItemSetHelper.hxx @@ -55,7 +55,7 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() = 0; virtual OUString getDatasourceType(const SfxItemSet& _rSet) const = 0; virtual void clearPassword() = 0; - virtual sal_Bool saveDatasource() = 0; + virtual bool saveDatasource() = 0; virtual void setTitle(const OUString& _sTitle) = 0; /** enables or disables the user's possibility to confirm the settings diff --git a/dbaccess/source/ui/inc/JAccess.hxx b/dbaccess/source/ui/inc/JAccess.hxx index a221281c3d5b..b2ccaf15679c 100644 --- a/dbaccess/source/ui/inc/JAccess.hxx +++ b/dbaccess/source/ui/inc/JAccess.hxx @@ -38,7 +38,7 @@ namespace dbaui /** isEditable returns the current editable state @return true if the controller is not readonly otherwise false */ - virtual sal_Bool isEditable() const; + virtual bool isEditable() const; public: /** OJoinDesignViewAccess needs a valid view */ diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx index d660f167e678..c3434420db20 100644 --- a/dbaccess/source/ui/inc/JoinExchange.hxx +++ b/dbaccess/source/ui/inc/JoinExchange.hxx @@ -34,7 +34,7 @@ namespace dbaui class OJoinExchObj : public TransferableHelper, public OJoinExchObj_Base { static OUString m_sJoinFormat; - sal_Bool m_bFirstEntry; + bool m_bFirstEntry; protected: OJoinExchangeData m_jxdSourceDescription; @@ -43,7 +43,7 @@ namespace dbaui virtual ~OJoinExchObj(); public: - OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry=sal_False); + OJoinExchObj(const OJoinExchangeData& jxdSource,bool _bFirstEntry=false); // XInterface @@ -57,7 +57,7 @@ namespace dbaui void StartDrag( Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener ); static OJoinExchangeData GetSourceDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _rxObject); - static sal_Bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID=SOT_FORMATSTR_ID_SBA_JOIN); + static bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID=SOT_FORMATSTR_ID_SBA_JOIN); protected: virtual void AddSupportedFormats() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index 369047bb702a..61b0147bf134 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -99,7 +99,7 @@ namespace dbaui OTableConnection* m_pSelectedConn; - sal_Bool m_bTrackingInitiallyMoved; + bool m_bTrackingInitiallyMoved; DECL_LINK(OnDragScrollTimer, void*); @@ -133,7 +133,7 @@ namespace dbaui void NotifyTitleClicked( OTableWindow* pTabWin, const Point rMousePos ); - virtual void AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool bNewTable = sal_False); + virtual void AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool bNewTable = false); virtual void RemoveTabWin( OTableWindow* pTabWin ); // hide all TabWins (does NOT delete them; they are put in an UNDO action) @@ -160,9 +160,9 @@ namespace dbaui @param _pConnection the connection which should be added @param _bAddData when true then the data should also be appended */ - void addConnection(OTableConnection* _pConnection,sal_Bool _bAddData = sal_True); + void addConnection(OTableConnection* _pConnection,bool _bAddData = true); - sal_Bool ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars ); + bool ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars ); sal_uLong GetTabWinCount(); Point GetScrollOffset() const { return m_aScrollOffset; } @@ -181,7 +181,7 @@ namespace dbaui */ const ::std::vector<OTableConnection*>* getTableConnections() const { return &m_vTableConnection; } - sal_Bool ExistsAConn(const OTableWindow* pFromWin) const; + bool ExistsAConn(const OTableWindow* pFromWin) const; /** search for all connections of a table @@ -221,7 +221,7 @@ namespace dbaui virtual void ClearAll(); /** @note used by AddTabDlg to see if more tables can be added */ - virtual sal_Bool IsAddAllowed(); + virtual bool IsAddAllowed(); virtual bool PreNotify(NotifyEvent& rNEvt) SAL_OVERRIDE; // DnD stuff @@ -254,7 +254,7 @@ namespace dbaui @param _rSize The Size to be check as well @return true if the area is visible, false otherwise */ - sal_Bool isMovementAllowed(const Point& _rPoint,const Size& _rSize); + bool isMovementAllowed(const Point& _rPoint,const Size& _rSize); Size getRealOutputSize() const { return m_aOutputSize; } @@ -305,7 +305,7 @@ namespace dbaui private: void InitColors(); - sal_Bool ScrollWhileDragging(); + bool ScrollWhileDragging(); /** opens the context menu to delate a connection @param _aPos the position where the popup menu should appear diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx index f11cdab72d4a..0bf604a67bc1 100644 --- a/dbaccess/source/ui/inc/QueryDesignView.hxx +++ b/dbaccess/source/ui/inc/QueryDesignView.hxx @@ -71,15 +71,15 @@ namespace dbaui OSelectionBrowseBox* m_pSelectionBox; // presents the lower window ChildFocusState m_eChildFocus; - sal_Bool m_bInSplitHandler; + bool m_bInSplitHandler; public: OQueryDesignView(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ); virtual ~OQueryDesignView(); - virtual sal_Bool isCutAllowed() SAL_OVERRIDE; - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE; + virtual bool isCutAllowed() SAL_OVERRIDE; + virtual bool isPasteAllowed() SAL_OVERRIDE; + virtual bool isCopyAllowed() SAL_OVERRIDE; virtual void copy() SAL_OVERRIDE; virtual void cut() SAL_OVERRIDE; virtual void paste() SAL_OVERRIDE; @@ -88,7 +88,7 @@ namespace dbaui // set the view readonly or not virtual void setReadOnly(sal_Bool _bReadOnly) SAL_OVERRIDE; // check if the statement is correct when not returning false - virtual sal_Bool checkStatement(); + virtual bool checkStatement(); // set the statement for representation virtual void setStatement(const OUString& _rsStatement) SAL_OVERRIDE; // returns the current sql statement @@ -100,14 +100,14 @@ namespace dbaui virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; - sal_Bool isSlotEnabled(sal_Int32 _nSlotId); - void setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable); + bool isSlotEnabled(sal_Int32 _nSlotId); + void setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable); void setNoneVisbleRow(sal_Int32 _nRows); ::com::sun::star::lang::Locale getLocale() const { return m_aLocale;} OUString getDecimalSeparator() const { return m_sDecimalSep;} - SqlParseError InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis=sal_True, sal_Bool bActivate = sal_True); + SqlParseError InsertField( const OTableFieldDescRef& rInfo, bool bVis = true, bool bActivate = true); bool HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const; // save the position of the table window and the pos of the splitters // called when fields are deleted diff --git a/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx b/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx index d6e25af1c8a8..442668be6cc4 100644 --- a/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx +++ b/dbaccess/source/ui/inc/QueryPropertiesDialog.hxx @@ -28,10 +28,10 @@ class QueryPropertiesDialog : public ModalDialog public: QueryPropertiesDialog( - Window* pParent, const sal_Bool bDistinct, const sal_Int64 nLimit ); + Window* pParent, const bool bDistinct, const sal_Int64 nLimit ); virtual ~QueryPropertiesDialog(); - sal_Bool getDistinct() const; + bool getDistinct() const; sal_Int64 getLimit() const; private: @@ -44,7 +44,7 @@ private: }; -inline sal_Bool QueryPropertiesDialog::getDistinct() const +inline bool QueryPropertiesDialog::getDistinct() const { return m_pRB_Distinct->IsChecked(); } diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx index 8f12581678e2..889156e1439a 100644 --- a/dbaccess/source/ui/inc/QueryTableView.hxx +++ b/dbaccess/source/ui/inc/QueryTableView.hxx @@ -63,14 +63,14 @@ namespace dbaui /// base class overwritten: create and delete windows /// (not really delete, as it becomes an UndoAction) bool ContainsTabWin(const OTableWindow& rTabWin); // #i122589# Allow to check if OTableWindow is registered - virtual void AddTabWin( const OUString& _rTableName, const OUString& _rAliasName, sal_Bool bNewTable = sal_False ) SAL_OVERRIDE; + virtual void AddTabWin( const OUString& _rTableName, const OUString& _rAliasName, bool bNewTable = false ) SAL_OVERRIDE; virtual void RemoveTabWin(OTableWindow* pTabWin) SAL_OVERRIDE; /// AddTabWin, setting an alias - void AddTabWin(const OUString& strDatabase, const OUString& strTableName, const OUString& strAlias, sal_Bool bNewTable = sal_False); + void AddTabWin(const OUString& strDatabase, const OUString& strTableName, const OUString& strAlias, bool bNewTable = false); /// search TabWin OQueryTableWindow* FindTable(const OUString& rAliasName); - sal_Bool FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt); + bool FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt); /// base class overwritten: create and delete Connections virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest) SAL_OVERRIDE; @@ -89,7 +89,7 @@ namespace dbaui void DropConnection(OQueryTableConnection* pConn); // show and hide TabWin (NOT create or delete) - sal_Bool ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend); + bool ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction, bool _bAppend); void HideTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction); /// ensure visibility of TabWins (+ and invalidate connections) @@ -112,12 +112,12 @@ namespace dbaui //virtual sal_Bool IsAddAllowed(); /// announce new Connection and insert it, if not existant yet - void NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction = sal_True); + void NotifyTabConnection(const OQueryTableConnection& rNewConn, bool _bCreateUndoAction = true); /// @note the Handler receives a pointer to a TabWinsChangeNotification struct Link SetTabWinsChangeHandler(const Link& lnk) { Link lnkRet = m_lnkTabWinsChangeHandler; m_lnkTabWinsChangeHandler = lnk; return lnkRet; } - sal_Bool ExistsAVisitedConn(const OQueryTableWindow* pFrom) const; + bool ExistsAVisitedConn(const OQueryTableWindow* pFrom) const; virtual OTableWindowData* CreateImpl(const OUString& _rComposedName ,const OUString& _sTableName diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx index 2ab756569ec9..178d5db87d1a 100644 --- a/dbaccess/source/ui/inc/QueryTextView.hxx +++ b/dbaccess/source/ui/inc/QueryTextView.hxx @@ -35,9 +35,9 @@ namespace dbaui virtual void GetFocus() SAL_OVERRIDE; - virtual sal_Bool isCutAllowed(); - virtual sal_Bool isPasteAllowed(); - virtual sal_Bool isCopyAllowed(); + virtual bool isCutAllowed(); + virtual bool isPasteAllowed(); + virtual bool isCopyAllowed(); virtual void copy(); virtual void cut(); virtual void paste(); @@ -46,7 +46,7 @@ namespace dbaui // set the view readonly or not virtual void setReadOnly(sal_Bool _bReadOnly); // check if the statement is correct when not returning false - virtual sal_Bool checkStatement(); + virtual bool checkStatement(); // set the statement for representation virtual void setStatement(const OUString& _rsStatement); virtual OUString getStatement(); diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx index 3f012b9bc527..18d3597dca3e 100644 --- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx +++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx @@ -36,23 +36,23 @@ namespace dbaui { OQueryDesignView* m_pDesignView; OQueryTextView* m_pTextView; - sal_Bool m_bAddTableDialogWasVisible; // true if so + bool m_bAddTableDialogWasVisible; // true if so public: OQueryViewSwitch(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ); virtual ~OQueryViewSwitch(); - virtual sal_Bool isCutAllowed(); - virtual sal_Bool isPasteAllowed(); - virtual sal_Bool isCopyAllowed(); + virtual bool isCutAllowed(); + virtual bool isPasteAllowed(); + virtual bool isCopyAllowed(); virtual void copy(); virtual void cut(); virtual void paste(); // clears the whole query virtual void clear(); // set the view readonly or not - virtual void setReadOnly(sal_Bool _bReadOnly); + virtual void setReadOnly(bool _bReadOnly); // check if the statement is correct when not returning false - virtual sal_Bool checkStatement(); + virtual bool checkStatement(); // set the statement for representation virtual void setStatement(const OUString& _rsStatement); // returns the current sql statement @@ -68,8 +68,8 @@ namespace dbaui */ bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ); void forceInitialView(); - sal_Bool isSlotEnabled(sal_Int32 _nSlotId); - void setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable); + bool isSlotEnabled(sal_Int32 _nSlotId); + void setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable); void setNoneVisbleRow(sal_Int32 _nRows); void SaveUIConfig(); bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ); diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx index f5f5dce69c3f..bf33e90c08c9 100644 --- a/dbaccess/source/ui/inc/RTableConnectionData.hxx +++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx @@ -44,9 +44,9 @@ namespace dbaui sal_Int32 m_nDeleteRules; sal_Int32 m_nCardinality; - sal_Bool checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const; - sal_Bool IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); } - sal_Bool IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); } + bool checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable, EConnectionSide _eEConnectionSide) const; + bool IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); } + bool IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); } protected: virtual OConnectionLineDataRef CreateLineDataObj() SAL_OVERRIDE; @@ -68,7 +68,7 @@ namespace dbaui @return true if successful */ - virtual sal_Bool Update() SAL_OVERRIDE; + virtual bool Update() SAL_OVERRIDE; void SetCardinality(); inline void SetUpdateRules( sal_Int32 nAttr ){ m_nUpdateRules = nAttr; } @@ -78,9 +78,9 @@ namespace dbaui inline sal_Int32 GetDeleteRules() const { return m_nDeleteRules; } inline sal_Int32 GetCardinality() const { return m_nCardinality; } - sal_Bool IsConnectionPossible(); + bool IsConnectionPossible(); void ChangeOrientation(); - sal_Bool DropRelation(); + bool DropRelation(); }; } diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx index f37e5779694e..a04c08d5f9ca 100644 --- a/dbaccess/source/ui/inc/RelationControl.hxx +++ b/dbaccess/source/ui/inc/RelationControl.hxx @@ -79,7 +79,7 @@ namespace dbaui void Disable(); void Invalidate(); - sal_Bool SaveModified(); + bool SaveModified(); TTableWindowData::value_type getReferencingTable() const; diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx index d12f26036c68..5953f3b310cf 100644 --- a/dbaccess/source/ui/inc/RelationController.hxx +++ b/dbaccess/source/ui/inc/RelationController.hxx @@ -30,7 +30,7 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables; ::std::auto_ptr<WaitObject> m_pWaitObject; sal_uLong m_nThreadEvent; - sal_Bool m_bRelationsPossible; + bool m_bRelationsPossible; protected: // all the features which should be handled by this class virtual void describeSupportedFeatures() SAL_OVERRIDE; @@ -41,7 +41,7 @@ namespace dbaui ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>( getView() ); } void loadData(); - TTableWindowData::value_type existsTable(const OUString& _rComposedTableName,sal_Bool _bCase) const; + TTableWindowData::value_type existsTable(const OUString& _rComposedTableName,bool _bCase) const; // load the window positions out of the datasource void loadLayoutInformation(); diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx index 735f56b437ae..83167ac041fa 100644 --- a/dbaccess/source/ui/inc/RelationDlg.hxx +++ b/dbaccess/source/ui/inc/RelationDlg.hxx @@ -54,12 +54,12 @@ namespace dbaui TTableConnectionData::value_type m_pOrigConnData; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; - sal_Bool m_bTriedOneUpdate; + bool m_bTriedOneUpdate; public: ORelationDialog(OJoinTableView* pParent, const TTableConnectionData::value_type& pConnectionData, - sal_Bool bAllowTableSelect = sal_False ); + bool bAllowTableSelect = false ); virtual ~ORelationDialog(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() SAL_OVERRIDE { return m_xConnection; } diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx index 5bfd8a534878..cbc2b7abc065 100644 --- a/dbaccess/source/ui/inc/RelationTableView.hxx +++ b/dbaccess/source/ui/inc/RelationTableView.hxx @@ -38,7 +38,7 @@ namespace dbaui bool m_bInRemove; virtual void ConnDoubleClicked( OTableConnection* pConnection ) SAL_OVERRIDE; - virtual void AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool bNewTable = sal_False) SAL_OVERRIDE; + virtual void AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool bNewTable = false) SAL_OVERRIDE; virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData) SAL_OVERRIDE; @@ -65,7 +65,7 @@ namespace dbaui void AddNewRelation(); /// used by AddTabDlg to check if tables can be added - virtual sal_Bool IsAddAllowed() SAL_OVERRIDE; + virtual bool IsAddAllowed() SAL_OVERRIDE; virtual void lookForUiActivities() SAL_OVERRIDE; }; diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx index 533bf7721f55..29073306abd2 100644 --- a/dbaccess/source/ui/inc/RtfReader.hxx +++ b/dbaccess/source/ui/inc/RtfReader.hxx @@ -31,7 +31,7 @@ namespace dbaui ::std::vector<sal_Int32> m_vecColor; protected: - virtual sal_Bool CreateTable(int nToken) SAL_OVERRIDE; + virtual bool CreateTable(int nToken) SAL_OVERRIDE; virtual void NextToken( int nToken ) SAL_OVERRIDE; // base class virtual TypeSelectionPageFactory getTypeSelectionPageFactory() SAL_OVERRIDE; @@ -53,7 +53,7 @@ namespace dbaui const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const TColumnVector* rList, const OTypeInfoMap* _pInfoMap, - sal_Bool _bAutoIncrementEnabled); + bool _bAutoIncrementEnabled); virtual SvParserState CallParser() SAL_OVERRIDE;// base class /// @note Only recovers correct data if 2. CTOR has been used. diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx index 1fab3a65004d..8430dc4d4f38 100644 --- a/dbaccess/source/ui/inc/SqlNameEdit.hxx +++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx @@ -27,17 +27,17 @@ namespace dbaui class OSQLNameChecker { OUString m_sAllowedChars; - sal_Bool m_bOnlyUpperCase; - sal_Bool m_bCheck; // true when we should check for invalid chars + bool m_bOnlyUpperCase; + bool m_bCheck; // true when we should check for invalid chars public: OSQLNameChecker(const OUString& _rAllowedChars) :m_sAllowedChars(_rAllowedChars) - ,m_bOnlyUpperCase(sal_False) - ,m_bCheck(sal_True) + ,m_bOnlyUpperCase(false) + ,m_bCheck(true) { } - void setUpperCase(sal_Bool _bUpper=sal_True) + void setUpperCase(bool _bUpper=true) { m_bOnlyUpperCase = _bUpper; } @@ -46,11 +46,11 @@ namespace dbaui m_sAllowedChars = _rAllowedChars; } // default is false because it is initialized with true - void setCheck(sal_Bool _bCheck = sal_False) + void setCheck(bool _bCheck = false) { m_bCheck = _bCheck; } - sal_Bool checkString(const OUString& _sToCheck,OUString& _rsCorrected); + bool checkString(const OUString& _sToCheck,OUString& _rsCorrected); }; class OSQLNameEdit : public Edit ,public OSQLNameChecker diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx index 96c5d2b447e7..a48e54f47951 100644 --- a/dbaccess/source/ui/inc/TableConnection.hxx +++ b/dbaccess/source/ui/inc/TableConnection.hxx @@ -43,7 +43,7 @@ namespace dbaui m_pData; OJoinTableView* m_pParent; - sal_Bool m_bSelected; + bool m_bSelected; void Init(); /** loops through the vector and deletes all lines */ @@ -70,8 +70,8 @@ namespace dbaui void Select(); void Deselect(); - sal_Bool IsSelected() const { return m_bSelected; } - sal_Bool CheckHit( const Point& rMousePos ) const; + bool IsSelected() const { return m_bSelected; } + bool CheckHit( const Point& rMousePos ) const; bool InvalidateConnection(); void UpdateLineList(); diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx index 3beb08590174..187377b5c4bc 100644 --- a/dbaccess/source/ui/inc/TableConnectionData.hxx +++ b/dbaccess/source/ui/inc/TableConnectionData.hxx @@ -69,8 +69,8 @@ namespace dbaui */ virtual OTableConnectionData* NewInstance() const; - sal_Bool SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ); - sal_Bool AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ); + bool SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ); + bool AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ); /** Deletes list of ConnLines */ void ResetConnLines(); @@ -100,7 +100,7 @@ namespace dbaui @return true if successful */ - virtual sal_Bool Update(){ return sal_True; } + virtual bool Update(){ return true; } }; typedef ::std::vector< ::boost::shared_ptr<OTableConnectionData> > TTableConnectionData; diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx index 93d2ff251f74..3278a7905a34 100644 --- a/dbaccess/source/ui/inc/TableController.hxx +++ b/dbaccess/source/ui/inc/TableController.hxx @@ -51,17 +51,17 @@ namespace dbaui OUString m_sTypeNames; // these type names are the ones out of the resource file TOTypeInfoSP m_pTypeInfo; // fall back when type is unknown because database driver has a failure - sal_Bool m_bAllowAutoIncrementValue; // no : 1 NO BIT , is true when the datasource has a AutoIncrementValue property in their info property - sal_Bool m_bNew : 1; // is true when we create a new table + bool m_bAllowAutoIncrementValue; // no : 1 NO BIT , is true when the datasource has a AutoIncrementValue property in their info property + bool m_bNew : 1; // is true when we create a new table void reSyncRows(); void assignTable(); // set the table if a name is given void loadData(); - sal_Bool checkColumns(sal_Bool _bNew) throw(::com::sun::star::sdbc::SQLException); // check if we have double column names + bool checkColumns(bool _bNew) throw(::com::sun::star::sdbc::SQLException); // check if we have double column names OUString createUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxTables,const OUString& _rDefault); - void appendColumns(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup,sal_Bool _bNew,sal_Bool _bKeyColumns = sal_False); - void appendPrimaryKey(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XKeysSupplier>& _rxSup,sal_Bool _bNew); + void appendColumns(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup, bool _bNew, bool _bKeyColumns = false); + void appendPrimaryKey(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XKeysSupplier>& _rxSup, bool _bNew); void alterColumns(); void dropPrimaryKey(); ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getKeyColumns() const; @@ -81,7 +81,7 @@ namespace dbaui virtual OUString getPrivateTitle( ) const SAL_OVERRIDE; void doEditIndexes(); - sal_Bool doSaveDoc(sal_Bool _bSaveAs); + bool doSaveDoc(bool _bSaveAs); virtual ~OTableController(); public: @@ -89,12 +89,12 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getTable() { return m_xTable;} - sal_Bool isAddAllowed() const; - sal_Bool isDropAllowed() const; - sal_Bool isAlterAllowed() const; + bool isAddAllowed() const; + bool isDropAllowed() const; + bool isAlterAllowed() const; bool isAutoIncrementPrimaryKey() const; - inline sal_Bool isAutoIncrementValueEnabled() const { return m_bAllowAutoIncrementValue; } + inline bool isAutoIncrementValueEnabled() const { return m_bAllowAutoIncrementValue; } inline const OUString& getAutoIncrementValue() const { return m_sAutoIncrementValue; } virtual void impl_onModifyChanged() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx index 127567abba57..3ffefd87de26 100644 --- a/dbaccess/source/ui/inc/TableCopyHelper.hxx +++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx @@ -36,8 +36,8 @@ namespace dbaui struct TAppSupportedSotFunctor : ::std::unary_function<DataFlavorExVector::value_type,bool> { ElementType eEntryType; - sal_Bool bQueryDrop; - TAppSupportedSotFunctor(const ElementType& _eEntryType,sal_Bool _bQueryDrop) + bool bQueryDrop; + TAppSupportedSotFunctor(const ElementType& _eEntryType,bool _bQueryDrop) : eEntryType(_eEntryType) , bQueryDrop(_bQueryDrop) { @@ -79,15 +79,15 @@ namespace dbaui ElementType nType; SvTreeListEntry* pDroppedAt; sal_Int8 nAction; - sal_Bool bHtml; - sal_Bool bError; + bool bHtml; + bool bError; DropDescriptor() : nType(E_TABLE) , pDroppedAt(NULL) , nAction(DND_ACTION_NONE) - , bHtml(sal_False) - , bError(sal_False) + , bHtml(false) + , bError(false) { } }; @@ -124,9 +124,9 @@ namespace dbaui @param _xConnection The connection */ - sal_Bool copyTagTable( DropDescriptor& _rDesc, - sal_Bool _bCheck, - const SharedConnection& _xConnection); + bool copyTagTable( DropDescriptor& _rDesc, + bool _bCheck, + const SharedConnection& _xConnection); /** copies a table which was constructed by tags like HTML or RTF @param _rDesc @@ -148,12 +148,12 @@ namespace dbaui @param _xConnection The connection */ - sal_Bool copyTagTable(const TransferableDataHelper& _aDroppedData, - DropDescriptor& _rAsyncDrop, - const SharedConnection& _xConnection); + bool copyTagTable(const TransferableDataHelper& _aDroppedData, + DropDescriptor& _rAsyncDrop, + const SharedConnection& _xConnection); /// returns <TRUE/> if the clipboard supports a table format, otherwise <FALSE/>. - sal_Bool isTableFormat(const TransferableDataHelper& _rClipboard) const; + bool isTableFormat(const TransferableDataHelper& _rClipboard) const; inline void SetTableNameForAppend( const OUString& _rDefaultTableName ) { m_sTableNameForAppend = _rDefaultTableName; } inline void ResetTableNameForAppend() { SetTableNameForAppend( OUString() ); } @@ -181,7 +181,7 @@ namespace dbaui const sal_Int32 i_nCommandType, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& i_rSourceRows, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelection, - const sal_Bool i_bBookmarkSelection, + const bool i_bBookmarkSelection, const OUString& i_rDestDataSource, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_rDestConnection ); diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx index 67a719f271bb..ca99ce7464ce 100644 --- a/dbaccess/source/ui/inc/TableDesignControl.hxx +++ b/dbaccess/source/ui/inc/TableDesignControl.hxx @@ -41,9 +41,9 @@ namespace dbaui sal_uInt16 m_nCurUndoActId; protected: - sal_Bool m_bCurrentModified; - sal_Bool m_bUpdatable; - sal_Bool m_bClipboardFilled; + bool m_bCurrentModified; + bool m_bUpdatable; + bool m_bClipboardFilled; public: OTableRowView(Window* pParent); @@ -72,12 +72,12 @@ namespace dbaui virtual void InsertRows( long nRow ) = 0; virtual void InsertNewRows( long nRow ) = 0; - virtual sal_Bool IsPrimaryKeyAllowed( long nRow ) = 0; - virtual sal_Bool IsInsertNewAllowed( long nRow ) = 0; - virtual sal_Bool IsDeleteAllowed( long nRow ) = 0; + virtual bool IsPrimaryKeyAllowed( long nRow ) = 0; + virtual bool IsInsertNewAllowed( long nRow ) = 0; + virtual bool IsDeleteAllowed( long nRow ) = 0; - virtual sal_Bool IsUpdatable() const {return m_bUpdatable;} - virtual void SetUpdatable( sal_Bool bUpdate=sal_True ); + virtual bool IsUpdatable() const {return m_bUpdatable;} + virtual void SetUpdatable( bool bUpdate=true ); virtual RowStatus GetRowStatus(long nRow) const SAL_OVERRIDE; virtual void KeyInput(const KeyEvent& rEvt) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx index 7e6746779a5c..a025d341afe8 100644 --- a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx +++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx @@ -48,10 +48,10 @@ namespace dbaui virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; // IClipboardTest - virtual sal_Bool isCutAllowed() SAL_OVERRIDE; - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE; - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + virtual bool isCutAllowed() SAL_OVERRIDE; + virtual bool isCopyAllowed() SAL_OVERRIDE; + virtual bool isPasteAllowed() SAL_OVERRIDE; + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } virtual void copy() SAL_OVERRIDE; virtual void cut() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx index e2320d72647b..c37bc7969450 100644 --- a/dbaccess/source/ui/inc/TableDesignView.hxx +++ b/dbaccess/source/ui/inc/TableDesignView.hxx @@ -36,7 +36,7 @@ namespace dbaui OTableFieldDescWin* m_pFieldDescWin; OTableEditorCtrl* m_pEditorCtrl; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); void ArrangeChildren( long nSplitPos ,Rectangle& rRect); DECL_LINK( SplitHdl, Splitter* ); protected: @@ -89,16 +89,16 @@ namespace dbaui ::com::sun::star::lang::Locale getLocale() const { return m_aLocale;} // IClipboardTest - virtual sal_Bool isCutAllowed() SAL_OVERRIDE; - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE; - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + virtual bool isCutAllowed() SAL_OVERRIDE; + virtual bool isCopyAllowed() SAL_OVERRIDE; + virtual bool isPasteAllowed() SAL_OVERRIDE; + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } virtual void copy() SAL_OVERRIDE; virtual void cut() SAL_OVERRIDE; virtual void paste() SAL_OVERRIDE; // set the view readonly or not - virtual void setReadOnly(sal_Bool _bReadOnly); + virtual void setReadOnly(bool _bReadOnly); virtual void initialize() SAL_OVERRIDE; void reSync(); // resync window data with realdata diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx index 1a0703511ed4..376d958e089f 100644 --- a/dbaccess/source/ui/inc/TableFieldDescription.hxx +++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx @@ -58,8 +58,8 @@ namespace dbaui sal_Int32 m_nIndex; sal_Int32 m_nColWidth; sal_uInt16 m_nColumnId; - sal_Bool m_bGroupBy; - sal_Bool m_bVisible; + bool m_bGroupBy; + bool m_bVisible; // when adding new fields, please take care of IsEmpty! @@ -69,16 +69,16 @@ namespace dbaui OTableFieldDesc(const OTableFieldDesc& rRS); virtual ~OTableFieldDesc(); - inline sal_Bool IsEmpty() const; + inline bool IsEmpty() const; OTableFieldDesc& operator=( const OTableFieldDesc& _aField ); - sal_Bool operator==( const OTableFieldDesc& rDesc ); + bool operator==( const OTableFieldDesc& rDesc ); - sal_Bool IsVisible() const { return m_bVisible;} - sal_Bool IsGroupBy() const { return m_bGroupBy;} + bool IsVisible() const { return m_bVisible;} + bool IsGroupBy() const { return m_bGroupBy;} - void SetVisible( sal_Bool bVis=sal_True ) { m_bVisible = bVis; } - void SetGroupBy( sal_Bool bGb=sal_False ) { m_bGroupBy = bGb; } + void SetVisible( bool bVis=true ) { m_bVisible = bVis; } + void SetGroupBy( bool bGb=false ) { m_bGroupBy = bGb; } void SetTabWindow( Window* pWin ){ m_pTabWindow = pWin; } void SetField( const OUString& rF ) { m_aFieldName = rF; } void SetFieldAlias( const OUString& rF ) { m_aFieldAlias = rF; } @@ -109,14 +109,14 @@ namespace dbaui sal_Int32 GetFunctionType() const { return m_eFunctionType; } sal_uInt16 GetColumnId() const { return m_nColumnId;} - inline sal_Bool isAggreateFunction() const { return (m_eFunctionType & FKT_AGGREGATE) == FKT_AGGREGATE; } - inline sal_Bool isOtherFunction() const { return (m_eFunctionType & FKT_OTHER) == FKT_OTHER; } - inline sal_Bool isNumeric() const { return (m_eFunctionType & FKT_NUMERIC) == FKT_NUMERIC; } - inline sal_Bool isNoneFunction() const { return m_eFunctionType == FKT_NONE; } - inline sal_Bool isCondition() const { return (m_eFunctionType & FKT_CONDITION) == FKT_CONDITION; } - inline sal_Bool isNumericOrAggreateFunction() const { return isNumeric() || isAggreateFunction(); } + inline bool isAggreateFunction() const { return (m_eFunctionType & FKT_AGGREGATE) == FKT_AGGREGATE; } + inline bool isOtherFunction() const { return (m_eFunctionType & FKT_OTHER) == FKT_OTHER; } + inline bool isNumeric() const { return (m_eFunctionType & FKT_NUMERIC) == FKT_NUMERIC; } + inline bool isNoneFunction() const { return m_eFunctionType == FKT_NONE; } + inline bool isCondition() const { return (m_eFunctionType & FKT_CONDITION) == FKT_CONDITION; } + inline bool isNumericOrAggreateFunction() const { return isNumeric() || isAggreateFunction(); } - sal_Bool HasCriteria() const + bool HasCriteria() const { ::std::vector< OUString>::const_iterator aIter = m_aCriteria.begin(); ::std::vector< OUString>::const_iterator aEnd = m_aCriteria.end(); @@ -132,9 +132,9 @@ namespace dbaui void Save( ::comphelper::NamedValueCollection& o_rSettings, const bool i_bIncludingCriteria ); }; - inline sal_Bool OTableFieldDesc::IsEmpty() const + inline bool OTableFieldDesc::IsEmpty() const { - sal_Bool bEmpty = (m_aTableName.isEmpty() && + bool bEmpty = (m_aTableName.isEmpty() && m_aAliasName.isEmpty() && m_aFieldName.isEmpty() && m_aFieldAlias.isEmpty() && diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx index 0a11b67eeaac..5a97c39cc275 100644 --- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx +++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx @@ -98,7 +98,7 @@ private: DECL_LINK( AsynchActivate, void* ); DECL_LINK( AsynchDeactivate, void* ); - sal_Bool isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const; + bool isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const; void fillPrivilege(sal_Int32 _nRow) const; TTablePrivilegeMap::const_iterator findPrivilege(sal_Int32 _nRow) const; }; diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx index 2fc48d115dd6..e2a2c99392db 100644 --- a/dbaccess/source/ui/inc/TableRow.hxx +++ b/dbaccess/source/ui/inc/TableRow.hxx @@ -45,10 +45,10 @@ namespace dbaui inline OFieldDescription* GetActFieldDescr() const { return m_pActFieldDescr; } inline bool isValid() const { return GetActFieldDescr() != NULL; } - void SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce = sal_False ); + void SetFieldType( const TOTypeInfoSP& _pType, bool _bForce = false ); - void SetPrimaryKey( sal_Bool bSet ); - sal_Bool IsPrimaryKey() const; + void SetPrimaryKey( bool bSet ); + bool IsPrimaryKey() const; /** returns the current position in the table. @return diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index 91bbcff99fb8..ed11ef6b0748 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -67,7 +67,7 @@ namespace dbaui sal_Int32 m_nMoveCount; // how often the arrow keys was pressed sal_Int32 m_nMoveIncrement; // how many pixel we should move sal_uInt16 m_nSizingFlags; - sal_Bool m_bActive; + bool m_bActive; void Draw3DBorder( const Rectangle& rRect ); // OContainerListener @@ -84,7 +84,7 @@ namespace dbaui virtual OTableWindowListBox* CreateListBox(); // called at FIRST Init - sal_Bool FillListBox(); + bool FillListBox(); // called at EACH Init virtual void OnEntryDoubleClicked(SvTreeListEntry* /*pEntry*/) { } @@ -96,7 +96,7 @@ namespace dbaui @return <TRUE/> when the table could handle the keyevent. */ - sal_Bool HandleKeyInput( const KeyEvent& rEvt ); + bool HandleKeyInput( const KeyEvent& rEvt ); /** delete the user data with the equal type as created within createUserData @param _pUserData @@ -127,7 +127,7 @@ namespace dbaui virtual ~OTableWindow(); // late Constructor, see also CreateListbox and FillListbox - virtual sal_Bool Init(); + virtual bool Init(); OJoinTableView* getTableView(); const OJoinTableView* getTableView() const; @@ -137,11 +137,11 @@ namespace dbaui void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE; OUString getTitle() const; - void SetBoldTitle( sal_Bool bBold ); - void setActive(sal_Bool _bActive = sal_True); + void SetBoldTitle( bool bBold ); + void setActive(bool _bActive = true); void Remove(); - sal_Bool IsActiveWindow(){ return m_bActive; } + bool IsActiveWindow(){ return m_bActive; } OUString GetTableName() const { return m_pData->GetTableName(); } OUString GetWinName() const { return m_pData->GetWinName(); } @@ -183,7 +183,7 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; // do I have connections to the outside? - sal_Bool ExistsAConn() const; + bool ExistsAConn() const; void EnumValidFields(::std::vector< OUString>& arrstrFields); diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx index 1de5551fcc00..246ee51fc7db 100644 --- a/dbaccess/source/ui/inc/TableWindowAccess.hxx +++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx @@ -46,7 +46,7 @@ namespace dbaui /** isEditable returns the current editable state @return true if it is editable otherwise false */ - virtual sal_Bool isEditable() const; + virtual bool isEditable() const; virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) SAL_OVERRIDE; public: diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx index b3eb5dd94ef8..29775a40fd7e 100644 --- a/dbaccess/source/ui/inc/TableWindowData.hxx +++ b/dbaccess/source/ui/inc/TableWindowData.hxx @@ -46,7 +46,7 @@ namespace dbaui OUString m_sComposedName; Point m_aPosition; Size m_aSize; - sal_Bool m_bShowAll; + bool m_bShowAll; bool m_bIsQuery; bool m_bIsValid; @@ -71,16 +71,16 @@ namespace dbaui inline OUString GetWinName() const { return m_aWinName; } inline Point GetPosition() const { return m_aPosition; } inline Size GetSize() const { return m_aSize; } - inline sal_Bool IsShowAll() const { return m_bShowAll; } + inline bool IsShowAll() const { return m_bShowAll; } inline bool isQuery() const { return m_bIsQuery; } inline bool isValid() const { return m_bIsValid; } // it is either a table or query but it is known - sal_Bool HasPosition() const; - sal_Bool HasSize() const; + bool HasPosition() const; + bool HasSize() const; inline void SetWinName( const OUString& rWinName ) { m_aWinName = rWinName; } inline void SetPosition( const Point& rPos ) { m_aPosition=rPos; } inline void SetSize( const Size& rSize ) { m_aSize = rSize; } - inline void ShowAll( sal_Bool bAll ) { m_bShowAll = bAll; } + inline void ShowAll( bool bAll ) { m_bShowAll = bAll; } inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getTable() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xTable; } inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> getKeys() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xKeys; } diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx index b339885edd23..70e807dc156e 100644 --- a/dbaccess/source/ui/inc/TableWindowListBox.hxx +++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx @@ -61,7 +61,7 @@ namespace dbaui sal_uLong m_nUiEvent; OJoinDropData m_aDropInfo; - sal_Bool m_bReallyScrolled : 1; + bool m_bReallyScrolled : 1; protected: virtual void LoseFocus() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx b/dbaccess/source/ui/inc/TablesSingleDlg.hxx index 682d0a0d6e9e..3761026ec4c7 100644 --- a/dbaccess/source/ui/inc/TablesSingleDlg.hxx +++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx @@ -43,7 +43,7 @@ class ODbDataSourceAdministrationHelper; class OTableSubscriptionDialog : public SfxSingleTabDialog, public IItemSetHelper { ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl; - sal_Bool m_bStopExecution; // set when the dialog should not be executed + bool m_bStopExecution; // set when the dialog should not be executed DECL_LINK( OKClickHdl, OKButton* ); SfxItemSet* m_pOutSet; @@ -58,11 +58,11 @@ class ODbDataSourceAdministrationHelper; // forwards from ODbDataSourceAdministrationHelper void successfullyConnected(); - sal_Bool getCurrentSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverParams); + bool getCurrentSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverParams); void clearPassword(); OUString getConnectionURL() const; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getCurrentDataSource(); - inline void endExecution() { m_bStopExecution = sal_True; } + inline void endExecution() { m_bStopExecution = true; } virtual const SfxItemSet* getOutputSet() const SAL_OVERRIDE; virtual SfxItemSet* getWriteOutputSet() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx index b2a8afa987cf..e005461d8465 100644 --- a/dbaccess/source/ui/inc/TokenWriter.hxx +++ b/dbaccess/source/ui/inc/TokenWriter.hxx @@ -57,7 +57,7 @@ namespace dbaui protected: ::com::sun::star::lang::Locale m_aLocale; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aSelection; - sal_Bool m_bBookmarkSelection; + bool m_bBookmarkSelection; SvStream* m_pStream; ::com::sun::star::awt::FontDescriptor m_aFont; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xObject; // table/query @@ -82,8 +82,8 @@ namespace dbaui ODatabaseExport* m_pReader; sal_Int32* m_pRowMarker; // if set, then copy only these rows rtl_TextEncoding m_eDestEnc; - sal_Bool m_bInInitialize; - sal_Bool m_bCheckOnly; + bool m_bInInitialize; + bool m_bCheckOnly; // export data ODatabaseImportExport( const ::svx::ODataAccessDescriptor& _aDataDescriptor, @@ -105,14 +105,14 @@ namespace dbaui //for set the tablename void setSTableName(const OUString &_sTableName){ m_sDefaultTableName = _sTableName; } - virtual sal_Bool Write(); // Export - virtual sal_Bool Read(); // Import + virtual bool Write(); // Export + virtual bool Read(); // Import void initialize(const ::svx::ODataAccessDescriptor& _aDataDescriptor); void dispose(); - void enableCheckOnly() { m_bCheckOnly = sal_True; } - sal_Bool isCheckEnabled() const { return m_bCheckOnly; } + void enableCheckOnly() { m_bCheckOnly = true; } + bool isCheckEnabled() const { return m_bCheckOnly; } private: virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -139,8 +139,8 @@ namespace dbaui : ODatabaseImportExport(_rxConnection,_rxNumberF,_rM) {} - virtual sal_Bool Write() SAL_OVERRIDE; - virtual sal_Bool Read() SAL_OVERRIDE; + virtual bool Write() SAL_OVERRIDE; + virtual bool Read() SAL_OVERRIDE; }; // HTML Import and Export #define SBA_HTML_FONTSIZES 7 @@ -156,7 +156,7 @@ namespace dbaui char sIndent[nIndentMax+1]; sal_Int16 m_nIndent; #if OSL_DEBUG_LEVEL > 0 - sal_Bool m_bCheckFont; + bool m_bCheckFont; #endif void WriteHeader(); @@ -182,8 +182,8 @@ namespace dbaui , m_nIndent(0) {} - virtual sal_Bool Write() SAL_OVERRIDE; - virtual sal_Bool Read() SAL_OVERRIDE; + virtual bool Write() SAL_OVERRIDE; + virtual bool Read() SAL_OVERRIDE; }; // normal RowSet Import and Export @@ -197,9 +197,9 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > m_xTargetRowUpdate; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xTargetResultSetMetaData; Window* m_pParent; - sal_Bool m_bAlreadyAsked; + bool m_bAlreadyAsked; - sal_Bool insertNewRow(); + bool insertNewRow(); protected: virtual void initialize() SAL_OVERRIDE; @@ -217,8 +217,8 @@ namespace dbaui : ODatabaseImportExport(_rxConnection,NULL,_rM) {} - virtual sal_Bool Write() SAL_OVERRIDE; - virtual sal_Bool Read() SAL_OVERRIDE; + virtual bool Write() SAL_OVERRIDE; + virtual bool Read() SAL_OVERRIDE; private: using ODatabaseImportExport::initialize; diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx index 5eb834576f52..42ada9d07062 100644 --- a/dbaccess/source/ui/inc/TypeInfo.hxx +++ b/dbaccess/source/ui/inc/TypeInfo.hxx @@ -81,7 +81,7 @@ const sal_uInt16 TYPE_BIT = 31; sal_Int16 nSearchType; // if it is possible to search for type - sal_Bool bCurrency : 1, // currency + bool bCurrency : 1, // currency bAutoIncrement : 1, // if automatic incrementing field bNullable : 1, // if field can be NULL bCaseSensitive : 1, // if type is case sensitive @@ -94,14 +94,14 @@ const sal_uInt16 TYPE_BIT = 31; ,nMaximumScale(0) ,nMinimumScale(0) ,nSearchType(::com::sun::star::sdbc::ColumnSearch::FULL) - ,bCurrency(sal_False) - ,bAutoIncrement(sal_False) - ,bNullable(sal_True) - ,bCaseSensitive(sal_False) - ,bUnsigned(sal_False) + ,bCurrency(false) + ,bAutoIncrement(false) + ,bNullable(true) + ,bCaseSensitive(false) + ,bUnsigned(false) {} - sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; } - sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; } + bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; } + bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; } inline OUString getDBName() const { return aTypeName; } }; @@ -124,8 +124,8 @@ const sal_uInt16 TYPE_BIT = 31; const OUString& _sCreateParams, sal_Int32 _nPrecision, sal_Int32 _nScale, - sal_Bool _bAutoIncrement, - sal_Bool& _brForceToType); + bool _bAutoIncrement, + bool& _brForceToType); } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_TYPEINFO_HXX diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index 3577d627f46c..db1112943b91 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -135,7 +135,7 @@ namespace dbaui /** checks if the given name exists in the database context */ - sal_Bool checkDataSourceAvailable( const OUString& _sDataSourceName, + bool checkDataSourceAvailable( const OUString& _sDataSourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext); /** maps SvxCellHorJustify to com::sun::star::awt::TextAlign @@ -191,12 +191,12 @@ namespace dbaui /** second variant of the function before */ - sal_Bool callColumnFormatDialog(Window* _pParent, + bool callColumnFormatDialog(Window* _pParent, SvNumberFormatter* _pFormatter, sal_Int32 _nDataType, sal_Int32& _nFormatKey, SvxCellHorJustify& _eJustify, - sal_Bool _bHasFormat); + bool _bHasFormat); /** append a name to tablefilter of a datasource @param _xConnection the connection is need to get the datasource @param _sName the name which should be appended @@ -204,7 +204,7 @@ namespace dbaui @param _pParent needed when an error must be shown @return false when datsource is not available otherwise true */ - sal_Bool appendToFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, + bool appendToFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, const OUString& _sName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, Window* _pParent); @@ -238,7 +238,7 @@ namespace dbaui @return <TRUE/> if so otherwise <FALSE/> */ - sal_Bool isSQL92CheckEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection); + bool isSQL92CheckEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection); /** check if the alias name of the table should be added at select statements @param _xConnection @@ -246,11 +246,11 @@ namespace dbaui @return <TRUE/> if so otherwise <FALSE/> */ - sal_Bool isAppendTableAliasEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection); + bool isAppendTableAliasEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection); /** determines whether when generating SQL statements, AS should be placed before a table alias */ - sal_Bool generateAsBeforeTableAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection ); + bool generateAsBeforeTableAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection ); /** fills the bool and string value with information out of the datasource info property @param _xDatasource @@ -261,7 +261,7 @@ namespace dbaui <OUT/> Set to the value when the property was set in the datasource. */ void fillAutoIncrementValue(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDatasource - ,sal_Bool& _rAutoIncrementValueEnabled + ,bool& _rAutoIncrementValueEnabled ,OUString& _rsAutoIncrementValue); /** fills the bool and string value with information out of the datasource info property @@ -273,7 +273,7 @@ namespace dbaui <OUT/> Set to the value when the property was set in the datasource. */ void fillAutoIncrementValue(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection - ,sal_Bool& _rAutoIncrementValueEnabled + ,bool& _rAutoIncrementValueEnabled ,OUString& _rsAutoIncrementValue); /** creates the URL or the help agent @@ -327,7 +327,7 @@ namespace dbaui @return RET_YES, RET_NO, RET_ALL */ - sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const OUString& _sName); + sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,bool _bAll,const OUString& _sName); /** creates a new view from a query or table @param _sName @@ -388,15 +388,15 @@ namespace dbaui @return <TRUE/> if the insert opertions was successful, otherwise <FALSE/>. */ - sal_Bool insertHierachyElement( + bool insertHierachyElement( Window* _pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameContainer>& _xNames, const OUString& _sParentFolder, - sal_Bool _bForm, - sal_Bool _bCollection = sal_True, + bool _bForm, + bool _bCollection = true, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent = NULL, - sal_Bool _bMove = sal_False + bool _bMove = false ); /** creates a number formatter @@ -409,7 +409,7 @@ namespace dbaui // this completes a help url with the system parameters "Language" and "System" // detect installed locale - void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ); + void AppendConfigToken( OUString& _rURL, bool _bQuestionMark ); } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_UITOOLS_HXX diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx index 0223d1f999ee..9e136c1968e4 100644 --- a/dbaccess/source/ui/inc/UserAdminDlg.hxx +++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx @@ -49,7 +49,7 @@ namespace dbaui ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl; SfxItemSet* m_pItemSet; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection; - sal_Bool m_bOwnConnection; + bool m_bOwnConnection; protected: virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) SAL_OVERRIDE; public: @@ -72,7 +72,7 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() SAL_OVERRIDE; virtual OUString getDatasourceType(const SfxItemSet& _rSet) const SAL_OVERRIDE; virtual void clearPassword() SAL_OVERRIDE; - virtual sal_Bool saveDatasource() SAL_OVERRIDE; + virtual bool saveDatasource() SAL_OVERRIDE; virtual void setTitle(const OUString& _sTitle) SAL_OVERRIDE; virtual void enableConfirmSettings( bool _bEnable ) SAL_OVERRIDE; }; diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx index c1ce40c42263..cdc635e187cf 100644 --- a/dbaccess/source/ui/inc/VertSplitView.hxx +++ b/dbaccess/source/ui/inc/VertSplitView.hxx @@ -30,14 +30,14 @@ namespace dbaui Splitter* m_pSplitter; Window* m_pLeft; Window* m_pRight; - sal_Bool m_bVertical; + bool m_bVertical; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); DECL_LINK( SplitHdl, Splitter* ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; public: - OSplitterView(Window* _pParent,sal_Bool _bVertical = sal_True); + OSplitterView(Window* _pParent,bool _bVertical = true); virtual ~OSplitterView(); // window overloads virtual void GetFocus() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx index ceb0e80bd635..1b556eee0c3e 100644 --- a/dbaccess/source/ui/inc/WCPage.hxx +++ b/dbaccess/source/ui/inc/WCPage.hxx @@ -50,31 +50,31 @@ namespace dbaui OWizColumnSelect* m_pPage2; OWizNormalExtend* m_pPage3; - sal_Bool m_bPKeyAllowed; - sal_Bool m_bUseHeaderAllowed; + bool m_bPKeyAllowed; + bool m_bUseHeaderAllowed; DECL_LINK( AppendDataClickHdl, Button* ); DECL_LINK( RadioChangeHdl, Button* ); DECL_LINK( KeyClickHdl, Button* ); - sal_Bool checkAppendData(); + bool checkAppendData(); void SetAppendDataRadio(); public: virtual void Reset() SAL_OVERRIDE; virtual void ActivatePage() SAL_OVERRIDE; - virtual sal_Bool LeavePage() SAL_OVERRIDE; + virtual bool LeavePage() SAL_OVERRIDE; virtual OUString GetTitle() const SAL_OVERRIDE ; OCopyTable( Window * pParent ); virtual ~OCopyTable(); - inline sal_Bool IsOptionDefData() const { return m_aRB_DefData.IsChecked(); } - inline sal_Bool IsOptionDef() const { return m_aRB_Def.IsChecked(); } - inline sal_Bool IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); } - inline sal_Bool IsOptionView() const { return m_aRB_View.IsChecked(); } - inline sal_Bool UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); } - OUString GetKeyName() const { return m_edKeyName.GetText(); } + inline bool IsOptionDefData() const { return m_aRB_DefData.IsChecked(); } + inline bool IsOptionDef() const { return m_aRB_Def.IsChecked(); } + inline bool IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); } + inline bool IsOptionView() const { return m_aRB_View.IsChecked(); } + inline bool UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); } + OUString GetKeyName() const { return m_edKeyName.GetText(); } void setCreateStyleAction(); inline void disallowViews() @@ -83,7 +83,7 @@ namespace dbaui } inline void disallowUseHeaderLine() { - m_bUseHeaderAllowed = sal_False; + m_bUseHeaderAllowed = false; m_aCB_UseHeaderLine.Disable(); } diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx index 016c33a60c79..e6050b8ddcba 100644 --- a/dbaccess/source/ui/inc/WColumnSelect.hxx +++ b/dbaccess/source/ui/inc/WColumnSelect.hxx @@ -77,7 +77,7 @@ namespace dbaui public: virtual void Reset ( ) SAL_OVERRIDE; virtual void ActivatePage() SAL_OVERRIDE; - virtual sal_Bool LeavePage() SAL_OVERRIDE; + virtual bool LeavePage() SAL_OVERRIDE; virtual OUString GetTitle() const SAL_OVERRIDE ; OWizColumnSelect(Window* pParent); diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index 49faeffa220d..d042c316e87d 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -263,35 +263,35 @@ namespace dbaui OUString m_sTypeNames; // these type names are the ones out of the resource file sal_uInt32 m_nPageCount; - sal_Bool m_bDeleteSourceColumns; + bool m_bDeleteSourceColumns; bool m_bInterConnectionCopy; // are we copying between different connections? ::com::sun::star::lang::Locale m_aLocale; OUString m_sName; // for a table the name is composed OUString m_sSourceName; OUString m_aKeyName; - TOTypeInfoSP m_pTypeInfo; // default type - sal_Bool m_bAddPKFirstTime; - sal_Int16 m_nOperation; - Wizard_Button_Style m_ePressed; - sal_Bool m_bCreatePrimaryKeyColumn; - sal_Bool m_bUseHeaderLine; + TOTypeInfoSP m_pTypeInfo; // default type + bool m_bAddPKFirstTime; + sal_Int16 m_nOperation; + Wizard_Button_Style m_ePressed; + bool m_bCreatePrimaryKeyColumn; + bool m_bUseHeaderLine; private: DECL_LINK( ImplPrevHdl , void* ); DECL_LINK( ImplNextHdl , void* ); DECL_LINK( ImplOKHdl , void* ); DECL_LINK( ImplActivateHdl, void* ); - sal_Bool CheckColumns(sal_Int32& _rnBreakPos); + bool CheckColumns(sal_Int32& _rnBreakPos); void loadData( const ICopyTableSourceObject& _rSourceObject, ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColVector ); void construct(); // need for table creation - void appendColumns( ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, sal_Bool _bKeyColumns = sal_False ) const; + void appendColumns( ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, bool _bKeyColumns = false ) const; void appendKey(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XKeysSupplier>& _rxSup,const ODatabaseExport::TColumnVector* _pVec) const; // checks if the type is supported in the destination database - sal_Bool supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType); + bool supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType); void impl_loadSourceData(); @@ -327,7 +327,7 @@ namespace dbaui virtual long DeactivatePage() SAL_OVERRIDE; OKButton& GetOKButton() { return m_pbFinish; } Wizard_Button_Style GetPressedButton() const { return m_ePressed; } - void EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable); + void EnableButton(Wizard_Button_Style eStyle, bool bEnable); void AddWizardPage(OWizardPage* pPage); // delete page from OCopyTableWizard void RemoveWizardPage(OWizardPage* pPage); // Page goes again to user void CheckButtons(); // checks which button can be disabled, enabled @@ -336,8 +336,8 @@ namespace dbaui // when not the value is COLUMN_POSITION_NOT_FOUND == (sal_uInt32)-1 ODatabaseExport::TPositions GetColumnPositions() const { return m_vColumnPos; } ::std::vector<sal_Int32> GetColumnTypes() const { return m_vColumnTypes; } - sal_Bool UseHeaderLine() const { return m_bUseHeaderLine; } - void setUseHeaderLine(sal_Bool _bUseHeaderLine) { m_bUseHeaderLine = _bUseHeaderLine; } + bool UseHeaderLine() const { return m_bUseHeaderLine; } + void setUseHeaderLine(bool _bUseHeaderLine) { m_bUseHeaderLine = _bUseHeaderLine; } void insertColumn(sal_Int32 _nPos,OFieldDescription* _pField); @@ -353,7 +353,7 @@ namespace dbaui /** returns whether a primary key should be created in the target database */ - sal_Bool shouldCreatePrimaryKey() const; + bool shouldCreatePrimaryKey() const; void setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName ); static bool supportsPrimaryKey( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection ); @@ -399,7 +399,7 @@ namespace dbaui const OUString& _sColumnName, const OUString& _sExtraChars, sal_Int32 _nMaxNameLen); - TOTypeInfoSP convertType(const TOTypeInfoSP&_pType,sal_Bool& _bNotConvert); + TOTypeInfoSP convertType(const TOTypeInfoSP&_pType, bool& _bNotConvert); OUString createUniqueName(const OUString& _sName); diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx index 3f3a4d834672..055a48856222 100644 --- a/dbaccess/source/ui/inc/WNameMatch.hxx +++ b/dbaccess/source/ui/inc/WNameMatch.hxx @@ -31,7 +31,7 @@ namespace dbaui // columns are at root only no children class OColumnTreeBox : public OMarkableTreeListBox { - sal_Bool m_bReadOnly; + bool m_bReadOnly; protected: virtual void InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind) SAL_OVERRIDE; @@ -39,8 +39,8 @@ namespace dbaui OColumnTreeBox( Window* pParent, const ResId& rResId ); void FillListBox( const ODatabaseExport::TColumnVector& _rList); - void SetReadOnly(sal_Bool _bRo=sal_True) { m_bReadOnly = _bRo; } - virtual sal_Bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect=sal_True ); + void SetReadOnly(bool _bRo=true) { m_bReadOnly = _bRo; } + virtual bool Select( SvTreeListEntry* pEntry, bool bSelect=true ) SAL_OVERRIDE; private: using OMarkableTreeListBox::Select; @@ -72,7 +72,7 @@ namespace dbaui public: virtual void Reset ( ) SAL_OVERRIDE; virtual void ActivatePage() SAL_OVERRIDE; - virtual sal_Bool LeavePage() SAL_OVERRIDE; + virtual bool LeavePage() SAL_OVERRIDE; virtual OUString GetTitle() const SAL_OVERRIDE ; OWizNameMatching(Window* pParent); diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx index 2a634d45173b..70fc3de89df3 100644 --- a/dbaccess/source/ui/inc/WTabPage.hxx +++ b/dbaccess/source/ui/inc/WTabPage.hxx @@ -30,16 +30,16 @@ namespace dbaui { protected: OCopyTableWizard* m_pParent; - sal_Bool m_bFirstTime; // Page wird das erste mal gerufen ; should be set in the reset methode + bool m_bFirstTime; // Page wird das erste mal gerufen ; should be set in the reset methode OWizardPage( Window* pParent, const ResId& rResId ); public: virtual void Reset ( ) = 0; - virtual sal_Bool LeavePage() = 0; + virtual bool LeavePage() = 0; virtual OUString GetTitle() const = 0; - sal_Bool IsFirstTime() const { return m_bFirstTime; } + bool IsFirstTime() const { return m_bFirstTime; } }; } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WTABPAGE_HXX diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx index ba16ea58ed99..58138e3d1bff 100644 --- a/dbaccess/source/ui/inc/WTypeSelect.hxx +++ b/dbaccess/source/ui/inc/WTypeSelect.hxx @@ -46,8 +46,8 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const SAL_OVERRIDE; virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) SAL_OVERRIDE; virtual const OTypeInfoMap* getTypeInfo() const SAL_OVERRIDE; - virtual sal_Bool isAutoIncrementValueEnabled() const SAL_OVERRIDE; - virtual OUString getAutoIncrementValue() const SAL_OVERRIDE; + virtual bool isAutoIncrementValueEnabled() const SAL_OVERRIDE; + virtual OUString getAutoIncrementValue() const SAL_OVERRIDE; public: OWizTypeSelectControl(Window* pParent, const ResId& rResId,OTableDesignHelpBar* pHelpBar=NULL); @@ -61,23 +61,23 @@ namespace dbaui // just defines the ::com::sun::star::ucb::Command for the Contextmenu class OWizTypeSelectList : public MultiListBox { - sal_Bool m_bPKey; - sal_Bool IsPrimaryKeyAllowed() const; + bool m_bPKey; + bool IsPrimaryKeyAllowed() const; void setPrimaryKey( OFieldDescription* _pFieldDescr, sal_uInt16 _nPos, - sal_Bool _bSet = sal_False); + bool _bSet = false); protected: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; public: OWizTypeSelectList( Window* pParent, WinBits nStyle = WB_BORDER ) : MultiListBox(pParent,nStyle) - , m_bPKey(sal_False) + , m_bPKey(false) {} OWizTypeSelectList( Window* pParent, const ResId& rResId ) : MultiListBox(pParent,rResId) - , m_bPKey(sal_False) + , m_bPKey(false) {} - void SetPKey(sal_Bool bPKey) { m_bPKey = bPKey; } + void SetPKey(bool bPKey) { m_bPKey = bPKey; } }; // Wizard Page: OWizTypeSelect @@ -101,27 +101,27 @@ namespace dbaui Image m_imgPKey; SvStream* m_pParserStream; // stream to read the tokens from or NULL - OUString m_sAutoIncrementValue; + OUString m_sAutoIncrementValue; sal_Int32 m_nDisplayRow; - sal_Bool m_bAutoIncrementEnabled; - sal_Bool m_bDuplicateName; + bool m_bAutoIncrementEnabled; + bool m_bDuplicateName; void fillColumnList(sal_uInt32 nRows); virtual SvParser* createReader(sal_Int32 _nRows) = 0; - void EnableAuto(sal_Bool bEnable); + void EnableAuto(bool bEnable); public: virtual void Reset ( ) SAL_OVERRIDE; virtual void ActivatePage( ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; - virtual sal_Bool LeavePage() SAL_OVERRIDE; + virtual bool LeavePage() SAL_OVERRIDE; virtual OUString GetTitle() const SAL_OVERRIDE; OWizTypeSelect(Window* pParent, SvStream* _pStream = NULL ); virtual ~OWizTypeSelect(); inline void setDisplayRow(sal_Int32 _nRow) { m_nDisplayRow = _nRow - 1; } - inline void setDuplicateName(sal_Bool _bDuplicateName) { m_bDuplicateName = _bDuplicateName; } + inline void setDuplicateName(bool _bDuplicateName) { m_bDuplicateName = _bDuplicateName; } }; typedef OWizTypeSelect* (*TypeSelectionPageFactory)( Window*, SvStream& ); diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx index aef3a8007624..ef0622bf0f62 100644 --- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx +++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx @@ -66,7 +66,7 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() SAL_OVERRIDE; virtual OUString getDatasourceType(const SfxItemSet& _rSet) const SAL_OVERRIDE; virtual void clearPassword() SAL_OVERRIDE; - virtual sal_Bool saveDatasource() SAL_OVERRIDE; + virtual bool saveDatasource() SAL_OVERRIDE; virtual void setTitle(const OUString& _sTitle) SAL_OVERRIDE; virtual void enableConfirmSettings( bool _bEnable ) SAL_OVERRIDE; }; diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx index 2e5bc70c9fd9..1b72e38e5719 100644 --- a/dbaccess/source/ui/inc/brwctrlr.hxx +++ b/dbaccess/source/ui/inc/brwctrlr.hxx @@ -111,7 +111,7 @@ namespace dbaui sal_uInt16 m_nFormActionNestingLevel; // see enter-/leaveFormAction - sal_Bool m_bLoadCanceled : 1; // the load was canceled somehow + bool m_bLoadCanceled : 1; // the load was canceled somehow bool m_bCannotSelectUnfiltered : 1; // received an DATA_CANNOT_SELECT_UNFILTERED error protected: @@ -134,12 +134,12 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > getControlModel() const { return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > (m_xGridModel, ::com::sun::star::uno::UNO_QUERY); } ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > getNumberFormatter()const { return m_xFormatter; } - sal_Bool isValid() const { return m_xRowSet.is() && m_xGridModel.is(); } - sal_Bool isValidCursor() const; // checks the ::com::sun::star::data::XDatabaseCursor-interface of m_xRowSet - sal_Bool isLoaded() const; - sal_Bool loadingCancelled() const { return m_bLoadCanceled; } + bool isValid() const { return m_xRowSet.is() && m_xGridModel.is(); } + bool isValidCursor() const; // checks the ::com::sun::star::data::XDatabaseCursor-interface of m_xRowSet + bool isLoaded() const; + bool loadingCancelled() const { return m_bLoadCanceled; } void onStartLoading( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable ); - void setLoadingCancelled() { m_bLoadCanceled = sal_True; } + void setLoadingCancelled() { m_bLoadCanceled = true; } const TransferableDataHelper& getViewClipboard() const { return m_aSystemClipboard; } @@ -238,13 +238,13 @@ namespace dbaui // (probably this needs not to be overloaded, but you may return anything you want as long as it // supports the ::com::sun::star::form::DatabaseForm service. For instance you may want to create an adapter here which // is synchronized with a foreign ::com::sun::star::form::DatabaseForm you got elsewhere) - virtual sal_Bool InitializeForm( + virtual bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) = 0; // called immediately after a successful CreateForm // do any initialization (data source etc.) here. the form should be fully functional after that. // return sal_False if you didn't succeed (don't throw exceptions, they won't be caught) - virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid); + virtual bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid); virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > CreateGridModel(); // our default implementation simply instantiates a stardiv.one.form.component.Grid service @@ -271,7 +271,7 @@ namespace dbaui // call after "major changes" (e.g. the completion of the async load). // invalidates all toolbox slots and all supported features. - virtual sal_Bool LoadForm(); + virtual bool LoadForm(); // load the form // the default implementation does an direct load or starts a load thread, depending on the multithread capabilities // of the data source. @@ -288,9 +288,9 @@ namespace dbaui // whole process (_both_ XLoadable::reload calls _together_) form the "reload operation" // empty the frame where our view resides - virtual sal_Bool CommitCurrent(); + virtual bool CommitCurrent(); // commit the current column (i.e. cell) - virtual sal_Bool SaveModified(sal_Bool bAskFor = sal_True); + virtual bool SaveModified(sal_Bool bAskFor = sal_True); // save the modified record ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getBoundField(sal_uInt16 nViewPos = (sal_uInt16)-1) const; @@ -304,25 +304,25 @@ namespace dbaui void initFormatter(); /// loads or reloads the form - virtual sal_Bool reloadForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable); + virtual bool reloadForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable); - virtual sal_Bool preReloadForm(){ return sal_False; } + virtual bool preReloadForm(){ return false; } virtual void postReloadForm(){} ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > createParser_nothrow(); private: - void setCurrentModified( sal_Bool _bSet ); + void setCurrentModified( bool _bSet ); // execute the filter or sort slot - void ExecuteFilterSortCrit(sal_Bool bFilter); + void ExecuteFilterSortCrit(bool bFilter); // execute the search slot void ExecuteSearch(); void initializeParser() const; // changes the mutable member m_xParser - void applyParserFilter(const OUString& _rOldFilter, sal_Bool _bOldFilterApplied,const ::OUString& _sOldHaving,const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& _xParser); + void applyParserFilter(const OUString& _rOldFilter, bool _bOldFilterApplied,const ::OUString& _sOldHaving,const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& _xParser); void applyParserOrder(const OUString& _rOldOrder,const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& _xParser); sal_Int16 getCurrentColumnPosition(); diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx index a49e3136ba6e..90d14a7ce78b 100644 --- a/dbaccess/source/ui/inc/callbacks.hxx +++ b/dbaccess/source/ui/inc/callbacks.hxx @@ -44,12 +44,12 @@ namespace dbaui /** requests a quick help text to display @return <FALSE/> if the default quick help text should be used */ - virtual sal_Bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const = 0; + virtual bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const = 0; /** handler for StartDrag requests @return <TRUE/> if a drag operation was started */ - virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0; + virtual bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0; /** check whether or not a drop request should be accepted */ diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index e7a4dfa71f4f..25bcb0d81698 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -38,10 +38,10 @@ class OConnectionURLEdit : public Edit m_pTypeCollection; FixedText* m_pForcedPrefix; OUString m_sSaveValueNoPrefix; - sal_Bool m_bShowPrefix; // when <TRUE> the prefix will be visible, otherwise not + bool m_bShowPrefix; // when <TRUE> the prefix will be visible, otherwise not public: - OConnectionURLEdit(Window* pParent, const ResId& rResId,sal_Bool _bShowPrefix = sal_False); + OConnectionURLEdit(Window* pParent, const ResId& rResId,bool _bShowPrefix = false); virtual ~OConnectionURLEdit(); public: @@ -54,7 +54,7 @@ public: @param _bShowPrefix If <TRUE/> than the prefix will be visible, otherwise not. */ - void ShowPrefix(sal_Bool _bShowPrefix); + void ShowPrefix(bool _bShowPrefix); /// get the currently set text, excluding the prefix indicating the type virtual OUString GetTextNoPrefix() const; /// set a new text, leave the current prefix unchanged diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx index 1030f683e3ee..ed7ec6e4e85e 100644 --- a/dbaccess/source/ui/inc/databaseobjectview.hxx +++ b/dbaccess/source/ui/inc/databaseobjectview.hxx @@ -207,7 +207,7 @@ namespace dbaui class ResultSetBrowser : public DatabaseObjectView { private: - sal_Bool m_bTable; + bool m_bTable; protected: virtual void fillDispatchArgs( @@ -221,7 +221,7 @@ namespace dbaui const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame, - sal_Bool _bTable + bool _bTable ); }; diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx index 084d9594e633..f87f4681a9ab 100644 --- a/dbaccess/source/ui/inc/datasourceconnector.hxx +++ b/dbaccess/source/ui/inc/datasourceconnector.hxx @@ -55,7 +55,7 @@ namespace dbaui ); /// returns <TRUE/> if the object is able to create data source connections - sal_Bool isValid() const { return m_xContext.is(); } + bool isValid() const { return m_xContext.is(); } /** creates a connection to the data source, displays the possible error to the user, or returns it */ diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index db1be37d85d6..ddce2e2250ef 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -53,8 +53,8 @@ private: ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl; - sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing - sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> + bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing + bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> sal_uInt16 m_nMainPageID; public: @@ -91,7 +91,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() SAL_OVERRIDE; virtual OUString getDatasourceType(const SfxItemSet& _rSet) const SAL_OVERRIDE; virtual void clearPassword() SAL_OVERRIDE; - virtual sal_Bool saveDatasource() SAL_OVERRIDE; + virtual bool saveDatasource() SAL_OVERRIDE; virtual void setTitle(const OUString& _sTitle) SAL_OVERRIDE; virtual void enableConfirmSettings( bool _bEnable ) SAL_OVERRIDE; @@ -103,8 +103,8 @@ protected: virtual short Ok() SAL_OVERRIDE; protected: - inline sal_Bool isUIEnabled() const { return m_bUIEnabled; } - inline void disabledUI() { m_bUIEnabled = sal_False; } + inline bool isUIEnabled() const { return m_bUIEnabled; } + inline void disabledUI() { m_bUIEnabled = false; } private: /// select a datasource with a given name, adjust the item set accordingly, and everything like that .. diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx index 4422cfe7f3af..f2dab76f9a65 100644 --- a/dbaccess/source/ui/inc/dbexchange.hxx +++ b/dbaccess/source/ui/inc/dbexchange.hxx @@ -68,7 +68,7 @@ namespace dbaui ODataClipboard( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_rAliveForm, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelectedRows, - const sal_Bool i_bBookmarkSelection, + const bool i_bBookmarkSelection, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rORB ); diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 141b66f25109..259d03359d68 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -70,7 +70,7 @@ namespace dbaui Link m_aEditedHandler; // called after someone edited an entry Link m_aEnterKeyHdl; - sal_Bool m_bHandleEnterKey; + bool m_bHandleEnterKey; private: void init(); @@ -82,10 +82,10 @@ namespace dbaui public: DBTreeListBox( Window* pParent ,WinBits nWinStyle=0 - ,sal_Bool _bHandleEnterKey = sal_False); + ,bool _bHandleEnterKey = false); DBTreeListBox( Window* pParent ,const ResId& rResId - ,sal_Bool _bHandleEnterKey = sal_False); + ,bool _bHandleEnterKey = false); virtual ~DBTreeListBox(); void setControlActionListener( IControlActionListener* _pListener ) { m_pActionListener = _pListener; } diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx index e688f60b3b10..124b6a8b6eb6 100644 --- a/dbaccess/source/ui/inc/dbwiz.hxx +++ b/dbaccess/source/ui/inc/dbwiz.hxx @@ -62,9 +62,9 @@ private: m_pCollection; /// the DSN type collection instance OUString m_eType; - sal_Bool m_bResetting : 1; /// sal_True while we're resetting the pages - sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing - sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> + bool m_bResetting : 1; /// sal_True while we're resetting the pages + bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing + bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> public: /** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed @@ -86,7 +86,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() SAL_OVERRIDE; virtual OUString getDatasourceType(const SfxItemSet& _rSet) const SAL_OVERRIDE; virtual void clearPassword() SAL_OVERRIDE; - virtual sal_Bool saveDatasource() SAL_OVERRIDE; + virtual bool saveDatasource() SAL_OVERRIDE; virtual void setTitle(const OUString& _sTitle) SAL_OVERRIDE; virtual void enableConfirmSettings( bool _bEnable ) SAL_OVERRIDE; @@ -100,8 +100,8 @@ protected: virtual bool onFinish() SAL_OVERRIDE; protected: - inline sal_Bool isUIEnabled() const { return m_bUIEnabled; } - inline void disabledUI() { m_bUIEnabled = sal_False; } + inline bool isUIEnabled() const { return m_bUIEnabled; } + inline void disabledUI() { m_bUIEnabled = false; } /// select a datasource with a given name, adjust the item set accordingly, and everything like that .. void implSelectDatasource(const OUString& _rRegisteredName); diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index 3fc21d2be571..067907ca335f 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -65,10 +65,10 @@ private: SfxItemSet* m_pOutSet; OUString m_sURL; OUString m_sOldURL; - sal_Bool m_bResetting : 1; /// sal_True while we're resetting the pages - sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing - sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> - sal_Bool m_bIsConnectable : 1; + bool m_bResetting : 1; /// sal_True while we're resetting the pages + bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing + bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> + bool m_bIsConnectable : 1; OUString m_sRM_IntroText; OUString m_sRM_dBaseText; OUString m_sRM_TextText; @@ -114,16 +114,16 @@ public: virtual void clearPassword() SAL_OVERRIDE; virtual void setTitle(const OUString& _sTitle) SAL_OVERRIDE; virtual void enableConfirmSettings( bool _bEnable ) SAL_OVERRIDE; - virtual sal_Bool saveDatasource() SAL_OVERRIDE; + virtual bool saveDatasource() SAL_OVERRIDE; virtual OUString getStateDisplayName( WizardState _nState ) const SAL_OVERRIDE; /** returns <TRUE/> if the database should be opened, otherwise <FALSE/>. */ - sal_Bool IsDatabaseDocumentToBeOpened() const; + bool IsDatabaseDocumentToBeOpened() const; /** returns <TRUE/> if the table wizard should be opened, otherwise <FALSE/>. */ - sal_Bool IsTableWizardToBeStarted() const; + bool IsTableWizardToBeStarted() const; protected: /// to override to create new pages @@ -134,8 +134,8 @@ protected: virtual bool onFinish() SAL_OVERRIDE; protected: - inline sal_Bool isUIEnabled() const { return m_bUIEnabled; } - inline void disabledUI() { m_bUIEnabled = sal_False; } + inline bool isUIEnabled() const { return m_bUIEnabled; } + inline void disabledUI() { m_bUIEnabled = false; } /// select a datasource with a given name, adjust the item set accordingly, and everything like that .. void implSelectDatasource(const OUString& _rRegisteredName); @@ -164,7 +164,7 @@ private: void declareAuthDepPath( const OUString& _sURL, PathId _nPathId, const svt::RoadmapWizardTypes::WizardPath& _rPaths); void RegisterDataSourceByLocation(const OUString& sPath); - sal_Bool SaveDatabaseDocument(); + bool SaveDatabaseDocument(); void activateDatabasePath(); OUString createUniqueFileName(const INetURLObject& rURL); void CreateDatabase(); @@ -172,8 +172,8 @@ private: ::dbaccess::DATASOURCE_TYPE VerifyDataSourceType(const ::dbaccess::DATASOURCE_TYPE _DatabaseType) const; void updateTypeDependentStates(); - sal_Bool callSaveAsDialog(); - sal_Bool IsConnectionUrlRequired(); + bool callSaveAsDialog(); + bool IsConnectionUrlRequired(); DECL_LINK(OnTypeSelected, OGeneralPage*); DECL_LINK(OnChangeCreationMode, OGeneralPageWizard*); DECL_LINK(OnRecentDocumentSelected, OGeneralPageWizard*); diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx index 65d47e54f8ba..5cdab0e756be 100644 --- a/dbaccess/source/ui/inc/directsql.hxx +++ b/dbaccess/source/ui/inc/directsql.hxx @@ -76,7 +76,7 @@ namespace dbaui protected: void executeCurrent(); - void switchToHistory(sal_Int32 _nHistoryPos, sal_Bool _bUpdateListBox = sal_True); + void switchToHistory(sal_Int32 _nHistoryPos, bool _bUpdateListBox = true); // OEventListenerAdapter virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource ) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx index d61ca8ef99f3..25e35964efe6 100644 --- a/dbaccess/source/ui/inc/dlgsize.hxx +++ b/dbaccess/source/ui/inc/dlgsize.hxx @@ -43,7 +43,7 @@ namespace dbaui CheckBox* m_pCB_STANDARD; public: - DlgSize( Window * pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard = -1 ); + DlgSize( Window * pParent, sal_Int32 nVal, bool bRow, sal_Int32 _nAlternativeStandard = -1 ); sal_Int32 GetValue(); }; } // namespace dbaui diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx index 7ff31df3b3a5..cdf31a99560a 100644 --- a/dbaccess/source/ui/inc/exsrcbrw.hxx +++ b/dbaccess/source/ui/inc/exsrcbrw.hxx @@ -37,7 +37,7 @@ namespace dbaui ::cppu::OInterfaceContainerHelper m_aModifyListeners; // for multiplexing the modify events SbaXFormAdapter* m_pDataSourceImpl; - sal_Bool m_bInQueryDispatch; + bool m_bInQueryDispatch; // our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against // recursion @@ -86,9 +86,9 @@ namespace dbaui virtual ~SbaExternalSourceBrowser(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm() SAL_OVERRIDE; - virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) SAL_OVERRIDE; + virtual bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) SAL_OVERRIDE; - virtual sal_Bool LoadForm() SAL_OVERRIDE; + virtual bool LoadForm() SAL_OVERRIDE; void Attach(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xMaster); diff --git a/dbaccess/source/ui/inc/indexcollection.hxx b/dbaccess/source/ui/inc/indexcollection.hxx index 8a96641261d4..2809d7ae9d72 100644 --- a/dbaccess/source/ui/inc/indexcollection.hxx +++ b/dbaccess/source/ui/inc/indexcollection.hxx @@ -81,14 +81,14 @@ namespace dbaui void detach(); // is the object valid? - sal_Bool isValid() const { return m_xIndexes.is(); } + bool isValid() const { return m_xIndexes.is(); } // number of contained indexes sal_Int32 size() const { return m_aIndexes.size(); } /// drop an index, and remove it from the collection - sal_Bool drop(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException)); + bool drop(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException)); /// simply drop the index described by the name, but don't remove the descriptor from the collection - sal_Bool dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException)); + bool dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException)); protected: void implConstructFrom(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxIndexes); diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index fa0a581a436a..7c9100eeeb09 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -45,7 +45,7 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; Link m_aSelectHdl; Link m_aEndEditHdl; - sal_Bool m_bSuspendSelectHdl; + bool m_bSuspendSelectHdl; public: DbaIndexList(Window* _pParent, const ResId& _rId); @@ -56,7 +56,7 @@ namespace dbaui void SetEndEditHdl(const Link& _rHdl) { m_aEndEditHdl = _rHdl; } Link GetEndEditHdl() const { return m_aEndEditHdl; } - virtual sal_Bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect ); + virtual bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect ); void enableSelectHandler(); void disableSelectHandler(); @@ -98,7 +98,7 @@ namespace dbaui OIndexCollection* m_pIndexes; SvTreeListEntry* m_pPreviousSelection; - sal_Bool m_bEditAgain; + bool m_bEditAgain; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; @@ -144,18 +144,18 @@ namespace dbaui private: void OnNewIndex(); - void OnDropIndex(sal_Bool _bConfirm = sal_True); + void OnDropIndex(bool _bConfirm = true); void OnRenameIndex(); void OnSaveIndex(); void OnResetIndex(); - sal_Bool implCommit(SvTreeListEntry* _pEntry); - sal_Bool implSaveModified(sal_Bool _bPlausibility = sal_True); - sal_Bool implCommitPreviouslySelected(); + bool implCommit(SvTreeListEntry* _pEntry); + bool implSaveModified(bool _bPlausibility = true); + bool implCommitPreviouslySelected(); - sal_Bool implDropIndex(SvTreeListEntry* _pEntry, sal_Bool _bRemoveFromCollection); + bool implDropIndex(SvTreeListEntry* _pEntry, bool _bRemoveFromCollection); - sal_Bool implCheckPlausibility(const Indexes::const_iterator& _rPos); + bool implCheckPlausibility(const Indexes::const_iterator& _rPos); /** checks if the controls have to be replaced and moved. */ diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx index 94ba07bca84c..57a0f2d9682a 100644 --- a/dbaccess/source/ui/inc/indexes.hxx +++ b/dbaccess/source/ui/inc/indexes.hxx @@ -30,9 +30,9 @@ namespace dbaui struct OIndexField { OUString sFieldName; - sal_Bool bSortAscending; + bool bSortAscending; - OIndexField() : bSortAscending(sal_True) { } + OIndexField() : bSortAscending(true) { } }; typedef std::vector<OIndexField> IndexFields; @@ -49,28 +49,28 @@ namespace dbaui { protected: OUString sOriginalName; - sal_Bool bModified; + bool bModified; public: OUString sName; OUString sDescription; - sal_Bool bPrimaryKey; - sal_Bool bUnique; + bool bPrimaryKey; + bool bUnique; IndexFields aFields; public: OIndex(const OUString& _rOriginalName) - : sOriginalName(_rOriginalName), bModified(sal_False), sName(_rOriginalName), bPrimaryKey(sal_False), bUnique(sal_False) + : sOriginalName(_rOriginalName), bModified(false), sName(_rOriginalName), bPrimaryKey(false), bUnique(false) { } const OUString& getOriginalName() const { return sOriginalName; } - sal_Bool isModified() const { return bModified; } - void setModified(sal_Bool _bModified) { bModified = _bModified; } - void clearModified() { setModified(sal_False); } + bool isModified() const { return bModified; } + void setModified(bool _bModified) { bModified = _bModified; } + void clearModified() { setModified(false); } - sal_Bool isNew() const { return getOriginalName().isEmpty(); } + bool isNew() const { return getOriginalName().isEmpty(); } void flagAsNew(const GrantIndexAccess&) { sOriginalName = OUString(); } void flagAsCommitted(const GrantIndexAccess&) { sOriginalName = sName; } diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx index 354322ae3ad0..4212849efc1d 100644 --- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx +++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx @@ -47,10 +47,10 @@ namespace dbaui OUString m_sDescendingText; sal_Int32 m_nMaxColumnsInIndex; - sal_Bool m_bAddIndexAppendix; + bool m_bAddIndexAppendix; public: - IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,sal_Bool _bAddIndexAppendix); + IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix); virtual ~IndexFieldsControl(); void Init(const ::com::sun::star::uno::Sequence< OUString >& _rAvailableFields); @@ -80,9 +80,9 @@ namespace dbaui protected: OUString GetRowCellText(const IndexFields::const_iterator& _rRow,sal_uInt16 nColId) const; - sal_Bool implGetFieldDesc(long _nRow, IndexFields::const_iterator& _rPos); + bool implGetFieldDesc(long _nRow, IndexFields::const_iterator& _rPos); - sal_Bool isNewField() const { return GetCurRow() >= (sal_Int32)m_aFields.size(); } + bool isNewField() const { return GetCurRow() >= (sal_Int32)m_aFields.size(); } DECL_LINK( OnListEntrySelected, ListBox* ); diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx index f7594ba64a44..ebe50f47c8e7 100644 --- a/dbaccess/source/ui/inc/linkeddocuments.hxx +++ b/dbaccess/source/ui/inc/linkeddocuments.hxx @@ -64,7 +64,7 @@ namespace dbaui ); ~OLinkedDocumentsAccess(); - inline sal_Bool isConnected() const { return m_xConnection.is(); } + inline bool isConnected() const { return m_xConnection.is(); } ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> open( diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx index e7578e356fb1..240e12f479e7 100644 --- a/dbaccess/source/ui/inc/listviewitems.hxx +++ b/dbaccess/source/ui/inc/listviewitems.hxx @@ -30,12 +30,12 @@ namespace dbaui // OBoldListboxString class OBoldListboxString : public SvLBoxString { - sal_Bool m_bEmphasized; + bool m_bEmphasized; public: OBoldListboxString(SvTreeListEntry* _pEntry, sal_uInt16 _nFlags, const OUString& _rStr) :SvLBoxString(_pEntry, _nFlags, _rStr) - ,m_bEmphasized(sal_False) + ,m_bEmphasized(false) { } @@ -45,8 +45,8 @@ namespace dbaui const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE; virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* _pViewData) SAL_OVERRIDE; - sal_Bool isEmphasized() const { return m_bEmphasized; } - void emphasize(sal_Bool _bEmphasize) { m_bEmphasized = _bEmphasize; } + bool isEmphasized() const { return m_bEmphasized; } + void emphasize(bool _bEmphasize) { m_bEmphasized = _bEmphasize; } }; } // namespace dbaui diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx index 218041cd0457..02648b005ed8 100644 --- a/dbaccess/source/ui/inc/paramdialog.hxx +++ b/dbaccess/source/ui/inc/paramdialog.hxx @@ -75,7 +75,7 @@ namespace dbaui Timer m_aResetVisitFlag; // we reset the "visited flag" 1 second after and entry has been selected - sal_Bool m_bNeedErrorOnCurrent; + bool m_bNeedErrorOnCurrent; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aFinalValues; /// the final values as entered by the user diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx index 16d59529f2ff..e895a0dae32d 100644 --- a/dbaccess/source/ui/inc/querycontainerwindow.hxx +++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx @@ -65,21 +65,21 @@ namespace dbaui OQueryDesignView* getDesignView() { return m_pViewSwitch->getDesignView(); } - sal_Bool isCutAllowed() { return m_pViewSwitch->isCutAllowed(); } - sal_Bool isPasteAllowed() { return m_pViewSwitch->isPasteAllowed(); } - sal_Bool isCopyAllowed() { return m_pViewSwitch->isCopyAllowed(); } + bool isCutAllowed() { return m_pViewSwitch->isCutAllowed(); } + bool isPasteAllowed() { return m_pViewSwitch->isPasteAllowed(); } + bool isCopyAllowed() { return m_pViewSwitch->isCopyAllowed(); } void copy() { m_pViewSwitch->copy(); } void cut() { m_pViewSwitch->cut(); } void paste() { m_pViewSwitch->paste(); } void clear() { m_pViewSwitch->clear(); } - sal_Bool isSlotEnabled( sal_Int32 _nSlotId ) { return m_pViewSwitch->isSlotEnabled( _nSlotId ); } - void setSlotEnabled( sal_Int32 _nSlotId, sal_Bool _bEnable ) { m_pViewSwitch->setSlotEnabled( _nSlotId, _bEnable ); } + bool isSlotEnabled( sal_Int32 _nSlotId ) { return m_pViewSwitch->isSlotEnabled( _nSlotId ); } + void setSlotEnabled( sal_Int32 _nSlotId, bool _bEnable ) { m_pViewSwitch->setSlotEnabled( _nSlotId, _bEnable ); } void setNoneVisbleRow(sal_Int32 _nRows) { m_pViewSwitch->setNoneVisbleRow( _nRows); } - void setReadOnly( sal_Bool _bReadOnly ) { m_pViewSwitch->setReadOnly( _bReadOnly ); } + void setReadOnly( bool _bReadOnly ) { m_pViewSwitch->setReadOnly( _bReadOnly ); } - sal_Bool checkStatement() { return m_pViewSwitch->checkStatement( ); } + bool checkStatement() { return m_pViewSwitch->checkStatement( ); } OUString getStatement() { return m_pViewSwitch->getStatement( ); } void setStatement( const OUString& _rsStatement ) { m_pViewSwitch->setStatement( _rsStatement ); } diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx index 4d33e1bcbe07..6d94e84fc02b 100644 --- a/dbaccess/source/ui/inc/querycontroller.hxx +++ b/dbaccess/source/ui/inc/querycontroller.hxx @@ -82,12 +82,12 @@ namespace dbaui sal_Int32 m_nVisibleRows; // which rows the selection browse should show sal_Int32 m_nSplitPos; // the position of the splitter sal_Int32 m_nCommandType; // the type of the object we're designing - sal_Bool m_bGraphicalDesign; // are we in the graphical design mode (sal_True) or in the text design (sal_False)? - sal_Bool m_bDistinct; // true when you want "select distinct" otherwise false - sal_Bool m_bViewAlias; // show the alias row in the design view - sal_Bool m_bViewTable; // show the table row in the design view - sal_Bool m_bViewFunction; // show the function row in the design view - sal_Bool m_bEscapeProcessing;// is true when we shouldn't parse the statement + bool m_bGraphicalDesign; // are we in the graphical design mode (sal_True) or in the text design (sal_False)? + bool m_bDistinct; // true when you want "select distinct" otherwise false + bool m_bViewAlias; // show the alias row in the design view + bool m_bViewTable; // show the table row in the design view + bool m_bViewFunction; // show the function row in the design view + bool m_bEscapeProcessing;// is true when we shouldn't parse the statement /** returns the container of queries, views, or command definitions, depending on what object type @@ -102,13 +102,13 @@ namespace dbaui inline bool editingQuery() const { return m_nCommandType == ::com::sun::star::sdb::CommandType::QUERY; } inline bool editingCommand() const { return m_nCommandType == ::com::sun::star::sdb::CommandType::COMMAND; } - sal_Bool askForNewName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xElements, - sal_Bool _bSaveAs); + bool askForNewName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xElements, + bool _bSaveAs); // creates the querycomposer void setQueryComposer(); void deleteIterator(); void executeQuery(); - bool doSaveAsDoc(sal_Bool _bSaveAs); + bool doSaveAsDoc(bool _bSaveAs); void saveViewSettings( ::comphelper::NamedValueCollection& o_rViewSettings, const bool i_includingCriteria ) const; void loadViewSettings( const ::comphelper::NamedValueCollection& o_rViewSettings ); @@ -143,16 +143,16 @@ namespace dbaui virtual void impl_onModifyChanged() SAL_OVERRIDE; // should the statement be parsed by our own sql parser - sal_Bool isEsacpeProcessing() const { return m_bEscapeProcessing; } - sal_Bool isGraphicalDesign() const { return m_bGraphicalDesign; } - sal_Bool isDistinct() const { return m_bDistinct; } + bool isEsacpeProcessing() const { return m_bEscapeProcessing; } + bool isGraphicalDesign() const { return m_bGraphicalDesign; } + bool isDistinct() const { return m_bDistinct; } sal_Int64 getLimit() const { return m_nLimit; } OUString getStatement() const { return m_sStatement; } sal_Int32 getSplitPos() const { return m_nSplitPos;} sal_Int32 getVisibleRows() const { return m_nVisibleRows; } - void setDistinct(sal_Bool _bDistinct) { m_bDistinct = _bDistinct;} + void setDistinct(bool _bDistinct) { m_bDistinct = _bDistinct;} void setLimit(const sal_Int64 _nLimit) { m_nLimit = _nLimit;} void setSplitPos(sal_Int32 _nSplitPos) { m_nSplitPos = _nSplitPos;} void setVisibleRows(sal_Int32 _nVisibleRows) { m_nVisibleRows = _nVisibleRows;} @@ -229,7 +229,7 @@ namespace dbaui /// sets m_sStatement, and notifies our respective property change listeners void setStatement_fireEvent( const OUString& _rNewStatement, bool _bFireStatementChange = true ); /// sets the m_bEscapeProcessing member, and notifies our respective property change listeners - void setEscapeProcessing_fireEvent( const sal_Bool _bEscapeProcessing ); + void setEscapeProcessing_fireEvent( const bool _bEscapeProcessing ); // OJoinController overridables virtual bool allowViews() const SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx index f50ce3611b10..25694f44ff76 100644 --- a/dbaccess/source/ui/inc/queryfilter.hxx +++ b/dbaccess/source/ui/inc/queryfilter.hxx @@ -94,11 +94,11 @@ namespace dbaui DECL_LINK( ListSelectHdl, ListBox * ); DECL_LINK( ListSelectCompHdl, ListBox * ); - void SetLine( sal_uInt16 nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,sal_Bool _bOr ); + void SetLine( sal_uInt16 nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,bool _bOr ); void EnableLines(); sal_Int32 GetOSQLPredicateType( const OUString& _rSelectedPredicate ) const; sal_uInt16 GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const; - sal_Bool getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,::com::sun::star::beans::PropertyValue& _rFilter) const; + bool getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,::com::sun::star::beans::PropertyValue& _rFilter) const; void fillLines(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& _aValues); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getMatchingColumn( const Edit& _rValueInput ) const; diff --git a/dbaccess/source/ui/inc/queryview.hxx b/dbaccess/source/ui/inc/queryview.hxx index 70305143615f..2a1b4037e4a9 100644 --- a/dbaccess/source/ui/inc/queryview.hxx +++ b/dbaccess/source/ui/inc/queryview.hxx @@ -30,9 +30,9 @@ namespace dbaui OQueryView(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ); virtual ~OQueryView(); - virtual sal_Bool isCutAllowed() = 0; - virtual sal_Bool isPasteAllowed() = 0; - virtual sal_Bool isCopyAllowed() = 0; + virtual bool isCutAllowed() = 0; + virtual bool isPasteAllowed() = 0; + virtual bool isCopyAllowed() = 0; virtual void copy() = 0; virtual void cut() = 0; virtual void paste() = 0; diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx index 7d14bb52246f..62178173e65c 100644 --- a/dbaccess/source/ui/inc/sbagrid.hxx +++ b/dbaccess/source/ui/inc/sbagrid.hxx @@ -184,7 +184,7 @@ namespace dbaui // Window overridables virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; - sal_Bool ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos); + bool ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos); private: using FmGridHeader::StartDrag; @@ -223,7 +223,7 @@ namespace dbaui // ui actions (e.g. a context menu) may be performed on columns which aren't the current one // and aren't selected, so we have to track this column id - sal_Bool m_bActivatingForDrop; + bool m_bActivatingForDrop; // Attribute Access public: sal_uInt16 GetCurrentActionColumn() const { return m_nCurrentActionColId; } @@ -241,7 +241,7 @@ namespace dbaui virtual void DeactivateCell(bool bUpdate = true) SAL_OVERRIDE; void ActivateCell() { FmGridControl::ActivateCell(); } - sal_Bool IsAllSelected() const { return (GetSelectRowCount() == GetRowCount()) && (GetRowCount() > 0); } + bool IsAllSelected() const { return (GetSelectRowCount() == GetRowCount()) && (GetRowCount() > 0); } HeaderBar* GetHeaderBar() const { return FmGridControl::GetHeaderBar(); } @@ -309,7 +309,7 @@ namespace dbaui DECL_LINK(AsynchDropEvent, void*); private: - sal_Bool IsReadOnlyDB() const; + bool IsReadOnlyDB() const; void implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag ); private: diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx index 4828bccd6c4c..3ad706b6354d 100644 --- a/dbaccess/source/ui/inc/sbamultiplex.hxx +++ b/dbaccess/source/ui/inc/sbamultiplex.hxx @@ -131,7 +131,7 @@ namespace dbaui eventtype aMulti(e); \ aMulti.Source = &m_rParent; \ ::cppu::OInterfaceIteratorHelper aIt(*this); \ - sal_Bool bResult = sal_True; \ + bool bResult = true; \ while (bResult && aIt.hasMoreElements()) \ bResult = static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \ return bResult; \ diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index 79d8bad29ca4..f537cb856088 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -44,8 +44,8 @@ namespace dbaui Link m_lnkTextModifyHdl; OUString m_strOrigText; // is restored on undo OQueryTextView* m_pView; - sal_Bool m_bAccelAction; // is set on cut, copy, paste - sal_Bool m_bStopTimer; + bool m_bAccelAction; // is set on cut, copy, paste + bool m_bStopTimer; svtools::ColorConfig m_ColorConfig; rtl::Reference< ChangesListener > m_listener; @@ -74,7 +74,7 @@ namespace dbaui using MultiLineEditSyntaxHighlight::SetText; // own functionality - sal_Bool IsInAccelAct(); + bool IsInAccelAct(); void SetTextModifyHdl(const Link& lnk) { m_lnkTextModifyHdl = lnk; } // please don't use SetModifyHdl, I need it for myself, this here is called from the handler set with that diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 763e3c545c95..3114ef511525 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -42,7 +42,7 @@ protected: m_xConnection; // the connection we're working for, set in implOnNewConnection, called by UpdateTableList boost::scoped_ptr< ImageProvider > m_xImageProvider; // provider for our images - sal_Bool m_bVirtualRoot; // should the first entry be visible + bool m_bVirtualRoot; // should the first entry be visible bool m_bNoEmptyFolders; // should empty catalogs/schematas be prevented from being displayed? public: @@ -126,14 +126,14 @@ public: /** determine if the given entry is 'wildcard checked' @see checkWildcard */ - sal_Bool isWildcardChecked(SvTreeListEntry* _pEntry) const; + bool isWildcardChecked(SvTreeListEntry* _pEntry) const; protected: virtual void InitEntry(SvTreeListEntry* _pEntry, const OUString& _rString, const Image& _rCollapsedBitmap, const Image& _rExpandedBitmap, SvLBoxButtonKind _eButtonKind) SAL_OVERRIDE; virtual void checkedButton_noBroadcast(SvTreeListEntry* _pEntry) SAL_OVERRIDE; - void implEmphasize(SvTreeListEntry* _pEntry, sal_Bool _bChecked, sal_Bool _bUpdateDescendants = sal_True, sal_Bool _bUpdateAncestors = sal_True); + void implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked, bool _bUpdateDescendants = true, bool _bUpdateAncestors = true); /** adds the given entry to our list @precond @@ -143,7 +143,7 @@ protected: SvTreeListEntry* implAddEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxMeta, const OUString& _rTableName, - sal_Bool _bCheckName = sal_True + bool _bCheckName = true ); void implSetDefaultImages(); @@ -152,7 +152,7 @@ protected: bool impl_getAndAssertMetaData( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _out_rMetaData ) const; - sal_Bool haveVirtualRoot() const { return m_bVirtualRoot; } + bool haveVirtualRoot() const { return m_bVirtualRoot; } /** fill the table list with the tables and views determined by the two given containers @param _rxConnection the connection where you got the object names from. Must not be NULL. diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 916e6b57a5e0..1b35d2f406b6 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -79,10 +79,10 @@ namespace dbaui ::com::sun::star::util::URL aURL; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatcher; - sal_Bool bEnabled; + bool bEnabled; - ExternalFeature() : bEnabled( sal_False ) { } - ExternalFeature( const ::com::sun::star::util::URL& _rURL ) : aURL( _rURL ), bEnabled( sal_False ) { } + ExternalFeature() : bEnabled( false ) { } + ExternalFeature( const ::com::sun::star::util::URL& _rURL ) : aURL( _rURL ), bEnabled( false ) { } }; typedef ::std::map< sal_uInt16, ExternalFeature, ::std::less< sal_uInt16 > > ExternalFeaturesMap; @@ -108,10 +108,10 @@ namespace dbaui sal_Int16 m_nBorder; // sal_True when border should be shown - sal_Bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any) - sal_Bool m_bShowMenu; // if sal_True the menu should be visible otherwise not - sal_Bool m_bInSuspend; - sal_Bool m_bEnableBrowser; + bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any) + bool m_bShowMenu; // if sal_True the menu should be visible otherwise not + bool m_bInSuspend; + bool m_bEnableBrowser; ::boost::optional< bool > m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc @@ -205,10 +205,10 @@ namespace dbaui protected: // SbaXDataBrowserController overridables - virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) SAL_OVERRIDE; - virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid) SAL_OVERRIDE; + virtual bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) SAL_OVERRIDE; + virtual bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid) SAL_OVERRIDE; - virtual sal_Bool preReloadForm() SAL_OVERRIDE; + virtual bool preReloadForm() SAL_OVERRIDE; virtual void postReloadForm() SAL_OVERRIDE; virtual void addModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) SAL_OVERRIDE; @@ -226,8 +226,8 @@ namespace dbaui virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) SAL_OVERRIDE; // IControlActionListener overridables - virtual sal_Bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const SAL_OVERRIDE; - virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SAL_OVERRIDE; + virtual bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const SAL_OVERRIDE; + virtual bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SAL_OVERRIDE; virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) SAL_OVERRIDE; virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) SAL_OVERRIDE; @@ -247,18 +247,18 @@ namespace dbaui virtual void SelectionChanged() SAL_OVERRIDE; // methods for showing/hiding the explorer part - sal_Bool haveExplorer() const; + bool haveExplorer() const; void hideExplorer(); void showExplorer(); void toggleExplorer() { if (haveExplorer()) hideExplorer(); else showExplorer(); } // methods for handling the 'selection' (paintin them bold) of SvLBoxEntries // returns <TRUE/> if the entry is selected (which means it's part of the selected path) - sal_Bool isSelected(SvTreeListEntry* _pEntry) const; + bool isSelected(SvTreeListEntry* _pEntry) const; // select the entry (and only the entry, not the whole path) - void select(SvTreeListEntry* _pEntry, sal_Bool _bSelect = sal_True); + void select(SvTreeListEntry* _pEntry, bool _bSelect = true); // select the path of the entry (which must be an entry without children) - void selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelect = sal_True); + void selectPath(SvTreeListEntry* _pEntry, bool _bSelect = true); virtual void loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame) SAL_OVERRIDE; @@ -273,7 +273,7 @@ namespace dbaui <p>The slot is available if an external dispatcher is responsible for it, _and_ if this dispatcher told us the slot is available.</p> */ - sal_Bool getExternalSlotState( sal_uInt16 _nId ) const; + bool getExternalSlotState( sal_uInt16 _nId ) const; /** add an entry (including the subentries for queries/tables) to the list model @@ -300,7 +300,7 @@ namespace dbaui @param _bFlushData <TRUE/> if the currently displayed object (if any) should be flushed */ - void unloadAndCleanup( sal_Bool _bDisposeConnection = sal_True ); + void unloadAndCleanup( bool _bDisposeConnection = true ); // disposes the connection associated with the given entry (which must represent a data source) void disposeConnection( SvTreeListEntry* _pDSEntry ); @@ -310,7 +310,7 @@ namespace dbaui /** close the connection (and collapse the list entries) of the given list entries */ - void closeConnection(SvTreeListEntry* _pEntry,sal_Bool _bDisposeConnection = sal_True); + void closeConnection(SvTreeListEntry* _pEntry, bool _bDisposeConnection = true); void populateTree(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xNameAccess, SvTreeListEntry* _pParent, EntryType _eEntryType); void initializeTreeModel(); @@ -320,10 +320,10 @@ namespace dbaui */ SvTreeListEntry* getEntryFromContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxNameAccess); // return true when there is connection available - sal_Bool ensureConnection(SvTreeListEntry* _pDSEntry, void * pDSData, SharedConnection& _rConnection ); - sal_Bool ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection ); + bool ensureConnection(SvTreeListEntry* _pDSEntry, void * pDSData, SharedConnection& _rConnection ); + bool ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection ); - sal_Bool getExistentConnectionFor( SvTreeListEntry* _pDSEntry, SharedConnection& _rConnection ); + bool getExistentConnectionFor( SvTreeListEntry* _pDSEntry, SharedConnection& _rConnection ); /** returns an image provider which works with the connection belonging to the given entry */ ::std::auto_ptr< ImageProvider > @@ -332,16 +332,16 @@ namespace dbaui void implAdministrate( SvTreeListEntry* _pApplyTo ); TransferableHelper* - implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection = sal_True ); + implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection = true ); EntryType getEntryType( const SvTreeListEntry* _pEntry ) const; EntryType getChildType( SvTreeListEntry* _pEntry ) const; - sal_Bool isObject( EntryType _eType ) const { return ( etTableOrView== _eType ) || ( etQuery == _eType ); } - sal_Bool isContainer( EntryType _eType ) const { return (etTableContainer == _eType) || (etQueryContainer == _eType); } + bool isObject( EntryType _eType ) const { return ( etTableOrView== _eType ) || ( etQuery == _eType ); } + bool isContainer( EntryType _eType ) const { return (etTableContainer == _eType) || (etQueryContainer == _eType); } bool isContainer( const SvTreeListEntry* _pEntry ) const { return isContainer( getEntryType( _pEntry ) ); } // ensure that the xObject for the given entry is set on the user data - sal_Bool ensureEntryObject( SvTreeListEntry* _pEntry ); + bool ensureEntryObject( SvTreeListEntry* _pEntry ); // get the display text of the entry given OUString GetEntryText( SvTreeListEntry* _pEntry ) const; @@ -358,17 +358,17 @@ namespace dbaui void implRemoveStatusListeners(); - sal_Bool implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect = sal_False); + bool implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor, bool _bSelectDirect = false); bool implSelect( SvTreeListEntry* _pEntry ); /// selects the entry given and loads the grid control with the object's data - sal_Bool implSelect( + bool implSelect( const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, - const sal_Bool _bEscapeProcessing, + const bool _bEscapeProcessing, const SharedConnection& _rxConnection, - sal_Bool _bSelectDirect = sal_False + bool _bSelectDirect = false ); SvTreeListEntry* implGetConnectionEntry(SvTreeListEntry* _pEntry) const; @@ -381,8 +381,8 @@ namespace dbaui ); /// loads the grid control with the data object specified (which may be a table, a query or a command) - sal_Bool implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, - const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection = SharedConnection() ); + bool implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, + const sal_Int32 _nCommandType, const bool _bEscapeProcessing, const SharedConnection& _rxConnection = SharedConnection() ); /** retrieves the tree entry for the object described by <arg>_rDescriptor</arg> @param _rDescriptor @@ -396,7 +396,7 @@ namespace dbaui */ SvTreeListEntry* getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor, SvTreeListEntry** _ppDataSourceEntry = NULL, SvTreeListEntry** _ppContainerEntry = NULL, - sal_Bool _bExpandAncestors = sal_True + bool _bExpandAncestors = true ); /** retrieves the tree entry for the object described by data source name, command and command type @param _rDataSource @@ -417,7 +417,7 @@ namespace dbaui SvTreeListEntry* getObjectEntry( const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType, SvTreeListEntry** _ppDataSourceEntry = NULL, SvTreeListEntry** _ppContainerEntry = NULL, - sal_Bool _bExpandAncestors = sal_True, + bool _bExpandAncestors = true, const SharedConnection& _rxConnection = SharedConnection() ); @@ -425,7 +425,7 @@ namespace dbaui void checkDocumentDataSource(); void extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, - OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing); + OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, bool& _rEscapeProcessing); void transferChangedControlProperty(const OUString& _rProperty, const ::com::sun::star::uno::Any& _rNewValue); @@ -445,9 +445,9 @@ namespace dbaui /** get the signature (command/escape processing) of the query the form is based on <p>If the for is not based on a query or not even loaded, nothing happens and <FALSE/> is returned.</p> */ - sal_Bool implGetQuerySignature( OUString& _rCommand, sal_Bool& _bEscapeProcessing ); + bool implGetQuerySignature( OUString& _rCommand, bool& _bEscapeProcessing ); - sal_Bool isEntryCopyAllowed(SvTreeListEntry* _pEntry) const; + bool isEntryCopyAllowed(SvTreeListEntry* _pEntry) const; void copyEntry(SvTreeListEntry* _pEntry); @@ -462,7 +462,7 @@ namespace dbaui @return <TRUE/> if it is the currently displayed otherwise <FALSE/> */ - sal_Bool isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer); + bool isCurrentlyDisplayedChanged(const OUString& _sName, SvTreeListEntry* _pContainer); /** called whenever the content of the browser is used for preview, as the very last action of the load process diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index ea8b68bc14f5..cadd83d753b6 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -87,7 +87,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const TColumnVector* pList, const OTypeInfoMap* _pInfoMap, - sal_Bool _bAutoIncrementEnabled, + bool _bAutoIncrementEnabled, SvStream& _rInputStream) :m_vColumns(_rColumnPositions) ,m_aDestColumns(true) @@ -102,13 +102,13 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, ,m_nRows(1) ,m_nRowCount(0) ,m_nDefToken( osl_getThreadTextEncoding() ) - ,m_bError(sal_False) - ,m_bInTbl(sal_False) - ,m_bHead(sal_True) - ,m_bDontAskAgain(sal_False) + ,m_bError(false) + ,m_bInTbl(false) + ,m_bHead(true) + ,m_bDontAskAgain(false) ,m_bIsAutoIncrement(_bAutoIncrementEnabled) - ,m_bFoundTable(sal_False) - ,m_bCheckOnly(sal_False) + ,m_bFoundTable(false) + ,m_bCheckOnly(false) ,m_bAppendFirstLine(false) { SAL_INFO("dbaccess.ui", "ODatabaseExport::ODatabaseExport" ); @@ -158,13 +158,13 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, ,m_nRows(1) ,m_nRowCount(0) ,m_nDefToken( osl_getThreadTextEncoding() ) - ,m_bError(sal_False) - ,m_bInTbl(sal_False) - ,m_bHead(sal_True) - ,m_bDontAskAgain(sal_False) - ,m_bIsAutoIncrement(sal_False) - ,m_bFoundTable(sal_False) - ,m_bCheckOnly(sal_False) + ,m_bError(false) + ,m_bInTbl(false) + ,m_bHead(true) + ,m_bDontAskAgain(false) + ,m_bIsAutoIncrement(false) + ,m_bFoundTable(false) + ,m_bCheckOnly(false) ,m_bAppendFirstLine(false) { SAL_INFO("dbaccess.ui", "ODatabaseExport::ODatabaseExport" ); @@ -242,19 +242,19 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, m_pTypeInfo->bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - m_pTypeInfo->bCaseSensitive = (sal_Bool)aValue; + m_pTypeInfo->bCaseSensitive = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - m_pTypeInfo->nSearchType = aValue; + m_pTypeInfo->nSearchType = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - m_pTypeInfo->bUnsigned = (sal_Bool)aValue; + m_pTypeInfo->bUnsigned = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - m_pTypeInfo->bCurrency = (sal_Bool)aValue; + m_pTypeInfo->bCurrency = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - m_pTypeInfo->bAutoIncrement = (sal_Bool)aValue; + m_pTypeInfo->bAutoIncrement = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); m_pTypeInfo->aLocalTypeName = aValue; @@ -669,9 +669,9 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName) pField->SetPrecision(::std::min<sal_Int32>((sal_Int32)255,m_pTypeInfo->nPrecision)); pField->SetScale(0); pField->SetIsNullable(ColumnValue::NULLABLE); - pField->SetAutoIncrement(sal_False); - pField->SetPrimaryKey(sal_False); - pField->SetCurrency(sal_False); + pField->SetAutoIncrement(false); + pField->SetPrimaryKey(false); + pField->SetCurrency(false); TColumns::iterator aFind = m_aDestColumns.find( aAlias ); if ( aFind != m_aDestColumns.end() ) @@ -683,7 +683,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName) m_vDestVector.push_back(m_aDestColumns.insert(TColumns::value_type(aAlias,pField)).first); } -sal_Bool ODatabaseExport::createRowSet() +bool ODatabaseExport::createRowSet() { SAL_INFO("dbaccess.ui", "ODatabaseExport::createRowSet" ); m_pUpdateHelper.reset(new OParameterUpdateHelper(createPreparedStatment(m_xConnection->getMetaData(),m_xTable,m_vColumns))); @@ -691,7 +691,7 @@ sal_Bool ODatabaseExport::createRowSet() return m_pUpdateHelper.get() != NULL; } -sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _aTextColor,const FontDescriptor& _rFont) +bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTextColor, const FontDescriptor& _rFont) { SAL_INFO("dbaccess.ui", "ODatabaseExport::executeWizard" ); @@ -710,7 +710,7 @@ sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _ m_xContext ); - sal_Bool bError = sal_False; + bool bError = false; try { if (aWizard.Execute()) @@ -735,11 +735,11 @@ sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _ } break; default: - bError = sal_True; // there is no error but I have nothing more to do + bError = true; // there is no error but I have nothing more to do } } else - bError = sal_True; + bError = true; if(!bError) bError = !createRowSet(); @@ -747,7 +747,7 @@ sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _ catch( const SQLException&) { ::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), &aWizard, m_xContext ); - bError = sal_True; + bError = true; } catch( const Exception& ) { @@ -768,9 +768,9 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException OSQLWarningBox aBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ); if (aBox.Execute() == RET_YES) - m_bDontAskAgain = sal_True; + m_bDontAskAgain = true; else - m_bError = sal_True; + m_bError = true; } } diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 764d797f5c54..67391db8641d 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -78,8 +78,8 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection, , m_nTableCount(0) , m_nWidth(0) , m_nColumnWidth(87) - , m_bMetaOptions(sal_False) - , m_bSDNum(sal_False) + , m_bMetaOptions(false) + , m_bSDNum(false) { SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" ); SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); @@ -94,14 +94,14 @@ OHTMLReader::OHTMLReader(SvStream& rIn, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const TColumnVector* pList, const OTypeInfoMap* _pInfoMap, - sal_Bool _bAutoIncrementEnabled) + bool _bAutoIncrementEnabled) : HTMLParser(rIn) , ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn ) , m_nTableCount(0) , m_nWidth(0) , m_nColumnWidth(87) - , m_bMetaOptions(sal_False) - , m_bSDNum(sal_False) + , m_bMetaOptions(false) + , m_bSDNum(false) { SAL_INFO("dbaccess.ui", "OHTMLReader::OHTMLReader" ); SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); @@ -184,7 +184,7 @@ void OHTMLReader::NextToken( int nToken ) } } else - m_bError = sal_True; + m_bError = true; break; case HTML_TEXTTOKEN: case HTML_SINGLECHAR: @@ -216,13 +216,13 @@ void OHTMLReader::NextToken( int nToken ) m_sCurrent = ""; m_nColumnPos++; eraseTokens(); - m_bSDNum = m_bInTbl = sal_False; + m_bSDNum = m_bInTbl = false; } break; case HTML_TABLEROW_OFF: if ( !m_pUpdateHelper.get() ) { - m_bError = sal_True; + m_bError = true; break; } try @@ -253,7 +253,7 @@ void OHTMLReader::NextToken( int nToken ) do {} while(GetNextToken() != HTML_TABLEROW_OFF); - m_bHead = sal_False; + m_bHead = false; } break; case HTML_TABLEDATA_ON: @@ -276,7 +276,7 @@ void OHTMLReader::NextToken( int nToken ) m_sTextToken = m_sCurrent; adjustFormat(); m_nColumnPos++; - m_bSDNum = m_bInTbl = sal_False; + m_bSDNum = m_bInTbl = false; m_sCurrent = ""; break; case HTML_TABLEROW_OFF: @@ -294,7 +294,7 @@ void OHTMLReader::NextToken( int nToken ) void OHTMLReader::fetchOptions() { SAL_INFO("dbaccess.ui", "OHTMLReader::fetchOptions" ); - m_bInTbl = sal_True; + m_bInTbl = true; const HTMLOptions& options = GetOptions(); for (size_t i = 0, n = options.size(); i < n; ++i) { @@ -304,7 +304,7 @@ void OHTMLReader::fetchOptions() case HTML_O_SDVAL: { m_sValToken = rOption.GetString(); - m_bSDNum = sal_True; + m_bSDNum = true; } break; case HTML_O_SDNUM: @@ -413,7 +413,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption ) } } -sal_Bool OHTMLReader::CreateTable(int nToken) +bool OHTMLReader::CreateTable(int nToken) { SAL_INFO("dbaccess.ui", "OHTMLReader::CreateTable" ); OUString aTempName(ModuleRes(STR_TBL_TITLE)); @@ -421,8 +421,8 @@ sal_Bool OHTMLReader::CreateTable(int nToken) aTempName = ::dbtools::createUniqueName(m_xTables, aTempName); int nTmpToken2 = nToken; - sal_Bool bCaption = sal_False; - sal_Bool bTableHeader = sal_False; + bool bCaption = false; + bool bTableHeader = false; OUString aColumnName; SvxCellHorJustify eVal; @@ -449,7 +449,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) case HTML_TABLEDATA_ON: case HTML_TABLEHEADER_ON: TableDataOn(eVal); - bTableHeader = sal_True; + bTableHeader = true; break; case HTML_TABLEDATA_OFF: case HTML_TABLEHEADER_OFF: @@ -466,13 +466,13 @@ sal_Bool OHTMLReader::CreateTable(int nToken) m_sCurrent = ""; eVal = SVX_HOR_JUSTIFY_STANDARD; - bTableHeader = sal_False; + bTableHeader = false; } break; case HTML_TITLE_ON: case HTML_CAPTION_ON: - bCaption = sal_True; + bCaption = true; break; case HTML_TITLE_OFF: case HTML_CAPTION_OFF: @@ -481,7 +481,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) aTableName = ::dbtools::createUniqueName(m_xTables, aTableName); else aTableName = aTempName; - bCaption = sal_False; + bCaption = false; break; case HTML_FONT_ON: TableFontOn(aFont,nTextColor); @@ -509,16 +509,16 @@ sal_Bool OHTMLReader::CreateTable(int nToken) CreateDefaultColumn(aColumnName); if ( m_vDestVector.empty() ) - return sal_False; + return false; if(aTableName.isEmpty()) aTableName = aTempName; - m_bInTbl = sal_False; - m_bFoundTable = sal_True; + m_bInTbl = false; + m_bFoundTable = true; if ( isCheckEnabled() ) - return sal_True; + return true; return !executeWizard(aTableName,makeAny(nTextColor),aFont) && m_xTable.is(); } @@ -526,7 +526,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) void OHTMLReader::setTextEncoding() { SAL_INFO("dbaccess.ui", "OHTMLReader::setTextEncoding" ); - m_bMetaOptions = sal_True; + m_bMetaOptions = true; ParseMetaOptions(NULL, NULL); } diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index 88146786f226..b7c0be6e525a 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -48,7 +48,7 @@ ORowSetImportExport::ORowSetImportExport( Window* _pParent, ,m_xTargetResultSetUpdate(_xResultSetUpdate) ,m_xTargetRowUpdate(_xResultSetUpdate,UNO_QUERY) ,m_pParent(_pParent) - ,m_bAlreadyAsked(sal_False) + ,m_bAlreadyAsked(false) { SAL_INFO("dbaccess.ui", "ORowSetImportExport::ORowSetImportExport" ); OSL_ENSURE(_pParent,"Window can't be null!"); @@ -94,20 +94,20 @@ void ORowSetImportExport::initialize() } } -sal_Bool ORowSetImportExport::Write() +bool ORowSetImportExport::Write() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::Write" ); - return sal_True; + return true; } -sal_Bool ORowSetImportExport::Read() +bool ORowSetImportExport::Read() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::Read" ); // check if there is any column to copy if(::std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(), ::std::bind2nd(::std::greater<sal_Int32>(),0)) == m_aColumnMapping.end()) - return sal_False; - sal_Bool bContinue = sal_True; + return false; + bool bContinue = true; if(m_aSelection.getLength()) { const Any* pBegin = m_aSelection.getConstArray(); @@ -128,7 +128,7 @@ sal_Bool ORowSetImportExport::Read() sal_Int32 nRowFilterIndex = 0; if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_ISROWCOUNTFINAL) ) { - sal_Bool bFinal = sal_False; + bool bFinal = false; xProp->getPropertyValue(PROPERTY_ISROWCOUNTFINAL) >>= bFinal; if ( !bFinal ) m_xResultSet->afterLast(); @@ -152,10 +152,10 @@ sal_Bool ORowSetImportExport::Read() } } } - return sal_True; + return true; } -sal_Bool ORowSetImportExport::insertNewRow() +bool ORowSetImportExport::insertNewRow() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::insertNewRow" ); try @@ -248,12 +248,12 @@ sal_Bool ORowSetImportExport::insertNewRow() OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING); OSQLWarningBox aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ); if(aDlg.Execute() == RET_YES) - m_bAlreadyAsked = sal_True; + m_bAlreadyAsked = true; else - return sal_False; + return false; } } - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx index 1b68802e738a..30366adf803c 100644 --- a/dbaccess/source/ui/misc/RtfReader.cxx +++ b/dbaccess/source/ui/misc/RtfReader.cxx @@ -77,7 +77,7 @@ ORTFReader::ORTFReader(SvStream& rIn, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const TColumnVector* pList, const OTypeInfoMap* _pInfoMap, - sal_Bool _bAutoIncrementEnabled) + bool _bAutoIncrementEnabled) :SvRTFParser(rIn) ,ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn ) { @@ -175,7 +175,7 @@ void ORTFReader::NextToken( int nToken ) eraseTokens(); } - m_bInTbl = sal_True; // Now we are in a table description + m_bInTbl = true; // Now we are in a table description break; case RTF_TEXTTOKEN: case RTF_SINGLECHAR: @@ -227,11 +227,11 @@ void ORTFReader::NextToken( int nToken ) do {} while(GetNextToken() != RTF_ROW && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED); - m_bHead = sal_False; + m_bHead = false; } break; case RTF_INTBL: - m_bInTbl = sal_True; + m_bInTbl = true; break; case RTF_TEXTTOKEN: case RTF_SINGLECHAR: @@ -251,7 +251,7 @@ void ORTFReader::NextToken( int nToken ) } } -sal_Bool ORTFReader::CreateTable(int nToken) +bool ORTFReader::CreateTable(int nToken) { SAL_INFO("dbaccess.ui", "ORTFReader::CreateTable" ); OUString aTableName(ModuleRes(STR_TBL_TITLE)); @@ -268,14 +268,14 @@ sal_Bool ORTFReader::CreateTable(int nToken) { case RTF_UNKNOWNCONTROL: case RTF_UNKNOWNDATA: - m_bInTbl = sal_False; + m_bInTbl = false; aColumnName = ""; break; case RTF_INTBL: if(m_bInTbl) aColumnName = ""; - m_bInTbl = sal_True; + m_bInTbl = true; break; case RTF_TEXTTOKEN: case RTF_SINGLECHAR: @@ -310,7 +310,7 @@ sal_Bool ORTFReader::CreateTable(int nToken) } while((nTmpToken2 = GetNextToken()) != RTF_TROWD && eState != SVPAR_ERROR && eState != SVPAR_ACCEPTED); - sal_Bool bOk = !m_vDestVector.empty(); + bool bOk = !m_vDestVector.empty(); if(bOk) { if ( !aColumnName.isEmpty() ) @@ -320,11 +320,11 @@ sal_Bool ORTFReader::CreateTable(int nToken) CreateDefaultColumn(aColumnName); } - m_bInTbl = sal_False; - m_bFoundTable = sal_True; + m_bInTbl = false; + m_bFoundTable = true; if ( isCheckEnabled() ) - return sal_True; + return true; Any aTextColor; if(!m_vecColor.empty()) aTextColor <<= m_vecColor[0]; diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index 2a6a0f83bca6..c04c4feba84f 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -78,7 +78,7 @@ OTableCopyHelper::OTableCopyHelper(OGenericUnoController* _pControler) void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const Reference<XConnection>& i_rSourceConnection, const OUString& i_rCommand, const sal_Int32 i_nCommandType, - const Reference< XResultSet >& i_rSourceRows, const Sequence< Any >& i_rSelection, const sal_Bool i_bBookmarkSelection, + const Reference< XResultSet >& i_rSourceRows, const Sequence< Any >& i_rSelection, const bool i_bBookmarkSelection, const OUString& i_rDestDataSource, const Reference<XConnection>& i_rDestConnection) { if ( CommandType::QUERY != i_nCommandType && CommandType::TABLE != i_nCommandType ) @@ -161,7 +161,7 @@ void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteDa OSL_ENSURE( _rPasteData.has( daBookmarkSelection ), "OTableCopyHelper::pasteTable: you should specify BookmarkSelection, too, to be on the safe side!" ); } - sal_Bool bBookmarkSelection( sal_True ); + bool bBookmarkSelection( true ); if ( _rPasteData.has( daBookmarkSelection ) ) { OSL_VERIFY( _rPasteData[ daBookmarkSelection ] >>= bBookmarkSelection ); @@ -203,7 +203,7 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId aTrans.nType = E_TABLE; aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId; aTrans.sDefaultTableName = GetTableNameForAppend(); - if ( !copyTagTable(aTrans,sal_False,_xConnection) ) + if ( !copyTagTable(aTrans,false,_xConnection) ) m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, OUString("S1000"), 0, Any())); } catch(const SQLException&) @@ -231,7 +231,7 @@ void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData pasteTable( SOT_FORMAT_RTF,_rTransData,i_rDestDataSource,_xConnection); } -sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, sal_Bool _bCheck,const SharedConnection& _xConnection) +bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, bool _bCheck, const SharedConnection& _xConnection) { Reference<XEventListener> xEvt; ODatabaseImportExport* pImport = NULL; @@ -252,9 +252,9 @@ sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc return pImport->Read(); } -sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboard) const +bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboard) const { - sal_Bool bTableFormat = _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE) + bool bTableFormat = _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE) || _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY) || _rClipboard.HasFormat(SOT_FORMAT_RTF) || _rClipboard.HasFormat(SOT_FORMATSTR_ID_HTML); @@ -262,12 +262,12 @@ sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboa return bTableFormat; } -sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData - ,DropDescriptor& _rAsyncDrop - ,const SharedConnection& _xConnection) +bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData + ,DropDescriptor& _rAsyncDrop + ,const SharedConnection& _xConnection) { - sal_Bool bRet = sal_False; - sal_Bool bHtml = _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML); + bool bRet = false; + bool bHtml = _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML); if ( bHtml || _aDroppedData.HasFormat(SOT_FORMAT_RTF) ) { if ( bHtml ) @@ -276,7 +276,7 @@ sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedD const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMAT_RTF,_rAsyncDrop.aHtmlRtfStorage); _rAsyncDrop.bHtml = bHtml; - _rAsyncDrop.bError = !copyTagTable(_rAsyncDrop,sal_True,_xConnection); + _rAsyncDrop.bError = !copyTagTable(_rAsyncDrop,true,_xConnection); bRet = ( !_rAsyncDrop.bError && _rAsyncDrop.aHtmlRtfStorage.Is() ); if ( bRet ) @@ -303,7 +303,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc { if ( _rDesc.aHtmlRtfStorage.Is() ) { - copyTagTable(_rDesc,sal_False,_xConnection); + copyTagTable(_rDesc,false,_xConnection); _rDesc.aHtmlRtfStorage = NULL; // we now have to delete the temp file created in executeDrop INetURLObject aURL; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 22dde9d69ecc..e6a3a9628fbd 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -86,15 +86,15 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& const Reference< XComponentContext >& _rM, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF, const OUString& rExchange) - :m_bBookmarkSelection( sal_False ) + :m_bBookmarkSelection( false ) ,m_xFormatter(_rxNumberF) ,m_xContext(_rM) ,m_nCommandType(CommandType::TABLE) ,m_bNeedToReInitialize(false) ,m_pReader(NULL) ,m_pRowMarker(NULL) - ,m_bInInitialize(sal_False) - ,m_bCheckOnly(sal_False) + ,m_bInInitialize(false) + ,m_bCheckOnly(false) { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::ODatabaseImportExport" ); @@ -116,7 +116,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& // import data ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& _rxConnection, const Reference< XNumberFormatter >& _rxNumberF, const Reference< XComponentContext >& _rM ) - :m_bBookmarkSelection( sal_False ) + :m_bBookmarkSelection( false ) ,m_pStream(NULL) ,m_xConnection(_rxConnection) ,m_xFormatter(_rxNumberF) @@ -125,8 +125,8 @@ ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& ,m_bNeedToReInitialize(false) ,m_pReader(NULL) ,m_pRowMarker(NULL) - ,m_bInInitialize(sal_False) - ,m_bCheckOnly(sal_False) + ,m_bInInitialize(false) + ,m_bCheckOnly(false) { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::ODatabaseImportExport" ); m_eDestEnc = osl_getThreadTextEncoding(); @@ -256,7 +256,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor void ODatabaseImportExport::initialize() { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::initialize" ); - m_bInInitialize = sal_True; + m_bInInitialize = true; m_bNeedToReInitialize = false; if ( !m_xConnection.is() ) @@ -336,27 +336,27 @@ void ODatabaseImportExport::initialize() m_aFont = VCLUnoHelper::CreateFontDescriptor( aApplicationFont ); } - m_bInInitialize = sal_False; + m_bInInitialize = false; } -sal_Bool ODatabaseImportExport::Write() +bool ODatabaseImportExport::Write() { if ( m_bNeedToReInitialize ) { if ( !m_bInInitialize ) initialize(); } - return sal_True; + return true; } -sal_Bool ODatabaseImportExport::Read() +bool ODatabaseImportExport::Read() { if ( m_bNeedToReInitialize ) { if ( !m_bInInitialize ) initialize(); } - return sal_True; + return true; } void ODatabaseImportExport::impl_initializeRowMember_throw() @@ -372,7 +372,7 @@ void ODatabaseImportExport::impl_initializeRowMember_throw() } } -sal_Bool ORTFImportExport::Write() +bool ORTFImportExport::Write() { SAL_INFO("dbaccess.ui", "ORTFImportExport::Write" ); ODatabaseImportExport::Write(); @@ -380,10 +380,10 @@ sal_Bool ORTFImportExport::Write() m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ANSI ).WriteCharPtr( SAL_NEWLINE_STRING ); rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252; - sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); - sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); - sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); - sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); + bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); + bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); + bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); + bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); sal_Int32 nColor = 0; if(m_xObject.is()) @@ -436,11 +436,11 @@ sal_Bool ORTFImportExport::Write() const OUString* pIter = aNames.getConstArray(); sal_Int32 nCount = aNames.getLength(); - sal_Bool bUseResultMetaData = sal_False; + bool bUseResultMetaData = false; if ( !nCount ) { nCount = m_xResultSetMetaData->getColumnCount(); - bUseResultMetaData = sal_True; + bUseResultMetaData = true; } for( sal_Int32 i=1; i<=nCount; ++i ) @@ -513,7 +513,7 @@ sal_Bool ORTFImportExport::Write() const Any* pSelIter = m_aSelection.getConstArray(); const Any* pEnd = pSelIter + m_aSelection.getLength(); - sal_Bool bContinue = sal_True; + bool bContinue = true; for( ; pSelIter != pEnd && bContinue; ++pSelIter ) { if ( m_bBookmarkSelection ) @@ -565,10 +565,10 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_ m_pStream->WriteCharPtr( SAL_NEWLINE_STRING ); } - const sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); - const sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); - const sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); - const sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); + const bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); + const bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); + const bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); + const bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY); m_pStream->WriteChar( '{' ); @@ -610,7 +610,7 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_ ++k; } -sal_Bool ORTFImportExport::Read() +bool ORTFImportExport::Read() { SAL_INFO("dbaccess.ui", "ORTFImportExport::Read" ); ODatabaseImportExport::Read(); @@ -654,7 +654,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,rExchange) ,m_nIndent(0) #if OSL_DEBUG_LEVEL > 0 - ,m_bCheckFont(sal_False) + ,m_bCheckFont(false) #endif { SAL_INFO("dbaccess.ui", "OHTMLImportExport::OHTMLImportExport" ); @@ -665,7 +665,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD sIndent[0] = 0; } -sal_Bool OHTMLImportExport::Write() +bool OHTMLImportExport::Write() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::Write" ); ODatabaseImportExport::Write(); @@ -681,10 +681,10 @@ sal_Bool OHTMLImportExport::Write() return ((*m_pStream).GetError() == SVSTREAM_OK); } - return sal_False; + return false; } -sal_Bool OHTMLImportExport::Read() +bool OHTMLImportExport::Read() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::Read" ); ODatabaseImportExport::Read(); @@ -769,7 +769,7 @@ void OHTMLImportExport::WriteTables() Sequence< OUString> aNames; Reference<XNameAccess> xColumns; - sal_Bool bUseResultMetaData = sal_False; + bool bUseResultMetaData = false; if(m_xObject.is()) { Reference<XColumnsSupplier> xColSup(m_xObject,UNO_QUERY); @@ -781,7 +781,7 @@ void OHTMLImportExport::WriteTables() aNames.realloc(nCount); for (sal_Int32 i= 0; i < nCount; ++i) aNames[i] = m_xResultSetMetaData->getColumnName(i+1); - bUseResultMetaData = sal_True; + bUseResultMetaData = true; } } @@ -975,10 +975,10 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat, sal_Int32 nWidthPixel, sal FontOn(); - sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); - sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); - sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); - sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); + bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); + bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); + bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); + bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold ); if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic ); @@ -1004,7 +1004,7 @@ void OHTMLImportExport::FontOn() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::FontOn" ); #if OSL_DEBUG_LEVEL > 0 - m_bCheckFont = sal_True; + m_bCheckFont = true; #endif // <FONT FACE="xxx"> @@ -1037,7 +1037,7 @@ inline void OHTMLImportExport::FontOff() OSL_ENSURE(m_bCheckFont,"Kein FontOn() gerufen"); TAG_OFF( OOO_STRING_SVTOOLS_HTML_font ); #if OSL_DEBUG_LEVEL > 0 - m_bCheckFont = sal_False; + m_bCheckFont = false; #endif } diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx index 6a03ebd4fb49..c9e0df35d99f 100644 --- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx +++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx @@ -91,7 +91,7 @@ namespace dbaui } void OToolBoxHelper::setToolBox(ToolBox* _pTB) { - sal_Bool bFirstTime = (m_pToolBox == NULL); + bool bFirstTime = (m_pToolBox == NULL); m_pToolBox = _pTB; if ( m_pToolBox ) { diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 75c70f93813b..b8bc4439641d 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -162,7 +162,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP } OUString sPwd, sUser; - sal_Bool bPwdReq = sal_False; + bool bPwdReq = false; try { _xDataSource->getPropertyValue(PROPERTY_PASSWORD) >>= sPwd; @@ -292,11 +292,11 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, const OUString& _sCreateParams, sal_Int32 _nPrecision, sal_Int32 _nScale, - sal_Bool _bAutoIncrement, - sal_Bool& _brForceToType) + bool _bAutoIncrement, + bool& _brForceToType) { TOTypeInfoSP pTypeInfo; - _brForceToType = sal_False; + _brForceToType = false; // search for type ::std::pair<OTypeInfoMap::const_iterator, OTypeInfoMap::const_iterator> aPair = _rTypeInfo.equal_range(_nType); OTypeInfoMap::const_iterator aIter = aPair.first; @@ -309,7 +309,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, OUString sDBTypeName = aIter->second->aTypeName; (void)sDBTypeName; sal_Int32 nDBTypePrecision = aIter->second->nPrecision; (void)nDBTypePrecision; sal_Int32 nDBTypeScale = aIter->second->nMaximumScale; (void)nDBTypeScale; - sal_Bool bDBAutoIncrement = aIter->second->bAutoIncrement; (void)bDBAutoIncrement; + bool bDBAutoIncrement = aIter->second->bAutoIncrement; (void)bDBAutoIncrement; #endif if ( ( _sTypeName.isEmpty() @@ -390,7 +390,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, _sCreateParams, _nPrecision, _nScale, - sal_False, + false, _brForceToType); } else @@ -399,7 +399,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, else { pTypeInfo = aPair.first->second; - _brForceToType = sal_True; + _brForceToType = true; } } else @@ -485,19 +485,19 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo pInfo->bNullable = (sal_Int32)aValue == ColumnValue::NULLABLE; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - pInfo->bCaseSensitive = (sal_Bool)aValue; + pInfo->bCaseSensitive = (bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); pInfo->nSearchType = aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - pInfo->bUnsigned = (sal_Bool)aValue; + pInfo->bUnsigned = (bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - pInfo->bCurrency = (sal_Bool)aValue; + pInfo->bCurrency = (bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); - pInfo->bAutoIncrement = (sal_Bool)aValue; + pInfo->bAutoIncrement = (bool)aValue; ++nPos; aValue.fill(nPos,aTypes[nPos],aNullable[nPos],xRow); pInfo->aLocalTypeName = aValue; @@ -704,10 +704,10 @@ OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const return sDefaultName; } -sal_Bool checkDataSourceAvailable(const OUString& _sDataSourceName,const Reference< ::com::sun::star::uno::XComponentContext >& _xContext) +bool checkDataSourceAvailable(const OUString& _sDataSourceName,const Reference< ::com::sun::star::uno::XComponentContext >& _xContext) { Reference< XDatabaseContext > xDataBaseContext = DatabaseContext::create(_xContext); - sal_Bool bRet = xDataBaseContext->hasByName(_sDataSourceName); + bool bRet = xDataBaseContext->hasByName(_sDataSourceName); if ( !bRet ) { // try if this one is a URL try @@ -760,7 +760,7 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, try { Reference< XPropertySetInfo > xInfo = xAffectedCol->getPropertySetInfo(); - sal_Bool bHasFormat = xInfo->hasPropertyByName(PROPERTY_FORMATKEY); + bool bHasFormat = xInfo->hasPropertyByName(PROPERTY_FORMATKEY); sal_Int32 nDataType = ::comphelper::getINT32(xField->getPropertyValue(PROPERTY_TYPE)); SvxCellHorJustify eJustify(SVX_HOR_JUSTIFY_STANDARD); @@ -786,14 +786,14 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, } } -sal_Bool callColumnFormatDialog(Window* _pParent, +bool callColumnFormatDialog(Window* _pParent, SvNumberFormatter* _pFormatter, sal_Int32 _nDataType, sal_Int32& _nFormatKey, SvxCellHorJustify& _eJustify, - sal_Bool _bHasFormat) + bool _bHasFormat) { - sal_Bool bRet = sal_False; + bool bRet = false; // UNO->ItemSet static SfxItemInfo aItemInfos[] = @@ -828,13 +828,13 @@ sal_Bool callColumnFormatDialog(Window* _pParent, SfxItemSet* pFormatDescriptor = new SfxItemSet(*pPool, aAttrMap); // fill it pFormatDescriptor->Put(SvxHorJustifyItem(_eJustify, SBA_ATTR_ALIGN_HOR_JUSTIFY)); - sal_Bool bText = sal_False; + bool bText = false; if (_bHasFormat) { // if the col is bound to a text field we have to disallow all non-text formats if ((DataType::CHAR == _nDataType) || (DataType::VARCHAR == _nDataType) || (DataType::LONGVARCHAR == _nDataType) || (DataType::CLOB == _nDataType)) { - bText = sal_True; + bText = true; pFormatDescriptor->Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, true)); if (!_pFormatter->IsTextFormat(_nFormatKey)) // text fields can only have text formats @@ -872,7 +872,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent, SFX_ITEMSET_GET(*pSet, pFormat, SfxUInt32Item, SBA_DEF_FMTVALUE, true); _nFormatKey = (sal_Int32)pFormat->GetValue(); } - bRet = sal_True; + bRet = true; } // deleted formats const SfxItemSet* pResult = aDlg.GetOutputItemSet(); @@ -905,12 +905,12 @@ const SfxFilter* getStandardDatabaseFilter() return pFilter; } -sal_Bool appendToFilter(const Reference<XConnection>& _xConnection, +bool appendToFilter(const Reference<XConnection>& _xConnection, const OUString& _sName, const Reference< XComponentContext >& _rxContext, Window* _pParent) { - sal_Bool bRet = sal_False; + bool bRet = false; Reference< XChild> xChild(_xConnection,UNO_QUERY); if(xChild.is()) { @@ -920,7 +920,7 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection, Sequence< OUString > aFilter; xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aFilter; // first check if we have something like SCHEMA.% - sal_Bool bHasToInsert = sal_True; + bool bHasToInsert = true; const OUString* pBegin = aFilter.getConstArray(); const OUString* pEnd = pBegin + aFilter.getLength(); for (;pBegin != pEnd; ++pBegin) @@ -929,20 +929,20 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection, { sal_Int32 nLen; if((nLen = pBegin->lastIndexOf('.')) != -1 && !pBegin->compareTo(_sName,nLen)) - bHasToInsert = sal_False; + bHasToInsert = false; else if(pBegin->getLength() == 1) - bHasToInsert = sal_False; + bHasToInsert = false; } } - bRet = sal_True; + bRet = true; if(bHasToInsert) { if(! ::dbaui::checkDataSourceAvailable(::comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)),_rxContext)) { OUString aMessage(ModuleRes(STR_TABLEDESIGN_DATASOURCE_DELETED)); OSQLWarningBox( _pParent, aMessage ).Execute(); - bRet = sal_False; + bRet = false; } else { @@ -997,7 +997,7 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) ); - DlgSize aColumnSizeDlg( _pBox, nColSize, sal_False, aDefaultMM.Width() * 10 ); + DlgSize aColumnSizeDlg( _pBox, nColSize, false, aDefaultMM.Width() * 10 ); if ( aColumnSizeDlg.Execute() ) { sal_Int32 nValue = aColumnSizeDlg.GetValue(); @@ -1015,23 +1015,23 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId } // check if SQL92 name checking is enabled -sal_Bool isSQL92CheckEnabled(const Reference<XConnection>& _xConnection) +bool isSQL92CheckEnabled(const Reference<XConnection>& _xConnection) { return ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_ENABLESQL92CHECK ); } -sal_Bool isAppendTableAliasEnabled(const Reference<XConnection>& _xConnection) +bool isAppendTableAliasEnabled(const Reference<XConnection>& _xConnection) { return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_APPEND_TABLE_ALIAS ); } -sal_Bool generateAsBeforeTableAlias(const Reference<XConnection>& _xConnection) +bool generateAsBeforeTableAlias(const Reference<XConnection>& _xConnection) { return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_AS_BEFORE_CORRELATION_NAME ); } void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource, - sal_Bool& _rAutoIncrementValueEnabled, + bool& _rAutoIncrementValueEnabled, OUString& _rsAutoIncrementValue) { if ( _xDatasource.is() ) @@ -1055,7 +1055,7 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource, } void fillAutoIncrementValue(const Reference<XConnection>& _xConnection, - sal_Bool& _rAutoIncrementValueEnabled, + bool& _rAutoIncrementValueEnabled, OUString& _rsAutoIncrementValue) { Reference< XChild> xChild(_xConnection,UNO_QUERY); @@ -1086,7 +1086,7 @@ OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUS return sName; } -void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ) +void AppendConfigToken( OUString& _rURL, bool _bQuestionMark ) { // query part exists? if ( _bQuestionMark ) @@ -1106,9 +1106,9 @@ void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ) namespace { - sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor ) + bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor ) { - sal_Bool bRet = sal_False; + bool bRet = false; OUString sAnchor; try @@ -1122,7 +1122,7 @@ namespace if ( !sAnchor.isEmpty() ) { _rAnchor = sAnchor; - bRet = sal_True; + bRet = true; } } else @@ -1146,9 +1146,9 @@ namespace OUString sAnchor; OUString sTempURL = aURL.Complete; - AppendConfigToken( sTempURL, sal_True ); - sal_Bool bHasAnchor = GetHelpAnchor_Impl( sTempURL, sAnchor ); - AppendConfigToken(aURL.Complete,sal_True); + AppendConfigToken( sTempURL, true ); + bool bHasAnchor = GetHelpAnchor_Impl( sTempURL, sAnchor ); + AppendConfigToken(aURL.Complete,true); if ( bHasAnchor ) { aURL.Complete += "#"; @@ -1274,14 +1274,14 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType if ( !pTypeInfo ) { OUString sCreate("x"),sTypeName; - sal_Bool bForce = sal_True; - pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,sal_False,bForce); + bool bForce = true; + pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,false,bForce); } OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!"); return pTypeInfo; } -sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const OUString& _sName) +sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,bool _bAll,const OUString& _sName) { SolarMutexGuard aGuard; OUString aMsg = ModuleRes(_nText); @@ -1373,7 +1373,7 @@ Reference<XPropertySet> createView( const OUString& _rName, const Reference< XCo { _rxSourceObject->getPropertyValue( PROPERTY_COMMAND ) >>= sCommand; - sal_Bool bEscapeProcessing( sal_False ); + bool bEscapeProcessing( false ); OSL_VERIFY( _rxSourceObject->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing ); if ( bEscapeProcessing ) sCommand = lcl_createSDBCLevelStatement( sCommand, _rxConnection ); @@ -1385,17 +1385,17 @@ Reference<XPropertySet> createView( const OUString& _rName, const Reference< XCo return createView( _rName, _rxConnection, sCommand ); } -sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentContext >& _rxContext, +bool insertHierachyElement( Window* _pParent, const Reference< XComponentContext >& _rxContext, const Reference<XHierarchicalNameContainer>& _xNames, const OUString& _sParentFolder, - sal_Bool _bForm, - sal_Bool _bCollection, + bool _bForm, + bool _bCollection, const Reference<XContent>& _xContent, - sal_Bool _bMove) + bool _bMove) { OSL_ENSURE( _xNames.is(), "insertHierachyElement: illegal name container!" ); if ( !_xNames.is() ) - return sal_False; + return false; Reference<XNameAccess> xNameAccess( _xNames, UNO_QUERY ); OUString sName = _sParentFolder; @@ -1409,7 +1409,7 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon OSL_ENSURE( xNameAccess.is(), "insertHierachyElement: could not find the proper name container!" ); if ( !xNameAccess.is() ) - return sal_False; + return false; OUString sNewName; Reference<XPropertySet> xProp(_xContent,UNO_QUERY); @@ -1439,7 +1439,7 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS); if ( RET_OK != aAskForName.Execute() ) // cancelled by the user - return sal_False; + return false; sNewName = aAskForName.getName(); } @@ -1482,10 +1482,10 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - return sal_False; + return false; } - return sal_True; + return true; } Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >& _rxConnection, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext ) diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index 4a0047047c20..8a7412786ff4 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -68,7 +68,7 @@ OCopyTable::OCopyTable( Window * pParent ) ,m_pPage2(NULL) ,m_pPage3(NULL) ,m_bPKeyAllowed(false) - ,m_bUseHeaderAllowed(sal_True) + ,m_bUseHeaderAllowed(true) { m_edTableName.SetMaxTextLen(EDIT_NOLIMIT); @@ -119,7 +119,7 @@ IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ ) void OCopyTable::SetAppendDataRadio() { - m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_True); + m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,true); m_aFT_KeyName.Enable(false); m_aCB_PrimaryColumn.Enable(false); m_edKeyName.Enable(false); @@ -129,7 +129,7 @@ void OCopyTable::SetAppendDataRadio() IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton ) { m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,pButton != &m_aRB_View); - sal_Bool bKey = m_bPKeyAllowed && pButton != &m_aRB_View; + bool bKey = m_bPKeyAllowed && pButton != &m_aRB_View; m_aFT_KeyName.Enable(bKey && m_aCB_PrimaryColumn.IsChecked()); m_edKeyName.Enable(bKey && m_aCB_PrimaryColumn.IsChecked()); m_aCB_PrimaryColumn.Enable(bKey); @@ -153,7 +153,7 @@ IMPL_LINK( OCopyTable, KeyClickHdl, Button*, /*pButton*/ ) return 0; } -sal_Bool OCopyTable::LeavePage() +bool OCopyTable::LeavePage() { m_pParent->m_bCreatePrimaryKeyColumn = (m_bPKeyAllowed && m_aCB_PrimaryColumn.IsEnabled()) ? m_aCB_PrimaryColumn.IsChecked() : sal_False; m_pParent->m_aKeyName = m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : OUString(); @@ -170,7 +170,7 @@ sal_Bool OCopyTable::LeavePage() aErrorInfo.append( SQLExceptionInfo::SQL_CONTEXT, ModuleRes( STR_SUGGEST_APPEND_TABLE_DATA ) ); m_pParent->showError(aErrorInfo.get()); - return sal_False; + return false; } // have to check the length of the table name @@ -189,7 +189,7 @@ sal_Bool OCopyTable::LeavePage() { OUString sError(ModuleRes(STR_INVALID_TABLE_NAME_LENGTH)); m_pParent->showError(sError); - return sal_False; + return false; } // now we have to check if the name of the primary key already exists @@ -200,7 +200,7 @@ sal_Bool OCopyTable::LeavePage() aInfoString += " "; aInfoString += m_pParent->m_aKeyName; m_pParent->showError(aInfoString); - return sal_False; + return false; } } @@ -209,7 +209,7 @@ sal_Bool OCopyTable::LeavePage() if ( m_pParent->getOperation() == CopyTableOperation::AppendData ) { if(!checkAppendData()) - return sal_False; + return false; } else if ( m_nOldOperation == CopyTableOperation::AppendData ) { @@ -222,7 +222,7 @@ sal_Bool OCopyTable::LeavePage() if ( CopyTableOperation::AppendData == m_pParent->getOperation() ) { if( !checkAppendData() ) - return sal_False; + return false; } } m_pParent->m_sName = m_edTableName.GetText(); @@ -232,10 +232,10 @@ sal_Bool OCopyTable::LeavePage() { OUString sError(ModuleRes(STR_INVALID_TABLE_NAME)); m_pParent->showError(sError); - return sal_False; + return false; } - return sal_True; + return true; } void OCopyTable::ActivatePage() @@ -253,13 +253,13 @@ OUString OCopyTable::GetTitle() const void OCopyTable::Reset() { - m_bFirstTime = sal_False; + m_bFirstTime = false; m_edTableName.SetText( m_pParent->m_sName ); m_edTableName.SaveValue(); } -sal_Bool OCopyTable::checkAppendData() +bool OCopyTable::checkAppendData() { m_pParent->clearDestColumns(); Reference< XPropertySet > xTable; @@ -282,17 +282,17 @@ sal_Bool OCopyTable::checkAppendData() ODatabaseExport::TColumnVector::const_iterator aDestIter = pDestColumns->begin(); ODatabaseExport::TColumnVector::const_iterator aDestEnd = pDestColumns->end(); const sal_uInt32 nDestSize = pDestColumns->size(); - sal_Bool bNotConvert; + bool bNotConvert; sal_uInt32 i = 0; for(sal_Int32 nPos = 1;aDestIter != aDestEnd && i < nDestSize && i < nSrcSize;++aDestIter,++nPos,++i) { - bNotConvert = sal_True; + bNotConvert = true; m_pParent->m_vColumnPos[i] = ODatabaseExport::TPositions::value_type(nPos,nPos); TOTypeInfoSP pTypeInfo = m_pParent->convertType((*aDestIter)->second->getSpecialTypeInfo(),bNotConvert); if ( !bNotConvert ) { m_pParent->showColumnTypeNotSupported((*aDestIter)->first); - return sal_False; + return false; } if ( pTypeInfo.get() ) @@ -307,9 +307,9 @@ sal_Bool OCopyTable::checkAppendData() { OUString sError(ModuleRes(STR_INVALID_TABLE_NAME)); m_pParent->showError(sError); - return sal_False; + return false; } - return sal_True; + return true; } void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName ) diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 99387266152c..9972c7841c52 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -47,7 +47,7 @@ OUString OWizColumnSelect::GetTitle() const { return ModuleRes(STR_WIZ_COLUMN_SE OWizardPage::OWizardPage( Window* pParent, const ResId& rResId ) : TabPage(pParent,rResId) ,m_pParent(static_cast<OCopyTableWizard*>(pParent)) - ,m_bFirstTime(sal_True) + ,m_bFirstTime(true) { } @@ -110,7 +110,7 @@ void OWizColumnSelect::Reset() if(m_lbOrgColumnNames.GetEntryCount()) m_lbOrgColumnNames.SelectEntryPos(0); - m_bFirstTime = sal_False; + m_bFirstTime = false; } void OWizColumnSelect::ActivatePage( ) @@ -136,7 +136,7 @@ void OWizColumnSelect::ActivatePage( ) m_ibColumns_RH.GrabFocus(); } -sal_Bool OWizColumnSelect::LeavePage() +bool OWizColumnSelect::LeavePage() { m_pParent->clearDestColumns(); @@ -155,14 +155,14 @@ sal_Bool OWizColumnSelect::LeavePage() ) return m_pParent->getDestColumns()->size() != 0; else - return sal_True; + return true; } IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton ) { MultiListBox *pLeft = NULL; MultiListBox *pRight = NULL; - sal_Bool bAll = sal_False; + bool bAll = false; if(pButton == &m_ibColumn_RH) { @@ -178,13 +178,13 @@ IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton ) { pLeft = &m_lbOrgColumnNames; pRight = &m_lbNewColumnNames; - bAll = sal_True; + bAll = true; } else if(pButton == &m_ibColumns_LH) { pLeft = &m_lbNewColumnNames; pRight = &m_lbOrgColumnNames; - bAll = sal_True; + bAll = true; } // else ???? @@ -282,10 +282,10 @@ void OWizColumnSelect::createNewColumn( ListBox* _pListbox, _nMaxNameLen); OFieldDescription* pNewField = new OFieldDescription(*_pSrcField); pNewField->SetName(sConvertedName); - sal_Bool bNotConvert = sal_True; + bool bNotConvert = true; pNewField->SetType(m_pParent->convertType(_pSrcField->getSpecialTypeInfo(),bNotConvert)); if ( !m_pParent->supportsPrimaryKey() ) - pNewField->SetPrimaryKey(sal_False); + pNewField->SetPrimaryKey(false); _pListbox->SetEntryData(_pListbox->InsertEntry(sConvertedName),pNewField); _rRightColumns.push_back(sConvertedName); @@ -389,7 +389,7 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft, void OWizColumnSelect::enableButtons() { - sal_Bool bEntries = m_lbNewColumnNames.GetEntryCount() != 0; + bool bEntries = m_lbNewColumnNames.GetEntryCount() != 0; if(!bEntries) m_pParent->m_mNameMapping.clear(); diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 4f67b8610165..f6fee11f30b9 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -518,12 +518,12 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultN ,m_xInteractionHandler(_xInteractionHandler) ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES)) ,m_nPageCount(0) - ,m_bDeleteSourceColumns(sal_True) + ,m_bDeleteSourceColumns(true) ,m_bInterConnectionCopy( _xSourceConnection != _xConnection ) ,m_sName( _rDefaultName ) ,m_nOperation( _nOperation ) ,m_ePressed( WIZARD_NONE ) - ,m_bCreatePrimaryKeyColumn(sal_False) + ,m_bCreatePrimaryKeyColumn(false) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::OCopyTableWizard" ); construct(); @@ -616,12 +616,12 @@ OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultNa ,m_xContext(_rxContext) ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES)) ,m_nPageCount(0) - ,m_bDeleteSourceColumns(sal_False) + ,m_bDeleteSourceColumns(false) ,m_bInterConnectionCopy( false ) ,m_sName(_rDefaultName) ,m_nOperation( _nOperation ) ,m_ePressed( WIZARD_NONE ) - ,m_bCreatePrimaryKeyColumn(sal_False) + ,m_bCreatePrimaryKeyColumn(false) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::OCopyTableWizard" ); construct(); @@ -681,7 +681,7 @@ void OCopyTableWizard::construct() m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';'); - m_bAddPKFirstTime = sal_True; + m_bAddPKFirstTime = true; } OCopyTableWizard::~OCopyTableWizard() @@ -742,10 +742,10 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplNextHdl) return 0; } -sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) +bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::CheckColumns" ); - sal_Bool bRet = sal_True; + bool bRet = true; m_vColumnPos.clear(); m_vColumnTypes.clear(); @@ -753,9 +753,9 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) // If database is able to process PrimaryKeys, set PrimaryKey if ( m_xDestConnection.is() ) { - sal_Bool bPKeyAllowed = supportsPrimaryKey(); + bool bPKeyAllowed = supportsPrimaryKey(); - sal_Bool bContainsColumns = !m_vDestColumns.empty(); + bool bContainsColumns = !m_vDestColumns.empty(); if ( bPKeyAllowed && shouldCreatePrimaryKey() ) { @@ -767,9 +767,9 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) { OFieldDescription* pField = new OFieldDescription(); pField->SetName(m_aKeyName); - pField->FillFromTypeInfo(pTypeInfo,sal_True,sal_True); - pField->SetPrimaryKey(sal_True); - m_bAddPKFirstTime = sal_False; + pField->FillFromTypeInfo(pTypeInfo,true,true); + pField->SetPrimaryKey(true); + m_bAddPKFirstTime = false; insertColumn(0,pField); } m_vColumnPos.push_back(ODatabaseExport::TPositions::value_type(1,1)); @@ -814,7 +814,7 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) TOTypeInfoSP pType = convertType((*aSrcIter)->second->getSpecialTypeInfo(),bRet); pField->SetType(pType); if ( !bPKeyAllowed ) - pField->SetPrimaryKey(sal_False); + pField->SetPrimaryKey(false); // now create a column insertColumn(m_vDestColumns.size(),pField); @@ -829,7 +829,7 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) { m_ePressed = WIZARD_FINISH; - sal_Bool bFinish = DeactivatePage() != 0; + bool bFinish = DeactivatePage() != 0; if(bFinish) { @@ -839,7 +839,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) case CopyTableOperation::CopyDefinitionAndData: case CopyTableOperation::CopyDefinitionOnly: { - sal_Bool bOnFirstPage = GetCurLevel() == 0; + bool bOnFirstPage = GetCurLevel() == 0; if ( bOnFirstPage ) { // we came from the first page so we have to clear @@ -848,7 +848,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) m_mNameMapping.clear(); } sal_Int32 nBreakPos = 0; - sal_Bool bCheckOk = CheckColumns(nBreakPos); + bool bCheckOk = CheckColumns(nBreakPos); if ( bOnFirstPage && !bCheckOk ) { showColumnTypeNotSupported(m_vSourceVec[nBreakPos-1]->first); @@ -885,7 +885,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) if ( xYes->wasSelected() ) { OCopyTable* pPage = static_cast<OCopyTable*>(GetPage(0)); - m_bCreatePrimaryKeyColumn = sal_True; + m_bCreatePrimaryKeyColumn = true; m_aKeyName = pPage->GetKeyName(); if ( m_aKeyName.isEmpty() ) m_aKeyName = "ID"; @@ -914,10 +914,10 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) EndDialog(RET_OK); } - return bFinish; + return bFinish ? 1 : 0; } -sal_Bool OCopyTableWizard::shouldCreatePrimaryKey() const +bool OCopyTableWizard::shouldCreatePrimaryKey() const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::shouldCreatePrimaryKey" ); return m_bCreatePrimaryKeyColumn; @@ -941,7 +941,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplActivateHdl) OWizardPage* pCurrent = (OWizardPage*)GetPage(GetCurLevel()); if(pCurrent) { - sal_Bool bFirstTime = pCurrent->IsFirstTime(); + bool bFirstTime = pCurrent->IsFirstTime(); if(bFirstTime) pCurrent->Reset(); @@ -978,7 +978,7 @@ void OCopyTableWizard::CheckButtons() } } -void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable) +void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle, bool bEnable) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::EnableButton" ); Button* pButton; @@ -1076,16 +1076,16 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, sal_Int32 nType = pActFieldDescr->GetType(); sal_Int32 nScale = pActFieldDescr->GetScale(); sal_Int32 nPrecision = pActFieldDescr->GetPrecision(); - sal_Bool bAutoIncrement = pActFieldDescr->IsAutoIncrement(); + bool bAutoIncrement = pActFieldDescr->IsAutoIncrement(); OUString sTypeName = pActFieldDescr->GetTypeName(); // search for type - sal_Bool bForce; + bool bForce; TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,sCreateParam,nPrecision,nScale,bAutoIncrement,bForce); if ( !pTypeInfo.get() ) pTypeInfo = m_pTypeInfo; - pActFieldDescr->FillFromTypeInfo(pTypeInfo,sal_True,sal_False); + pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false); _rColVector.push_back(_rColumns.insert(ODatabaseExport::TColumns::value_type(pActFieldDescr->GetName(),pActFieldDescr)).first); } @@ -1099,7 +1099,7 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, ODatabaseExport::TColumns::iterator keyPos = _rColumns.find( *pKeyColName ); if ( keyPos != _rColumns.end() ) { - keyPos->second->SetPrimaryKey( sal_True ); + keyPos->second->SetPrimaryKey( true ); keyPos->second->SetIsNullable( ColumnValue::NO_NULLS ); } } @@ -1109,11 +1109,11 @@ void OCopyTableWizard::clearDestColumns() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::clearDestColumns" ); clearColumns(m_vDestColumns,m_aDestVec); - m_bAddPKFirstTime = sal_True; + m_bAddPKFirstTime = true; m_mNameMapping.clear(); } -void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, sal_Bool _bKeyColumns) const +void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, bool _bKeyColumns) const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::appendColumns" ); // now append the columns @@ -1184,7 +1184,7 @@ void OCopyTableWizard::appendKey( Reference<XKeysSupplier>& _rxSup, const ODatab Reference<XColumnsSupplier> xColSup(xKey,UNO_QUERY); if(xColSup.is()) { - appendColumns(xColSup,_pVec,sal_True); + appendColumns(xColSup,_pVec,true); Reference<XNameAccess> xColumns = xColSup->getColumns(); if(xColumns.is() && xColumns->getElementNames().getLength()) xAppend->appendByDescriptor(xKey); @@ -1450,23 +1450,23 @@ void OCopyTableWizard::removeColumnNameFromNameMap(const OUString& _sName) m_mNameMapping.erase(_sName); } -sal_Bool OCopyTableWizard::supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType) +bool OCopyTableWizard::supportsType(sal_Int32 _nDataType, sal_Int32& _rNewDataType) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::supportsType" ); - sal_Bool bRet = m_aDestTypeInfo.find(_nDataType) != m_aDestTypeInfo.end(); + bool bRet = m_aDestTypeInfo.find(_nDataType) != m_aDestTypeInfo.end(); if ( bRet ) _rNewDataType = _nDataType; return bRet; } -TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool& _bNotConvert) +TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType, bool& _bNotConvert) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::convertType" ); if ( !m_bInterConnectionCopy ) // no need to convert if the source and destination connection are the same return _pType; - sal_Bool bForce; + bool bForce; TOTypeInfoSP pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,_pType->nType,_pType->aTypeName,_pType->aCreateParams,_pType->nPrecision,_pType->nMaximumScale,_pType->bAutoIncrement,bForce); if ( !pType.get() || bForce ) { // no type found so we have to find the correct one ourself @@ -1546,14 +1546,14 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool& pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,nDefaultType,_pType->aTypeName,_pType->aCreateParams,_pType->nPrecision,_pType->nMaximumScale,_pType->bAutoIncrement,bForce); if ( !pType.get() ) { - _bNotConvert = sal_False; + _bNotConvert = false; OUString sCreate("x"); - pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,DataType::VARCHAR,_pType->aTypeName,sCreate,50,0,sal_False,bForce); + pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,DataType::VARCHAR,_pType->aTypeName,sCreate,50,0,false,bForce); if ( !pType.get() ) pType = m_pTypeInfo; } else if ( bForce ) - _bNotConvert = sal_False; + _bNotConvert = false; } return pType; } diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx index e2951567a2a6..9f6839b1e819 100644 --- a/dbaccess/source/ui/misc/WExtendPages.cxx +++ b/dbaccess/source/ui/misc/WExtendPages.cxx @@ -50,7 +50,7 @@ SvParser* OWizRTFExtend::createReader(sal_Int32 _nRows) OWizNormalExtend::OWizNormalExtend(Window* pParent) : OWizTypeSelect( pParent ) { - EnableAuto(sal_False); + EnableAuto(false); Size aflSize( m_flColumns.GetSizePixel() ); Point aPos(m_flColumns.GetPosPixel()); diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index dbc3479741e8..088a850bf173 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -85,7 +85,7 @@ void OWizNameMatching::Reset() m_CTRL_RIGHT.SetIndent(m_CTRL_LEFT.GetIndent()); m_CTRL_RIGHT.SetSpaceBetweenEntries(m_CTRL_LEFT.GetSpaceBetweenEntries()); - m_bFirstTime = sal_False; + m_bFirstTime = false; } } @@ -113,11 +113,11 @@ void OWizNameMatching::ActivatePage( ) m_ibColumn_up_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 ); m_ibColumn_down_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 ); - m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_False); + m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,false); m_CTRL_LEFT.GrabFocus(); } -sal_Bool OWizNameMatching::LeavePage() +bool OWizNameMatching::LeavePage() { const ODatabaseExport::TColumnVector* pSrcColumns = m_pParent->getSrcVector(); @@ -155,7 +155,7 @@ sal_Bool OWizNameMatching::LeavePage() OSL_ENSURE((nPos) < static_cast<sal_Int32>(m_pParent->m_vColumnPos.size()),"m_pParent->m_vColumnPos: Illegal index for vector"); m_pParent->m_vColumnPos[nPos].first = ++nParamPos; m_pParent->m_vColumnPos[nPos].second = ::std::distance(pDestColumns->begin(),aDestIter) + 1; - sal_Bool bNotConvert = sal_True; + bool bNotConvert = true; TOTypeInfoSP pTypeInfo; @@ -178,7 +178,7 @@ sal_Bool OWizNameMatching::LeavePage() pRightEntry = m_CTRL_RIGHT.GetModel()->Next(pRightEntry); } - return sal_True; + return true; } OUString OWizNameMatching::GetTitle() const { return ModuleRes(STR_WIZ_NAME_MATCHING_TITEL); } @@ -246,7 +246,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) if(pOldEntry && nPos != m_CTRL_RIGHT.GetModel()->GetAbsPos(pOldEntry)) { if(pOldEntry) - m_CTRL_RIGHT.Select(pOldEntry,sal_False); + m_CTRL_RIGHT.Select(pOldEntry,false); pOldEntry = m_CTRL_RIGHT.GetEntry(nPos); if(pOldEntry) { @@ -254,7 +254,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) if ( nNewPos - nPos == 1 ) --nNewPos; m_CTRL_RIGHT.MakeVisible(m_CTRL_RIGHT.GetEntry(nNewPos), true); - m_CTRL_RIGHT.Select(pOldEntry,sal_True); + m_CTRL_RIGHT.Select(pOldEntry,true); } } else if(!pOldEntry) @@ -262,7 +262,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) pOldEntry = m_CTRL_RIGHT.GetEntry(nPos); if(pOldEntry) { - m_CTRL_RIGHT.Select(pOldEntry,sal_True); + m_CTRL_RIGHT.Select(pOldEntry,true); } } } @@ -280,7 +280,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ if(pOldEntry && nPos != m_CTRL_LEFT.GetModel()->GetAbsPos(pOldEntry)) { if(pOldEntry) - m_CTRL_LEFT.Select(pOldEntry,sal_False); + m_CTRL_LEFT.Select(pOldEntry,false); pOldEntry = m_CTRL_LEFT.GetEntry(nPos); if(pOldEntry) { @@ -288,7 +288,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ if ( nNewPos - nPos == 1 ) nNewPos--; m_CTRL_LEFT.MakeVisible(m_CTRL_LEFT.GetEntry(nNewPos), true); - m_CTRL_LEFT.Select(pOldEntry,sal_True); + m_CTRL_LEFT.Select(pOldEntry,true); } } else if(!pOldEntry) @@ -296,7 +296,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ pOldEntry = m_CTRL_LEFT.GetEntry(nPos); if(pOldEntry) { - m_CTRL_LEFT.Select(pOldEntry,sal_True); + m_CTRL_LEFT.Select(pOldEntry,true); } } } @@ -306,7 +306,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ IMPL_LINK( OWizNameMatching, AllNoneClickHdl, Button *, pButton ) { - sal_Bool bAll = pButton == &m_pbAll; + bool bAll = pButton == &m_pbAll; SvTreeListEntry* pEntry = m_CTRL_LEFT.First(); while(pEntry) { @@ -320,9 +320,9 @@ IMPL_LINK( OWizNameMatching, AllNoneClickHdl, Button *, pButton ) // class OColumnString class OColumnString : public SvLBoxString { - sal_Bool m_bReadOnly; + bool m_bReadOnly; public: - OColumnString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr, sal_Bool _RO) + OColumnString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr, bool _RO) :SvLBoxString(pEntry,nFlags,rStr) ,m_bReadOnly(_RO) { @@ -355,12 +355,12 @@ OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId ) void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind) { DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind); - SvLBoxString* pString = new OColumnString(pEntry, 0, rStr,sal_False); + SvLBoxString* pString = new OColumnString(pEntry, 0, rStr,false); if (pString) pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 ); } -sal_Bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, sal_Bool bSelect ) +bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, bool bSelect ) { if(bSelect) { diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index d9ff1f375420..6c3180dc641d 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -109,11 +109,11 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) { OCopyTableWizard* pWiz = static_cast<OCopyTableWizard*>(GetParentDialog()); // first we have to check if this name already exists - sal_Bool bDoubleName = sal_False; - sal_Bool bCase = sal_True; + bool bDoubleName = false; + bool bCase = true; if ( getMetaData().is() && !getMetaData()->supportsMixedCaseQuotedIdentifiers() ) { - bCase = sal_False; + bCase = false; sal_uInt16 nCount = aListBox.GetEntryCount(); for (sal_uInt16 i=0 ; !bDoubleName && i < nCount ; ++i) { @@ -136,13 +136,13 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) pWiz->showError(strMessage); pCurFieldDescr->SetName(sName); DisplayData(pCurFieldDescr); - static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(sal_True); + static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(true); return; } OUString sOldName = pCurFieldDescr->GetName(); pCurFieldDescr->SetName(sNewName); - static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(sal_False); + static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(false); // now we change the name OCopyTableWizard::TNameMapping::iterator aIter = pWiz->m_mNameMapping.begin(); @@ -199,7 +199,7 @@ const OTypeInfoMap* OWizTypeSelectControl::getTypeInfo() const return ((OWizTypeSelect*)GetParent())->m_pParent->m_xDestConnection; } -sal_Bool OWizTypeSelectControl::isAutoIncrementValueEnabled() const +bool OWizTypeSelectControl::isAutoIncrementValueEnabled() const { return ((OWizTypeSelect*)GetParent())->m_bAutoIncrementEnabled; } @@ -221,8 +221,8 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream ) ,m_pbAuto( this, ModuleRes( PB_AUTO ) ) ,m_pParserStream( _pStream ) ,m_nDisplayRow(0) - ,m_bAutoIncrementEnabled(sal_False) - ,m_bDuplicateName(sal_False) + ,m_bAutoIncrementEnabled(false) + ,m_bDuplicateName(false) { m_lbColumnNames.SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl)); @@ -297,12 +297,12 @@ void OWizTypeSelect::Reset() nPos = m_lbColumnNames.InsertEntry((*aIter)->first); m_lbColumnNames.SetEntryData(nPos,(*aIter)->second); } - m_bFirstTime = sal_False; + m_bFirstTime = false; } void OWizTypeSelect::ActivatePage( ) { - sal_Bool bOldFirstTime = m_bFirstTime; + bool bOldFirstTime = m_bFirstTime; Reset(); m_bFirstTime = bOldFirstTime; @@ -311,11 +311,11 @@ void OWizTypeSelect::ActivatePage( ) m_lbColumnNames.GetSelectHdl().Call(&m_lbColumnNames); } -sal_Bool OWizTypeSelect::LeavePage() +bool OWizTypeSelect::LeavePage() { OUString aColumnName( m_lbColumnNames.GetSelectEntry() ); - sal_Bool bDuplicateName = sal_False; + bool bDuplicateName = false; OFieldDescription* pField = static_cast<OFieldDescription*>(m_lbColumnNames.GetEntryData(m_lbColumnNames.GetEntryPos(aColumnName))); if ( pField ) { @@ -325,7 +325,7 @@ sal_Bool OWizTypeSelect::LeavePage() return !bDuplicateName; } -void OWizTypeSelect::EnableAuto(sal_Bool bEnable) +void OWizTypeSelect::EnableAuto(bool bEnable) { m_ftAuto.Show(bEnable); m_etAuto.Show(bEnable); @@ -344,7 +344,7 @@ IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ ) return 0; } -sal_Bool OWizTypeSelectList::IsPrimaryKeyAllowed() const +bool OWizTypeSelectList::IsPrimaryKeyAllowed() const { sal_uInt16 nCount = GetSelectEntryCount(); sal_uInt16 j; @@ -358,7 +358,7 @@ sal_Bool OWizTypeSelectList::IsPrimaryKeyAllowed() const return j == nCount; } -void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr,sal_uInt16 _nPos,sal_Bool _bSet) +void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr, sal_uInt16 _nPos, bool _bSet) { OUString sColumnName = GetEntry(_nPos); RemoveEntry(_nPos); diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx index cbc4ded1a0c8..8150e76a7201 100644 --- a/dbaccess/source/ui/misc/databaseobjectview.cxx +++ b/dbaccess/source/ui/misc/databaseobjectview.cxx @@ -266,7 +266,7 @@ namespace dbaui // ResultSetBrowser ResultSetBrowser::ResultSetBrowser( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame, - sal_Bool _bTable ) + bool _bTable ) :DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast < OUString >( URL_COMPONENT_DATASOURCEBROWSER ) ) ,m_bTable(_bTable) { diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx index 3733fb9e8bf9..9b072e4d7225 100644 --- a/dbaccess/source/ui/misc/datasourceconnector.cxx +++ b/dbaccess/source/ui/misc/datasourceconnector.cxx @@ -102,7 +102,7 @@ namespace dbaui // get user/password OUString sPassword, sUser; - sal_Bool bPwdRequired = sal_False; + bool bPwdRequired = false; Reference<XPropertySet> xProp(_xDataSource,UNO_QUERY); try { diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx index 8fdb36efee65..a1c9b0cb9fac 100644 --- a/dbaccess/source/ui/misc/indexcollection.cxx +++ b/dbaccess/source/ui/misc/indexcollection.cxx @@ -190,7 +190,7 @@ namespace dbaui } } - sal_Bool OIndexCollection::dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) + bool OIndexCollection::dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) { try { @@ -200,7 +200,7 @@ namespace dbaui if (!xDropIndex.is()) { OSL_FAIL("OIndexCollection::drop: no XDrop interface!"); - return sal_False; + return false; } xDropIndex->dropByName(_rPos->getOriginalName()); @@ -212,7 +212,7 @@ namespace dbaui catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - return sal_False; + return false; } // adjust the OIndex structure @@ -220,21 +220,21 @@ namespace dbaui OSL_ENSURE(aDropped != m_aIndexes.end(), "OIndexCollection::drop: invalid original name, but successful commit?!"); aDropped->flagAsNew(GrantIndexAccess()); - return sal_True; + return true; } - sal_Bool OIndexCollection::drop(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) + bool OIndexCollection::drop(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) { OSL_ENSURE((_rPos >= m_aIndexes.begin()) && (_rPos < m_aIndexes.end()), "OIndexCollection::drop: invalid position (fasten your seatbelt .... this will crash)!"); if (!_rPos->isNew()) if (!dropNoRemove(_rPos)) - return sal_False; + return false; // adjust the index array m_aIndexes.erase(_rPos); - return sal_True; + return true; } void OIndexCollection::implFillIndexInfo(OIndex& _rIndex) SAL_THROW((Exception)) diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx index bff738c6d4f7..3595b6d069a8 100644 --- a/dbaccess/source/ui/misc/uiservices.cxx +++ b/dbaccess/source/ui/misc/uiservices.cxx @@ -29,7 +29,7 @@ using namespace ::com::sun::star::registry; extern "C" void SAL_CALL createRegistryInfo_DBU() { - static sal_Bool bInit = sal_False; + static bool bInit = false; if (!bInit) { createRegistryInfo_OTableFilterDialog(); @@ -57,7 +57,7 @@ extern "C" void SAL_CALL createRegistryInfo_DBU() createRegistryInfo_CopyTableWizard(); createRegistryInfo_OTextConnectionSettingsDialog(); createRegistryInfo_LimitBoxController(); - bInit = sal_True; + bInit = true; } } diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index ec66d0411c23..53dad9a3d102 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -204,14 +204,14 @@ void calcPointX2(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrP _rNewConPos.X() -= DESCRIPT_LINE_WIDTH; } -sal_Bool OConnectionLine::RecalcLine() +bool OConnectionLine::RecalcLine() { // Windows and entries must be set const OTableWindow* pSourceWin = m_pTabConn->GetSourceWin(); const OTableWindow* pDestWin = m_pTabConn->GetDestWin(); if( !pSourceWin || !pDestWin ) - return sal_False; + return false; SvTreeListEntry* pSourceEntry = pSourceWin->GetListBox()->GetEntryFromText( GetData()->GetSourceFieldName() ); SvTreeListEntry* pDestEntry = pDestWin->GetListBox()->GetEntryFromText( GetData()->GetDestFieldName() ); @@ -251,7 +251,7 @@ sal_Bool OConnectionLine::RecalcLine() // determine aDestConnPosY calcPointsYValue(pDestWin,pDestEntry,m_aDestConnPos,m_aDestDescrLinePos); - return sal_True; + return true; } void OConnectionLine::Draw( OutputDevice* pOutDev ) @@ -286,7 +286,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev ) pOutDev->DrawRect( calcRect( m_aDestDescrLinePos,aVector) ); } -sal_Bool OConnectionLine::IsValid() const +bool OConnectionLine::IsValid() const { return m_pData.is(); } diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index 68ee428806de..5506c7fc0fd4 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -106,7 +106,7 @@ namespace dbaui return this; } // XAccessibleComponent - sal_Bool SAL_CALL OConnectionLineAccess::contains( const awt::Point& _aPoint ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::contains( const awt::Point& _aPoint ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); Point aPoint(_aPoint.X,_aPoint.Y); @@ -140,18 +140,18 @@ namespace dbaui Size aSize(m_pLine ? m_pLine->GetBoundingRect().GetSize() : Size()); return awt::Size(aSize.Width(),aSize.Height()); } - sal_Bool SAL_CALL OConnectionLineAccess::isShowing( ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::isShowing( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pLine ? m_pLine->GetParent()->GetWindowRegionPixel().IsInside(m_pLine->GetBoundingRect()) : sal_False; } - sal_Bool SAL_CALL OConnectionLineAccess::isVisible( ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::isVisible( ) throw (RuntimeException) { - return sal_True; + return true; } - sal_Bool SAL_CALL OConnectionLineAccess::isFocusTraversable( ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::isFocusTraversable( ) throw (RuntimeException) { - return sal_True; + return true; } // XAccessibleRelationSet sal_Int32 SAL_CALL OConnectionLineAccess::getRelationCount( ) throw (RuntimeException, std::exception) @@ -192,7 +192,7 @@ namespace dbaui // clear vector clearLineData(); } - sal_Bool OConnectionLineAccess::isEditable() const + bool OConnectionLineAccess::isEditable() const { return m_pLine ? !m_pLine->GetParent()->getDesignView()->getController().isReadOnly() : sal_False; diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx index d2adb80ed163..7d0b8adbc10d 100644 --- a/dbaccess/source/ui/querydesign/JAccess.cxx +++ b/dbaccess/source/ui/querydesign/JAccess.cxx @@ -83,7 +83,7 @@ namespace dbaui throw IndexOutOfBoundsException(); return aRet; } - sal_Bool OJoinDesignViewAccess::isEditable() const + bool OJoinDesignViewAccess::isEditable() const { return m_pTableView && !m_pTableView->getDesignView()->getController().isReadOnly(); } diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index d442baae4587..c80ad3fbd40e 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -124,7 +124,7 @@ bool AddTableDialogContext::allowAddition() const void AddTableDialogContext::addTableWindow( const OUString& _rQualifiedTableName, const OUString& _rAliasName ) { - getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, sal_True ); + getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, true ); } void AddTableDialogContext::onWindowClosing( const Window* _pWindow ) @@ -334,7 +334,7 @@ sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeExc ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; - sal_Bool bCheck = sal_True; + bool bCheck = true; if ( _bSuspend ) { bCheck = saveModified() != RET_CANCEL; @@ -371,7 +371,7 @@ void OJoinController::loadTableWindow( const ::comphelper::NamedValueCollection& sal_Int32 nX = -1, nY = -1, nHeight = -1, nWidth = -1; OUString sComposedName,sTableName,sWindowName; - sal_Bool bShowAll = false; + bool bShowAll = false; sComposedName = i_rTableWindowSettings.getOrDefault( "ComposedName", sComposedName ); sTableName = i_rTableWindowSettings.getOrDefault( "TableName", sTableName ); diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 4488c5346e8f..12b5dcdaa01a 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -31,7 +31,7 @@ namespace dbaui OUString OJoinExchObj::m_sJoinFormat; // class OJoinExchObj - OJoinExchObj::OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry) + OJoinExchObj::OJoinExchObj(const OJoinExchangeData& jxdSource,bool _bFirstEntry) :m_bFirstEntry(_bFirstEntry) ,m_jxdSourceDescription(jxdSource) ,m_pDragListener(NULL) @@ -56,7 +56,7 @@ namespace dbaui m_pDragListener = NULL; } - sal_Bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID) + bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID) { DataFlavorExVector::const_iterator aCheckEnd = _rFormats.end(); for ( DataFlavorExVector::const_iterator aCheck = _rFormats.begin(); @@ -65,9 +65,9 @@ namespace dbaui ) { if ( _nSlotID == aCheck->mnSotId ) - return sal_True; + return true; } - return sal_False; + return false; } OJoinExchangeData OJoinExchObj::GetSourceDescription(const Reference< XTransferable >& _rxObject) diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 66c6b0ef4662..c29d55a393d8 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -160,7 +160,7 @@ OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView ) ,m_pDragWin( NULL ) ,m_pSizingWin( NULL ) ,m_pSelectedConn( NULL ) - ,m_bTrackingInitiallyMoved(sal_False) + ,m_bTrackingInitiallyMoved(false) ,m_pLastFocusTabWin(NULL) ,m_pView( pView ) ,m_pAccessible(NULL) @@ -186,7 +186,7 @@ OJoinTableView::~OJoinTableView() IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar ) { // move all windows - ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), sal_False ); + ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), false ); return 0; } @@ -301,7 +301,7 @@ OTableWindowData* OJoinTableView::CreateImpl(const OUString& _rComposedName return new OTableWindowData( NULL,_rComposedName,_sTableName, _rWinName ); } -void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool /*bNewTable*/) +void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool /*bNewTable*/) { OSL_ENSURE(!_rComposedName.isEmpty(),"There must be a table name supplied!"); @@ -392,7 +392,7 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) namespace { - sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz) + bool isScrollAllowed( OJoinTableView* _pView,long nDelta, bool bHoriz) { // adjust ScrollBar-Positions ScrollBar* pBar = _pView->GetVScrollBar(); @@ -409,14 +409,14 @@ namespace if ( bHoriz ) { if( nNewThumbPos == _pView->GetScrollOffset().X() ) - return sal_False; + return false; } else if ( nNewThumbPos == _pView->GetScrollOffset().Y() ) - return sal_False; + return false; - return sal_True; + return true; } - sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) + bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) { _nScrollY = _nScrollX = 0; // data about the tab win @@ -428,9 +428,9 @@ namespace // data about ourself Size aSize = _pView->getRealOutputSize(); //GetOutputSizePixel(); - sal_Bool bVisbile = sal_True; - sal_Bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width()); - sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height()); + bool bVisbile = true; + bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width()); + bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height()); if (!bFitsHor || !bFitsVert) { if (!bFitsHor) @@ -455,10 +455,10 @@ namespace } if ( _nScrollX ) // aSize.Width() > _rSize.Width() && - bVisbile = isScrollAllowed(_pView,_nScrollX, sal_True); + bVisbile = isScrollAllowed(_pView,_nScrollX, true); if ( _nScrollY ) // aSize.Height() > _rSize.Height() && - bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, sal_False); + bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, false); if ( bVisbile ) { @@ -466,9 +466,9 @@ namespace sal_Int32 nVRangeMax = _pView->GetVScrollBar()->GetRangeMax(); if ( aSize.Width() + _pView->GetHScrollBar()->GetThumbPos() + _nScrollX > nHRangeMax ) - bVisbile = sal_False; + bVisbile = false; if ( bVisbile && aSize.Height() + _pView->GetVScrollBar()->GetThumbPos() + _nScrollY > nVRangeMax ) - bVisbile = sal_False; + bVisbile = false; } } @@ -476,7 +476,7 @@ namespace } } // end of ano namespace -sal_Bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) +bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) { long nX,nY; return getMovementImpl(this,_rPoint,_rSize,nX,nY); @@ -496,12 +496,12 @@ void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize) if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) ) { - sal_Bool bVisbile = sal_True; + bool bVisbile = true; if (nScrollX) - bVisbile = ScrollPane(nScrollX, sal_True, sal_True); + bVisbile = ScrollPane(nScrollX, true, true); if (nScrollY) - bVisbile = bVisbile && ScrollPane(nScrollY, sal_False, sal_True); + bVisbile = bVisbile && ScrollPane(nScrollY, false, true); } } @@ -514,7 +514,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) Size aOutSize = GetSizePixel(); Point aNewPos( 0,0 ); sal_uInt16 nRow = 0; - sal_Bool bEnd = sal_False; + bool bEnd = false; while( !bEnd ) { // Set new position to start of line @@ -550,7 +550,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) if( (aNewPos.X()+TABWIN_WIDTH_STD)<aRowRect.Right() ) { aNewPos.Y() = aRowRect.Top() + TABWIN_SPACING_Y; - bEnd = sal_True; + bEnd = true; } else { @@ -560,7 +560,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) sal_Int32 nCount = m_aTableMap.size() % (nRow+1); ++nCount; aNewPos.Y() = nCount * TABWIN_SPACING_Y + (nCount-1)*CalcZoom(TABWIN_HEIGHT_STD); - bEnd = sal_True; + bEnd = true; } else nRow++; @@ -613,7 +613,7 @@ void OJoinTableView::BeginChildMove( OTableWindow* pTabWin, const Point& rMouseP Point aMousePos = ScreenToOutputPixel( rMousePos ); m_aDragOffset = aMousePos - pTabWin->GetPosPixel(); m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST); - m_bTrackingInitiallyMoved = sal_False; + m_bTrackingInitiallyMoved = false; StartTracking(); } @@ -634,9 +634,9 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPo StartTracking(); } -sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars ) +bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars ) { - sal_Bool bRet = sal_True; + bool bRet = true; // adjust ScrollBar-Positions if( bPaintScrollBars ) @@ -648,12 +648,12 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai if( nNewThumbPos < 0 ) { nNewThumbPos = 0; - bRet = sal_False; + bRet = false; } if( nNewThumbPos > GetHScrollBar()->GetRange().Max() ) { nNewThumbPos = GetHScrollBar()->GetRange().Max(); - bRet = sal_False; + bRet = false; } GetHScrollBar()->SetThumbPos( nNewThumbPos ); nDelta = GetHScrollBar()->GetThumbPos() - nOldThumbPos; @@ -665,12 +665,12 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai if( nNewThumbPos < 0 ) { nNewThumbPos = 0; - bRet = sal_False; + bRet = false; } if( nNewThumbPos > GetVScrollBar()->GetRange().Max() ) { nNewThumbPos = GetVScrollBar()->GetRange().Max(); - bRet = sal_False; + bRet = false; } GetVScrollBar()->SetThumbPos( nNewThumbPos ); nDelta = GetVScrollBar()->GetThumbPos() - nOldThumbPos; @@ -680,7 +680,7 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai // If ScrollOffset hitting borders, no redrawing. if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) && (GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) ) - return sal_False; + return false; // set ScrollOffset anew if (bHoriz) @@ -841,8 +841,8 @@ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt ) void OJoinTableView::KeyInput( const KeyEvent& rEvt ) { sal_uInt16 nCode = rEvt.GetKeyCode().GetCode(); - sal_Bool bShift = rEvt.GetKeyCode().IsShift(); - sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1(); + bool bShift = rEvt.GetKeyCode().IsShift(); + bool bCtrl = rEvt.GetKeyCode().IsMod1(); if( !bCtrl && !bShift && (nCode==KEY_DELETE) ) { @@ -960,7 +960,7 @@ sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) cons ::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); } -sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const +bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const { return getTableConnections(pFrom) != m_vTableConnection.end(); } @@ -982,12 +982,12 @@ void OJoinTableView::ClearAll() m_pSelectedConn = NULL; // scroll to the upper left - ScrollPane(-GetScrollOffset().X(), sal_True, sal_True); - ScrollPane(-GetScrollOffset().Y(), sal_False, sal_True); + ScrollPane(-GetScrollOffset().X(), true, true); + ScrollPane(-GetScrollOffset().Y(), false, true); Invalidate(); } -sal_Bool OJoinTableView::ScrollWhileDragging() +bool OJoinTableView::ScrollWhileDragging() { OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging must not be called when a window is being dragged !"); @@ -1000,19 +1000,19 @@ sal_Bool OJoinTableView::ScrollWhileDragging() Point aLowerRight(aDragWinPos.X() + aDragWinSize.Width(), aDragWinPos.Y() + aDragWinSize.Height()); if (!m_bTrackingInitiallyMoved && (aDragWinPos == m_pDragWin->GetPosPixel())) - return sal_True; + return true; // avoid illustration errors (when scrolling with active TrackingRect) HideTracking(); - sal_Bool bScrolling = sal_False; - sal_Bool bNeedScrollTimer = sal_False; + bool bScrolling = false; + bool bNeedScrollTimer = false; // scroll at window borders // TODO : only catch, if window would disappear completely (don't, if there is still a pixel visible) if( aDragWinPos.X() < 5 ) { - bScrolling = ScrollPane( -LINE_SIZE, sal_True, sal_True ); + bScrolling = ScrollPane( -LINE_SIZE, true, true ); if( !bScrolling && (aDragWinPos.X()<0) ) aDragWinPos.X() = 0; @@ -1022,7 +1022,7 @@ sal_Bool OJoinTableView::ScrollWhileDragging() if( aLowerRight.X() > m_aOutputSize.Width() - 5 ) { - bScrolling = ScrollPane( LINE_SIZE, sal_True, sal_True ) ; + bScrolling = ScrollPane( LINE_SIZE, true, true ) ; if( !bScrolling && ( aLowerRight.X() > m_aOutputSize.Width() ) ) aDragWinPos.X() = m_aOutputSize.Width() - aDragWinSize.Width(); @@ -1032,7 +1032,7 @@ sal_Bool OJoinTableView::ScrollWhileDragging() if( aDragWinPos.Y() < 5 ) { - bScrolling = ScrollPane( -LINE_SIZE, sal_False, sal_True ); + bScrolling = ScrollPane( -LINE_SIZE, false, true ); if( !bScrolling && (aDragWinPos.Y()<0) ) aDragWinPos.Y() = 0; @@ -1041,7 +1041,7 @@ sal_Bool OJoinTableView::ScrollWhileDragging() if( aLowerRight.Y() > m_aOutputSize.Height() - 5 ) { - bScrolling = ScrollPane( LINE_SIZE, sal_False, sal_True ); + bScrolling = ScrollPane( LINE_SIZE, false, true ); if( !bScrolling && ( (aDragWinPos.Y() + aDragWinSize.Height()) > m_aOutputSize.Height() ) ) aDragWinPos.Y() = m_aOutputSize.Height() - aDragWinSize.Height(); @@ -1091,31 +1091,31 @@ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPositi invalidateAndModify(new OJoinSizeTabWinUndoAct(this, ptOldPosition, szOldSize, ptWhich)); } -sal_Bool OJoinTableView::IsAddAllowed() +bool OJoinTableView::IsAddAllowed() { // not, if Db readonly if (m_pView->getController().isReadOnly()) - return sal_False; + return false; try { Reference< XConnection> xConnection = m_pView->getController().getConnection(); if(!xConnection.is()) - return sal_False; + return false; // not, if too many tables already Reference < XDatabaseMetaData > xMetaData( xConnection->getMetaData() ); sal_Int32 nMax = xMetaData.is() ? xMetaData->getMaxTablesInSelect() : 0; if (nMax && nMax <= (sal_Int32)m_aTableMap.size()) - return sal_False; + return false; } catch(SQLException&) { - return sal_False; + return false; } - return sal_True; + return true; } void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConnection) @@ -1135,7 +1135,7 @@ void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConn void OJoinTableView::Command(const CommandEvent& rEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rEvt.GetCommand()) { @@ -1174,7 +1174,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt) } } } - bHandled = sal_True; + bHandled = true; } } if (!bHandled) @@ -1189,7 +1189,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn())) { - sal_Bool bFoundStart = _rpFirstAfter ? sal_False : sal_True; + bool bFoundStart = _rpFirstAfter ? sal_False : sal_True; ::std::vector<OTableConnection*>::const_iterator aIter = m_vTableConnection.begin(); ::std::vector<OTableConnection*>::const_iterator aEnd = m_vTableConnection.end(); @@ -1226,7 +1226,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab pConn = pData; if (pData == _rpFirstAfter) - bFoundStart = sal_True; + bFoundStart = true; } } } @@ -1235,7 +1235,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_COMMAND: @@ -1247,10 +1247,10 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) if (pData->GetMode() == COMMAND_WHEEL_SCROLL) { if (pData->GetDelta() > 0) - ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), sal_True); + ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), true); else - ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), sal_True); - bHandled = sal_True; + ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), true); + bHandled = true; } } } @@ -1271,7 +1271,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) if (!HasChildPathFocus()) break; - sal_Bool bForward = !pKeyEvent->GetKeyCode().IsShift(); + bool bForward = !pKeyEvent->GetKeyCode().IsShift(); // is there an active tab win ? OTableWindowMap::iterator aIter = m_aTableMap.begin(); OTableWindowMap::iterator aEnd = m_aTableMap.end(); @@ -1566,7 +1566,7 @@ void OJoinTableView::modified() rController.InvalidateFeature(SID_RELATION_ADD_RELATION); } -void OJoinTableView::addConnection(OTableConnection* _pConnection,sal_Bool _bAddData) +void OJoinTableView::addConnection(OTableConnection* _pConnection,bool _bAddData) { if ( _bAddData ) { diff --git a/dbaccess/source/ui/querydesign/QTableConnection.cxx b/dbaccess/source/ui/querydesign/QTableConnection.cxx index 0663bb683c1c..2789e7bc11aa 100644 --- a/dbaccess/source/ui/querydesign/QTableConnection.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnection.cxx @@ -26,13 +26,13 @@ using namespace dbaui; OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, const TTableConnectionData::value_type& pTabConnData) : OTableConnection(pContainer, pTabConnData) - , m_bVisited(sal_False) + , m_bVisited(false) { } OQueryTableConnection::OQueryTableConnection(const OQueryTableConnection& rConn) : OTableConnection( rConn ) - , m_bVisited(sal_False) + , m_bVisited(false) { // no own members, so base class functionality is sufficient } @@ -51,7 +51,7 @@ OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnect return *this; } -sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare) +bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare) { OSL_ENSURE(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : one of the two participants has no data!"); diff --git a/dbaccess/source/ui/querydesign/QTableConnection.hxx b/dbaccess/source/ui/querydesign/QTableConnection.hxx index 7c411bf74899..414b805346e3 100644 --- a/dbaccess/source/ui/querydesign/QTableConnection.hxx +++ b/dbaccess/source/ui/querydesign/QTableConnection.hxx @@ -28,19 +28,19 @@ namespace dbaui class OQueryTableView; class OQueryTableConnection : public OTableConnection { - sal_Bool m_bVisited; // is true if the conn was already visited through the join algorithm + bool m_bVisited; // is true if the conn was already visited through the join algorithm public: OQueryTableConnection(OQueryTableView* pContainer, const TTableConnectionData::value_type& pTabConnData); OQueryTableConnection(const OQueryTableConnection& rConn); virtual ~OQueryTableConnection(); OQueryTableConnection& operator=(const OQueryTableConnection& rConn); - sal_Bool operator==(const OQueryTableConnection& rCompare); + bool operator==(const OQueryTableConnection& rCompare); inline OUString GetAliasName(EConnectionSide nWhich) const { return static_cast<OQueryTableConnectionData*>(GetData().get())->GetAliasName(nWhich); } - inline sal_Bool IsVisited() const { return m_bVisited; } - inline void SetVisited(sal_Bool bVisited) { m_bVisited = bVisited; } + inline bool IsVisited() const { return m_bVisited; } + inline void SetVisited(bool bVisited) { m_bVisited = bVisited; } }; } diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx index 5167d8a7a38e..b10952367c30 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx @@ -129,9 +129,9 @@ OTableConnectionData* OQueryTableConnectionData::NewInstance() const return new OQueryTableConnectionData(); } -sal_Bool OQueryTableConnectionData::Update() +bool OQueryTableConnectionData::Update() { - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx index 82db653f4e16..c511649bf2f4 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx @@ -57,7 +57,7 @@ namespace dbaui @return true if successful */ - virtual sal_Bool Update() SAL_OVERRIDE; + virtual bool Update() SAL_OVERRIDE; OUString GetAliasName(EConnectionSide nWhich) const; diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index eec944ee77c3..0c0037a79b2d 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -70,9 +70,9 @@ OQueryTableWindow::~OQueryTableWindow() { } -sal_Bool OQueryTableWindow::Init() +bool OQueryTableWindow::Init() { - sal_Bool bSuccess = OTableWindow::Init(); + bool bSuccess = OTableWindow::Init(); if(!bSuccess) return bSuccess; @@ -89,7 +89,7 @@ sal_Bool OQueryTableWindow::Init() else if ( GetTable().is() ) GetTable()->getPropertyValue( PROPERTY_NAME ) >>= sAliasName; else - return sal_False; + return false; // Alias with successive number if (pContainer->CountTableAlias(sAliasName, m_nAliasNum)) @@ -164,12 +164,12 @@ void OQueryTableWindow::OnEntryDoubleClicked(SvTreeListEntry* pEntry) static_cast<OQueryTableView*>(getTableView())->InsertField(aInfo); } -sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo) +bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo) { OSL_ENSURE(m_pListBox != NULL, "OQueryTableWindow::ExistsField : doesn't have ::com::sun::star::form::ListBox !"); OSL_ENSURE(rInfo.is(),"OQueryTableWindow::ExistsField: invalid argument for OTableFieldDescRef!"); Reference< XConnection> xConnection = getTableView()->getDesignView()->getController().getConnection(); - sal_Bool bExists = sal_False; + bool bExists = false; if(xConnection.is()) { SvTreeListEntry* pEntry = m_pListBox->First(); @@ -191,7 +191,7 @@ sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFiel rInfo->SetAlias(GetAliasName()); rInfo->SetFieldIndex(m_pListBox->GetModel()->GetAbsPos(pEntry)); rInfo->SetDataType(pInf->GetDataType()); - bExists = sal_True; + bExists = true; break; } pEntry = m_pListBox->Next(pEntry); @@ -205,7 +205,7 @@ sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFiel return bExists; } -sal_Bool OQueryTableWindow::ExistsAVisitedConn() const +bool OQueryTableWindow::ExistsAVisitedConn() const { return static_cast<const OQueryTableView*>(getTableView())->ExistsAVisitedConn(this); } diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx index 5b33fcf0f3bd..e1b2d4b38cbd 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.hxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx @@ -44,12 +44,12 @@ namespace dbaui } // late Constructor, the base class CREATES Listbox on first call - virtual sal_Bool Init() SAL_OVERRIDE; + virtual bool Init() SAL_OVERRIDE; - inline sal_Int32 GetAliasNum() const { return m_nAliasNum; } + inline sal_Int32 GetAliasNum() const { return m_nAliasNum; } - sal_Bool ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo); - sal_Bool ExistsAVisitedConn() const; + bool ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo); + bool ExistsAVisitedConn() const; virtual OUString GetName() const SAL_OVERRIDE { return GetWinName(); } diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index c31239990d9c..1bfb73cddd1a 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -74,7 +74,7 @@ namespace static const OUString C_OR(" OR "); // forward declarations - sal_Bool InsertJoin( const OQueryDesignView* _pView, + bool InsertJoin( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pNode); SqlParseError InstallFields(OQueryDesignView* _pView, @@ -98,10 +98,10 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving, + bool bHaving, bool _bAddOrOnOneLine); - OUString quoteTableAlias(sal_Bool _bQuote, const OUString& _sAliasName, const OUString& _sQuote) + OUString quoteTableAlias(bool _bQuote, const OUString& _sAliasName, const OUString& _sQuote) { OUString sRet; if ( _bQuote && !_sAliasName.isEmpty() ) @@ -211,7 +211,7 @@ namespace { SqlParseError eErrorCode = eOk; sal_uInt32 nCount = pTableRefList->count(); - sal_Bool bError = sal_False; + bool bError = false; for (sal_uInt32 i=0; !bError && i < nCount; ++i) { const ::connectivity::OSQLParseNode* pParseNode = pTableRefList->getChild(i); @@ -226,7 +226,7 @@ namespace if ( pJoinNode ) { if ( !InsertJoin(_pView,pJoinNode) ) - bError = sal_True; + bError = true; } } // check if error occurred @@ -244,7 +244,7 @@ namespace { SqlParseError eErrorCode = eOk; - sal_Bool bErg = sal_False; + bool bErg = false; OUString aTableRange,aColumnName; sal_uInt16 nCntAccount; @@ -302,10 +302,10 @@ namespace OConnectionLineDataRef pLineData = *aIter; if(!aCondition.isEmpty()) aCondition.append(C_AND); - aCondition.append(quoteTableAlias(sal_True,pData->GetAliasName(JTCS_FROM),aQuote)); + aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_FROM),aQuote)); aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_FROM) )); aCondition.append(sEqual); - aCondition.append(quoteTableAlias(sal_True,pData->GetAliasName(JTCS_TO),aQuote)); + aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_TO),aQuote)); aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_TO) )); } } @@ -333,16 +333,16 @@ namespace OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pEntryConn->GetData().get()); if ( pData->GetJoinType() != INNER_JOIN && _pEntryTabTo->ExistsAVisitedConn() ) { - sal_Bool bBrace = sal_False; + bool bBrace = false; if(_rJoin.endsWith(")")) { - bBrace = sal_True; + bBrace = true; _rJoin = _rJoin.replaceAt(_rJoin.getLength()-1,1,OUString(' ')); } (_rJoin += C_AND) += BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData); if(bBrace) _rJoin += ")"; - _pEntryConn->SetVisited(sal_True); + _pEntryConn->SetVisited(true); } } OUString BuildTable( const Reference< XConnection>& _xConnection, @@ -505,7 +505,7 @@ namespace aJoin = BuildJoin(_xConnection,pEntryTabTo,aJoin,pEntryConnData); } - pEntryConn->SetVisited(sal_True); + pEntryConn->SetVisited(true); // first search for the "to" window const ::std::vector<OTableConnection*>* pConnections = pEntryConn->GetParent()->getTableConnections(); @@ -599,14 +599,14 @@ namespace eErrorCode = eIllegalJoin; return eErrorCode; } - sal_Bool GetInnerJoinCriteria( const OQueryDesignView* _pView, + bool GetInnerJoinCriteria( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pCondition) { return InsertJoinConnection(_pView,pCondition, INNER_JOIN,NULL,NULL) != eOk; } OUString GenerateSelectList( const OQueryDesignView* _pView, OTableFields& _rFieldList, - sal_Bool bAlias) + bool bAlias) { Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection(); if ( !xConnection.is() ) @@ -614,7 +614,7 @@ namespace OUStringBuffer aTmpStr,aFieldListStr; - sal_Bool bAsterisk = sal_False; + bool bAsterisk = false; int nVis = 0; OTableFields::iterator aIter = _rFieldList.begin(); OTableFields::iterator aEnd = _rFieldList.end(); @@ -624,12 +624,12 @@ namespace if ( pEntryField->IsVisible() ) { if ( pEntryField->GetField().toChar() == '*' ) - bAsterisk = sal_True; + bAsterisk = true; ++nVis; } } if(nVis == 1) - bAsterisk = sal_False; + bAsterisk = false; try { @@ -662,7 +662,7 @@ namespace OTableFieldDescRef aInfo = new OTableFieldDesc(); OJoinTableView::OTableWindowMap::iterator tableIter = pTabList->begin(); OJoinTableView::OTableWindowMap::iterator tableEnd = pTabList->end(); - sal_Bool bFound = sal_False; + bool bFound = false; for(;!bFound && tableIter != tableEnd ;++tableIter) { OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(tableIter->second); @@ -713,14 +713,14 @@ namespace } return aFieldListStr.makeStringAndClear(); } - sal_Bool GenerateCriterias( OQueryDesignView* _pView, + bool GenerateCriterias( OQueryDesignView* _pView, OUStringBuffer& rRetStr, OUStringBuffer& rHavingStr, OTableFields& _rFieldList, - sal_Bool bMulti ) + bool bMulti ) { // * must not contain a filter : have I already shown the correct warning ? - sal_Bool bCritsOnAsterikWarning = sal_False; // ** TMFS ** + bool bCritsOnAsterikWarning = false; // ** TMFS ** OUString aFieldName,aCriteria,aWhereStr,aHavingStr,aWork/*,aOrderStr*/; // print line by line joined with AND @@ -733,7 +733,7 @@ namespace } Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection(); if(!xConnection.is()) - return sal_False; + return false; try { const Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); @@ -760,7 +760,7 @@ namespace // only show the messagebox the first time if (!bCritsOnAsterikWarning) ErrorBox(_pView, ModuleRes( ERR_QRY_CRITERIA_ON_ASTERISK)).Execute(); - bCritsOnAsterikWarning = sal_True; + bCritsOnAsterikWarning = true; continue; } aWork = quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote); @@ -880,11 +880,11 @@ namespace { OSL_FAIL("Failure while building where clause!"); } - return sal_True; + return true; } SqlParseError GenerateOrder( OQueryDesignView* _pView, OTableFields& _rFieldList, - sal_Bool bMulti, + bool bMulti, OUString& _rsRet) { const OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); @@ -902,7 +902,7 @@ namespace Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); OUString aQuote = xMetaData->getIdentifierQuoteString(); // * must not containa filter - have I already shown the warning? - sal_Bool bCritsOnAsterikWarning = sal_False; // ** TMFS ** + bool bCritsOnAsterikWarning = false; // ** TMFS ** OTableFields::iterator aIter = _rFieldList.begin(); OTableFields::iterator aEnd = _rFieldList.end(); for(;aIter != aEnd;++aIter) @@ -919,7 +919,7 @@ namespace // only show the MessageBox the first time if (!bCritsOnAsterikWarning) ErrorBox(_pView, ModuleRes( ERR_QRY_ORDERBY_ON_ASTERISK)).Execute(); - bCritsOnAsterikWarning = sal_True; + bCritsOnAsterikWarning = true; continue; } @@ -1032,7 +1032,7 @@ namespace ::std::map<OTableWindow*,sal_Int32> aConnectionCount; for(;aIter != aEnd;++aIter) { - static_cast<OQueryTableConnection*>(*aIter)->SetVisited(sal_False); + static_cast<OQueryTableConnection*>(*aIter)->SetVisited(false); ++aConnectionCount[(*aIter)->GetSourceWin()]; ++aConnectionCount[(*aIter)->GetDestWin()]; } @@ -1044,7 +1044,7 @@ namespace aMulti.insert(::std::multimap<sal_Int32 , OTableWindow*>::value_type(aCountIter->second,aCountIter->first)); } - const sal_Bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE ); + const bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE ); ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aRIter = aMulti.rbegin(); ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aREnd = aMulti.rend(); for(;aRIter != aREnd;++aRIter) @@ -1130,7 +1130,7 @@ namespace aTableListStr = aTableListStr.replaceAt(aTableListStr.getLength()-1,1, OUString() ); return aTableListStr; } - OUString GenerateGroupBy(const OQueryDesignView* _pView,OTableFields& _rFieldList, sal_Bool bMulti ) + OUString GenerateGroupBy(const OQueryDesignView* _pView,OTableFields& _rFieldList, bool bMulti ) { OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); const Reference< XConnection> xConnection = rController.getConnection(); @@ -1205,7 +1205,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel , - sal_Bool bHaving = sal_False, + bool bHaving = false, bool bAddOrOnOneLine = false); SqlParseError GetSelectionCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, @@ -1254,19 +1254,19 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine); SqlParseError ComparisonPredicate(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine); SqlParseError GetORCriteria(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel , - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine) { SqlParseError eErrorCode = eOk; @@ -1325,7 +1325,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine) { const ::com::sun::star::lang::Locale aLocale = _pView->getLocale(); @@ -1398,7 +1398,7 @@ namespace if ( eOk == ( eErrorCode = FillDragInfo(_pView,pValueExp,aDragLeft) )) { if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, aCondition, nLevel,bAddOrOnOneLine); } } @@ -1440,7 +1440,7 @@ namespace if ( eOk == ( eErrorCode = FillDragInfo(_pView,pCondition->getChild(0),aDragLeft)) ) { if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, sCondition, nLevel,bAddOrOnOneLine); } } @@ -1464,7 +1464,7 @@ namespace aDragLeft->SetFunctionType(FKT_OTHER); if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, sCondition, nLevel,bAddOrOnOneLine); } } @@ -1477,7 +1477,7 @@ namespace aDragLeft->SetField(aCondition); aDragLeft->SetFunctionType(FKT_CONDITION); - eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns; + eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,false,true).is() ? eOk : eTooManyColumns; } else //! TODO not supported yet eErrorCode = eStatementTooComplex; @@ -1488,7 +1488,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine) { SqlParseError eErrorCode = eOk; @@ -1559,7 +1559,7 @@ namespace } aDragLeft->SetFunctionType(nFunctionType); if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); sal_Int32 nIndex = 0; aDragLeft->SetFunction(aColumnName.getToken(0,'(',nIndex)); } @@ -1568,7 +1568,7 @@ namespace // for an unknown function we write the whole text in the field aDragLeft->SetField(aColumnName); if(bHaving) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); aDragLeft->SetFunctionType(FKT_OTHER|FKT_NUMERIC); } _pSelectionBrw->AddCondition(aDragLeft, aCondition, nLevel,bAddOrOnOneLine); @@ -1580,7 +1580,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving + bool bHaving ,bool bAddOrOnOneLine) { SqlParseError eErrorCode = eOk; @@ -1691,7 +1691,7 @@ namespace if( eOk == ( eErrorCode = FillDragInfo(_pView,pCondition->getChild(nPos),aDragLeft))) { if(bHaving) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, aCondition, nLevel,bAddOrOnOneLine); } } @@ -1766,7 +1766,7 @@ namespace ::connectivity::OSQLParseTreeIterator& rParseIter = static_cast<OQueryController&>(_pView->getController()).getParseIterator(); rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange ); - sal_Bool bFound(sal_False); + bool bFound(false); OSL_ENSURE(!aColumnName.isEmpty(),"Column name must not be empty"); if (aTableRange.isEmpty()) { @@ -1784,7 +1784,7 @@ namespace { if(aColumnName.toChar() != '*') _raInfo->SetFieldAlias(aColumnAlias); - bFound = sal_True; + bFound = true; } } if (!bFound) @@ -1796,11 +1796,11 @@ namespace _raInfo->SetFunctionType(FKT_OTHER); } } - sal_Bool checkJoinConditions( const OQueryDesignView* _pView, + bool checkJoinConditions( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode* _pNode ) { const ::connectivity::OSQLParseNode* pJoinNode = NULL; - sal_Bool bRet = sal_True; + bool bRet = true; if (SQL_ISRULE(_pNode,qualified_join)) pJoinNode = _pNode; else if (SQL_ISRULE(_pNode,table_ref) @@ -1809,13 +1809,13 @@ namespace && SQL_ISPUNCTUATION(_pNode->getChild(2),")") ) // '(' joined_table ')' pJoinNode = _pNode->getChild(1); else if (! ( SQL_ISRULE(_pNode, table_ref) && _pNode->count() == 2) ) // table_node table_primary_as_range_column - bRet = sal_False; + bRet = false; if (pJoinNode && !InsertJoin(_pView,pJoinNode)) - bRet = sal_False; + bRet = false; return bRet; } - sal_Bool InsertJoin(const OQueryDesignView* _pView, + bool InsertJoin(const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pNode) { OSL_ENSURE( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ), @@ -1830,7 +1830,7 @@ namespace pRightTableRef = pNode->getChild(4); // table_ref if ( !checkJoinConditions(_pView,pNode->getChild(0)) || !checkJoinConditions(_pView,pRightTableRef)) - return sal_False; + return false; // named column join may be implemented later // SQL_ISRULE(pNode->getChild(4),named_columns_join) @@ -1864,7 +1864,7 @@ namespace if ( SQL_ISRULE(pNode->getChild(4),join_condition) ) { if ( InsertJoinConnection(_pView,pNode->getChild(4)->getChild(1), eJoinType,pNode->getChild(0),pRightTableRef) != eOk ) - return sal_False; + return false; } } else if ( SQL_ISRULE(pNode, cross_union) ) @@ -1873,7 +1873,7 @@ namespace pRightTableRef = pNode->getChild(pNode->count() - 1); } else - return sal_False; + return false; if ( eJoinType == CROSS_JOIN || bNatural ) { @@ -1882,7 +1882,7 @@ namespace OQueryTableWindow* pRightWindow = static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( getTableRange(_pView,pRightTableRef) ); OSL_ENSURE(pLeftWindow && pRightWindow,"Table Windows could not be found!"); if ( !pLeftWindow || !pRightWindow ) - return sal_False; + return false; OTableFieldDescRef aDragLeft = new OTableFieldDesc(); aDragLeft->SetTabWindow(pLeftWindow); @@ -1897,7 +1897,7 @@ namespace insertConnection(_pView,eJoinType,aDragLeft,aDragRight,bNatural); } - return sal_True; + return true; } void insertUnUsedFields(OQueryDesignView* _pView,OSelectionBrowseBox* _pSelectionBrw) { @@ -1906,7 +1906,7 @@ namespace OTableFields& rUnUsedFields = rController.getUnUsedFields(); OTableFields::iterator aEnd = rUnUsedFields.end(); for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != aEnd;++aIter) - if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is()) + if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,false,false).is()) (*aIter) = NULL; OTableFields().swap( rUnUsedFields ); } @@ -2010,7 +2010,7 @@ namespace OQueryTableWindow* pExistentWin = pTableView->FindTable( sAlias ); if ( !pExistentWin ) { - pTableView->AddTabWin( sComposedName, sAlias, sal_False ); // don't create data here + pTableView->AddTabWin( sComposedName, sAlias, false ); // don't create data here } else { @@ -2037,12 +2037,12 @@ namespace // check if we have a distinct statement if(SQL_ISTOKEN(pParseTree->getChild(1),DISTINCT)) { - rController.setDistinct(sal_True); + rController.setDistinct(true); rController.InvalidateFeature(SID_QUERY_DISTINCT_VALUES); } else { - rController.setDistinct(sal_False); + rController.setDistinct(false); } ///check if query has a limit @@ -2095,7 +2095,7 @@ namespace OJoinTableView::OTableWindowMap* _pTabList) { SqlParseError eErrorCode = eOk; - sal_Bool bFirstField = sal_True; + bool bFirstField = true; OUString sAsterisk("*"); OJoinTableView::OTableWindowMap::iterator aIter = _pTabList->begin(); OJoinTableView::OTableWindowMap::iterator aEnd = _pTabList->end(); @@ -2105,8 +2105,8 @@ namespace OTableFieldDescRef aInfo = new OTableFieldDesc(); if (pTabWin->ExistsField( sAsterisk, aInfo )) { - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } } return eErrorCode; @@ -2119,7 +2119,7 @@ namespace return eNoSelectStatement; ::connectivity::OSQLParseNode* pParseTree = pNode->getChild(2); // selection - sal_Bool bFirstField = sal_True; // When initializing, the first field must be reactivated + bool bFirstField = true; // When initializing, the first field must be reactivated SqlParseError eErrorCode = eOk; @@ -2163,8 +2163,8 @@ namespace if (SQL_ISRULE(pColumnRef,column_ref)) { InsertColumnRef(_pView,pColumnRef,aColumnName,aColumnAlias,aTableRange,aInfo,pTabList); - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } else if(SQL_ISRULEOR3(pColumnRef, general_set_fct, set_fct_spec, position_exp) || SQL_ISRULEOR3(pColumnRef, extract_exp, fold, char_substring_fct) || @@ -2243,8 +2243,8 @@ namespace else aInfo->SetFunctionType(nFunctionType|FKT_OTHER); - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } else { @@ -2272,8 +2272,8 @@ namespace aInfo->SetFieldAlias(aColumnAlias); aInfo->SetFunctionType(FKT_NUMERIC | FKT_OTHER); - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } break; @@ -2353,7 +2353,7 @@ namespace _pView->fillFunctionInfo(pArgument,sCondition,aDragLeft); aDragLeft->SetFunctionType(FKT_OTHER); aDragLeft->SetOrderDir(eOrderDir); - aDragLeft->SetVisible(sal_False); + aDragLeft->SetVisible(false); _pSelectionBrw->AddOrder( aDragLeft, eOrderDir, i ); } else @@ -2372,7 +2372,7 @@ namespace { SqlParseError eErrorCode = eOk; if (!pSelectRoot->getChild(3)->getChild(3)->isLeaf()) - eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSelectRoot->getChild(3)->getChild(3)->getChild(1),rLevel, sal_True); + eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSelectRoot->getChild(3)->getChild(3)->getChild(1),rLevel, true); return eErrorCode; } SqlParseError GetGroupCriteria( OQueryDesignView* _pView, @@ -2394,7 +2394,7 @@ namespace { if ( eOk == (eErrorCode = FillDragInfo(_pView,pArgument,aDragInfo)) ) { - aDragInfo->SetGroupBy(sal_True); + aDragInfo->SetGroupBy(true); _pSelectionBrw->AddGroupBy(aDragInfo,i); } } @@ -2402,7 +2402,7 @@ namespace SQL_ISRULE(pParamRef = pArgument->getChild(pArgument->count()-2),column_ref) && eOk == FillDragInfo(_pView,pParamRef,aDragInfo)) { - aDragInfo->SetGroupBy(sal_True); + aDragInfo->SetGroupBy(true); _pSelectionBrw->AddGroupBy( aDragInfo, i ); } else if( SQL_ISRULE(pArgument, set_fct_spec ) ) @@ -2418,8 +2418,8 @@ namespace true); // quote is to true because we need quoted elements inside the function _pView->fillFunctionInfo(pArgument,sGroupByExpression,aDragInfo); aDragInfo->SetFunctionType(FKT_OTHER); - aDragInfo->SetGroupBy(sal_True); - aDragInfo->SetVisible(sal_False); + aDragInfo->SetGroupBy(true); + aDragInfo->SetVisible(false); _pSelectionBrw->AddGroupBy( aDragInfo, i ); } else @@ -2489,7 +2489,7 @@ OQueryDesignView::OQueryDesignView( OQueryContainerWindow* _pParent, :OQueryView( _pParent, _rController, _rxContext ) ,m_aSplitter( this ) ,m_eChildFocus(NONE) - ,m_bInSplitHandler( sal_False ) + ,m_bInSplitHandler( false ) { try @@ -2525,12 +2525,12 @@ IMPL_LINK( OQueryDesignView, SplitHdl, void*, /*p*/ ) { if (!getController().isReadOnly()) { - m_bInSplitHandler = sal_True; + m_bInSplitHandler = true; m_aSplitter.SetPosPixel( Point( m_aSplitter.GetPosPixel().X(),m_aSplitter.GetSplitPosPixel() ) ); static_cast<OQueryController&>(getController()).setSplitPos(m_aSplitter.GetSplitPosPixel()); static_cast<OQueryController&>(getController()).setModified( sal_True ); Resize(); - m_bInSplitHandler = sal_True; + m_bInSplitHandler = true; } return 0L; } @@ -2645,25 +2645,25 @@ void OQueryDesignView::copy() m_pSelectionBox->copy(); } -sal_Bool OQueryDesignView::isCutAllowed() +bool OQueryDesignView::isCutAllowed() { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if ( SELECTION == m_eChildFocus ) bAllowed = m_pSelectionBox->isCutAllowed(); return bAllowed; } -sal_Bool OQueryDesignView::isPasteAllowed() +bool OQueryDesignView::isPasteAllowed() { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if ( SELECTION == m_eChildFocus ) bAllowed = m_pSelectionBox->isPasteAllowed(); return bAllowed; } -sal_Bool OQueryDesignView::isCopyAllowed() +bool OQueryDesignView::isCopyAllowed() { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if ( SELECTION == m_eChildFocus ) bAllowed = m_pSelectionBox->isCopyAllowed(); return bAllowed; @@ -2714,7 +2714,7 @@ bool OQueryDesignView::HasFieldByAliasName(const OUString& rFieldName, OTableFie return m_pSelectionBox->HasFieldByAliasName( rFieldName, rInfo); } -SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate) +SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, bool bVis, bool bActivate) { return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns; } @@ -2733,7 +2733,7 @@ void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFi OSL_ENSURE(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !"); pFieldList->Clear(); - sal_Bool bAllTables = sAliasName.isEmpty(); + bool bAllTables = sAliasName.isEmpty(); OJoinTableView::OTableWindowMap* pTabWins = m_pTableView->GetTabWinMap(); OUString strCurrentPrefix; @@ -2791,9 +2791,9 @@ bool OQueryDesignView::PreNotify(NotifyEvent& rNEvt) } // check if the statement is correct when not returning false -sal_Bool OQueryDesignView::checkStatement() +bool OQueryDesignView::checkStatement() { - sal_Bool bRet = sal_True; + bool bRet = true; if ( m_pSelectionBox ) bRet = m_pSelectionBox->Save(); // an error occurred so we return no return bRet; @@ -2885,7 +2885,7 @@ OUString OQueryDesignView::getStatement() Reference<XDatabaseMetaData> xMeta; if ( xConnection.is() ) xMeta = xConnection->getMetaData(); - sal_Bool bUseAlias = nTabcount > 1; + bool bUseAlias = nTabcount > 1; if ( xMeta.is() ) bUseAlias = bUseAlias || !xMeta->supportsGroupByUnrelated(); @@ -2942,7 +2942,7 @@ OUString OQueryDesignView::getStatement() return sSQL; } -void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) +void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable) { sal_uInt16 nRow; switch (_nSlotId) @@ -2965,7 +2965,7 @@ void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) m_pSelectionBox->Invalidate(); } -sal_Bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId) +bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId) { sal_uInt16 nRow; switch (_nSlotId) @@ -3125,7 +3125,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& { ::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() ); pField->Load( *field, true ); - InsertField( pField, sal_True, sal_False ); + InsertField( pField, true, false ); } rController.ClearUndoManager(); diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx index 8e0a95e70d26..16f8e0e4b7cd 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx @@ -39,7 +39,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID) :OQueryDesignUndoAction(pOwner, nCommentID) ,m_pConnection(NULL) - ,m_bOwnerOfConn(sal_False) + ,m_bOwnerOfConn(false) { } @@ -51,13 +51,13 @@ OQueryAddTabConnUndoAction::OQueryAddTabConnUndoAction(OQueryTableView* pOwner) void OQueryAddTabConnUndoAction::Undo() { static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection); - SetOwnership(sal_True); + SetOwnership(true); } void OQueryAddTabConnUndoAction::Redo() { static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection); - SetOwnership(sal_False); + SetOwnership(false); } OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) @@ -68,13 +68,13 @@ OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) void OQueryDelTabConnUndoAction::Undo() { static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection); - SetOwnership(sal_False); + SetOwnership(false); } void OQueryDelTabConnUndoAction::Redo() { static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection); - SetOwnership(sal_True); + SetOwnership(true); } OQueryTabWinShowUndoAct::OQueryTabWinShowUndoAct(OQueryTableView* pOwner) @@ -89,13 +89,13 @@ OQueryTabWinShowUndoAct::~OQueryTabWinShowUndoAct() void OQueryTabWinShowUndoAct::Undo() { static_cast<OQueryTableView*>(m_pOwner)->HideTabWin(m_pTabWin, this); - SetOwnership(sal_True); + SetOwnership(true); } void OQueryTabWinShowUndoAct::Redo() { - static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,sal_True); - SetOwnership(sal_False); + static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,true); + SetOwnership(false); } OQueryTabWinDelUndoAct::OQueryTabWinDelUndoAct(OQueryTableView* pOwner) @@ -109,14 +109,14 @@ OQueryTabWinDelUndoAct::~OQueryTabWinDelUndoAct() void OQueryTabWinDelUndoAct::Undo() { - static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,sal_True ); - SetOwnership(sal_False); + static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,true ); + SetOwnership(false); } void OQueryTabWinDelUndoAct::Redo() { static_cast<OQueryTableView*>(m_pOwner)->HideTabWin( m_pTabWin, this ); - SetOwnership(sal_True); + SetOwnership(true); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx index aef48bd3ceb5..72b31532213d 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx @@ -29,7 +29,7 @@ namespace dbaui { protected: OQueryTableConnection* m_pConnection; - sal_Bool m_bOwnerOfConn; + bool m_bOwnerOfConn; // am I the only owner of the connection? (changes with every redo and undo) public: @@ -41,7 +41,7 @@ namespace dbaui void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; } // now SetOwnership please - void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } + void SetOwnership(bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } }; } #endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYTABCONNUNDOACTION_HXX diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx index 8dfdbc7f63c9..f7bee57ce37a 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx @@ -42,7 +42,7 @@ OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct() OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID) : OQueryDesignUndoAction(pOwner, nCommentID) , m_pTabWin(NULL) - , m_bOwnerOfObjects(sal_False) + , m_bOwnerOfObjects(false) { } @@ -108,7 +108,7 @@ void OTabFieldMovedUndoAct::Undo() sal_uInt16 nId = pDescr->GetColumnId(); sal_uInt16 nOldPos = pOwner->GetColumnPos(nId); pOwner->SetColumnPos(nId,m_nColumnPostion); - pOwner->ColumnMoved(nId,sal_False); + pOwner->ColumnMoved(nId,false); m_nColumnPostion = nOldPos; } pOwner->LeaveUndoMode(); diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx index 449c575db4da..33df8ffb49c2 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx @@ -35,14 +35,14 @@ namespace dbaui protected: ::std::vector<OTableConnection*> m_vTableConnection; OQueryTableWindow* m_pTabWin; - sal_Bool m_bOwnerOfObjects; + bool m_bOwnerOfObjects; // am I the only owner of the managed objects? (changes with every redo or undo) public: OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID); virtual ~OQueryTabWinUndoAct(); - void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; } + void SetOwnership(bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; } virtual void Undo() SAL_OVERRIDE = 0; virtual void Redo() SAL_OVERRIDE = 0; diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 2cd7e56116bd..798937674198 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -60,9 +60,9 @@ using namespace ::com::sun::star::accessibility; namespace { - sal_Bool isColumnInKeyType(const Reference<XIndexAccess>& _rxKeys,const OUString& _rColumnName,sal_Int32 _nKeyType) + bool isColumnInKeyType(const Reference<XIndexAccess>& _rxKeys,const OUString& _rColumnName,sal_Int32 _nKeyType) { - sal_Bool bReturn = sal_False; + bool bReturn = false; if(_rxKeys.is()) { Reference<XColumnsSupplier> xColumnsSupplier; @@ -83,7 +83,7 @@ namespace Reference<XNameAccess> xColumns = xColumnsSupplier->getColumns(); if(xColumns.is() && xColumns->hasByName(_rColumnName)) { - bReturn = sal_True; + bReturn = true; break; } } @@ -102,7 +102,7 @@ namespace void addUndoAction( OQueryTableView* _pView, OQueryTabConnUndoAction* _pUndoAction, OQueryTableConnection* _pConnection, - sal_Bool _bOwner = sal_False) + bool _bOwner = false) { _pUndoAction->SetOwnership(_bOwner); _pUndoAction->SetConnection(_pConnection); @@ -114,12 +114,12 @@ namespace @return true when OK was pressed otherwise false */ - sal_Bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,sal_Bool _bSelectableTables) + bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,bool _bSelectableTables) { OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get()); DlgQryJoin aDlg(_pView,_pConnectionData,_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables); - sal_Bool bOk = aDlg.Execute() == RET_OK; + bool bOk = aDlg.Execute() == RET_OK; if( bOk ) { pData->SetJoinType(aDlg.GetJoinType()); @@ -135,7 +135,7 @@ namespace */ void connectionModified(OQueryTableView* _pView, OTableConnection* _pConnection, - sal_Bool _bAddUndo) + bool _bAddUndo) { OSL_ENSURE(_pConnection,"Invalid connection!"); _pConnection->UpdateLineList(); @@ -211,7 +211,7 @@ namespace OQueryTableConnection aNewConn(_pView, aNewConnData); // refering to the local variable is not important, as NotifyQueryTabConn creates a new copy // to add me (if not existent) - _pView->NotifyTabConnection(aNewConn, sal_False); + _pView->NotifyTabConnection(aNewConn, false); // don't create an Undo-Action for the new connection : the connection is // covered by the Undo-Action for the tabwin, as the "Undo the insert" will // automatically remove all connections adjacent to the win. @@ -298,7 +298,7 @@ void OQueryTableView::ReSync() // do both tables for the connection exist ? OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetWinName(); - sal_Bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); + bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); strTabExistenceTest = pTabConnData->getReferencedTable()->GetWinName(); bInvalid = bInvalid && ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); @@ -327,7 +327,7 @@ OTableWindow* OQueryTableView::createWindow(const TTableWindowData::value_type& return new OQueryTableWindow(this,_pData); } -void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction) +void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, bool _bCreateUndoAction) { // let's first check if I have the connection already OQueryTableConnection* pTabConn = NULL; @@ -373,7 +373,7 @@ OTableWindowData* OQueryTableView::CreateImpl(const OUString& _rComposedName return new OQueryTableWindowData( _rComposedName, _sTableName,_rWinName ); } -void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rAliasName, sal_Bool bNewTable) +void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rAliasName, bool bNewTable) { // this method has been inherited from the base class, linking back to the parent and which constructs // an Alias and which passes on to my other AddTabWin @@ -436,14 +436,14 @@ Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKey return Reference<XPropertySet>(); } -void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& _rTableName, const OUString& strAlias, sal_Bool bNewTable) +void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& _rTableName, const OUString& strAlias, bool bNewTable) { OSL_ENSURE(!_rTableName.isEmpty() || !strAlias.isEmpty(), "OQueryTableView::AddTabWin : no tables or aliases !"); // If the table is not set, then it is a dummy window, but at least the alias must be set // build a new data structure // first check if this already has its data - sal_Bool bAppend = bNewTable; + bool bAppend = bNewTable; TTableWindowData::value_type pNewTabWinData; TTableWindowData* pWindowData = getDesignView()->getController().getTableWindowData(); TTableWindowData::iterator aWinIter = pWindowData->begin(); @@ -467,12 +467,12 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& // New UndoAction OQueryTabWinShowUndoAct* pUndoAction = new OQueryTabWinShowUndoAct(this); pUndoAction->SetTabWin(pNewTabWin); // Window - sal_Bool bSuccess = ShowTabWin(pNewTabWin, pUndoAction,bAppend); + bool bSuccess = ShowTabWin(pNewTabWin, pUndoAction,bAppend); if(!bSuccess) { // reset table window pUndoAction->SetTabWin(NULL); - pUndoAction->SetOwnership(sal_False); + pUndoAction->SetOwnership(false); delete pUndoAction; return; @@ -641,15 +641,15 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ pConn->GetData()->AppendConnLine( aSourceFieldName,aDestFieldName ); - connectionModified(this,pConn,sal_False); + connectionModified(this,pConn,false); } } void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) { - if( openJoinDialog(this,pConnection->GetData(),sal_False) ) + if( openJoinDialog(this,pConnection->GetData(),false) ) { - connectionModified(this,pConnection,sal_False); + connectionModified(this,pConnection,false); SelectConn( pConnection ); } } @@ -657,18 +657,18 @@ void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) void OQueryTableView::createNewConnection() { TTableConnectionData::value_type pData(new OQueryTableConnectionData()); - if( openJoinDialog(this,pData,sal_True) ) + if( openJoinDialog(this,pData,true) ) { OTableWindowMap* pMap = GetTabWinMap(); OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencingTable()->GetWinName()]); OQueryTableWindow* pDestWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencedTable()->GetWinName()]); // first we have to look if the this connection already exists OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true); - sal_Bool bNew = sal_True; + bool bNew = true; if ( pConn ) { pConn->GetData()->CopyFrom( *pData ); - bNew = sal_False; + bNew = false; } else { @@ -693,7 +693,7 @@ bool OQueryTableView::RemoveConnection( OTableConnection* _pConnection,sal_Bool addUndoAction( this, new OQueryDelTabConnUndoAction(this), static_cast< OQueryTableConnection*>(_pConnection), - sal_True); + true); return bRet; } @@ -712,7 +712,7 @@ OQueryTableWindow* OQueryTableView::FindTable(const OUString& rAliasName) return NULL; } -sal_Bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) +bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) { rCnt = 0; OTableWindowMap::const_iterator aIter = GetTabWinMap()->begin(); @@ -870,7 +870,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc m_pView->getController().InvalidateFeature(ID_BROWSER_ADDTABLE); // inform the UndoAction that the window and connections belong to it - pUndoAction->SetOwnership(sal_True); + pUndoAction->SetOwnership(true); // by doing so, we have modified the document m_pView->getController().setModified( sal_True ); @@ -878,10 +878,10 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc } } -sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend ) +bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction, bool _bAppend ) { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if (pTabWin) { @@ -929,9 +929,9 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn m_pView->getController().InvalidateFeature(ID_BROWSER_ADDTABLE); // and inform the UndoAction that the window belongs to me - pUndoAction->SetOwnership(sal_False); + pUndoAction->SetOwnership(false); - bSuccess = sal_True; + bSuccess = true; } else { @@ -957,7 +957,7 @@ void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo) static_cast<OQueryDesignView*>(getDesignView())->InsertField(rInfo); } -sal_Bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const +bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const { const ::std::vector<OTableConnection*>* pList = getTableConnections(); if (pList) diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx index d550877e8e6e..b0d8364c986e 100644 --- a/dbaccess/source/ui/querydesign/QueryTextView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx @@ -69,9 +69,9 @@ void OQueryTextView::Resize() } // check if the statement is correct when not returning false -sal_Bool OQueryTextView::checkStatement() +bool OQueryTextView::checkStatement() { - return sal_True; + return true; } OUString OQueryTextView::getStatement() @@ -105,19 +105,19 @@ void OQueryTextView::copy() m_pEdit->Copy(); } -sal_Bool OQueryTextView::isCutAllowed() +bool OQueryTextView::isCutAllowed() { return !m_pEdit->GetSelected().isEmpty(); } -sal_Bool OQueryTextView::isPasteAllowed() +bool OQueryTextView::isPasteAllowed() { - return sal_True; + return true; } -sal_Bool OQueryTextView::isCopyAllowed() +bool OQueryTextView::isCopyAllowed() { - return sal_True; + return true; } void OQueryTextView::cut() diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index fe4dc3f88fa0..ae0adfa4697a 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext) -: m_bAddTableDialogWasVisible(sal_False) +: m_bAddTableDialogWasVisible(false) { m_pTextView = new OQueryTextView(_pParent); @@ -74,7 +74,7 @@ void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetSize( Size( 0, 0 ) ); } -sal_Bool OQueryViewSwitch::checkStatement() +bool OQueryViewSwitch::checkStatement() { if(m_pTextView->IsVisible()) return m_pTextView->checkStatement(); @@ -88,7 +88,7 @@ OUString OQueryViewSwitch::getStatement() return m_pDesignView->getStatement(); } -void OQueryViewSwitch::setReadOnly(sal_Bool _bReadOnly) +void OQueryViewSwitch::setReadOnly(bool _bReadOnly) { if(m_pTextView->IsVisible()) m_pTextView->setReadOnly(_bReadOnly); @@ -128,21 +128,21 @@ void OQueryViewSwitch::copy() m_pDesignView->copy(); } -sal_Bool OQueryViewSwitch::isCutAllowed() +bool OQueryViewSwitch::isCutAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isCutAllowed(); return m_pDesignView->isCutAllowed(); } -sal_Bool OQueryViewSwitch::isCopyAllowed() +bool OQueryViewSwitch::isCopyAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isCopyAllowed(); return m_pDesignView->isCopyAllowed(); } -sal_Bool OQueryViewSwitch::isPasteAllowed() +bool OQueryViewSwitch::isPasteAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isPasteAllowed(); @@ -192,7 +192,7 @@ void OQueryViewSwitch::impl_forceSQLView() void OQueryViewSwitch::forceInitialView() { OQueryController& rQueryController( static_cast< OQueryController& >( m_pDesignView->getController() ) ); - const sal_Bool bGraphicalDesign = rQueryController.isGraphicalDesign(); + const bool bGraphicalDesign = rQueryController.isGraphicalDesign(); if ( !bGraphicalDesign ) impl_forceSQLView(); else @@ -217,8 +217,8 @@ void OQueryViewSwitch::forceInitialView() bool OQueryViewSwitch::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { - sal_Bool bRet = sal_True; - sal_Bool bGraphicalDesign = static_cast<OQueryController&>(m_pDesignView->getController()).isGraphicalDesign(); + bool bRet = true; + bool bGraphicalDesign = static_cast<OQueryController&>(m_pDesignView->getController()).isGraphicalDesign(); if ( !bGraphicalDesign ) { @@ -275,12 +275,12 @@ OAddTableDlg* OQueryViewSwitch::getAddTableDialog() return m_pDesignView->getController().getAddTableDialog(); } -sal_Bool OQueryViewSwitch::isSlotEnabled(sal_Int32 _nSlotId) +bool OQueryViewSwitch::isSlotEnabled(sal_Int32 _nSlotId) { return m_pDesignView->isSlotEnabled(_nSlotId); } -void OQueryViewSwitch::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) +void OQueryViewSwitch::setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable) { m_pDesignView->setSlotEnabled(_nSlotId,_bEnable); } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 225e32e696a5..26a156dc2fe3 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -64,9 +64,9 @@ using namespace ::com::sun::star::accessibility; namespace { - sal_Bool isFieldNameAsterisk(const OUString& _sFieldName ) + bool isFieldNameAsterisk(const OUString& _sFieldName ) { - sal_Bool bAsterisk = !(!_sFieldName.isEmpty() && _sFieldName.toChar() != '*'); + bool bAsterisk = !(!_sFieldName.isEmpty() && _sFieldName.toChar() != '*'); if ( !bAsterisk ) { OUString sName = _sFieldName; @@ -74,14 +74,14 @@ namespace if ( (nTokenCount == 2 && sName.getToken(1,'.')[0] == '*' ) || (nTokenCount == 3 && sName.getToken(2,'.')[0] == '*' ) ) { - bAsterisk = sal_True; + bAsterisk = true; } } return bAsterisk; } - sal_Bool lcl_SupportsCoreSQLGrammar(const Reference< XConnection>& _xConnection) + bool lcl_SupportsCoreSQLGrammar(const Reference< XConnection>& _xConnection) { - sal_Bool bSupportsCoreGrammar = sal_False; + bool bSupportsCoreGrammar = false; if ( _xConnection.is() ) { try @@ -105,12 +105,12 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) ,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS)) ,m_nVisibleCount(0) ,m_nLastSortColumn(SORT_COLUMN_NONE) - ,m_bOrderByUnRelated(sal_True) - ,m_bGroupByUnRelated(sal_True) - ,m_bStopTimer(sal_False) - ,m_bWasEditing(sal_False) - ,m_bDisableErrorBox(sal_False) - ,m_bInUndoMode(sal_False) + ,m_bOrderByUnRelated(true) + ,m_bGroupByUnRelated(true) + ,m_bStopTimer(false) + ,m_bWasEditing(false) + ,m_bDisableErrorBox(false) + ,m_bInUndoMode(false) { SetHelpId(HID_CTL_QRYDGNCRIT); @@ -282,7 +282,7 @@ BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* /*pParent*/) return new OSelectionBrwBoxHeader(this); } -void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo ) +void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId, bool _bCreateUndo ) { EditBrowseBox::ColumnMoved( nColId ); // swap the two columns @@ -404,7 +404,7 @@ void OSelectionBrowseBox::ClearAll() SetUpdateMode(true); } -void OSelectionBrowseBox::SetReadOnly(sal_Bool bRO) +void OSelectionBrowseBox::SetReadOnly(bool bRO) { if (bRO) { @@ -515,7 +515,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon if(!pEntry->IsVisible() && pEntry->GetOrderDir() != ORDER_NONE && !m_bOrderByUnRelated) { // a column has to visible in order to show up in ORDER BY - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(pEntry->IsVisible()); m_pVisibleCell->GetBox().SaveValue(); m_pVisibleCell->GetBox().Disable(); @@ -545,22 +545,22 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon Controller()->ClearModified(); } -void OSelectionBrowseBox::notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId) +void OSelectionBrowseBox::notifyTableFieldChanged(const OUString& _sOldAlias, const OUString& _sAlias, bool& _bListAction, sal_uInt16 _nColumnId) { appendUndoAction(_sOldAlias,_sAlias,BROW_TABLE_ROW,_bListAction); if ( m_bVisibleRow[BROW_TABLE_ROW] ) RowModified(GetBrowseRow(BROW_TABLE_ROW), _nColumnId); } -void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId) +void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFunctionName, const OUString& _sFunctionName, bool& _bListAction, sal_uInt16 _nColumnId) { appendUndoAction(_sOldFunctionName,_sFunctionName,BROW_FUNCTION_ROW,_bListAction); if ( !m_bVisibleRow[BROW_FUNCTION_ROW] ) - SetRowVisible(BROW_FUNCTION_ROW, sal_True); + SetRowVisible(BROW_FUNCTION_ROW, true); RowModified(GetBrowseRow(BROW_FUNCTION_ROW), _nColumnId); } -void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId) +void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry, bool& _bListAction,sal_uInt16 _nColumnId) { if ( isFieldNameAsterisk( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy()) ) { @@ -572,13 +572,13 @@ void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OT // append undo action for the function field _pEntry->SetFunctionType(FKT_NONE); _pEntry->SetFunction(OUString()); - _pEntry->SetGroupBy(sal_False); + _pEntry->SetGroupBy(false); notifyFunctionFieldChanged(sOldLocalizedFunctionName,_pEntry->GetFunction(),_bListAction,_nColumnId); } } } -sal_Bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction ) +bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, bool& _bListAction ) { OSL_ENSURE(_pColumnRef,"No valid parsenode!"); OUString sColumnName,sTableRange; @@ -586,9 +586,9 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, co return fillColumnRef(sColumnName,sTableRange,_rxConnection->getMetaData(),_pEntry,_bListAction); } -sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const OUString& _sTableRange,const Reference<XDatabaseMetaData>& _xMetaData,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction) +bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const OUString& _sTableRange, const Reference<XDatabaseMetaData>& _xMetaData, OTableFieldDescRef& _pEntry, bool& _bListAction) { - sal_Bool bError = sal_False; + bool bError = false; ::comphelper::UStringMixEqual bCase(_xMetaData->supportsMixedCaseQuotedIdentifiers()); // check if the table name is the same if ( !_sTableRange.isEmpty() && (bCase(_pEntry->GetTable(),_sTableRange) || bCase(_pEntry->GetAlias(),_sTableRange)) ) @@ -616,7 +616,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const O OUString sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST)); sErrorMsg = sErrorMsg.replaceFirst("$name$",_sColumnName); OSQLErrorBox( this, sErrorMsg ).Execute(); - bError = sal_True; + bError = true; } else { @@ -631,9 +631,9 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const O return bError; } -sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _pEntry, sal_Bool& _bListAction) +bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _pEntry, bool& _bListAction) { - sal_Bool bError = sal_False; + bool bError = false; OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController()); @@ -655,7 +655,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe xMetaData = xConnection->getMetaData(); OSL_ENSURE( xMetaData.is(), "OSelectionBrowseBox::saveField: invalid connection/meta data!" ); if ( !xMetaData.is() ) - return sal_True; + return true; OUString sErrorMsg; // second test if the name can be set as select columns in a pseudo statement @@ -723,7 +723,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe sErrorMessage = sErrorMessage.replaceFirst("$name$",_sFieldName); OSQLErrorBox( this, sErrorMessage ).Execute(); - return sal_True; + return true; } // we got a valid select column @@ -799,7 +799,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe aSelEntry->SetFunction(sLocalizedFunctionName); sal_uInt32 nFunCount = pColumnRef->count() - 1; sal_Int32 nFunctionType = FKT_AGGREGATE; - sal_Bool bQuote = sal_False; + bool bQuote = false; // may be there exists only one parameter which is a column, fill all information into our fields if ( nFunCount == 4 && SQL_ISRULE(pColumnRef->getChild(3),column_ref) ) bError = fillColumnRef( pColumnRef->getChild(3), xConnection, aSelEntry, _bListAction ); @@ -808,7 +808,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe else { nFunctionType |= FKT_NUMERIC; - bQuote = sal_True; + bQuote = true; aSelEntry->SetDataType(DataType::DOUBLE); aSelEntry->SetFieldType(TAB_NORMAL_FIELD); } @@ -823,7 +823,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe if ( aSelEntry->IsGroupBy() ) { sOldLocalizedFunctionName = m_aFunctionStrings.getToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1, ';'); - aSelEntry->SetGroupBy(sal_False); + aSelEntry->SetGroupBy(false); } // append undo action @@ -874,12 +874,12 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe notifyTableFieldChanged(sOldAlias,aSelEntry->GetAlias(),_bListAction, nColumnId); } - if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field + if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,true,false).is() ) // may we have to append more than one field { // the field could not be inserted OUString sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) ); sErrorMessage = sErrorMessage.replaceFirst("$name$",aSelEntry->GetField()); OSQLErrorBox( this, sErrorMessage ).Execute(); - bError = sal_True; + bError = true; } } } @@ -896,21 +896,21 @@ bool OSelectionBrowseBox::SaveModified() if(getFields().size() > static_cast<sal_uInt16>(nCurrentColumnPos - 1)) pEntry = getEntry(nCurrentColumnPos - 1); - sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False; - sal_Bool bError = sal_False; - sal_Bool bListAction = sal_False; + bool bWasEmpty = pEntry.is() && pEntry->IsEmpty(); + bool bError = false; + bool bListAction = false; if (pEntry.is() && Controller().Is() && Controller()->IsModified()) { // for the Undo-action OUString strOldCellContents,sNewValue; long nRow = GetRealRow(GetCurRow()); - sal_Bool bAppendRow = sal_False; + bool bAppendRow = false; switch (nRow) { case BROW_VIS_ROW: { - sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE; + bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE; strOldCellContents = bOldValue ? g_strOne : g_strZero; sNewValue = !bOldValue ? g_strOne : g_strZero; } @@ -921,7 +921,7 @@ bool OSelectionBrowseBox::SaveModified() } else { - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(); } break; @@ -943,7 +943,7 @@ bool OSelectionBrowseBox::SaveModified() else { strOldCellContents = pEntry->GetField(); - bListAction = sal_True; + bListAction = true; if ( !m_bInUndoMode ) rController.GetUndoManager().EnterListAction(OUString(),OUString()); @@ -960,7 +960,7 @@ bool OSelectionBrowseBox::SaveModified() bError = fillColumnRef( sColumnName, sTableAlias, xConnection->getMetaData(), pEntry, bListAction ); } else - bError = sal_True; + bError = true; if ( bError ) bError = saveField(aFieldName,pEntry,bListAction); @@ -968,14 +968,14 @@ bool OSelectionBrowseBox::SaveModified() } catch(Exception&) { - bError = sal_True; + bError = true; } if ( bError ) { sNewValue = aFieldName; if ( !m_bInUndoMode ) static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().LeaveListAction(); - bListAction = sal_False; + bListAction = false; } else sNewValue = pEntry->GetField(); @@ -1025,7 +1025,7 @@ bool OSelectionBrowseBox::SaveModified() pEntry->SetOrderDir(EOrderDir(nIdx)); if(!m_bOrderByUnRelated) { - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(); RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId()); } @@ -1044,15 +1044,15 @@ bool OSelectionBrowseBox::SaveModified() // these functions are only available in CORE OUString sFunctionName = m_pFunctionCell->GetEntry(nPos); OUString sGroupFunctionName = m_aFunctionStrings.getToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1, ';'); - sal_Bool bGroupBy = sal_False; + bool bGroupBy = false; if ( sGroupFunctionName.equals(sFunctionName) ) // check if the function name is GROUP { - bGroupBy = sal_True; + bGroupBy = true; if ( !m_bGroupByUnRelated && !pEntry->IsVisible() ) { // we have to change the visblie flag, so we must append also an undo action - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(); appendUndoAction(g_strZero,g_strOne,BROW_VIS_ROW,bListAction); RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId()); @@ -1150,7 +1150,7 @@ bool OSelectionBrowseBox::SaveModified() { OSQLWarningBox( this, aErrorMsg ).Execute(); } - bError = sal_True; + bError = true; } } else @@ -1159,7 +1159,7 @@ bool OSelectionBrowseBox::SaveModified() { OSQLWarningBox( this, aErrorMsg ).Execute(); } - bError = sal_True; + bError = true; } } } @@ -1167,7 +1167,7 @@ bool OSelectionBrowseBox::SaveModified() pEntry->SetCriteria(nIdx, aCrit); sNewValue = pEntry->GetCriteria(nIdx); if(!aCrit.isEmpty() && nRow >= (GetRowCount()-1)) - bAppendRow = sal_True; + bAppendRow = true; } } if(!bError && Controller()) @@ -1194,7 +1194,7 @@ bool OSelectionBrowseBox::SaveModified() if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError ) { // Default to visible - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); appendUndoAction(g_strZero,g_strOne,BROW_VIS_ROW,bListAction); RowModified(BROW_VIS_ROW, GetCurColumnId()); @@ -1305,7 +1305,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId ) invalidateUndoRedo(); } -void OSelectionBrowseBox::adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol ) +void OSelectionBrowseBox::adjustSelectionMode( bool _bClickedOntoHeader, bool _bClickedOntoHandleCol ) { // if a Header has been selected it should be shown otherwise not if ( _bClickedOntoHeader ) @@ -1337,8 +1337,8 @@ void OSelectionBrowseBox::MouseButtonDown(const BrowserMouseEvent& rEvt) { if( rEvt.IsLeft() ) { - sal_Bool bOnHandle = HANDLE_ID == rEvt.GetColumnId(); - sal_Bool bOnHeader = ( rEvt.GetRow() < 0 ) && !bOnHandle; + bool bOnHandle = HANDLE_ID == rEvt.GetColumnId(); + bool bOnHeader = ( rEvt.GetRow() < 0 ) && !bOnHandle; adjustSelectionMode( bOnHeader, bOnHandle ); } EditBrowseBox::MouseButtonDown(rEvt); @@ -1373,9 +1373,9 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) if ( IsEditing() ) { // allow the asterisk again - m_bDisableErrorBox = sal_True; + m_bDisableErrorBox = true; SaveModified(); - m_bDisableErrorBox = sal_False; + m_bDisableErrorBox = false; DeactivateCell(); } // check if the format is already supported, if not deactivate the current cell and try again @@ -1428,7 +1428,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName) sal_uInt16 nColId = GetCurColumnId(); sal_uInt32 nRow = GetCurRow(); - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -1451,7 +1451,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName) void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth) { - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -1518,7 +1518,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n if ( nOldPosition > 0 && nOldPosition <= getFields().size() ) getFields()[nOldPosition - 1] = pEntry; - ColumnMoved(pEntry->GetColumnId(),sal_False); + ColumnMoved(pEntry->GetColumnId(),false); } if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) ) @@ -1541,7 +1541,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n invalidateUndoRedo(); } -OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, sal_Bool bVis, sal_Bool bActivate) +OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate) { OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin()); if (!pSourceWin) @@ -1565,7 +1565,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd return InsertField(aInfo, _nColumnPosition, bVis, bActivate); } -OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, sal_Bool bVis, sal_Bool bActivate) +OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate) { if(m_nMaxColumns && m_nMaxColumns <= FieldsCount()) @@ -1665,7 +1665,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt { if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) { - pEntry->SetGroupBy(sal_False); + pEntry->SetGroupBy(false); aIter = rFields.end(); break; } @@ -1675,7 +1675,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt { pEntry->SetGroupBy(rInfo->IsGroupBy()); if(!m_bGroupByUnRelated && pEntry->IsGroupBy()) - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); break; } } @@ -1685,9 +1685,9 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt if (aIter == rFields.end()) { - OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); + OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if ( (pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy()) ) // the GroupBy is inherited from rInfo - pTmp->SetGroupBy(sal_False); + pTmp->SetGroupBy(false); } } @@ -1743,11 +1743,11 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O pEntry->IsGroupBy() == rInfo->IsGroupBy() ) { if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) - pEntry->SetGroupBy(sal_False); + pEntry->SetGroupBy(false); else { if(!m_bGroupByUnRelated && pEntry->IsGroupBy()) - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); } if (pEntry->GetCriteria(nLevel).isEmpty() ) { @@ -1790,9 +1790,9 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O } else if (aIter == rFields.end()) { - OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); + OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // the GroupBy was inherited from rInfo - pTmp->SetGroupBy(sal_False); + pTmp->SetGroupBy(false); if ( pTmp.is() ) { pTmp->SetCriteria( nLevel, rValue); @@ -1819,7 +1819,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData(); ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()); - sal_Bool bAppend = sal_False; + bool bAppend = false; OTableFields& rFields = getFields(); OTableFields::iterator aIter = rFields.begin(); OTableFields::iterator aEnd = rFields.end(); @@ -1839,7 +1839,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde else { if ( !m_bOrderByUnRelated ) - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); pEntry->SetOrderDir( eDir ); m_nLastSortColumn = nPos; } @@ -1849,12 +1849,12 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde if (aIter == rFields.end()) { - OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); + OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if(pTmp.is()) { m_nLastSortColumn = pTmp->GetColumnId() - 1; if ( !m_bOrderByUnRelated && !bAppend ) - pTmp->SetVisible(sal_True); + pTmp->SetVisible(true); pTmp->SetOrderDir( eDir ); } } @@ -1865,9 +1865,9 @@ void OSelectionBrowseBox::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) EditBrowseBox::ArrangeControls(nX, nY); } -sal_Bool OSelectionBrowseBox::Save() +bool OSelectionBrowseBox::Save() { - sal_Bool bRet = sal_True; + bool bRet = true; if (IsModified()) bRet = SaveModified(); return bRet; @@ -1889,7 +1889,7 @@ void OSelectionBrowseBox::CellModified() pEntry->GetOrderDir() != ORDER_NONE) { m_pVisibleCell->GetBox().Check(); - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); } else pEntry->SetVisible(m_pVisibleCell->GetBox().IsChecked()); @@ -1951,7 +1951,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) { if ( !IsColumnSelected( nColId ) ) { - adjustSelectionMode( sal_True /* clicked onto a header */ , sal_False /* not onto the handle col */ ); + adjustSelectionMode( true /* clicked onto a header */ , false /* not onto the handle col */ ); SelectColumnId( nColId ); } @@ -2015,17 +2015,17 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) } } -sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const +bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const { OSL_ENSURE(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !"); return m_bVisibleRow[_nWhich]; } -void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis) +void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis) { OSL_ENSURE(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !"); - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -2161,9 +2161,9 @@ OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const return aText; } -sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt) +bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt) { - sal_Bool bErg=sal_True; + bool bErg=true; switch(_nFunctionTokenId) { case SQL_TOKEN_COUNT: @@ -2224,7 +2224,7 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUSt } } if(i == nCount-1) - bErg = sal_False; + bErg = false; } } @@ -2258,7 +2258,7 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 n void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, const OUString& strNewText) { - sal_Bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast<sal_uInt16>(nRow)) && (GetCurRow() == static_cast<sal_uInt16>(GetBrowseRow(nRow))); + bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast<sal_uInt16>(nRow)) && (GetCurRow() == static_cast<sal_uInt16>(GetBrowseRow(nRow))); if (bWasEditing) DeactivateCell(); @@ -2294,10 +2294,10 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con nFunctionType &= ~FKT_AGGREGATE; pEntry->SetFunctionType(nFunctionType); if ( pEntry->IsGroupBy() && !sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) ) - pEntry->SetGroupBy(sal_False); + pEntry->SetGroupBy(false); if ( sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) ) - pEntry->SetGroupBy(sal_True); + pEntry->SetGroupBy(true); else if ( !strNewText.isEmpty() ) { nFunctionType |= FKT_AGGREGATE; @@ -2314,7 +2314,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con // the appropriate field-description is now empty -> set Visible to sal_False (now it is consistent to normal empty rows) if (pEntry->IsEmpty()) - pEntry->SetVisible(sal_False); + pEntry->SetVisible(false); if (bWasEditing) ActivateCell(nCellIndex, nColId); @@ -2381,9 +2381,9 @@ sal_uInt16 OSelectionBrowseBox::GetDefaultColumnWidth(const OUString& /*rName*/) return static_cast<sal_uInt16>(DEFAULT_SIZE); } -sal_Bool OSelectionBrowseBox::isCutAllowed() +bool OSelectionBrowseBox::isCutAllowed() { - sal_Bool bCutAllowed = sal_False; + bool bCutAllowed = false; long nRow = GetRealRow(GetCurRow()); switch (nRow) { @@ -2438,9 +2438,9 @@ void OSelectionBrowseBox::paste() invalidateUndoRedo(); } -sal_Bool OSelectionBrowseBox::isPasteAllowed() +bool OSelectionBrowseBox::isPasteAllowed() { - sal_Bool bPasteAllowed = sal_True; + bool bPasteAllowed = true; long nRow = GetRealRow(GetCurRow()); switch (nRow) { @@ -2448,13 +2448,13 @@ sal_Bool OSelectionBrowseBox::isPasteAllowed() case BROW_ORDER_ROW: case BROW_TABLE_ROW: case BROW_FUNCTION_ROW: - bPasteAllowed = sal_False; + bPasteAllowed = false; break; } return bPasteAllowed; } -sal_Bool OSelectionBrowseBox::isCopyAllowed() +bool OSelectionBrowseBox::isCopyAllowed() { return isCutAllowed(); } @@ -2472,13 +2472,13 @@ void OSelectionBrowseBox::copy() } } -void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction) +void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue, const OUString& _rNewValue, sal_Int32 _nRow, bool& _bListAction) { if ( !m_bInUndoMode && _rNewValue != _rOldValue ) { if ( !_bListAction ) { - _bListAction = sal_True; + _bListAction = true; static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().EnterListAction(OUString(),OUString()); } appendUndoAction(_rOldValue,_rNewValue,_nRow); @@ -2510,14 +2510,14 @@ IMPL_LINK_NOARG(OSelectionBrowseBox, OnInvalidateTimer) void OSelectionBrowseBox::stopTimer() { - m_bStopTimer = sal_True; + m_bStopTimer = true; if (m_timerInvalidate.IsActive()) m_timerInvalidate.Stop(); } void OSelectionBrowseBox::startTimer() { - m_bStopTimer = sal_False; + m_bStopTimer = false; if (!m_timerInvalidate.IsActive()) m_timerInvalidate.Start(); } @@ -2530,7 +2530,7 @@ OTableFields& OSelectionBrowseBox::getFields() const void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl) { - sal_Bool bEnable = !_rEntry->isCondition(); + bool bEnable = !_rEntry->isCondition(); _pControl->Enable(bEnable); _pControl->EnableInput(bEnable); } @@ -2585,9 +2585,9 @@ void OSelectionBrowseBox::GetFocus() void OSelectionBrowseBox::DeactivateCell(bool _bUpdate) { - m_bWasEditing = sal_True; + m_bWasEditing = true; EditBrowseBox::DeactivateCell(_bUpdate); - m_bWasEditing = sal_False; + m_bWasEditing = false; } OUString OSelectionBrowseBox::GetRowDescription( sal_Int32 _nRow ) const @@ -2614,9 +2614,9 @@ OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBo return sRetText; } -sal_Bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName) +bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName) { - sal_Bool bRet = sal_False; + bool bRet = false; OJoinTableView::OTableWindowMap* pTabWinList = getDesignView()->getTableView()->GetTabWinMap(); if (pTabWinList) { @@ -2628,7 +2628,7 @@ sal_Bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const O { _pEntry->SetTable(pEntryTab->GetTableName()); _pEntry->SetTabWindow(pEntryTab); - bRet = sal_True; + bRet = true; } } } @@ -2672,7 +2672,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) else { // only COUNT(*) and COUNT("table".*) allowed - sal_Bool bCountRemoved = !isFieldNameAsterisk(_pEntry->GetField()); + bool bCountRemoved = !isFieldNameAsterisk(_pEntry->GetField()); if ( bCountRemoved ) m_pFunctionCell->RemoveEntry(1); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index e42bed965e13..e42c24ee5507 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -70,20 +70,20 @@ namespace dbaui OUString m_aFunctionStrings; sal_uInt16 m_nVisibleCount; // maximum number of visible rows sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column - sal_Bool m_bOrderByUnRelated; - sal_Bool m_bGroupByUnRelated; - sal_Bool m_bStopTimer; - sal_Bool m_bWasEditing; - sal_Bool m_bDisableErrorBox; - sal_Bool m_bInUndoMode; + bool m_bOrderByUnRelated; + bool m_bGroupByUnRelated; + bool m_bStopTimer; + bool m_bWasEditing; + bool m_bDisableErrorBox; + bool m_bInUndoMode; DECL_LINK(OnInvalidateTimer, void*); public: OSelectionBrowseBox( Window* pParent ); virtual ~OSelectionBrowseBox(); void initialize(); - OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); - OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); + OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true ); + OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true ); void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition ); void RemoveColumn( sal_uInt16 _nColumnId ); void DeleteFields( const OUString& rAliasName ); @@ -101,7 +101,7 @@ namespace dbaui void AddOrder(const OTableFieldDescRef& rInfo, const EOrderDir eDir, sal_uInt32 _nCurrentPos); void ClearAll(); OTableFieldDescRef AppendNewCol( sal_uInt16 nCnt=1 ); - sal_Bool Save(); + bool Save(); OQueryDesignView* getDesignView(); OQueryDesignView* getDesignView() const; sal_uInt16 FieldsCount(); @@ -114,35 +114,35 @@ namespace dbaui // cell content (formatted as string) set/return sal_Int32 GetNoneVisibleRows() const; void SetNoneVisbleRow(long nRows); - sal_Bool IsRowVisible(sal_uInt16 _nWhich) const; - void SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis); + bool IsRowVisible(sal_uInt16 _nWhich) const; + void SetRowVisible(sal_uInt16 _nWhich, bool _bVis); - void SetReadOnly(sal_Bool bRO); + void SetReadOnly(bool bRO); // calculate an optimal size. Basically, this takes into account the number of visible rows. Size CalcOptimalSize( const Size& _rAvailable ); // can the current content be cut - sal_Bool isPasteAllowed(); - sal_Bool isCutAllowed(); - sal_Bool isCopyAllowed(); + bool isPasteAllowed(); + bool isCutAllowed(); + bool isCopyAllowed(); void cut(); void paste(); void copy(); virtual void GetFocus() SAL_OVERRIDE; virtual void DeactivateCell(bool bUpdate = true) SAL_OVERRIDE; - virtual void ColumnMoved( sal_uInt16 nColId ) SAL_OVERRIDE { ColumnMoved(nColId,sal_True); } - void ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo); + virtual void ColumnMoved( sal_uInt16 nColId ) SAL_OVERRIDE { ColumnMoved(nColId,true); } + void ColumnMoved( sal_uInt16 nColId, bool _bCreateUndo); void Fill(); void PreFill(); /** Disables the generation of undo actions */ - inline void EnterUndoMode() { m_bInUndoMode = sal_True; } + inline void EnterUndoMode() { m_bInUndoMode = true; } /** Enables the generation of undo actions */ - inline void LeaveUndoMode() { m_bInUndoMode = sal_False; } + inline void LeaveUndoMode() { m_bInUndoMode = false; } /** GetCellText returns the text at the given position @param _nRow @@ -225,8 +225,8 @@ namespace dbaui Rectangle GetInvalidRect( sal_uInt16 nColId ); long GetRealRow(long nRow) const; long GetBrowseRow(long nRowId) const; - sal_Bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); - void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction); + bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); + void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow, bool& _bListAction); void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow); OTableFields& getFields() const; void enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl); @@ -234,7 +234,7 @@ namespace dbaui void invalidateUndoRedo(); OTableFieldDescRef getEntry(OTableFields::size_type _nPos); - void adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol ); + void adjustSelectionMode( bool _bClickedOntoHeader, bool _bClickedOntoHandleCol ); /** save the filed change in save modified @param _sFieldName @@ -246,7 +246,7 @@ namespace dbaui @return <TRUE/> if an error occurred otherwise <FALSE/> */ - sal_Bool saveField(OUString& _sFieldName, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction); + bool saveField(OUString& _sFieldName, OTableFieldDescRef& _pEntry, bool& _bListAction); /** sets the table window at the _pEntry @param _pEntry @@ -256,7 +256,7 @@ namespace dbaui @return <TRUE/> if the table name was set otherwise <FALSE/> */ - sal_Bool fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName); + bool fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName); /** uses the parse node to fill all information into the field @param _pColumnRef @@ -270,15 +270,15 @@ namespace dbaui @return <TRUE/> if an error occurred otherwise <FALSE/> */ - sal_Bool fillColumnRef( const ::connectivity::OSQLParseNode* _pColumnRef, + bool fillColumnRef( const ::connectivity::OSQLParseNode* _pColumnRef, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, - sal_Bool& _bListAction); - sal_Bool fillColumnRef( const OUString& _sColumnName, + bool& _bListAction); + bool fillColumnRef( const OUString& _sColumnName, const OUString& _sTableRange, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData, OTableFieldDescRef& _pEntry, - sal_Bool& _bListAction); + bool& _bListAction); /** append an undo action for the table field @param _sOldAlias @@ -288,7 +288,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias, bool& _bListAction,sal_uInt16 _nColumnId); /** append an undo action for the function field @param _sOldFunctionName @@ -298,7 +298,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName, bool& _bListAction,sal_uInt16 _nColumnId); /** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action. E.q. AGGREGATE functions are only valid when the field name isn't an asterisk @@ -309,7 +309,7 @@ namespace dbaui @param _bListAction When <TRUE/> an list action will be created. */ - void clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry, bool& _bListAction,sal_uInt16 _nColumnId); /** remove or insert the necessary function types @param _pEntry diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index 59351429d11b..a6ebfbb2beed 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -37,7 +37,7 @@ namespace dbaui :Window(_pContainer) ,m_pData( _pTabConnData ) ,m_pParent( _pContainer ) - ,m_bSelected( sal_False ) + ,m_bSelected( false ) { Init(); Show(); @@ -137,17 +137,17 @@ namespace dbaui void OTableConnection::Select() { - m_bSelected = sal_True; + m_bSelected = true; m_pParent->Invalidate( GetBoundingRect(), INVALIDATE_NOCHILDREN); } void OTableConnection::Deselect() { - m_bSelected = sal_False; + m_bSelected = false; InvalidateConnection(); } - sal_Bool OTableConnection::CheckHit( const Point& rMousePos ) const + bool OTableConnection::CheckHit( const Point& rMousePos ) const { // check if the point hit our line ::std::vector<OConnectionLine*>::const_iterator aIter = ::std::find_if(m_vConnLine.begin(), diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index d5a7f54b91b6..fe9a3a8e040f 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -87,10 +87,10 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat return *this; } -sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ) +bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ) { if (sal_uInt16(m_vConnLineData.size()) < nIndex) - return sal_False; + return false; // == still allowed, this correponds to a Append @@ -103,10 +103,10 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& r pConnLineData->SetSourceFieldName( rSourceFieldName ); pConnLineData->SetDestFieldName( rDestFieldName ); - return sal_True; + return true; } -sal_Bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ) +bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ) { OConnectionLineDataVec::iterator aIter = m_vConnLineData.begin(); OConnectionLineDataVec::iterator aEnd = m_vConnLineData.end(); @@ -119,11 +119,11 @@ sal_Bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, { OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName); if (!pNew.is()) - return sal_False; + return false; m_vConnLineData.push_back(pNew); } - return sal_True; + return true; } void OTableConnectionData::ResetConnLines() diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx index 5bef6767e6a8..564ef78c91f3 100644 --- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx @@ -39,8 +39,8 @@ OTableFieldDesc::OTableFieldDesc() ,m_nIndex(0) ,m_nColWidth(0) ,m_nColumnId((sal_uInt16)-1) - ,m_bGroupBy(sal_False) - ,m_bVisible(sal_False) + ,m_bGroupBy(false) + ,m_bVisible(false) { } @@ -60,8 +60,8 @@ OTableFieldDesc::OTableFieldDesc(const OUString& rT, const OUString& rF ) ,m_nIndex(0) ,m_nColWidth(0) ,m_nColumnId((sal_uInt16)-1) - ,m_bGroupBy(sal_False) - ,m_bVisible(sal_False) + ,m_bGroupBy(false) + ,m_bVisible(false) { SetField( rF ); SetTable( rT ); } @@ -95,7 +95,7 @@ OTableFieldDesc& OTableFieldDesc::operator=( const OTableFieldDesc& rRS ) return *this; } -sal_Bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc ) +bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc ) { return ( m_eOrderDir != rDesc.GetOrderDir() || diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index b0e7fea3ef51..56efb9f631a1 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -75,7 +75,7 @@ OTableWindow::OTableWindow( Window* pParent, const TTableWindowData::value_type& ,m_nMoveCount(0) ,m_nMoveIncrement(1) ,m_nSizingFlags( SIZING_NONE ) - ,m_bActive( sal_False ) + ,m_bActive( false ) { // Set position and size @@ -158,7 +158,7 @@ OTableWindowListBox* OTableWindow::CreateListBox() return new OTableWindowListBox(this); } -sal_Bool OTableWindow::FillListBox() +bool OTableWindow::FillListBox() { m_pListBox->Clear(); if ( !m_pContainerListener.is() ) @@ -217,7 +217,7 @@ sal_Bool OTableWindow::FillListBox() OSL_FAIL("Exception occurred!"); } - return sal_True; + return true; } void* OTableWindow::createUserData(const Reference< XPropertySet>& /*_xColumn*/,bool /*_bPrimaryKey*/) @@ -265,7 +265,7 @@ void OTableWindow::impl_updateImage() m_aTypeImage.Show(); } -sal_Bool OTableWindow::Init() +bool OTableWindow::Init() { // create list box if necessary if ( !m_pListBox ) @@ -283,7 +283,7 @@ sal_Bool OTableWindow::Init() // add the fields to the ListBox clearListBox(); - sal_Bool bSuccess = FillListBox(); + bool bSuccess = FillListBox(); if ( bSuccess ) m_pListBox->SelectAll( false ); @@ -474,7 +474,7 @@ void OTableWindow::Resize() Window::Invalidate(); } -void OTableWindow::SetBoldTitle( sal_Bool bBold ) +void OTableWindow::SetBoldTitle( bool bBold ) { Font aFont = m_aTitle.GetFont(); aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL ); @@ -490,7 +490,7 @@ void OTableWindow::GetFocus() m_pListBox->GrabFocus(); } -void OTableWindow::setActive(sal_Bool _bActive) +void OTableWindow::setActive(bool _bActive) { SetBoldTitle( _bActive ); m_bActive = _bActive; @@ -506,24 +506,24 @@ void OTableWindow::Remove() pTabWinCont->Invalidate(); } -sal_Bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) +bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) { const KeyCode& rCode = rEvt.GetKeyCode(); sal_uInt16 nCode = rCode.GetCode(); - sal_Bool bShift = rCode.IsShift(); - sal_Bool bCtrl = rCode.IsMod1(); + bool bShift = rCode.IsShift(); + bool bCtrl = rCode.IsMod1(); - sal_Bool bHandle = sal_False; + bool bHandle = false; if( !bCtrl && !bShift && (nCode==KEY_DELETE) ) { Remove(); - bHandle = sal_True; + bHandle = true; } return bHandle; } -sal_Bool OTableWindow::ExistsAConn() const +bool OTableWindow::ExistsAConn() const { return getTableView()->ExistsAConn(this); } @@ -609,7 +609,7 @@ void OTableWindow::Command(const CommandEvent& rEvt) bool OTableWindow::PreNotify(NotifyEvent& rNEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_KEYINPUT: @@ -631,19 +631,19 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) switch( rCode.GetCode() ) { case KEY_DOWN: - bHandled = sal_True; + bHandled = true; aStartPoint.Y() += m_nMoveIncrement; break; case KEY_UP: - bHandled = sal_True; + bHandled = true; aStartPoint.Y() += -m_nMoveIncrement; break; case KEY_LEFT: - bHandled = sal_True; + bHandled = true; aStartPoint.X() += -m_nMoveIncrement; break; case KEY_RIGHT: - bHandled = sal_True; + bHandled = true; aStartPoint.X() += m_nMoveIncrement; break; } diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index 623aa9b612cf..0585bdb52a04 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -235,7 +235,7 @@ namespace dbaui } return AccessibleRelation(); } - sal_Bool OTableWindowAccess::isEditable() const + bool OTableWindowAccess::isEditable() const { return m_pTable && !m_pTable->getTableView()->getDesignView()->getController().isReadOnly(); } diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx index 2c4eb37c5c6a..0d6607b05957 100644 --- a/dbaccess/source/ui/querydesign/TableWindowData.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx @@ -46,7 +46,7 @@ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable ,m_sComposedName(_rComposedName) ,m_aPosition( Point(-1,-1) ) ,m_aSize( Size(-1,-1) ) - ,m_bShowAll( sal_True ) + ,m_bShowAll( true ) ,m_bIsQuery(false) ,m_bIsValid(true) { @@ -63,12 +63,12 @@ OTableWindowData::~OTableWindowData() stopComponentListening( xComponent ); } -sal_Bool OTableWindowData::HasPosition() const +bool OTableWindowData::HasPosition() const { return ( (m_aPosition.X() != -1) && (m_aPosition.Y() != -1) ); } -sal_Bool OTableWindowData::HasSize() const +bool OTableWindowData::HasSize() const { return ( (m_aSize.Width() != -1) && (m_aSize.Height() !=-1) ); } diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index edec47ca2245..6421b79c7cf1 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -46,7 +46,7 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent ) ,m_pTabWin( pParent ) ,m_nDropEvent(0) ,m_nUiEvent(0) - ,m_bReallyScrolled( sal_False ) + ,m_bReallyScrolled( false ) { m_aScrollTimer.SetTimeout( SCROLLING_TIMESPAN ); SetDoubleClickHdl( LINK(this, OTableWindowListBox, OnDoubleClick) ); @@ -85,7 +85,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe OJoinDesignView* pView = m_pTabWin->getDesignView(); OJoinController& rController = pView->getController(); - sal_Bool bCase = sal_False; + bool bCase = false; try { Reference<XConnection> xConnection = rController.getConnection(); @@ -113,7 +113,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe void OTableWindowListBox::NotifyScrolled() { - m_bReallyScrolled = sal_True; + m_bReallyScrolled = true; } void OTableWindowListBox::NotifyEndScroll() @@ -124,12 +124,12 @@ void OTableWindowListBox::NotifyEndScroll() // without INVALIDATE_NOCHILDREN all tables would be redrawn, // so: flickering - m_bReallyScrolled = sal_False; + m_bReallyScrolled = false; } bool OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_KEYINPUT: @@ -197,7 +197,7 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPi if (!pCont->getDesignView()->getController().isReadOnly() && pCont->getDesignView()->getController().isConnected()) { // asterisk was not allowed to be copied to selection browsebox - sal_Bool bFirstNotAllowed = FirstSelected() == First() && m_pTabWin->GetData()->IsShowAll(); + bool bFirstNotAllowed = FirstSelected() == First() && m_pTabWin->GetData()->IsShowAll(); EndSelection(); // create a description of the source OJoinExchangeData jxdSource(this); @@ -317,7 +317,7 @@ sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) void OTableWindowListBox::LoseFocus() { if(m_pTabWin) - m_pTabWin->setActive(sal_False); + m_pTabWin->setActive(false); SvTreeListBox::LoseFocus(); } diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index aeb31373b0e7..87713caab9b5 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -157,7 +157,7 @@ namespace dbaui } bool OQueryContainerWindow::PreNotify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 65a64ee564f3..62da7c841261 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -253,7 +253,7 @@ using namespace ::comphelper; namespace { - void ensureToolbars( OQueryController& _rController, sal_Bool _bDesign ) + void ensureToolbars( OQueryController& _rController, bool _bDesign ) { Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager = _rController.getLayoutManager( _rController.getFrame() ); if ( xLayoutManager.is() ) @@ -335,12 +335,12 @@ OQueryController::OQueryController(const Reference< XComponentContext >& _rM) ,m_nVisibleRows(0x400) ,m_nSplitPos(-1) ,m_nCommandType( CommandType::QUERY ) - ,m_bGraphicalDesign(sal_False) - ,m_bDistinct(sal_False) - ,m_bViewAlias(sal_False) - ,m_bViewTable(sal_False) - ,m_bViewFunction(sal_False) - ,m_bEscapeProcessing(sal_True) + ,m_bGraphicalDesign(false) + ,m_bDistinct(false) + ,m_bViewAlias(false) + ,m_bViewTable(false) + ,m_bViewFunction(false) + ,m_bEscapeProcessing(true) { InvalidateAll(); @@ -880,7 +880,7 @@ void OQueryController::impl_initialize() m_nCommandType = CommandType::QUERY; } - sal_Bool bCreateView( sal_False ); + bool bCreateView( false ); if ( rArguments.get_ensureType( "CreateView", bCreateView ) && bCreateView ) { OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" ); @@ -912,7 +912,7 @@ void OQueryController::impl_initialize() } // more legacy parameters - sal_Bool bGraphicalDesign( sal_True ); + bool bGraphicalDesign( true ); if ( rArguments.get_ensureType( (OUString)PROPERTY_QUERYDESIGNVIEW, bGraphicalDesign ) ) { OSL_FAIL( "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" ); @@ -963,7 +963,7 @@ void OQueryController::impl_initialize() if ( !ensureConnected( false ) ) { // we have no connection so what else should we do - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; if ( editingView() ) { connectionLostMessage(); @@ -982,7 +982,7 @@ void OQueryController::impl_initialize() if ( !xViews.is() ) { // we can't create views so we ask if the user wants to create a query instead m_nCommandType = CommandType::QUERY; - sal_Bool bClose = sal_False; + bool bClose = false; { OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) ); OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) ); @@ -1057,7 +1057,7 @@ void OQueryController::impl_initialize() DBG_UNHANDLED_EXCEPTION(); // we caught an exception so we switch to text only mode { - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; getContainer()->initialize(); ODataView* pWindow = getView(); OSQLMessageBox(pWindow,e).Execute(); @@ -1193,7 +1193,7 @@ void OQueryController::reconnect(bool _bUI) { if(m_bGraphicalDesign) { - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; // don't call Execute(SQL) because this changes the sql statement impl_setViewMode( NULL ); } @@ -1373,18 +1373,18 @@ void OQueryController::executeQuery() } } -sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements,sal_Bool _bSaveAs) +bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements, bool _bSaveAs) { OSL_ENSURE( !editingCommand(), "OQueryController::askForNewName: not to be called when designing an independent statement!" ); if ( editingCommand() ) - return sal_False; + return false; OSL_PRECOND( _xElements.is(), "OQueryController::askForNewName: invalid container!" ); if ( !_xElements.is() ) - return sal_False; + return false; - sal_Bool bRet = sal_True; - sal_Bool bNew = _bSaveAs || !_xElements->hasByName( m_sName ); + bool bRet = true; + bool bNew = _bSaveAs || !_xElements->hasByName( m_sName ); if(bNew) { OUString aDefaultName; @@ -1421,7 +1421,7 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElement return bRet; } -bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs) +bool OQueryController::doSaveAsDoc(bool _bSaveAs) { OSL_ENSURE(isEditable(),"Slot ID_BROWSER_SAVEDOC should not be enabled!"); if ( !editingCommand() && !haveDataSource() ) @@ -1806,7 +1806,7 @@ short OQueryController::saveModified() nRet = aQry.Execute(); if ( ( nRet == RET_YES ) - && !doSaveAsDoc( sal_False ) + && !doSaveAsDoc( false ) ) { nRet = RET_CANCEL; @@ -1835,7 +1835,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings xProp->getPropertyValue( PROPERTY_COMMAND ) >>= sNewStatement; setStatement_fireEvent( sNewStatement ); - sal_Bool bNewEscapeProcessing( sal_True ); + bool bNewEscapeProcessing( true ); if ( editingQuery() ) { xProp->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bNewEscapeProcessing; @@ -1923,10 +1923,10 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings if ( bError ) { - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; if ( editingView() ) // if we're editing a view whose statement could not be parsed, default to "no escape processing" - setEscapeProcessing_fireEvent( sal_False ); + setEscapeProcessing_fireEvent( false ); } } } @@ -1956,7 +1956,7 @@ void OQueryController::setStatement_fireEvent( const OUString& _rNewStatement, b fire( &nHandle, &aNewValue, &aOldValue, 1, sal_False ); } -void OQueryController::setEscapeProcessing_fireEvent( const sal_Bool _bEscapeProcessing ) +void OQueryController::setEscapeProcessing_fireEvent( const bool _bEscapeProcessing ) { if ( _bEscapeProcessing == m_bEscapeProcessing ) return; @@ -1988,7 +1988,7 @@ bool OQueryController::allowQueries() const const NamedValueCollection& rArguments( getInitParams() ); sal_Int32 nCommandType = rArguments.getOrDefault( (OUString)PROPERTY_COMMAND_TYPE, (sal_Int32)CommandType::QUERY ); - sal_Bool bCreatingView = ( nCommandType == CommandType::TABLE ); + bool bCreatingView = ( nCommandType == CommandType::TABLE ); return !bCreatingView; } diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index c6e90f2cff45..b655a9b72ae4 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -45,7 +45,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, const TTableConnectionData::value_type& _pData, OJoinTableView::OTableWindowMap* _pTableMap, const Reference< XConnection >& _xConnection, - sal_Bool _bAllowTableSelect) + bool _bAllowTableSelect) : ModalDialog( pParent, "JoinDialog", "dbaccess/ui/joindialog.ui" ) , m_pTableControl( NULL ) , m_pTableMap(_pTableMap) @@ -81,7 +81,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, m_pTableControl->lateUIInit(); - sal_Bool bSupportFullJoin = sal_False; + bool bSupportFullJoin = false; Reference<XDatabaseMetaData> xMeta; try { @@ -92,7 +92,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, catch(SQLException&) { } - sal_Bool bSupportOuterJoin = sal_False; + bool bSupportOuterJoin = false; try { if ( xMeta.is() ) @@ -153,13 +153,13 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) sal_uInt16 nResId = 0; const sal_uInt16 nPos = m_pLB_JoinType->GetSelectEntryPos(); const sal_IntPtr nJoinType = reinterpret_cast<sal_IntPtr>(m_pLB_JoinType->GetEntryData(nPos)); - sal_Bool bAddHint = sal_True; + bool bAddHint = true; switch ( nJoinType ) { default: case ID_INNER_JOIN: nResId = STR_QUERY_INNER_JOIN; - bAddHint = sal_False; + bAddHint = false; eJoinType = INNER_JOIN; break; case ID_LEFT_JOIN: @@ -237,7 +237,7 @@ IMPL_LINK( DlgQryJoin, OKClickHdl, Button*, /*pButton*/ ) IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ ) { - sal_Bool bChecked = m_pCBNatural->IsChecked(); + bool bChecked = m_pCBNatural->IsChecked(); static_cast<OQueryTableConnectionData*>(m_pConnData.get())->setNatural(bChecked); m_pTableControl->enableRelation(!bChecked); if ( bChecked ) diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx index 18e2b8348a7f..6dd08572502c 100644 --- a/dbaccess/source/ui/querydesign/querydlg.hxx +++ b/dbaccess/source/ui/querydesign/querydlg.hxx @@ -67,7 +67,7 @@ namespace dbaui const TTableConnectionData::value_type& pData, OJoinTableView::OTableWindowMap* _pTableMap, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, - sal_Bool _bAllowTableSelect); + bool _bAllowTableSelect); virtual ~DlgQryJoin(); EJoinType GetJoinType() const { return eJoinType; }; diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index a046a0ea9675..98a72c8587c8 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -75,7 +75,7 @@ ORelationTableConnectionData::~ORelationTableConnectionData() { } -sal_Bool ORelationTableConnectionData::DropRelation() +bool ORelationTableConnectionData::DropRelation() { ::osl::MutexGuard aGuard( m_aMutex ); // delete relation @@ -102,7 +102,7 @@ sal_Bool ORelationTableConnectionData::DropRelation() } } } - return sal_True; + return true; } void ORelationTableConnectionData::ChangeOrientation() @@ -145,7 +145,7 @@ void ORelationTableConnectionData::SetCardinality() } -sal_Bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const +bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const { // check if Table has the primary key column dependig on _eEConnectionSide sal_uInt16 nPrimKeysCount = 0, @@ -172,15 +172,15 @@ sal_Bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropert } } if ( nPrimKeysCount != aKeyColumns.getLength() ) - return sal_False; + return false; } if ( !nPrimKeysCount || nPrimKeysCount != nValidLinesCount ) - return sal_False; + return false; - return sal_True; + return true; } -sal_Bool ORelationTableConnectionData::IsConnectionPossible() +bool ORelationTableConnectionData::IsConnectionPossible() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -188,7 +188,7 @@ sal_Bool ORelationTableConnectionData::IsConnectionPossible() if ( IsSourcePrimKey() && !IsDestPrimKey() ) ChangeOrientation(); - return sal_True; + return true; } OConnectionLineDataRef ORelationTableConnectionData::CreateLineDataObj() @@ -248,14 +248,14 @@ bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableCon } -sal_Bool ORelationTableConnectionData::Update() +bool ORelationTableConnectionData::Update() { ::osl::MutexGuard aGuard( m_aMutex ); // delete old relation { DropRelation(); if( !IsConnectionPossible() ) - return sal_False; + return false; } // reassign the keys because the orientaion could be changed @@ -263,7 +263,7 @@ sal_Bool ORelationTableConnectionData::Update() Reference< XIndexAccess> xKeys ( getReferencingTable()->getKeys()); if ( !xKeys.is() ) - return sal_False; + return false; // create new relation Reference<XDataDescriptorFactory> xKeyFactory(xKeys,UNO_QUERY); OSL_ENSURE(xKeyFactory.is(),"No XDataDescriptorFactory Interface!"); @@ -421,7 +421,7 @@ xKey.clear(); // determine cardinality SetCardinality(); - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 261f687e68f8..230d845feeeb 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -121,7 +121,7 @@ Reference< XInterface > SAL_CALL ORelationController::Create(const Reference<XMu ORelationController::ORelationController(const Reference< XComponentContext >& _rM) : OJoinController(_rM) ,m_nThreadEvent(0) - ,m_bRelationsPossible(sal_True) + ,m_bRelationsPossible(true) { InvalidateAll(); } @@ -201,7 +201,7 @@ void ORelationController::impl_initialize() {// check if this database supports relations setEditable(false); - m_bRelationsPossible = sal_False; + m_bRelationsPossible = false; { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); @@ -354,7 +354,7 @@ namespace if ( aFind == m_aTableData.end() ) { aFind = m_aTableData.insert(TTableDataHelper::value_type(sSourceName,::boost::shared_ptr<OTableWindowData>(new OTableWindowData(xTableProp,sSourceName, sSourceName)))).first; - aFind->second->ShowAll(sal_False); + aFind->second->ShowAll(false); } TTableWindowData::value_type pReferencingTable = aFind->second; Reference<XIndexAccess> xKeys = pReferencingTable->getKeys(); @@ -387,7 +387,7 @@ namespace { Reference<XPropertySet> xReferencedTable(m_xTables->getByName(sReferencedTable),UNO_QUERY); aRefFind = m_aTableData.insert(TTableDataHelper::value_type(sReferencedTable,::boost::shared_ptr<OTableWindowData>(new OTableWindowData(xReferencedTable,sReferencedTable, sReferencedTable)))).first; - aRefFind->second->ShowAll(sal_False); + aRefFind->second->ShowAll(false); } else continue; // table name could not be found so we do not show this table releation @@ -441,7 +441,7 @@ void ORelationController::mergeData(const TTableConnectionData& _aConnectionData ::std::copy( _aConnectionData.begin(), _aConnectionData.end(), ::std::back_inserter( m_vTableConnectionData )); //const Reference< XDatabaseMetaData> xMetaData = getConnection()->getMetaData(); - const sal_Bool bCase = sal_True;//xMetaData.is() && xMetaData->supportsMixedCaseQuotedIdentifiers(); + const bool bCase = true;//xMetaData.is() && xMetaData->supportsMixedCaseQuotedIdentifiers(); // here we are finished, so we can collect the table from connection data TTableConnectionData::iterator aConnDataIter = m_vTableConnectionData.begin(); TTableConnectionData::iterator aConnDataEnd = m_vTableConnectionData.end(); @@ -531,7 +531,7 @@ void ORelationController::loadData() } } -TTableWindowData::value_type ORelationController::existsTable(const OUString& _rComposedTableName,sal_Bool _bCase) const +TTableWindowData::value_type ORelationController::existsTable(const OUString& _rComposedTableName,bool _bCase) const { ::comphelper::UStringMixEqual bCase(_bCase); TTableWindowData::const_iterator aIter = m_vTableData.begin(); diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 5a882da981b1..564439f4844a 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -132,7 +132,7 @@ void ORelationTableView::ReSync() { // gibt es die beiden Tabellen zur Connection ? OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetTableName(); - sal_Bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); + bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); strTabExistenceTest = pTabConnData->getReferencedTable()->GetTableName(); bInvalid = bInvalid || ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); @@ -144,14 +144,14 @@ void ORelationTableView::ReSync() } } - addConnection( new ORelationTableConnection(this, *aConIter), sal_False ); // don't add the data again + addConnection( new ORelationTableConnection(this, *aConIter), false ); // don't add the data again } if ( !GetTabWinMap()->empty() ) GetTabWinMap()->begin()->second->GrabFocus(); } -sal_Bool ORelationTableView::IsAddAllowed() +bool ORelationTableView::IsAddAllowed() { return !m_pView->getController().isReadOnly(); @@ -244,9 +244,9 @@ void ORelationTableView::AddNewRelation() { TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() ); - ORelationDialog aRelDlg(this, pNewConnData, sal_True); + ORelationDialog aRelDlg(this, pNewConnData, true); - sal_Bool bSuccess = (aRelDlg.Execute() == RET_OK); + bool bSuccess = (aRelDlg.Execute() == RET_OK); if (bSuccess) { // already updated by the dialog @@ -274,7 +274,7 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_ return false; } -void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool /*bNewTable*/) +void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool /*bNewTable*/) { OSL_ENSURE(!_rComposedName.isEmpty(),"There must be a table name supplied!"); OJoinTableView::OTableWindowMap::iterator aIter = GetTabWinMap()->find(_rComposedName); @@ -290,7 +290,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin // enter the new data structure into DocShell TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName )); - pNewTabWinData->ShowAll(sal_False); + pNewTabWinData->ShowAll(false); // Neues Fenster in Fensterliste eintragen OTableWindow* pNewTabWin = createWindow( pNewTabWinData ); diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index 058ae3489cf8..167cc017574a 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -55,7 +55,7 @@ void OFieldDescGenWin::Resize() m_pFieldControl->Resize(); } -void OFieldDescGenWin::SetReadOnly( sal_Bool bReadOnly ) +void OFieldDescGenWin::SetReadOnly( bool bReadOnly ) { m_pFieldControl->SetReadOnly(bReadOnly); @@ -116,17 +116,17 @@ OUString OFieldDescGenWin::BoolStringUI(const OUString& rPersistentString) const return m_pFieldControl->BoolStringUI(rPersistentString); } -sal_Bool OFieldDescGenWin::isCopyAllowed() +bool OFieldDescGenWin::isCopyAllowed() { return (m_pFieldControl && m_pFieldControl->isCutAllowed()); } -sal_Bool OFieldDescGenWin::isCutAllowed() +bool OFieldDescGenWin::isCutAllowed() { return (m_pFieldControl && m_pFieldControl->isCutAllowed()); } -sal_Bool OFieldDescGenWin::isPasteAllowed() +bool OFieldDescGenWin::isPasteAllowed() { return (m_pFieldControl && m_pFieldControl->isPasteAllowed()); } diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx index 39aba8759f74..e4a8c541515c 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx @@ -48,7 +48,7 @@ namespace dbaui void SaveData( OFieldDescription* pFieldDescr ); void SetControlText( sal_uInt16 nControlId, const OUString& rText ); OUString GetControlText( sal_uInt16 nControlId ); - void SetReadOnly( sal_Bool bReadOnly ); + void SetReadOnly( bool bReadOnly ); #if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* GetEditorCtrl(); #endif @@ -59,10 +59,10 @@ namespace dbaui OUString BoolStringUI(const OUString& rPersistentString) const; // IClipboardTest - virtual sal_Bool isCutAllowed() SAL_OVERRIDE; - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE; - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + virtual bool isCutAllowed() SAL_OVERRIDE; + virtual bool isCopyAllowed() SAL_OVERRIDE; + virtual bool isPasteAllowed() SAL_OVERRIDE; + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } virtual void copy() SAL_OVERRIDE; virtual void cut() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index e8668f9a1806..f7ea19a66701 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -48,10 +48,10 @@ OFieldDescription::OFieldDescription() ,m_nIsNullable(ColumnValue::NULLABLE) ,m_nFormatKey(0) ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD) - ,m_bIsAutoIncrement(sal_False) - ,m_bIsPrimaryKey(sal_False) - ,m_bIsCurrency(sal_False) - ,m_bHidden(sal_False) + ,m_bIsAutoIncrement(false) + ,m_bIsPrimaryKey(false) + ,m_bIsCurrency(false) + ,m_bHidden(false) { } @@ -84,7 +84,7 @@ OFieldDescription::~OFieldDescription() { } -OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedCol,sal_Bool _bUseAsDest) +OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedCol,bool _bUseAsDest) :m_pType() ,m_nType(DataType::VARCHAR) ,m_nPrecision(0) @@ -92,10 +92,10 @@ OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedC ,m_nIsNullable(ColumnValue::NULLABLE) ,m_nFormatKey(0) ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD) - ,m_bIsAutoIncrement(sal_False) - ,m_bIsPrimaryKey(sal_False) - ,m_bIsCurrency(sal_False) - ,m_bHidden(sal_False) + ,m_bIsAutoIncrement(false) + ,m_bIsPrimaryKey(false) + ,m_bIsCurrency(false) + ,m_bHidden(false) { OSL_ENSURE(xAffectedCol.is(),"PropetySet can notbe null!"); if ( xAffectedCol.is() ) @@ -167,7 +167,7 @@ OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedC } } -void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bForce,sal_Bool _bReset) +void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,bool _bForce,bool _bReset) { TOTypeInfoSP pOldType = getTypeInfo(); if ( _pType != pOldType ) @@ -179,7 +179,7 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF SetControlDefault(Any()); } - sal_Bool bForce = _bForce || pOldType.get() == NULL || pOldType->nType != _pType->nType; + bool bForce = _bForce || pOldType.get() == NULL || pOldType->nType != _pType->nType; switch ( _pType->nType ) { case DataType::CHAR: @@ -229,7 +229,7 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF if ( !_pType->bNullable && IsNullable() ) SetIsNullable(ColumnValue::NO_NULLS); if ( !_pType->bAutoIncrement && IsAutoIncrement() ) - SetAutoIncrement(sal_False); + SetAutoIncrement(false); SetCurrency( _pType->bCurrency ); SetType(_pType); SetTypeName(_pType->aTypeName); @@ -438,7 +438,7 @@ void OFieldDescription::SetHorJustify(const SvxCellHorJustify& _rHorJustify) } } -void OFieldDescription::SetAutoIncrement(sal_Bool _bAuto) +void OFieldDescription::SetAutoIncrement(bool _bAuto) { try { @@ -453,14 +453,14 @@ void OFieldDescription::SetAutoIncrement(sal_Bool _bAuto) } } -void OFieldDescription::SetPrimaryKey(sal_Bool _bPKey) +void OFieldDescription::SetPrimaryKey(bool _bPKey) { m_bIsPrimaryKey = _bPKey; if ( _bPKey ) SetIsNullable(::com::sun::star::sdbc::ColumnValue::NO_NULLS); } -void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) +void OFieldDescription::SetCurrency(bool _bIsCurrency) { m_bIsCurrency = _bIsCurrency; } @@ -592,7 +592,7 @@ TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const return pSpecialType; } -sal_Bool OFieldDescription::IsAutoIncrement() const +bool OFieldDescription::IsAutoIncrement() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT) ) return ::cppu::any2bool(m_xDest->getPropertyValue(PROPERTY_ISAUTOINCREMENT)); @@ -600,17 +600,17 @@ sal_Bool OFieldDescription::IsAutoIncrement() const return m_bIsAutoIncrement; } -sal_Bool OFieldDescription::IsPrimaryKey() const +bool OFieldDescription::IsPrimaryKey() const { return m_bIsPrimaryKey; } -sal_Bool OFieldDescription::IsCurrency() const +bool OFieldDescription::IsCurrency() const { return m_bIsCurrency; } -sal_Bool OFieldDescription::IsNullable() const +bool OFieldDescription::IsNullable() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) ) return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ISNULLABLE)) == ::com::sun::star::sdbc::ColumnValue::NULLABLE; diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index af8a96dcbd18..0295bc916c8e 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -101,7 +101,7 @@ void OTableEditorCtrl::Init() OTableRowView::Init(); // Should it be opened ReadOnly? - sal_Bool bRead(GetView()->getController().isReadOnly()); + bool bRead(GetView()->getController().isReadOnly()); SetReadOnly( bRead ); @@ -113,7 +113,7 @@ void OTableEditorCtrl::Init() InsertDataColumn( FIELD_TYPE, aColumnName, FIELDTYPE_WIDTH ); ::dbaccess::ODsnTypeCollection aDsnTypes(GetView()->getController().getORB()); - sal_Bool bShowColumnDescription = aDsnTypes.supportsColumnDescription(::comphelper::getString(GetView()->getController().getDataSource()->getPropertyValue(PROPERTY_URL))); + bool bShowColumnDescription = aDsnTypes.supportsColumnDescription(::comphelper::getString(GetView()->getController().getDataSource()->getPropertyValue(PROPERTY_URL))); aColumnName = ModuleRes(STR_TAB_HELP_TEXT); InsertDataColumn( HELP_TEXT, aColumnName, bShowColumnDescription ? FIELDTYPE_WIDTH : FIELDDESCR_WIDTH ); @@ -153,8 +153,8 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) ,nInvalidateTypeEvent(0) ,m_eChildFocus(NONE) ,nOldDataPos(-1) - ,bSaveOnMove(sal_True) - ,bReadOnly(sal_True) + ,bSaveOnMove(true) + ,bReadOnly(true) ,m_aInvalidate(500,this) { @@ -170,12 +170,12 @@ SfxUndoManager& OTableEditorCtrl::GetUndoManager() const return GetView()->getController().GetUndoManager(); } -sal_Bool OTableEditorCtrl::IsReadOnly() +bool OTableEditorCtrl::IsReadOnly() { return bReadOnly; } -void OTableEditorCtrl::SetReadOnly( sal_Bool bRead ) +void OTableEditorCtrl::SetReadOnly( bool bRead ) { // nothing to do? if (bRead == IsReadOnly()) @@ -289,14 +289,14 @@ OTableEditorCtrl::~OTableEditorCtrl() delete pHelpTextCell; } -sal_Bool OTableEditorCtrl::SetDataPtr( long nRow ) +bool OTableEditorCtrl::SetDataPtr( long nRow ) { if(nRow == -1) - return sal_False; + return false; OSL_ENSURE(nRow < (long)m_pRowList->size(),"Row is greater than size!"); if(nRow >= (long)m_pRowList->size()) - return sal_False; + return false; pActRow = (*m_pRowList)[nRow]; return pActRow != 0; } @@ -427,26 +427,26 @@ EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(long nRow) const } } -sal_Bool OTableEditorCtrl::SaveCurRow() +bool OTableEditorCtrl::SaveCurRow() { if (GetFieldDescr(GetCurRow()) == NULL) // there is no data in the current row - return sal_True; + return true; if (!SaveModified()) - return sal_False; + return false; SetDataPtr(GetCurRow()); pDescrWin->SaveData( pActRow->GetActFieldDescr() ); - return sal_True; + return true; } -void OTableEditorCtrl::DisplayData(long nRow, sal_Bool bGrabFocus) +void OTableEditorCtrl::DisplayData(long nRow, bool bGrabFocus) { // go to the correct cell SetDataPtr(nRow); // Disable Edit-Mode temporarily - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -504,7 +504,7 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const OUString& rFieldName ) return nCount; } -sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) +bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) { // Store the cell content SetDataPtr( nRow == -1 ? GetCurRow() : nRow); @@ -528,7 +528,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) pActFieldDescr = pActRow->GetActFieldDescr(); } else - return sal_True; + return true; } if(pActFieldDescr) pActFieldDescr->SetName( aName ); @@ -588,7 +588,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) } break; } - return sal_True; + return true; } bool OTableEditorCtrl::SaveModified() @@ -829,9 +829,9 @@ void OTableEditorCtrl::InsertRows( long nRow ) } // RowInserted calls CursorMoved. // The UI data should not be stored here. - bSaveOnMove = sal_False; + bSaveOnMove = false; RowInserted( nRow,vInsertedUndoRedoRows.size(), true ); - bSaveOnMove = sal_True; + bSaveOnMove = true; // Create the Undo-Action GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); @@ -848,7 +848,7 @@ void OTableEditorCtrl::DeleteRows() // Delete all marked rows long nIndex = FirstSelectedRow(); nOldDataPos = nIndex; - bSaveOnMove = sal_False; + bSaveOnMove = false; while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) { @@ -863,7 +863,7 @@ void OTableEditorCtrl::DeleteRows() nIndex = FirstSelectedRow(); } - bSaveOnMove = sal_True; + bSaveOnMove = true; // Force the current record to be displayed m_nDataPos = GetCurRow(); @@ -1130,9 +1130,9 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow ) return pRow->GetActFieldDescr(); } -sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) +bool OTableEditorCtrl::IsCutAllowed( long nRow ) { - sal_Bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) || + bool bIsCutAllowed = (GetView()->getController().isAddAllowed() && GetView()->getController().isDropAllowed()) || GetView()->getController().isAlterAllowed(); if(bIsCutAllowed) @@ -1152,7 +1152,7 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) bIsCutAllowed = IsCopyAllowed(nRow); break; default: - bIsCutAllowed = sal_False; + bIsCutAllowed = false; break; } } @@ -1160,9 +1160,9 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) return bIsCutAllowed; } -sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) { - sal_Bool bIsCopyAllowed = sal_False; + bool bIsCopyAllowed = false; if(m_eChildFocus == DESCRIPTION ) bIsCopyAllowed = !pDescrCell->GetSelected().isEmpty(); else if(HELPTEXT == m_eChildFocus ) @@ -1173,7 +1173,7 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) { Reference<XPropertySet> xTable = GetView()->getController().getTable(); if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW")) - return sal_False; + return false; // If one of the selected rows is empty, Copy is not possible ::boost::shared_ptr<OTableRow> pRow; @@ -1182,24 +1182,24 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) { pRow = (*m_pRowList)[nIndex]; if( !pRow->GetActFieldDescr() ) - return sal_False; + return false; nIndex = NextSelectedRow(); } - bIsCopyAllowed = sal_True; + bIsCopyAllowed = true; } return bIsCopyAllowed; } -sal_Bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) { - sal_Bool bAllowed = GetView()->getController().isAddAllowed(); + bool bAllowed = GetView()->getController().isAddAllowed(); if ( bAllowed ) { TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); - sal_Bool bRowFormat = aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED); + bool bRowFormat = aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED); if ( m_eChildFocus == ROW ) bAllowed = bRowFormat; else @@ -1293,42 +1293,42 @@ void OTableEditorCtrl::paste() } } -sal_Bool OTableEditorCtrl::IsDeleteAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsDeleteAllowed( long /*nRow*/ ) { return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed(); } -sal_Bool OTableEditorCtrl::IsInsertNewAllowed( long nRow ) +bool OTableEditorCtrl::IsInsertNewAllowed( long nRow ) { - sal_Bool bInsertNewAllowed = GetView()->getController().isAddAllowed(); + bool bInsertNewAllowed = GetView()->getController().isAddAllowed(); // If fields can be added, Paste in the new fields if (bInsertNewAllowed && !GetView()->getController().isDropAllowed()) { SetDataPtr(nRow); if( GetActRow()->IsReadOnly() ) - return sal_False; + return false; } return bInsertNewAllowed; } -sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) +bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) { if( !GetSelectRowCount() ) - return sal_False; + return false; OTableController& rController = GetView()->getController(); if ( !rController.getSdbMetaData().supportsPrimaryKeys() ) - return sal_False; + return false; Reference<XPropertySet> xTable = rController.getTable(); // Key must not be changed // This applies only if the table is not new and not a ::com::sun::star::sdbcx::View. Otherwise no DROP is executed if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW") - return sal_False; + return false; // If there is an empty field, no primary key // The entry is only permitted if // - there are no empty entries in the selection @@ -1341,7 +1341,7 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) pRow = (*m_pRowList)[nIndex]; OFieldDescription* pFieldDescr = pRow->GetActFieldDescr(); if(!pFieldDescr) - return sal_False; + return false; else { // Memo and Image fields cannot be primary keys @@ -1351,13 +1351,13 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) if( pTypeInfo->nSearchType == ColumnSearch::NONE || (pFieldDescr->IsNullable() && pRow->IsReadOnly()) ) - return sal_False; + return false; } nIndex = NextSelectedRow(); } - return sal_True; + return true; } void OTableEditorCtrl::Command(const CommandEvent& rEvt) @@ -1535,8 +1535,8 @@ IMPL_LINK( OTableEditorCtrl, DelayedInsNewRows, void*, /*EMPTYTAG*/ ) void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc, MultiSelection& _rMultiSel, sal_Int32 _nPos, - sal_Bool _bSet, - sal_Bool _bPrimaryKey) + bool _bSet, + bool _bPrimaryKey) { _pFieldDesc->SetPrimaryKey( _bPrimaryKey ); if(!_bSet && _pFieldDesc->getTypeInfo()->bNullable) @@ -1559,7 +1559,7 @@ void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc, _rMultiSel.Select( _nPos ); } -void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) +void OTableEditorCtrl::SetPrimaryKey( bool bSet ) { // Delete any existing Primary Keys MultiSelection aDeletedPrimKeys; @@ -1572,7 +1572,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) OFieldDescription* pFieldDescr = (*aIter)->GetActFieldDescr(); if( pFieldDescr && (*aIter)->IsPrimaryKey() && (!bSet || !IsRowSelected(nRow)) ) { - AdjustFieldDescription(pFieldDescr,aDeletedPrimKeys,nRow,bSet,sal_False); + AdjustFieldDescription(pFieldDescr,aDeletedPrimKeys,nRow,bSet,false); } } @@ -1588,7 +1588,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) ::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[nIndex]; OFieldDescription* pFieldDescr = pRow->GetActFieldDescr(); if(pFieldDescr) - AdjustFieldDescription(pFieldDescr,aInsertedPrimKeys,nIndex,sal_False,sal_True); + AdjustFieldDescription(pFieldDescr,aInsertedPrimKeys,nIndex,false,true); nIndex = NextSelectedRow(); } @@ -1604,7 +1604,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) InvalidateFeatures(); } -sal_Bool OTableEditorCtrl::IsPrimaryKey() +bool OTableEditorCtrl::IsPrimaryKey() { // Are all marked fields part of the Primary Key ? long nPrimaryKeys = 0; @@ -1613,7 +1613,7 @@ sal_Bool OTableEditorCtrl::IsPrimaryKey() for(sal_Int32 nRow=0;aIter != aEnd;++aIter,++nRow) { if( IsRowSelected(nRow) && !(*aIter)->IsPrimaryKey() ) - return sal_False; + return false; if( (*aIter)->IsPrimaryKey() ) ++nPrimaryKeys; } @@ -1635,7 +1635,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType ) return; // Show the new description ::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[nRow]; - pRow->SetFieldType( _pType, sal_True ); + pRow->SetFieldType( _pType, true ); if ( _pType.get() ) { const sal_Int32 nCurrentlySelected = pTypeCell->GetSelectEntryPos(); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index b777608ef103..3a8064e908b7 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -64,8 +64,8 @@ namespace dbaui long nOldDataPos; - sal_Bool bSaveOnMove; - sal_Bool bReadOnly; + bool bSaveOnMove; + bool bReadOnly; // helper class class ClipboardInvalidator @@ -111,14 +111,14 @@ namespace dbaui virtual void DeleteRows() SAL_OVERRIDE; virtual void InsertNewRows( long nRow ) SAL_OVERRIDE; - virtual sal_Bool IsPrimaryKeyAllowed( long nRow ) SAL_OVERRIDE; - virtual sal_Bool IsInsertNewAllowed( long nRow ) SAL_OVERRIDE; - virtual sal_Bool IsDeleteAllowed( long nRow ) SAL_OVERRIDE; + virtual bool IsPrimaryKeyAllowed( long nRow ) SAL_OVERRIDE; + virtual bool IsInsertNewAllowed( long nRow ) SAL_OVERRIDE; + virtual bool IsDeleteAllowed( long nRow ) SAL_OVERRIDE; void ClearModified(); - void SetPrimaryKey( sal_Bool bSet ); - sal_Bool IsPrimaryKey(); + void SetPrimaryKey( bool bSet ); + bool IsPrimaryKey(); DECL_LINK(ControlPreNotifyHdl, NotifyEvent*); @@ -135,11 +135,11 @@ namespace dbaui if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } - sal_Bool SaveCurRow(); + bool SaveCurRow(); void SwitchType( const TOTypeInfoSP& _pType ); /// force displaying of the given row - void DisplayData( long nRow, sal_Bool bGrabFocus = sal_True ); + void DisplayData( long nRow, bool bGrabFocus = true ); virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) SAL_OVERRIDE; virtual void SetCellData( long nRow, sal_uInt16 nColId, const ::com::sun::star::uno::Any& _rSaveData ) SAL_OVERRIDE; @@ -153,25 +153,25 @@ namespace dbaui ::boost::shared_ptr<OTableRow> GetActRow(){ return pActRow; } void CellModified( long nRow, sal_uInt16 nColId ); - void SetReadOnly( sal_Bool bRead=sal_True ); + void SetReadOnly( bool bRead=true ); virtual void Init() SAL_OVERRIDE; virtual void DeactivateCell(bool bUpdate = true) SAL_OVERRIDE; - sal_Bool IsCutAllowed( long nRow = -1 ); - sal_Bool IsCopyAllowed( long nRow = -1 ); - sal_Bool IsPasteAllowed( long nRow = -1 ); - sal_Bool IsReadOnly(); + bool IsCutAllowed( long nRow = -1 ); + bool IsCopyAllowed( long nRow = -1 ); + bool IsPasteAllowed( long nRow = -1 ); + bool IsReadOnly(); OFieldDescription* GetFieldDescr( long nRow ); // window overloads virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; // IClipboardTest - virtual sal_Bool isCutAllowed() SAL_OVERRIDE { return IsCutAllowed(); } - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE { return IsCopyAllowed(); } - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE { return IsPasteAllowed(); } - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + virtual bool isCutAllowed() SAL_OVERRIDE { return IsCutAllowed(); } + virtual bool isCopyAllowed() SAL_OVERRIDE { return IsCopyAllowed(); } + virtual bool isPasteAllowed() SAL_OVERRIDE { return IsPasteAllowed(); } + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } virtual void cut() SAL_OVERRIDE; virtual void copy() SAL_OVERRIDE; @@ -188,9 +188,9 @@ namespace dbaui void InitCellController(); sal_Int32 HasFieldName( const OUString& rFieldName ); OUString GenerateName( const OUString& rName ); - sal_Bool SetDataPtr( long nRow ); + bool SetDataPtr( long nRow ); - sal_Bool SaveData(long nRow, sal_uInt16 nColumnId); + bool SaveData(long nRow, sal_uInt16 nColumnId); /** AdjustFieldDescription set the needed values for the description @param _pFieldDesc the field description where to set the values @param _rMultiSel contains the postions which changed for undo/redo @@ -201,8 +201,8 @@ namespace dbaui void AdjustFieldDescription( OFieldDescription* _pFieldDesc, MultiSelection& _rMultiSel, sal_Int32 _nPos, - sal_Bool _bSet, - sal_Bool _bPrimaryKey); + bool _bSet, + bool _bPrimaryKey); /** InvalidateFeatures invalidates the slots SID_UNDO | SID_REDO | SID_SAVEDOC */ void InvalidateFeatures(); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index a8335de80f01..a19fcf465776 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -141,8 +141,8 @@ Reference< XInterface > SAL_CALL OTableController::Create(const Reference<XMulti OTableController::OTableController(const Reference< XComponentContext >& _rM) : OTableController_BASE(_rM) ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES)) ,m_pTypeInfo() - ,m_bAllowAutoIncrementValue(sal_False) - ,m_bNew(sal_True) + ,m_bAllowAutoIncrementValue(false) + ,m_bNew(true) { InvalidateAll(); @@ -252,11 +252,11 @@ void OTableController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& InvalidateFeature(SID_BROWSER_CLEAR_QUERY); break; case ID_BROWSER_SAVEASDOC: - doSaveDoc(sal_True); + doSaveDoc(true); break; case ID_BROWSER_SAVEDOC: static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->SaveCurRow(); - doSaveDoc(sal_False); + doSaveDoc(false); break; case ID_BROWSER_CUT: static_cast<OTableDesignView*>(getView())->cut(); @@ -276,7 +276,7 @@ void OTableController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& InvalidateFeature(_nId); } -sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) +bool OTableController::doSaveDoc(bool _bSaveAs) { if (!isConnected()) reconnect(true); // ask the user for a new connection @@ -286,7 +286,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) { OUString aMessage(ModuleRes(STR_TABLEDESIGN_CONNECTION_MISSING)); OSQLWarningBox( getView(), aMessage ).Execute(); - return sal_False; + return false; } // check if a column exists @@ -295,7 +295,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) Reference<XNameAccess> xTables; OUString sCatalog, sSchema; - sal_Bool bNew = m_sName.isEmpty(); + bool bNew = m_sName.isEmpty(); bNew = bNew || m_bNew || _bSaveAs; try @@ -320,7 +320,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::TABLE ); OSaveAsDlg aDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker ); if ( aDlg.Execute() != RET_OK ) - return sal_False; + return false; m_sName = aDlg.getName(); sCatalog = aDlg.getCatalog(); @@ -329,22 +329,22 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) // did we get a name if(m_sName.isEmpty()) - return sal_False; + return false; } catch(Exception&) { OSL_FAIL("OTableController::doSaveDoc: nothing is expected to happen here!"); } - sal_Bool bAlter = sal_False; - sal_Bool bError = sal_False; + bool bAlter = false; + bool bError = false; SQLExceptionInfo aInfo; try { // check the columns for double names if(!checkColumns(bNew || !xTables->hasByName(m_sName))) { - return sal_False; + return false; } Reference<XPropertySet> xTable; @@ -394,7 +394,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) } else if(m_xTable.is()) { - bAlter = sal_True; + bAlter = true; alterColumns(); } reSyncRows(); @@ -418,11 +418,11 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) OSQLMessageBox aDlg( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error ); aDlg.Execute(); - bError = sal_True; + bError = true; } catch( const Exception& ) { - bError = sal_True; + bError = true; DBG_UNHANDLED_EXCEPTION(); } @@ -451,7 +451,7 @@ void OTableController::doEditIndexes() if (RET_YES != aAsk.Execute()) return; - if (!doSaveDoc(sal_False)) + if (!doSaveDoc(false)) return; OSL_ENSURE(!m_bNew && !isModified(), "OTableController::doEditIndexes: what the hell did doSaveDoc do?"); @@ -556,7 +556,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti return sal_False; if ( getView() ) static_cast<OTableDesignView*>(getView())->GrabFocus(); - sal_Bool bCheck = sal_True; + bool bCheck = true; if ( isModified() ) { ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = ::std::find_if(m_vRowList.begin(),m_vRowList.end(), @@ -569,10 +569,10 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti case RET_YES: Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>()); if ( isModified() ) - bCheck = sal_False; // when we save the table this must be false else some press cancel + bCheck = false; // when we save the table this must be false else some press cancel break; case RET_CANCEL: - bCheck = sal_False; + bCheck = false; default: break; } @@ -598,7 +598,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti } break; case RET_CANCEL: - bCheck = sal_False; + bCheck = false; default: break; } @@ -634,7 +634,7 @@ void SAL_CALL OTableController::disposing( const EventObject& _rSource ) throw(R { // some deleted our table so we have a new one stopTableListening(); m_xTable = NULL; - m_bNew = sal_True; + m_bNew = true; setModified(sal_True); } else @@ -669,7 +669,7 @@ void OTableController::losingConnection( ) assignTable(); if(!m_xTable.is()) { - m_bNew = sal_True; + m_bNew = true; setModified(sal_True); } InvalidateAll(); @@ -680,7 +680,7 @@ TOTypeInfoSP OTableController::getTypeInfoByType(sal_Int32 _nDataType) const return queryTypeInfoByType(_nDataType,m_aTypeInfo); } -void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_Bool _bNew,sal_Bool _bKeyColumns) +void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup, bool _bNew, bool _bKeyColumns) { try { @@ -741,7 +741,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_ } } -void OTableController::appendPrimaryKey(Reference<XKeysSupplier>& _rxSup,sal_Bool _bNew) +void OTableController::appendPrimaryKey(Reference<XKeysSupplier>& _rxSup, bool _bNew) { if(!_rxSup.is()) return; // the database doesn't support keys @@ -776,7 +776,7 @@ void OTableController::appendPrimaryKey(Reference<XKeysSupplier>& _rxSup,sal_Boo Reference<XColumnsSupplier> xColSup(xKey,UNO_QUERY); if(xColSup.is()) { - appendColumns(xColSup,_bNew,sal_True); + appendColumns(xColSup,_bNew,true); Reference<XNameAccess> xColumns = xColSup->getColumns(); if(xColumns->hasElements()) xAppend->appendByDescriptor(xKey); @@ -802,7 +802,7 @@ void OTableController::loadData() // For Add only the empty rows may be editable // For Add and Drop all rows can be edited // sal_Bool bReadOldRow = xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn(); - sal_Bool bIsAlterAllowed = isAlterAllowed(); + bool bIsAlterAllowed = isAlterAllowed(); Sequence< OUString> aColumns = xColumns->getElementNames(); const OUString* pIter = aColumns.getConstArray(); const OUString* pEnd = pIter + aColumns.getLength(); @@ -818,7 +818,7 @@ void OTableController::loadData() sal_Int32 nFormatKey = 0; sal_Int32 nAlign = 0; - sal_Bool bIsAutoIncrement = false, bIsCurrency = false; + bool bIsAutoIncrement = false, bIsCurrency = false; OUString sName,sDescription,sTypeName,sHelpText; Any aControlDefault; @@ -846,7 +846,7 @@ void OTableController::loadData() pTabEdRow.reset(new OTableRow()); pTabEdRow->SetReadOnly(!bIsAlterAllowed); // search for type - sal_Bool bForce; + bool bForce; OUString sCreate("x"); TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,sCreate,nPrecision,nScale,bIsAutoIncrement,bForce); if ( !pTypeInfo.get() ) @@ -889,7 +889,7 @@ void OTableController::loadData() { if((*rowIter)->GetActFieldDescr()->GetName() == *pKeyBegin) { - (*rowIter)->SetPrimaryKey(sal_True); + (*rowIter)->SetPrimaryKey(true); break; } } @@ -919,10 +919,10 @@ Reference<XNameAccess> OTableController::getKeyColumns() const return getPrimaryKeyColumns_throw(m_xTable); } -sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::sdbc::SQLException) +bool OTableController::checkColumns(bool _bNew) throw(::com::sun::star::sdbc::SQLException) { - sal_Bool bOk = sal_True; - sal_Bool bFoundPKey = sal_False; + bool bOk = true; + bool bFoundPKey = false; Reference< XDatabaseMetaData > xMetaData = getMetaData( ); DatabaseMetaData aMetaData( getConnection() ); @@ -945,7 +945,7 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star:: OUString strMessage = ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME); strMessage = strMessage.replaceFirst("$column$", pFieldDesc->GetName()); OSQLWarningBox( getView(), strMessage ).Execute(); - return sal_False; + return false; } } } @@ -968,11 +968,11 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star:: pNewRow->SetFieldType( pTypeInfo ); OFieldDescription* pActFieldDescr = pNewRow->GetActFieldDescr(); - pActFieldDescr->SetAutoIncrement(sal_False); + pActFieldDescr->SetAutoIncrement(false); pActFieldDescr->SetIsNullable(ColumnValue::NO_NULLS); pActFieldDescr->SetName( createUniqueName(OUString("ID") )); - pActFieldDescr->SetPrimaryKey( sal_True ); + pActFieldDescr->SetPrimaryKey( true ); m_vRowList.insert(m_vRowList.begin(),pNewRow); static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->Invalidate(); @@ -980,7 +980,7 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star:: } break; case RET_CANCEL: - bOk = sal_False; + bOk = false; break; } } @@ -1004,7 +1004,7 @@ void OTableController::alterColumns() Reference<XAppend> xAppend(xColumns,UNO_QUERY); // can be null Reference<XDataDescriptorFactory> xColumnFactory(xColumns,UNO_QUERY); // can be null - sal_Bool bReload = sal_False; // refresh the data + bool bReload = false; // refresh the data // contains all columns names which are already handled those which are not in the list will be deleted Reference< XDatabaseMetaData> xMetaData = getMetaData( ); @@ -1034,7 +1034,7 @@ void OTableController::alterColumns() OSL_ENSURE(xColumn.is(),"Column is null!"); sal_Int32 nType=0,nPrecision=0,nScale=0,nNullable=0; - sal_Bool bAutoIncrement = false; + bool bAutoIncrement = false; OUString sTypeName,sDescription; xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; @@ -1068,7 +1068,7 @@ void OTableController::alterColumns() xNewColumn = xColumnFactory->createDataDescriptor(); ::dbaui::setColumnProperties(xNewColumn,pField); // first try to alter the column - sal_Bool bNotOk = sal_False; + bool bNotOk = false; try { // first try if we can alter the column @@ -1108,7 +1108,7 @@ void OTableController::alterColumns() xNewColumn = NULL; if(xColumns->hasByName(pField->GetName())) xColumns->getByName(pField->GetName()) >>= xColumn; - bReload = sal_True; + bReload = true; } } @@ -1134,7 +1134,7 @@ void OTableController::alterColumns() } catch(const SQLException&) { // we couldn't alter the column so we have to add new columns - bReload = sal_True; + bReload = true; if(xDrop.is() && xAppend.is()) { OUString aMessage(ModuleRes(STR_TABLEDESIGN_ALTER_ERROR)); @@ -1155,7 +1155,7 @@ void OTableController::alterColumns() } } else - bReload = sal_True; + bReload = true; } // alter column settings aIter = m_vRowList.begin(); @@ -1214,7 +1214,7 @@ void OTableController::alterColumns() } else { - bReload = sal_True; + bReload = true; continue; } } @@ -1272,8 +1272,8 @@ void OTableController::alterColumns() } // check if we have to do something with the primary key - sal_Bool bNeedDropKey = sal_False; - sal_Bool bNeedAppendKey = sal_False; + bool bNeedDropKey = false; + bool bNeedAppendKey = false; if ( xKeyColumns.is() ) { aIter = m_vRowList.begin(); @@ -1288,21 +1288,21 @@ void OTableController::alterColumns() && !xKeyColumns->hasByName( pField->GetName() ) ) { // new primary key column inserted which isn't already in the columns selection - bNeedDropKey = bNeedAppendKey = sal_True; + bNeedDropKey = bNeedAppendKey = true; break; } else if ( !pField->IsPrimaryKey() && xKeyColumns->hasByName( pField->GetName() ) ) { // found a column which currently is in the primary key, but is marked not to be anymore - bNeedDropKey = bNeedAppendKey = sal_True; + bNeedDropKey = bNeedAppendKey = true; break; } } } else { // no primary key available so we check if we should create one - bNeedAppendKey = sal_True; + bNeedAppendKey = true; } if ( bNeedDropKey && xKeyColumns.is() && xKeyColumns->getElementNames().getLength() ) @@ -1311,7 +1311,7 @@ void OTableController::alterColumns() if ( bNeedAppendKey ) { Reference< XKeysSupplier > xKeySup( m_xTable, UNO_QUERY ); - appendPrimaryKey( xKeySup ,sal_False); + appendPrimaryKey( xKeySup ,false); } reSyncRows(); @@ -1394,7 +1394,7 @@ void OTableController::assignTable() { ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True ))); } - m_bNew = sal_False; + m_bNew = false; // be notified when the table is in disposing InvalidateAll(); } @@ -1403,10 +1403,10 @@ void OTableController::assignTable() } } -sal_Bool OTableController::isAddAllowed() const +bool OTableController::isAddAllowed() const { Reference<XColumnsSupplier> xColsSup(m_xTable,UNO_QUERY); - sal_Bool bAddAllowed = !m_xTable.is(); + bool bAddAllowed = !m_xTable.is(); if(xColsSup.is()) bAddAllowed = Reference<XAppend>(xColsSup->getColumns(),UNO_QUERY).is(); @@ -1418,16 +1418,16 @@ sal_Bool OTableController::isAddAllowed() const catch(Exception&) { DBG_UNHANDLED_EXCEPTION(); - bAddAllowed = sal_False; + bAddAllowed = false; } return bAddAllowed; } -sal_Bool OTableController::isDropAllowed() const +bool OTableController::isDropAllowed() const { Reference<XColumnsSupplier> xColsSup(m_xTable,UNO_QUERY); - sal_Bool bDropAllowed = !m_xTable.is(); + bool bDropAllowed = !m_xTable.is(); if(xColsSup.is()) { Reference<XNameAccess> xNameAccess = xColsSup->getColumns(); @@ -1440,16 +1440,16 @@ sal_Bool OTableController::isDropAllowed() const return bDropAllowed; } -sal_Bool OTableController::isAlterAllowed() const +bool OTableController::isAlterAllowed() const { - sal_Bool bAllowed(!m_xTable.is() || Reference<XAlterTable>(m_xTable,UNO_QUERY).is()); + bool bAllowed(!m_xTable.is() || Reference<XAlterTable>(m_xTable,UNO_QUERY).is()); return bAllowed; } void OTableController::reSyncRows() { - sal_Bool bAlterAllowed = isAlterAllowed(); - sal_Bool bAddAllowed = isAddAllowed(); + bool bAlterAllowed = isAlterAllowed(); + bool bAddAllowed = isAddAllowed(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_vRowList.begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aEnd = m_vRowList.end(); for(;aIter != aEnd;++aIter) diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 90dafa2287be..e34c108515f5 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -41,9 +41,9 @@ OTableRowView::OTableRowView(Window* pParent) ,m_nDataPos(-1) ,m_nCurrentPos(-1) ,m_nCurUndoActId(0) - ,m_bCurrentModified(sal_False) - ,m_bUpdatable(sal_False) - ,m_bClipboardFilled(sal_False) + ,m_bCurrentModified(false) + ,m_bUpdatable(false) + ,m_bClipboardFilled(false) { } @@ -98,7 +98,7 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt ) EditBrowseBox::KeyInput(rEvt); } -void OTableRowView::SetUpdatable( sal_Bool bUpdate ) +void OTableRowView::SetUpdatable( bool bUpdate ) { m_bUpdatable = bUpdate; diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index 2bb1d3feff4e..36161117a219 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -69,19 +69,19 @@ bool OTableDesignHelpBar::PreNotify( NotifyEvent& rNEvt ) return TabPage::PreNotify(rNEvt); } -sal_Bool OTableDesignHelpBar::isCopyAllowed() +bool OTableDesignHelpBar::isCopyAllowed() { return m_pTextWin && !m_pTextWin->GetSelected().isEmpty(); } -sal_Bool OTableDesignHelpBar::isCutAllowed() +bool OTableDesignHelpBar::isCutAllowed() { - return sal_False; + return false; } -sal_Bool OTableDesignHelpBar::isPasteAllowed() +bool OTableDesignHelpBar::isPasteAllowed() { - return sal_False; + return false; } void OTableDesignHelpBar::cut() diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index d243b2673f4e..239848c2fe6f 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -45,7 +45,7 @@ OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORD ,m_aHorzSplitter( this ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); // Children erzeugen m_pEditorCtrl = new OTableEditorCtrl( this); m_pFieldDescWin = new OTableFieldDescWin( this ); @@ -116,7 +116,7 @@ IMPL_LINK( OTableBorderWindow, SplitHdl, Splitter*, pSplit ) return 0; } -void OTableBorderWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void OTableBorderWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -152,7 +152,7 @@ void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -221,7 +221,7 @@ void OTableDesignView::resizeDocumentView(Rectangle& _rPlayground) bool OTableDesignView::PreNotify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch(rNEvt.GetType()) { case EVENT_GETFOCUS: @@ -254,19 +254,19 @@ IClipboardTest* OTableDesignView::getActiveChild() const return pTest; } -sal_Bool OTableDesignView::isCopyAllowed() +bool OTableDesignView::isCopyAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCopyAllowed(); } -sal_Bool OTableDesignView::isCutAllowed() +bool OTableDesignView::isCutAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCutAllowed(); } -sal_Bool OTableDesignView::isPasteAllowed() +bool OTableDesignView::isPasteAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isPasteAllowed(); @@ -294,7 +294,7 @@ void OTableDesignView::paste() } // set the view readonly or not -void OTableDesignView::setReadOnly(sal_Bool _bReadOnly) +void OTableDesignView::setReadOnly(bool _bReadOnly) { GetDescWin()->SetReadOnly(_bReadOnly); GetEditorCtrl()->SetReadOnly(_bReadOnly); diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index 86726ba3867c..8c6815507390 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -51,15 +51,15 @@ OTableEditorCtrl* OTableFieldControl::GetCtrl() const return pDesignWin->GetEditorCtrl(); } -sal_Bool OTableFieldControl::IsReadOnly() +bool OTableFieldControl::IsReadOnly() { - sal_Bool bRead(GetCtrl()->IsReadOnly()); + bool bRead(GetCtrl()->IsReadOnly()); if( !bRead ) { // The columns of a ::com::sun::star::sdbcx::View could not be locked Reference<XPropertySet> xTable = GetCtrl()->GetView()->getController().getTable(); if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW") - bRead = sal_True; + bRead = true; else { ::boost::shared_ptr<OTableRow> pCurRow = GetCtrl()->GetActRow(); @@ -94,7 +94,7 @@ void OTableFieldControl::DeactivateAggregate( EControlType eType ) } } -void OTableFieldControl::SetModified(sal_Bool bModified) +void OTableFieldControl::SetModified(bool bModified) { GetCtrl()->GetView()->getController().setModified(bModified); } @@ -132,7 +132,7 @@ Locale OTableFieldControl::GetLocale() const return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getLocale(); } -sal_Bool OTableFieldControl::isAutoIncrementValueEnabled() const +bool OTableFieldControl::isAutoIncrementValueEnabled() const { return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().isAutoIncrementValueEnabled(); } diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx index bf0b501f2691..0e2a6d9ee8f8 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx @@ -34,15 +34,15 @@ namespace dbaui virtual void DeactivateAggregate( EControlType eType ) SAL_OVERRIDE; // are to be implemented by the derived classes virtual void CellModified(long nRow, sal_uInt16 nColId ) SAL_OVERRIDE; - virtual sal_Bool IsReadOnly() SAL_OVERRIDE; - virtual void SetModified(sal_Bool bModified) SAL_OVERRIDE; + virtual bool IsReadOnly() SAL_OVERRIDE; + virtual void SetModified(bool bModified) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const SAL_OVERRIDE; virtual ::com::sun::star::lang::Locale GetLocale() const SAL_OVERRIDE; virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) SAL_OVERRIDE; virtual const OTypeInfoMap* getTypeInfo() const SAL_OVERRIDE; - virtual sal_Bool isAutoIncrementValueEnabled() const SAL_OVERRIDE; + virtual bool isAutoIncrementValueEnabled() const SAL_OVERRIDE; virtual OUString getAutoIncrementValue() const SAL_OVERRIDE; public: diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 335cb7dddfde..aa3ab08bc6de 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -91,7 +91,7 @@ void OTableFieldDescWin::Init() getGenPage()->Init(); } -void OTableFieldDescWin::SetReadOnly( sal_Bool bRead ) +void OTableFieldDescWin::SetReadOnly( bool bRead ) { getGenPage()->SetReadOnly( bRead ); } @@ -219,17 +219,17 @@ IClipboardTest* OTableFieldDescWin::getActiveChild() const return pTest; } -sal_Bool OTableFieldDescWin::isCopyAllowed() +bool OTableFieldDescWin::isCopyAllowed() { return getActiveChild() && getActiveChild()->isCopyAllowed(); } -sal_Bool OTableFieldDescWin::isCutAllowed() +bool OTableFieldDescWin::isCutAllowed() { return (getGenPage() && getGenPage()->HasChildPathFocus() && getGenPage()->isCutAllowed()); } -sal_Bool OTableFieldDescWin::isPasteAllowed() +bool OTableFieldDescWin::isPasteAllowed() { return (getGenPage() && getGenPage()->HasChildPathFocus() && getGenPage()->isPasteAllowed()); } @@ -266,7 +266,7 @@ void OTableFieldDescWin::LoseFocus() bool OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch(rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index 6ab4d6897352..bacca41291fe 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -60,7 +60,7 @@ namespace dbaui void DisplayData( OFieldDescription* pFieldDescr ); void SaveData( OFieldDescription* pFieldDescr ); - void SetReadOnly( sal_Bool bReadOnly ); + void SetReadOnly( bool bReadOnly ); // window overloads virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; @@ -79,10 +79,10 @@ namespace dbaui OUString BoolStringUI(const OUString& rPersistentString) const { return m_pGenPage->BoolStringUI(rPersistentString); } // IClipboardTest - virtual sal_Bool isCutAllowed() SAL_OVERRIDE; - virtual sal_Bool isCopyAllowed() SAL_OVERRIDE; - virtual sal_Bool isPasteAllowed() SAL_OVERRIDE; - virtual sal_Bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } + virtual bool isCutAllowed() SAL_OVERRIDE; + virtual bool isCopyAllowed() SAL_OVERRIDE; + virtual bool isPasteAllowed() SAL_OVERRIDE; + virtual bool hasChildPathFocus() SAL_OVERRIDE { return HasChildPathFocus(); } virtual void copy() SAL_OVERRIDE; virtual void cut() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx index ca3e35b7ad51..2c56e3166783 100644 --- a/dbaccess/source/ui/tabledesign/TableRow.cxx +++ b/dbaccess/source/ui/tabledesign/TableRow.cxx @@ -67,18 +67,18 @@ OTableRow::~OTableRow() delete m_pActFieldDescr; } -void OTableRow::SetPrimaryKey( sal_Bool bSet ) +void OTableRow::SetPrimaryKey( bool bSet ) { if(m_pActFieldDescr) m_pActFieldDescr->SetPrimaryKey(bSet); } -sal_Bool OTableRow::IsPrimaryKey() const +bool OTableRow::IsPrimaryKey() const { return m_pActFieldDescr && m_pActFieldDescr->IsPrimaryKey(); } -void OTableRow::SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce ) +void OTableRow::SetFieldType( const TOTypeInfoSP& _pType, bool _bForce ) { if ( _pType.get() ) { @@ -87,7 +87,7 @@ void OTableRow::SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce ) m_pActFieldDescr = new OFieldDescription(); m_bOwnsDescriptions = true; } - m_pActFieldDescr->FillFromTypeInfo(_pType,_bForce,sal_True); + m_pActFieldDescr->FillFromTypeInfo(_pType,_bForce,true); } else { diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 43349f41f6b9..1411a8d029a3 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -347,7 +347,7 @@ void OPrimKeyUndoAct::Undo() { OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!"); pRow = (*pRowList)[nIndex]; - pRow->SetPrimaryKey( sal_False ); + pRow->SetPrimaryKey( false ); } // restore deleted keys @@ -355,7 +355,7 @@ void OPrimKeyUndoAct::Undo() { OSL_ENSURE(nIndex <= static_cast<long>(pRowList->size()),"Index for undo isn't valid!"); pRow = (*pRowList)[nIndex]; - pRow->SetPrimaryKey( sal_True ); + pRow->SetPrimaryKey( true ); } m_pEditorCtrl->InvalidateHandleColumn(); @@ -369,11 +369,11 @@ void OPrimKeyUndoAct::Redo() // delete the deleted keys for( nIndex = m_aDelKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() ) - (*pRowList)[nIndex]->SetPrimaryKey( sal_False ); + (*pRowList)[nIndex]->SetPrimaryKey( false ); // restore the inserted keys for( nIndex = m_aInsKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() ) - (*pRowList)[nIndex]->SetPrimaryKey( sal_True ); + (*pRowList)[nIndex]->SetPrimaryKey( true ); m_pEditorCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx index 040717436328..11c48483a8e7 100644 --- a/dbaccess/source/ui/uno/ColumnModel.cxx +++ b/dbaccess/source/ui/uno/ColumnModel.cxx @@ -51,7 +51,7 @@ OColumnControlModel::OColumnControlModel(const Reference<XMultiServiceFactory>& ,OColumnControlModel_BASE(m_aMutex) ,m_xORB(_rxFactory) ,m_sDefaultControl(SERVICE_CONTROLDEFAULT) - ,m_bEnable(sal_True) + ,m_bEnable(true) ,m_nBorder(0) ,m_nWidth(50) { diff --git a/dbaccess/source/ui/uno/ColumnModel.hxx b/dbaccess/source/ui/uno/ColumnModel.hxx index 31c05877a057..1fa4941b7f6f 100644 --- a/dbaccess/source/ui/uno/ColumnModel.hxx +++ b/dbaccess/source/ui/uno/ColumnModel.hxx @@ -55,7 +55,7 @@ class OColumnControlModel : public ::comphelper::OMutexAndBroadcastHelper ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xColumn; OUString m_sDefaultControl; ::com::sun::star::uno::Any m_aTabStop; - sal_Bool m_bEnable; + bool m_bEnable; sal_Int16 m_nBorder; sal_Int32 m_nWidth; // [properties] diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx index 3a5cf3e673eb..2de839f8382b 100644 --- a/dbaccess/source/ui/uno/ColumnPeer.cxx +++ b/dbaccess/source/ui/uno/ColumnPeer.cxx @@ -71,7 +71,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn) sal_Int32 nType = 0; sal_Int32 nScale = 0; sal_Int32 nPrecision = 0; - sal_Bool bAutoIncrement = sal_False; + bool bAutoIncrement = false; OUString sTypeName; try @@ -87,15 +87,15 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn) { } - m_pActFieldDescr = new OFieldDescription(_xColumn,sal_True); + m_pActFieldDescr = new OFieldDescription(_xColumn,true); // search for type OUString sCreateParam("x"); - sal_Bool bForce; + bool bForce; TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(*pFieldControl->getTypeInfo(),nType,sTypeName,sCreateParam,nPrecision,nScale,bAutoIncrement,bForce); if ( !pTypeInfo.get() ) pTypeInfo = pFieldControl->getDefaultTyp(); - m_pActFieldDescr->FillFromTypeInfo(pTypeInfo,sal_True,sal_False); + m_pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false); m_xColumn = _xColumn; } pFieldControl->DisplayData(m_pActFieldDescr); diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx index 9b030e4c0056..ddc72538b3ec 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx @@ -46,8 +46,8 @@ namespace dbaui ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) - ,m_bOpenDatabase(sal_True) - ,m_bStartTableWizard(sal_False) + ,m_bOpenDatabase(true) + ,m_bStartTableWizard(false) { registerProperty(OUString("OpenDatabase"), 3, PropertyAttribute::TRANSIENT, &m_bOpenDatabase, getBooleanCppuType()); diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx index 601dec198ab1..e5a2b0945a65 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx @@ -30,8 +30,8 @@ class ODBTypeWizDialogSetup ,public ::comphelper::OPropertyArrayUsageHelper< ODBTypeWizDialogSetup > { OUString m_sExistingDocToOpen; - sal_Bool m_bOpenDatabase; - sal_Bool m_bStartTableWizard; + bool m_bOpenDatabase; + bool m_bStartTableWizard; protected: ODBTypeWizDialogSetup(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB); diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index da7ac7e00ebf..785d92abffa4 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -332,7 +332,7 @@ private: sal_Int16 m_nOperation; OUString m_sDestinationTable; Optional< OUString > m_aPrimaryKeyName; - sal_Bool m_bUseHeaderLineAsColumnNames; + bool m_bUseHeaderLineAsColumnNames; // source SharedConnection m_xSourceConnection; @@ -343,7 +343,7 @@ private: SAL_WNODEPRECATED_DECLARATIONS_POP Reference< XResultSet > m_xSourceResultSet; Sequence< Any > m_aSourceSelection; - sal_Bool m_bSourceSelectionBookmarks; + bool m_bSourceSelectionBookmarks; // destination SharedConnection m_xDestConnection; @@ -382,13 +382,13 @@ CopyTableWizard::CopyTableWizard( const Reference< XComponentContext >& _rxORB ) ,m_nOperation( CopyTableOperation::CopyDefinitionAndData ) ,m_sDestinationTable() ,m_aPrimaryKeyName( sal_False, "ID" ) - ,m_bUseHeaderLineAsColumnNames( sal_True ) + ,m_bUseHeaderLineAsColumnNames( true ) ,m_xSourceConnection() ,m_nCommandType( CommandType::COMMAND ) ,m_pSourceObject() ,m_xSourceResultSet() ,m_aSourceSelection() - ,m_bSourceSelectionBookmarks( sal_True ) + ,m_bSourceSelectionBookmarks( true ) ,m_xDestConnection() ,m_aCopyTableListeners( m_aMutex ) ,m_nOverrideExecutionResult( -1 ) @@ -1174,7 +1174,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou } ++nRowCount; - sal_Bool bInsertAutoIncrement = sal_True; + bool bInsertAutoIncrement = true; ODatabaseExport::TPositions::const_iterator aPosIter = aColumnMapping.begin(); ODatabaseExport::TPositions::const_iterator aPosEnd = aColumnMapping.end(); @@ -1201,7 +1201,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou if ( bAutoIncrement && bInsertAutoIncrement ) { xStatementParams->setInt( 1, nRowCount ); - bInsertAutoIncrement = sal_False; + bInsertAutoIncrement = false; continue; } diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 59f133f0d661..80b7ee8d9bf0 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -76,13 +76,13 @@ namespace dbaui impl_handle_throw( i_rRequest ); } - sal_Bool BasicInteractionHandler::impl_handle_throw( const Reference< XInteractionRequest >& i_Request ) + bool BasicInteractionHandler::impl_handle_throw( const Reference< XInteractionRequest >& i_Request ) { Any aRequest( i_Request->getRequest() ); OSL_ENSURE(aRequest.hasValue(), "BasicInteractionHandler::handle: invalid request!"); if ( !aRequest.hasValue() ) // no request -> no handling - return sal_False; + return false; Sequence< Reference< XInteractionContinuation > > aContinuations( i_Request->getContinuations() ); @@ -91,27 +91,27 @@ namespace dbaui if ( aInfo.isValid() ) { implHandle( aInfo, aContinuations ); - return sal_True; + return true; } ParametersRequest aParamRequest; if ( aRequest >>= aParamRequest ) { implHandle( aParamRequest, aContinuations ); - return sal_True; + return true; } DocumentSaveRequest aDocuRequest; if ( aRequest >>= aDocuRequest ) { implHandle( aDocuRequest, aContinuations ); - return sal_True; + return true; } if ( m_bFallbackToGeneric ) return implHandleUnknown( i_Request ); - return sal_False; + return false; } void BasicInteractionHandler::implHandle(const ParametersRequest& _rParamRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx b/dbaccess/source/ui/uno/dbinteraction.hxx index 4fd7e8a79eae..0b698c74b640 100644 --- a/dbaccess/source/ui/uno/dbinteraction.hxx +++ b/dbaccess/source/ui/uno/dbinteraction.hxx @@ -83,7 +83,7 @@ namespace dbaui virtual void SAL_CALL handle( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& Request ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: - sal_Bool + bool impl_handle_throw( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& i_Request ); /// handle SQLExceptions (and derived classes) diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx index 2f807f83a6b4..94c6edef03d2 100644 --- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx +++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx @@ -229,7 +229,7 @@ namespace dbaui sal_Bool SAL_CALL OTextConnectionSettingsDialog::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw(IllegalArgumentException) { - sal_Bool bModified = sal_False; + bool bModified = false; PropertyValues::const_iterator pos = m_aPropertyValues.find( _nHandle ); if ( pos != m_aPropertyValues.end() ) @@ -237,7 +237,7 @@ namespace dbaui // we're lazy here ... _rConvertedValue = _rValue; pos->second->getPropertyValue( _rOldValue ); - bModified = sal_True; + bModified = true; } else { |