diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-23 12:08:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-23 14:32:43 +0000 |
commit | 09b637e36528165f5e937a418640d95440dac9ef (patch) | |
tree | 4d5a495612da5a3341ef1e19763b116ae547c856 /ucb | |
parent | 6e7f5c5fce198bf2f3a228e1faea7f7e9ed09f77 (diff) |
boost::scoped_ptr->std::unique_ptr
Change-Id: I03020e3536ee692a96224a517794c0d0a294f607
Reviewed-on: https://gerrit.libreoffice.org/18793
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_repo_content.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/ext/ucpext_datasupplier.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/webdavdatasupplier.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.hxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 44 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.hxx | 9 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontentcaps.cxx | 6 |
9 files changed, 40 insertions, 42 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 97e48325bfcc..57378e947767 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 82ca6b30c619..78b9dff1aa68 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 c277a1cc6bf2..bb82e772886b 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 3de88d533547..9a67534891bf 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 0d5e0741465b..5d3187047c65 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 daf3f47654eb..98bd884735ef 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 b69e81e304a4..469e53611237 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 3f6c2cb2b783..dec7cddbf7ba 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 cb85c40851c4..6723d459696f 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(); |