Tag: cws_src680_dba204c User: fs Date: 2006/07/21 04:03:40 Modified: dba/dbaccess/source/core/dataaccess/ComponentDefinition.cxx dba/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
Log: #i67635# make m_pColumns an ::sdt::auto_ptr, again Holding it as ImplementationReference is bad, since this would |acquire| it, but it delegates all |acquire| and |release| calls to its parent (ourself) Holding it as auto_ptr doesn't hurt: If we're in the dtor, then nobody can have a reference to the columns, since this would have been delegated to ourself, which means we could not be in the dtor. File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: ComponentDefinition.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ComponentDefinition.cxx?r1=1.9&r2=1.9.4.1 Delta lines: +7 -11 -------------------- --- ComponentDefinition.cxx 17 Jul 2006 13:08:59 -0000 1.9 +++ ComponentDefinition.cxx 21 Jul 2006 11:03:37 -0000 1.9.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: ComponentDefinition.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.9.4.1 $ * - * last change: $Author: obo $ $Date: 2006/07/17 13:08:59 $ + * last change: $Author: fs $ $Date: 2006/07/21 11:03:37 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -193,11 +193,7 @@ void SAL_CALL OComponentDefinition::disposing() { OContentHelper::disposing(); - if ( m_pColumns.is() ) - { m_pColumns->disposing(); - m_pColumns.reset(); - } } // ----------------------------------------------------------------------------- IPropertyArrayHelper& OComponentDefinition::getInfoHelper() @@ -223,7 +219,7 @@ ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(OContentHelper::rBHelper.bDisposed); - if ( !m_pColumns.is() ) + if ( !m_pColumns.get() ) { ::std::vector< ::rtl::OUString> aNames; @@ -235,10 +231,10 @@ for ( ; aIter != aEnd; ++aIter ) aNames.push_back( aIter->first ); - m_pColumns = TColumnsHelper( new OColumns( *this, m_aMutex, sal_True, aNames, this, NULL, sal_True, sal_False, sal_False ) ); - m_pColumns->setParent(*this); + m_pColumns.reset( new OColumns( *this, m_aMutex, sal_True, aNames, this, NULL, sal_True, sal_False, sal_False ) ); + m_pColumns->setParent( *this ); } - return m_pColumns.getRef(); + return m_pColumns.get(); } // ----------------------------------------------------------------------------- OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const File [changed]: ComponentDefinition.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ComponentDefinition.hxx?r1=1.6&r2=1.6.4.1 Delta lines: +5 -10 -------------------- --- ComponentDefinition.hxx 13 Jul 2006 15:20:27 -0000 1.6 +++ ComponentDefinition.hxx 21 Jul 2006 11:03:38 -0000 1.6.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: ComponentDefinition.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.6.4.1 $ * - * last change: $Author: obo $ $Date: 2006/07/13 15:20:27 $ + * last change: $Author: fs $ $Date: 2006/07/21 11:03:38 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -69,9 +69,6 @@ #ifndef _DBA_COREAPI_COLUMN_HXX_ #include <column.hxx> #endif -#ifndef _COMPHELPER_IMPLEMENTATIONREFERENCE_HXX -#include <comphelper/implementationreference.hxx> -#endif #include <memory> //........................................................................ @@ -119,8 +116,6 @@ }; -typedef ::comphelper::ImplementationReference< OColumns,::com::sun::star::container::XNameAccess > TColumnsHelper; - //========================================================================= //= OComponentDefinition - a database "document" which describes a query //========================================================================= @@ -134,7 +129,7 @@ OComponentDefinition(); protected: - TColumnsHelper m_pColumns; + ::std::auto_ptr< OColumns > m_pColumns; sal_Bool m_bTable; virtual ~OComponentDefinition(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
