diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index bced7b5dba08..2beb0ac5c0ab 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cachedcontentresultset.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,8 +81,8 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include +#ifndef _OSL_DIAGNOSE_H_ +#include #endif using namespace com::sun::star::beans; @@ -107,7 +107,7 @@ using namespace rtl; //function ::getObject, where this is similar implemented #define XROW_GETXXX( getXXX, Type ) \ -impl_EnsureNotDisposed(); \ +impl_EnsureNotDisposed(); \ ReacquireableGuard aGuard( m_aMutex ); \ sal_Int32 nRow = m_nRow; \ sal_Int32 nFetchSize = m_nFetchSize; \ @@ -118,7 +118,7 @@ if( !m_aCache.hasRow( nRow ) ) \ { \ if( !m_xFetchProvider.is() ) \ { \ - DBG_ERROR( "broadcaster was disposed already" ); \ + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); \ throw SQLException(); \ } \ aGuard.clear(); \ @@ -183,7 +183,7 @@ sal_Bool SAL_CALL CachedContentResultSet::CCRS_Cache ::hasRow( sal_Int32 row ) { if( !m_pResult ) - return FALSE; + return sal_False; long nStart = m_pResult->StartIndex; long nEnd = nStart; if( m_pResult->Orientation ) @@ -224,9 +224,9 @@ sal_Bool SAL_CALL CachedContentResultSet::CCRS_Cache ::hasCausedException( sal_Int32 nRow ) { if( !m_pResult ) - return FALSE; + return sal_False; if( !( m_pResult->FetchError & FetchError::EXCEPTION ) ) - return FALSE; + return sal_False; long nEnd = m_pResult->StartIndex; if( m_pResult->Orientation ) @@ -489,7 +489,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo( } else { - DBG_ERROR( "The received XPropertySetInfo doesn't contain required properties" ); + OSL_ENSURE( sal_False, "The received XPropertySetInfo doesn't contain required properties" ); m_pProperties = new Sequence; } @@ -650,18 +650,18 @@ sal_Int32 SAL_CALL CCRS_PropertySetInfo if( !m_pProperties ) { - DBG_ERROR( "Properties not initialized yet" ); + OSL_ENSURE( sal_False, "Properties not initialized yet" ); return nHandle; } - sal_Bool bFound = TRUE; + sal_Bool bFound = sal_True; while( bFound ) { - bFound = FALSE; + bFound = sal_False; for( sal_Int32 nN = m_pProperties->getLength(); nN--; ) { if( nHandle == (*m_pProperties)[nN].Handle ) { - bFound = TRUE; + bFound = sal_True; nHandle++; break; } @@ -707,10 +707,10 @@ CachedContentResultSet::CachedContentResultSet( Reference< XResultSet > xOrigin , m_aCacheContent( m_xContentIdentifierMapping ) { m_xFetchProvider = Reference< XFetchProvider >( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( m_xFetchProvider.is(), "interface XFetchProvider is required" ); + OSL_ENSURE( m_xFetchProvider.is(), "interface XFetchProvider is required" ); m_xFetchProviderForContentAccess = Reference< XFetchProviderForContentAccess >( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( m_xFetchProviderForContentAccess.is(), "interface XFetchProviderForContentAccess is required" ); + OSL_ENSURE( m_xFetchProviderForContentAccess.is(), "interface XFetchProviderForContentAccess is required" ); impl_init(); }; @@ -739,13 +739,13 @@ sal_Bool SAL_CALL CachedContentResultSet */ ReacquireableGuard aGuard( m_aMutex ); - DBG_ASSERT( nRow >= 0, "only positive values supported" ); + OSL_ENSURE( nRow >= 0, "only positive values supported" ); if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return sal_False; } -// DBG_ASSERT( nRow <= m_nKnownCount, "don't step into regions you don't know with this method" ); +// 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; @@ -839,7 +839,7 @@ sal_Bool SAL_CALL CachedContentResultSet sal_Int32 nRow; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bAfterLast ) throw SQLException(); nRow = m_nRow; @@ -860,7 +860,7 @@ sal_Bool bDirection = !!( \ nFetchDirection != FetchDirection::REVERSE ); \ FetchResult aResult = \ fetchInterface->fetchMethod( nRow, nFetchSize, bDirection ); \ -vos::OClearableGuard aGuard( m_aMutex ); \ +osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); \ aCache.loadData( aResult ); \ sal_Int32 nMax = aCache.getMaxRow(); \ sal_Int32 nCurCount = m_nKnownCount; \ @@ -883,16 +883,16 @@ void SAL_CALL CachedContentResultSet void SAL_CALL CachedContentResultSet ::impl_changeRowCount( sal_Int32 nOld, sal_Int32 nNew ) { - DBG_ASSERT( nNew > nOld, "RowCount only can grow" ); + OSL_ENSURE( nNew > nOld, "RowCount only can grow" ); if( nNew <= nOld ) return; //create PropertyChangeEvent and set value PropertyChangeEvent aEvt; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aEvt.Source = static_cast< XPropertySet * >( this ); - aEvt.Further = FALSE; + aEvt.Further = sal_False; aEvt.OldValue <<= nOld; aEvt.NewValue <<= nNew; @@ -906,16 +906,16 @@ void SAL_CALL CachedContentResultSet void SAL_CALL CachedContentResultSet ::impl_changeIsRowCountFinal( sal_Bool bOld, sal_Bool bNew ) { - DBG_ASSERT( !bOld && bNew, "This change is not allowed for IsRowCountFinal" ); + OSL_ENSURE( !bOld && bNew, "This change is not allowed for IsRowCountFinal" ); if( ! (!bOld && bNew ) ) return; //create PropertyChangeEvent and set value PropertyChangeEvent aEvt; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aEvt.Source = static_cast< XPropertySet * >( this ); - aEvt.Further = FALSE; + aEvt.Further = sal_False; aEvt.OldValue <<= bOld; aEvt.NewValue <<= bNew; @@ -950,7 +950,7 @@ void SAL_CALL CachedContentResultSet { ContentResultSetWrapper::impl_initPropertySetInfo(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_pMyPropSetInfo ) return; m_pMyPropSetInfo = new CCRS_PropertySetInfo( m_xPropertySetInfo ); @@ -1025,7 +1025,7 @@ void SAL_CALL CachedContentResultSet if( !getPropertySetInfo().is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } @@ -1061,10 +1061,10 @@ void SAL_CALL CachedContentResultSet //create PropertyChangeEvent and set value PropertyChangeEvent aEvt; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aEvt.Source = static_cast< XPropertySet * >( this ); aEvt.PropertyName = aPropertyName; - aEvt.Further = FALSE; + aEvt.Further = sal_False; aEvt.PropertyHandle = m_pMyPropSetInfo-> m_nFetchDirectionPropertyHandle; aEvt.OldValue <<= m_nFetchDirection; @@ -1094,10 +1094,10 @@ void SAL_CALL CachedContentResultSet //create PropertyChangeEvent and set value PropertyChangeEvent aEvt; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aEvt.Source = static_cast< XPropertySet * >( this ); aEvt.PropertyName = aPropertyName; - aEvt.Further = FALSE; + aEvt.Further = sal_False; aEvt.PropertyHandle = m_pMyPropSetInfo-> m_nFetchSizePropertyHandle; aEvt.OldValue <<= m_nFetchSize; @@ -1111,10 +1111,10 @@ void SAL_CALL CachedContentResultSet } else { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return; } m_xPropertySetOrigin->setPropertyValue( aPropertyName, aValue ); @@ -1133,7 +1133,7 @@ Any SAL_CALL CachedContentResultSet if( !getPropertySetInfo().is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } @@ -1144,34 +1144,34 @@ Any SAL_CALL CachedContentResultSet if( rPropertyName == CCRS_PropertySetInfo ::m_aPropertyNameForCount ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aValue <<= m_nKnownCount; } else if( rPropertyName == CCRS_PropertySetInfo ::m_aPropertyNameForFinalCount ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aValue <<= m_bFinalCount; } else if( rPropertyName == CCRS_PropertySetInfo ::m_aPropertyNameForFetchSize ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aValue <<= m_nFetchSize; } else if( rPropertyName == CCRS_PropertySetInfo ::m_aPropertyNameForFetchDirection ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); aValue <<= m_nFetchDirection; } else { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } } @@ -1191,7 +1191,7 @@ void SAL_CALL CachedContentResultSet { { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); //release all references to the broadcaster: m_xFetchProvider.clear(); m_xFetchProviderForContentAccess.clear(); @@ -1208,7 +1208,7 @@ void SAL_CALL CachedContentResultSet PropertyChangeEvent aEvt( rEvt ); aEvt.Source = static_cast< XPropertySet * >( this ); - aEvt.Further = FALSE; + aEvt.Further = sal_False; //--------- if( CCRS_PropertySetInfo @@ -1230,7 +1230,7 @@ void SAL_CALL CachedContentResultSet sal_Int32 nNew; if( !( aEvt.NewValue >>= nNew ) ) { - DBG_ERROR( "PropertyChangeEvent contains wrong data" ); + OSL_ENSURE( sal_False, "PropertyChangeEvent contains wrong data" ); return; } @@ -1244,7 +1244,7 @@ void SAL_CALL CachedContentResultSet sal_Bool bNew; if( !( aEvt.NewValue >>= bNew ) ) { - DBG_ERROR( "PropertyChangeEvent contains wrong data" ); + OSL_ENSURE( sal_False, "PropertyChangeEvent contains wrong data" ); return; } impl_changeIsRowCountFinal( m_bFinalCount, bNew ); @@ -1275,7 +1275,7 @@ void SAL_CALL CachedContentResultSet PropertyChangeEvent aEvt( rEvt ); aEvt.Source = static_cast< XPropertySet * >( this ); - aEvt.Further = FALSE; + aEvt.Further = sal_False; impl_notifyVetoableChangeListeners( aEvt ); } @@ -1296,7 +1296,7 @@ if( !m_aCache##XXX.hasRow( nRow ) ) \ { \ if( !m_xFetchProviderForContentAccess.is() ) \ { \ - DBG_ERROR( "broadcaster was disposed already" );\ + OSL_ENSURE( sal_False, "broadcaster was disposed already" );\ throw RuntimeException(); \ } \ aGuard.clear(); \ @@ -1449,7 +1449,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return sal_False; } if( row < 0 ) @@ -1650,7 +1650,7 @@ sal_Bool SAL_CALL CachedContentResultSet //unknown position if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return sal_False; } aGuard.clear(); @@ -1672,7 +1672,7 @@ sal_Bool SAL_CALL CachedContentResultSet aGuard.reacquire(); m_nLastAppliedPos = nCurRow; m_nRow = nCurRow; - DBG_ASSERT( nCurRow >= m_nKnownCount, "position of last row < known Count, that could not be" ); + OSL_ENSURE( nCurRow >= m_nKnownCount, "position of last row < known Count, that could not be" ); m_nKnownCount = nCurRow; m_bFinalCount = sal_True; return nCurRow; @@ -1689,7 +1689,7 @@ void SAL_CALL CachedContentResultSet if( impl_isForwardOnly() ) throw SQLException(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nRow = 0; m_bAfterLast = sal_False; } @@ -1705,7 +1705,7 @@ void SAL_CALL CachedContentResultSet if( impl_isForwardOnly() ) throw SQLException(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nRow = 1; m_bAfterLast = sal_True; } @@ -1728,7 +1728,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return sal_False; } aGuard.clear(); @@ -1763,7 +1763,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return sal_False; } aGuard.clear(); @@ -1791,7 +1791,7 @@ sal_Bool SAL_CALL CachedContentResultSet Reference< XResultSet > xResultSetOrigin; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bAfterLast ) return sal_False; if( m_nRow != 1 ) @@ -1825,7 +1825,7 @@ sal_Bool SAL_CALL CachedContentResultSet sal_Int32 nRow; Reference< XResultSet > xResultSetOrigin; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bAfterLast ) return sal_False; if( m_nRow < m_nKnownCount ) @@ -1855,7 +1855,7 @@ sal_Int32 SAL_CALL CachedContentResultSet { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bAfterLast ) return 0; return m_nRow; @@ -1932,12 +1932,12 @@ sal_Bool SAL_CALL CachedContentResultSet impl_EnsureNotDisposed(); { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bLastReadWasFromCache ) return m_bLastCachedReadWasNull; if( !m_xRowOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return sal_False; } } @@ -2093,7 +2093,7 @@ Any SAL_CALL CachedContentResultSet { if( !m_xFetchProvider.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return Any(); } aGuard.clear(); @@ -2110,7 +2110,6 @@ Any SAL_CALL CachedContentResultSet } } //@todo: pay attention to typeMap - DBG_ASSERTWARNING( !typeMap.is(), "special TypeMaps are not supported" ); const Any& rValue = m_aCache.getAny( nRow, columnIndex ); Any aRet; m_bLastReadWasFromCache = sal_True; diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index 5d20d2bce5ae..e4a723b8ad94 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cachedcontentresultsetstub.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,8 +65,8 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include +#ifndef _OSL_DIAGNOSE_H_ +#include #endif using namespace com::sun::star::beans; @@ -167,7 +167,7 @@ XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSetStub, impl_EnsureNotDisposed(); \ if( !m_xResultSetOrigin.is() ) \ { \ - DBG_ERROR( "broadcaster was disposed already" ); \ + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); \ throw RuntimeException(); \ } \ FetchResult aRet; \ @@ -289,7 +289,7 @@ sal_Int32 SAL_CALL CachedContentResultSetStub sal_Int32 nCount; sal_Bool bCached; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); nCount = m_nColumnCount; bCached = m_bColumnCountCached; } @@ -303,11 +303,11 @@ sal_Int32 SAL_CALL CachedContentResultSetStub } catch( SQLException& ) { - DBG_ERROR( "couldn't determine the column count" ); + OSL_ENSURE( sal_False, "couldn't determine the column count" ); nCount = 0; } } - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nColumnCount = nCount; m_bColumnCountCached = sal_True; return m_nColumnCount; diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index e27a1e2d7bbc..b25da54bc48f 100644 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cacheddynamicresultset.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,8 +69,8 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include +#ifndef _OSL_DIAGNOSE_H_ +#include #endif using namespace com::sun::star::lang; @@ -99,12 +99,12 @@ void SAL_CALL CachedDynamicResultSet ::impl_InitResultSetOne( const Reference< XResultSet >& xResultSet ) { DynamicResultSetWrapper::impl_InitResultSetOne( xResultSet ); - DBG_ASSERT( m_xSourceResultOne.is(), "need source resultset" ) + OSL_ENSURE( m_xSourceResultOne.is(), "need source resultset" ); Reference< XResultSet > xCache( new CachedContentResultSet( m_xSourceResultOne, m_xContentIdentifierMapping ) ); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xMyResultOne = xCache; } @@ -113,12 +113,12 @@ void SAL_CALL CachedDynamicResultSet ::impl_InitResultSetTwo( const Reference< XResultSet >& xResultSet ) { DynamicResultSetWrapper::impl_InitResultSetTwo( xResultSet ); - DBG_ASSERT( m_xSourceResultTwo.is(), "need source resultset" ) + OSL_ENSURE( m_xSourceResultTwo.is(), "need source resultset" ); Reference< XResultSet > xCache( new CachedContentResultSet( m_xSourceResultTwo, m_xContentIdentifierMapping ) ); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xMyResultTwo = xCache; } diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index 8cfc093976df..15e8c582465d 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cacheddynamicresultsetstub.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,8 +77,8 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include +#ifndef _OSL_DIAGNOSE_H_ +#include #endif using namespace com::sun::star::lang; @@ -92,7 +92,7 @@ CachedDynamicResultSetStub::CachedDynamicResultSetStub( , const Reference< XMultiServiceFactory > & xSMgr ) : DynamicResultSetWrapper( xOrigin, xSMgr ) { - DBG_ASSERT( m_xSMgr.is(), "need Multiservicefactory to create stub" ); + OSL_ENSURE( m_xSMgr.is(), "need Multiservicefactory to create stub" ); impl_init(); } @@ -106,12 +106,12 @@ void SAL_CALL CachedDynamicResultSetStub ::impl_InitResultSetOne( const Reference< XResultSet >& xResultSet ) { DynamicResultSetWrapper::impl_InitResultSetOne( xResultSet ); - DBG_ASSERT( m_xSourceResultOne.is(), "need source resultset" ) + OSL_ENSURE( m_xSourceResultOne.is(), "need source resultset" ); Reference< XResultSet > xStub( new CachedContentResultSetStub( m_xSourceResultOne ) ); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xMyResultOne = xStub; } @@ -120,12 +120,12 @@ void SAL_CALL CachedDynamicResultSetStub ::impl_InitResultSetTwo( const Reference< XResultSet >& xResultSet ) { DynamicResultSetWrapper::impl_InitResultSetTwo( xResultSet ); - DBG_ASSERT( m_xSourceResultTwo.is(), "need source resultset" ) + OSL_ENSURE( m_xSourceResultTwo.is(), "need source resultset" ); Reference< XResultSet > xStub( new CachedContentResultSetStub( m_xSourceResultTwo ) ); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xMyResultTwo = xStub; } @@ -246,8 +246,8 @@ void SAL_CALL CachedDynamicResultSetStubFactory , AlreadyInitializedException , RuntimeException ) { - DBG_ASSERT( Source.is(), "a Source is needed" ); - DBG_ASSERT( TargetCache.is(), "a TargetCache is needed" ); + OSL_ENSURE( Source.is(), "a Source is needed" ); + OSL_ENSURE( TargetCache.is(), "a TargetCache is needed" ); Reference< XDynamicResultSet > xSource( Source ); if( SortingInfo.getLength() && @@ -271,7 +271,7 @@ void SAL_CALL CachedDynamicResultSetStubFactory new CachedDynamicResultSetStub( xSource, m_xSMgr ) ); Reference< XSourceInitialization > xTarget( TargetCache, UNO_QUERY ); - DBG_ASSERT( xTarget.is(), "Target must have interface XSourceInitialization" ); + OSL_ENSURE( xTarget.is(), "Target must have interface XSourceInitialization" ); xTarget->setSource( xStub ); } diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index 8af9075790dd..b6e0cb9e7e79 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: contentresultsetwrapper.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,8 +85,8 @@ #include #endif -#ifndef _TOOLS_DEBUG_HXX -#include +#ifndef _OSL_DIAGNOSE_H_ +#include #endif using namespace com::sun::star::beans; @@ -125,16 +125,16 @@ ContentResultSetWrapper::ContentResultSetWrapper( m_pMyListenerImpl = new ContentResultSetWrapperListener( this ); m_xMyListenerImpl = Reference< XPropertyChangeListener >( m_pMyListenerImpl ); - DBG_ASSERT( m_xResultSetOrigin.is(), "XResultSet is required" ); + OSL_ENSURE( m_xResultSetOrigin.is(), "XResultSet is required" ); m_xRowOrigin = Reference< XRow >( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( m_xRowOrigin.is(), "interface XRow is required" ); + OSL_ENSURE( m_xRowOrigin.is(), "interface XRow is required" ); m_xContentAccessOrigin = Reference< XContentAccess >( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( m_xContentAccessOrigin.is(), "interface XContentAccess is required" ); + OSL_ENSURE( m_xContentAccessOrigin.is(), "interface XContentAccess is required" ); m_xPropertySetOrigin = Reference< XPropertySet >( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( m_xPropertySetOrigin.is(), "interface XPropertySet is required" ); + OSL_ENSURE( m_xPropertySetOrigin.is(), "interface XPropertySet is required" ); //call impl_init() at the end of constructor of derived class }; @@ -146,7 +146,7 @@ void SAL_CALL ContentResultSetWrapper::impl_init() //listen to disposing from Origin: Reference< XComponent > xComponentOrigin( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( xComponentOrigin.is(), "interface XComponent is required" ); + OSL_ENSURE( xComponentOrigin.is(), "interface XComponent is required" ); xComponentOrigin->addEventListener( static_cast< XPropertyChangeListener * >( m_pMyListenerImpl ) ); } @@ -171,7 +171,7 @@ void SAL_CALL ContentResultSetWrapper ::impl_initPropertySetInfo() { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_xPropertySetInfo.is() ) return; @@ -183,7 +183,7 @@ void SAL_CALL ContentResultSetWrapper m_xPropertySetOrigin->getPropertySetInfo(); { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xPropertySetInfo = xOrig; } } @@ -192,7 +192,7 @@ void SAL_CALL ContentResultSetWrapper ::impl_EnsureNotDisposed() throw( DisposedException, RuntimeException ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bDisposed ) throw DisposedException(); } @@ -201,7 +201,7 @@ ContentResultSetWrapper::PropertyChangeListenerContainer_Impl* SAL_CALL ContentResultSetWrapper ::impl_getPropertyChangeListenerContainer() { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pPropertyChangeListeners ) m_pPropertyChangeListeners = new PropertyChangeListenerContainer_Impl( m_aContainerMutex ); @@ -212,7 +212,7 @@ ContentResultSetWrapper::PropertyChangeListenerContainer_Impl* SAL_CALL ContentResultSetWrapper ::impl_getVetoableChangeListenerContainer() { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pVetoableChangeListeners ) m_pVetoableChangeListeners = new PropertyChangeListenerContainer_Impl( m_aContainerMutex ); @@ -224,7 +224,7 @@ void SAL_CALL ContentResultSetWrapper const PropertyChangeEvent& rEvt ) { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_pPropertyChangeListeners ) return; } @@ -265,7 +265,7 @@ void SAL_CALL ContentResultSetWrapper RuntimeException ) { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_pVetoableChangeListeners ) return; } @@ -308,7 +308,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper //m_nForwardOnly == 0 -> NO //@todo replace this with lines in comment - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_nForwardOnly = 0; return m_nForwardOnly; @@ -331,7 +331,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); m_nForwardOnly = 0; return m_nForwardOnly; } @@ -392,7 +392,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - DBG_ERROR( "could not remove PropertyChangeListener" ); + OSL_ENSURE( sal_False, "could not remove PropertyChangeListener" ); } try { @@ -401,11 +401,11 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - DBG_ERROR( "could not remove VetoableChangeListener" ); + OSL_ENSURE( sal_False, "could not remove VetoableChangeListener" ); } Reference< XComponent > xComponentOrigin( m_xResultSetOrigin, UNO_QUERY ); - DBG_ASSERT( xComponentOrigin.is(), "interface XComponent is required" ); + OSL_ENSURE( xComponentOrigin.is(), "interface XComponent is required" ); xComponentOrigin->removeEventListener( static_cast< XPropertyChangeListener * >( m_pMyListenerImpl ) ); } @@ -451,7 +451,7 @@ void SAL_CALL ContentResultSetWrapper throw( RuntimeException ) { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pDisposeEventListeners ) m_pDisposeEventListeners = @@ -467,7 +467,7 @@ void SAL_CALL ContentResultSetWrapper throw( RuntimeException ) { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( m_pDisposeEventListeners ) m_pDisposeEventListeners->removeInterface( Listener ); @@ -528,7 +528,7 @@ Reference< XPropertySetInfo > SAL_CALL ContentResultSetWrapper { impl_EnsureNotDisposed(); { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_xPropertySetInfo.is() ) return m_xPropertySetInfo; } @@ -549,7 +549,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } m_xPropertySetOrigin->setPropertyValue( rPropertyName, rValue ); @@ -567,7 +567,7 @@ Any SAL_CALL ContentResultSetWrapper if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } return m_xPropertySetOrigin->getPropertyValue( rPropertyName ); @@ -587,7 +587,7 @@ void SAL_CALL ContentResultSetWrapper if( !getPropertySetInfo().is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } @@ -598,16 +598,16 @@ void SAL_CALL ContentResultSetWrapper } impl_getPropertyChangeListenerContainer(); - BOOL bNeedRegister = !m_pPropertyChangeListeners-> + sal_Bool bNeedRegister = !m_pPropertyChangeListeners-> getContainedTypes().getLength(); m_pPropertyChangeListeners->addInterface( aPropertyName, xListener ); if( bNeedRegister ) { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return; } } @@ -638,7 +638,7 @@ void SAL_CALL ContentResultSetWrapper if( !getPropertySetInfo().is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw UnknownPropertyException(); } if( rPropertyName.getLength() ) @@ -648,16 +648,16 @@ void SAL_CALL ContentResultSetWrapper } impl_getVetoableChangeListenerContainer(); - BOOL bNeedRegister = !m_pVetoableChangeListeners-> + sal_Bool bNeedRegister = !m_pVetoableChangeListeners-> getContainedTypes().getLength(); m_pVetoableChangeListeners->addInterface( rPropertyName, xListener ); if( bNeedRegister ) { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return; } } @@ -688,7 +688,7 @@ void SAL_CALL ContentResultSetWrapper { //noop, if no listener registered - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_pPropertyChangeListeners ) return; } @@ -713,10 +713,10 @@ void SAL_CALL ContentResultSetWrapper if( !m_pPropertyChangeListeners->getContainedTypes().getLength() ) { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return; } } @@ -727,7 +727,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - DBG_ERROR( "could not remove PropertyChangeListener" ); + OSL_ENSURE( sal_False, "could not remove PropertyChangeListener" ); } } } @@ -746,7 +746,7 @@ void SAL_CALL ContentResultSetWrapper { //noop, if no listener registered - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_pVetoableChangeListeners ) return; } @@ -771,10 +771,10 @@ void SAL_CALL ContentResultSetWrapper if( !m_pVetoableChangeListeners->getContainedTypes().getLength() ) { { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); return; } } @@ -785,7 +785,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - DBG_ERROR( "could not remove VetoableChangeListener" ); + OSL_ENSURE( sal_False, "could not remove VetoableChangeListener" ); } } } @@ -801,7 +801,7 @@ void SAL_CALL ContentResultSetWrapper { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xResultSetOrigin.is() ) return; @@ -824,7 +824,7 @@ void SAL_CALL ContentResultSetWrapper PropertyChangeEvent aEvt( rEvt ); aEvt.Source = static_cast< XPropertySet * >( this ); - aEvt.Further = FALSE; + aEvt.Further = sal_False; impl_notifyPropertyChangeListeners( aEvt ); } @@ -838,7 +838,7 @@ void SAL_CALL ContentResultSetWrapper PropertyChangeEvent aEvt( rEvt ); aEvt.Source = static_cast< XPropertySet * >( this ); - aEvt.Further = FALSE; + aEvt.Further = sal_False; impl_notifyVetoableChangeListeners( aEvt ); } @@ -856,7 +856,7 @@ OUString SAL_CALL ContentResultSetWrapper if( !m_xContentAccessOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xContentAccessOrigin->queryContentIdentfierString(); @@ -872,7 +872,7 @@ Reference< XContentIdentifier > SAL_CALL ContentResultSetWrapper if( !m_xContentAccessOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xContentAccessOrigin->queryContentIdentifier(); @@ -888,7 +888,7 @@ Reference< XContent > SAL_CALL ContentResultSetWrapper if( !m_xContentAccessOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xContentAccessOrigin->queryContent(); @@ -908,7 +908,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->next(); @@ -924,7 +924,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->previous(); @@ -940,7 +940,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->absolute( row ); @@ -956,7 +956,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->relative( rows ); @@ -973,7 +973,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->first(); @@ -989,7 +989,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->last(); @@ -1005,7 +1005,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } m_xResultSetOrigin->beforeFirst(); @@ -1021,7 +1021,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } m_xResultSetOrigin->afterLast(); @@ -1037,7 +1037,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isAfterLast(); @@ -1053,7 +1053,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isBeforeFirst(); @@ -1069,7 +1069,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isFirst(); @@ -1085,7 +1085,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isLast(); @@ -1102,7 +1102,7 @@ sal_Int32 SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->getRow(); @@ -1118,7 +1118,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } m_xResultSetOrigin->refreshRow(); @@ -1134,7 +1134,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->rowUpdated(); @@ -1149,7 +1149,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->rowInserted(); @@ -1165,7 +1165,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->rowDeleted(); @@ -1186,13 +1186,13 @@ Reference< XInterface > SAL_CALL ContentResultSetWrapper // XRow methods. //----------------------------------------------------------------- -#define XROW_GETXXX( getXXX ) \ -impl_EnsureNotDisposed(); \ -if( !m_xRowOrigin.is() ) \ -{ \ - DBG_ERROR( "broadcaster was disposed already" );\ - throw RuntimeException(); \ -} \ +#define XROW_GETXXX( getXXX ) \ +impl_EnsureNotDisposed(); \ +if( !m_xRowOrigin.is() ) \ +{ \ + OSL_ENSURE( sal_False, "broadcaster was disposed already" );\ + throw RuntimeException(); \ +} \ return m_xRowOrigin->getXXX( columnIndex ); //virtual @@ -1204,7 +1204,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper impl_EnsureNotDisposed(); if( !m_xRowOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xRowOrigin->wasNull(); @@ -1352,7 +1352,7 @@ Any SAL_CALL ContentResultSetWrapper impl_EnsureNotDisposed(); if( !m_xRowOrigin.is() ) { - DBG_ERROR( "broadcaster was disposed already" ); + OSL_ENSURE( sal_False, "broadcaster was disposed already" ); throw RuntimeException(); } return m_xRowOrigin->getObject( columnIndex, typeMap ); diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index bd56f14b4d34..4c4d6aea007e 100644 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: contentresultsetwrapper.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #include #endif -#ifndef _VOS_MUTEX_HXX_ -#include +#ifndef _OSL_MUTEX_HXX_ +#include #endif #ifndef _CPPUHELPER_WEAK_HXX_ @@ -157,15 +157,15 @@ protected: class ReacquireableGuard { protected: - vos::OMutex* pT; + osl::Mutex* pT; public: - ReacquireableGuard(vos::OMutex * pT) : pT(pT) + ReacquireableGuard(osl::Mutex * pT) : pT(pT) { pT->acquire(); } - ReacquireableGuard(vos::OMutex& t) : pT(&t) + ReacquireableGuard(osl::Mutex& t) : pT(&t) { pT->acquire(); } @@ -201,7 +201,7 @@ protected: //members //my Mutex - vos::OMutex m_aMutex; + osl::Mutex m_aMutex; //different Interfaces from Origin: com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet > diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 8ace53a28d7b..9de0b6d84c0a 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dynamicresultsetwrapper.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,12 +65,12 @@ #include #endif -#ifndef _RTL_USTRING_HXX_ -#include +#ifndef _OSL_DIAGNOSE_H_ +#include #endif -#ifndef _TOOLS_DEBUG_HXX -#include +#ifndef _RTL_USTRING_HXX_ +#include #endif #ifndef _COM_SUN_STAR_UCB_LISTACTIONTYPE_HPP_ @@ -129,7 +129,7 @@ void SAL_CALL DynamicResultSetWrapper::impl_init() Reference< XDynamicResultSet > xSource = NULL; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); xSource = m_xSource; m_xSource = NULL; } @@ -155,7 +155,7 @@ void SAL_CALL DynamicResultSetWrapper ::impl_EnsureNotDisposed() throw( DisposedException, RuntimeException ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_bDisposed ) throw DisposedException(); } @@ -164,8 +164,8 @@ void SAL_CALL DynamicResultSetWrapper void SAL_CALL DynamicResultSetWrapper ::impl_InitResultSetOne( const Reference< XResultSet >& xResultSet ) { - vos::OGuard aGuard( m_aMutex ); - DBG_ASSERT( !m_xSourceResultOne.is(), "Source ResultSet One is set already" ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + OSL_ENSURE( !m_xSourceResultOne.is(), "Source ResultSet One is set already" ); m_xSourceResultOne = xResultSet; m_xMyResultOne = xResultSet; } @@ -174,8 +174,8 @@ void SAL_CALL DynamicResultSetWrapper void SAL_CALL DynamicResultSetWrapper ::impl_InitResultSetTwo( const Reference< XResultSet >& xResultSet ) { - vos::OGuard aGuard( m_aMutex ); - DBG_ASSERT( !m_xSourceResultTwo.is(), "Source ResultSet Two is set already" ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + OSL_ENSURE( !m_xSourceResultTwo.is(), "Source ResultSet Two is set already" ); m_xSourceResultTwo = xResultSet; m_xMyResultTwo = xResultSet; } @@ -201,7 +201,7 @@ void SAL_CALL DynamicResultSetWrapper Reference< XComponent > xSourceComponent; { - vos::OClearableGuard aGuard( m_aMutex ); + osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); if( m_bInDispose || m_bDisposed ) return; m_bInDispose = sal_True; @@ -223,7 +223,7 @@ void SAL_CALL DynamicResultSetWrapper xSourceComponent->dispose(); */ - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_bDisposed = sal_True; m_bInDispose = sal_False; } @@ -235,7 +235,7 @@ void SAL_CALL DynamicResultSetWrapper throw( RuntimeException ) { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pDisposeEventListeners ) m_pDisposeEventListeners = @@ -251,7 +251,7 @@ void SAL_CALL DynamicResultSetWrapper throw( RuntimeException ) { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( m_pDisposeEventListeners ) m_pDisposeEventListeners->removeInterface( Listener ); @@ -268,7 +268,7 @@ void SAL_CALL DynamicResultSetWrapper { impl_EnsureNotDisposed(); - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xSource.is() ) return; @@ -301,7 +301,7 @@ void SAL_CALL DynamicResultSetWrapper aNewEvent.Changes = Changes.Changes; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); for( long i=0; !m_bGotWelcome && i aGuard( m_aMutex ); if( m_xSource.is() ) { throw AlreadyInitializedException(); @@ -364,15 +364,15 @@ void SAL_CALL DynamicResultSetWrapper } Reference< XDynamicResultSet > xSourceDynamic( Source, UNO_QUERY ); - DBG_ASSERT( xSourceDynamic.is(), + OSL_ENSURE( xSourceDynamic.is(), "the given source is not of required type XDynamicResultSet" ); Reference< XDynamicResultSetListener > xListener = NULL; Reference< XDynamicResultSetListener > xMyListenerImpl = NULL; - BOOL bStatic = FALSE; + sal_Bool bStatic = sal_False; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xSource = xSourceDynamic; xListener = m_xListener; bStatic = m_bStatic; @@ -401,7 +401,7 @@ Reference< XResultSet > SAL_CALL DynamicResultSetWrapper Reference< XDynamicResultSet > xSource = NULL; Reference< XEventListener > xMyListenerImpl = NULL; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_xListener.is() ) throw ListenerAlreadySetException(); @@ -435,7 +435,7 @@ void SAL_CALL DynamicResultSetWrapper Reference< XDynamicResultSet > xSource = NULL; Reference< XDynamicResultSetListener > xMyListenerImpl = NULL; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_xListener.is() ) throw ListenerAlreadySetException(); if( m_bStatic ) @@ -466,7 +466,7 @@ void SAL_CALL DynamicResultSetWrapper throw ListenerAlreadySetException(); Reference< XSourceInitialization > xTarget( xCache, UNO_QUERY ); - DBG_ASSERT( xTarget.is(), "The given Target dosn't have the required interface 'XSourceInitialization'" ); + OSL_ENSURE( xTarget.is(), "The given Target dosn't have the required interface 'XSourceInitialization'" ); if( xTarget.is() && m_xSMgr.is() ) { //@todo m_aSourceSet.wait();? @@ -480,7 +480,7 @@ void SAL_CALL DynamicResultSetWrapper return; } } - DBG_ERROR( "could not connect to cache" ); + OSL_ENSURE( sal_False, "could not connect to cache" ); throw ServiceNotFoundException(); } @@ -494,7 +494,7 @@ sal_Int16 SAL_CALL DynamicResultSetWrapper m_aSourceSet.wait(); Reference< XDynamicResultSet > xSource = NULL; { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); xSource = m_xSource; } return xSource->getCapabilities(); @@ -535,7 +535,7 @@ void SAL_CALL DynamicResultSetWrapperListener ::disposing( const EventObject& rEventObject ) throw( RuntimeException ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_pOwner ) m_pOwner->impl_disposing( rEventObject ); @@ -546,7 +546,7 @@ void SAL_CALL DynamicResultSetWrapperListener ::notify( const ListEvent& Changes ) throw( RuntimeException ) { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_pOwner ) m_pOwner->impl_notify( Changes ); @@ -559,7 +559,7 @@ void SAL_CALL DynamicResultSetWrapperListener void SAL_CALL DynamicResultSetWrapperListener ::impl_OwnerDies() { - vos::OGuard aGuard( m_aMutex ); + osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_pOwner = NULL; } diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx b/ucb/source/cacher/dynamicresultsetwrapper.hxx index 58c9b4d09c96..6a4aee669313 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.hxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dynamicresultsetwrapper.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ + * last change: $Author: kso $ $Date: 2000-10-17 10:44:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,12 +62,12 @@ #ifndef _DYNAMIC_RESULTSET_WRAPPER_HXX #define _DYNAMIC_RESULTSET_WRAPPER_HXX -#ifndef _VOS_MUTEX_HXX_ -#include +#ifndef _OSL_MUTEX_HXX_ +#include #endif -#ifndef _VOS_CONDITN_HXX_ -#include +#ifndef _OSL_CONDITN_HXX_ +#include #endif #ifndef _UCBHELPER_MACROS_HXX @@ -137,7 +137,7 @@ protected: com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; - vos::OMutex m_aMutex; + osl::Mutex m_aMutex; sal_Bool m_bStatic; sal_Bool m_bGotWelcome; @@ -160,8 +160,8 @@ protected: com::sun::star::uno::Reference< com::sun::star::ucb::XDynamicResultSetListener > m_xListener; - vos::OCondition m_aSourceSet; - vos::OCondition m_aListenerSet; + osl::Condition m_aSourceSet; + osl::Condition m_aListenerSet; protected: void SAL_CALL impl_init(); @@ -261,7 +261,7 @@ class DynamicResultSetWrapperListener { protected: DynamicResultSetWrapper* m_pOwner; - ::vos::OMutex m_aMutex; + osl::Mutex m_aMutex; public: DynamicResultSetWrapperListener( DynamicResultSetWrapper* pOwner ); diff --git a/ucb/source/cacher/makefile.mk b/ucb/source/cacher/makefile.mk index c031d2195d35..168666c60511 100644 --- a/ucb/source/cacher/makefile.mk +++ b/ucb/source/cacher/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: kso $ $Date: 2000-10-16 14:52:35 $ +# last change: $Author: kso $ $Date: 2000-10-17 10:44:58 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -99,9 +99,7 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def SHL1STDLIBS=\ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(SALLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) + $(SALLIB) SHL1LIBS=$(LIB1TARGET) SHL1IMPLIB=i$(TARGET)