boost::ptr_vector -> std::vector
no need to store uno::Reference on the heap Change-Id: Iec3abe2190648e85a37b22763c8d19ba29634373
This commit is contained in:
parent
6231a9b4e9
commit
017f3d1aaf
2 changed files with 5 additions and 13 deletions
|
@ -41,14 +41,12 @@
|
|||
|
||||
#include "externalrefmgr.hxx"
|
||||
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
#include <vector>
|
||||
|
||||
class ScDocShell;
|
||||
class ScTableLink;
|
||||
|
||||
typedef ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::util::XRefreshListener > XRefreshListenerRef;
|
||||
typedef boost::ptr_vector<XRefreshListenerRef> XRefreshListenerArr_Impl;
|
||||
typedef std::vector< css::uno::Reference< css::util::XRefreshListener > > XRefreshListenerArr_Impl;
|
||||
|
||||
class ScSheetLinkObj : public cppu::WeakImplHelper<
|
||||
com::sun::star::container::XNamed,
|
||||
|
|
|
@ -157,9 +157,7 @@ void SAL_CALL ScSheetLinkObj::addRefreshListener(
|
|||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
uno::Reference<util::XRefreshListener>* pObj =
|
||||
new uno::Reference<util::XRefreshListener>( xListener );
|
||||
aRefreshListeners.push_back( pObj );
|
||||
aRefreshListeners.push_back( xListener );
|
||||
|
||||
// hold one additional ref to keep this object alive as long as there are listeners
|
||||
if ( aRefreshListeners.size() == 1 )
|
||||
|
@ -706,9 +704,7 @@ void SAL_CALL ScAreaLinkObj::addRefreshListener(
|
|||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
uno::Reference<util::XRefreshListener>* pObj =
|
||||
new uno::Reference<util::XRefreshListener>( xListener );
|
||||
aRefreshListeners.push_back( pObj );
|
||||
aRefreshListeners.push_back( xListener );
|
||||
|
||||
// hold one additional ref to keep this object alive as long as there are listeners
|
||||
if ( aRefreshListeners.size() == 1 )
|
||||
|
@ -1146,9 +1142,7 @@ void SAL_CALL ScDDELinkObj::addRefreshListener(
|
|||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
uno::Reference<util::XRefreshListener>* pObj =
|
||||
new uno::Reference<util::XRefreshListener>( xListener );
|
||||
aRefreshListeners.push_back( pObj );
|
||||
aRefreshListeners.push_back( xListener );
|
||||
|
||||
// hold one additional ref to keep this object alive as long as there are listeners
|
||||
if ( aRefreshListeners.size() == 1 )
|
||||
|
|
Loading…
Reference in a new issue