[Libreoffice-commits] core.git: sc/inc sc/source

Noel Grandin noel at peralex.com
Wed Oct 21 04:14:26 PDT 2015


 sc/inc/linkuno.hxx              |    6 ++----
 sc/source/ui/unoobj/linkuno.cxx |   12 +++---------
 2 files changed, 5 insertions(+), 13 deletions(-)

New commits:
commit 017f3d1aafd05603e1afd316f5e0dce19f7b08aa
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Oct 21 12:47:31 2015 +0200

    boost::ptr_vector -> std::vector
    
    no need to store uno::Reference on the heap
    
    Change-Id: Iec3abe2190648e85a37b22763c8d19ba29634373

diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx
index cc74a8a..e4a9642 100644
--- a/sc/inc/linkuno.hxx
+++ b/sc/inc/linkuno.hxx
@@ -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,
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index ed02a3f..7dcfc8d 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -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 )


More information about the Libreoffice-commits mailing list