summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter')
-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
13 files changed, 42 insertions, 44 deletions
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)
{