[Libreoffice-commits] core.git: ucb/source writerperfect/qa writerperfect/source

Caolán McNamara caolanm at redhat.com
Wed Sep 23 07:33:15 PDT 2015


 ucb/source/cacher/cachedcontentresultset.cxx      |    4 +-
 ucb/source/ucp/cmis/cmis_repo_content.cxx         |    4 +-
 ucb/source/ucp/ext/ucpext_datasupplier.hxx        |    4 +-
 ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx |    4 +-
 ucb/source/ucp/webdav/ContentProperties.cxx       |    2 -
 ucb/source/ucp/webdav/ContentProperties.hxx       |    5 +-
 ucb/source/ucp/webdav/webdavcontent.cxx           |   44 +++++++++++-----------
 ucb/source/ucp/webdav/webdavcontent.hxx           |    9 ++--
 ucb/source/ucp/webdav/webdavcontentcaps.cxx       |    6 +--
 writerperfect/qa/unit/DirectoryStreamTest.cxx     |   14 +++----
 writerperfect/source/common/WPXSvInputStream.cxx  |   17 ++++----
 11 files changed, 55 insertions(+), 58 deletions(-)

New commits:
commit 09b637e36528165f5e937a418640d95440dac9ef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 23 12:08:32 2015 +0100

    boost::scoped_ptr->std::unique_ptr
    
    Change-Id: I03020e3536ee692a96224a517794c0d0a294f607
    Reviewed-on: https://gerrit.libreoffice.org/18793
    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/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 97e4832..57378e9 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -30,7 +30,7 @@
 #include <osl/diagnose.h>
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/exc_hlp.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 using namespace com::sun::star::beans;
 using namespace com::sun::star::lang;
@@ -477,7 +477,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
     if( nFetchDirection != -1 )
         nDeleted++;
 
-    boost::scoped_ptr<Sequence< Property > > pOrigProps(new Sequence<Property> ( *m_pProperties ));
+    std::unique_ptr<Sequence< Property > > pOrigProps(new Sequence<Property> ( *m_pProperties ));
     sal_Int32 nOrigProps = pOrigProps->getLength();
 
     m_pProperties->realloc( nOrigProps + 2 - nDeleted );//note that nDeleted is <= 2
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 82ca6b3..78b9dff 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -37,7 +37,7 @@
 #include "cmis_provider.hxx"
 #include "cmis_repo_content.hxx"
 #include "cmis_resultset.hxx"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 #define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
 #define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
@@ -188,7 +188,7 @@ namespace cmis
                             ONEDRIVE_CLIENT_ID, ONEDRIVE_CLIENT_SECRET ) );
                     }
 
-                    boost::scoped_ptr<libcmis::Session> session(libcmis::SessionFactory::createSession(
+                    std::unique_ptr<libcmis::Session> session(libcmis::SessionFactory::createSession(
                             OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
                             rUsername, rPassword, "", false, oauth2Data ));
                     if (!session)
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.hxx b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
index c277a1c..bb82e77 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.hxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
@@ -23,7 +23,7 @@
 #include <rtl/ref.hxx>
 #include <ucbhelper/resultset.hxx>
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 
 namespace ucb { namespace ucp { namespace ext
@@ -69,7 +69,7 @@ namespace ucb { namespace ucp { namespace ext
         virtual void validate() throw( com::sun::star::ucb::ResultSetException ) SAL_OVERRIDE;
 
     private:
-        ::boost::scoped_ptr< DataSupplier_Impl >    m_pImpl;
+        std::unique_ptr< DataSupplier_Impl >    m_pImpl;
     };
 
 
diff --git a/ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx b/ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx
index 3de88d5..9a67534 100644
--- a/ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx
@@ -30,8 +30,8 @@
 #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_WEBDAVDATASUPPLIER_HXX
 
 #include <config_lgpl.h>
+#include <memory>
 #include <vector>
-#include <boost/scoped_ptr.hpp>
 #include <rtl/ref.hxx>
 #include <ucbhelper/resultset.hxx>
 
@@ -42,7 +42,7 @@ class Content;
 
 class DataSupplier : public ucbhelper::ResultSetDataSupplier
 {
-    boost::scoped_ptr<DataSupplier_Impl> m_pImpl;
+    std::unique_ptr<DataSupplier_Impl> m_pImpl;
 
 private:
     bool getData();
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index 0d5e074..5d31870 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -595,7 +595,7 @@ CachableContentProperties::CachableContentProperties(
 void CachableContentProperties::addProperties(
     const ContentProperties & rProps )
 {
-    const boost::scoped_ptr< PropertyValueMap > & props = rProps.getProperties();
+    const std::unique_ptr< PropertyValueMap > & props = rProps.getProperties();
 
     PropertyValueMap::const_iterator it = props->begin();
     const PropertyValueMap::const_iterator end = props->end();
diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx
index daf3f47..98bd884 100644
--- a/ucb/source/ucp/webdav/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav/ContentProperties.hxx
@@ -25,7 +25,6 @@
 #include <memory>
 #include <unordered_map>
 #include <vector>
-#include <boost/scoped_ptr.hpp>
 #include <rtl/ustring.hxx>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
@@ -149,12 +148,12 @@ public:
 
     // Not good to expose implementation details, but this is actually an
     // internal class.
-    const boost::scoped_ptr< PropertyValueMap > & getProperties() const
+    const std::unique_ptr< PropertyValueMap > & getProperties() const
     { return m_xProps; }
 
 private:
     OUString m_aEscapedTitle;
-    boost::scoped_ptr< PropertyValueMap > m_xProps;
+    std::unique_ptr< PropertyValueMap > m_xProps;
     bool m_bTrailingSlash;
 
     static com::sun::star::uno::Any m_aEmptyAny;
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index b69e81e..469e536 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -81,8 +81,8 @@ static void lcl_sendPartialGETRequest( bool &bError,
                                        DAVException &aLastException,
                                        const std::vector< rtl::OUString >& rProps,
                                        std::vector< rtl::OUString > &aHeaderNames,
-                                       const boost::scoped_ptr< DAVResourceAccess > &xResAccess,
-                                       boost::scoped_ptr< ContentProperties > &xProps,
+                                       const std::unique_ptr< DAVResourceAccess > &xResAccess,
+                                       std::unique_ptr< ContentProperties > &xProps,
                                        const uno::Reference< ucb::XCommandEnvironment >& xEnv )
 {
     bool bIsRequestSize = false;
@@ -636,7 +636,7 @@ uno::Any SAL_CALL Content::execute(
 //  {
         try
         {
-            boost::scoped_ptr< DAVResourceAccess > xResAccess;
+            std::unique_ptr< DAVResourceAccess > xResAccess;
             {
                 osl::Guard< osl::Mutex > aGuard( m_aMutex );
                 xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
@@ -825,7 +825,7 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ )
 {
     try
     {
-        boost::scoped_ptr< DAVResourceAccess > xResAccess;
+        std::unique_ptr< DAVResourceAccess > xResAccess;
         {
             osl::MutexGuard aGuard( m_aMutex );
             xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
@@ -909,7 +909,7 @@ throw( beans::PropertyExistException,
     try
     {
         // Set property value at server.
-        boost::scoped_ptr< DAVResourceAccess > xResAccess;
+        std::unique_ptr< DAVResourceAccess > xResAccess;
         {
             osl::Guard< osl::Mutex > aGuard( m_aMutex );
             xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
@@ -1018,7 +1018,7 @@ throw( beans::UnknownPropertyException,
         aProppatchValues.push_back( aValue );
 
         // Remove property value from server.
-        boost::scoped_ptr< DAVResourceAccess > xResAccess;
+        std::unique_ptr< DAVResourceAccess > xResAccess;
         {
             osl::Guard< osl::Mutex > aGuard( m_aMutex );
             xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
@@ -1305,7 +1305,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
     {
         // Append all standard UCB, DAV and HTTP properties.
 
-        const boost::scoped_ptr< PropertyValueMap > & xProps = rData.getProperties();
+        const std::unique_ptr< PropertyValueMap > & xProps = rData.getProperties();
 
         PropertyValueMap::const_iterator it  = xProps->begin();
         PropertyValueMap::const_iterator end = xProps->end();
@@ -1338,9 +1338,9 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
                 const uno::Reference< ucb::XCommandEnvironment >& xEnv )
     throw ( uno::Exception )
 {
-    boost::scoped_ptr< ContentProperties > xProps;
-    boost::scoped_ptr< ContentProperties > xCachedProps;
-    boost::scoped_ptr< DAVResourceAccess > xResAccess;
+    std::unique_ptr< ContentProperties > xProps;
+    std::unique_ptr< ContentProperties > xCachedProps;
+    std::unique_ptr< DAVResourceAccess > xResAccess;
     OUString aUnescapedTitle;
     bool bHasAll = false;
     uno::Reference< uno::XComponentContext > xContext;
@@ -1682,7 +1682,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
     uno::Reference< ucb::XContentIdentifier >    xIdentifier;
     rtl::Reference< ContentProvider >            xProvider;
     bool bTransient;
-    boost::scoped_ptr< DAVResourceAccess > xResAccess;
+    std::unique_ptr< DAVResourceAccess > xResAccess;
 
     {
         osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -2148,7 +2148,7 @@ uno::Any Content::open(
             // PUSH: write data
             try
             {
-                boost::scoped_ptr< DAVResourceAccess > xResAccess;
+                std::unique_ptr< DAVResourceAccess > xResAccess;
 
                 {
                     osl::MutexGuard aGuard( m_aMutex );
@@ -2193,7 +2193,7 @@ uno::Any Content::open(
                 // PULL: wait for client read
                 try
                 {
-                    boost::scoped_ptr< DAVResourceAccess > xResAccess;
+                    std::unique_ptr< DAVResourceAccess > xResAccess;
                     {
                         osl::MutexGuard aGuard( m_aMutex );
 
@@ -2263,7 +2263,7 @@ void Content::post(
     {
         try
         {
-            boost::scoped_ptr< DAVResourceAccess > xResAccess;
+            std::unique_ptr< DAVResourceAccess > xResAccess;
             {
                 osl::MutexGuard aGuard( m_aMutex );
                 xResAccess.reset(
@@ -2297,7 +2297,7 @@ void Content::post(
         {
             try
             {
-                boost::scoped_ptr< DAVResourceAccess > xResAccess;
+                std::unique_ptr< DAVResourceAccess > xResAccess;
                 {
                     osl::MutexGuard aGuard( m_aMutex );
                     xResAccess.reset(
@@ -2396,7 +2396,7 @@ void Content::insert(
 {
     bool bTransient, bCollection;
     OUString aEscapedTitle;
-    boost::scoped_ptr< DAVResourceAccess > xResAccess;
+    std::unique_ptr< DAVResourceAccess > xResAccess;
 
     {
         osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -2641,7 +2641,7 @@ void Content::transfer(
     uno::Reference< uno::XComponentContext > xContext;
     uno::Reference< ucb::XContentIdentifier >    xIdentifier;
     uno::Reference< ucb::XContentProvider >      xProvider;
-    boost::scoped_ptr< DAVResourceAccess > xResAccess;
+    std::unique_ptr< DAVResourceAccess > xResAccess;
 
     {
         osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -2940,7 +2940,7 @@ void Content::lock(
 {
     try
     {
-        boost::scoped_ptr< DAVResourceAccess > xResAccess;
+        std::unique_ptr< DAVResourceAccess > xResAccess;
         {
             osl::Guard< osl::Mutex > aGuard( m_aMutex );
             xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
@@ -2980,7 +2980,7 @@ void Content::unlock(
 {
     try
     {
-        boost::scoped_ptr< DAVResourceAccess > xResAccess;
+        std::unique_ptr< DAVResourceAccess > xResAccess;
         {
             osl::Guard< osl::Mutex > aGuard( m_aMutex );
             xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
@@ -3304,7 +3304,7 @@ void Content::cancelCommandExecution(
 
 
 const OUString
-Content::getBaseURI( const boost::scoped_ptr< DAVResourceAccess > & rResAccess )
+Content::getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess )
 {
     osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
@@ -3336,7 +3336,7 @@ Content::getBaseURI( const boost::scoped_ptr< DAVResourceAccess > & rResAccess )
 
 Content::ResourceType Content::getResourceType(
                     const uno::Reference< ucb::XCommandEnvironment >& xEnv,
-                    const boost::scoped_ptr< DAVResourceAccess > & rResAccess,
+                    const std::unique_ptr< DAVResourceAccess > & rResAccess,
                     bool * networkAccessAllowed )
     throw ( uno::Exception )
 {
@@ -3421,7 +3421,7 @@ Content::ResourceType Content::getResourceType(
                     const uno::Reference< ucb::XCommandEnvironment >& xEnv )
     throw ( uno::Exception )
 {
-    boost::scoped_ptr< DAVResourceAccess > xResAccess;
+    std::unique_ptr< DAVResourceAccess > xResAccess;
     {
         osl::MutexGuard aGuard( m_aMutex );
         xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx
index 3f6c2cb..dec7cdd 100644
--- a/ucb/source/ucp/webdav/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav/webdavcontent.hxx
@@ -24,7 +24,6 @@
 
 #include <memory>
 #include <list>
-#include <boost/scoped_ptr.hpp>
 #include <rtl/ref.hxx>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
 #include <com/sun/star/ucb/XContentCreator.hpp>
@@ -76,8 +75,8 @@ class Content : public ::ucbhelper::ContentImplHelper,
         DAV
     };
 
-    boost::scoped_ptr< DAVResourceAccess > m_xResAccess;
-    boost::scoped_ptr< CachableContentProperties > m_xCachedProps; // locally cached props
+    std::unique_ptr< DAVResourceAccess > m_xResAccess;
+    std::unique_ptr< CachableContentProperties > m_xCachedProps; // locally cached props
     OUString     m_aEscapedTitle;
     ResourceType      m_eResourceType;
     ContentProvider*  m_pProvider; // No need for a ref, base class holds object
@@ -123,7 +122,7 @@ private:
                           ::com::sun::star::ucb::XContentIdentifier >& xNewId );
 
     const OUString
-    getBaseURI( const boost::scoped_ptr< DAVResourceAccess > & rResAccess );
+    getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess );
 
     ResourceType
     getResourceType( const ::com::sun::star::uno::Reference<
@@ -133,7 +132,7 @@ private:
     ResourceType
     getResourceType( const ::com::sun::star::uno::Reference<
                           ::com::sun::star::ucb::XCommandEnvironment >& xEnv,
-                     const boost::scoped_ptr< DAVResourceAccess > & rResAccess,
+                     const std::unique_ptr< DAVResourceAccess > & rResAccess,
                      bool * networkAccessAllowed = 0 )
         throw ( ::com::sun::star::uno::Exception );
 
diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
index cb85c40..6723d45 100644
--- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
@@ -271,8 +271,8 @@ uno::Sequence< beans::Property > Content::getProperties(
     const uno::Reference< ucb::XCommandEnvironment > & xEnv )
 {
     bool bTransient;
-    boost::scoped_ptr< DAVResourceAccess > xResAccess;
-    boost::scoped_ptr< ContentProperties > xCachedProps;
+    std::unique_ptr< DAVResourceAccess > xResAccess;
+    std::unique_ptr< ContentProperties > xCachedProps;
     rtl::Reference< ContentProvider >  xProvider;
 
     {
@@ -451,7 +451,7 @@ uno::Sequence< beans::Property > Content::getProperties(
         const std::set< OUString >::const_iterator set_end
             = aPropSet.end();
 
-        const boost::scoped_ptr< PropertyValueMap > & xProps
+        const std::unique_ptr< PropertyValueMap > & xProps
             = xCachedProps->getProperties();
 
         PropertyValueMap::const_iterator       map_it  = xProps->begin();
diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx
index 209fe15..6ab8d38 100644
--- a/writerperfect/qa/unit/DirectoryStreamTest.cxx
+++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx
@@ -7,7 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 #include <cppunit/extensions/HelperMacros.h>
 
@@ -22,7 +22,7 @@
 namespace ucb = com::sun::star::ucb;
 namespace uno = com::sun::star::uno;
 
-using boost::scoped_ptr;
+using std::unique_ptr;
 
 using librevenge::RVNGInputStream;
 
@@ -74,17 +74,17 @@ DirectoryStreamTest::DirectoryStreamTest()
 
 void DirectoryStreamTest::testConstruction()
 {
-    const scoped_ptr<DirectoryStream> pDir(DirectoryStream::createForParent(m_xFile));
+    const unique_ptr<DirectoryStream> pDir(DirectoryStream::createForParent(m_xFile));
     CPPUNIT_ASSERT(bool(pDir));
     CPPUNIT_ASSERT(pDir->isStructured());
 
     // this should work for dirs too
-    const scoped_ptr<DirectoryStream> pDir2(DirectoryStream::createForParent(m_xDir));
+    const unique_ptr<DirectoryStream> pDir2(DirectoryStream::createForParent(m_xDir));
     CPPUNIT_ASSERT(bool(pDir2));
     CPPUNIT_ASSERT(pDir2->isStructured());
 
     // for nonexistent dirs nothing is created
-    const scoped_ptr<DirectoryStream> pNondir(DirectoryStream::createForParent(m_xNonexistent));
+    const unique_ptr<DirectoryStream> pNondir(DirectoryStream::createForParent(m_xNonexistent));
     CPPUNIT_ASSERT(!pNondir);
 
     // even if we try harder, just an empty shell is created
@@ -125,7 +125,7 @@ void DirectoryStreamTest::testDataOperations()
 void lcl_testStructuredOperations(RVNGInputStream &rStream)
 {
     CPPUNIT_ASSERT(rStream.isStructured());
-    scoped_ptr<RVNGInputStream> pSubstream(rStream.getSubStreamByName("mimetype"));
+    unique_ptr<RVNGInputStream> pSubstream(rStream.getSubStreamByName("mimetype"));
     CPPUNIT_ASSERT(bool(pSubstream));
 
     // TODO: test for other operations when they are implemented =)
@@ -136,7 +136,7 @@ void DirectoryStreamTest::testStructuredOperations()
     DirectoryStream aDir(m_xDir);
     lcl_testStructuredOperations(aDir);
 
-    scoped_ptr<DirectoryStream> pDir(DirectoryStream::createForParent(m_xFile));
+    unique_ptr<DirectoryStream> pDir(DirectoryStream::createForParent(m_xFile));
     CPPUNIT_ASSERT(bool(pDir));
     lcl_testStructuredOperations(*pDir.get());
 }
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 84bcabb..584627d 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -23,12 +23,11 @@
 #include <unotools/streamwrap.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 
-#include <limits>
-#include <vector>
-
 #include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <limits>
+#include <memory>
 #include <unordered_map>
+#include <vector>
 
 namespace writerperfect
 {
@@ -431,8 +430,8 @@ private:
     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > mxStream;
     ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > mxSeekable;
     ::com::sun::star::uno::Sequence< sal_Int8 > maData;
-    boost::scoped_ptr< OLEStorageImpl > mpOLEStorage;
-    boost::scoped_ptr< ZipStorageImpl > mpZipStorage;
+    std::unique_ptr< OLEStorageImpl > mpOLEStorage;
+    std::unique_ptr< ZipStorageImpl > mpZipStorage;
     bool mbCheckedOLE;
     bool mbCheckedZip;
 public:
@@ -446,8 +445,8 @@ WPXSvInputStreamImpl::WPXSvInputStreamImpl(Reference< XInputStream > xStream) :
     mxStream(xStream),
     mxSeekable(xStream, UNO_QUERY),
     maData(0),
-    mpOLEStorage(0),
-    mpZipStorage(0),
+    mpOLEStorage(nullptr),
+    mpZipStorage(nullptr),
     mbCheckedOLE(false),
     mbCheckedZip(false),
     mnLength(0),
@@ -755,7 +754,7 @@ bool WPXSvInputStreamImpl::isOLE()
     {
         assert(0 == mxSeekable->getPosition());
 
-        boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(mxStream));
+        std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(mxStream));
         if (pStream && SotStorage::IsOLEStorage(pStream.get()))
             mpOLEStorage.reset(new OLEStorageImpl());
 


More information about the Libreoffice-commits mailing list