diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-06-15 17:58:15 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-17 15:50:45 +0000 |
commit | 09800956191c90035872cbc18cd304fee043c710 (patch) | |
tree | 9d255ad7629fedc181e8b5cf965a3075a328caaf /desktop | |
parent | 9cc52266bd1a4d01552675f151ce2da8c5210f84 (diff) |
Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
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 'desktop')
-rw-r--r-- | desktop/inc/pch/precompiled_deploymentmisc.hxx | 2 | ||||
-rw-r--r-- | desktop/inc/pch/precompiled_sofficeapp.hxx | 2 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 4 | ||||
-rw-r--r-- | desktop/source/migration/services/jvmfwk.cxx | 1 | ||||
-rw-r--r-- | desktop/source/migration/services/jvmfwk.hxx | 2 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_app.cxx | 1 |
7 files changed, 7 insertions, 9 deletions
diff --git a/desktop/inc/pch/precompiled_deploymentmisc.hxx b/desktop/inc/pch/precompiled_deploymentmisc.hxx index fdfc13b8bda2..2eae9cde13fb 100644 --- a/desktop/inc/pch/precompiled_deploymentmisc.hxx +++ b/desktop/inc/pch/precompiled_deploymentmisc.hxx @@ -16,7 +16,7 @@ #include <boost/noncopyable.hpp> #include <boost/optional.hpp> -#include <boost/scoped_array.hpp> +#include <memory> #include <boost/shared_ptr.hpp> #include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx index 764e8016efc9..c4c2e7001d86 100644 --- a/desktop/inc/pch/precompiled_sofficeapp.hxx +++ b/desktop/inc/pch/precompiled_sofficeapp.hxx @@ -20,7 +20,7 @@ #include "officecfg/System.hxx" #include <algorithm> #include <basic/sbstar.hxx> -#include <boost/scoped_array.hpp> +#include <memory> #include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> #include <cassert> diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index cb6ad0b98c02..71fcfc3c9921 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -46,7 +46,7 @@ #include <osl/file.hxx> #include <rtl/process.h> #include <tools/getprocessworkingdir.hxx> -#include <boost/scoped_array.hpp> +#include <memory> using namespace desktop; using namespace ::com::sun::star::uno; @@ -261,7 +261,7 @@ OUString CreateMD5FromString( const OUString& aMsg ) const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(aMsg.getStr()); sal_uInt32 nSize = ( aMsg.getLength() * sizeof( sal_Unicode )); sal_uInt32 nMD5KeyLen = rtl_digest_queryLength( handle ); - boost::scoped_array<sal_uInt8> pMD5KeyBuffer(new sal_uInt8[ nMD5KeyLen ]); + std::unique_ptr<sal_uInt8[]> pMD5KeyBuffer(new sal_uInt8[ nMD5KeyLen ]); rtl_digest_init( handle, pData, nSize ); rtl_digest_update( handle, pData, nSize ); diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index bae18596fbbd..807eacb72c2f 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -41,7 +41,7 @@ #include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/deployment/ExtensionManager.hpp> #include <com/sun/star/task/OfficeRestartManager.hpp> -#include <boost/scoped_array.hpp> +#include <memory> #include <boost/shared_ptr.hpp> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> @@ -110,7 +110,7 @@ const OUString OfficePipeId::operator () () reinterpret_cast<sal_uInt8 const *>(userPath.getStr()); sal_Size size = (userPath.getLength() * sizeof (sal_Unicode)); sal_uInt32 md5_key_len = rtl_digest_queryLength( digest ); - ::boost::scoped_array<sal_uInt8> md5_buf( new sal_uInt8 [ md5_key_len ] ); + ::std::unique_ptr<sal_uInt8[]> md5_buf( new sal_uInt8 [ md5_key_len ] ); rtl_digest_init( digest, data, static_cast<sal_uInt32>(size) ); rtl_digest_update( digest, data, static_cast<sal_uInt32>(size) ); diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx index f8dd6ba274df..8b56c7a1858b 100644 --- a/desktop/source/migration/services/jvmfwk.cxx +++ b/desktop/source/migration/services/jvmfwk.cxx @@ -28,7 +28,6 @@ #include <sal/types.h> #include <sal/config.h> #include <boost/noncopyable.hpp> -#include <boost/scoped_array.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/WrappedTargetException.hpp> diff --git a/desktop/source/migration/services/jvmfwk.hxx b/desktop/source/migration/services/jvmfwk.hxx index a248ce5da33a..66e7565f4501 100644 --- a/desktop/source/migration/services/jvmfwk.hxx +++ b/desktop/source/migration/services/jvmfwk.hxx @@ -26,7 +26,7 @@ #include <rtl/ustring.h> #include <rtl/ustring.hxx> #include <sal/types.h> -#include <boost/scoped_array.hpp> +#include <memory> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/task/XJob.hpp> diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index c2141490cd33..b1330daec5d9 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -39,7 +39,6 @@ #include <com/sun/star/deployment/ui/PackageManagerDialog.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> -#include <boost/scoped_array.hpp> #include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp> #include <com/sun/star/bridge/BridgeFactory.hpp> #include <stdio.h> |