summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-06-15 17:58:15 +0900
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-06 09:39:03 -0500
commitba4fac9c7543e92001cf8ae81a2a017e4d34aa34 (patch)
tree0afc3c1c6fb5947fd7aad119e4ed755276dfb197 /vcl
parenta9e376dbfeb3109398dcb83e56a7f9c8b7521a73 (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<[]>/' ... 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 <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 09800956191c90035872cbc18cd304fee043c710) Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/fontmanager/helper.cxx6
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx2
-rw-r--r--vcl/source/app/dbggui.cxx4
-rw-r--r--vcl/source/bitmap/bitmapscalesuper.cxx10
-rw-r--r--vcl/source/control/edit.cxx12
-rw-r--r--vcl/source/filter/GraphicNativeMetadata.cxx4
-rw-r--r--vcl/source/filter/graphicfilter.cxx3
-rw-r--r--vcl/source/filter/igif/gifread.cxx6
-rw-r--r--vcl/source/filter/jpeg/Exif.cxx4
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx4
-rw-r--r--vcl/source/filter/jpeg/jpegc.cxx4
-rw-r--r--vcl/source/filter/sgfbram.cxx4
-rw-r--r--vcl/source/filter/sgvspln.cxx12
-rw-r--r--vcl/source/filter/sgvtext.cxx5
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx4
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx12
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx18
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx6
-rw-r--r--vcl/source/gdi/bitmap.cxx30
-rw-r--r--vcl/source/gdi/bitmap3.cxx32
-rw-r--r--vcl/source/gdi/cvtsvm.cxx6
-rw-r--r--vcl/source/gdi/dibtools.cxx14
-rw-r--r--vcl/source/gdi/image.cxx2
-rw-r--r--vcl/source/gdi/impimage.cxx8
-rw-r--r--vcl/source/gdi/impvect.cxx5
-rw-r--r--vcl/source/gdi/jobset.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx14
-rw-r--r--vcl/source/gdi/pngwrite.cxx4
-rw-r--r--vcl/source/gdi/salgdilayout.cxx11
-rw-r--r--vcl/source/gdi/sallayout.cxx4
-rw-r--r--vcl/source/gdi/salmisc.cxx4
-rw-r--r--vcl/source/gdi/textlayout.cxx4
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx1
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx6
-rw-r--r--vcl/source/outdev/bitmap.cxx14
-rw-r--r--vcl/source/outdev/hatch.cxx4
-rw-r--r--vcl/source/outdev/pixel.cxx4
-rw-r--r--vcl/source/outdev/polygon.cxx6
-rw-r--r--vcl/source/outdev/transparent.cxx6
-rw-r--r--vcl/unx/generic/app/saldisp.cxx4
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx4
41 files changed, 152 insertions, 159 deletions
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index ecd4cca6cfdc..4517c6dcbfbb 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -31,7 +31,7 @@
#include <tools/urlobj.hxx>
#include "vcl/helper.hxx"
#include "vcl/ppdparser.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::rtl::Bootstrap;
@@ -289,7 +289,7 @@ bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile )
rInFile.getPos(nOrgPos);
nBytesToRead = std::min<sal_uInt64>(nBytesToRead, nSize - nOrgPos);
- boost::scoped_array<unsigned char> pBuffer(new unsigned char[nBytesToRead+1]);
+ std::unique_ptr<unsigned char[]> pBuffer(new unsigned char[nBytesToRead+1]);
pBuffer[nBytesToRead] = 0;
if( ! rInFile.read( pBuffer.get(), nBytesToRead, nRead ) && nRead == nBytesToRead )
@@ -298,7 +298,7 @@ bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile )
{
// ascii data, convert dos lineends( \r\n ) and
// m_ac lineends( \r ) to \n
- boost::scoped_array<unsigned char> pWriteBuffer(new unsigned char[ nBytesToRead ]);
+ std::unique_ptr<unsigned char[]> pWriteBuffer(new unsigned char[ nBytesToRead ]);
unsigned int nBytesToWrite = 0;
for( unsigned int i = 0; i < nBytesToRead; i++ )
{
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index c2b8c9c72e6a..62f6612d8dbb 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -139,7 +139,7 @@
#include <boost/mem_fn.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/shared_ptr.hpp>
#include <cassert>
#include <cmath>
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index d3ef95a5525c..f696bd3cce5f 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -57,7 +57,7 @@
#include "com/sun/star/i18n/XCharacterClassification.hpp"
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -484,7 +484,7 @@ void DbgDialogTest( vcl::Window* pWindow )
if ( !pGetChild )
return;
- boost::scoped_array<Rectangle> pRectAry(reinterpret_cast<Rectangle*>(new long[(sizeof(Rectangle)*nChildCount)/sizeof(long)]));
+ std::unique_ptr<Rectangle[]> pRectAry(reinterpret_cast<Rectangle*>(new long[(sizeof(Rectangle)*nChildCount)/sizeof(long)]));
memset( pRectAry.get(), 0, sizeof(Rectangle)*nChildCount );
if ( pWindow->IsDialog() )
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index b19930409935..d48db93c1b86 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -21,7 +21,7 @@
#include <vcl/bitmapscalesuper.hxx>
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <comphelper/threadpool.hxx>
namespace {
@@ -50,10 +50,10 @@ struct ScaleContext {
long mnSrcW, mnDestW;
long mnSrcH, mnDestH;
bool mbHMirr, mbVMirr;
- boost::scoped_array<long> mpMapIX;
- boost::scoped_array<long> mpMapIY;
- boost::scoped_array<long> mpMapFX;
- boost::scoped_array<long> mpMapFY;
+ std::unique_ptr<long[]> mpMapIX;
+ std::unique_ptr<long[]> mpMapIY;
+ std::unique_ptr<long[]> mpMapFX;
+ std::unique_ptr<long[]> mpMapFY;
ScaleContext( BitmapReadAccess *pSrc,
BitmapWriteAccess *pDest,
long nSrcW, long nDestW,
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index cd9681b693fa..f04be46a9545 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -65,7 +65,7 @@
#include <vcl/unohelp2.hxx>
#include <officecfg/Office/Common.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -501,7 +501,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec
sal_Int32 nLen = aText.getLength();
long nDXBuffer[256];
- boost::scoped_array<long> pDXBuffer;
+ std::unique_ptr<long[]> pDXBuffer;
long* pDX = nDXBuffer;
if (!aText.isEmpty())
@@ -1113,7 +1113,7 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
long nTextPos = 0;
long nDXBuffer[256];
- boost::scoped_array<long> pDXBuffer;
+ std::unique_ptr<long[]> pDXBuffer;
long* pDX = nDXBuffer;
if( !aText.isEmpty() )
@@ -1232,7 +1232,7 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
OUString aText = ImplGetText();
long nDXBuffer[256];
- boost::scoped_array<long> pDXBuffer;
+ std::unique_ptr<long[]> pDXBuffer;
long* pDX = nDXBuffer;
if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
@@ -2195,7 +2195,7 @@ void Edit::Command( const CommandEvent& rCEvt )
{
OUString aText = ImplGetText();
long nDXBuffer[256];
- boost::scoped_array<long> pDXBuffer;
+ std::unique_ptr<long[]> pDXBuffer;
long* pDX = nDXBuffer;
if( !aText.isEmpty() )
@@ -2211,7 +2211,7 @@ void Edit::Command( const CommandEvent& rCEvt )
long nTH = GetTextHeight();
Point aPos( mnXOffset, ImplGetTextYPosition() );
- boost::scoped_array<Rectangle> aRects(new Rectangle[ mpIMEInfos->nLen ]);
+ std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]);
for ( int nIndex = 0; nIndex < mpIMEInfos->nLen; ++nIndex )
{
Rectangle aRect( aPos, Size( 10, nTH ) );
diff --git a/vcl/source/filter/GraphicNativeMetadata.cxx b/vcl/source/filter/GraphicNativeMetadata.cxx
index 6503774a34b6..532e2d4284ab 100644
--- a/vcl/source/filter/GraphicNativeMetadata.cxx
+++ b/vcl/source/filter/GraphicNativeMetadata.cxx
@@ -22,7 +22,7 @@
#include <vcl/gfxlink.hxx>
#include "jpeg/Exif.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
GraphicNativeMetadata::GraphicNativeMetadata() :
mRotation(0)
@@ -38,7 +38,7 @@ bool GraphicNativeMetadata::read(Graphic& rGraphic)
if ( aLink.GetType() != GFX_LINK_TYPE_NATIVE_JPG )
return false;
sal_uInt32 aDataSize = aLink.GetDataSize();
- boost::scoped_array<sal_uInt8> aBuffer(new sal_uInt8[aDataSize]);
+ std::unique_ptr<sal_uInt8[]> aBuffer(new sal_uInt8[aDataSize]);
memcpy(aBuffer.get(), aLink.GetData(), aDataSize);
SvMemoryStream aMemoryStream(aBuffer.get(), aDataSize, StreamMode::READ);
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 0a2cd01a93b3..18997c169b1a 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -64,7 +64,6 @@
#include <rtl/instance.hxx>
#include <vcl/metaact.hxx>
#include <vector>
-#include <boost/scoped_array.hpp>
#include <memory>
#include "FilterConfigCache.hxx"
@@ -624,7 +623,7 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension,
if( !bTest )
{
sal_uLong nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen;
- boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8 [ nSize ]);
+ std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8 [ nSize ]);
rStream.Seek( nStreamPos );
rStream.Read( pBuf.get(), nSize );
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 1e8daf928733..11bc80dcd82b 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -21,7 +21,7 @@
#include "decode.hxx"
#include "gifread.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#define NO_PENDING( rStm ) ( ( rStm ).GetError() != ERRCODE_IO_PENDING )
@@ -188,7 +188,7 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
const sal_uInt64 nMaxPossible = rIStm.remainingSize();
if (nLen > nMaxPossible)
nLen = nMaxPossible;
- boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ nLen ]);
+ std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nLen ]);
sal_Size nRead = rIStm.Read(pBuf.get(), nLen);
nCount = nRead/3UL;
if( NO_PENDING( rIStm ) )
@@ -333,7 +333,7 @@ bool GIFReader::ReadExtension()
const sal_uInt64 nMaxPossible = rIStm.remainingSize();
if (nCount > nMaxPossible)
nCount = nMaxPossible;
- boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[nCount]);
+ std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[nCount]);
bRet = false;
sal_Size nRead = rIStm.Read(pBuffer.get(), nCount);
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index fc59664192cb..14f3ca4319bf 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -18,7 +18,7 @@
*/
#include "Exif.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
Exif::Exif() :
maOrientation(TOP_LEFT),
@@ -208,7 +208,7 @@ bool Exif::processExif(SvStream& rStream, sal_uInt16 aSectionLength, bool bSetVa
sal_uInt16 aLength = aSectionLength - 6; // Length = Section - Header
- boost::scoped_array<sal_uInt8> aExifData(new sal_uInt8[aLength]);
+ std::unique_ptr<sal_uInt8[]> aExifData(new sal_uInt8[aLength]);
sal_uInt32 aExifDataBeginPosition = rStream.Tell();
rStream.Read(aExifData.get(), aLength);
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index f8bc787529bf..6ada56b8738c 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -28,7 +28,7 @@
#include <vcl/FilterConfigItem.hxx>
#include <vcl/graphicfilter.hxx>
#include <tools/fract.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define JPEG_MIN_READ 512
#define BUFFER_SIZE 4096
@@ -314,7 +314,7 @@ void JPEGReader::FillBitmap()
if( mpAcc->GetBitCount() == 8 )
{
- boost::scoped_array<BitmapColor> pCols(new BitmapColor[ 256 ]);
+ std::unique_ptr<BitmapColor[]> pCols(new BitmapColor[ 256 ]);
for( sal_uInt16 n = 0; n < 256; n++ )
{
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 831b390b87d5..47051d2819cc 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -35,7 +35,7 @@ extern "C" {
#include "jpeg.h"
#include <JpegReader.hxx>
#include <JpegWriter.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#ifdef _MSC_VER
#pragma warning(push, 1) /* disable to __declspec(align()) aligned warning */
@@ -77,7 +77,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
long nHeight;
long nAlignedWidth;
JSAMPLE* aRangeLimit;
- boost::scoped_array<unsigned char> pScanLineBuffer;
+ std::unique_ptr<unsigned char[]> pScanLineBuffer;
if ( setjmp( jerr.setjmp_buffer ) )
{
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 277e4af32366..86bacd124b19 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -26,7 +26,7 @@
#include <vcl/virdev.hxx>
#include "sgffilt.hxx"
#include "sgfbram.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
SgfHeader::SgfHeader()
{
@@ -210,7 +210,7 @@ bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
sal_uInt16 i,j,k; // column/row/plane counter
sal_uInt16 a,b; // helper variables
sal_uInt8 pl1 = 0; // masks for the planes
- boost::scoped_array<sal_uInt8> pBuf; // buffer for a pixel row
+ std::unique_ptr<sal_uInt8[]> pBuf; // buffer for a pixel row
PcxExpand aPcx;
sal_uLong nOfs;
sal_uInt8 cRGB[4];
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx
index 8c9c09be4d2e..27ee2be09817 100644
--- a/vcl/source/filter/sgvspln.cxx
+++ b/vcl/source/filter/sgvspln.cxx
@@ -20,7 +20,7 @@
#include <math.h>
#include <tools/poly.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <sgvspln.hxx>
@@ -392,8 +392,8 @@ sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y,
double* b, double* c, double* d)
{
sal_uInt16 i;
- boost::scoped_array<double> a;
- boost::scoped_array<double> h;
+ std::unique_ptr<double[]> a;
+ std::unique_ptr<double[]> h;
sal_uInt16 error;
if (n<2) return 1;
@@ -487,9 +487,9 @@ sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y,
sal_uInt16 Error;
sal_uInt16 i,im1,nm1; //integer
double hr,hl;
- boost::scoped_array<double> a;
- boost::scoped_array<double> lowrow;
- boost::scoped_array<double> ricol;
+ std::unique_ptr<double[]> a;
+ std::unique_ptr<double[]> lowrow;
+ std::unique_ptr<double[]> ricol;
if (n<2) return 4;
nm1=n-1;
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 575cc3e2104b..62e877bd4d5d 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -28,7 +28,6 @@
#include "sgffilt.hxx"
#include "sgfbram.hxx"
#include "sgvmain.hxx"
-#include <boost/scoped_array.hpp>
#include <memory>
extern SgfFontLst* pSgfFonts;
@@ -892,8 +891,8 @@ void TextType::Draw(OutputDevice& rOut)
bool Ende = false;
sal_uInt16 lc;
bool TextFit;
- boost::scoped_array<short> xLine;
- boost::scoped_array<UCHAR> cLine; // Buffer for FormatLine
+ std::unique_ptr<short[]> xLine;
+ std::unique_ptr<UCHAR[]> cLine; // Buffer for FormatLine
sal_uInt16 FitXMul;
sal_uInt16 FitXDiv;
sal_uInt16 FitYMul;
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 86ad5de1f19a..8b445597774a 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -29,7 +29,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/dibtools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define WIN_EMR_POLYGON 3
#define WIN_EMR_POLYLINE 4
@@ -892,7 +892,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c
if( nLen )
{
sal_uInt32 nNormWidth;
- boost::scoped_array<long> pOwnArray;
+ std::unique_ptr<long[]> pOwnArray;
long* pDX;
// get text sizes
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 9aff0ccc5178..418d40f08f18 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -22,7 +22,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <boost/bind.hpp>
#include <vcl/dibtools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace std;
@@ -534,7 +534,7 @@ void EnhWMFReader::ReadAndDrawPolyLine()
( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() )
)
{
- boost::scoped_array<sal_uInt16> pnPoints(new sal_uInt16[ nPoly ]);
+ std::unique_ptr<sal_uInt16[]> pnPoints(new sal_uInt16[ nPoly ]);
for ( i = 0; i < nPoly && pWMF->good(); i++ )
{
pWMF->ReadUInt32( nPoints );
@@ -578,7 +578,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
( ( nPoly * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) ))
{
// Get number of points in each polygon
- boost::scoped_array<sal_uInt16> pnPoints(new sal_uInt16[ nPoly ]);
+ std::unique_ptr<sal_uInt16[]> pnPoints(new sal_uInt16[ nPoly ]);
for (sal_uInt32 i = 0; i < nPoly && pWMF->good(); ++i)
{
sal_uInt32 nPoints(0);
@@ -592,7 +592,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
for (sal_uInt32 i = 0; i < nPoly && pWMF->good(); ++i)
{
const sal_uInt16 nPointCount(pnPoints[i]);
- boost::scoped_array<Point> pPtAry(new Point[nPointCount]);
+ std::unique_ptr<Point[]> pPtAry(new Point[nPointCount]);
for (sal_uInt16 j = 0; j < nPointCount && pWMF->good(); ++j)
{
T nX(0), nY(0);
@@ -1475,7 +1475,7 @@ bool EnhWMFReader::ReadEnhWMF()
{
if ( nLen <= static_cast<sal_Int32>( nEndPos - pWMF->Tell() ) )
{
- boost::scoped_array<sal_Char> pBuf(new sal_Char[ nLen ]);
+ std::unique_ptr<sal_Char[]> pBuf(new sal_Char[ nLen ]);
pWMF->Read( pBuf.get(), nLen );
aText = OUString(pBuf.get(), nLen, pOut->GetCharSet());
pBuf.reset();
@@ -1500,7 +1500,7 @@ bool EnhWMFReader::ReadEnhWMF()
{
if ( ( nLen * sizeof(sal_Unicode) ) <= ( nEndPos - pWMF->Tell() ) )
{
- boost::scoped_array<sal_Unicode> pBuf(new sal_Unicode[ nLen ]);
+ std::unique_ptr<sal_Unicode[]> pBuf(new sal_Unicode[ nLen ]);
pWMF->Read( pBuf.get(), nLen << 1 );
#ifdef OSL_BIGENDIAN
sal_Char nTmp, *pTmp = (sal_Char*)( pBuf.get() + nLen );
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index e69b504348c6..828169e32560 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -19,7 +19,7 @@
#include "winmtf.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/optional.hpp>
#include <vcl/gdimtf.hxx>
#include <vcl/wmf.hxx>
@@ -383,7 +383,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
}
// Number of points of each polygon. Determine total number of points
- boost::scoped_array<sal_uInt16> xPolygonPointCounts(new sal_uInt16[nPolyCount]);
+ std::unique_ptr<sal_uInt16[]> xPolygonPointCounts(new sal_uInt16[nPolyCount]);
sal_uInt16* pnPoints = xPolygonPointCounts.get();
tools::PolyPolygon aPolyPoly(nPolyCount, nPolyCount);
sal_uInt16 nPoints = 0;
@@ -421,7 +421,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
break;
}
- boost::scoped_array<Point> xPolygonPoints(new Point[nPointCount]);
+ std::unique_ptr<Point[]> xPolygonPoints(new Point[nPointCount]);
Point* pPtAry = xPolygonPoints.get();
for(sal_uInt16 b(0); b < nPointCount && pWMF->good(); ++b)
@@ -507,7 +507,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->ReadUInt16( nLength );
if ( nLength )
{
- boost::scoped_array<char> pChar(new char[ ( nLength + 1 ) &~ 1 ]);
+ std::unique_ptr<char[]> pChar(new char[ ( nLength + 1 ) &~ 1 ]);
pWMF->Read( pChar.get(), ( nLength + 1 ) &~ 1 );
OUString aText( pChar.get(), nLength, pOut->GetCharSet() );
pChar.reset();
@@ -523,7 +523,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_Int32 nRecordPos, nRecordSize = 0, nOriginalTextLen, nNewTextLen;
Point aPosition;
Rectangle aRect;
- boost::scoped_array<long> pDXAry;
+ std::unique_ptr<long[]> pDXAry;
pWMF->SeekRel(-6);
nRecordPos = pWMF->Tell();
@@ -549,7 +549,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
const Point aPt2( ReadPoint() );
aRect = Rectangle( aPt1, aPt2 );
}
- boost::scoped_array<char> pChar(new char[ ( nOriginalTextLen + 1 ) &~ 1 ]);
+ std::unique_ptr<char[]> pChar(new char[ ( nOriginalTextLen + 1 ) &~ 1 ]);
pWMF->Read( pChar.get(), ( nOriginalTextLen + 1 ) &~ 1 );
OUString aText( pChar.get(), (sal_uInt16)nOriginalTextLen, pOut->GetCharSet() );// after this conversion the text may contain
nNewTextLen = aText.getLength(); // less character (japanese version), so the
@@ -1017,7 +1017,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
#else
sal_uInt32 nCheckSum = rtl_crc32( 0, &nEsc, 4 );
#endif
- boost::scoped_array<sal_Int8> pData;
+ std::unique_ptr<sal_Int8[]> pData;
if ( ( static_cast< sal_uInt64 >( nEscLen ) + pWMF->Tell() ) > nMetaRecEndPos )
{
@@ -1042,7 +1042,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
Point aPt;
OUString aString;
sal_uInt32 nStringLen, nDXCount;
- boost::scoped_array<long> pDXAry;
+ std::unique_ptr<long[]> pDXAry;
SvMemoryStream aMemoryStream( nEscLen );
aMemoryStream.Write( pData.get(), nEscLen );
aMemoryStream.Seek( STREAM_SEEK_TO_BEGIN );
@@ -1116,7 +1116,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
if( pEMFStream )
{
- boost::scoped_array<sal_Int8> pBuf(new sal_Int8[ nCurRecSize ]);
+ std::unique_ptr<sal_Int8[]> pBuf(new sal_Int8[ nCurRecSize ]);
sal_uInt32 nCount = pWMF->Read( pBuf.get(), nCurRecSize );
if( nCount == nCurRecSize )
pEMFStream->Write( pBuf.get(), nCount );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index ca3f77f9aa63..cd3536c68703 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -36,7 +36,7 @@
#include <vcl/metric.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
// MS Windows defines
@@ -567,7 +567,7 @@ void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString,
pWMF->WriteUChar( 0 );
sal_Int32 nOriginalTextLen = rString.getLength();
- boost::scoped_array<sal_Int16> pConvertedDXAry(new sal_Int16[ nOriginalTextLen ]);
+ std::unique_ptr<sal_Int16[]> pConvertedDXAry(new sal_Int16[ nOriginalTextLen ]);
sal_Int32 j = 0;
pConvertedDXAry[ j++ ] = (sal_Int16)ScaleWidth( pDXAry[ 0 ] );
for (sal_Int32 i = 1; i < ( nOriginalTextLen - 1 ); ++i)
@@ -1203,7 +1203,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
pVirDev->SetFont( aSrcFont );
nLen = aTemp.getLength();
- boost::scoped_array<long> pDXAry(nLen ? new long[ nLen ] : NULL);
+ std::unique_ptr<long[]> pDXAry(nLen ? new long[ nLen ] : NULL);
nNormSize = pVirDev->GetTextArray( aTemp, pDXAry.get() );
if (nLen && nNormSize == 0)
{
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index a66ff75dfbda..f18558ff27f0 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -32,7 +32,7 @@
#include <impbmp.hxx>
#include <salbmp.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
Bitmap::Bitmap() :
mpImpBmp( NULL )
@@ -551,7 +551,7 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags )
if( pAcc )
{
const long nScanSize = pAcc->GetScanlineSize();
- boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[ nScanSize ]);
+ std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[ nScanSize ]);
const long nHeight = pAcc->Height();
const long nHeight1 = nHeight - 1L;
const long nHeight_2 = nHeight >> 1L;
@@ -690,10 +690,10 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
long nY;
long nRotX;
long nRotY;
- boost::scoped_array<long> pCosX(new long[ nNewWidth ]);
- boost::scoped_array<long> pSinX(new long[ nNewWidth ]);
- boost::scoped_array<long> pCosY(new long[ nNewHeight ]);
- boost::scoped_array<long> pSinY(new long[ nNewHeight ]);
+ std::unique_ptr<long[]> pCosX(new long[ nNewWidth ]);
+ std::unique_ptr<long[]> pSinX(new long[ nNewWidth ]);
+ std::unique_ptr<long[]> pCosY(new long[ nNewHeight ]);
+ std::unique_ptr<long[]> pSinY(new long[ nNewHeight ]);
for ( nX = 0; nX < nNewWidth; nX++ )
{
@@ -883,7 +883,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
if( pReadAcc->HasPalette() && pWriteAcc->HasPalette() )
{
const sal_uInt16 nCount = pReadAcc->GetPaletteEntryCount();
- boost::scoped_array<sal_uInt8> pMap(new sal_uInt8[ nCount ]);
+ std::unique_ptr<sal_uInt8[]> pMap(new sal_uInt8[ nCount ]);
// Create index map for the color table, as the bitmap should be copied
// retaining it's color information relatively well
@@ -1467,7 +1467,7 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
}
else
{
- boost::scoped_array<bool> pFlags(new bool[ nMaxColors ]);
+ std::unique_ptr<bool[]> pFlags(new bool[ nMaxColors ]);
// Set all entries to false
std::fill( pFlags.get(), pFlags.get()+nMaxColors, false );
@@ -1641,12 +1641,12 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
if( pAcc )
{
- boost::scoped_array<long> pMinR(new long[ nColorCount ]);
- boost::scoped_array<long> pMaxR(new long[ nColorCount ]);
- boost::scoped_array<long> pMinG(new long[ nColorCount ]);
- boost::scoped_array<long> pMaxG(new long[ nColorCount ]);
- boost::scoped_array<long> pMinB(new long[ nColorCount ]);
- boost::scoped_array<long> pMaxB(new long[ nColorCount ]);
+ std::unique_ptr<long[]> pMinR(new long[ nColorCount ]);
+ std::unique_ptr<long[]> pMaxR(new long[ nColorCount ]);
+ std::unique_ptr<long[]> pMinG(new long[ nColorCount ]);
+ std::unique_ptr<long[]> pMaxG(new long[ nColorCount ]);
+ std::unique_ptr<long[]> pMinB(new long[ nColorCount ]);
+ std::unique_ptr<long[]> pMaxB(new long[ nColorCount ]);
long* pTols;
sal_uLong i;
@@ -1692,7 +1692,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
else
{
BitmapColor aCol;
- boost::scoped_array<BitmapColor> pReplaces(new BitmapColor[ nColorCount ]);
+ std::unique_ptr<BitmapColor[]> pReplaces(new BitmapColor[ nColorCount ]);
for( i = 0UL; i < nColorCount; i++ )
pReplaces[ i ] = pAcc->GetBestMatchingColor( pReplaceColors[ i ] );
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index f5f6c3257d09..661572cb82e9 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -26,7 +26,7 @@
#include <vcl/bitmapscalesuper.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <impbmp.hxx>
#include <impoct.hxx>
@@ -1087,8 +1087,8 @@ bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
{
const double nWidth = pReadAcc->Width();
const double nHeight = pReadAcc->Height();
- boost::scoped_array<long> pLutX(new long[ nNewWidth ]);
- boost::scoped_array<long> pLutY(new long[ nNewHeight ]);
+ std::unique_ptr<long[]> pLutX(new long[ nNewWidth ]);
+ std::unique_ptr<long[]> pLutY(new long[ nNewHeight ]);
for( long nX = 0L; nX < nNewWidth; nX++ )
pLutX[ nX ] = long(nX * nWidth / nNewWidth);
@@ -1150,8 +1150,8 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
const long nWidth1 = pReadAcc->Width() - 1L;
const double fRevScaleX = (double) nWidth1 / nNewWidth1;
- boost::scoped_array<long> pLutInt(new long[ nNewWidth ]);
- boost::scoped_array<long> pLutFrac(new long[ nNewWidth ]);
+ std::unique_ptr<long[]> pLutInt(new long[ nNewWidth ]);
+ std::unique_ptr<long[]> pLutFrac(new long[ nNewWidth ]);
for( long nX = 0L, nTemp = nWidth - 2L; nX < nNewWidth; nX++ )
{
@@ -1237,8 +1237,8 @@ bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
const long nHeight1 = pReadAcc->Height() - 1L;
const double fRevScaleY = (double) nHeight1 / nNewHeight1;
- boost::scoped_array<long> pLutInt(new long[ nNewHeight ]);
- boost::scoped_array<long> pLutFrac(new long[ nNewHeight ]);
+ std::unique_ptr<long[]> pLutInt(new long[ nNewHeight ]);
+ std::unique_ptr<long[]> pLutFrac(new long[ nNewHeight ]);
for( long nY = 0L, nTemp = nHeight - 2L; nY < nNewHeight; nY++ )
{
@@ -1776,8 +1776,8 @@ bool Bitmap::ImplDitherFloyd()
long nW2 = nW - 3L;
long nRErr, nGErr, nBErr;
long nRC, nGC, nBC;
- boost::scoped_array<long> p1(new long[ nW ]);
- boost::scoped_array<long> p2(new long[ nW ]);
+ std::unique_ptr<long[]> p1(new long[ nW ]);
+ std::unique_ptr<long[]> p2(new long[ nW ]);
long* p1T = p1.get();
long* p2T = p2.get();
long* pTmp;
@@ -1905,8 +1905,8 @@ bool Bitmap::ImplDitherFloyd16()
BitmapColor aColor;
BitmapColor aBestCol;
ImpErrorQuad aErrQuad;
- boost::scoped_array<ImpErrorQuad> pErrQuad1(new ImpErrorQuad[ nWidth ]);
- boost::scoped_array<ImpErrorQuad> pErrQuad2(new ImpErrorQuad[ nWidth ]);
+ std::unique_ptr<ImpErrorQuad[]> pErrQuad1(new ImpErrorQuad[ nWidth ]);
+ std::unique_ptr<ImpErrorQuad[]> pErrQuad2(new ImpErrorQuad[ nWidth ]);
ImpErrorQuad* pQLine1 = pErrQuad1.get();
ImpErrorQuad* pQLine2 = 0;
long nYTmp = 0L;
@@ -2107,7 +2107,7 @@ bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
const sal_uInt32 nTotalColors = nColorsPerComponent * nColorsPerComponent * nColorsPerComponent;
const long nWidth = pRAcc->Width();
const long nHeight = pRAcc->Height();
- boost::scoped_array<PopularColorCount> pCountTable(new PopularColorCount[ nTotalColors ]);
+ std::unique_ptr<PopularColorCount[]> pCountTable(new PopularColorCount[ nTotalColors ]);
memset( pCountTable.get(), 0, nTotalColors * sizeof( PopularColorCount ) );
@@ -2168,7 +2168,7 @@ bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
if( pWAcc )
{
BitmapColor aDstCol( (sal_uInt8) 0 );
- boost::scoped_array<sal_uInt8> pIndexMap(new sal_uInt8[ nTotalColors ]);
+ std::unique_ptr<sal_uInt8[]> pIndexMap(new sal_uInt8[ nTotalColors ]);
for( long nR = 0, nIndex = 0; nR < 256; nR += nColorOffset )
for( long nG = 0; nG < 256; nG += nColorOffset )
@@ -2477,9 +2477,9 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
BitmapColor aCol;
const long nW = pAcc->Width();
const long nH = pAcc->Height();
- boost::scoped_array<sal_uInt8> cMapR(new sal_uInt8[ 256 ]);
- boost::scoped_array<sal_uInt8> cMapG(new sal_uInt8[ 256 ]);
- boost::scoped_array<sal_uInt8> cMapB(new sal_uInt8[ 256 ]);
+ std::unique_ptr<sal_uInt8[]> cMapR(new sal_uInt8[ 256 ]);
+ std::unique_ptr<sal_uInt8[]> cMapG(new sal_uInt8[ 256 ]);
+ std::unique_ptr<sal_uInt8[]> cMapB(new sal_uInt8[ 256 ]);
double fM, fROff, fGOff, fBOff, fOff;
// calculate slope
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 7a559f12a760..a7821224fdf7 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -31,7 +31,7 @@
#include <rtl/strbuf.hxx>
#include <cvtsvm.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
// Inlines
void ImplReadRect( SvStream& rIStm, Rectangle& rRect )
@@ -887,7 +887,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
- boost::scoped_array<long> pDXAry;
+ std::unique_ptr<long[]> pDXAry;
if (nAryLen > 0)
{
sal_Int32 nStrLen( aStr.getLength() );
@@ -902,7 +902,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
if( nAryLen+1 == nStrLen )
{
- boost::scoped_array<long> pTmpAry(new long[nStrLen]);
+ std::unique_ptr<long[]> pTmpAry(new long[nStrLen]);
aFontVDev->GetTextArray( aStr, pTmpAry.get(), nIndex, nLen );
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 1baa29c69b14..6d282254a97d 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -29,7 +29,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/outdev.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
// - Defines -
@@ -288,7 +288,7 @@ bool ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, bool bQuad )
const sal_uLong nPalSize = nColors * ( bQuad ? 4UL : 3UL );
BitmapColor aPalColor;
- boost::scoped_array<sal_uInt8> pEntries(new sal_uInt8[ nPalSize ]);
+ std::unique_ptr<sal_uInt8[]> pEntries(new sal_uInt8[ nPalSize ]);
if (rIStm.Read( pEntries.get(), nPalSize ) != nPalSize)
{
return false;
@@ -511,7 +511,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
rHeader.nSizeImage = rIStm.remainingSize();
}
- boost::scoped_array<sal_uInt8> pBuffer(
+ std::unique_ptr<sal_uInt8[]> pBuffer(
new sal_uInt8[rHeader.nSizeImage]);
if (rIStm.Read(pBuffer.get(), rHeader.nSizeImage)
!= rHeader.nSizeImage)
@@ -524,7 +524,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
{
const long nWidth(rHeader.nWidth);
const long nHeight(rHeader.nHeight);
- boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nAlignedWidth]);
+ std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nAlignedWidth]);
const long nI(bTopDown ? 1 : -1);
long nY(bTopDown ? 0 : nHeight - 1);
@@ -918,7 +918,7 @@ bool ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
{
const sal_uInt16 nColors = rAcc.GetPaletteEntryCount();
const sal_uLong nPalSize = nColors * 4UL;
- boost::scoped_array<sal_uInt8> pEntries(new sal_uInt8[ nPalSize ]);
+ std::unique_ptr<sal_uInt8[]> pEntries(new sal_uInt8[ nPalSize ]);
sal_uInt8* pTmpEntry = pEntries.get();
BitmapColor aPalColor;
@@ -945,7 +945,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 )
sal_uLong nSaveIndex;
sal_uLong nCount;
sal_uLong nBufCount;
- boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ ( nWidth << 1 ) + 2 ]);
+ std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ ( nWidth << 1 ) + 2 ]);
sal_uInt8* pTmp;
sal_uInt8 cPix;
sal_uInt8 cLast;
@@ -1127,7 +1127,7 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess*
{
const long nWidth(rAcc.Width());
const long nHeight(rAcc.Height());
- boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ nAlignedWidth ]);
+ std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nAlignedWidth ]);
switch( nBitCount )
{
case( 1 ):
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index bc0bd276c9d1..94bceaedf0e3 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <boost/scoped_array.hpp>
-
#include <osl/file.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 4acbc6236476..536a77ee0c15 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -27,7 +27,7 @@
#include <vcl/settings.hxx>
#include <image.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#if defined WNT
#include <vcl/opengl/OpenGLHelper.hxx>
@@ -222,9 +222,9 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
BitmapColor aCol;
const long nW = pAcc->Width();
const long nH = pAcc->Height();
- boost::scoped_array<sal_uInt8> pMapR(new sal_uInt8[ 256 ]);
- boost::scoped_array<sal_uInt8> pMapG(new sal_uInt8[ 256 ]);
- boost::scoped_array<sal_uInt8> pMapB(new sal_uInt8[ 256 ]);
+ std::unique_ptr<sal_uInt8[]> pMapR(new sal_uInt8[ 256 ]);
+ std::unique_ptr<sal_uInt8[]> pMapG(new sal_uInt8[ 256 ]);
+ std::unique_ptr<sal_uInt8[]> pMapB(new sal_uInt8[ 256 ]);
long nX, nY;
if( nStyle & DrawImageFlags::Highlight )
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 166f0be37148..4db6d4939e99 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -26,7 +26,6 @@
#include <vcl/wrkwin.hxx>
#include <vcl/virdev.hxx>
#include <impvect.hxx>
-#include <boost/scoped_array.hpp>
#include <memory>
#define VECT_POLY_MAX 8192
@@ -872,8 +871,8 @@ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
const long nNewWidth = ( nOldWidth << 2L ) + 4L;
const long nNewHeight = ( nOldHeight << 2L ) + 4L;
const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
- boost::scoped_array<long> pMapIn(new long[ std::max( nOldWidth, nOldHeight ) ]);
- boost::scoped_array<long> pMapOut(new long[ std::max( nOldWidth, nOldHeight ) ]);
+ std::unique_ptr<long[]> pMapIn(new long[ std::max( nOldWidth, nOldHeight ) ]);
+ std::unique_ptr<long[]> pMapOut(new long[ std::max( nOldWidth, nOldHeight ) ]);
long nX, nY, nTmpX, nTmpY;
pMap = new ImplVectMap( nNewWidth, nNewHeight );
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 67109134dbe0..be7d8c2e163a 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -24,7 +24,7 @@
#include <vcl/jobset.hxx>
#include <jobset.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define JOBSET_FILE364_SYSTEM ((sal_uInt16)0xFFFF)
#define JOBSET_FILE605_SYSTEM ((sal_uInt16)0xFFFE)
@@ -235,7 +235,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
return rIStream;
}
sal_Size nFirstPos = rIStream.Tell();
- boost::scoped_array<char> pTempBuf(new char[nRead]);
+ std::unique_ptr<char[]> pTempBuf(new char[nRead]);
rIStream.Read(pTempBuf.get(), nRead);
if (nRead >= sizeof(ImplOldJobSetupData))
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 34db8a6d7af2..b05be6f3cb98 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -29,7 +29,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
@@ -6820,7 +6820,7 @@ bool PDFWriterImpl::finalizeSignature()
HASH_Begin(hc.get());
- boost::scoped_array<char> buffer(new char[m_nSignatureContentOffset + 1]);
+ std::unique_ptr<char[]> buffer(new char[m_nSignatureContentOffset + 1]);
sal_uInt64 bytesRead;
//FIXME: Check if SHA1 is calculated from the correct byterange
@@ -7234,7 +7234,7 @@ bool PDFWriterImpl::finalizeSignature()
// Prepare buffer and calculate PDF file digest
CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, 0)) );
- boost::scoped_array<char> buffer1(new char[m_nSignatureContentOffset - 1]);
+ std::unique_ptr<char[]> buffer1(new char[m_nSignatureContentOffset - 1]);
sal_uInt64 bytesRead1;
if (osl::File::E_None != m_aFile.read(buffer1.get(), m_nSignatureContentOffset - 1 , bytesRead1) ||
@@ -7244,7 +7244,7 @@ bool PDFWriterImpl::finalizeSignature()
return false;
}
- boost::scoped_array<char> buffer2(new char[nLastByteRangeNo]);
+ std::unique_ptr<char[]> buffer2(new char[nLastByteRangeNo]);
sal_uInt64 bytesRead2;
if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolut, m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1) ||
@@ -7378,7 +7378,7 @@ bool PDFWriterImpl::finalizeSignature()
SAL_INFO("vcl.pdfwriter", "nTsSigLen=" << nTsSigLen);
- boost::scoped_array<BYTE> pTsSig(new BYTE[nTsSigLen]);
+ std::unique_ptr<BYTE[]> pTsSig(new BYTE[nTsSigLen]);
if (!CryptMsgGetParam(hMsg, CMSG_BARE_CONTENT_PARAM, 0, pTsSig.get(), &nTsSigLen))
{
@@ -7408,7 +7408,7 @@ bool PDFWriterImpl::finalizeSignature()
return false;
}
- boost::scoped_array<BYTE> pDecodedSignerInfoBuf(new BYTE[nDecodedSignerInfoLen]);
+ std::unique_ptr<BYTE[]> pDecodedSignerInfoBuf(new BYTE[nDecodedSignerInfoLen]);
if (!CryptMsgGetParam(hDecodedMsg, CMSG_SIGNER_INFO_PARAM, 0, pDecodedSignerInfoBuf.get(), &nDecodedSignerInfoLen))
{
@@ -7522,7 +7522,7 @@ bool PDFWriterImpl::finalizeSignature()
}
SAL_INFO("vcl.pdfwriter", "Signature size is " << nSigLen << " bytes");
- boost::scoped_array<BYTE> pSig(new BYTE[nSigLen]);
+ std::unique_ptr<BYTE[]> pSig(new BYTE[nSigLen]);
if (!CryptMsgGetParam(hMsg, CMSG_CONTENT_PARAM, 0, pSig.get(), &nSigLen))
{
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 01ff6fe5be9b..898a69730ec3 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -29,7 +29,7 @@
#include <vcl/svapp.hxx>
#include <vcl/alpha.hxx>
#include <osl/endian.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define PNG_DEF_COMPRESSION 6
@@ -329,7 +329,7 @@ bool PNGWriterImpl::ImplWriteHeader()
void PNGWriterImpl::ImplWritePalette()
{
const sal_uLong nCount = mpAccess->GetPaletteEntryCount();
- boost::scoped_array<sal_uInt8> pTempBuf(new sal_uInt8[nCount * 3]);
+ std::unique_ptr<sal_uInt8[]> pTempBuf(new sal_uInt8[nCount * 3]);
sal_uInt8* pTmp = pTempBuf.get();
ImplOpenChunk(PNGCHUNK_PLTE);
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 919db4a42da8..945f7ae9f687 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -42,7 +42,6 @@
#include <salprn.hxx>
#include <svdata.hxx>
#include <outdata.hxx>
-#include <boost/scoped_array.hpp>
#include <memory>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -425,7 +424,7 @@ void SalGraphics::DrawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry, cons
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- boost::scoped_array<SalPoint> pPtAry2(new SalPoint[nPoints]);
+ std::unique_ptr<SalPoint[]> pPtAry2(new SalPoint[nPoints]);
bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), pOutDev );
drawPolyLine( nPoints, bCopied ? pPtAry2.get() : pPtAry );
}
@@ -437,7 +436,7 @@ void SalGraphics::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, const
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- boost::scoped_array<SalPoint> pPtAry2(new SalPoint[nPoints]);
+ std::unique_ptr<SalPoint[]> pPtAry2(new SalPoint[nPoints]);
bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), pOutDev );
drawPolygon( nPoints, bCopied ? pPtAry2.get() : pPtAry );
}
@@ -487,7 +486,7 @@ bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry
bool bResult = false;
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- boost::scoped_array<SalPoint> pPtAry2(new SalPoint[nPoints]);
+ std::unique_ptr<SalPoint[]> pPtAry2(new SalPoint[nPoints]);
bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), pOutDev );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2.get() : pPtAry, pFlgAry );
}
@@ -501,7 +500,7 @@ bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry,
bool bResult = false;
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- boost::scoped_array<SalPoint> pPtAry2(new SalPoint[nPoints]);
+ std::unique_ptr<SalPoint[]> pPtAry2(new SalPoint[nPoints]);
bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), pOutDev );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2.get() : pPtAry, pFlgAry );
}
@@ -656,7 +655,7 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- boost::scoped_array<SalPoint> pPtAry2(new SalPoint[nPoints]);
+ std::unique_ptr<SalPoint[]> pPtAry2(new SalPoint[nPoints]);
bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), pOutDev );
invert( nPoints, bCopied ? pPtAry2.get() : pPtAry, nFlags );
}
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 66124beabd67..f8445bdeb9c9 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -50,7 +50,7 @@
#endif
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
#ifdef DEBUG
//#define MULTI_SL_DEBUG
@@ -1573,7 +1573,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
{
SalLayout::AdjustLayout( rArgs );
ImplLayoutArgs aMultiArgs = rArgs;
- boost::scoped_array<DeviceCoordinate> pJustificationArray;
+ std::unique_ptr<DeviceCoordinate[]> pJustificationArray;
if( !rArgs.mpDXArray && rArgs.mnLayoutWidth )
{
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 9e5c2aba4258..f6222ca2d9a2 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -21,7 +21,7 @@
#include <vcl/salbtype.hxx>
#include <bmpfast.hxx>
#include <osl/diagnose.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define IMPL_CASE_GET_FORMAT( Format ) \
case( BMP_FORMAT##Format ): \
@@ -219,7 +219,7 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- boost::scoped_array<sal_uInt8> pColToPalMap(new sal_uInt8[ TC_TO_PAL_COLORS ]);
+ std::unique_ptr<sal_uInt8[]> pColToPalMap(new sal_uInt8[ TC_TO_PAL_COLORS ]);
BitmapColor aIndex( 0 );
for( long nR = 0; nR < 16; nR++ )
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 8002fcc11690..25963d5bc948 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -32,7 +32,7 @@
#include <rtl/strbuf.hxx>
#endif
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace vcl
{
@@ -224,7 +224,7 @@ namespace vcl
return;
}
- boost::scoped_array<long> pCharWidths(new long[ _nLength ]);
+ std::unique_ptr<long[]> pCharWidths(new long[ _nLength ]);
long nTextWidth = GetTextArray( _rText, pCharWidths.get(), _nStartIndex, _nLength );
m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, pCharWidths.get(), _nStartIndex, _nLength );
pCharWidths.reset();
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index fa8e981a17be..15d6cf7a8c07 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -12,7 +12,6 @@
#include <vcl/syschild.hxx>
#include <vcl/sysdata.hxx>
-#include <boost/scoped_array.hpp>
#include <boost/make_shared.hpp>
#include <vcl/pngwrite.hxx>
#include <vcl/bmpacc.hxx>
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index ff94e964914a..89b369b7a295 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -19,7 +19,7 @@
#include <config_folders.h>
#include <vcl/salbtype.hxx>
#include <vcl/bmpacc.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <vcl/pngwrite.hxx>
#include <vcl/graph.hxx>
#include <vcl/svapp.hxx>
@@ -72,7 +72,7 @@ OString loadShader(const OUString& rFilename)
{
sal_uInt64 nSize = 0;
aFile.getSize(nSize);
- boost::scoped_array<char> content(new char[nSize+1]);
+ std::unique_ptr<char[]> content(new char[nSize+1]);
sal_uInt64 nBytesRead = 0;
aFile.read(content.get(), nSize, nBytesRead);
assert(nSize == nBytesRead);
@@ -508,7 +508,7 @@ void OpenGLHelper::renderToFile(long nWidth, long nHeight, const OUString& rFile
{
OpenGLZone aZone;
- boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[nWidth*nHeight*4]);
+ std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[nWidth*nHeight*4]);
glReadPixels(0, 0, nWidth, nHeight, GL_BGRA, GL_UNSIGNED_BYTE, pBuffer.get());
BitmapEx aBitmap = ConvertBGRABufferToBitmapEx(pBuffer.get(), nWidth, nHeight);
try {
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 6a213d005737..34f95990ed1a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -34,7 +34,7 @@
#include <image.h>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
void OutputDevice::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap )
{
@@ -703,11 +703,11 @@ namespace
struct LinearScaleContext
{
- boost::scoped_array<long> mpMapX;
- boost::scoped_array<long> mpMapY;
+ std::unique_ptr<long[]> mpMapX;
+ std::unique_ptr<long[]> mpMapY;
- boost::scoped_array<long> mpMapXOffset;
- boost::scoped_array<long> mpMapYOffset;
+ std::unique_ptr<long[]> mpMapXOffset;
+ std::unique_ptr<long[]> mpMapYOffset;
LinearScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect,
Size& aOutSize, long nOffX, long nOffY)
@@ -877,8 +877,8 @@ public:
struct TradScaleContext
{
- boost::scoped_array<long> mpMapX;
- boost::scoped_array<long> mpMapY;
+ std::unique_ptr<long[]> mpMapX;
+ std::unique_ptr<long[]> mpMapY;
TradScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect,
Size& aOutSize, long nOffX, long nOffY)
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 816fc6e92101..4c992b6f476e 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -30,7 +30,7 @@
#include "../gdi/pdfwriter_impl.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#define HATCH_MAXPOINTS 1024
@@ -169,7 +169,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
Rectangle aRect( rPolyPoly.GetBoundRect() );
const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
- boost::scoped_array<Point> pPtBuffer(new Point[ HATCH_MAXPOINTS ]);
+ std::unique_ptr<Point[]> pPtBuffer(new Point[ HATCH_MAXPOINTS ]);
Point aPt1, aPt2, aEndPt1;
Size aInc;
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index 03449bddae67..b031ef40c1e7 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -21,7 +21,7 @@
#include <sal/types.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
@@ -171,7 +171,7 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
if( rColor != COL_TRANSPARENT && ! ImplIsRecordLayout() )
{
const sal_uInt16 nSize = rPts.GetSize();
- boost::scoped_array<Color> pColArray(new Color[ nSize ]);
+ std::unique_ptr<Color[]> pColArray(new Color[ nSize ]);
for( sal_uInt16 i = 0; i < nSize; i++ )
{
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index f43c1eb78a8a..b5b790fe1c5d 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -24,7 +24,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <tools/poly.hxx>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
@@ -459,8 +459,8 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
else if( pPolyPoly->Count() )
{
sal_uInt16 nCount = pPolyPoly->Count();
- boost::scoped_array<sal_uInt32> pPointAry(new sal_uInt32[nCount]);
- boost::scoped_array<PCONSTSALPOINT> pPointAryAry(new PCONSTSALPOINT[nCount]);
+ std::unique_ptr<sal_uInt32[]> pPointAry(new sal_uInt32[nCount]);
+ std::unique_ptr<PCONSTSALPOINT[]> pPointAryAry(new PCONSTSALPOINT[nCount]);
sal_uInt16 i = 0;
do
{
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 5d71838acde6..8cd2b6a44527 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -22,7 +22,7 @@
#include <sal/types.h>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <vcl/bmpacc.hxx>
#include <vcl/outdev.hxx>
@@ -182,8 +182,8 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
// do painting
const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
long nX, nY; // , nWorkX, nWorkY, nWorkWidth, nWorkHeight;
- boost::scoped_array<long> pMapX(new long[ nSrcWidth + 1 ]);
- boost::scoped_array<long> pMapY(new long[ nSrcHeight + 1 ]);
+ std::unique_ptr<long[]> pMapX(new long[ nSrcWidth + 1 ]);
+ std::unique_ptr<long[]> pMapY(new long[ nSrcHeight + 1 ]);
const bool bOldMap = mbMap;
mbMap = false;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 1cdd4d9cd41b..ee6a1b892f6b 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -71,7 +71,7 @@
#include <osl/socket.h>
#include <poll.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/uno/DeploymentException.hpp>
#include <officecfg/Office/Common.hxx>
@@ -2672,7 +2672,7 @@ void SalColormap::GetPalette()
Pixel i;
m_aPalette = std::vector<SalColor>(m_nUsed);
- boost::scoped_array<XColor> aColor(new XColor[m_nUsed]);
+ std::unique_ptr<XColor[]> aColor(new XColor[m_nUsed]);
for( i = 0; i < m_nUsed; i++ )
{
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 7e25fdc1b3e1..212b58677af8 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -24,7 +24,7 @@
#include <sal/alloca.h>
#include <rtl/strbuf.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace psp;
@@ -193,7 +193,7 @@ bool JobData::getStreamBuffer( void*& pData, int& bytes )
// now append the PPDContext stream buffer
aStream.WriteLine( "PPDContexData" );
sal_uLong nBytes;
- boost::scoped_array<char> pContextBuffer(m_aContext.getStreamableBuffer( nBytes ));
+ std::unique_ptr<char[]> pContextBuffer(m_aContext.getStreamableBuffer( nBytes ));
if( nBytes )
aStream.Write( pContextBuffer.get(), nBytes );
pContextBuffer.reset();