From ba4fac9c7543e92001cf8ae81a2a017e4d34aa34 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<[]>/' ... 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. Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 09800956191c90035872cbc18cd304fee043c710) Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd --- test/source/bootstrapfixture.cxx | 4 ++-- test/source/htmltesttools.cxx | 4 ++-- test/source/xmltesttools.cxx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index 40a68ce1f694..b7ad99b0ad81 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -32,7 +32,7 @@ #include -#include +#include #include using namespace ::com::sun::star; @@ -138,7 +138,7 @@ OString loadFile(const OUString& rURL) CPPUNIT_ASSERT_EQUAL(eStatus, osl::FileBase::E_None); sal_uInt64 nSize; aFile.getSize(nSize); - boost::scoped_array aBytes(new char[nSize]); + std::unique_ptr aBytes(new char[nSize]); sal_uInt64 nBytesRead; aFile.read(aBytes.get(), nSize, nBytesRead); CPPUNIT_ASSERT_EQUAL(nSize, nBytesRead); diff --git a/test/source/htmltesttools.cxx b/test/source/htmltesttools.cxx index 274166bde855..85d65c0c0d71 100644 --- a/test/source/htmltesttools.cxx +++ b/test/source/htmltesttools.cxx @@ -9,7 +9,7 @@ #include -#include +#include htmlDocPtr HtmlTestTools::parseHtml(utl::TempFile& aTempFile) { @@ -27,7 +27,7 @@ htmlDocPtr HtmlTestTools::parseHtml(utl::TempFile& aTempFile) htmlDocPtr HtmlTestTools::parseHtmlStream(SvStream* pStream) { sal_Size nSize = pStream->remainingSize(); - boost::scoped_array pBuffer(new sal_uInt8[nSize + 1]); + std::unique_ptr pBuffer(new sal_uInt8[nSize + 1]); pStream->Read(pBuffer.get(), nSize); pBuffer[nSize] = 0; return htmlParseDoc(reinterpret_cast(pBuffer.get()), NULL); diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 749e87e89cf2..f1b6484f107e 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -9,7 +9,7 @@ #include -#include +#include namespace { @@ -43,7 +43,7 @@ xmlDocPtr XmlTestTools::parseXml(utl::TempFile& aTempFile) xmlDocPtr XmlTestTools::parseXmlStream(SvStream* pStream) { sal_Size nSize = pStream->remainingSize(); - boost::scoped_array pBuffer(new sal_uInt8[nSize + 1]); + std::unique_ptr pBuffer(new sal_uInt8[nSize + 1]); pStream->Read(pBuffer.get(), nSize); pBuffer[nSize] = 0; return xmlParseDoc(reinterpret_cast(pBuffer.get())); -- cgit v1.2.3