diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-15 12:22:54 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 17:54:56 -0500 |
commit | 74e22b0646dabdfb2ca1eba7eeb881273e5713e1 (patch) | |
tree | 9ef7332aace5c53eaeeb21f2156fdb1605e240f6 | |
parent | a7d66700ee73b0772af7953ac60ce2d700e206e0 (diff) |
merge vosremoval-reference.diff
26 files changed, 133 insertions, 132 deletions
diff --git a/dbaccess/inc/pch/precompiled_dbaccess.hxx b/dbaccess/inc/pch/precompiled_dbaccess.hxx index a88dbdb46..80462d94f 100644 --- a/dbaccess/inc/pch/precompiled_dbaccess.hxx +++ b/dbaccess/inc/pch/precompiled_dbaccess.hxx @@ -476,6 +476,8 @@ #include "editeng/svxenum.hxx" #include "svx/svxids.hrc" +#include "rtl/ref.hxx" +#include "salhelper/simplereferenceobject.hxx" #include "tools/diagnose_ex.h" @@ -499,8 +501,6 @@ #include "vos/mutex.hxx" -#include "vos/ref.hxx" -#include "vos/refernce.hxx" #include "xmloff/ProgressBarHelper.hxx" #include "xmloff/XMLConstantsPropertyHandler.hxx" diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index a698b8e11..56e66d864 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -122,7 +122,7 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH { if ( PROPERTY_ID_VALUE == nHandle ) { - if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() ) + if ( !m_aColumnValue.isNull() && m_aColumnValue->is() ) { ::osl::Mutex* pMutex = m_aColumnValue.getMutex(); ::osl::MutexGuard aGuard( *pMutex ); @@ -206,7 +206,7 @@ Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeExce void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue) { - if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() && (!(((*m_aColumnValue)->get())[m_nPos] == _rOldValue)) ) + if ( !m_aColumnValue.isNull() && m_aColumnValue->is() && (!(((*m_aColumnValue)->get())[m_nPos] == _rOldValue)) ) { sal_Int32 nHandle = PROPERTY_ID_VALUE; m_aOldValue = _rOldValue.makeAny(); @@ -227,7 +227,7 @@ void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue) DBG_NAME(ORowSetDataColumns ) ORowSetDataColumns::ORowSetDataColumns( sal_Bool _bCase, - const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns, + const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< ::rtl::OUString> &_rVector @@ -262,7 +262,7 @@ void SAL_CALL ORowSetDataColumns::disposing(void) // m_aColumns.clear(); } -void ORowSetDataColumns::assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector) +void ORowSetDataColumns::assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector) { m_aColumns = _rColumns; reFill(_rVector); diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx index 1d7ebb5c3..b63d3776c 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.hxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx @@ -87,14 +87,14 @@ namespace dbaccess typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE; class ORowSetDataColumns : public ORowSetDataColumns_BASE { - ::vos::ORef< ::connectivity::OSQLColumns> m_aColumns; + ::rtl::Reference< ::connectivity::OSQLColumns> m_aColumns; protected: virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException); public: ORowSetDataColumns( sal_Bool _bCase, - const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns, + const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, const ::std::vector< ::rtl::OUString> &_rVector @@ -102,7 +102,7 @@ namespace dbaccess virtual ~ORowSetDataColumns(); // only the name is identical to ::cppu::OComponentHelper virtual void SAL_CALL disposing(void); - void assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector); + void assign(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector); }; } diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx index 63416ba04..b47449330 100644 --- a/dbaccess/source/core/api/HelperCollections.cxx +++ b/dbaccess/source/core/api/HelperCollections.cxx @@ -48,7 +48,7 @@ namespace dbaccess using namespace ::cppu; using namespace ::osl; - OPrivateColumns::OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns, + OPrivateColumns::OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, @@ -59,7 +59,7 @@ namespace dbaccess { } - OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns, + OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns, sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex ) { ::std::vector< ::rtl::OUString > aNames; aNames.reserve( _rColumns->get().size() ); @@ -88,7 +88,7 @@ namespace dbaccess connectivity::sdbcx::ObjectType OPrivateColumns::createObject(const ::rtl::OUString& _rName) { - if ( m_aColumns.isValid() ) + if ( m_aColumns.is() ) { ::connectivity::OSQLColumns::Vector::const_iterator aIter = find(m_aColumns->get().begin(),m_aColumns->get().end(),_rName,isCaseSensitive()); if(aIter == m_aColumns->get().end()) diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx index 6beb434fd..2a78dca8b 100644 --- a/dbaccess/source/core/api/HelperCollections.hxx +++ b/dbaccess/source/core/api/HelperCollections.hxx @@ -31,7 +31,7 @@ #include <connectivity/dbtools.hxx> #include <connectivity/dbconversion.hxx> #include <connectivity/PColumn.hxx> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> namespace dbaccess { @@ -52,7 +52,7 @@ namespace dbaccess typedef connectivity::sdbcx::OCollection OPrivateColumns_Base; class OPrivateColumns : public OPrivateColumns_Base { - ::vos::ORef< ::connectivity::OSQLColumns> m_aColumns; + ::rtl::Reference< ::connectivity::OSQLColumns> m_aColumns; protected: virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName); virtual void impl_refresh() throw(RuntimeException) {} @@ -61,7 +61,7 @@ namespace dbaccess return NULL; } public: - OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns, + OPrivateColumns(const ::rtl::Reference< ::connectivity::OSQLColumns>& _rColumns, sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, @@ -72,7 +72,7 @@ namespace dbaccess /** creates a columns instance as above, but taking the names from the columns itself */ static OPrivateColumns* createWithIntrinsicNames( - const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns, + const ::rtl::Reference< ::connectivity::OSQLColumns >& _rColumns, sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index a9fe9c4a9..f5fd76d77 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -601,7 +601,7 @@ void ORowSet::freeResources( bool _bComplete ) m_bModified = sal_False; m_bLastKnownRowCountFinal = sal_False; m_nLastKnownRowCount = 0; - if ( m_aOldRow.isValid() ) + if ( m_aOldRow.is() ) m_aOldRow->clearRow(); impl_disposeParametersContainer_nothrow(); @@ -889,7 +889,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException) ORowSetRow aOldValues; if ( !m_aCurrentRow.isNull() ) - aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() ); + aOldValues = new ORowSetValueVector( *(*m_aCurrentRow)); Sequence<Any> aChangedBookmarks; RowsChangeEvent aEvt(*this,RowChangeAction::INSERT,1,aChangedBookmarks); notifyAllListenersRowBeforeChange(aGuard,aEvt); @@ -952,7 +952,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException) { ORowSetRow aOldValues; if ( !m_aCurrentRow.isNull() ) - aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() ); + aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) ); Sequence<Any> aChangedBookmarks; RowsChangeEvent aEvt(*this,RowChangeAction::UPDATE,1,aChangedBookmarks); @@ -965,7 +965,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException) aEvt.Rows += aBookmarks.size(); m_aBookmark = m_pCache->getBookmark(); m_aCurrentRow = m_pCache->m_aMatrixIter; - if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && (*m_pCache->m_aMatrixIter).isValid() ) + if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && (*m_pCache->m_aMatrixIter).is() ) { if ( m_pCache->isResultSetChanged() ) { @@ -973,7 +973,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException) } else { - m_aOldRow->setRow(new ORowSetValueVector(m_aCurrentRow->getBody())); + m_aOldRow->setRow(new ORowSetValueVector(*(*m_aCurrentRow))); // notification order // - column values @@ -1023,8 +1023,8 @@ void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException) notifyRowSetAndClonesRowDelete( aBookmarkToDelete ); ORowSetRow aOldValues; - if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && m_pCache->m_aMatrixIter->isValid() ) - aOldValues = new ORowSetValueVector( m_pCache->m_aMatrixIter->getBody() ); + if ( m_pCache->m_aMatrixIter != m_pCache->getEnd() && m_pCache->m_aMatrixIter->is() ) + aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) ); Sequence<Any> aChangedBookmarks; RowsChangeEvent aEvt(*this,RowChangeAction::DELETE,1,aChangedBookmarks); @@ -1068,7 +1068,7 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL ORowSetRow aOldValues; if ( !m_aCurrentRow.isNull() ) - aOldValues = new ORowSetValueVector( m_aCurrentRow->getBody() ); + aOldValues = new ORowSetValueVector( *(*m_aCurrentRow) ); m_pCache->cancelRowUpdates(); @@ -1195,9 +1195,9 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException) if ( !m_bBeforeFirst && !m_bAfterLast && m_pCache->m_aMatrixIter != m_pCache->getEnd() - && m_pCache->m_aMatrixIter->isValid() + && m_pCache->m_aMatrixIter->is() ) - aOldValues = new ORowSetValueVector( m_pCache->m_aMatrixIter->getBody() ); + aOldValues = new ORowSetValueVector( *(*(m_pCache->m_aMatrixIter)) ); const sal_Bool bNewState = m_bNew; const sal_Bool bModState = m_bModified; @@ -1665,7 +1665,7 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw() catch( const SQLException& ) { SQLExceptionInfo aError( ::cppu::getCaughtException() ); - OSL_ENSURE( aError.isValid(), "ORowSet::impl_prepareAndExecute_throw: caught an SQLException which we cannot analyze!" ); + OSL_ENSURE( aError.is(), "ORowSet::impl_prepareAndExecute_throw: caught an SQLException which we cannot analyze!" ); // append information about what we were actually going to execute try @@ -1820,7 +1820,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi if ( xNumberFormat.is() ) m_xNumberFormatTypes.set(xNumberFormat->getNumberFormats(),UNO_QUERY); - ::vos::ORef< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns(); + ::rtl::Reference< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns(); ::std::vector< ::rtl::OUString> aNames; ::rtl::OUString aDescription; sal_Int32 nFormatKey = 0; @@ -2752,7 +2752,7 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo m_aOldRow = m_pCache->registerOldRow(); - ::vos::ORef< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns(); + ::rtl::Reference< ::connectivity::OSQLColumns> aColumns = new ::connectivity::OSQLColumns(); ::std::vector< ::rtl::OUString> aNames; ::rtl::OUString aDescription; diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 90ae44a45..28f104bbc 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -225,7 +225,7 @@ sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException) sal_Bool ORowSetBase::impl_wasNull() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_wasNull" ); - return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True; + return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True; } const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex) @@ -249,7 +249,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex) return m_aEmptyValue; } - bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() ); + bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() ); if ( !bValidCurrentRow ) { // currentrow is null when the clone moves the window @@ -257,7 +257,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex) m_aCurrentRow = m_pCache->m_aMatrixIter; 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->isValid() ); + bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() ); } if ( bValidCurrentRow ) @@ -274,14 +274,14 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex) ORowSetMatrix::iterator k = aHelper.aIterator; for (; k != m_pCache->getEnd(); ++k) { - ORowSetValueVector* pTemp = k->getBodyPtr(); + ORowSetValueVector* pTemp = k->get; OSL_ENSURE( pTemp != (void*)0xfeeefeee,"HALT!" ); } #endif OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow < m_pCache->getEnd() && aCacheIter != m_pCache->m_aCacheIterators.end(),"Invalid iterator set for currentrow!"); #if OSL_DEBUG_LEVEL > 0 ORowSetRow rRow = (*m_aCurrentRow); - OSL_ENSURE(rRow.isValid() && static_cast<sal_uInt16>(columnIndex) < (rRow->get()).size(),"Invalid size of vector!"); + OSL_ENSURE(rRow.is() && static_cast<sal_uInt16>(columnIndex) < (rRow->get()).size(),"Invalid size of vector!"); #endif return ((*m_aCurrentRow)->get())[m_nLastColumnIndex = columnIndex]; } @@ -391,14 +391,14 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS return NULL; } - bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid() ); + bool bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() ); if ( !bValidCurrentRow ) { positionCache( MOVE_NONE_REFRESH_ONLY ); m_aCurrentRow = m_pCache->m_aMatrixIter; 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->isValid() ); + bValidCurrentRow = ( !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is() ); } if ( bValidCurrentRow ) @@ -1118,7 +1118,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR 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!"); - OSL_ENSURE(m_aCurrentRow->isValid(),"Currentrow isn't valid"); + OSL_ENSURE(m_aCurrentRow->is(),"Currentrow isn't valid"); OSL_ENSURE(m_aBookmark.hasValue(),"Bookmark has no value!"); #if OSL_DEBUG_LEVEL > 0 @@ -1133,7 +1133,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR OSL_ENSURE(!m_aCurrentRow.isNull(),"CurrentRow is nul after positionCache!"); #if OSL_DEBUG_LEVEL > 0 ORowSetRow rRow = (*m_aCurrentRow); - OSL_ENSURE(rRow.isValid() ,"Invalid size of vector!"); + OSL_ENSURE(rRow.is() ,"Invalid size of vector!"); #endif // the cache could repositioned so we need to adjust the cache // #104144# OJ @@ -1158,8 +1158,8 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR firePropertyChange(_rOldValues); // TODO: can this be done before the notifications? - if(!(m_bBeforeFirst || m_bAfterLast) && !m_aCurrentRow.isNull() && m_aCurrentRow->isValid() && m_aCurrentRow != m_pCache->getEnd()) - m_aOldRow->setRow(new ORowSetValueVector(m_aCurrentRow->getBody())); + if(!(m_bBeforeFirst || m_bAfterLast) && !m_aCurrentRow.isNull() && m_aCurrentRow->is() && m_aCurrentRow != m_pCache->getEnd()) + m_aOldRow->setRow(new ORowSetValueVector( *(*m_aCurrentRow) )); if ( _bMoved && _bDoNotify ) // - cursorMoved @@ -1283,7 +1283,7 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow) { TDataColumns::iterator aEnd = m_aDataColumns.end(); for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i) // #104278# OJ ++i inserted - (*aIter)->fireValueChange(_rOldRow.isValid() ? (_rOldRow->get())[i+1] : ::connectivity::ORowSetValue()); + (*aIter)->fireValueChange(_rOldRow.is() ? (_rOldRow->get())[i+1] : ::connectivity::ORowSetValue()); } catch(Exception&) { @@ -1413,10 +1413,10 @@ void ORowSetBase::movementFailed() ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getOldRow" ); - OSL_ENSURE(m_aOldRow.isValid(),"RowSetRowHElper isn't valid!"); + OSL_ENSURE(m_aOldRow.is(),"RowSetRowHElper isn't valid!"); ORowSetRow aOldValues; - if ( !_bWasNew && m_aOldRow->getRow().isValid() ) - aOldValues = new ORowSetValueVector( m_aOldRow->getRow().getBody()); // remember the old values + if ( !_bWasNew && m_aOldRow->getRow().is() ) + aOldValues = new ORowSetValueVector( *(m_aOldRow->getRow())); // remember the old values return aOldValues; } diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index f4d7ae108..171516bab 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -467,7 +467,7 @@ Any ORowSetCache::getBookmark( ) if(m_bAfterLast) throwFunctionSequenceException(m_xSet.get()); - if ( m_aMatrixIter >= m_pMatrix->end() || m_aMatrixIter < m_pMatrix->begin() || !(*m_aMatrixIter).isValid()) + if ( m_aMatrixIter >= m_pMatrix->end() || m_aMatrixIter < m_pMatrix->begin() || !(*m_aMatrixIter).is()) { return Any(); // this is allowed here because the rowset knowns what it is doing } @@ -491,7 +491,7 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark ) if ( !m_bAfterLast ) { m_aMatrixIter = calcPosition(); - OSL_ENSURE(m_aMatrixIter->isValid(),"Iterator after moveToBookmark not valid"); + OSL_ENSURE(m_aMatrixIter->is(),"Iterator after moveToBookmark not valid"); } else m_aMatrixIter = m_pMatrix->end(); @@ -502,7 +502,7 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark ) else return sal_False; - return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid(); + return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is(); } sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) @@ -514,7 +514,7 @@ sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 ro absolute(m_nPosition); // for(sal_Int32 i=0;i<rows && m_aMatrixIter != m_pMatrix->end();++i,++m_aMatrixIter) ; - bRet = m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid(); + bRet = m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).is(); } return bRet; @@ -724,7 +724,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos { if(bCheck) { - if(!aIter->isValid()) + if(!aIter->is()) *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); m_pCacheSet->fillValueRow(*aIter,i); } @@ -751,7 +751,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos { if(bCheck) { - if(!aIter->isValid()) + if(!aIter->is()) *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); m_pCacheSet->fillValueRow(*aIter,nPos++); } @@ -886,7 +886,7 @@ sal_Bool ORowSetCache::moveWindow() bCheck = m_pCacheSet->next(); if ( bCheck ) { - if(!aIter->isValid()) + if(!aIter->is()) *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); m_pCacheSet->fillValueRow(*aIter,i+1); } @@ -905,7 +905,7 @@ sal_Bool ORowSetCache::moveWindow() { // position in window OSL_ENSURE((m_nPosition - m_nStartPos -1) < (sal_Int32)m_pMatrix->size(),"Position is behind end()!"); m_aMatrixIter = calcPosition(); - if(!m_aMatrixIter->isValid()) + if(!m_aMatrixIter->is()) { sal_Bool bOk( m_pCacheSet->absolute( m_nPosition ) ); if ( bOk ) @@ -991,13 +991,13 @@ sal_Bool ORowSetCache::moveWindow() m_nStartPos = 0; } // here we need only to check if the begining row is valid. If not we have to fetch it. - if(!m_pMatrix->begin()->isValid()) + if(!m_pMatrix->begin()->is()) { aIter = m_pMatrix->begin(); nPos = m_nStartPos; bCheck = m_pCacheSet->absolute(m_nStartPos); - for(; !aIter->isValid() && bCheck;++aIter) + for(; !aIter->is() && bCheck;++aIter) { OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator"); bCheck = m_pCacheSet->next(); @@ -1073,7 +1073,7 @@ sal_Bool ORowSetCache::last( ) #if OSL_DEBUG_LEVEL > 1 if(bRet) { - OSL_ENSURE((*m_aMatrixIter).isValid(),"ORowSetCache::last: Row not valid!"); + OSL_ENSURE((*m_aMatrixIter).is(),"ORowSetCache::last: Row not valid!"); } #endif @@ -1190,7 +1190,7 @@ sal_Bool ORowSetCache::previous( ) else { m_aMatrixIter = calcPosition(); - bRet = (*m_aMatrixIter).isValid(); + bRet = (*m_aMatrixIter).is(); } } } @@ -1223,7 +1223,7 @@ sal_Bool ORowSetCache::rowInserted( ) // XResultSetUpdate sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks) { - if ( !m_bNew || !m_aInsertRow->isValid() ) + 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); @@ -1242,7 +1242,7 @@ sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks) ORowSetMatrix::iterator aIter = m_pMatrix->begin(); for(;aIter != m_pMatrix->end();++aIter) { - if ( m_aMatrixIter != aIter && aIter->isValid() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) ) + if ( m_aMatrixIter != aIter && aIter->is() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) ) { o_aBookmarks.push_back(lcl_getBookmark((*aIter)->get()[0],m_pCacheSet)); } @@ -1298,7 +1298,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector ORowSetMatrix::iterator aIter = m_pMatrix->begin(); for(;aIter != m_pMatrix->end();++aIter) { - if ( m_aMatrixIter != aIter && aIter->isValid() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) ) + if ( m_aMatrixIter != aIter && aIter->is() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) ) { o_aBookmarks.push_back(lcl_getBookmark((*aIter)->get()[0],m_pCacheSet)); } @@ -1324,7 +1324,7 @@ bool ORowSetCache::deleteRow( ) (*aPos) = NULL; ORowSetMatrix::iterator aEnd = m_pMatrix->end(); - for(++aPos;aPos != aEnd && aPos->isValid();++aPos) + for(++aPos;aPos != aEnd && aPos->is();++aPos) { *(aPos-1) = *aPos; (*aPos) = NULL; @@ -1359,7 +1359,7 @@ void ORowSetCache::moveToInsertRow( ) m_bUpdated = m_bAfterLast = sal_False; m_aInsertRow = m_pInsertMatrix->begin(); - if(!m_aInsertRow->isValid()) + if(!m_aInsertRow->is()) *m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount()); // we don't unbound the bookmark column @@ -1430,7 +1430,7 @@ void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist) void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRow) { m_aInsertRow = m_pInsertMatrix->begin(); - if(!m_aInsertRow->isValid()) + if(!m_aInsertRow->is()) *m_aInsertRow = new ORowSetValueVector(m_xMetaData->getColumnCount()); (*(*m_aInsertRow)) = (*(*_rOriginalRow)); @@ -1559,7 +1559,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection, void ORowSetCache::clearInsertRow() { // we don't unbound the bookmark column - if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->isValid() ) + if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->is() ) { ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin()+1; ORowSetValueVector::Vector::iterator aEnd = (*m_aInsertRow)->get().end(); @@ -1592,7 +1592,7 @@ void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow) TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end(); for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter) { - if ( aOldRowIter->getBodyPtr() == _rRow.getBodyPtr() ) + if ( aOldRowIter->get() == _rRow.get() ) { m_aOldRows.erase(aOldRowIter); break; @@ -1606,8 +1606,8 @@ sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPo TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end(); for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter) { - if ( aOldRowIter->isValid() && aOldRowIter->getBody().getRow().isValid() ) - aOldRowIter->getBody().setRow(new ORowSetValueVector(aOldRowIter->getBody().getRow().getBody()) ); + if ( aOldRowIter->is() && (*aOldRowIter)->getRow().is() ) + (*aOldRowIter)->setRow(new ORowSetValueVector( *((*aOldRowIter)->getRow()) ) ); } sal_Int32 nNewSt = _nNewStartPos; sal_Bool bRet = fillMatrix(nNewSt,_nNewEndPos); @@ -1621,14 +1621,14 @@ sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix: sal_Int32 nColumnCount = m_xMetaData->getColumnCount(); for(; _bCheck && _aIter != _aEnd;) { - if ( !_aIter->isValid() ) + if ( !_aIter->is() ) *_aIter = new ORowSetValueVector(nColumnCount); else { TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end(); for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter) { - if ( aOldRowIter->getBody().getRow().isEqualBody(*_aIter) ) + if ( (*(*aOldRowIter)).getRow() == *_aIter ) *_aIter = new ORowSetValueVector(nColumnCount); } } @@ -1661,7 +1661,7 @@ void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_ ORowSetMatrix::iterator aIter = m_pMatrix->begin(); for(;aIter != m_pMatrix->end();++aIter) { - if ( aIter->isValid() && m_pCacheSet->updateColumnValues((*aIter)->get(),io_aRow,o_ChangedColumns)) + if ( aIter->is() && m_pCacheSet->updateColumnValues((*aIter)->get(),io_aRow,o_ChangedColumns)) { break; } diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx index 52ecb818c..dd5ac23cd 100644 --- a/dbaccess/source/core/api/RowSetRow.hxx +++ b/dbaccess/source/core/api/RowSetRow.hxx @@ -27,7 +27,7 @@ #ifndef DBACCESS_CORE_API_ROWSETROW_HXX #define DBACCESS_CORE_API_ROWSETROW_HXX -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <connectivity/CommonTools.hxx> #include "connectivity/FValue.hxx" #include <comphelper/types.hxx> @@ -35,7 +35,7 @@ namespace dbaccess { typedef connectivity::ORowVector< connectivity::ORowSetValue > ORowSetValueVector; - typedef ::vos::ORef< ORowSetValueVector > ORowSetRow; + typedef ::rtl::Reference< ORowSetValueVector > ORowSetRow; typedef ::std::vector< ORowSetRow > ORowSetMatrix; class ORowSetOldRowHelper @@ -66,7 +66,7 @@ namespace dbaccess inline void setRow(const ORowSetRow& _rRow) { m_aRow = _rRow; } }; - typedef ::vos::ORef< ORowSetOldRowHelper > TORowSetOldRowHelperRef; + typedef ::rtl::Reference< ORowSetOldRowHelper > TORowSetOldRowHelperRef; class ORowSetValueCompare { diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 733c3520a..1ab9fec84 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -764,7 +764,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr return m_aCurrentColumns[SelectColumns]; ::std::vector< ::rtl::OUString> aNames; - ::vos::ORef< OSQLColumns> aSelectColumns; + ::rtl::Reference< OSQLColumns> aSelectColumns; sal_Bool bCase = sal_True; Reference< XNameAccess> xQueryColumns; if ( m_nCommandType == CommandType::QUERY ) @@ -1378,7 +1378,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( ) // now set the Parameters if ( !m_aCurrentColumns[ParameterColumns] ) { - ::vos::ORef< OSQLColumns> aCols = m_aSqlIterator.getParameters(); + ::rtl::Reference< OSQLColumns> aCols = m_aSqlIterator.getParameters(); ::std::vector< ::rtl::OUString> aNames; OSQLColumns::Vector::const_iterator aEnd = aCols->get().end(); for(OSQLColumns::Vector::const_iterator aIter = aCols->get().begin(); aIter != aEnd;++aIter) @@ -1425,7 +1425,7 @@ void OSingleSelectQueryComposer::clearCurrentCollections() } Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumnType _eType, - const ::vos::ORef< OSQLColumns >& _rCols ) + const ::rtl::Reference< OSQLColumns >& _rCols ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setCurrentColumns" ); ::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed); diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index ec3b8623a..e4ec3ac83 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -177,7 +177,7 @@ void OQuery::rebuildColumns() } Reference< XDatabaseMetaData > xDBMeta( m_xConnection->getMetaData(), UNO_QUERY_THROW ); - ::vos::ORef< OSQLColumns > aParseColumns( + ::rtl::Reference< OSQLColumns > aParseColumns( ::connectivity::parse::OParseColumn::createColumnsForResultSet( xResultSetMeta, xDBMeta,xColumnDefinitions ) ); xColumns = OPrivateColumns::createWithIntrinsicNames( aParseColumns, xDBMeta->storesMixedCaseQuotedIdentifiers(), *this, m_aMutex ); diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 30f005d83..51305bcb7 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -90,7 +90,6 @@ using namespace ::com::sun::star::reflection; using namespace ::com::sun::star::script; using namespace ::cppu; using namespace ::osl; -using namespace ::vos; using namespace ::dbtools; using namespace ::comphelper; namespace css = ::com::sun::star; diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx index c461dbbf3..4887f8177 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.hxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx @@ -81,6 +81,7 @@ #include <tools/string.hxx> #include <unotools/sharedunocomponent.hxx> #include <vos/mutex.hxx> +#include <rtl/ref.hxx> #include <memory> diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 1c09997b4..4577ebb07 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -98,7 +98,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::reflection; using namespace ::cppu; using namespace ::osl; -using namespace ::vos; using namespace ::dbtools; using namespace ::comphelper; namespace css = ::com::sun::star; diff --git a/dbaccess/source/core/dataaccess/datasource.hxx b/dbaccess/source/core/dataaccess/datasource.hxx index 94c91fc59..78efe87fd 100644 --- a/dbaccess/source/core/dataaccess/datasource.hxx +++ b/dbaccess/source/core/dataaccess/datasource.hxx @@ -45,7 +45,7 @@ #include <com/sun/star/embed/XTransactionListener.hpp> #include "apitools.hxx" #include "bookmarkcontainer.hxx" -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <tools/string.hxx> #include <connectivity/CommonTools.hxx> #include <comphelper/broadcasthelper.hxx> diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index c42d8d183..803d3fb6f 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -156,7 +156,7 @@ namespace dbaccess getStructuredCondition( TGetParseNode& _aGetFunctor ); ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > - setCurrentColumns( EColumnType _eType, const ::vos::ORef< ::connectivity::OSQLColumns >& _rCols ); + setCurrentColumns( EColumnType _eType, const ::rtl::Reference< ::connectivity::OSQLColumns >& _rCols ); //helper methods for mem_fun_t inline bool implSetFilter(::rtl::OUString _sFilter) { setFilter(_sFilter); return true;} diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx index c0e5eb499..9e6f03929 100644 --- a/dbaccess/source/ui/inc/ConnectionLineData.hxx +++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx @@ -28,11 +28,10 @@ #define DBAUI_CONNECTIONLINEDATA_HXX #include "QEnumTypes.hxx" -#include <vos/refernce.hxx> #include <vector> -#include <vos/ref.hxx> - +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include "RefFunctor.hxx" #include <rtl/ustring.hxx> @@ -52,7 +51,7 @@ namespace dbaui the class OConnectionLineData contains the data of a connection e.g. the source and the destanation field **/ - class OConnectionLineData : public ::vos::OReference + class OConnectionLineData : public ::salhelper::SimpleReferenceObject { ::rtl::OUString m_aSourceFieldName; ::rtl::OUString m_aDestFieldName; @@ -94,7 +93,7 @@ namespace dbaui //------------------------------------------------------------------------- //------------------------------------------------------------------ - typedef ::vos::ORef< OConnectionLineData > OConnectionLineDataRef; + typedef ::rtl::Reference< OConnectionLineData > OConnectionLineDataRef; typedef ::std::vector< OConnectionLineDataRef > OConnectionLineDataVec; } #endif // DBAUI_CONNECTIONLINEDATA_HXX diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx index 664597641..18a70fb64 100644 --- a/dbaccess/source/ui/inc/RefFunctor.hxx +++ b/dbaccess/source/ui/inc/RefFunctor.hxx @@ -28,7 +28,7 @@ #ifndef DBAUI_REFFUNCTOR_HXX #define DBAUI_REFFUNCTOR_HXX -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #ifndef INCLUDED_FUNCTIONAL #define INCLUDED_FUNCTIONAL #include <functional> @@ -36,19 +36,19 @@ namespace dbaui { - template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::vos::ORef<T> ,void> + template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::rtl::Reference<T> ,void> { ::std::mem_fun_t<bool,T> m_aFunction; public: OUnaryRefFunctor(const ::std::mem_fun_t<bool,T>& _aFunc) : m_aFunction(_aFunc) {} - inline void operator()(const ::vos::ORef<T>& _aType) const + inline void operator()(const ::rtl::Reference<T>& _aType) const { - m_aFunction(_aType.getBodyPtr()); + m_aFunction(_aType.get()); } -// inline void operator()(const ::vos::ORef<T>& _aType) +// inline void operator()(const ::rtl::Reference<T>& _aType) // { -// m_aFunction(_aType.getBodyPtr()); +// m_aFunction(_aType.get()); // } }; // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx index b5320a2b7..b64ef3873 100644 --- a/dbaccess/source/ui/inc/TableFieldDescription.hxx +++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx @@ -34,7 +34,9 @@ #include "QEnumTypes.hxx" #include <rtl/ustring.hxx> #include <com/sun/star/beans/PropertyValue.hpp> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> + +#include <salhelper/simplereferenceobject.hxx> namespace comphelper { @@ -44,7 +46,7 @@ namespace comphelper class Window; namespace dbaui { - class OTableFieldDesc : public ::vos::OReference + class OTableFieldDesc : public ::salhelper::SimpleReferenceObject { private: ::std::vector< ::rtl::OUString > @@ -152,7 +154,7 @@ namespace dbaui return bEmpty; } //------------------------------------------------------------------ - typedef ::vos::ORef< OTableFieldDesc> OTableFieldDescRef; + typedef ::rtl::Reference< OTableFieldDesc> OTableFieldDescRef; typedef ::std::vector<OTableFieldDescRef> OTableFields; } #endif // diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index 5bb302321..04018dec5 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -326,7 +326,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev ) // ----------------------------------------------------------------------------- BOOL OConnectionLine::IsValid() const { - return m_pData.isValid(); + return m_pData.is(); } //------------------------------------------------------------------------ double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q) diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx index 6d8238b87..9140d6eff 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx @@ -53,7 +53,7 @@ OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldNam //------------------------------------------------------------------------ OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData ) - : ::vos::OReference() + : ::salhelper::SimpleReferenceObject() { DBG_CTOR(OConnectionLineData,NULL); *this = rConnLineData; diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 465de5a72..27a3c9c1c 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1505,7 +1505,7 @@ namespace aDragLeft->SetField(aCondition); aDragLeft->SetFunctionType(FKT_CONDITION); - eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).isValid() ? eOk : eTooManyColumns; + eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns; } else //! TODO not supported yet eErrorCode = eStatementTooComplex; @@ -1951,7 +1951,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).isValid()) + if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is()) (*aIter) = NULL; OTableFields().swap( rUnUsedFields ); } @@ -2362,7 +2362,7 @@ namespace for(;aIter != aEnd;++aIter) { OTableFieldDescRef pEntry = *aIter; - if(pEntry.isValid() && pEntry->GetFieldAlias() == aColumnName) + if(pEntry.is() && pEntry->GetFieldAlias() == aColumnName) pEntry->SetOrderDir( eOrderDir ); } } @@ -2757,7 +2757,7 @@ bool OQueryDesignView::HasFieldByAliasName(const ::rtl::OUString& rFieldName, OT // ----------------------------------------------------------------------------- SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate) { - return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).isValid() ? eOk : eTooManyColumns; + return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns; } // ----------------------------------------------------------------------------- sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const @@ -3040,8 +3040,8 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE ::rtl::OUString& _rsErrorMessage, Reference<XPropertySet>& _rxColumn) const { - OSL_ENSURE(pEntry.isValid(),"Entry is null!"); - if(!pEntry.isValid()) + OSL_ENSURE(pEntry.is(),"Entry is null!"); + if(!pEntry.is()) return NULL; Reference< XConnection> xConnection = static_cast<OQueryController&>(getController()).getConnection(); if(!xConnection.is()) @@ -3160,7 +3160,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& ++field ) { - ::vos::ORef< OTableFieldDesc > pField( new OTableFieldDesc() ); + ::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() ); pField->Load( *field, true ); InsertField( pField, sal_True, sal_False ); } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 627ec9ed8..6b10e23a4 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -455,9 +455,9 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId) if ( nColId > getFields().size() ) return NULL; OTableFieldDescRef pEntry = getFields()[nColId-1]; - DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetController : keine FieldDescription !"); + DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::GetController : keine FieldDescription !"); - if (!pEntry.isValid()) + if (!pEntry.is()) return NULL; if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly()) @@ -492,7 +492,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() ) return; OTableFieldDescRef pEntry = getFields()[nPos-1]; - DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::InitController : keine FieldDescription !"); + DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::InitController : keine FieldDescription !"); long nCellIndex = GetRealRow(nRow); switch (nCellIndex) @@ -767,7 +767,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes { USHORT nColumnPostion; aSelEntry = FindFirstFreeCol(nColumnPostion); - if ( !aSelEntry.isValid() ) + if ( !aSelEntry.is() ) { AppendNewCol(1); aSelEntry = FindFirstFreeCol(nColumnPostion); @@ -904,7 +904,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes } } - if ( i > 0 && InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).isEmpty() ) // may we have to append more than one field + if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field { // the field could not be isnerted String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) ); sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField()); @@ -927,11 +927,11 @@ sal_Bool OSelectionBrowseBox::SaveModified() if(getFields().size() > static_cast<USHORT>(nCurrentColumnPos - 1)) pEntry = getEntry(nCurrentColumnPos - 1); - sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False; + sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False; sal_Bool bError = sal_False; sal_Bool bListAction = sal_False; - if (pEntry.isValid() && Controller().Is() && Controller()->IsModified()) + if (pEntry.is() && Controller().Is() && Controller()->IsModified()) { // fuer die Undo-Action String strOldCellContents,sNewValue; @@ -1224,7 +1224,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() } // habe ich Daten in einer FieldDescription gespeichert, die vorher leer war und es nach den Aenderungen nicht mehr ist ? - if ( pEntry.isValid() && bWasEmpty && !pEntry->IsEmpty() && !bError ) + if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError ) { // Default auf sichtbar pEntry->SetVisible(sal_True); @@ -1266,7 +1266,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, if(getFields().size() > sal_uInt16(nPos - 1)) pEntry = getFields()[nPos - 1]; - if (!pEntry.isValid()) + if (!pEntry.is()) return; long nRow = GetRealRow(m_nSeekRow); @@ -1528,7 +1528,7 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth) // der FieldDescription Bescheid sagen OTableFieldDescRef pEntry = getEntry(GetColumnPos(nColId) - 1); - if (pEntry.isValid()) + if (pEntry.is()) pEntry->SetColWidth(sal_uInt16(GetColumnWidth(nColId))); if (bWasEditing) @@ -1679,7 +1679,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount() while (aIter != getFields().end()) { - if ((*aIter).isValid() && !(*aIter)->IsEmpty()) + if ((*aIter).is() && !(*aIter)->IsEmpty()) ++nCount; ++aIter; } @@ -1700,7 +1700,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPositio { ++_rColumnPosition; OTableFieldDescRef pEntry = (*aIter); - if ( pEntry.isValid() && pEntry->IsEmpty() ) + if ( pEntry.is() && pEntry->IsEmpty() ) return pEntry; ++aIter; } @@ -1716,7 +1716,7 @@ void OSelectionBrowseBox::CheckFreeColumns(USHORT& _rColumnPosition) { // es ist voll, also einen Packen Spalten anhaengen AppendNewCol(DEFAULT_QUERY_COLS); - OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).isValid()); + OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).is()); } } //------------------------------------------------------------------------------ @@ -1738,7 +1738,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt for(;aIter != aEnd;++aIter) { pEntry = *aIter; - OSL_ENSURE(pEntry.isValid(),"OTableFieldDescRef was null!"); + OSL_ENSURE(pEntry.is(),"OTableFieldDescRef was null!"); const ::rtl::OUString aField = pEntry->GetField(); const ::rtl::OUString aAlias = pEntry->GetAlias(); @@ -1808,7 +1808,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S if(!xConnection.is()) return; DBG_CHKTHIS(OSelectionBrowseBox,NULL); - DBG_ASSERT(rInfo.isValid() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!"); + DBG_ASSERT(rInfo.is() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!"); OTableFieldDescRef pLastEntry; Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData(); @@ -1855,7 +1855,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S } } } // for(;aIter != getFields().end();++aIter) - if ( pLastEntry.isValid() ) + if ( pLastEntry.is() ) { String sCriteria = rValue; String sOldCriteria = pLastEntry->GetCriteria( nLevel ); @@ -1882,7 +1882,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // das GroupBy wird bereits von rInfo "ubernommen pTmp->SetGroupBy(sal_False); - if ( pTmp.isValid() ) + if ( pTmp.is() ) { pTmp->SetCriteria( nLevel, rValue); if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1)) @@ -1937,7 +1937,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde if (aIter == rFields.end()) { OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); - if(pTmp.isValid()) + if(pTmp.is()) { if ( !m_bOrderByUnRelated && !bAppend ) pTmp->SetVisible(sal_True); @@ -2458,11 +2458,11 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId) USHORT nPos = GetColumnPos(nColId); DBG_ASSERT(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!"); OTableFieldDescRef pEntry = getEntry(nPos-1); - DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !"); + DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !"); static_cast<OQueryController&>(getDesignView()->getController()).setModified( sal_True ); EditBrowseBox::ColumnResized(nColId); - if ( pEntry.isValid()) + if ( pEntry.is()) { if ( !m_bInUndoMode ) { @@ -2484,7 +2484,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId"); OTableFieldDescRef pEntry = getFields()[nPos-1]; - DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !"); + DBG_ASSERT(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !"); long nRow = GetRealRow(nRowId); String strText(GetCellText(nRow, nColId)); @@ -2685,8 +2685,8 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos) OSL_ENSURE(aFields.size() > _nPos,"ColID is to great!"); OTableFieldDescRef pEntry = aFields[_nPos]; - OSL_ENSURE(pEntry.isValid(),"Invalid entry!"); - if ( !pEntry.isValid() ) + OSL_ENSURE(pEntry.is(),"Invalid entry!"); + if ( !pEntry.is() ) { pEntry = new OTableFieldDesc(); pEntry->SetColumnId( @@ -2814,7 +2814,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n if(getFields().size() > sal_uInt16(_nColumnPos - 1)) pEntry = getFields()[_nColumnPos - 1]; - if ( _nRow == BROW_VIS_ROW && pEntry.isValid() ) + if ( _nRow == BROW_VIS_ROW && pEntry.is() ) return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK ); return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos ); @@ -2830,7 +2830,7 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const ::rtl::OUString& rFieldName, { if ( (*aIter)->GetFieldAlias() == rFieldName ) { - rInfo.getBody() = (*aIter).getBody(); + *rInfo = *(*aIter); break; } } diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index ceb2b53f9..27d4f7300 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -142,7 +142,7 @@ BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldNa if(aIter == aEnd) { OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName); - if (!pNew.isValid()) + if (!pNew.is()) return FALSE; m_vConnLineData.push_back(pNew); diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx index a868dc809..c318eb88c 100644 --- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx @@ -60,8 +60,8 @@ OTableFieldDesc::OTableFieldDesc() } //------------------------------------------------------------------------------ OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS) - : ::vos::OReference() - + : ::salhelper::SimpleReferenceObject() + { DBG_CTOR(OTableFieldDesc,NULL); *this = rRS; diff --git a/dbaccess/util/makefile.mk b/dbaccess/util/makefile.mk index 653d58018..8402151ff 100644 --- a/dbaccess/util/makefile.mk +++ b/dbaccess/util/makefile.mk @@ -129,8 +129,9 @@ SHL2STDLIBS= \ $(SO2LIB) \ $(VOSLIB) \ $(SALLIB) \ + $(SALHELPERLIB) \ $(EDITENGLIB) - + .IF "$(GUI)"=="OS2" SHL2STDLIBS+= $(LB)$/i$(TARGET).lib SHL2DEPN=$(LB)$/i$(TARGET).lib |