Kaydet (Commit) 32694db4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

rtl::Reference fits just fine here

Change-Id: I14cdcab307f1d2edcebb9fd4aa3009daa32bc7d1
üst 03a1c421
...@@ -103,7 +103,7 @@ void OComponentDefinition::initialize( const Sequence< Any >& aArguments ) throw ...@@ -103,7 +103,7 @@ void OComponentDefinition::initialize( const Sequence< Any >& aArguments ) throw
void OComponentDefinition::registerProperties() void OComponentDefinition::registerProperties()
{ {
m_xColumnPropertyListener = ::comphelper::ImplementationReference<OColumnPropertyListener,XPropertyChangeListener>(new OColumnPropertyListener(this)); m_xColumnPropertyListener = new OColumnPropertyListener(this);
OComponentDefinition_Impl& rDefinition( getDefinition() ); OComponentDefinition_Impl& rDefinition( getDefinition() );
ODataSettings::registerPropertiesFor( &rDefinition ); ODataSettings::registerPropertiesFor( &rDefinition );
...@@ -194,7 +194,7 @@ void SAL_CALL OComponentDefinition::disposing() ...@@ -194,7 +194,7 @@ void SAL_CALL OComponentDefinition::disposing()
if ( m_pColumns.get() ) if ( m_pColumns.get() )
m_pColumns->disposing(); m_pColumns->disposing();
m_xColumnPropertyListener->clear(); m_xColumnPropertyListener->clear();
m_xColumnPropertyListener.dispose(); m_xColumnPropertyListener.clear();
} }
IPropertyArrayHelper& OComponentDefinition::getInfoHelper() IPropertyArrayHelper& OComponentDefinition::getInfoHelper()
...@@ -251,7 +251,7 @@ OColumn* OComponentDefinition::createColumn(const OUString& _rName) const ...@@ -251,7 +251,7 @@ OColumn* OComponentDefinition::createColumn(const OUString& _rName) const
OComponentDefinition_Impl::const_iterator aFind = rDefinition.find( _rName ); OComponentDefinition_Impl::const_iterator aFind = rDefinition.find( _rName );
if ( aFind != rDefinition.end() ) if ( aFind != rDefinition.end() )
{ {
aFind->second->addPropertyChangeListener(OUString(),m_xColumnPropertyListener.getRef()); aFind->second->addPropertyChangeListener(OUString(),m_xColumnPropertyListener.get());
return new OTableColumnWrapper( aFind->second, aFind->second, true ); return new OTableColumnWrapper( aFind->second, aFind->second, true );
} }
OSL_FAIL( "OComponentDefinition::createColumn: is this a valid case?" ); OSL_FAIL( "OComponentDefinition::createColumn: is this a valid case?" );
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "ContentHelper.hxx" #include "ContentHelper.hxx"
#include "apitools.hxx" #include "apitools.hxx"
#include <column.hxx> #include <column.hxx>
#include <comphelper/implementationreference.hxx>
#include <memory> #include <memory>
namespace dbaccess namespace dbaccess
...@@ -90,8 +89,7 @@ class OComponentDefinition :public OContentHelper ...@@ -90,8 +89,7 @@ class OComponentDefinition :public OContentHelper
protected: protected:
::std::auto_ptr< OColumns > m_pColumns; ::std::auto_ptr< OColumns > m_pColumns;
::comphelper::ImplementationReference< OColumnPropertyListener,::com::sun::star::beans::XPropertyChangeListener> rtl::Reference<OColumnPropertyListener> m_xColumnPropertyListener;
m_xColumnPropertyListener;
bool m_bTable; bool m_bTable;
virtual ~OComponentDefinition(); virtual ~OComponentDefinition();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment