Kaydet (Commit) 017f3d1a authored tarafından Noel Grandin's avatar Noel Grandin

boost::ptr_vector -> std::vector

no need to store uno::Reference on the heap

Change-Id: Iec3abe2190648e85a37b22763c8d19ba29634373
üst 6231a9b4
...@@ -41,14 +41,12 @@ ...@@ -41,14 +41,12 @@
#include "externalrefmgr.hxx" #include "externalrefmgr.hxx"
#include <boost/ptr_container/ptr_vector.hpp> #include <vector>
class ScDocShell; class ScDocShell;
class ScTableLink; class ScTableLink;
typedef ::com::sun::star::uno::Reference< typedef std::vector< css::uno::Reference< css::util::XRefreshListener > > XRefreshListenerArr_Impl;
::com::sun::star::util::XRefreshListener > XRefreshListenerRef;
typedef boost::ptr_vector<XRefreshListenerRef> XRefreshListenerArr_Impl;
class ScSheetLinkObj : public cppu::WeakImplHelper< class ScSheetLinkObj : public cppu::WeakImplHelper<
com::sun::star::container::XNamed, com::sun::star::container::XNamed,
......
...@@ -157,9 +157,7 @@ void SAL_CALL ScSheetLinkObj::addRefreshListener( ...@@ -157,9 +157,7 @@ void SAL_CALL ScSheetLinkObj::addRefreshListener(
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners.push_back( xListener );
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.push_back( pObj );
// hold one additional ref to keep this object alive as long as there are listeners // hold one additional ref to keep this object alive as long as there are listeners
if ( aRefreshListeners.size() == 1 ) if ( aRefreshListeners.size() == 1 )
...@@ -706,9 +704,7 @@ void SAL_CALL ScAreaLinkObj::addRefreshListener( ...@@ -706,9 +704,7 @@ void SAL_CALL ScAreaLinkObj::addRefreshListener(
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners.push_back( xListener );
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.push_back( pObj );
// hold one additional ref to keep this object alive as long as there are listeners // hold one additional ref to keep this object alive as long as there are listeners
if ( aRefreshListeners.size() == 1 ) if ( aRefreshListeners.size() == 1 )
...@@ -1146,9 +1142,7 @@ void SAL_CALL ScDDELinkObj::addRefreshListener( ...@@ -1146,9 +1142,7 @@ void SAL_CALL ScDDELinkObj::addRefreshListener(
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners.push_back( xListener );
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.push_back( pObj );
// hold one additional ref to keep this object alive as long as there are listeners // hold one additional ref to keep this object alive as long as there are listeners
if ( aRefreshListeners.size() == 1 ) if ( aRefreshListeners.size() == 1 )
......
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