From 09800956191c90035872cbc18cd304fee043c710 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Mon, 15 Jun 2015 17:58:15 +0900 Subject: Replace boost::scoped_array with std::unique_ptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 @' 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 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svtools/inc/pch/precompiled_svt.hxx | 2 +- svtools/source/control/ruler.cxx | 1 - svtools/source/graphic/grfmgr2.cxx | 22 +++++++++++----------- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'svtools') diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx index 34843886b2e6..ba111fc0760e 100644 --- a/svtools/inc/pch/precompiled_svt.hxx +++ b/svtools/inc/pch/precompiled_svt.hxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 2d9aef0e5100..4595b42028e5 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -29,7 +29,6 @@ #include #include -#include #include using namespace std; diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 03867e54cd22..e469805d803e 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -33,7 +33,7 @@ #include #include "grfcache.hxx" #include -#include +#include // - defines - @@ -334,10 +334,10 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib bool bHMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Horizontal ); bool bVMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Vertical ); - boost::scoped_array pMapIX(new long[ aUnrotatedWidth ]); - boost::scoped_array pMapFX(new long[ aUnrotatedWidth ]); - boost::scoped_array pMapIY(new long[ aUnrotatedHeight ]); - boost::scoped_array pMapFY(new long[ aUnrotatedHeight ]); + std::unique_ptr pMapIX(new long[ aUnrotatedWidth ]); + std::unique_ptr pMapFX(new long[ aUnrotatedWidth ]); + std::unique_ptr pMapIY(new long[ aUnrotatedHeight ]); + std::unique_ptr pMapFY(new long[ aUnrotatedHeight ]); double fRevScaleX; double fRevScaleY; @@ -431,10 +431,10 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib const double fSinAngle = sin( nRot10 * F_PI1800 ); const long aTargetWidth = nEndX - nStartX + 1L; const long aTargetHeight = nEndY - nStartY + 1L; - boost::scoped_array pCosX(new long[ aTargetWidth ]); - boost::scoped_array pSinX(new long[ aTargetWidth ]); - boost::scoped_array pCosY(new long[ aTargetHeight ]); - boost::scoped_array pSinY(new long[ aTargetHeight ]); + std::unique_ptr pCosX(new long[ aTargetWidth ]); + std::unique_ptr pSinX(new long[ aTargetWidth ]); + std::unique_ptr pCosY(new long[ aTargetHeight ]); + std::unique_ptr pSinY(new long[ aTargetHeight ]); long nUnRotX, nUnRotY, nSinY, nCosY; sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1; bool bRet = false; @@ -798,8 +798,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib if( !aMsk || ( ( pMAcc = aMsk.AcquireReadAccess() ) != NULL ) ) { - boost::scoped_array pMapLX(new long[ aUnrotatedWidth ]); - boost::scoped_array pMapLY(new long[ aUnrotatedHeight ]); + std::unique_ptr pMapLX(new long[ aUnrotatedWidth ]); + std::unique_ptr pMapLY(new long[ aUnrotatedHeight ]); BitmapColor aTestB; if( pMAcc ) -- cgit