[Libreoffice-commits] core.git: extensions/source

Caolán McNamara caolanm at redhat.com
Fri Sep 18 07:28:20 PDT 2015


 extensions/source/bibliography/datman.cxx          |    2 +-
 extensions/source/plugin/aqua/sysplug.mm           |    4 ++--
 extensions/source/plugin/inc/plugin/impl.hxx       |    9 +++------
 extensions/source/plugin/unx/sysplug.cxx           |    4 ++--
 extensions/source/plugin/win/sysplug.cxx           |    4 ++--
 extensions/source/propctrlr/browserlistbox.hxx     |    4 ++--
 extensions/source/propctrlr/browserview.cxx        |    2 +-
 extensions/source/propctrlr/standardcontrol.cxx    |    2 +-
 extensions/source/resource/ResourceIndexAccess.cxx |   14 +++++++-------
 extensions/source/resource/ResourceIndexAccess.hxx |    4 ++--
 extensions/source/resource/oooresourceloader.cxx   |    4 ++--
 extensions/source/scanner/scanunx.cxx              |   20 ++++++++++----------
 extensions/source/update/check/updatecheckjob.cxx  |    4 ++--
 13 files changed, 37 insertions(+), 40 deletions(-)

New commits:
commit 1de1b63c2243c8b89789a180bfeed3bbb2ff01ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Sep 18 11:51:16 2015 +0100

    boost->std
    
    Change-Id: Id55e334156628a916ce15fca8ec618eed0ae9366
    Reviewed-on: https://gerrit.libreoffice.org/18683
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index fcc7598..961be40 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -71,7 +71,7 @@
 #include "bib.hrc"
 #include "bibliography.hrc"
 #include <connectivity/dbtools.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
diff --git a/extensions/source/plugin/aqua/sysplug.mm b/extensions/source/plugin/aqua/sysplug.mm
index ad62100..56ce650 100644
--- a/extensions/source/plugin/aqua/sysplug.mm
+++ b/extensions/source/plugin/aqua/sysplug.mm
@@ -75,9 +75,9 @@ struct SysPlugData
     }
 };
 
-::boost::shared_ptr<SysPlugData> CreateSysPlugData()
+std::shared_ptr<SysPlugData> CreateSysPlugData()
 {
-    return ::boost::shared_ptr<SysPlugData>(new SysPlugData);
+    return std::shared_ptr<SysPlugData>(new SysPlugData);
 }
 
 void XPlugin_Impl::SetSysPlugDataParentView(SystemEnvData const& rEnvData)
diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx
index e0e9487..8de11bd 100644
--- a/extensions/source/plugin/inc/plugin/impl.hxx
+++ b/extensions/source/plugin/inc/plugin/impl.hxx
@@ -30,11 +30,8 @@
 
 #include <config_lgpl.h>
 
-#ifdef SOLARIS
 #include <limits>
-#endif
-
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #include "cppuhelper/weak.hxx"
 
@@ -83,7 +80,7 @@
 
 struct SysPlugData;
 
-::boost::shared_ptr<SysPlugData> CreateSysPlugData();
+std::shared_ptr<SysPlugData> CreateSysPlugData();
 
 extern "C" {
 
@@ -130,7 +127,7 @@ private:
     PluginComm*                 m_pPluginComm;
     NPP_t                       m_aInstance;
     NPWindow                    m_aNPWindow;
-    ::boost::shared_ptr<SysPlugData> m_pSysPlugData;
+    std::shared_ptr<SysPlugData> m_pSysPlugData;
     rtl_TextEncoding            m_aEncoding;
 
     const char**                m_pArgv;
diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx
index 87b5885..acb08a3 100644
--- a/extensions/source/plugin/unx/sysplug.cxx
+++ b/extensions/source/plugin/unx/sysplug.cxx
@@ -45,9 +45,9 @@
 #include <plugin/impl.hxx>
 
 
-::boost::shared_ptr<SysPlugData> CreateSysPlugData()
+std::shared_ptr<SysPlugData> CreateSysPlugData()
 {
-    return ::boost::shared_ptr<SysPlugData>();
+    return std::shared_ptr<SysPlugData>();
 }
 
 UnxPluginComm::UnxPluginComm(
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index 58d8951..3059641 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -65,9 +65,9 @@ void TRACEN( char const * s, long n );
 #define TRACEN(x,n)
 #endif
 
-::boost::shared_ptr<SysPlugData> CreateSysPlugData()
+std::shared_ptr<SysPlugData> CreateSysPlugData()
 {
-    return ::boost::shared_ptr<SysPlugData>();
+    return std::shared_ptr<SysPlugData>();
 }
 
 
diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx
index 72771c5..7683f9c 100644
--- a/extensions/source/propctrlr/browserlistbox.hxx
+++ b/extensions/source/propctrlr/browserlistbox.hxx
@@ -32,10 +32,10 @@
 #include <tools/link.hxx>
 #include <rtl/ref.hxx>
 
+#include <memory>
 #include <set>
 #include <unordered_map>
 #include <vector>
-#include <boost/shared_ptr.hpp>
 
 
 namespace pcr
@@ -51,7 +51,7 @@ namespace pcr
 
     // administrative structures for OBrowserListBox
 
-    typedef ::boost::shared_ptr< OBrowserLine > BrowserLinePointer;
+    typedef std::shared_ptr< OBrowserLine > BrowserLinePointer;
     struct ListBoxLine
     {
         OUString                         aName;
diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx
index 33d8843..90b6220 100644
--- a/extensions/source/propctrlr/browserview.cxx
+++ b/extensions/source/propctrlr/browserview.cxx
@@ -20,8 +20,8 @@
 #include "browserview.hxx"
 #include "propertyeditor.hxx"
 #include "propctrlr.hrc"
-#include <boost/scoped_ptr.hpp>
 #include <vcl/tabpage.hxx>
+#include <memory>
 
 namespace pcr
 {
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index c4276e73..9ffb0da 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -49,7 +49,7 @@
 #include <cstdlib>
 #include <limits>
 #include <boost/bind.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 
 namespace pcr
diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx
index 9b47ae2..403aaf4 100644
--- a/extensions/source/resource/ResourceIndexAccess.cxx
+++ b/extensions/source/resource/ResourceIndexAccess.cxx
@@ -26,21 +26,21 @@ using namespace ::com::sun::star::container;
 
 namespace
 {
-    static ::boost::shared_ptr<ResMgr> GetResMgr(Sequence<Any> const& rArgs)
+    static std::shared_ptr<ResMgr> GetResMgr(Sequence<Any> const& rArgs)
     {
         if(rArgs.getLength()!=1)
-            return ::boost::shared_ptr<ResMgr>();
+            return std::shared_ptr<ResMgr>();
         OUString sFilename;
         rArgs[0] >>= sFilename;
         SolarMutexGuard aGuard;
         const OString sEncName(OUStringToOString(sFilename, osl_getThreadTextEncoding()));
-        return ::boost::shared_ptr<ResMgr>(ResMgr::CreateResMgr(sEncName.getStr()));
+        return std::shared_ptr<ResMgr>(ResMgr::CreateResMgr(sEncName.getStr()));
     }
 
     class ResourceIndexAccessBase : public cppu::WeakImplHelper< ::com::sun::star::container::XIndexAccess>
     {
         public:
-            ResourceIndexAccessBase( ::boost::shared_ptr<ResMgr> pResMgr)
+            ResourceIndexAccessBase( std::shared_ptr<ResMgr> pResMgr)
                 : m_pResMgr(pResMgr)
             {
                 OSL_ENSURE(m_pResMgr, "no resource manager given");
@@ -55,13 +55,13 @@ namespace
 
         protected:
             // m_pResMgr should never be NULL
-            const ::boost::shared_ptr<ResMgr> m_pResMgr;
+            const std::shared_ptr<ResMgr> m_pResMgr;
     };
 
     class ResourceStringIndexAccess : public ResourceIndexAccessBase
     {
         public:
-            ResourceStringIndexAccess( ::boost::shared_ptr<ResMgr> pResMgr)
+            ResourceStringIndexAccess( std::shared_ptr<ResMgr> pResMgr)
                 : ResourceIndexAccessBase(pResMgr) {}
             // XIndexAccess
             virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -73,7 +73,7 @@ namespace
     class ResourceStringListIndexAccess : public ResourceIndexAccessBase
     {
         public:
-            ResourceStringListIndexAccess( ::boost::shared_ptr<ResMgr> pResMgr)
+            ResourceStringListIndexAccess( std::shared_ptr<ResMgr> pResMgr)
                 : ResourceIndexAccessBase(pResMgr) {}
             // XIndexAccess
             virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/extensions/source/resource/ResourceIndexAccess.hxx b/extensions/source/resource/ResourceIndexAccess.hxx
index 596c0af..97a6a49 100644
--- a/extensions/source/resource/ResourceIndexAccess.hxx
+++ b/extensions/source/resource/ResourceIndexAccess.hxx
@@ -11,12 +11,12 @@
 #define INCLUDED_EXTENSIONS_SOURCE_RESOURCE_RESOURCEINDEXACCESS_HXX
 
 
-#include <boost/shared_ptr.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
 #include <cppuhelper/implbase.hxx>
+#include <memory>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class XComponentContext;
@@ -46,7 +46,7 @@ namespace extensions { namespace resource
 
         private:
             // m_pResMgr should never be NULL
-            const ::boost::shared_ptr<ResMgr> m_pResMgr;
+            const std::shared_ptr<ResMgr> m_pResMgr;
     };
 }}
 
diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx
index edba159..08158fd 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -26,8 +26,8 @@
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/weakref.hxx>
 
-#include <boost/shared_ptr.hpp>
 #include <map>
+#include <memory>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::resource;
@@ -94,7 +94,7 @@ namespace extensions { namespace resource
     class OpenOfficeResourceBundle : public OpenOfficeResourceBundle_Base
     {
     private:
-        typedef ::boost::shared_ptr< IResourceType >            ResourceTypePtr;
+        typedef std::shared_ptr< IResourceType >            ResourceTypePtr;
         typedef ::std::map< OUString, ResourceTypePtr >  ResourceTypes;
 
         ::osl::Mutex                    m_aMutex;
diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx
index 7d4da1f..297a86d 100644
--- a/extensions/source/scanner/scanunx.cxx
+++ b/extensions/source/scanner/scanunx.cxx
@@ -21,7 +21,7 @@
 #include <sanedlg.hxx>
 #include <osl/thread.hxx>
 #include <cppuhelper/queryinterface.hxx>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 #if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
@@ -110,7 +110,7 @@ struct SaneHolder
 
 namespace
 {
-    typedef std::vector< boost::shared_ptr<SaneHolder> > sanevec;
+    typedef std::vector< std::shared_ptr<SaneHolder> > sanevec;
     class allSanes
     {
     private:
@@ -146,7 +146,7 @@ namespace
 
 class ScannerThread : public osl::Thread
 {
-    boost::shared_ptr<SaneHolder>               m_pHolder;
+    std::shared_ptr<SaneHolder>               m_pHolder;
     Reference< com::sun::star::lang::XEventListener > m_xListener;
     ScannerManager*                             m_pManager; // just for the disposing call
 
@@ -154,7 +154,7 @@ public:
     virtual void run() SAL_OVERRIDE;
     virtual void onTerminated() SAL_OVERRIDE { delete this; }
 public:
-    ScannerThread( boost::shared_ptr<SaneHolder> pHolder,
+    ScannerThread( std::shared_ptr<SaneHolder> pHolder,
                    const Reference< com::sun::star::lang::XEventListener >& listener,
                    ScannerManager* pManager );
     virtual ~ScannerThread();
@@ -163,7 +163,7 @@ public:
 
 
 ScannerThread::ScannerThread(
-                             boost::shared_ptr<SaneHolder> pHolder,
+                             std::shared_ptr<SaneHolder> pHolder,
                              const Reference< com::sun::star::lang::XEventListener >& listener,
                              ScannerManager* pManager )
         : m_pHolder( pHolder ), m_xListener( listener ), m_pManager( pManager )
@@ -251,7 +251,7 @@ Sequence< ScannerContext > ScannerManager::getAvailableScanners() throw(std::exc
 
     if( rSanes.empty() )
     {
-        boost::shared_ptr<SaneHolder> pSaneHolder(new SaneHolder);
+        std::shared_ptr<SaneHolder> pSaneHolder(new SaneHolder);
         if( Sane::IsSane() )
             rSanes.push_back( pSaneHolder );
     }
@@ -290,7 +290,7 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex
                 ScanError_InvalidContext
             );
 
-        boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
+        std::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
         if( pHolder->m_bBusy )
             throw ScannerException(
                 "Scanner is busy",
@@ -328,7 +328,7 @@ void ScannerManager::startScan( const ScannerContext& scanner_context,
             Reference< XScannerManager >( this ),
             ScanError_InvalidContext
             );
-    boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
+    std::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
     if( pHolder->m_bBusy )
         throw ScannerException(
             "Scanner is busy",
@@ -355,7 +355,7 @@ ScanError ScannerManager::getError( const ScannerContext& scanner_context ) thro
             ScanError_InvalidContext
             );
 
-    boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
+    std::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
 
     return pHolder->m_nError;
 }
@@ -373,7 +373,7 @@ Reference< css::awt::XBitmap > ScannerManager::getBitmap( const ScannerContext&
             Reference< XScannerManager >( this ),
             ScanError_InvalidContext
             );
-    boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
+    std::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
 
     osl::MutexGuard aProtGuard( pHolder->m_aProtector );
 
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index e725bb3..3dfefd6 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -24,7 +24,7 @@
 #include "updatehdl.hxx"
 #include "updateprotocol.hxx"
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/supportsservice.hxx>
@@ -103,7 +103,7 @@ public:
 private:
     uno::Reference<uno::XComponentContext>  m_xContext;
     uno::Reference< frame::XDesktop2 >      m_xDesktop;
-    boost::scoped_ptr< InitUpdateCheckJobThread > m_pInitThread;
+    std::unique_ptr< InitUpdateCheckJobThread > m_pInitThread;
 
     void handleExtensionUpdates( const uno::Sequence< beans::NamedValue > &rListProp );
 };


More information about the Libreoffice-commits mailing list