Kaydet (Commit) 03a1c421 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

rtl::Reference fits just fine here

Change-Id: Ib48999c7fe532b2a8bf5222ef27d8d4929937e3b
üst b67f325a
...@@ -123,7 +123,6 @@ ...@@ -123,7 +123,6 @@
#include <comphelper/enumhelper.hxx> #include <comphelper/enumhelper.hxx>
#include <comphelper/evtlistenerhlp.hxx> #include <comphelper/evtlistenerhlp.hxx>
#include <comphelper/extract.hxx> #include <comphelper/extract.hxx>
#include <comphelper/implementationreference.hxx>
#include <comphelper/interaction.hxx> #include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx> #include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numbers.hxx> #include <comphelper/numbers.hxx>
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <cppuhelper/typeprovider.hxx> #include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp>
#include <comphelper/implementationreference.hxx>
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <comphelper/types.hxx> #include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx> #include <connectivity/dbtools.hxx>
...@@ -112,8 +111,7 @@ namespace connectivity ...@@ -112,8 +111,7 @@ namespace connectivity
Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
::comphelper::ImplementationReference< OTableContainerListener,XContainerListener> rtl::Reference<OTableContainerListener> m_xTablePropertyListener;
m_xTablePropertyListener;
::std::vector< ColumnDesc > m_aColumnDesc; ::std::vector< ColumnDesc > m_aColumnDesc;
OTableHelperImpl(const Reference< ::com::sun::star::sdbc::XConnection >& _xConnection) OTableHelperImpl(const Reference< ::com::sun::star::sdbc::XConnection >& _xConnection)
: m_xConnection(_xConnection) : m_xConnection(_xConnection)
...@@ -177,9 +175,9 @@ void SAL_CALL OTableHelper::disposing() ...@@ -177,9 +175,9 @@ void SAL_CALL OTableHelper::disposing()
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);
if ( m_pImpl->m_xTablePropertyListener.is() ) if ( m_pImpl->m_xTablePropertyListener.is() )
{ {
m_pTables->removeContainerListener(m_pImpl->m_xTablePropertyListener.getRef()); m_pTables->removeContainerListener(m_pImpl->m_xTablePropertyListener.get());
m_pImpl->m_xTablePropertyListener->clear(); m_pImpl->m_xTablePropertyListener->clear();
m_pImpl->m_xTablePropertyListener.dispose(); m_pImpl->m_xTablePropertyListener.clear();
} }
OTable_TYPEDEF::disposing(); OTable_TYPEDEF::disposing();
...@@ -403,8 +401,8 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames) ...@@ -403,8 +401,8 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames)
if ( m_pTables->hasByName(sReferencedName) ) if ( m_pTables->hasByName(sReferencedName) )
{ {
if ( !m_pImpl->m_xTablePropertyListener.is() ) if ( !m_pImpl->m_xTablePropertyListener.is() )
m_pImpl->m_xTablePropertyListener = ::comphelper::ImplementationReference< OTableContainerListener,XContainerListener>( new OTableContainerListener(this) ); m_pImpl->m_xTablePropertyListener = new OTableContainerListener(this);
m_pTables->addContainerListener(m_pImpl->m_xTablePropertyListener.getRef()); m_pTables->addContainerListener(m_pImpl->m_xTablePropertyListener.get());
m_pImpl->m_xTablePropertyListener->add(sReferencedName); m_pImpl->m_xTablePropertyListener->add(sReferencedName);
} // if ( m_pTables->hasByName(sReferencedName) ) } // if ( m_pTables->hasByName(sReferencedName) )
sOldFKName = sFkName; sOldFKName = sFkName;
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <connectivity/dbtoolsdllapi.hxx> #include <connectivity/dbtoolsdllapi.hxx>
#include <connectivity/paramwrapper.hxx> #include <connectivity/paramwrapper.hxx>
#include <unotools/sharedunocomponent.hxx> #include <unotools/sharedunocomponent.hxx>
#include <comphelper/implementationreference.hxx>
#include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/interfacecontainer.hxx>
......
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