diff options
Diffstat (limited to 'ucb/source/cacher')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 168 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.hxx | 28 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultsetstub.cxx | 38 | ||||
-rw-r--r-- | ucb/source/cacher/cachedcontentresultsetstub.hxx | 10 | ||||
-rw-r--r-- | ucb/source/cacher/contentresultsetwrapper.cxx | 16 | ||||
-rw-r--r-- | ucb/source/cacher/contentresultsetwrapper.hxx | 6 | ||||
-rw-r--r-- | ucb/source/cacher/dynamicresultsetwrapper.cxx | 20 | ||||
-rw-r--r-- | ucb/source/cacher/dynamicresultsetwrapper.hxx | 8 |
8 files changed, 147 insertions, 147 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index bed708c4b823..5d4310929190 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -71,7 +71,7 @@ template<typename T> T CachedContentResultSet::rowOriginGet( aGuard.reacquire(); if( !m_aCache.hasRow( nRow ) ) { - m_bLastReadWasFromCache = sal_False; + m_bLastReadWasFromCache = false; aGuard.clear(); applyPositionToOrigin( nRow ); impl_init_xRowOrigin(); @@ -80,7 +80,7 @@ template<typename T> T CachedContentResultSet::rowOriginGet( } const Any& rValue = m_aCache.getAny( nRow, columnIndex ); T aRet = T(); - m_bLastReadWasFromCache = sal_True; + m_bLastReadWasFromCache = true; m_bLastCachedReadWasNull = !( rValue >>= aRet ); /* Last chance. Try type converter service... */ if ( m_bLastCachedReadWasNull && rValue.hasValue() ) @@ -144,11 +144,11 @@ void SAL_CALL CachedContentResultSet::CCRS_Cache m_pResult = new FetchResult( rResult ); } -sal_Bool SAL_CALL CachedContentResultSet::CCRS_Cache +bool SAL_CALL CachedContentResultSet::CCRS_Cache ::hasRow( sal_Int32 row ) { if( !m_pResult ) - return sal_False; + return false; long nStart = m_pResult->StartIndex; long nEnd = nStart; if( m_pResult->Orientation ) @@ -171,27 +171,27 @@ sal_Int32 SAL_CALL CachedContentResultSet::CCRS_Cache return nEnd; } -sal_Bool SAL_CALL CachedContentResultSet::CCRS_Cache +bool SAL_CALL CachedContentResultSet::CCRS_Cache ::hasKnownLast() { if( !m_pResult ) - return sal_False; + return false; if( ( m_pResult->FetchError & FetchError::ENDOFDATA ) && m_pResult->Orientation && m_pResult->Rows.getLength() ) - return sal_True; + return true; - return sal_False; + return false; } -sal_Bool SAL_CALL CachedContentResultSet::CCRS_Cache +bool SAL_CALL CachedContentResultSet::CCRS_Cache ::hasCausedException( sal_Int32 nRow ) { if( !m_pResult ) - return sal_False; + return false; if( !( m_pResult->FetchError & FetchError::EXCEPTION ) ) - return sal_False; + return false; long nEnd = m_pResult->StartIndex; if( m_pResult->Orientation ) @@ -233,17 +233,17 @@ void SAL_CALL CachedContentResultSet::CCRS_Cache (*pMappedReminder)[nDiff] = sal_True; } -sal_Bool SAL_CALL CachedContentResultSet::CCRS_Cache +bool SAL_CALL CachedContentResultSet::CCRS_Cache ::isRowMapped( sal_Int32 nRow ) { if( !m_pMappedReminder || !m_pResult ) - return sal_False; + return false; long nDiff = nRow - m_pResult->StartIndex; if( nDiff < 0 ) nDiff *= -1; if( nDiff < m_pMappedReminder->getLength() ) return (*m_pMappedReminder)[nDiff]; - return sal_False; + return false; } void SAL_CALL CachedContentResultSet::CCRS_Cache @@ -394,14 +394,14 @@ private: sal_Int32 SAL_CALL impl_getRemainedHandle() const; - sal_Bool SAL_CALL + bool SAL_CALL impl_queryProperty( const OUString& rName , com::sun::star::beans::Property& rProp ) const; sal_Int32 SAL_CALL impl_getPos( const OUString& rName ) const; - static sal_Bool SAL_CALL + static bool SAL_CALL impl_isMyPropertyName( const OUString& rName ); public: @@ -602,7 +602,7 @@ sal_Int32 SAL_CALL CCRS_PropertySetInfo return -1; } -sal_Bool SAL_CALL CCRS_PropertySetInfo +bool SAL_CALL CCRS_PropertySetInfo ::impl_queryProperty( const OUString& rName, Property& rProp ) const { for( sal_Int32 nN = m_pProperties->getLength(); nN--; ) @@ -615,14 +615,14 @@ sal_Bool SAL_CALL CCRS_PropertySetInfo rProp.Type = rMyProp.Type; rProp.Attributes = rMyProp.Attributes; - return sal_True; + return true; } } - return sal_False; + return false; } //static -sal_Bool SAL_CALL CCRS_PropertySetInfo +bool SAL_CALL CCRS_PropertySetInfo ::impl_isMyPropertyName( const OUString& rPropertyName ) { return ( rPropertyName == m_aPropertyNameForCount @@ -641,15 +641,15 @@ sal_Int32 SAL_CALL CCRS_PropertySetInfo OSL_FAIL( "Properties not initialized yet" ); return nHandle; } - sal_Bool bFound = sal_True; + bool bFound = true; while( bFound ) { - bFound = sal_False; + bFound = false; for( sal_Int32 nN = m_pProperties->getLength(); nN--; ) { if( nHandle == (*m_pProperties)[nN].Handle ) { - bFound = sal_True; + bFound = true; nHandle++; break; } @@ -680,23 +680,23 @@ CachedContentResultSet::CachedContentResultSet( , m_xContentIdentifierMapping( xContentIdentifierMapping ) , m_nRow( 0 ) // Position is one-based. Zero means: before first element. - , m_bAfterLast( sal_False ) + , m_bAfterLast( false ) , m_nLastAppliedPos( 0 ) - , m_bAfterLastApplied( sal_False ) + , m_bAfterLastApplied( false ) , m_nKnownCount( 0 ) - , m_bFinalCount( sal_False ) + , m_bFinalCount( false ) , m_nFetchSize( COMSUNSTARUCBCCRS_DEFAULT_FETCH_SIZE ) , m_nFetchDirection( COMSUNSTARUCBCCRS_DEFAULT_FETCH_DIRECTION ) - , m_bLastReadWasFromCache( sal_False ) - , m_bLastCachedReadWasNull( sal_True ) + , m_bLastReadWasFromCache( false ) + , m_bLastCachedReadWasNull( true ) , m_aCache( m_xContentIdentifierMapping ) , m_aCacheContentIdentifierString( m_xContentIdentifierMapping ) , m_aCacheContentIdentifier( m_xContentIdentifierMapping ) , m_aCacheContent( m_xContentIdentifierMapping ) - , m_bTriedToGetTypeConverter( sal_False ) + , m_bTriedToGetTypeConverter( false ) , m_xTypeConverter( NULL ) { m_xFetchProvider = Reference< XFetchProvider >( m_xResultSetOrigin, UNO_QUERY ); @@ -718,7 +718,7 @@ CachedContentResultSet::~CachedContentResultSet() // impl_ methods. -sal_Bool SAL_CALL CachedContentResultSet +bool SAL_CALL CachedContentResultSet ::applyPositionToOrigin( sal_Int32 nRow ) throw( SQLException, RuntimeException ) @@ -736,13 +736,13 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { OSL_FAIL( "broadcaster was disposed already" ); - return sal_False; + return false; } // OSL_ENSURE( nRow <= m_nKnownCount, "don't step into regions you don't know with this method" ); sal_Int32 nLastAppliedPos = m_nLastAppliedPos; - sal_Bool bAfterLastApplied = m_bAfterLastApplied; - sal_Bool bAfterLast = m_bAfterLast; + bool bAfterLastApplied = m_bAfterLastApplied; + bool bAfterLast = m_bAfterLast; sal_Int32 nForwardOnly = m_nForwardOnly; aGuard.clear(); @@ -774,8 +774,8 @@ sal_Bool SAL_CALL CachedContentResultSet aGuard.reacquire(); m_nLastAppliedPos = 0; - m_bAfterLastApplied = sal_False; - return sal_False; + m_bAfterLastApplied = false; + return false; } try { @@ -783,7 +783,7 @@ sal_Bool SAL_CALL CachedContentResultSet //because move relative would throw exception if( !nLastAppliedPos || bAfterLast || bAfterLastApplied ) { - sal_Bool bValid = m_xResultSetOrigin->absolute( nRow ); + bool bValid = m_xResultSetOrigin->absolute( nRow ); aGuard.reacquire(); m_nLastAppliedPos = nRow; @@ -792,7 +792,7 @@ sal_Bool SAL_CALL CachedContentResultSet } else { - sal_Bool bValid = m_xResultSetOrigin->relative( nRow - nLastAppliedPos ); + bool bValid = m_xResultSetOrigin->relative( nRow - nLastAppliedPos ); aGuard.reacquire(); m_nLastAppliedPos += ( nRow - nLastAppliedPos ); @@ -822,7 +822,7 @@ sal_Bool SAL_CALL CachedContentResultSet return nRow == m_nLastAppliedPos; } - return sal_True; + return true; }; @@ -832,7 +832,7 @@ sal_Bool SAL_CALL CachedContentResultSet #define FETCH_XXX( aCache, fetchInterface, fetchMethod ) \ -sal_Bool bDirection = !!( \ +bool bDirection = !!( \ nFetchDirection != FetchDirection::REVERSE ); \ FetchResult aResult = \ fetchInterface->fetchMethod( nRow, nFetchSize, bDirection ); \ @@ -840,8 +840,8 @@ osl::ClearableGuard< osl::Mutex > aGuard2( m_aMutex ); \ aCache.loadData( aResult ); \ sal_Int32 nMax = aCache.getMaxRow(); \ sal_Int32 nCurCount = m_nKnownCount; \ -sal_Bool bIsFinalCount = aCache.hasKnownLast(); \ -sal_Bool bCurIsFinalCount = m_bFinalCount; \ +bool bIsFinalCount = aCache.hasKnownLast(); \ +bool bCurIsFinalCount = m_bFinalCount; \ aGuard2.clear(); \ if( nMax > nCurCount ) \ impl_changeRowCount( nCurCount, nMax ); \ @@ -880,7 +880,7 @@ void SAL_CALL CachedContentResultSet } void SAL_CALL CachedContentResultSet - ::impl_changeIsRowCountFinal( sal_Bool bOld, sal_Bool bNew ) + ::impl_changeIsRowCountFinal( bool bOld, bool bNew ) { OSL_ENSURE( !bOld && bNew, "This change is not allowed for IsRowCountFinal" ); if( ! (!bOld && bNew ) ) @@ -902,20 +902,20 @@ void SAL_CALL CachedContentResultSet impl_notifyPropertyChangeListeners( aEvt ); } -sal_Bool SAL_CALL CachedContentResultSet +bool SAL_CALL CachedContentResultSet ::impl_isKnownValidPosition( sal_Int32 nRow ) { return m_nKnownCount && nRow && nRow <= m_nKnownCount; } -sal_Bool SAL_CALL CachedContentResultSet +bool SAL_CALL CachedContentResultSet ::impl_isKnownInvalidPosition( sal_Int32 nRow ) { if( !nRow ) - return sal_True; + return true; if( !m_bFinalCount ) - return sal_False; + return false; return nRow > m_nKnownCount; } @@ -1232,7 +1232,7 @@ void SAL_CALL CachedContentResultSet {//IsRowCountFinal changed //check value - sal_Bool bNew = sal_False; + bool bNew = false; if( !( aEvt.NewValue >>= bNew ) ) { OSL_FAIL( "PropertyChangeEvent contains wrong data" ); @@ -1358,7 +1358,7 @@ sal_Bool SAL_CALL CachedContentResultSet { aGuard.reacquire(); m_nRow++; - m_bAfterLast = sal_True; + m_bAfterLast = true; return sal_False; } aGuard.reacquire(); @@ -1373,7 +1373,7 @@ sal_Bool SAL_CALL CachedContentResultSet sal_Int32 nRow = m_nRow; aGuard.clear(); - sal_Bool bValid = applyPositionToOrigin( nRow + 1 ); + bool bValid = applyPositionToOrigin( nRow + 1 ); aGuard.reacquire(); m_nRow = nRow + 1; @@ -1400,25 +1400,25 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_bAfterLast && m_nKnownCount && m_nRow == 1 ) { m_nRow--; - m_bAfterLast = sal_False; + m_bAfterLast = false; return sal_False; } //known valid position ?: if( impl_isKnownValidPosition( m_nRow - 1 ) ) { m_nRow--; - m_bAfterLast = sal_False; + m_bAfterLast = false; return sal_True; } //unknown position: sal_Int32 nRow = m_nRow; aGuard.clear(); - sal_Bool bValid = applyPositionToOrigin( nRow - 1 ); + bool bValid = applyPositionToOrigin( nRow - 1 ); aGuard.reacquire(); m_nRow = nRow - 1; - m_bAfterLast = sal_False; + m_bAfterLast = false; return bValid; } @@ -1448,14 +1448,14 @@ sal_Bool SAL_CALL CachedContentResultSet if( m_bFinalCount ) { sal_Int32 nNewRow = m_nKnownCount + 1 + row; - sal_Bool bValid = sal_True; + bool bValid = true; if( nNewRow <= 0 ) { nNewRow = 0; - bValid = sal_False; + bValid = false; } m_nRow = nNewRow; - m_bAfterLast = sal_False; + m_bAfterLast = false; return bValid; } //unknown final count: @@ -1464,7 +1464,7 @@ sal_Bool SAL_CALL CachedContentResultSet // Solaris has problems catching or propagating derived exceptions // when only the base class is known, so make ResultSetException // (derived from SQLException) known here: - sal_Bool bValid; + bool bValid; try { bValid = m_xResultSetOrigin->absolute( row ); @@ -1482,7 +1482,7 @@ sal_Bool SAL_CALL CachedContentResultSet nNewRow = 0; m_nLastAppliedPos = nNewRow; m_nRow = nNewRow; - m_bAfterLastApplied = m_bAfterLast = sal_False; + m_bAfterLastApplied = m_bAfterLast = false; return bValid; } aGuard.clear(); @@ -1492,7 +1492,7 @@ sal_Bool SAL_CALL CachedContentResultSet aGuard.reacquire(); m_nLastAppliedPos = nCurRow; m_nRow = nCurRow; - m_bAfterLast = sal_False; + m_bAfterLast = false; return nCurRow != 0; } //row > 0: @@ -1501,17 +1501,17 @@ sal_Bool SAL_CALL CachedContentResultSet if( row > m_nKnownCount ) { m_nRow = m_nKnownCount + 1; - m_bAfterLast = sal_True; + m_bAfterLast = true; return sal_False; } m_nRow = row; - m_bAfterLast = sal_False; + m_bAfterLast = false; return sal_True; } //unknown new position: aGuard.clear(); - sal_Bool bValid = m_xResultSetOrigin->absolute( row ); + bool bValid = m_xResultSetOrigin->absolute( row ); aGuard.reacquire(); if( m_bFinalCount ) @@ -1520,10 +1520,10 @@ sal_Bool SAL_CALL CachedContentResultSet if( nNewRow > m_nKnownCount ) { nNewRow = m_nKnownCount + 1; - m_bAfterLastApplied = m_bAfterLast = sal_True; + m_bAfterLastApplied = m_bAfterLast = true; } else - m_bAfterLastApplied = m_bAfterLast = sal_False; + m_bAfterLastApplied = m_bAfterLast = false; m_nLastAppliedPos = nNewRow; m_nRow = nNewRow; @@ -1532,7 +1532,7 @@ sal_Bool SAL_CALL CachedContentResultSet aGuard.clear(); sal_Int32 nCurRow = m_xResultSetOrigin->getRow(); - sal_Bool bIsAfterLast = m_xResultSetOrigin->isAfterLast(); + bool bIsAfterLast = m_xResultSetOrigin->isAfterLast(); aGuard.reacquire(); m_nLastAppliedPos = nCurRow; @@ -1566,7 +1566,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( impl_isKnownValidPosition( nNewRow ) ) { m_nRow = nNewRow; - m_bAfterLast = sal_False; + m_bAfterLast = false; return sal_True; } else @@ -1574,19 +1574,19 @@ sal_Bool SAL_CALL CachedContentResultSet //known invalid new position: if( nNewRow == 0 ) { - m_bAfterLast = sal_False; + m_bAfterLast = false; m_nRow = 0; return sal_False; } if( m_bFinalCount && nNewRow > m_nKnownCount ) { - m_bAfterLast = sal_True; + m_bAfterLast = true; m_nRow = m_nKnownCount + 1; return sal_False; } //unknown new position: aGuard.clear(); - sal_Bool bValid = applyPositionToOrigin( nNewRow ); + bool bValid = applyPositionToOrigin( nNewRow ); aGuard.reacquire(); m_nRow = nNewRow; @@ -1611,23 +1611,23 @@ sal_Bool SAL_CALL CachedContentResultSet if( impl_isKnownValidPosition( 1 ) ) { m_nRow = 1; - m_bAfterLast = sal_False; + m_bAfterLast = false; return sal_True; } if( impl_isKnownInvalidPosition( 1 ) ) { m_nRow = 1; - m_bAfterLast = sal_False; + m_bAfterLast = false; return sal_False; } //unknown position aGuard.clear(); - sal_Bool bValid = applyPositionToOrigin( 1 ); + bool bValid = applyPositionToOrigin( 1 ); aGuard.reacquire(); m_nRow = 1; - m_bAfterLast = sal_False; + m_bAfterLast = false; return bValid; } @@ -1646,7 +1646,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( m_bFinalCount ) { m_nRow = m_nKnownCount; - m_bAfterLast = sal_False; + m_bAfterLast = false; return m_nKnownCount != 0; } //unknown position @@ -1657,10 +1657,10 @@ sal_Bool SAL_CALL CachedContentResultSet } aGuard.clear(); - sal_Bool bValid = m_xResultSetOrigin->last(); + bool bValid = m_xResultSetOrigin->last(); aGuard.reacquire(); - m_bAfterLastApplied = m_bAfterLast = sal_False; + m_bAfterLastApplied = m_bAfterLast = false; if( m_bFinalCount ) { m_nLastAppliedPos = m_nKnownCount; @@ -1676,7 +1676,7 @@ sal_Bool SAL_CALL CachedContentResultSet m_nRow = nCurRow; OSL_ENSURE( nCurRow >= m_nKnownCount, "position of last row < known Count, that could not be" ); m_nKnownCount = nCurRow; - m_bFinalCount = sal_True; + m_bFinalCount = true; return nCurRow != 0; } @@ -1693,7 +1693,7 @@ void SAL_CALL CachedContentResultSet osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nRow = 0; - m_bAfterLast = sal_False; + m_bAfterLast = false; } //virtual @@ -1709,7 +1709,7 @@ void SAL_CALL CachedContentResultSet osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nRow = 1; - m_bAfterLast = sal_True; + m_bAfterLast = true; } //virtual @@ -1739,7 +1739,7 @@ sal_Bool SAL_CALL CachedContentResultSet m_xResultSetOrigin->afterLast(); aGuard.reacquire(); - m_bAfterLastApplied = sal_True; + m_bAfterLastApplied = true; aGuard.clear(); return m_xResultSetOrigin->isAfterLast(); @@ -1774,7 +1774,7 @@ sal_Bool SAL_CALL CachedContentResultSet m_xResultSetOrigin->beforeFirst(); aGuard.reacquire(); - m_bAfterLastApplied = sal_False; + m_bAfterLastApplied = false; m_nLastAppliedPos = 0; aGuard.clear(); @@ -2111,7 +2111,7 @@ Any SAL_CALL CachedContentResultSet aGuard.reacquire(); if( !m_aCache.hasRow( nRow ) ) { - m_bLastReadWasFromCache = sal_False; + m_bLastReadWasFromCache = false; aGuard.clear(); applyPositionToOrigin( nRow ); impl_init_xRowOrigin(); @@ -2121,7 +2121,7 @@ Any SAL_CALL CachedContentResultSet //@todo: pay attention to typeMap const Any& rValue = m_aCache.getAny( nRow, columnIndex ); Any aRet; - m_bLastReadWasFromCache = sal_True; + m_bLastReadWasFromCache = true; m_bLastCachedReadWasNull = !( rValue >>= aRet ); return aRet; } @@ -2176,7 +2176,7 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter() if ( !m_bTriedToGetTypeConverter && !m_xTypeConverter.is() ) { - m_bTriedToGetTypeConverter = sal_True; + m_bTriedToGetTypeConverter = true; m_xTypeConverter = Reference< XTypeConverter >( Converter::create(m_xContext) ); OSL_ENSURE( m_xTypeConverter.is(), diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx index 7d0d69ba2841..d4de26951ed0 100644 --- a/ucb/source/cacher/cachedcontentresultset.hxx +++ b/ucb/source/cacher/cachedcontentresultset.hxx @@ -66,7 +66,7 @@ class CachedContentResultSet void SAL_CALL remindMapped( sal_Int32 nRow ); - sal_Bool SAL_CALL isRowMapped( sal_Int32 nRow ); + bool SAL_CALL isRowMapped( sal_Int32 nRow ); void SAL_CALL clearMappedReminder(); com::sun::star::uno::Sequence< sal_Bool >* SAL_CALL getMappedReminder(); @@ -78,16 +78,16 @@ class CachedContentResultSet void SAL_CALL loadData( const com::sun::star::ucb::FetchResult& rResult ); - sal_Bool SAL_CALL + bool SAL_CALL hasRow( sal_Int32 nRow ); - sal_Bool SAL_CALL + bool SAL_CALL hasCausedException( sal_Int32 nRow ); sal_Int32 SAL_CALL getMaxRow(); - sal_Bool SAL_CALL + bool SAL_CALL hasKnownLast(); @@ -135,19 +135,19 @@ class CachedContentResultSet //some Properties and helping variables sal_Int32 m_nRow; - sal_Bool m_bAfterLast; // TRUE, if m_nRow is after final count; can be TRUE without knowing the exact final count + bool m_bAfterLast; // TRUE, if m_nRow is after final count; can be TRUE without knowing the exact final count sal_Int32 m_nLastAppliedPos; - sal_Bool m_bAfterLastApplied; + bool m_bAfterLastApplied; sal_Int32 m_nKnownCount; // count we know from the Origin - sal_Bool m_bFinalCount; // TRUE if the Origin has reached final count and we got that count in m_nKnownCount + bool m_bFinalCount; // TRUE if the Origin has reached final count and we got that count in m_nKnownCount sal_Int32 m_nFetchSize; sal_Int32 m_nFetchDirection; - sal_Bool m_bLastReadWasFromCache; - sal_Bool m_bLastCachedReadWasNull; + bool m_bLastReadWasFromCache; + bool m_bLastCachedReadWasNull; //cache: CCRS_Cache m_aCache; @@ -163,7 +163,7 @@ private: - sal_Bool SAL_CALL + bool SAL_CALL applyPositionToOrigin( sal_Int32 nRow ) throw( com::sun::star::sdbc::SQLException, com::sun::star::uno::RuntimeException ); @@ -173,17 +173,17 @@ private: , sal_Int32 nFetchDirection ) throw( com::sun::star::uno::RuntimeException ); - sal_Bool SAL_CALL + bool SAL_CALL impl_isKnownValidPosition( sal_Int32 nRow ); - sal_Bool SAL_CALL + bool SAL_CALL impl_isKnownInvalidPosition( sal_Int32 nRow ); void SAL_CALL impl_changeRowCount( sal_Int32 nOld, sal_Int32 nNew ); void SAL_CALL - impl_changeIsRowCountFinal( sal_Bool bOld, sal_Bool bNew ); + impl_changeIsRowCountFinal( bool bOld, bool bNew ); public: CachedContentResultSet( @@ -469,7 +469,7 @@ public: private: - sal_Bool m_bTriedToGetTypeConverter; + bool m_bTriedToGetTypeConverter; com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > m_xTypeConverter; diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index ea830d38bd7b..03f66fc897a3 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -35,11 +35,11 @@ using namespace cppu; CachedContentResultSetStub::CachedContentResultSetStub( Reference< XResultSet > xOrigin ) : ContentResultSetWrapper( xOrigin ) , m_nColumnCount( 0 ) - , m_bColumnCountCached( sal_False ) - , m_bNeedToPropagateFetchSize( sal_True ) - , m_bFirstFetchSizePropagationDone( sal_False ) + , m_bColumnCountCached( false ) + , m_bNeedToPropagateFetchSize( true ) + , m_bFirstFetchSizePropagationDone( false ) , m_nLastFetchSize( 1 )//this value is not important at all - , m_bLastFetchDirection( sal_True )//this value is not important at all + , m_bLastFetchDirection( true )//this value is not important at all , m_aPropertyNameForFetchSize( OUString("FetchSize") ) , m_aPropertyNameForFetchDirection( OUString("FetchDirection") ) { @@ -217,11 +217,11 @@ if( impl_isForwardOnly() ) \ return aRet; \ } \ aRet.Rows.realloc( nRowCount ); \ -sal_Bool bOldOriginal_AfterLast = sal_False; \ +bool bOldOriginal_AfterLast = false; \ if( !nOldOriginal_Pos ) \ bOldOriginal_AfterLast = m_xResultSetOrigin->isAfterLast(); \ sal_Int32 nN = 1; \ -sal_Bool bValidNewPos = sal_False; \ +bool bValidNewPos = false; \ try \ { \ try \ @@ -304,7 +304,7 @@ sal_Int32 SAL_CALL CachedContentResultSetStub ::impl_getColumnCount() { sal_Int32 nCount; - sal_Bool bCached; + bool bCached; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); nCount = m_nColumnCount; @@ -326,7 +326,7 @@ sal_Int32 SAL_CALL CachedContentResultSetStub } osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nColumnCount = nCount; - m_bColumnCountCached = sal_True; + m_bColumnCountCached = true; return m_nColumnCount; } @@ -347,7 +347,7 @@ void SAL_CALL CachedContentResultSetStub } void SAL_CALL CachedContentResultSetStub - ::impl_propagateFetchSizeAndDirection( sal_Int32 nFetchSize, sal_Bool bFetchDirection ) + ::impl_propagateFetchSizeAndDirection( sal_Int32 nFetchSize, bool bFetchDirection ) throw ( RuntimeException ) { //this is done only for the case, that there is another CachedContentResultSet in the chain of underlying ResulSets @@ -360,10 +360,10 @@ void SAL_CALL CachedContentResultSetStub if( !m_bNeedToPropagateFetchSize ) return; - sal_Bool bNeedAction; + bool bNeedAction; sal_Int32 nLastSize; - sal_Bool bLastDirection; - sal_Bool bFirstPropagationDone; + bool bLastDirection; + bool bFirstPropagationDone; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); bNeedAction = m_bNeedToPropagateFetchSize; @@ -375,7 +375,7 @@ void SAL_CALL CachedContentResultSetStub { if( nLastSize == nFetchSize && bLastDirection == bFetchDirection - && bFirstPropagationDone == sal_True ) + && bFirstPropagationDone ) return; if(!bFirstPropagationDone) @@ -383,23 +383,23 @@ void SAL_CALL CachedContentResultSetStub //check whether the properties 'FetchSize' and 'FetchDirection' do exist Reference< XPropertySetInfo > xPropertySetInfo = getPropertySetInfo(); - sal_Bool bHasSize = xPropertySetInfo->hasPropertyByName( m_aPropertyNameForFetchSize ); - sal_Bool bHasDirection = xPropertySetInfo->hasPropertyByName( m_aPropertyNameForFetchDirection ); + bool bHasSize = xPropertySetInfo->hasPropertyByName( m_aPropertyNameForFetchSize ); + bool bHasDirection = xPropertySetInfo->hasPropertyByName( m_aPropertyNameForFetchDirection ); if(!bHasSize || !bHasDirection) { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - m_bNeedToPropagateFetchSize = sal_False; + m_bNeedToPropagateFetchSize = false; return; } } - sal_Bool bSetSize = ( nLastSize !=nFetchSize ) || !bFirstPropagationDone; - sal_Bool bSetDirection = ( bLastDirection !=bFetchDirection ) || !bFirstPropagationDone; + bool bSetSize = ( nLastSize !=nFetchSize ) || !bFirstPropagationDone; + bool bSetDirection = ( bLastDirection !=bFetchDirection ) || !bFirstPropagationDone; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - m_bFirstFetchSizePropagationDone = sal_True; + m_bFirstFetchSizePropagationDone = true; m_nLastFetchSize = nFetchSize; m_bLastFetchDirection = bFetchDirection; } diff --git a/ucb/source/cacher/cachedcontentresultsetstub.hxx b/ucb/source/cacher/cachedcontentresultsetstub.hxx index 18aa30a869c0..f99b1affde36 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.hxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.hxx @@ -41,13 +41,13 @@ class CachedContentResultSetStub { private: sal_Int32 m_nColumnCount; - sal_Bool m_bColumnCountCached; + bool m_bColumnCountCached; //members to propagate fetchsize and direction: - sal_Bool m_bNeedToPropagateFetchSize; - sal_Bool m_bFirstFetchSizePropagationDone; + bool m_bNeedToPropagateFetchSize; + bool m_bFirstFetchSizePropagationDone; sal_Int32 m_nLastFetchSize; - sal_Bool m_bLastFetchDirection; + bool m_bLastFetchDirection; const OUString m_aPropertyNameForFetchSize; const OUString m_aPropertyNameForFetchDirection; @@ -85,7 +85,7 @@ private: throw ( com::sun::star::uno::RuntimeException ); void SAL_CALL - impl_propagateFetchSizeAndDirection( sal_Int32 nFetchSize, sal_Bool bFetchDirection ) + impl_propagateFetchSizeAndDirection( sal_Int32 nFetchSize, bool bFetchDirection ) throw ( com::sun::star::uno::RuntimeException ); public: diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index aca8dc38c983..17eeb0932fce 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -51,8 +51,8 @@ ContentResultSetWrapper::ContentResultSetWrapper( , m_xPropertySetInfo( NULL ) , m_nForwardOnly( 2 ) , m_xMetaDataFromOrigin( NULL ) - , m_bDisposed( sal_False ) - , m_bInDispose( sal_False ) + , m_bDisposed( false ) + , m_bInDispose( false ) , m_pDisposeEventListeners( NULL ) , m_pPropertyChangeListeners( NULL ) , m_pVetoableChangeListeners( NULL ) @@ -283,7 +283,7 @@ void SAL_CALL ContentResultSetWrapper } } -sal_Bool SAL_CALL ContentResultSetWrapper +bool SAL_CALL ContentResultSetWrapper ::impl_isForwardOnly() { //m_nForwardOnly == 2 -> don't know @@ -365,7 +365,7 @@ void SAL_CALL ContentResultSetWrapper ReacquireableGuard aGuard( m_aMutex ); if( m_bInDispose || m_bDisposed ) return; - m_bInDispose = sal_True; + m_bInDispose = true; if( m_xPropertySetOrigin.is() ) { @@ -425,8 +425,8 @@ void SAL_CALL ContentResultSetWrapper } aGuard.reacquire(); - m_bDisposed = sal_True; - m_bInDispose = sal_False; + m_bDisposed = true; + m_bInDispose = false; } @@ -583,7 +583,7 @@ void SAL_CALL ContentResultSetWrapper } impl_getPropertyChangeListenerContainer(); - sal_Bool bNeedRegister = !m_pPropertyChangeListeners-> + bool bNeedRegister = !m_pPropertyChangeListeners-> getContainedTypes().getLength(); m_pPropertyChangeListeners->addInterface( aPropertyName, xListener ); if( bNeedRegister ) @@ -634,7 +634,7 @@ void SAL_CALL ContentResultSetWrapper } impl_getVetoableChangeListenerContainer(); - sal_Bool bNeedRegister = !m_pVetoableChangeListeners-> + bool bNeedRegister = !m_pVetoableChangeListeners-> getContainedTypes().getLength(); m_pVetoableChangeListeners->addInterface( rPropertyName, xListener ); if( bNeedRegister ) diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index 23accd81d4b2..73a1fbaaacaf 100644 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.hxx @@ -129,8 +129,8 @@ private: m_xMetaDataFromOrigin; //XResultSetMetaData from m_xOrigin //management of listeners - sal_Bool m_bDisposed; ///Dispose call ready. - sal_Bool m_bInDispose;///In dispose call + bool m_bDisposed; ///Dispose call ready. + bool m_bInDispose;///In dispose call osl::Mutex m_aContainerMutex; cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; @@ -184,7 +184,7 @@ protected: throw( com::sun::star::beans::PropertyVetoException, com::sun::star::uno::RuntimeException ); - sal_Bool SAL_CALL impl_isForwardOnly(); + bool SAL_CALL impl_isForwardOnly(); public: diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index b0c510b11920..aa4e7d9b8404 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -43,12 +43,12 @@ DynamicResultSetWrapper::DynamicResultSetWrapper( Reference< XDynamicResultSet > xOrigin , const Reference< XComponentContext > & rxContext ) - : m_bDisposed( sal_False ) - , m_bInDispose( sal_False ) + : m_bDisposed( false ) + , m_bInDispose( false ) , m_pDisposeEventListeners( NULL ) , m_xContext( rxContext ) - , m_bStatic( sal_False ) - , m_bGotWelcome( sal_False ) + , m_bStatic( false ) + , m_bGotWelcome( false ) , m_xSource( xOrigin ) , m_xSourceResultOne( NULL ) , m_xSourceResultTwo( NULL ) @@ -147,7 +147,7 @@ void SAL_CALL DynamicResultSetWrapper osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); if( m_bInDispose || m_bDisposed ) return; - m_bInDispose = sal_True; + m_bInDispose = true; xSourceComponent = Reference< XComponent >(m_xSource, UNO_QUERY); @@ -167,8 +167,8 @@ void SAL_CALL DynamicResultSetWrapper */ osl::Guard< osl::Mutex > aGuard( m_aMutex ); - m_bDisposed = sal_True; - m_bInDispose = sal_False; + m_bDisposed = true; + m_bInDispose = false; } @@ -257,7 +257,7 @@ void SAL_CALL DynamicResultSetWrapper { impl_InitResultSetOne( aWelcome.Old ); impl_InitResultSetTwo( aWelcome.New ); - m_bGotWelcome = sal_True; + m_bGotWelcome = true; aWelcome.Old = m_xMyResultOne; aWelcome.New = m_xMyResultTwo; @@ -313,7 +313,7 @@ void SAL_CALL DynamicResultSetWrapper Reference< XDynamicResultSetListener > xListener = NULL; Reference< XDynamicResultSetListener > xMyListenerImpl = NULL; - sal_Bool bStatic = sal_False; + bool bStatic = false; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xSource = xSourceDynamic; @@ -349,7 +349,7 @@ Reference< XResultSet > SAL_CALL DynamicResultSetWrapper throw ListenerAlreadySetException(); xSource = m_xSource; - m_bStatic = sal_True; + m_bStatic = true; xMyListenerImpl = Reference< XEventListener > ::query( m_xMyListenerImpl ); } diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx b/ucb/source/cacher/dynamicresultsetwrapper.hxx index 798a545340f3..610867372b03 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.hxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx @@ -46,8 +46,8 @@ class DynamicResultSetWrapper { private: //management of listeners - sal_Bool m_bDisposed; ///Dispose call ready. - sal_Bool m_bInDispose;///In dispose call + bool m_bDisposed; ///Dispose call ready. + bool m_bInDispose;///In dispose call osl::Mutex m_aContainerMutex; cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; @@ -61,8 +61,8 @@ protected: m_xContext; osl::Mutex m_aMutex; - sal_Bool m_bStatic; - sal_Bool m_bGotWelcome; + bool m_bStatic; + bool m_bGotWelcome; //different Interfaces from Origin: com::sun::star::uno::Reference< com::sun::star::ucb::XDynamicResultSet > |