diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-06-15 17:58:15 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-17 15:50:45 +0000 |
commit | 09800956191c90035872cbc18cd304fee043c710 (patch) | |
tree | 9d255ad7629fedc181e8b5cf965a3075a328caaf /filter | |
parent | 9cc52266bd1a4d01552675f151ce2da8c5210f84 (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<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 8 | ||||
-rw-r--r-- | filter/source/graphicfilter/egif/egif.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/eos2met/eos2met.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/bundles.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/class4.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 8 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipsd/ipsd.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 7 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 18 |
13 files changed, 42 insertions, 43 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 11446dd5bc7b..c321ec05bc55 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -36,7 +36,7 @@ #include <vcl/salbtype.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <boost/scoped_array.hpp> +#include <memory> using namespace ::swf; using namespace ::std; @@ -523,7 +523,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon else { Size aNormSize; - boost::scoped_array<long> pOwnArray; + std::unique_ptr<long[]> pOwnArray; long* pDX; // get text sizes @@ -808,7 +808,7 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali getBitmapData( bmpSource, pImageData, pAlphaData, width, height ); sal_uInt32 raw_size = width * height * 4; uLongf compressed_size = raw_size + (sal_uInt32)(raw_size/100) + 12; - boost::scoped_array<sal_uInt8> pCompressed(new sal_uInt8[ compressed_size ]); + std::unique_ptr<sal_uInt8[]> pCompressed(new sal_uInt8[ compressed_size ]); #ifdef DBG_UTIL if(compress2(pCompressed.get(), &compressed_size, pImageData, raw_size, Z_BEST_COMPRESSION) != Z_OK) @@ -822,7 +822,7 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali // AS: SWF files let you provide an Alpha mask for JPEG images, but we have // to ZLIB compress the alpha channel separately. uLong alpha_compressed_size = 0; - boost::scoped_array<sal_uInt8> pAlphaCompressed; + std::unique_ptr<sal_uInt8[]> pAlphaCompressed; if (bmpSource.IsAlpha() || bmpSource.IsTransparent()) { alpha_compressed_size = uLongf(width * height + (sal_uInt32)(raw_size/100) + 12); diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index 621cf32fe43e..d2b1695d999e 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -26,7 +26,7 @@ #include <vcl/fltcall.hxx> #include <vcl/FilterConfigItem.hxx> #include "giflzwc.hxx" -#include <boost/scoped_array.hpp> +#include <memory> // - GIFWriter - @@ -481,7 +481,7 @@ void GIFWriter::WriteAccess() GIFLZWCompressor aCompressor; const long nWidth = m_pAcc->Width(); const long nHeight = m_pAcc->Height(); - boost::scoped_array<sal_uInt8> pBuffer; + std::unique_ptr<sal_uInt8[]> pBuffer; const sal_uLong nFormat = m_pAcc->GetScanlineFormat(); bool bNative = ( BMP_FORMAT_8BIT_PAL == nFormat ); diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 1f5b80cbad5f..dac76c9efd06 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -37,7 +37,7 @@ #include <svl/solar.hrc> #include <vcl/gdimetafiletools.hxx> #include <vcl/dibtools.hxx> -#include <boost/scoped_array.hpp> +#include <memory> // -----------------------------Field Types------------------------------- @@ -675,7 +675,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) pMET->WriteUChar( 0x08 ).WriteUChar( 0x08 ); } - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nBytesPerLine]); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nBytesPerLine]); ny=0; while (ny<nHeight) { @@ -1952,7 +1952,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) METSetChrAngle( nOrientation = aGDIFont.GetOrientation() ); METSetChrSet(FindChrSet(aGDIFont)); aStr = pA->GetText().copy(pA->GetIndex(),pA->GetLen()); - boost::scoped_array<long> pDXAry(new long[aStr.getLength()]); + std::unique_ptr<long[]> pDXAry(new long[aStr.getLength()]); nNormSize = pVDev->GetTextArray( aStr, pDXAry.get() ); for ( i = 0; i < aStr.getLength(); i++ ) diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 9610b3717a9a..23f846433bc1 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -38,7 +38,7 @@ #include <o3tl/numeric.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <boost/scoped_array.hpp> +#include <memory> // PictWriter struct PictWriterAttrStackMember { @@ -1142,7 +1142,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, pPict->WriteUInt16( 0 ); // (?) // allocate memory for a row: - boost::scoped_array<sal_uInt8> pPix(new sal_uInt8[ nSrcRowBytes ]); + std::unique_ptr<sal_uInt8[]> pPix(new sal_uInt8[ nSrcRowBytes ]); // remember position of the map-data in the target: nDstMapPos=pPict->Tell(); @@ -1739,7 +1739,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) Point aPt( pA->GetPoint() ); OUString aStr = pA->GetText().copy( pA->GetIndex(),pA->GetLen() ); ScopedVclPtrInstance< VirtualDevice > pVirDev; - boost::scoped_array<long> pDXAry(new long[ aStr.getLength() ]); + std::unique_ptr<long[]> pDXAry(new long[ aStr.getLength() ]); sal_Int32 nNormSize( pVirDev->GetTextArray( aStr,pDXAry.get() ) ); if (aSrcFont.GetAlign()!=ALIGN_BASELINE) diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx index d310891c1ceb..6062b9b3a9c5 100644 --- a/filter/source/graphicfilter/icgm/bundles.cxx +++ b/filter/source/graphicfilter/icgm/bundles.cxx @@ -21,7 +21,7 @@ #include "bundles.hxx" #include <tools/stream.hxx> -#include <boost/scoped_array.hpp> +#include <memory> Bundle& Bundle::operator=( Bundle& rSource ) { @@ -184,7 +184,7 @@ void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize ) pFontEntry = aFontEntryList[ nFontNameCount ]; } nFontNameCount++; - boost::scoped_array<sal_Int8> pBuf(new sal_Int8[ nSize ]); + std::unique_ptr<sal_Int8[]> pBuf(new sal_Int8[ nSize ]); memcpy( pBuf.get(), pSource, nSize ); sal_Int8* pFound = ImplSearchEntry( pBuf.get(), reinterpret_cast<sal_Int8 const *>("ITALIC"), nSize, 6 ); if ( pFound ) diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 4544a3ff6b90..e484e52d739f 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -22,7 +22,7 @@ #include <chart.hxx> #include <outact.hxx> #include <math.h> -#include <boost/scoped_array.hpp> +#include <memory> using namespace ::com::sun::star; @@ -271,7 +271,7 @@ void CGM::ImplDoClass4() mpOutAct->CloseRegion(); sal_uInt16 nPoints = 0; - boost::scoped_array<Point> pPoints(new Point[ 0x4000 ]); + std::unique_ptr<Point[]> pPoints(new Point[ 0x4000 ]); tools::PolyPolygon aPolyPolygon; FloatPoint aFloatPoint; diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 2ebffb103fe9..634983fffc3b 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -35,7 +35,7 @@ #include <osl/process.h> #include <osl/file.hxx> #include <osl/thread.h> -#include <boost/scoped_array.hpp> +#include <memory> class FilterConfigItem; @@ -417,14 +417,14 @@ void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 .WriteUInt32( nTPos ).WriteUInt32( nSizeTIFF ); if ( nSizeWMF ) { - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ nSizeWMF ]); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nSizeWMF ]); rStrm.Seek( nOrigPos + nPosWMF ); rStrm.Read( pBuf.get(), nSizeWMF ); aReplacement.Write( pBuf.get(), nSizeWMF ); } if ( nSizeTIFF ) { - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ nSizeTIFF ]); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nSizeTIFF ]); rStrm.Seek( nOrigPos + nPosTIFF ); rStrm.Read( pBuf.get(), nSizeTIFF ); aReplacement.Write( pBuf.get(), nSizeTIFF ); diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index c32808e08b86..f1b99812f092 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -26,7 +26,7 @@ #include <vcl/lineinfo.hxx> #include <math.h> -#include <boost/scoped_array.hpp> +#include <memory> class FilterConfigItem; @@ -1003,7 +1003,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1 } if (nLen > pOS2MET->remainingSize()) throw css::uno::Exception("attempt to read past end of input", 0); - boost::scoped_array<char> pChr(new char[nLen+1]); + std::unique_ptr<char[]> pChr(new char[nLen+1]); for (i=0; i<nLen; i++) pOS2MET->ReadChar( pChr[i] ); pChr[nLen] = 0; @@ -2205,7 +2205,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen) } // OK, now the map data is being pushed. Unfortunately OS2 and BMP // do have a different RGB ordering when using 24-bit - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nDataLen]); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nDataLen]); pOS2MET->Read(pBuf.get(),nDataLen); if (p->nBitsPerPixel==24) { sal_uLong i, j, nAlign, nBytesPerLine; @@ -2527,7 +2527,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) pOrdFile = new SvMemoryStream; pOrdFile->SetEndian(SvStreamEndian::LITTLE); } - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nFieldSize]); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nFieldSize]); pOS2MET->Read(pBuf.get(),nFieldSize); pOrdFile->Write(pBuf.get(),nFieldSize); break; diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 6621eddd3c60..e6b7fd028755 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -28,7 +28,7 @@ #include "ipict.hxx" #include "shape.hxx" -#include <boost/scoped_array.hpp> +#include <memory> #include <vcl/FilterConfigItem.hxx> // complete FilterConfigItem for GraphicImport under -fsanitize=function @@ -1053,7 +1053,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo if (nWidth > nMaxWidth) BITMAPERROR; - boost::scoped_array<sal_uInt8> pScanline(new sal_uInt8[static_cast<size_t>(nWidth) * nCmpCount]); + std::unique_ptr<sal_uInt8[]> pScanline(new sal_uInt8[static_cast<size_t>(nWidth) * nCmpCount]); for ( ny = 0; ny < nHeight; ny++ ) { nSrcBitsPos = pPict->Tell(); diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx index c25468ca90e7..be25647dc0ec 100644 --- a/filter/source/graphicfilter/ipsd/ipsd.cxx +++ b/filter/source/graphicfilter/ipsd/ipsd.cxx @@ -22,7 +22,7 @@ #include <vcl/bmpacc.hxx> #include <vcl/outdev.hxx> #include <tools/fract.hxx> -#include <boost/scoped_array.hpp> +#include <memory> class FilterConfigItem; @@ -572,7 +572,7 @@ bool PSDReader::ImplReadBody() if ( mpFileHeader->nMode == PSD_CMYK ) { sal_uInt32 nBlack, nBlackMax = 0; - boost::scoped_array<sal_uInt8> pBlack(new sal_uInt8[ mpFileHeader->nRows * mpFileHeader->nColumns ]); + std::unique_ptr<sal_uInt8[]> pBlack(new sal_uInt8[ mpFileHeader->nRows * mpFileHeader->nColumns ]); nY = 0; while ( nY < mpFileHeader->nRows ) { diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 0079569f9ec5..df4b6b5078b8 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -90,7 +90,7 @@ #include <vcl/virdev.hxx> #include <rtl/crc.h> #include <rtl/strbuf.hxx> -#include <boost/scoped_array.hpp> +#include <memory> #include <boost/scoped_ptr.hpp> using namespace ::com::sun::star; @@ -4181,7 +4181,7 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM { sal_uInt32 i, nBlipSize, nOldPos = pMergePicStreamBSE->Tell(); const sal_uInt32 nBuf = 0x40000; // 256KB buffer - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ nBuf ]); + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nBuf ]); for ( i = 0; i < mnBlibEntrys; i++ ) { @@ -5085,7 +5085,7 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom ) mpOutStrm->Seek( STREAM_SEEK_TO_END ); nSource = mpOutStrm->Tell(); nToCopy = nSource - nCurPos; // increase the size of the tream by nBytes - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ 0x40000 ]); // 256KB Buffer + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ 0x40000 ]); // 256KB Buffer while ( nToCopy ) { nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 3cf0c9ebcecd..55f4f3fdfa7f 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -136,7 +136,6 @@ #include <rtl/strbuf.hxx> #include <rtl/ustring.hxx> #include <svtools/embedhlp.hxx> -#include <boost/scoped_array.hpp> #include <memory> using namespace ::com::sun::star ; @@ -6395,7 +6394,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect sal_Int32 nDbgLen = nLength - nSkip; if ( nDbgLen ) { - std::scoped_array<sal_Char> xDat(new sal_Char[ nDbgLen ]); + std::std::unique_ptr<sal_Char[]> xDat(new sal_Char[ nDbgLen ]); pGrStream->Read( xDat.get(), nDbgLen ); pDbgOut->Write( xDat.get(), nDbgLen ); pGrStream->SeekRel( -nDbgLen ); @@ -6694,7 +6693,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen, { if( 0x10000L > nStrLen ) { - boost::scoped_array<sal_Char> pBuf(new sal_Char[ nStrLen ]); + std::unique_ptr<sal_Char[]> pBuf(new sal_Char[ nStrLen ]); rStm.Read( pBuf.get(), nStrLen ); aSvrName = OUString( pBuf.get(), (sal_uInt16) nStrLen-1, osl_getThreadTextEncoding() ); } @@ -6711,7 +6710,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen, { if( xOle10Stm.Is() ) { - boost::scoped_array<sal_uInt8> pData(new sal_uInt8[ nDataLen ]); + std::unique_ptr<sal_uInt8[]> pData(new sal_uInt8[ nDataLen ]); if( !pData ) return false; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 07aa1e3f5390..330cf431e77f 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -122,7 +122,7 @@ #include <set> #include <rtl/strbuf.hxx> #include <tools/time.hxx> -#include <boost/scoped_array.hpp> +#include <memory> #include <boost/scoped_ptr.hpp> // PPT ColorScheme Slots @@ -681,8 +681,8 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic } if ( nGlobalColorsChanged || nFillColorsChanged ) { - boost::scoped_array<Color> pSearchColors(new Color[ nGlobalColorsChanged ]); - boost::scoped_array<Color> pReplaceColors(new Color[ nGlobalColorsChanged ]); + std::unique_ptr<Color[]> pSearchColors(new Color[ nGlobalColorsChanged ]); + std::unique_ptr<Color[]> pReplaceColors(new Color[ nGlobalColorsChanged ]); for ( j = 0; j < nGlobalColorsChanged; j++ ) { @@ -1757,7 +1757,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32 nInputSize ) { sal_uInt32 nOldPos = rInput.Tell(); - boost::scoped_array<char> pBuf(new char[ nInputSize ]); + std::unique_ptr<char[]> pBuf(new char[ nInputSize ]); rInput.Read( pBuf.get(), nInputSize ); ZCodec aZCodec( 0x8000, 0x8000 ); aZCodec.BeginCompression(); @@ -2044,7 +2044,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt sal_uInt32 nToCopy, nBufSize; nToCopy = pHd->nRecLen; - boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ 0x40000 ]); // 256KB Buffer + std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ 0x40000 ]); // 256KB Buffer if ( pBuf ) { while ( nToCopy ) @@ -2225,7 +2225,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* if ( ! ( nTextSize & 0xffff0000 ) ) { PPTPortionObj* pPortion; - boost::scoped_array<sal_Unicode> pParaText(new sal_Unicode[ nTextSize ]); + std::unique_ptr<sal_Unicode[]> pParaText(new sal_Unicode[ nTextSize ]); sal_Int32 nCurrentIndex = 0; for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() ) { @@ -5101,7 +5101,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe { sal_uInt32 i; sal_Unicode nChar; - boost::scoped_array<sal_Unicode> pBuf(new sal_Unicode[ ( nMaxLen >> 1 ) + 1 ]); + std::unique_ptr<sal_Unicode[]> pBuf(new sal_Unicode[ ( nMaxLen >> 1 ) + 1 ]); rIn.Read( pBuf.get(), nMaxLen ); nMaxLen >>= 1; pBuf[ nMaxLen ] = 0; @@ -5136,7 +5136,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe } else if( aTextHd.nRecType == PPT_PST_TextBytesAtom ) { - boost::scoped_array<sal_Char> pBuf(new sal_Char[ nMaxLen + 1 ]); + std::unique_ptr<sal_Char[]> pBuf(new sal_Char[ nMaxLen + 1 ]); pBuf[ nMaxLen ] = 0; rIn.Read( pBuf.get(), nMaxLen ); sal_Char* pPtr = pBuf.get(); @@ -7472,7 +7472,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab CreateTableColumns( xTable->getColumns(), aColumns, pGroup->GetSnapRect().Right() ); sal_Int32 nCellCount = aRows.size() * aColumns.size(); - boost::scoped_array<sal_Int32> pMergedCellIndexTable(new sal_Int32[ nCellCount ]); + std::unique_ptr<sal_Int32[]> pMergedCellIndexTable(new sal_Int32[ nCellCount ]); for ( sal_Int32 i = 0; i < nCellCount; i++ ) pMergedCellIndexTable[ i ] = i; |