Kaydet (Commit) 09800956 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

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/16289Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9cc52266
......@@ -17,7 +17,7 @@
#include <vcl/opengl/OpenGLHelper.hxx>
#include <boost/scoped_array.hpp>
#include <memory>
using namespace com::sun::star;
using namespace libgltf;
......@@ -37,7 +37,7 @@ OGLFrameGrabber::~OGLFrameGrabber()
uno::Reference< css::graphic::XGraphic > SAL_CALL OGLFrameGrabber::grabFrame( double /*fMediaTime*/ )
throw ( uno::RuntimeException, std::exception )
{
boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[m_rHandle.viewport.width * m_rHandle.viewport.height * 4]);
std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[m_rHandle.viewport.width * m_rHandle.viewport.height * 4]);
glTFHandle* pHandle = &m_rHandle;
int nRet = gltf_renderer_get_bitmap(&pHandle, 1, reinterpret_cast<char*>(pBuffer.get()), GL_BGRA);
if( nRet != 0 )
......
......@@ -16,7 +16,7 @@
#include "math.h"
#include <boost/optional.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
......
......@@ -25,7 +25,7 @@
#include <string.h>
#include "image.hxx"
#include <codegen.hxx>
#include <boost/scoped_array.hpp>
#include <memory>
SbiImage::SbiImage()
{
......@@ -229,7 +229,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
pStrings = new sal_Unicode[ nLen ];
nStringSize = (sal_uInt16) nLen;
boost::scoped_array<char> pByteStrings(new char[ nLen ]);
std::unique_ptr<char[]> pByteStrings(new char[ nLen ]);
r.Read( pByteStrings.get(), nStringSize );
for( short j = 0; j < nStrings; j++ )
{
......@@ -347,7 +347,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
r.WriteUInt32( pStringOff[ i ] );
}
// Then the String-Block
boost::scoped_array<char> pByteStrings(new char[ nStringSize ]);
std::unique_ptr<char[]> pByteStrings(new char[ nStringSize ]);
for( i = 0; i < nStrings; i++ )
{
sal_uInt16 nOff = (sal_uInt16) pStringOff[ i ];
......
......@@ -44,7 +44,7 @@
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include "errobject.hxx"
#include <boost/scoped_array.hpp>
#include <memory>
#include <unordered_map>
#include <com/sun/star/script/ModuleType.hpp>
......@@ -1888,7 +1888,7 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
// #95459 Delete dialogs, otherwise endless recursion
// in SbxVarable::GetType() if dialogs are accessed
sal_uInt16 nObjCount = pObjs->Count();
boost::scoped_array<SbxVariable*> ppDeleteTab(new SbxVariable*[ nObjCount ]);
std::unique_ptr<SbxVariable*[]> ppDeleteTab(new SbxVariable*[ nObjCount ]);
sal_uInt16 nObj;
for( nObj = 0 ; nObj < nObjCount ; nObj++ )
......
......@@ -82,7 +82,7 @@
#include <runtime.hxx>
#include <math.h>
#include <boost/scoped_array.hpp>
#include <memory>
#include <unordered_map>
#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
#include <com/sun/star/reflection/XConstantsTypeDescription.hpp>
......@@ -1401,9 +1401,9 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
if( nSeqLevel == nDims )
{
boost::scoped_array<sal_Int32> pLowerBounds(new sal_Int32[nDims]);
boost::scoped_array<sal_Int32> pUpperBounds(new sal_Int32[nDims]);
boost::scoped_array<sal_Int32> pActualIndices(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
for( short i = 1 ; i <= nDims ; i++ )
{
sal_Int32 lBound, uBound;
......
......@@ -57,7 +57,7 @@
#include <com/sun/star/script/XErrorQuery.hpp>
#include <ooo/vba/XHelperInterface.hpp>
#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <random>
......@@ -436,7 +436,7 @@ RTLFUNC(CurDir)
const int PATH_INCR = 250;
int nSize = PATH_INCR;
boost::scoped_array<char> pMem;
std::unique_ptr<char[]> pMem;
while( true )
{
pMem.reset(new char[nSize]);
......
......@@ -59,7 +59,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <com/sun/star/sheet/XFunctionAccess.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
using namespace comphelper;
using namespace com::sun::star::i18n;
......@@ -1283,7 +1283,7 @@ void PutGet( SbxArray& rPar, bool bPut )
{
sal_Size nFPos = pStrm->Tell();
short nDims = pArr->GetDims();
boost::scoped_array<short> pDims(new short[ nDims ]);
std::unique_ptr<short[]> pDims(new short[ nDims ]);
bRet = lcl_WriteReadSbxArray(*pArr,pStrm,!bRandom,nDims,pDims.get(),bPut);
pDims.reset();
if( nBlockLen )
......
......@@ -67,7 +67,7 @@
#include "sbintern.hxx"
#include "sbunoobj.hxx"
#include <basic/codecompletecache.hxx>
#include <boost/scoped_array.hpp>
#include <memory>
using com::sun::star::uno::Reference;
......@@ -2263,9 +2263,9 @@ void SbiRuntime::StepREDIMP()
else if (nDims > 0)
{
// Store dims to use them for copying later
boost::scoped_array<sal_Int32> pLowerBounds(new sal_Int32[nDims]);
boost::scoped_array<sal_Int32> pUpperBounds(new sal_Int32[nDims]);
boost::scoped_array<sal_Int32> pActualIndices(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
// Compare bounds
for( short i = 1 ; i <= nDims ; i++ )
......@@ -4436,9 +4436,9 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
bool bRangeError = false;
// Store dims to use them for copying later
boost::scoped_array<sal_Int32> pLowerBounds(new sal_Int32[nDims]);
boost::scoped_array<sal_Int32> pUpperBounds(new sal_Int32[nDims]);
boost::scoped_array<sal_Int32> pActualIndices(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
if( nDimsOld != nDimsNew )
{
bRangeError = true;
......
......@@ -23,7 +23,7 @@
#include "sbxconv.hxx"
#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
// Implementation SbxDecimal
SbxDecimal::SbxDecimal()
......@@ -208,7 +208,7 @@ bool SbxDecimal::setString( OUString* pOUString )
if( cDecimalSep != '.' || cThousandSep != ',' )
{
int nLen = pOUString->getLength();
boost::scoped_array<sal_Unicode> pBuffer(new sal_Unicode[nLen + 1]);
std::unique_ptr<sal_Unicode[]> pBuffer(new sal_Unicode[nLen + 1]);
pBuffer[nLen] = 0;
const sal_Unicode* pSrc = pOUString->getStr();
......
......@@ -31,7 +31,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <boost/scoped_array.hpp>
#include <memory>
#include "cairo_textlayout.hxx"
#include "cairo_spritecanvas.hxx"
......@@ -330,7 +330,7 @@ namespace cairocanvas
setupLayoutMode( rOutDev, mnTextDirection );
// TODO(P2): cache that
::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
if( maLogicalAdvancements.getLength() )
{
......
......@@ -28,7 +28,7 @@
#include <boost/preprocessor/repetition.hpp>
#include <boost/preprocessor/iteration/local.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include "dx_canvasbitmap.hxx"
#include "dx_impltools.hxx"
......@@ -211,7 +211,7 @@ namespace dxcanvas
// copy only alpha channel to pAlphaBits
const sal_Int32 nScanWidth((aSize.getX() + 3) & ~3);
boost::scoped_array<sal_uInt8> pAlphaBits( new sal_uInt8[nScanWidth*aSize.getY()] );
std::unique_ptr<sal_uInt8[]> pAlphaBits( new sal_uInt8[nScanWidth*aSize.getY()] );
const sal_uInt8* pInBits=(sal_uInt8*)aBmpData.Scan0;
pInBits+=3;
for( sal_Int32 y=0; y<aSize.getY(); ++y )
......
......@@ -48,8 +48,6 @@
#include "dx_canvas.hxx"
#include "dx_spritecanvas.hxx"
#include <boost/scoped_array.hpp>
#include <vector>
#include <algorithm>
......
......@@ -25,7 +25,7 @@
#include <vcl/canvastools.hxx>
#include <tools/diagnose_ex.h>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/bind.hpp>
#include <com/sun/star/rendering/FontRequest.hpp>
#include <com/sun/star/rendering/PanoseProportion.hpp>
......@@ -207,7 +207,7 @@ namespace dxcanvas
{
// create the DXArray
const sal_Int32 nLen( rLogicalAdvancements.getLength() );
::boost::scoped_array<sal_Int32> pDXArray( new sal_Int32[nLen] );
::std::unique_ptr<sal_Int32[]> pDXArray( new sal_Int32[nLen] );
for( sal_Int32 i=0; i<nLen; ++i )
pDXArray[i] = basegfx::fround( rLogicalAdvancements[i] );
......
......@@ -34,8 +34,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <boost/scoped_array.hpp>
#include "dx_vcltools.hxx"
using namespace ::com::sun::star;
......
......@@ -36,7 +36,7 @@
#include <GL/glew.h>
#include <boost/scoped_array.hpp>
#include <memory>
using namespace ::com::sun::star;
......@@ -775,7 +775,7 @@ namespace oglcanvas
{
// create the DXArray
const sal_Int32 nLen( aLogicalAdvancements.getLength() );
::boost::scoped_array<long> pDXArray( new long[nLen] );
::std::unique_ptr<long[]> pDXArray( new long[nLen] );
for( sal_Int32 i=0; i<nLen; ++i )
pDXArray[i] = basegfx::fround( aLogicalAdvancements[i] );
......
......@@ -36,7 +36,7 @@
#include "impltools.hxx"
#include "textlayout.hxx"
#include <boost/scoped_array.hpp>
#include <memory>
using namespace ::com::sun::star;
......@@ -119,7 +119,7 @@ namespace vclcanvas
uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, aRenderState);
uno::Sequence< uno::Reference< rendering::XPolyPolygon2D> > aOutlineSequence;
......@@ -172,7 +172,7 @@ namespace vclcanvas
uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, aRenderState);
MetricVector aMetricVector;
......@@ -384,7 +384,7 @@ namespace vclcanvas
if( maLogicalAdvancements.getLength() )
{
// TODO(P2): cache that
::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets( aOffsets.get(), maLogicalAdvancements, viewState, renderState );
// TODO(F3): ensure correct length and termination for DX
......
......@@ -34,7 +34,7 @@
#include <boost/checked_delete.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cmath>
......
......@@ -25,7 +25,7 @@
#include <vector>
#include <algorithm>
#include <boost/scoped_array.hpp>
#include <memory>
using namespace ::com::sun::star;
......@@ -143,7 +143,7 @@ Sequence< beans::PropertyState > SAL_CALL
{
cppu::IPropertyArrayHelper & rPH = getInfoHelper();
boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ aPropertyName.getLength() ]);
std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ aPropertyName.getLength() ]);
rPH.fillHandles( pHandles.get(), aPropertyName );
::std::vector< sal_Int32 > aHandles( pHandles.get(), pHandles.get() + aPropertyName.getLength());
......@@ -194,7 +194,7 @@ void SAL_CALL
{
cppu::IPropertyArrayHelper & rPH = getInfoHelper();
boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ aPropertyNames.getLength() ]);
std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ aPropertyNames.getLength() ]);
rPH.fillHandles( pHandles.get(), aPropertyNames );
::std::vector< sal_Int32 > aHandles( pHandles.get(), pHandles.get() + aPropertyNames.getLength());
......
......@@ -24,7 +24,7 @@
#include <vector>
#include <algorithm>
#include <functional>
#include <boost/scoped_array.hpp>
#include <memory>
#define MAX_BSPLINE_DEGREE 15
......@@ -721,14 +721,14 @@ void SplineCalculater::CalculateBSplines(
continue; // need at least 2 points, degree p needs at least n+1 points
// next piece of series
boost::scoped_array<double> t(new double [n+1]);
std::unique_ptr<double[]> t(new double [n+1]);
if (!createParameterT(aPointsIn, t.get()))
{
continue; // next piece of series
}
lcl_tSizeType m = n + p + 1;
boost::scoped_array<double> u(new double [m+1]);
std::unique_ptr<double[]> u(new double [m+1]);
createKnotVector(n, p, t.get(), u.get());
// The matrix N contains the B-spline basis functions applied to parameters.
......@@ -736,14 +736,14 @@ void SplineCalculater::CalculateBSplines(
// column in a higher row is equal or greater than in the lower row.
// To store this matrix the non-zero elements are shifted to column 0
// and the amount of shifting is remembered in an array.
boost::scoped_array<double*> aMatN(new double*[n+1]);
std::unique_ptr<double*[]> aMatN(new double*[n+1]);
for (lcl_tSizeType row = 0; row <=n; ++row)
{
aMatN[row] = new double[p+1];
for (sal_uInt32 col = 0; col <= p; ++col)
aMatN[row][col] = 0.0;
}
boost::scoped_array<lcl_tSizeType> aShift(new lcl_tSizeType[n+1]);
std::unique_ptr<lcl_tSizeType[]> aShift(new lcl_tSizeType[n+1]);
aMatN[0][0] = 1.0; //all others are zero
aShift[0] = 0;
aMatN[n][0] = 1.0;
......@@ -879,7 +879,7 @@ void SplineCalculater::CalculateBSplines(
pNewX[nNewSize -1 ] = aPointsIn[n].first;
pNewY[nNewSize -1 ] = aPointsIn[n].second;
pNewZ[nNewSize -1 ] = fZCoordinate;
boost::scoped_array<double> aP(new double[m+1]);
std::unique_ptr<double[]> aP(new double[m+1]);
lcl_tSizeType nLow = 0;
for ( lcl_tSizeType nTIndex = 0; nTIndex <= n-1; ++nTIndex)
{
......
......@@ -20,7 +20,7 @@
#include <StaticGeometry.h>
#include "glm/gtc/matrix_inverse.hpp"
#include <boost/checked_delete.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#define DEBUG_FBO 0
......@@ -2257,7 +2257,7 @@ sal_uInt32 OpenGL3DRenderer::GetPixelColorFromPoint(long nX, long nY)
static sal_uInt32 nId = 0;
OUString aFileName = "/home/moggi/work/picking_" + OUString::number(nId++) + ".png";
OpenGLHelper::renderToFile(m_iWidth, m_iHeight, aFileName);
boost::scoped_array<sal_uInt8> buf(new sal_uInt8[4]);
std::unique_ptr<sal_uInt8[]> buf(new sal_uInt8[4]);
glReadPixels(nX, m_iHeight-nY, 1, 1, GL_BGRA, GL_UNSIGNED_BYTE, buf.get());
Color aColor(255-buf[3], buf[2], buf[1], buf[0]);
return aColor.GetColor();
......
......@@ -19,7 +19,7 @@
#include <boost/bind.hpp>
#include <boost/current_function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <cassert>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
......
......@@ -30,7 +30,7 @@
#include <algorithm>
#include <set>
#include <boost/scoped_array.hpp>
#include <memory>
namespace comphelper
......@@ -506,9 +506,9 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const ::com::sun:
}
else
{
boost::scoped_array<sal_Int32> pHandles(new sal_Int32[nLen]);
boost::scoped_array< ::com::sun::star::uno::Any> pNewValues(new ::com::sun::star::uno::Any[nLen]);
boost::scoped_array< ::com::sun::star::uno::Any> pOldValues(new ::com::sun::star::uno::Any[nLen]);
std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[nLen]);
std::unique_ptr< ::com::sun::star::uno::Any[]> pNewValues(new ::com::sun::star::uno::Any[nLen]);
std::unique_ptr< ::com::sun::star::uno::Any[]> pOldValues(new ::com::sun::star::uno::Any[nLen]);
const ::com::sun::star::beans::PropertyChangeEvent* pEvents = _rEvents.getConstArray();
sal_Int32 nDest = 0;
......@@ -797,7 +797,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
// reset, needed below
pDelValues = DelValues.getArray();
boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ nLen - nAggCount ]);
std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ nLen - nAggCount ]);
// get the map table
cppu::IPropertyArrayHelper& rPH2 = getInfoHelper();
......@@ -806,8 +806,8 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
sal_Int32 nHitCount = rPH2.fillHandles( pHandles.get(), DelPropertyNames );
if (nHitCount != 0)
{
boost::scoped_array< ::com::sun::star::uno::Any> pConvertedValues(new ::com::sun::star::uno::Any[ nHitCount ]);
boost::scoped_array< ::com::sun::star::uno::Any> pOldValues(new ::com::sun::star::uno::Any[ nHitCount ]);
std::unique_ptr< ::com::sun::star::uno::Any[]> pConvertedValues(new ::com::sun::star::uno::Any[ nHitCount ]);
std::unique_ptr< ::com::sun::star::uno::Any[]> pOldValues(new ::com::sun::star::uno::Any[ nHitCount ]);
nHitCount = 0;
sal_Int32 i;
......
......@@ -21,7 +21,7 @@
#include <comphelper/propertysethelper.hxx>
#include <osl/diagnose.h>
#include <boost/scoped_array.hpp>
#include <memory>
using namespace ::comphelper;
using namespace ::com::sun::star;
......@@ -141,7 +141,7 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >&
if( nCount )
{
boost::scoped_array<PropertyMapEntry const *> pEntries(new PropertyMapEntry const *[nCount+1]);
std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
pEntries[nCount] = NULL;
const OUString* pNames = rPropertyNames.getConstArray();
......@@ -169,7 +169,7 @@ Sequence< Any > SAL_CALL PropertySetHelper::getPropertyValues(const Sequence< OU
Sequence< Any > aValues;
if( nCount )
{
boost::scoped_array<PropertyMapEntry const *> pEntries(new PropertyMapEntry const *[nCount+1]);
std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
pEntries[nCount] = NULL;
const OUString* pNames = rPropertyNames.getConstArray();
......@@ -238,7 +238,7 @@ Sequence< PropertyState > SAL_CALL PropertySetHelper::getPropertyStates( const S
bool bUnknown = false;
boost::scoped_array<PropertyMapEntry const *> pEntries(new PropertyMapEntry const *[nCount+1]);
std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
sal_Int32 n;
for( n = 0; !bUnknown && (n < nCount); n++, pNames++ )
......
......@@ -15,7 +15,7 @@
*/
#include <algorithm>
#include <boost/scoped_array.hpp>
#include <memory>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
......
......@@ -25,7 +25,7 @@
#include "diagnose_ex.h"
#include <algorithm>
#include <boost/scoped_array.hpp>
#include <memory>
using namespace connectivity;
......@@ -718,7 +718,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
else
{
sal_uInt16 const nLen(rIndex.getHeader().db_keylen);
::boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nLen]);
::std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nLen]);
memset(&pBuf[0], 0x20, nLen);
if (!aKey.getValue().isNull())
{
......
......@@ -35,7 +35,7 @@
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <boost/bind.hpp>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/utility.hpp>
#include <canvas/canvastools.hxx>
#include <canvas/debug.hxx>
......
......@@ -76,7 +76,7 @@
#include <vector>
#include <algorithm>
#include <iterator>
#include <boost/scoped_array.hpp>
#include <memory>
#include "mtftools.hxx"
#include <basegfx/matrix/b2dhommatrixtools.hxx>
......@@ -2595,7 +2595,7 @@ namespace cppcanvas
// generating a DX array, and uniformly
// distributing the excess/insufficient width
// to every logical character.
::boost::scoped_array< long > pDXArray( new long[nLen] );
::std::unique_ptr< long []> pDXArray( new long[nLen] );
rVDev.GetTextArray( pAct->GetText(), pDXArray.get(),
pAct->GetIndex(), pAct->GetLen() );
......
......@@ -42,7 +42,7 @@
#include <basegfx/tools/canvastools.hxx>
#include <canvas/canvastools.hxx>
#include <boost/scoped_array.hpp>
#include <memory>
#include <boost/bind.hpp>
#include <boost/utility.hpp>
......@@ -197,7 +197,7 @@ namespace cppcanvas
{
// no external DX array given, create one from given
// string
::boost::scoped_array< long > pCharWidths( new long[nLen] );
::std::unique_ptr< long []> pCharWidths( new long[nLen] );
rVDev.GetTextArray( rText, pCharWidths.get(),
nStartPos, nLen );
......
......@@ -353,7 +353,7 @@
#include "test/codemaker/cppumaker/TestException2.hpp"
#include "test/codemaker/cppumaker/Constants.hpp"
#include "boost/scoped_array.hpp"
#include <memory>
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "com/sun/star/uno/TypeClass.hpp"
......@@ -421,7 +421,7 @@ struct Guard {
void Test::testBigStruct() {
// Default-initialize a BigStruct instance on top of a memory buffer filled
// with random data, and make sure that all members are default-initialized:
boost::scoped_array< char > buffer(