summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-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
37 files changed, 144 insertions, 151 deletions
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 51982fcc5301..fe95bbc0df5c 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;
@@ -499,7 +499,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, bool bLayout)
sal_Int32 nLen = aText.getLength();
long nDXBuffer[256];
- boost::scoped_array<long> pDXBuffer;
+ std::unique_ptr<long[]> pDXBuffer;
long* pDX = nDXBuffer;
if (!aText.isEmpty())
@@ -1104,7 +1104,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() )
@@ -1223,7 +1223,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) )
{
@@ -2184,7 +2184,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() )
@@ -2200,7 +2200,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 3526a0bcaf5b..96bea221d1f7 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 45c69adf833d..4945e75f7b80 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 71fc928323cd..a44fac64ff72 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;
@@ -536,7 +536,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 );
@@ -580,7 +580,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);
@@ -594,7 +594,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);
@@ -1464,7 +1464,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(), (sal_uInt16)nLen, pOut->GetCharSet() );
pBuf.reset();
@@ -1490,7 +1490,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 59c622732539..343b74f54a15 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 db5c1e9ba7d5..69a5860a0188 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 )
@@ -595,7 +595,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;
@@ -734,10 +734,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++ )
{
@@ -927,7 +927,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
@@ -1511,7 +1511,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 );
@@ -1685,12 +1685,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;
@@ -1736,7 +1736,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 9a656d60daa6..130f065b87e5 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 85fe8e83160d..7ad623cd0a03 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 -
@@ -276,7 +276,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;
@@ -499,7 +499,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)
@@ -512,7 +512,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);
@@ -906,7 +906,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;
@@ -933,7 +933,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;
@@ -1115,7 +1115,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 aceb2524364e..9d8f282d40ab 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 067b6e8ab95e..87b9bce71075 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>
#define IMPSYSIMAGEITEM_MASK ( 0x01 )
#define IMPSYSIMAGEITEM_ALPHA ( 0x02 )
@@ -213,9 +213,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 623d7be7647f..2570800c6e0a 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)
@@ -233,7 +233,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 7424e3754e69..54adf2961380 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>
@@ -6846,7 +6846,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
@@ -7260,7 +7260,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) ||
@@ -7270,7 +7270,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) ||
@@ -7404,7 +7404,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))
{
@@ -7434,7 +7434,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))
{
@@ -7548,7 +7548,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 9a30c336cab1..2771c9d61c53 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>
@@ -401,7 +400,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 );
}
@@ -413,7 +412,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 );
}
@@ -463,7 +462,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 );
}
@@ -477,7 +476,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 );
}
@@ -632,7 +631,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 26f8a1f2b860..39c2f777d754 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 09d69e19a705..31dc1c097772 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 33cea5c7189b..5663ccb3cb94 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -15,7 +15,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>
@@ -47,7 +47,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);
@@ -205,7 +205,7 @@ void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx,
void OpenGLHelper::renderToFile(long nWidth, long nHeight, const OUString& rFileName)
{
- 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 48ac3730956a..2b77d3543afa 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -32,7 +32,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 )
{
@@ -698,11 +698,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)
@@ -870,8 +870,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 1ccdcc7c4195..05162cb0b25a 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -28,7 +28,7 @@
#include "../gdi/pdfwriter_impl.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#define HATCH_MAXPOINTS 1024
@@ -167,7 +167,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 8310a72c3d0b..0dba1fbd6ae8 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -18,7 +18,7 @@
*/
#include <sal/types.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
@@ -168,7 +168,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 754a8cd70349..79995b6de684 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -21,7 +21,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>
@@ -456,8 +456,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 5c2042d558be..30efb47ed958 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -19,7 +19,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>
@@ -179,8 +179,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;