summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/opengl/oglframegrabber.cxx4
-rw-r--r--basic/inc/pch/precompiled_sb.hxx2
-rw-r--r--basic/source/classes/image.cxx6
-rw-r--r--basic/source/classes/sb.cxx4
-rw-r--r--basic/source/classes/sbunoobj.cxx8
-rw-r--r--basic/source/runtime/methods.cxx4
-rw-r--r--basic/source/runtime/methods1.cxx4
-rw-r--r--basic/source/runtime/runtime.cxx14
-rw-r--r--basic/source/sbx/sbxdec.cxx4
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx4
-rw-r--r--canvas/source/directx/dx_canvasbitmap.cxx4
-rw-r--r--canvas/source/directx/dx_impltools.cxx2
-rw-r--r--canvas/source/directx/dx_textlayout_drawhelper.cxx4
-rw-r--r--canvas/source/directx/dx_vcltools.cxx2
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx4
-rw-r--r--canvas/source/vcl/textlayout.cxx8
-rw-r--r--chart2/inc/pch/precompiled_chartcore.hxx2
-rw-r--r--chart2/source/tools/OPropertySet.cxx6
-rw-r--r--chart2/source/view/charttypes/Splines.cxx12
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx4
-rw-r--r--comphelper/inc/pch/precompiled_comphelper.hxx2
-rw-r--r--comphelper/source/property/propagg.cxx14
-rw-r--r--comphelper/source/property/propertysethelper.cxx8
-rw-r--r--connectivity/inc/pch/precompiled_dbase.hxx2
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx4
-rw-r--r--cppcanvas/inc/pch/precompiled_cppcanvas.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx4
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx4
-rw-r--r--cppu/qa/cppumaker/test_cppumaker.cxx4
-rw-r--r--cppuhelper/inc/pch/precompiled_cppuhelper.hxx2
-rw-r--r--cppuhelper/source/component_context.cxx4
-rw-r--r--cppuhelper/source/interfacecontainer.cxx6
-rw-r--r--cppuhelper/source/propshlp.cxx12
-rw-r--r--cppuhelper/source/tdmgr.cxx4
-rw-r--r--cui/inc/pch/precompiled_cui.hxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx4
-rw-r--r--dbaccess/inc/pch/precompiled_dbu.hxx2
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx10
-rw-r--r--desktop/inc/pch/precompiled_deploymentmisc.hxx2
-rw-r--r--desktop/inc/pch/precompiled_sofficeapp.hxx2
-rw-r--r--desktop/source/app/officeipcthread.cxx4
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx4
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx1
-rw-r--r--desktop/source/migration/services/jvmfwk.hxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx1
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx2
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rw-r--r--editeng/source/outliner/outliner.cxx4
-rw-r--r--editeng/source/uno/unonrule.cxx4
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx4
-rw-r--r--extensions/source/ole/oleobjw.cxx23
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx9
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx4
-rw-r--r--extensions/source/plugin/base/xplugin.cxx4
-rw-r--r--extensions/source/plugin/unx/mediator.cxx6
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx4
-rw-r--r--extensions/source/scanner/grid.cxx6
-rw-r--r--extensions/source/scanner/sane.cxx12
-rw-r--r--extensions/source/scanner/sanedlg.cxx6
-rw-r--r--filter/source/flash/swfwriter1.cxx8
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx4
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx6
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/bundles.cxx4
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx4
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx6
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx8
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx4
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx4
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx7
-rw-r--r--filter/source/msfilter/svdfppt.cxx18
-rw-r--r--formula/source/core/api/token.cxx4
-rw-r--r--helpcompiler/source/HelpLinker.cxx4
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx8
-rw-r--r--i18npool/source/textconversion/textconversion_ko.cxx4
-rw-r--r--i18npool/source/textconversion/textconversion_zh.cxx4
-rw-r--r--i18npool/source/transliteration/transliteration_body.cxx4
-rw-r--r--include/svx/ruler.hxx1
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx12
-rw-r--r--jvmfwk/source/framework.cxx4
-rw-r--r--jvmfwk/source/fwkutil.cxx6
-rw-r--r--l10ntools/source/xrmmerge.cxx4
-rw-r--r--libreofficekit/qa/unit/tiledrendering.cxx6
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx10
-rw-r--r--lotuswordpro/inc/pch/precompiled_lwpft.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.cxx4
-rw-r--r--lotuswordpro/source/filter/lwptblformula.cxx4
-rw-r--r--opencl/source/openclwrapper.cxx16
-rw-r--r--sal/cppunittester/cppunittester.cxx4
-rw-r--r--sal/inc/pch/precompiled_sal.hxx2
-rw-r--r--sal/qa/rtl/digest/rtl_digest.cxx16
-rw-r--r--sal/textenc/tencinfo.cxx6
-rw-r--r--sax/source/expatwrap/saxwriter.cxx4
-rw-r--r--sax/source/expatwrap/xml2utf.cxx6
-rw-r--r--sc/inc/pch/precompiled_sc.hxx2
-rw-r--r--sc/inc/pch/precompiled_scfilt.hxx2
-rw-r--r--sc/inc/pch/precompiled_scui.hxx2
-rw-r--r--sc/source/core/data/documen4.cxx10
-rw-r--r--sc/source/core/data/drwlayer.cxx6
-rw-r--r--sc/source/core/data/table1.cxx4
-rw-r--r--sc/source/core/data/table3.cxx4
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx4
-rw-r--r--sc/source/core/tool/addincol.cxx8
-rw-r--r--sc/source/core/tool/appoptio.cxx4
-rw-r--r--sc/source/core/tool/chartpos.cxx4
-rw-r--r--sc/source/core/tool/consoli.cxx6
-rw-r--r--sc/source/core/tool/detfunc.cxx8
-rw-r--r--sc/source/core/tool/interpr4.cxx4
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/xestream.cxx4
-rw-r--r--sc/source/filter/excel/xistream.cxx8
-rw-r--r--sc/source/filter/html/htmlpars.cxx6
-rw-r--r--sc/source/filter/lotus/lotform.cxx4
-rw-r--r--sc/source/filter/lotus/op.cxx8
-rw-r--r--sc/source/filter/qpro/qpro.cxx4
-rw-r--r--sc/source/filter/starcalc/scflt.cxx4
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
-rw-r--r--sc/source/ui/docshell/docsh6.cxx4
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx6
-rw-r--r--sc/source/ui/unoobj/appluno.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/datauno.cxx4
-rw-r--r--sd/inc/pch/precompiled_sd.hxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx4
-rw-r--r--sd/source/ui/inc/assclass.hxx4
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/control/bindings.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx1
-rw-r--r--slideshow/source/engine/sp_debug.cxx1
-rw-r--r--slideshow/source/engine/transitions/randomwipe.hxx4
-rw-r--r--sot/inc/pch/precompiled_sot.hxx2
-rw-r--r--sot/source/sdstor/stgdir.cxx4
-rw-r--r--sot/source/sdstor/stgole.cxx4
-rw-r--r--sot/source/sdstor/stgstrms.cxx6
-rw-r--r--sot/source/sdstor/storage.cxx4
-rw-r--r--sot/source/sdstor/storinfo.cxx4
-rw-r--r--sot/source/sdstor/ucbstorage.cxx4
-rw-r--r--stoc/source/invocation/invocation.cxx4
-rw-r--r--stoc/source/javavm/javavm.cxx5
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx4
-rw-r--r--svl/inc/pch/precompiled_svl.hxx2
-rw-r--r--svl/source/items/nranges.cxx6
-rw-r--r--svl/source/items/poolio.cxx1
-rw-r--r--svl/source/misc/PasswordHelper.cxx6
-rw-r--r--svtools/inc/pch/precompiled_svt.hxx2
-rw-r--r--svtools/source/control/ruler.cxx1
-rw-r--r--svtools/source/graphic/grfmgr2.cxx22
-rw-r--r--svx/inc/pch/precompiled_svx.hxx2
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx2
-rw-r--r--svx/source/dialog/_bmpmask.cxx14
-rw-r--r--svx/source/dialog/srchdlg.cxx4
-rw-r--r--svx/source/gallery2/codec.cxx6
-rw-r--r--svx/source/gallery2/galtheme.cxx4
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.hxx4
-rw-r--r--svx/source/svdraw/svdhdl.cxx4
-rw-r--r--svx/source/svdraw/svdmodel.cxx8
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx6
-rw-r--r--sw/inc/pch/precompiled_msword.hxx2
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/inc/pch/precompiled_swui.hxx2
-rw-r--r--sw/source/core/doc/doccomp.cxx6
-rw-r--r--sw/source/core/table/swnewtable.cxx6
-rw-r--r--sw/source/filter/ascii/parasc.cxx4
-rw-r--r--sw/source/filter/basflt/iodetect.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx5
-rw-r--r--sw/source/ui/envelp/envfmt.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
-rw-r--r--sw/source/uibase/table/swtablerep.cxx4
-rw-r--r--test/source/bootstrapfixture.cxx4
-rw-r--r--test/source/htmltesttools.cxx4
-rw-r--r--test/source/xmltesttools.cxx4
-rw-r--r--ucb/source/sorter/sortresult.cxx4
-rw-r--r--ucb/source/ucp/file/filstr.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx4
-rw-r--r--ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx4
-rw-r--r--unoxml/source/dom/elementlist.hxx6
-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
-rw-r--r--xmloff/inc/pch/precompiled_xo.hxx2
-rw-r--r--xmloff/source/text/txtimp.cxx4
-rw-r--r--xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx4
230 files changed, 613 insertions, 637 deletions
diff --git a/avmedia/source/opengl/oglframegrabber.cxx b/avmedia/source/opengl/oglframegrabber.cxx
index 33ee878d44f8..551c03307a3b 100644
--- a/avmedia/source/opengl/oglframegrabber.cxx
+++ b/avmedia/source/opengl/oglframegrabber.cxx
@@ -17,7 +17,7 @@
#include <vcl/opengl/OpenGLHelper.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
using namespace libgltf;
@@ -37,7 +37,7 @@ OGLFrameGrabber::~OGLFrameGrabber()
uno::Reference< css::graphic::XGraphic > SAL_CALL OGLFrameGrabber::grabFrame( double /*fMediaTime*/ )
throw ( uno::RuntimeException, std::exception )
{
- boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[m_rHandle.viewport.width * m_rHandle.viewport.height * 4]);
+ std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[m_rHandle.viewport.width * m_rHandle.viewport.height * 4]);
glTFHandle* pHandle = &m_rHandle;
int nRet = gltf_renderer_get_bitmap(&pHandle, 1, reinterpret_cast<char*>(pBuffer.get()), GL_BGRA);
if( nRet != 0 )
diff --git a/basic/inc/pch/precompiled_sb.hxx b/basic/inc/pch/precompiled_sb.hxx
index d797b0b9cc39..089523cac22c 100644
--- a/basic/inc/pch/precompiled_sb.hxx
+++ b/basic/inc/pch/precompiled_sb.hxx
@@ -16,7 +16,7 @@
#include "math.h"
#include <boost/optional.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index d99259b0082c..0fa3d1398d17 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -25,7 +25,7 @@
#include <string.h>
#include "image.hxx"
#include <codegen.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
SbiImage::SbiImage()
{
@@ -229,7 +229,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
pStrings = new sal_Unicode[ nLen ];
nStringSize = (sal_uInt16) nLen;
- boost::scoped_array<char> pByteStrings(new char[ nLen ]);
+ std::unique_ptr<char[]> pByteStrings(new char[ nLen ]);
r.Read( pByteStrings.get(), nStringSize );
for( short j = 0; j < nStrings; j++ )
{
@@ -347,7 +347,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
r.WriteUInt32( pStringOff[ i ] );
}
// Then the String-Block
- boost::scoped_array<char> pByteStrings(new char[ nStringSize ]);
+ std::unique_ptr<char[]> pByteStrings(new char[ nStringSize ]);
for( i = 0; i < nStrings; i++ )
{
sal_uInt16 nOff = (sal_uInt16) pStringOff[ i ];
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index e449e82613f6..e1730d758dbb 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -44,7 +44,7 @@
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include "errobject.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <unordered_map>
#include <com/sun/star/script/ModuleType.hpp>
@@ -1888,7 +1888,7 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
// #95459 Delete dialogs, otherwise endless recursion
// in SbxVarable::GetType() if dialogs are accessed
sal_uInt16 nObjCount = pObjs->Count();
- boost::scoped_array<SbxVariable*> ppDeleteTab(new SbxVariable*[ nObjCount ]);
+ std::unique_ptr<SbxVariable*[]> ppDeleteTab(new SbxVariable*[ nObjCount ]);
sal_uInt16 nObj;
for( nObj = 0 ; nObj < nObjCount ; nObj++ )
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 572613786219..9cd21d04b2e5 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -82,7 +82,7 @@
#include <runtime.hxx>
#include <math.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <unordered_map>
#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
#include <com/sun/star/reflection/XConstantsTypeDescription.hpp>
@@ -1401,9 +1401,9 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
if( nSeqLevel == nDims )
{
- boost::scoped_array<sal_Int32> pLowerBounds(new sal_Int32[nDims]);
- boost::scoped_array<sal_Int32> pUpperBounds(new sal_Int32[nDims]);
- boost::scoped_array<sal_Int32> pActualIndices(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
for( short i = 1 ; i <= nDims ; i++ )
{
sal_Int32 lBound, uBound;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 48e9d871202a..73cd355389f1 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -57,7 +57,7 @@
#include <com/sun/star/script/XErrorQuery.hpp>
#include <ooo/vba/XHelperInterface.hpp>
#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <random>
@@ -436,7 +436,7 @@ RTLFUNC(CurDir)
const int PATH_INCR = 250;
int nSize = PATH_INCR;
- boost::scoped_array<char> pMem;
+ std::unique_ptr<char[]> pMem;
while( true )
{
pMem.reset(new char[nSize]);
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 9740bc13b465..55c80d6fe793 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -59,7 +59,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <com/sun/star/sheet/XFunctionAccess.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace comphelper;
using namespace com::sun::star::i18n;
@@ -1283,7 +1283,7 @@ void PutGet( SbxArray& rPar, bool bPut )
{
sal_Size nFPos = pStrm->Tell();
short nDims = pArr->GetDims();
- boost::scoped_array<short> pDims(new short[ nDims ]);
+ std::unique_ptr<short[]> pDims(new short[ nDims ]);
bRet = lcl_WriteReadSbxArray(*pArr,pStrm,!bRandom,nDims,pDims.get(),bPut);
pDims.reset();
if( nBlockLen )
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 4ccf50582a40..e71fe1352ada 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -67,7 +67,7 @@
#include "sbintern.hxx"
#include "sbunoobj.hxx"
#include <basic/codecompletecache.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using com::sun::star::uno::Reference;
@@ -2263,9 +2263,9 @@ void SbiRuntime::StepREDIMP()
else if (nDims > 0)
{
// Store dims to use them for copying later
- boost::scoped_array<sal_Int32> pLowerBounds(new sal_Int32[nDims]);
- boost::scoped_array<sal_Int32> pUpperBounds(new sal_Int32[nDims]);
- boost::scoped_array<sal_Int32> pActualIndices(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
// Compare bounds
for( short i = 1 ; i <= nDims ; i++ )
@@ -4436,9 +4436,9 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
bool bRangeError = false;
// Store dims to use them for copying later
- boost::scoped_array<sal_Int32> pLowerBounds(new sal_Int32[nDims]);
- boost::scoped_array<sal_Int32> pUpperBounds(new sal_Int32[nDims]);
- boost::scoped_array<sal_Int32> pActualIndices(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
+ std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
if( nDimsOld != nDimsNew )
{
bRangeError = true;
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 267bee9a3c0a..ae07e212a6b4 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -23,7 +23,7 @@
#include "sbxconv.hxx"
#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
// Implementation SbxDecimal
SbxDecimal::SbxDecimal()
@@ -208,7 +208,7 @@ bool SbxDecimal::setString( OUString* pOUString )
if( cDecimalSep != '.' || cThousandSep != ',' )
{
int nLen = pOUString->getLength();
- boost::scoped_array<sal_Unicode> pBuffer(new sal_Unicode[nLen + 1]);
+ std::unique_ptr<sal_Unicode[]> pBuffer(new sal_Unicode[nLen + 1]);
pBuffer[nLen] = 0;
const sal_Unicode* pSrc = pOUString->getStr();
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 6f5326409999..f2f552ade9d2 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -31,7 +31,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "cairo_textlayout.hxx"
#include "cairo_spritecanvas.hxx"
@@ -330,7 +330,7 @@ namespace cairocanvas
setupLayoutMode( rOutDev, mnTextDirection );
// TODO(P2): cache that
- ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
+ ::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
if( maLogicalAdvancements.getLength() )
{
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index 952661542111..df06327d705e 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -28,7 +28,7 @@
#include <boost/preprocessor/repetition.hpp>
#include <boost/preprocessor/iteration/local.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "dx_canvasbitmap.hxx"
#include "dx_impltools.hxx"
@@ -211,7 +211,7 @@ namespace dxcanvas
// copy only alpha channel to pAlphaBits
const sal_Int32 nScanWidth((aSize.getX() + 3) & ~3);
- boost::scoped_array<sal_uInt8> pAlphaBits( new sal_uInt8[nScanWidth*aSize.getY()] );
+ std::unique_ptr<sal_uInt8[]> pAlphaBits( new sal_uInt8[nScanWidth*aSize.getY()] );
const sal_uInt8* pInBits=(sal_uInt8*)aBmpData.Scan0;
pInBits+=3;
for( sal_Int32 y=0; y<aSize.getY(); ++y )
diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx
index 3f38dc3d4d10..7830d00d89f2 100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -48,8 +48,6 @@
#include "dx_canvas.hxx"
#include "dx_spritecanvas.hxx"
-#include <boost/scoped_array.hpp>
-
#include <vector>
#include <algorithm>
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index c46a49ffda25..e02c765f2f8f 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -25,7 +25,7 @@
#include <vcl/canvastools.hxx>
#include <tools/diagnose_ex.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/bind.hpp>
#include <com/sun/star/rendering/FontRequest.hpp>
#include <com/sun/star/rendering/PanoseProportion.hpp>
@@ -207,7 +207,7 @@ namespace dxcanvas
{
// create the DXArray
const sal_Int32 nLen( rLogicalAdvancements.getLength() );
- ::boost::scoped_array<sal_Int32> pDXArray( new sal_Int32[nLen] );
+ ::std::unique_ptr<sal_Int32[]> pDXArray( new sal_Int32[nLen] );
for( sal_Int32 i=0; i<nLen; ++i )
pDXArray[i] = basegfx::fround( rLogicalAdvancements[i] );
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index 727008049e68..92b1a2d6e553 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -34,8 +34,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
-#include <boost/scoped_array.hpp>
-
#include "dx_vcltools.hxx"
using namespace ::com::sun::star;
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index 501e7f83fe6b..15bac809a099 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -36,7 +36,7 @@
#include <GL/glew.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -775,7 +775,7 @@ namespace oglcanvas
{
// create the DXArray
const sal_Int32 nLen( aLogicalAdvancements.getLength() );
- ::boost::scoped_array<long> pDXArray( new long[nLen] );
+ ::std::unique_ptr<long[]> pDXArray( new long[nLen] );
for( sal_Int32 i=0; i<nLen; ++i )
pDXArray[i] = basegfx::fround( aLogicalAdvancements[i] );
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 9e4c7124f20f..d55054197752 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -36,7 +36,7 @@
#include "impltools.hxx"
#include "textlayout.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -119,7 +119,7 @@ namespace vclcanvas
uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
- ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
+ ::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, aRenderState);
uno::Sequence< uno::Reference< rendering::XPolyPolygon2D> > aOutlineSequence;
@@ -172,7 +172,7 @@ namespace vclcanvas
uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
- ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
+ ::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, aRenderState);
MetricVector aMetricVector;
@@ -384,7 +384,7 @@ namespace vclcanvas
if( maLogicalAdvancements.getLength() )
{
// TODO(P2): cache that
- ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
+ ::std::unique_ptr< long []> aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets( aOffsets.get(), maLogicalAdvancements, viewState, renderState );
// TODO(F3): ensure correct length and termination for DX
diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx
index 7527cd7750db..4999b67790f4 100644
--- a/chart2/inc/pch/precompiled_chartcore.hxx
+++ b/chart2/inc/pch/precompiled_chartcore.hxx
@@ -34,7 +34,7 @@
#include <boost/checked_delete.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cmath>
diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx
index c54537f5a9ea..939741c4f210 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -25,7 +25,7 @@
#include <vector>
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -143,7 +143,7 @@ Sequence< beans::PropertyState > SAL_CALL
{
cppu::IPropertyArrayHelper & rPH = getInfoHelper();
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ aPropertyName.getLength() ]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ aPropertyName.getLength() ]);
rPH.fillHandles( pHandles.get(), aPropertyName );
::std::vector< sal_Int32 > aHandles( pHandles.get(), pHandles.get() + aPropertyName.getLength());
@@ -194,7 +194,7 @@ void SAL_CALL
{
cppu::IPropertyArrayHelper & rPH = getInfoHelper();
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ aPropertyNames.getLength() ]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ aPropertyNames.getLength() ]);
rPH.fillHandles( pHandles.get(), aPropertyNames );
::std::vector< sal_Int32 > aHandles( pHandles.get(), pHandles.get() + aPropertyNames.getLength());
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index 660c8ce01f7a..c57acb649601 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -24,7 +24,7 @@
#include <vector>
#include <algorithm>
#include <functional>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define MAX_BSPLINE_DEGREE 15
@@ -721,14 +721,14 @@ void SplineCalculater::CalculateBSplines(
continue; // need at least 2 points, degree p needs at least n+1 points
// next piece of series
- boost::scoped_array<double> t(new double [n+1]);
+ std::unique_ptr<double[]> t(new double [n+1]);
if (!createParameterT(aPointsIn, t.get()))
{
continue; // next piece of series
}
lcl_tSizeType m = n + p + 1;
- boost::scoped_array<double> u(new double [m+1]);
+ std::unique_ptr<double[]> u(new double [m+1]);
createKnotVector(n, p, t.get(), u.get());
// The matrix N contains the B-spline basis functions applied to parameters.
@@ -736,14 +736,14 @@ void SplineCalculater::CalculateBSplines(
// column in a higher row is equal or greater than in the lower row.
// To store this matrix the non-zero elements are shifted to column 0
// and the amount of shifting is remembered in an array.
- boost::scoped_array<double*> aMatN(new double*[n+1]);
+ std::unique_ptr<double*[]> aMatN(new double*[n+1]);
for (lcl_tSizeType row = 0; row <=n; ++row)
{
aMatN[row] = new double[p+1];
for (sal_uInt32 col = 0; col <= p; ++col)
aMatN[row][col] = 0.0;
}
- boost::scoped_array<lcl_tSizeType> aShift(new lcl_tSizeType[n+1]);
+ std::unique_ptr<lcl_tSizeType[]> aShift(new lcl_tSizeType[n+1]);
aMatN[0][0] = 1.0; //all others are zero
aShift[0] = 0;
aMatN[n][0] = 1.0;
@@ -879,7 +879,7 @@ void SplineCalculater::CalculateBSplines(
pNewX[nNewSize -1 ] = aPointsIn[n].first;
pNewY[nNewSize -1 ] = aPointsIn[n].second;
pNewZ[nNewSize -1 ] = fZCoordinate;
- boost::scoped_array<double> aP(new double[m+1]);
+ std::unique_ptr<double[]> aP(new double[m+1]);
lcl_tSizeType nLow = 0;
for ( lcl_tSizeType nTIndex = 0; nTIndex <= n-1; ++nTIndex)
{
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index ee3dbb59b93c..4d10e4f8b4d2 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -20,7 +20,7 @@
#include <StaticGeometry.h>
#include "glm/gtc/matrix_inverse.hpp"
#include <boost/checked_delete.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define DEBUG_FBO 0
@@ -2257,7 +2257,7 @@ sal_uInt32 OpenGL3DRenderer::GetPixelColorFromPoint(long nX, long nY)
static sal_uInt32 nId = 0;
OUString aFileName = "/home/moggi/work/picking_" + OUString::number(nId++) + ".png";
OpenGLHelper::renderToFile(m_iWidth, m_iHeight, aFileName);
- boost::scoped_array<sal_uInt8> buf(new sal_uInt8[4]);
+ std::unique_ptr<sal_uInt8[]> buf(new sal_uInt8[4]);
glReadPixels(nX, m_iHeight-nY, 1, 1, GL_BGRA, GL_UNSIGNED_BYTE, buf.get());
Color aColor(255-buf[3], buf[2], buf[1], buf[0]);
return aColor.GetColor();
diff --git a/comphelper/inc/pch/precompiled_comphelper.hxx b/comphelper/inc/pch/precompiled_comphelper.hxx
index 63497211d0f9..d0de0e32d18a 100644
--- a/comphelper/inc/pch/precompiled_comphelper.hxx
+++ b/comphelper/inc/pch/precompiled_comphelper.hxx
@@ -19,7 +19,7 @@
#include <boost/bind.hpp>
#include <boost/current_function.hpp>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/shared_ptr.hpp>
#include <cassert>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 9d4930c54e3b..815a095185a7 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -30,7 +30,7 @@
#include <algorithm>
#include <set>
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace comphelper
@@ -506,9 +506,9 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const ::com::sun:
}
else
{
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[nLen]);
- boost::scoped_array< ::com::sun::star::uno::Any> pNewValues(new ::com::sun::star::uno::Any[nLen]);
- boost::scoped_array< ::com::sun::star::uno::Any> pOldValues(new ::com::sun::star::uno::Any[nLen]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[nLen]);
+ std::unique_ptr< ::com::sun::star::uno::Any[]> pNewValues(new ::com::sun::star::uno::Any[nLen]);
+ std::unique_ptr< ::com::sun::star::uno::Any[]> pOldValues(new ::com::sun::star::uno::Any[nLen]);
const ::com::sun::star::beans::PropertyChangeEvent* pEvents = _rEvents.getConstArray();
sal_Int32 nDest = 0;
@@ -797,7 +797,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
// reset, needed below
pDelValues = DelValues.getArray();
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ nLen - nAggCount ]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ nLen - nAggCount ]);
// get the map table
cppu::IPropertyArrayHelper& rPH2 = getInfoHelper();
@@ -806,8 +806,8 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
sal_Int32 nHitCount = rPH2.fillHandles( pHandles.get(), DelPropertyNames );
if (nHitCount != 0)
{
- boost::scoped_array< ::com::sun::star::uno::Any> pConvertedValues(new ::com::sun::star::uno::Any[ nHitCount ]);
- boost::scoped_array< ::com::sun::star::uno::Any> pOldValues(new ::com::sun::star::uno::Any[ nHitCount ]);
+ std::unique_ptr< ::com::sun::star::uno::Any[]> pConvertedValues(new ::com::sun::star::uno::Any[ nHitCount ]);
+ std::unique_ptr< ::com::sun::star::uno::Any[]> pOldValues(new ::com::sun::star::uno::Any[ nHitCount ]);
nHitCount = 0;
sal_Int32 i;
diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx
index 35b574fe9006..de7df6a28b9d 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -21,7 +21,7 @@
#include <comphelper/propertysethelper.hxx>
#include <osl/diagnose.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -141,7 +141,7 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >&
if( nCount )
{
- boost::scoped_array<PropertyMapEntry const *> pEntries(new PropertyMapEntry const *[nCount+1]);
+ std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
pEntries[nCount] = NULL;
const OUString* pNames = rPropertyNames.getConstArray();
@@ -169,7 +169,7 @@ Sequence< Any > SAL_CALL PropertySetHelper::getPropertyValues(const Sequence< OU
Sequence< Any > aValues;
if( nCount )
{
- boost::scoped_array<PropertyMapEntry const *> pEntries(new PropertyMapEntry const *[nCount+1]);
+ std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
pEntries[nCount] = NULL;
const OUString* pNames = rPropertyNames.getConstArray();
@@ -238,7 +238,7 @@ Sequence< PropertyState > SAL_CALL PropertySetHelper::getPropertyStates( const S
bool bUnknown = false;
- boost::scoped_array<PropertyMapEntry const *> pEntries(new PropertyMapEntry const *[nCount+1]);
+ std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
sal_Int32 n;
for( n = 0; !bUnknown && (n < nCount); n++, pNames++ )
diff --git a/connectivity/inc/pch/precompiled_dbase.hxx b/connectivity/inc/pch/precompiled_dbase.hxx
index 4c40a5219e6c..a5b82b4e3332 100644
--- a/connectivity/inc/pch/precompiled_dbase.hxx
+++ b/connectivity/inc/pch/precompiled_dbase.hxx
@@ -15,7 +15,7 @@
*/
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 5e5c4ddac58d..9f4f8425c36e 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -25,7 +25,7 @@
#include "diagnose_ex.h"
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace connectivity;
@@ -718,7 +718,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
else
{
sal_uInt16 const nLen(rIndex.getHeader().db_keylen);
- ::boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nLen]);
+ ::std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nLen]);
memset(&pBuf[0], 0x20, nLen);
if (!aKey.getValue().isNull())
{
diff --git a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
index 914bfd2fddf2..ad6cf5b89cb9 100644
--- a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
+++ b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
@@ -35,7 +35,7 @@
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <boost/bind.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/utility.hpp>
#include <canvas/canvastools.hxx>
#include <canvas/debug.hxx>
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 56ed3d9fb0a3..8574e88066ca 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -76,7 +76,7 @@
#include <vector>
#include <algorithm>
#include <iterator>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "mtftools.hxx"
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -2595,7 +2595,7 @@ namespace cppcanvas
// generating a DX array, and uniformly
// distributing the excess/insufficient width
// to every logical character.
- ::boost::scoped_array< long > pDXArray( new long[nLen] );
+ ::std::unique_ptr< long []> pDXArray( new long[nLen] );
rVDev.GetTextArray( pAct->GetText(), pDXArray.get(),
pAct->GetIndex(), pAct->GetLen() );
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index ec0b131b594d..8d09fedc537c 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -42,7 +42,7 @@
#include <basegfx/tools/canvastools.hxx>
#include <canvas/canvastools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/bind.hpp>
#include <boost/utility.hpp>
@@ -197,7 +197,7 @@ namespace cppcanvas
{
// no external DX array given, create one from given
// string
- ::boost::scoped_array< long > pCharWidths( new long[nLen] );
+ ::std::unique_ptr< long []> pCharWidths( new long[nLen] );
rVDev.GetTextArray( rText, pCharWidths.get(),
nStartPos, nLen );
diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx
index f6bff007b721..691e2a8c86be 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -353,7 +353,7 @@
#include "test/codemaker/cppumaker/TestException2.hpp"
#include "test/codemaker/cppumaker/Constants.hpp"
-#include "boost/scoped_array.hpp"
+#include <memory>
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "com/sun/star/uno/TypeClass.hpp"
@@ -421,7 +421,7 @@ struct Guard {
void Test::testBigStruct() {
// Default-initialize a BigStruct instance on top of a memory buffer filled
// with random data, and make sure that all members are default-initialized:
- boost::scoped_array< char > buffer(
+ std::unique_ptr< char []> buffer(
new char[sizeof (test::codemaker::cppumaker::BigStruct)]);
for (std::size_t i = 0; i < sizeof (test::codemaker::cppumaker::BigStruct);
++i)
diff --git a/cppuhelper/inc/pch/precompiled_cppuhelper.hxx b/cppuhelper/inc/pch/precompiled_cppuhelper.hxx
index 3bcc6fd16e0c..0eae67893273 100644
--- a/cppuhelper/inc/pch/precompiled_cppuhelper.hxx
+++ b/cppuhelper/inc/pch/precompiled_cppuhelper.hxx
@@ -16,7 +16,7 @@
#include <algorithm>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <cassert>
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 4dede24cd3a7..f5d5e9795f16 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -55,7 +55,7 @@
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define SMGR_SINGLETON "/singletons/com.sun.star.lang.theServiceManager"
#define TDMGR_SINGLETON "/singletons/com.sun.star.reflection.theTypeDescriptionManager"
@@ -864,7 +864,7 @@ Reference< XComponentContext > SAL_CALL createComponentContext(
uno::Mapping curr2source(curr_env, source_env);
uno::Mapping source2curr(source_env, curr_env);
- boost::scoped_array<ContextEntry_Init> mapped_entries(new ContextEntry_Init[nEntries]);
+ std::unique_ptr<ContextEntry_Init[]> mapped_entries(new ContextEntry_Init[nEntries]);
for (sal_Int32 nPos = 0; nPos < nEntries; ++ nPos)
{
mapped_entries[nPos].bLateInitService = pEntries[nPos].bLateInitService;
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 9800a191a751..5bd20a442128 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -25,7 +25,7 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/lang/XEventListener.hpp>
@@ -454,7 +454,7 @@ sal_Int32 OMultiTypeInterfaceContainerHelper::removeInterface(
void OMultiTypeInterfaceContainerHelper::disposeAndClear( const EventObject & rEvt )
{
t_type2ptr::size_type nSize = 0;
- boost::scoped_array<OInterfaceContainerHelper *> ppListenerContainers;
+ std::unique_ptr<OInterfaceContainerHelper *[]> ppListenerContainers;
{
::osl::MutexGuard aGuard( rMutex );
t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap);
@@ -628,7 +628,7 @@ sal_Int32 OMultiTypeInterfaceContainerHelperInt32::removeInterface(
void OMultiTypeInterfaceContainerHelperInt32::disposeAndClear( const EventObject & rEvt )
{
t_long2ptr::size_type nSize = 0;
- boost::scoped_array<OInterfaceContainerHelper *> ppListenerContainers;
+ std::unique_ptr<OInterfaceContainerHelper *[]> ppListenerContainers;
{
::osl::MutexGuard aGuard( rMutex );
if (!m_pMap)
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 904bf9ab09a6..199b53b2ccc3 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -26,7 +26,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <sal/log.hxx>
using namespace osl;
@@ -841,8 +841,8 @@ void OPropertySetHelper::setFastPropertyValues(
// get the map table
IPropertyArrayHelper & rPH = getInfoHelper();
- boost::scoped_array<Any> pConvertedValues(new Any[ nHitCount ]);
- boost::scoped_array<Any> pOldValues(new Any[ nHitCount ]);
+ std::unique_ptr<Any[]> pConvertedValues(new Any[ nHitCount ]);
+ std::unique_ptr<Any[]> pOldValues(new Any[ nHitCount ]);
sal_Int32 n = 0;
sal_Int32 i;
@@ -901,7 +901,7 @@ void OPropertySetHelper::setPropertyValues(
throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
{
sal_Int32 nSeqLen = rPropertyNames.getLength();
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ nSeqLen ]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ nSeqLen ]);
// get the map table
IPropertyArrayHelper & rPH = getInfoHelper();
// fill the handle array
@@ -915,7 +915,7 @@ Sequence<Any> OPropertySetHelper::getPropertyValues( const Sequence<OUString>& r
throw(::com::sun::star::uno::RuntimeException, std::exception)
{
sal_Int32 nSeqLen = rPropertyNames.getLength();
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[ nSeqLen ]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[ nSeqLen ]);
Sequence< Any > aValues( nSeqLen );
// get the map table
@@ -957,7 +957,7 @@ void OPropertySetHelper::firePropertiesChangeEvent(
throw(::com::sun::star::uno::RuntimeException, std::exception)
{
sal_Int32 nLen = rPropertyNames.getLength();
- boost::scoped_array<sal_Int32> pHandles(new sal_Int32[nLen]);
+ std::unique_ptr<sal_Int32[]> pHandles(new sal_Int32[nLen]);
IPropertyArrayHelper & rPH = getInfoHelper();
rPH.fillHandles( pHandles.get(), rPropertyNames );
const OUString* pNames = rPropertyNames.getConstArray();
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index d93d107bd21b..6aaf34e6ece5 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -49,7 +49,7 @@
#include <com/sun/star/reflection/XStructTypeDescription.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -318,7 +318,7 @@ inline static typelib_TypeDescription * createCTD(
sal_Int32 nBases = aBases.getLength();
// Exploit the fact that a typelib_TypeDescription for an interface type
// is also the typelib_TypeDescriptionReference for that type:
- boost::scoped_array< typelib_TypeDescription * > aBaseTypes(
+ std::unique_ptr< typelib_TypeDescription * []> aBaseTypes(
new typelib_TypeDescription *[nBases]);
for (sal_Int32 i = 0; i < nBases; ++i) {
typelib_TypeDescription * p = createCTD(access, aBases[i]);
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index ec60619b5231..a830a6511137 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -63,7 +63,7 @@
#include <bitset>
#include <boost/make_shared.hpp>
#include <boost/ref.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index ed933d7e0e97..c6413146ce01 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -43,7 +43,7 @@
#include "svx/flagsdef.hxx"
#include <vector>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::com::sun::star::uno::Reference;
using ::com::sun::star::lang::XServiceInfo;
@@ -765,7 +765,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
if ( nDelCount > 0 )
{
- boost::scoped_array<sal_uInt32> pDelArr(new sal_uInt32[nDelCount]);
+ std::unique_ptr<sal_uInt32[]> pDelArr(new sal_uInt32[nDelCount]);
pNumFmtShell->GetUpdateData( pDelArr.get(), nDelCount );
pNumItem->SetDelFormatArray( pDelArr.get(), nDelCount );
diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx
index ac40b27a5606..89f563bc8446 100644
--- a/dbaccess/inc/pch/precompiled_dbu.hxx
+++ b/dbaccess/inc/pch/precompiled_dbu.hxx
@@ -30,7 +30,7 @@
#include <boost/mem_fn.hpp>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index fb96739d3b41..e88d9da0f2ed 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -56,7 +56,7 @@
#include <svtools/htmlcfg.hxx>
#include <connectivity/formattedcolumnvalue.hxx>
#include <unotools/syslocale.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace dbaui;
using namespace dbtools;
@@ -444,7 +444,7 @@ bool ORTFImportExport::Write()
m_pStream->WriteChar( '{' ).WriteCharPtr( SAL_NEWLINE_STRING );
m_pStream->WriteCharPtr( aTRRH );
- boost::scoped_array<OString> pHorzChar(new OString[nCount]);
+ std::unique_ptr<OString[]> pHorzChar(new OString[nCount]);
for ( sal_Int32 i=1; i <= nCount; ++i )
{
@@ -808,10 +808,10 @@ void OHTMLImportExport::WriteTables()
if(m_xObject.is())
{
- boost::scoped_array<sal_Int32> pFormat(new sal_Int32[aNames.getLength()]);
+ std::unique_ptr<sal_Int32[]> pFormat(new sal_Int32[aNames.getLength()]);
- boost::scoped_array<const char *> pHorJustify(new const char*[aNames.getLength()]);
- boost::scoped_array<sal_Int32> pColWidth(new sal_Int32[aNames.getLength()]);
+ std::unique_ptr<const char *[]> pHorJustify(new const char*[aNames.getLength()]);
+ std::unique_ptr<sal_Int32[]> pColWidth(new sal_Int32[aNames.getLength()]);
sal_Int32 nHeight = 0;
m_xObject->getPropertyValue(PROPERTY_ROW_HEIGHT) >>= nHeight;
diff --git a/desktop/inc/pch/precompiled_deploymentmisc.hxx b/desktop/inc/pch/precompiled_deploymentmisc.hxx
index fdfc13b8bda2..2eae9cde13fb 100644
--- a/desktop/inc/pch/precompiled_deploymentmisc.hxx
+++ b/desktop/inc/pch/precompiled_deploymentmisc.hxx
@@ -16,7 +16,7 @@
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/shared_ptr.hpp>
#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx
index 764e8016efc9..c4c2e7001d86 100644
--- a/desktop/inc/pch/precompiled_sofficeapp.hxx
+++ b/desktop/inc/pch/precompiled_sofficeapp.hxx
@@ -20,7 +20,7 @@
#include "officecfg/System.hxx"
#include <algorithm>
#include <basic/sbstar.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index cb6ad0b98c02..71fcfc3c9921 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -46,7 +46,7 @@
#include <osl/file.hxx>
#include <rtl/process.h>
#include <tools/getprocessworkingdir.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace desktop;
using namespace ::com::sun::star::uno;
@@ -261,7 +261,7 @@ OUString CreateMD5FromString( const OUString& aMsg )
const sal_uInt8* pData = reinterpret_cast<const sal_uInt8*>(aMsg.getStr());
sal_uInt32 nSize = ( aMsg.getLength() * sizeof( sal_Unicode ));
sal_uInt32 nMD5KeyLen = rtl_digest_queryLength( handle );
- boost::scoped_array<sal_uInt8> pMD5KeyBuffer(new sal_uInt8[ nMD5KeyLen ]);
+ std::unique_ptr<sal_uInt8[]> pMD5KeyBuffer(new sal_uInt8[ nMD5KeyLen ]);
rtl_digest_init( handle, pData, nSize );
rtl_digest_update( handle, pData, nSize );
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index bae18596fbbd..807eacb72c2f 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -41,7 +41,7 @@
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp>
#include <com/sun/star/task/OfficeRestartManager.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/shared_ptr.hpp>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
@@ -110,7 +110,7 @@ const OUString OfficePipeId::operator () ()
reinterpret_cast<sal_uInt8 const *>(userPath.getStr());
sal_Size size = (userPath.getLength() * sizeof (sal_Unicode));
sal_uInt32 md5_key_len = rtl_digest_queryLength( digest );
- ::boost::scoped_array<sal_uInt8> md5_buf( new sal_uInt8 [ md5_key_len ] );
+ ::std::unique_ptr<sal_uInt8[]> md5_buf( new sal_uInt8 [ md5_key_len ] );
rtl_digest_init( digest, data, static_cast<sal_uInt32>(size) );
rtl_digest_update( digest, data, static_cast<sal_uInt32>(size) );
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index f8dd6ba274df..8b56c7a1858b 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -28,7 +28,6 @@
#include <sal/types.h>
#include <sal/config.h>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/WrappedTargetException.hpp>
diff --git a/desktop/source/migration/services/jvmfwk.hxx b/desktop/source/migration/services/jvmfwk.hxx
index a248ce5da33a..66e7565f4501 100644
--- a/desktop/source/migration/services/jvmfwk.hxx
+++ b/desktop/source/migration/services/jvmfwk.hxx
@@ -26,7 +26,7 @@
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <sal/types.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/task/XJob.hpp>
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index c2141490cd33..b1330daec5d9 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/deployment/ui/PackageManagerDialog.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <boost/scoped_array.hpp>
#include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
#include <com/sun/star/bridge/BridgeFactory.hpp>
#include <stdio.h>
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index 5831f78fce09..4502080c8e96 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -25,7 +25,7 @@
#include <boost/intrusive_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/ref.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <cassert>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index f2714fb01023..8ce55d8010a6 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -73,7 +73,7 @@ using namespace std;
#include "editeng.hrc"
#include <editeng/eerdll.hxx>
#include <editeng/numitem.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -1329,7 +1329,7 @@ namespace accessibility
// build sorted index array
sal_Int32 nLength = aRes.getLength();
const beans::PropertyValue* pPairs = aRes.getConstArray();
- boost::scoped_array<sal_Int32> pIndices(new sal_Int32[nLength]);
+ std::unique_ptr<sal_Int32[]> pIndices(new sal_Int32[nLength]);
sal_Int32 i = 0;
for( i = 0; i < nLength; i++ )
pIndices[i] = i;
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index ba2276e995c4..99f08d3a36f3 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -63,7 +63,7 @@
#include <sot/formats.hxx>
#include <unicode/ubidi.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <algorithm>
@@ -547,7 +547,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
const EditLine* pLine = pParaPortion->GetLines()[nLine];
if ( pLine )
{
- boost::scoped_array<Rectangle> aRects(new Rectangle[ mpIMEInfos->nLen ]);
+ std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]);
for (sal_Int32 i = 0; i < mpIMEInfos->nLen; ++i)
{
sal_Int32 nInputPos = mpIMEInfos->aPos.GetIndex() + i;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index bca39a4b191d..e4b9f56a7d88 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -72,7 +72,7 @@
#include <comphelper/processfactory.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/string.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -720,7 +720,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
SvxFont aTmpFont( pNode->GetCharAttribs().GetDefFont() );
bool bCalcCharPositions = true;
- boost::scoped_array<long> pBuf(new long[ pNode->Len() ]);
+ std::unique_ptr<long[]> pBuf(new long[ pNode->Len() ]);
bool bSameLineAgain = false; // For TextRanger, if the height changes.
TabInfo aCurrentTab;
@@ -3041,7 +3041,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
sal_Int32 nTextStart = 0;
sal_Int32 nTextLen = 0;
const long* pDXArray = 0;
- boost::scoped_array<long> pTmpDXArray;
+ std::unique_ptr<long[]> pTmpDXArray;
if ( pTextPortion->GetKind() == PortionKind::TEXT )
{
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index b573ea1ebd5e..1deb55f649aa 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -54,7 +54,7 @@
// calculate if it's RTL or not
#include <unicode/ubidi.h>
#include <cassert>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::std::advance;
@@ -1004,7 +1004,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
if(bStrippingPortions)
{
const vcl::Font aSvxFont(pOutDev->GetFont());
- boost::scoped_array<long> pBuf(new long[ pPara->GetText().getLength() ]);
+ std::unique_ptr<long[]> pBuf(new long[ pPara->GetText().getLength() ]);
pOutDev->GetTextArray( pPara->GetText(), pBuf.get() );
if(bSymbol)
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index bc13c0858b79..5e26bd66653a 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -35,7 +35,7 @@
#include <editeng/unonrule.hxx>
#include <editeng/editids.hrc>
#include <editeng/numdef.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::com::sun::star::util::XCloneable;
using ::com::sun::star::ucb::XAnyCompare;
@@ -178,7 +178,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
sal_uInt16 nIdx = 0;
const int nProps = 15;
- boost::scoped_array<beans::PropertyValue> pArray(new beans::PropertyValue[nProps]);
+ std::unique_ptr<beans::PropertyValue[]> pArray(new beans::PropertyValue[nProps]);
Any aVal;
{
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index edafa43b3fa0..3135899d05e9 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -40,7 +40,7 @@
#include <advisesink.hxx>
#include <oleembobj.hxx>
#include <mtnotification.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::comphelper;
@@ -287,7 +287,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium
{
// first the GDI-metafile must be generated
- boost::scoped_array<unsigned char> pBuf;
+ std::unique_ptr<unsigned char[]> pBuf;
sal_uInt32 nBufSize = 0;
OUString aFormat;
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 01f8aa368596..364e25670017 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -25,7 +25,7 @@
#include "osl/doublecheckedlocking.h"
#include "osl/thread.h"
-#include "boost/scoped_array.hpp"
+#include <memory>
#include <com/sun/star/script/FailReason.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/script/XTypeConverter.hpp>
@@ -54,7 +54,6 @@
#include "unoobjw.hxx"
#include <stdio.h>
using namespace std;
-using namespace boost;
using namespace osl;
using namespace cppu;
using namespace com::sun::star::script;
@@ -761,8 +760,8 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
// Then out and in/out parameters have to be treated differently than
// with common COM objects.
sal_Bool bJScriptObject= isJScriptObject();
- scoped_array<CComVariant> sarParams;
- scoped_array<CComVariant> sarParamsRef;
+ std::unique_ptr<CComVariant[]> sarParams;
+ std::unique_ptr<CComVariant[]> sarParamsRef;
CComVariant *pVarParams= NULL;
CComVariant *pVarParamsRef= NULL;
sal_Bool bConvRet= sal_True;
@@ -1298,9 +1297,9 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con
{
DISPPARAMS dispparams = {NULL, NULL, 0, 0};
- scoped_array<DISPID> arDispidNamedArgs;
- scoped_array<CComVariant> ptrArgs;
- scoped_array<CComVariant> ptrRefArgs; // referenced arguments
+ std::unique_ptr<DISPID[]> arDispidNamedArgs;
+ std::unique_ptr<CComVariant[]> ptrArgs;
+ std::unique_ptr<CComVariant[]> ptrRefArgs; // referenced arguments
CComVariant * arArgs = NULL;
CComVariant * arRefArgs = NULL;
@@ -1319,7 +1318,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con
if ( pInvkinds[nStep] == INVOKE_PROPERTYPUT )
nSizeAr = dispparams.cNamedArgs;
- scoped_array<OLECHAR*> saNames(new OLECHAR*[nSizeAr]);
+ std::unique_ptr<OLECHAR*[]> saNames(new OLECHAR*[nSizeAr]);
OLECHAR ** pNames = saNames.get();
pNames[0] = const_cast<OLECHAR*>(reinterpret_cast<LPCOLESTR>(aName.getStr()));
@@ -1687,9 +1686,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
sal_Int32 i = 0;
sal_Int32 nUnoArgs = Params.getLength();
DISPID idPropertyPut = DISPID_PROPERTYPUT;
- scoped_array<DISPID> arDispidNamedArgs;
- scoped_array<CComVariant> ptrArgs;
- scoped_array<CComVariant> ptrRefArgs; // referenced arguments
+ std::unique_ptr<DISPID[]> arDispidNamedArgs;
+ std::unique_ptr<CComVariant[]> ptrArgs;
+ std::unique_ptr<CComVariant[]> ptrRefArgs; // referenced arguments
CComVariant * arArgs = NULL;
CComVariant * arRefArgs = NULL;
sal_Int32 revIndex = 0;
@@ -1762,7 +1761,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
nSizeAr = dispparams.cNamedArgs; //counts the DISID_PROPERTYPUT
}
- scoped_array<OLECHAR*> saNames(new OLECHAR*[nSizeAr]);
+ std::unique_ptr<OLECHAR*[]> saNames(new OLECHAR*[nSizeAr]);
OLECHAR ** arNames = saNames.get();
arNames[0] = const_cast<OLECHAR*>(reinterpret_cast<LPCOLESTR>(sFuncName.getStr()));
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 1984d1003e0a..122acc5137a7 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_EXTENSIONS_SOURCE_OLE_UNOCONVERSIONUTILITIES_HXX
#define INCLUDED_EXTENSIONS_SOURCE_OLE_UNOCONVERSIONUTILITIES_HXX
-#include "boost/scoped_array.hpp"
+#include <memory>
#include "com/sun/star/script/XInvocationAdapterFactory.hpp"
#include "com/sun/star/script/XInvocationAdapterFactory2.hpp"
#include "com/sun/star/script/XTypeConverter.hpp"
@@ -60,7 +60,6 @@ using namespace com::sun::star::bridge;
using namespace com::sun::star::bridge::ModelDependent;
#endif
using namespace com::sun::star::bridge::oleautomation;
-using namespace boost;
namespace ole_adapter
{
extern std::unordered_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap;
@@ -1038,7 +1037,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq,
if( elementTypeDesc.is() )
{
// set up the SAFEARRAY
- scoped_array<SAFEARRAYBOUND> sarSafeArrayBound(new SAFEARRAYBOUND[dims]);
+ std::unique_ptr<SAFEARRAYBOUND[]> sarSafeArrayBound(new SAFEARRAYBOUND[dims]);
SAFEARRAYBOUND* prgsabound= sarSafeArrayBound.get();
for( sal_Int32 i=0; i < dims; i++)
{
@@ -1069,7 +1068,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq,
// In this case arDimSeqIndices would have the size 1. That is the elements are not counted
// but the Sequences that contain those elements.
// The indices ar 0 based
- scoped_array<sal_Int32> sarDimsSeqIndices;
+ std::unique_ptr<sal_Int32[]> sarDimsSeqIndices;
sal_Int32* arDimsSeqIndices= NULL;
if( dimsSeq > 0)
{
@@ -2238,7 +2237,7 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapper(SAFEARRAY* pArray
if (dim > 0)
{
- scoped_array<long> sarIndex(new long[dim]);
+ std::unique_ptr<long[]> sarIndex(new long[dim]);
long * index = sarIndex.get();
for (unsigned int i = 0; i < dim; i++)
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index dfeff975ff07..f36e89b24079 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -43,7 +43,7 @@
#include <plugin/impl.hxx>
#include <vcl/svapp.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#if OSL_DEBUG_LEVEL > 1
#include <osl/thread.h>
@@ -425,7 +425,7 @@ extern "C" {
return NPERR_FILE_NOT_FOUND;
PluginInputStream* pInputStream = static_cast<PluginInputStream*>(pStream);
- boost::scoped_array<sal_Int8> pBytes;
+ std::unique_ptr<sal_Int8[]> pBytes;
int nBytes = 0;
pPlugin->enterPluginCallback();
while( rangeList )
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index f5f54fe4c4be..506f776dca0e 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -61,7 +61,7 @@
#include <stdio.h>
#endif
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
using namespace com::sun::star::io;
@@ -1116,7 +1116,7 @@ void PluginInputStream::writeBytes( const Sequence<sal_Int8>& Buffer ) throw(std
{
nBytes = (nBytes > nPos - m_nWritePos) ? nPos - m_nWritePos : nBytes;
- boost::scoped_array<char> pBuffer(new char[ nBytes ]);
+ std::unique_ptr<char[]> pBuffer(new char[ nBytes ]);
m_aFileStream.Seek( m_nWritePos );
nBytes = m_aFileStream.Read( pBuffer.get(), nBytes );
diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx
index 76045f3724a3..4aecda071328 100644
--- a/extensions/source/plugin/unx/mediator.cxx
+++ b/extensions/source/plugin/unx/mediator.cxx
@@ -32,7 +32,7 @@
#include <plugin/unx/mediator.hxx>
#include <sal/log.hxx>
#include <vcl/svapp.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define MEDIATOR_MAGIC 0xf7a8d2f4
@@ -94,7 +94,7 @@ sal_uLong Mediator::SendMessage( sal_uLong nBytes, const char* pBytes, sal_uLong
if( ! m_bValid )
return nMessageID;
- boost::scoped_array<sal_uLong> pBuffer(new sal_uLong[ (nBytes/sizeof(sal_uLong)) + 4 ]);
+ std::unique_ptr<sal_uLong[]> pBuffer(new sal_uLong[ (nBytes/sizeof(sal_uLong)) + 4 ]);
pBuffer[ 0 ] = nMessageID;
pBuffer[ 1 ] = nBytes;
pBuffer[ 2 ] = MEDIATOR_MAGIC;
@@ -208,7 +208,7 @@ void MediatorListener::run()
{
if( nHeader[ 0 ] == 0 && nHeader[ 1 ] == 0 )
return;
- boost::scoped_array<char> pBuffer(new char[ nHeader[ 1 ] ]);
+ std::unique_ptr<char[]> pBuffer(new char[ nHeader[ 1 ] ]);
if( m_pMediator && (sal_uLong)read( m_pMediator->m_nSocket, pBuffer.get(), nHeader[ 1 ] ) == nHeader[ 1 ] )
{
::osl::MutexGuard aMyGuard( m_aMutex );
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index b3e544abfe97..78f2551b55ec 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -102,7 +102,7 @@
#include <sal/macros.h>
#include <limits>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
@@ -385,7 +385,7 @@ namespace pcr
sal_Int32 nNewCount = aNewStrings.getLength();
// Create new Ids
- boost::scoped_array<OUString> pNewPureIds(new OUString[nNewCount]);
+ std::unique_ptr<OUString[]> pNewPureIds(new OUString[nNewCount]);
OUString aIdStrBase = aDot;
Any aNameAny = m_xComponent->getPropertyValue(PROPERTY_NAME);
OUString sControlName;
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 496542f42fad..67a47a6e9394 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -29,7 +29,7 @@
#include <vcl/builderfactory.hxx>
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
class GridWindow : public vcl::Window
{
@@ -392,8 +392,8 @@ void GridWindow::computeNew()
int i;
// get node arrays
- boost::scoped_array<double> nodex(new double[ nSorted ]);
- boost::scoped_array<double> nodey(new double[ nSorted ]);
+ std::unique_ptr<double[]> nodex(new double[ nSorted ]);
+ std::unique_ptr<double[]> nodey(new double[ nSorted ]);
for( i = 0L; i < nSorted; i++ )
transform( m_aHandles[i].maPos, nodex[ i ], nodey[ i ] );
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 1a7a1060963f..cde72244d725 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -31,7 +31,7 @@
#include <sys/types.h>
#include <sal/config.h>
#include <sal/macros.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
#include <stdarg.h>
@@ -359,7 +359,7 @@ bool Sane::GetOptionValue( int n, OString& rRet )
bool bSuccess = false;
if( ! maHandle || mppOptions[n]->type != SANE_TYPE_STRING )
return false;
- boost::scoped_array<char> pRet(new char[mppOptions[n]->size+1]);
+ std::unique_ptr<char[]> pRet(new char[mppOptions[n]->size+1]);
SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pRet.get() );
if( nStatus == SANE_STATUS_GOOD )
{
@@ -377,7 +377,7 @@ bool Sane::GetOptionValue( int n, double& rRet, int nElement )
mppOptions[n]->type != SANE_TYPE_FIXED ) )
return false;
- boost::scoped_array<SANE_Word> pRet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
+ std::unique_ptr<SANE_Word[]> pRet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pRet.get() );
if( nStatus == SANE_STATUS_GOOD )
{
@@ -396,7 +396,7 @@ bool Sane::GetOptionValue( int n, double* pSet )
mppOptions[n]->type == SANE_TYPE_INT ) )
return false;
- boost::scoped_array<SANE_Word> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
+ std::unique_ptr<SANE_Word[]> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pFixedSet.get() );
if( nStatus != SANE_STATUS_GOOD )
return false;
@@ -443,7 +443,7 @@ bool Sane::SetOptionValue( int n, double fSet, int nElement )
SANE_Status nStatus;
if( mppOptions[n]->size/sizeof(SANE_Word) > 1 )
{
- boost::scoped_array<SANE_Word> pSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
+ std::unique_ptr<SANE_Word[]> pSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pSet.get() );
if( nStatus == SANE_STATUS_GOOD )
{
@@ -470,7 +470,7 @@ bool Sane::SetOptionValue( int n, double* pSet )
if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT &&
mppOptions[n]->type != SANE_TYPE_FIXED ) )
return false;
- boost::scoped_array<SANE_Word> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
+ std::unique_ptr<SANE_Word[]> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]);
for( size_t i = 0; i < mppOptions[n]->size/sizeof(SANE_Word); i++ )
{
if( mppOptions[n]->type == SANE_TYPE_FIXED )
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 57e80bbc829d..9078823b2b94 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -28,7 +28,7 @@
#include <math.h>
#include <sal/macros.h>
#include <rtl/strbuf.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "strings.hrc"
#define PREVIEW_WIDTH 113
@@ -641,8 +641,8 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton )
case SANE_TYPE_INT:
{
int nElements = mrSane.GetOptionElements( mnCurrentOption );
- boost::scoped_array<double> x(new double[ nElements ]);
- boost::scoped_array<double> y(new double[ nElements ]);
+ std::unique_ptr<double[]> x(new double[ nElements ]);
+ std::unique_ptr<double[]> y(new double[ nElements ]);
for( int i = 0; i < nElements; i++ )
x[ i ] = (double)i;
mrSane.GetOptionValue( mnCurrentOption, y.get() );
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;
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 0d272fb1baf2..6e938cdf0d13 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -31,7 +31,7 @@
#include "formula/FormulaCompiler.hxx"
#include <formula/compiler.hrc>
#include <svl/sharedstringpool.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace formula
{
@@ -965,7 +965,7 @@ bool FormulaTokenArray::HasMatrixDoubleRefOps()
{
// RPN-Interpreter simulation.
// Simply assumes a double as return value of each function.
- boost::scoped_array<FormulaToken*> pStack(new FormulaToken* [nRPN]);
+ std::unique_ptr<FormulaToken*[]> pStack(new FormulaToken* [nRPN]);
FormulaToken* pResult = new FormulaDoubleToken( 0.0 );
short sp = 0;
for ( sal_uInt16 j = 0; j < nRPN; j++ )
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 624f8de7dd08..77202b98e11b 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -36,7 +36,7 @@
#include <rtl/bootstrap.hxx>
#include <expat.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
IndexerPreProcessor::IndexerPreProcessor
@@ -978,7 +978,7 @@ bool compileExtensionHelp
aFileStatus.isValid( osl_FileStatus_Mask_FileSize ) )
{
sal_uInt64 ret, len = aFileStatus.getFileSize();
- boost::scoped_array<char> s(new char[ int(len) ]); // the buffer to hold the installed files
+ std::unique_ptr<char[]> s(new char[ int(len) ]); // the buffer to hold the installed files
osl::File aFile( aTreeFileURL );
aFile.open( osl_File_OpenFlag_Read );
aFile.read( s.get(), len, ret );
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 1fb6953c559d..ba56624c2d47 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -25,7 +25,7 @@
#include <data/numberchar.h>
#include <comphelper/string.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -173,8 +173,8 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_
if (nCount > 0)
{
const sal_Unicode *str = inStr.getStr() + startPos;
- boost::scoped_array<sal_Unicode> newStr(new sal_Unicode[nCount * 2 + 1]);
- boost::scoped_array<sal_Unicode> srcStr(new sal_Unicode[nCount + 1]); // for keeping number without comma
+ std::unique_ptr<sal_Unicode[]> newStr(new sal_Unicode[nCount * 2 + 1]);
+ std::unique_ptr<sal_Unicode[]> srcStr(new sal_Unicode[nCount + 1]); // for keeping number without comma
sal_Int32 i, len = 0, count = 0;
if (useOffset)
@@ -307,7 +307,7 @@ static OUString SAL_CALL NativeToAscii(const OUString& inStr,
if (nCount > 0) {
const sal_Unicode *str = inStr.getStr() + startPos;
- boost::scoped_array<sal_Unicode> newStr(new sal_Unicode[nCount * MultiplierExponent_7_CJK[0] + 2]);
+ std::unique_ptr<sal_Unicode[]> newStr(new sal_Unicode[nCount * MultiplierExponent_7_CJK[0] + 2]);
if (useOffset)
offset.realloc( nCount * MultiplierExponent_7_CJK[0] + 1 );
sal_Int32 count = 0, index;
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index b80ec0205ca1..d3fac1edeaf2 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -26,7 +26,7 @@
#include <com/sun/star/linguistic2/ConversionDictionaryList.hpp>
#include <rtl/ustrbuf.hxx>
#include <unicode/uchar.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star::lang;
using namespace com::sun::star::i18n;
@@ -167,7 +167,7 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos
}
} else if (! toHanja && getHanja2HangulIndex && getHanja2HangulData)
{
- boost::scoped_array<sal_Unicode> newStr(new sal_Unicode[nLength+1]);
+ std::unique_ptr<sal_Unicode[]> newStr(new sal_Unicode[nLength+1]);
sal_Int32 count = 0;
while (count < nLength)
{
diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx
index ea60ba017e74..084460502502 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -26,7 +26,7 @@
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryList.hpp>
#include <comphelper/string.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star::lang;
using namespace com::sun::star::i18n;
@@ -165,7 +165,7 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos,
if ((!wordData || !index || !entry) && !xCDL.is()) // no word mapping defined, do char2char conversion.
return getCharConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions);
- boost::scoped_array<sal_Unicode> newStr(new sal_Unicode[nLength * 2 + 1]);
+ std::unique_ptr<sal_Unicode[]> newStr(new sal_Unicode[nLength * 2 + 1]);
sal_Int32 currPos = 0, count = 0;
while (currPos < nLength) {
sal_Int32 len = nLength - currPos;
diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx
index 0a78040c27f9..e48b6a6e6e92 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -31,7 +31,7 @@
#include "breakiteratorImpl.hxx"
#include "transliteration_body.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -154,7 +154,7 @@ Transliteration_body::transliterate(
// which would have to be reallocated most times anyways.
const sal_Int32 nLocalBuf = 2048;
sal_Unicode aLocalBuf[ nLocalBuf * NMAPPINGMAX ], *out = aLocalBuf;
- boost::scoped_array<sal_Unicode> pHeapBuf;
+ std::unique_ptr<sal_Unicode[]> pHeapBuf;
if ( nCount > nLocalBuf ) {
pHeapBuf.reset(new sal_Unicode[ nCount * NMAPPINGMAX ]);
out = pHeapBuf.get();
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index 49686557d4e6..f736732df774 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -25,7 +25,6 @@
#include <svx/svxdllapi.h>
#include <o3tl/typed_flags_set.hxx>
-#include <boost/scoped_array.hpp>
#include <memory>
class SvxProtectItem;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 4094600bb5f3..518a1a955045 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -30,7 +30,7 @@
#include <string.h>
-#include "boost/scoped_array.hpp"
+#include <memory>
#include "config_options.h"
#include "osl/diagnose.h"
#include "rtl/ustring.hxx"
@@ -787,7 +787,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
#endif
}
- boost::scoped_array<JavaVMOption> sarOptions(new JavaVMOption[options.size()]);
+ std::unique_ptr<JavaVMOption[]> sarOptions(new JavaVMOption[options.size()]);
for (std::vector<Option>::size_type i = 0; i != options.size(); ++i) {
SAL_INFO(
"jfw",
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 66bfde5f02e6..a22b7e04a8ce 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -34,7 +34,7 @@
#include "salhelper/linkhelper.hxx"
#include "salhelper/thread.hxx"
#include "boost/noncopyable.hpp"
-#include "boost/scoped_array.hpp"
+#include <memory>
#include "com/sun/star/uno/Sequence.hxx"
#include <utility>
#include <algorithm>
@@ -325,7 +325,7 @@ FileHandleReader::readLine(OString * pLine)
class AsynchReader: public salhelper::Thread
{
size_t m_nDataSize;
- boost::scoped_array<sal_Char> m_arData;
+ std::unique_ptr<sal_Char[]> m_arData;
bool m_bError;
bool m_bDone;
@@ -385,7 +385,7 @@ void AsynchReader::execute()
else if (nRead <= BUFFER_SIZE)
{
//Save the data we have in m_arData into a temporary array
- boost::scoped_array<sal_Char> arTmp( new sal_Char[m_nDataSize]);
+ std::unique_ptr<sal_Char[]> arTmp( new sal_Char[m_nDataSize]);
memcpy(arTmp.get(), m_arData.get(), m_nDataSize);
//Enlarge m_arData to hold the newly read data
m_arData.reset(new sal_Char[(size_t)(m_nDataSize + nRead)]);
@@ -1212,21 +1212,21 @@ void addJavaInfosDirScan(
OUString excMessage = "[Java framework] sunjavaplugin: "
"Error in function addJavaInfosDirScan in util.cxx.";
int cJavaNames= sizeof(g_arJavaNames) / sizeof(char*);
- boost::scoped_array<OUString> sarJavaNames(new OUString[cJavaNames]);
+ std::unique_ptr<OUString[]> sarJavaNames(new OUString[cJavaNames]);
OUString *arNames = sarJavaNames.get();
for(int i= 0; i < cJavaNames; i++)
arNames[i] = OUString(g_arJavaNames[i], strlen(g_arJavaNames[i]),
RTL_TEXTENCODING_UTF8);
int cSearchPaths= sizeof(g_arSearchPaths) / sizeof(char*);
- boost::scoped_array<OUString> sarPathNames(new OUString[cSearchPaths]);
+ std::unique_ptr<OUString[]> sarPathNames(new OUString[cSearchPaths]);
OUString *arPaths = sarPathNames.get();
for(int c = 0; c < cSearchPaths; c++)
arPaths[c] = OUString(g_arSearchPaths[c], strlen(g_arSearchPaths[c]),
RTL_TEXTENCODING_UTF8);
int cCollectDirs = sizeof(g_arCollectDirs) / sizeof(char*);
- boost::scoped_array<OUString> sarCollectDirs(new OUString[cCollectDirs]);
+ std::unique_ptr<OUString[]> sarCollectDirs(new OUString[cCollectDirs]);
OUString *arCollectDirs = sarCollectDirs.get();
for(int d = 0; d < cCollectDirs; d++)
arCollectDirs[d] = OUString(g_arCollectDirs[d], strlen(g_arCollectDirs[d]),
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index eff92ecb2713..f15a045f542d 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "boost/scoped_array.hpp"
+#include <memory>
#include "rtl/ustring.hxx"
#include "rtl/bootstrap.hxx"
#include "osl/thread.hxx"
@@ -305,7 +305,7 @@ javaFrameworkError SAL_CALL jfw_startVM(
// create JavaVMOptions array that is passed to the plugin
// it contains the classpath and all options set in the
//options dialog
- boost::scoped_array<JavaVMOption> sarJOptions(
+ std::unique_ptr<JavaVMOption[]> sarJOptions(
new JavaVMOption[cOptions + 2 + vmParams.size()]);
JavaVMOption * arOpt = sarJOptions.get();
if (! arOpt)
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index fcb622f2728a..a48f25faa977 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -46,7 +46,7 @@
#include "framework.hxx"
#include "fwkutil.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace osl;
@@ -115,7 +115,7 @@ rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData)
static const char EncodingTable[] =
{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
sal_Int32 lenRaw = rawData.getLength();
- boost::scoped_array<char> pBuf(new char[lenRaw * 2]);
+ std::unique_ptr<char[]> pBuf(new char[lenRaw * 2]);
const sal_Int8* arRaw = rawData.getConstArray();
char* pCurBuf = pBuf.get();
@@ -144,7 +144,7 @@ rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data)
{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
sal_Int32 lenData = data.getLength();
sal_Int32 lenBuf = lenData / 2; //always divisable by two
- boost::scoped_array<unsigned char> pBuf(new unsigned char[lenBuf]);
+ std::unique_ptr<unsigned char[]> pBuf(new unsigned char[lenBuf]);
const sal_Int8* pData = data.getConstArray();
for (sal_Int32 i = 0; i < lenBuf; i++)
{
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index b47c7c38dcdd..a0f5b7dbc245 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -33,7 +33,7 @@
#include <iostream>
#include <fstream>
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace std;
@@ -326,7 +326,7 @@ void XRMResExport::WorkOnDesc(
ifstream file (sDescFileName.getStr(), ios::in|ios::binary|ios::ate);
if (file.is_open()) {
int size = static_cast<int>(file.tellg());
- boost::scoped_array<char> memblock(new char [size+1]);
+ std::unique_ptr<char[]> memblock(new char [size+1]);
file.seekg (0, ios::beg);
file.read (memblock.get(), size);
file.close();
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx
index 63eb756b9d20..2499fc58a979 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <cppunit/TestFixture.h>
#include <cppunit/plugin/TestPlugIn.h>
@@ -220,13 +220,13 @@ void TiledRenderingTest::testOverlay( Office* /*pOffice*/ )
nTotalWidthDoc = 8000;
nTotalHeightDoc = 9000;
- scoped_array< unsigned char > pLarge( new unsigned char[ 4*nTotalWidthPix*nTotalHeightPix ] );
+ std::unique_ptr< unsigned char []> pLarge( new unsigned char[ 4*nTotalWidthPix*nTotalHeightPix ] );
pDocument->paintTile( pLarge.get(), nTotalWidthPix, nTotalHeightPix, &nRowStride,
0, 0,
nTotalWidthDoc, nTotalHeightDoc );
dumpRGBABitmap( "large.png", pLarge.get(), nTotalWidthPix, nTotalHeightPix );
- scoped_array< unsigned char > pSmall[4];
+ std::unique_ptr< unsigned char []> pSmall[4];
for ( int i = 0; i < 4; i++ )
{
pSmall[i].reset( new unsigned char[ 4*(nTotalWidthPix/2)*(nTotalHeightPix/2) ] );
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index e8c5afaa69f6..f70e976cebb2 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -52,7 +52,7 @@
#include <list>
#include <set>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace utl;
using namespace osl;
@@ -342,8 +342,8 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
OString encWord(OU2ENC(nTerm,eEnc));
int wordlen = encWord.getLength();
- boost::scoped_array<char> lcword(new char[wordlen + 1]);
- boost::scoped_array<char> hyphens(new char[wordlen + 5]);
+ std::unique_ptr<char[]> lcword(new char[wordlen + 1]);
+ std::unique_ptr<char[]> hyphens(new char[wordlen + 5]);
char ** rep = NULL; // replacements of discretionary hyphenation
int * pos = NULL; // array of [hyphenation point] minus [deletion position]
@@ -623,8 +623,8 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
OString encWord(OU2ENC(nTerm,eEnc));
int wordlen = encWord.getLength();
- boost::scoped_array<char> lcword(new char[wordlen+1]);
- boost::scoped_array<char> hyphens(new char[wordlen+5]);
+ std::unique_ptr<char[]> lcword(new char[wordlen+1]);
+ std::unique_ptr<char[]> hyphens(new char[wordlen+5]);
char ** rep = NULL; // replacements of discretionary hyphenation
int * pos = NULL; // array of [hyphenation point] minus [deletion position]
int * cut = NULL; // length of deletions in original word
diff --git a/lotuswordpro/inc/pch/precompiled_lwpft.hxx b/lotuswordpro/inc/pch/precompiled_lwpft.hxx
index b2ed5cefbbe9..ae9daf31e3d1 100644
--- a/lotuswordpro/inc/pch/precompiled_lwpft.hxx
+++ b/lotuswordpro/inc/pch/precompiled_lwpft.hxx
@@ -18,7 +18,7 @@
#include "string.h"
#include <assert.h>
#include <boost/cast.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <cassert>
#include <com/sun/star/document/XFilter.hpp>
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 7f61cdfb509d..5fb09b8e68e9 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -60,7 +60,7 @@
#include "lwpobjstrm.hxx"
#include "lwptools.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
/**
* @descr ctor() from LwpSvStream
@@ -100,7 +100,7 @@ void LwpObjectStream::Read2Buffer()
if( m_bCompressed )
{
- boost::scoped_array<sal_uInt8> xCompressBuf(new sal_uInt8[m_nBufSize]);
+ std::unique_ptr<sal_uInt8[]> xCompressBuf(new sal_uInt8[m_nBufSize]);
sal_uInt8* pCompressBuffer = xCompressBuf.get();
memset(pCompressBuffer, 0, m_nBufSize);
diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx
index eda2b45fa55e..b038af6878c1 100644
--- a/lotuswordpro/source/filter/lwptblformula.cxx
+++ b/lotuswordpro/source/filter/lwptblformula.cxx
@@ -70,7 +70,7 @@
#include "lwptablelayout.hxx"
#include <osl/thread.h>
#include <rtl/ustrbuf.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
LwpFormulaArg::~LwpFormulaArg()
{
@@ -124,7 +124,7 @@ bool LwpFormulaInfo::ReadText()
m_pObjStrm->QuickReadInt16(); //Disk Size
sal_uInt16 nStrLen = m_pObjStrm->QuickReadInt16();
- boost::scoped_array<char> pBuf(new char[nStrLen+1]);
+ std::unique_ptr<char[]> pBuf(new char[nStrLen+1]);
m_pObjStrm->QuickRead( pBuf.get(), nStrLen );
*(pBuf.get()+nStrLen)='\0';
OUString aText;
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index 1fc7597b7263..7b7d1562f416 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
#include <sal/log.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <unicode/regex.h>
#include <stdio.h>
@@ -149,7 +149,7 @@ std::vector<boost::shared_ptr<osl::File> > binaryGenerated( const char * clFileN
return aGeneratedFiles;
// grab the handles to all of the devices in the context.
- boost::scoped_array<cl_device_id> pArryDevsID(new cl_device_id[numDevices]);
+ std::unique_ptr<cl_device_id[]> pArryDevsID(new cl_device_id[numDevices]);
clStatus = clGetContextInfo( context, CL_CONTEXT_DEVICES,
sizeof( cl_device_id ) * numDevices, pArryDevsID.get(), NULL );
@@ -220,7 +220,7 @@ bool generatBinFromKernelSource( cl_program program, const char * clFileName )
CHECK_OPENCL( clStatus, "clGetProgramInfo" );
/* copy over all of the generated binaries. */
- boost::scoped_array<char*> binaries(new char*[numDevices]);
+ std::unique_ptr<char*[]> binaries(new char*[numDevices]);
for ( size_t i = 0; i < numDevices; i++ )
{
@@ -354,7 +354,7 @@ bool buildProgram(const char* buildOption, GPUEnv* gpuInfo, int idx)
return false;
}
- boost::scoped_array<char> buildLog(new char[length]);
+ std::unique_ptr<char[]> buildLog(new char[length]);
if ( !gpuInfo->mnIsUserCreated )
{
clStatus = clGetProgramBuildInfo( gpuInfo->mpArryPrograms[idx], gpuInfo->mpArryDevsID[0],
@@ -402,8 +402,8 @@ bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuInfo, const char
if (aGeneratedFiles.size() == numDevices)
{
- boost::scoped_array<size_t> length(new size_t[numDevices]);
- boost::scoped_array<unsigned char*> pBinary(new unsigned char*[numDevices]);
+ std::unique_ptr<size_t[]> length(new size_t[numDevices]);
+ std::unique_ptr<unsigned char*[]> pBinary(new unsigned char*[numDevices]);
for(size_t i = 0; i < numDevices; ++i)
{
sal_uInt64 nSize;
@@ -420,7 +420,7 @@ bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuInfo, const char
}
// grab the handles to all of the devices in the context.
- boost::scoped_array<cl_device_id> pArryDevsID(new cl_device_id[numDevices]);
+ std::unique_ptr<cl_device_id[]> pArryDevsID(new cl_device_id[numDevices]);
clStatus = clGetContextInfo( gpuInfo->mpContext, CL_CONTEXT_DEVICES,
sizeof( cl_device_id ) * numDevices, pArryDevsID.get(), NULL );
@@ -471,7 +471,7 @@ void checkDeviceForDoubleSupport(cl_device_id deviceId, bool& bKhrFp64, bool& bA
if( clStatus != CL_SUCCESS )
return;
- boost::scoped_array<char> pExtInfo(new char[aDevExtInfoSize]);
+ std::unique_ptr<char[]> pExtInfo(new char[aDevExtInfoSize]);
clStatus = clGetDeviceInfo( deviceId, CL_DEVICE_EXTENSIONS,
sizeof(char) * aDevExtInfoSize, pExtInfo.get(), NULL);
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index b637fb62cb2d..07c9a2b43e97 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -48,7 +48,7 @@
#include "cppunit/portability/Stream.h"
#include "boost/noncopyable.hpp"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/algorithm/string.hpp>
#include <algorithm>
@@ -112,7 +112,7 @@ class EyecatcherListener
public:
void startTest( CppUnit::Test* test) SAL_OVERRIDE
{
- boost::scoped_array<char> tn(new char [ test->getName().length() + 2 ]);
+ std::unique_ptr<char[]> tn(new char [ test->getName().length() + 2 ]);
strcpy(tn.get(), test->getName().c_str());
int len = strlen(tn.get());
for(int i = 0; i < len; i++)
diff --git a/sal/inc/pch/precompiled_sal.hxx b/sal/inc/pch/precompiled_sal.hxx
index 4e93245df8d7..2454f4b573f5 100644
--- a/sal/inc/pch/precompiled_sal.hxx
+++ b/sal/inc/pch/precompiled_sal.hxx
@@ -54,7 +54,7 @@
#include <algorithm>
#include <assert.h>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <cassert>
#include <config_features.h>
#include <config_folders.h>
diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx
index 9e84e0630166..52ebb81ffb12 100644
--- a/sal/qa/rtl/digest/rtl_digest.cxx
+++ b/sal/qa/rtl/digest/rtl_digest.cxx
@@ -23,7 +23,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <rtl/digest.h>
#include <rtl/ustring.hxx>
@@ -95,7 +95,7 @@ OString getDigest(const OString& aMessage, rtlDigestAlgorithm aAlgorithm)
rtl_digest_update(handle, pData, nSize);
sal_uInt32 nKeyLen = rtl_digest_queryLength(handle);
- boost::scoped_array<sal_uInt8> pKeyBuffer(new sal_uInt8[nKeyLen]);
+ std::unique_ptr<sal_uInt8[]> pKeyBuffer(new sal_uInt8[nKeyLen]);
rtl_digest_get(handle, pKeyBuffer.get(), nKeyLen);
OString aSum = createHex(pKeyBuffer.get(), nKeyLen);
@@ -187,7 +187,7 @@ public:
rtl_digest_update(handle, pData, nSize);
sal_uInt32 nKeyLen = rtl_digest_queryLength( handle );
- boost::scoped_array<sal_uInt8> pKeyBuffer(new sal_uInt8[nKeyLen]);
+ std::unique_ptr<sal_uInt8[]> pKeyBuffer(new sal_uInt8[nKeyLen]);
rtl_digest_get( handle, pKeyBuffer.get(), nKeyLen );
createHex(pKeyBuffer.get(), nKeyLen);
@@ -235,7 +235,7 @@ public:
OString runCheckPBKDF2(OString& sPassword, bool bClearSalt, sal_uInt32 nCount)
{
sal_uInt32 nKeyLen = RTL_DIGEST_LENGTH_HMAC_SHA1;
- boost::scoped_array<sal_uInt8> pKeyBuffer(new sal_uInt8[nKeyLen]);
+ std::unique_ptr<sal_uInt8[]> pKeyBuffer(new sal_uInt8[nKeyLen]);
memset(pKeyBuffer.get(), 0, nKeyLen);
@@ -243,7 +243,7 @@ public:
sal_Int32 nPasswordLen = sPassword.getLength();
sal_uInt32 nSaltDataLen = RTL_DIGEST_LENGTH_HMAC_SHA1;
- boost::scoped_array<sal_uInt8> pSaltData(new sal_uInt8[nSaltDataLen]);
+ std::unique_ptr<sal_uInt8[]> pSaltData(new sal_uInt8[nSaltDataLen]);
memset(pSaltData.get(), 0, nSaltDataLen);
if (!bClearSalt)
@@ -349,7 +349,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("create with rtl_Digest_AlgorithmMD2", aHandle != 0);
sal_uInt32 nKeyLen = rtl_digest_queryLength(aHandle);
- boost::scoped_array<sal_uInt8> pKeyBuffer(new sal_uInt8[nKeyLen]);
+ std::unique_ptr<sal_uInt8[]> pKeyBuffer(new sal_uInt8[nKeyLen]);
aError = rtl_digest_getMD5(aHandle, NULL, 0);
CPPUNIT_ASSERT_MESSAGE("handle 2. parameter wrong", aError == rtl_Digest_E_Argument);
@@ -385,7 +385,7 @@ public:
0x37, 0x00
};
- boost::scoped_array<sal_uInt8> pResult(new sal_uInt8[RTL_DIGEST_LENGTH_SHA1]);
+ std::unique_ptr<sal_uInt8[]> pResult(new sal_uInt8[RTL_DIGEST_LENGTH_SHA1]);
OString sExpected = "06f460d693aecdd3b5cbe8365408eccfc570f32a";
@@ -411,7 +411,7 @@ public:
0x37, 0x00, 0x38, 0x00
};
- boost::scoped_array<sal_uInt8> pResult(new sal_uInt8[RTL_DIGEST_LENGTH_SHA1]);
+ std::unique_ptr<sal_uInt8[]> pResult(new sal_uInt8[RTL_DIGEST_LENGTH_SHA1]);
OString sExpected = "0bfe41eb7fb3edf5f5a6de57192de4ba1b925758";
diff --git a/sal/textenc/tencinfo.cxx b/sal/textenc/tencinfo.cxx
index 192619dbab41..af3898335943 100644
--- a/sal/textenc/tencinfo.cxx
+++ b/sal/textenc/tencinfo.cxx
@@ -26,7 +26,7 @@
#include "gettextencodingdata.hxx"
#include "tenchelp.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
sal_Bool SAL_CALL rtl_isOctetTextEncoding(rtl_TextEncoding nEncoding)
{
@@ -414,7 +414,7 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( const char* pUnixC
const char* pSecondPart;
/* Alloc Buffer and map to lower case */
- boost::scoped_array<char> pBuf(new char[nBufLen]);
+ std::unique_ptr<char[]> pBuf(new char[nBufLen]);
Impl_toAsciiLower( pUnixCharset, pBuf.get() );
/* Search FirstPart */
@@ -742,7 +742,7 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMimeCharset( const char* pMimeC
sal_uInt32 nBufLen = strlen( pMimeCharset )+1;
/* Alloc Buffer and map to lower case and remove non alphanumeric chars */
- boost::scoped_array<char> pBuf(new char[nBufLen]);
+ std::unique_ptr<char[]> pBuf(new char[nBufLen]);
Impl_toAsciiLowerAndRemoveNonAlphanumeric( pMimeCharset, pBuf.get() );
/* Search for equal in the VIP table */
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index feb8efd2c6bb..f1d418a3fa10 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -52,7 +52,7 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::io;
#include "xml2utf.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#define LINEFEED 10
#define SEQUENCESIZE 1024
@@ -493,7 +493,7 @@ inline void SaxWriterHelper::insertIndentation(sal_uInt32 m_nLevel) throw( SAXEx
else
{
sal_uInt32 nCount(m_nLevel + 1);
- boost::scoped_array<sal_Int8> pBytes(new sal_Int8[nCount]);
+ std::unique_ptr<sal_Int8[]> pBytes(new sal_Int8[nCount]);
pBytes[0] = LINEFEED;
memset( &(pBytes[1]), 32, m_nLevel );
AddBytes(mp_Sequence, nCurrentPos, pBytes.get(), nCount);
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index f58023ca8e4a..64e0c1407e39 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star::io;
#include "xml2utf.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace sax_expatwrap {
@@ -395,7 +395,7 @@ Sequence<sal_Unicode> Text2UnicodeConverter::convert( const Sequence<sal_Int8> &
Sequence<sal_Unicode> seqUnicode ( nSourceSize );
const sal_Int8 *pbSource = seqText.getConstArray();
- boost::scoped_array<sal_Int8> pbTempMem;
+ std::unique_ptr<sal_Int8[]> pbTempMem;
if( m_seqSource.getLength() ) {
// put old rest and new byte sequence into one array
@@ -467,7 +467,7 @@ Unicode2TextConverter::~Unicode2TextConverter()
Sequence<sal_Int8> Unicode2TextConverter::convert(const sal_Unicode *puSource , sal_Int32 nSourceSize)
{
- boost::scoped_array<sal_Unicode> puTempMem;
+ std::unique_ptr<sal_Unicode[]> puTempMem;
if( m_seqSource.getLength() ) {
// For surrogates !
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index f0f609dfe85d..7b9f21e5105a 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -42,7 +42,7 @@
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/random.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/sc/inc/pch/precompiled_scfilt.hxx b/sc/inc/pch/precompiled_scfilt.hxx
index 3ad7f6d11144..0e7455ab2c51 100644
--- a/sc/inc/pch/precompiled_scfilt.hxx
+++ b/sc/inc/pch/precompiled_scfilt.hxx
@@ -22,7 +22,7 @@
#include <boost/checked_delete.hpp>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/sc/inc/pch/precompiled_scui.hxx b/sc/inc/pch/precompiled_scui.hxx
index 2ce4c4e3d6b9..fbd83f1a8c0a 100644
--- a/sc/inc/pch/precompiled_scui.hxx
+++ b/sc/inc/pch/precompiled_scui.hxx
@@ -18,7 +18,7 @@
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <cmath>
#include <com/sun/star/frame/Desktop.hpp>
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 6d0c89d8cab5..8b73c472e403 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -45,7 +45,7 @@
#include "tokenarray.hxx"
#include "scmatrix.hxx"
#include <tokenstringcontext.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace formula;
@@ -1090,7 +1090,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
SCTAB nThisCount = GetTableCount();
SCTAB nOtherCount = rOtherDoc.GetTableCount();
- boost::scoped_array<SCTAB> pOtherTabs(new SCTAB[nThisCount]);
+ std::unique_ptr<SCTAB[]> pOtherTabs(new SCTAB[nThisCount]);
SCTAB nThisTab;
// compare tables with identical names
@@ -1175,9 +1175,9 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
aProText.makeStringAndClear(), 3*nThisEndRow ); // 2x FindOrder, 1x here
long nProgressStart = 2*nThisEndRow; // start for here
- boost::scoped_array<SCCOLROW> pTempRows(new SCCOLROW[nThisEndRow+1]);
- boost::scoped_array<SCCOLROW> pOtherRows(new SCCOLROW[nThisEndRow+1]);
- boost::scoped_array<SCCOLROW> pOtherCols(new SCCOLROW[nThisEndCol+1]);
+ std::unique_ptr<SCCOLROW[]> pTempRows(new SCCOLROW[nThisEndRow+1]);
+ std::unique_ptr<SCCOLROW[]> pOtherRows(new SCCOLROW[nThisEndRow+1]);
+ std::unique_ptr<SCCOLROW[]> pOtherCols(new SCCOLROW[nThisEndCol+1]);
// find inserted/deleted columns/rows:
// Two attempts:
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index b636aff4ba2f..1a850c35c8cc 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -78,7 +78,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <vcl/field.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define DET_ARROW_OFFSET 1000
@@ -1250,7 +1250,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
size_t nDelCount = 0;
Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab );
- boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
+ std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
@@ -1307,7 +1307,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark )
aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(), nTab );
- boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
+ std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index d93d1f4d7ed3..d1de9702ed40 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -53,7 +53,7 @@
#include <formula/vectortoken.hxx>
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::std::vector;
@@ -1306,7 +1306,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
if ( !ValidNextPos(nCol, nRow, rMark, bMarked, bUnprotected) )
{
- boost::scoped_array<SCsROW> pNextRows(new SCsROW[MAXCOL+1]);
+ std::unique_ptr<SCsROW[]> pNextRows(new SCsROW[MAXCOL+1]);
SCCOL i;
if ( nMovX > 0 ) // forward
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 5e2d1a469b3f..da2b0ebf19d2 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -71,7 +71,7 @@
#include <vector>
#include <boost/checked_delete.hpp>
#include <boost/scoped_ptr.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <mdds/flat_segment_tree.hpp>
@@ -3020,7 +3020,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, bool bKeepSub)
bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam)
{
bool bValid = true;
- boost::scoped_array<SCCOL> pFields(new SCCOL[nCol2-nCol1+1]);
+ std::unique_ptr<SCCOL[]> pFields(new SCCOL[nCol2-nCol1+1]);
OUString aCellStr;
SCCOL nCol = nCol1;
OSL_ENSURE( rQueryParam.nTab != SCTAB_MAX, "rQueryParam.nTab no value, not bad but no good" );
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index ae647d046add..3e33537d69ff 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -90,7 +90,7 @@ const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
#include <rtl/digest.h>
#include <boost/scoped_ptr.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace formula;
@@ -1539,7 +1539,7 @@ public:
if (dynamic_cast<OpAverage*>(mpCodeGen.get()))
{
/*average need more reduction kernel for count computing*/
- boost::scoped_array<double> pAllBuffer(new double[2 * w]);
+ std::unique_ptr<double[]> pAllBuffer(new double[2 * w]);
double* resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
mpClmem2,
CL_TRUE, CL_MAP_READ, 0,
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index fd8571a600e4..cb64c1aee805 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -52,7 +52,7 @@
#include "funcdesc.hxx"
#include <svl/sharedstring.hxx>
#include "formulaopt.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -490,7 +490,7 @@ void ScUnoAddInCollection::ReadConfiguration()
// get argument info
- boost::scoped_array<ScAddInArgDesc> pVisibleArgs;
+ std::unique_ptr<ScAddInArgDesc[]> pVisibleArgs;
long nVisibleCount = 0;
long nCallerPos = SC_CALLERPOS_NONE;
@@ -897,7 +897,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
aDescription = "###";
}
- boost::scoped_array<ScAddInArgDesc> pVisibleArgs;
+ std::unique_ptr<ScAddInArgDesc[]> pVisibleArgs;
if ( nVisibleCount > 0 )
{
ScAddInArgDesc aDesc;
@@ -1087,7 +1087,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
}
if (bValid)
{
- boost::scoped_array<ScAddInArgDesc> pVisibleArgs;
+ std::unique_ptr<ScAddInArgDesc[]> pVisibleArgs;
if ( nVisibleCount > 0 )
{
ScAddInArgDesc aDesc;
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index f43f3d9e824a..b1015806bd62 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -30,7 +30,7 @@
#include "sc.hrc"
#include <formula/compiler.hrc>
#include "miscuno.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace utl;
using namespace com::sun::star::uno;
@@ -139,7 +139,7 @@ static void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
if ( nCount < USHRT_MAX )
{
const sal_Int32* pArray = aSeq.getConstArray();
- boost::scoped_array<sal_uInt16> pUShorts(new sal_uInt16[nCount]);
+ std::unique_ptr<sal_uInt16[]> pUShorts(new sal_uInt16[nCount]);
for (long i=0; i<nCount; i++)
pUShorts[i] = (sal_uInt16) pArray[i];
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 987194a99af9..9fd30aa20f1e 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -22,7 +22,7 @@
#include "rechead.hxx"
#include <osl/diagnose.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace
{
@@ -180,7 +180,7 @@ void ScChartPositioner::GlueState()
const sal_uInt8 nFree = 2;
const sal_uInt8 nGlue = 3;
sal_uInt8* p;
- boost::scoped_array<sal_uInt8> pA(new sal_uInt8[ nCR ]);
+ std::unique_ptr<sal_uInt8[]> pA(new sal_uInt8[ nCR ]);
memset( pA.get(), 0, nCR * sizeof(sal_uInt8) );
SCCOL nCol, nCol1, nCol2;
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index e7ddd3825c72..99340963ef90 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -29,7 +29,7 @@
#include <math.h>
#include <string.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define SC_CONS_NOTFOUND -1
@@ -499,8 +499,8 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
if (bColByName) ++nStartRow;
if (bRowByName) ++nStartCol;
OUString aTitle;
- boost::scoped_array<SCCOL> pDestCols;
- boost::scoped_array<SCROW> pDestRows;
+ std::unique_ptr<SCCOL[]> pDestCols;
+ std::unique_ptr<SCROW[]> pDestRows;
if (bColByName)
{
pDestCols.reset(new SCCOL[nCol2-nStartCol+1]);
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index d21476f6e562..be0c53cf5c7b 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -70,7 +70,7 @@
#include "cellvalue.hxx"
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::std::vector;
using namespace com::sun::star;
@@ -672,7 +672,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt )
if (nObjCount)
{
size_t nDelCount = 0;
- boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
+ std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
@@ -735,7 +735,7 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
if (nObjCount)
{
size_t nDelCount = 0;
- boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
+ std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
@@ -1240,7 +1240,7 @@ bool ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat )
const size_t nObjCount = pPage->GetObjCount();
if (nObjCount)
{
- boost::scoped_array<SdrObject*> ppObj(new SdrObject*[nObjCount]);
+ std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]);
SdrObjListIter aIter( *pPage, IM_FLAT );
SdrObject* pObject = aIter.Next();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 7158224e9d68..04d777068baf 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -74,7 +74,7 @@
#include <basic/basmgr.hxx>
#include <vbahelper/vbaaccesshelper.hxx>
#include <memory>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
using namespace formula;
@@ -2599,7 +2599,7 @@ void ScInterpreter::ScExternal()
break;
case ParamType::PTR_STRING :
{
- boost::scoped_array<sal_Char> pcErg(new sal_Char[ADDIN_MAXSTRLEN]);
+ std::unique_ptr<sal_Char[]> pcErg(new sal_Char[ADDIN_MAXSTRLEN]);
ppParam[0] = pcErg.get();
pFuncData->Call(ppParam);
OUString aUni( pcErg.get(), strlen(pcErg.get()), osl_getThreadTextEncoding() );
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index cbcd43c4e6d7..ed8981afe66e 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -64,8 +64,6 @@
#include <unotools/charclass.hxx>
#include <drwlayer.hxx>
-#include <boost/scoped_array.hpp>
-
#include "formulacell.hxx"
#include "document.hxx"
#include "patattr.hxx"
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 42ceb6c20fc2..fa649ee3c89d 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -57,7 +57,7 @@
#include <sfx2/app.hxx>
#include <com/sun/star/task/XStatusIndicator.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define DEBUG_XL_ENCRYPTION 0
@@ -286,7 +286,7 @@ void XclExpStream::CopyFromStream(SvStream& rInStrm, sal_uInt64 const nBytes)
if( nBytesLeft > 0 )
{
const sal_Size nMaxBuffer = 4096;
- boost::scoped_array<sal_uInt8> pBuffer(
+ std::unique_ptr<sal_uInt8[]> pBuffer(
new sal_uInt8[ ::std::min<sal_Size>(nBytesLeft, nMaxBuffer) ]);
bool bValid = true;
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index f5efccef8d7e..a5eda2c50d6b 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -26,7 +26,7 @@
#include "xiroot.hxx"
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -725,7 +725,7 @@ sal_Size XclImpStream::CopyToStream( SvStream& rOutStrm, sal_Size nBytes )
if( mbValid && (nBytes > 0) )
{
const sal_Size nMaxBuffer = 4096;
- boost::scoped_array<sal_uInt8> pnBuffer(new sal_uInt8[ ::std::min( nBytes, nMaxBuffer ) ]);
+ std::unique_ptr<sal_uInt8[]> pnBuffer(new sal_uInt8[ ::std::min( nBytes, nMaxBuffer ) ]);
sal_Size nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
@@ -814,7 +814,7 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit )
sal_uInt16 nCharsLeft = nChars;
sal_uInt16 nReadSize;
- boost::scoped_array<sal_Unicode> pcBuffer(new sal_Unicode[ nCharsLeft + 1 ]);
+ std::unique_ptr<sal_Unicode[]> pcBuffer(new sal_Unicode[ nCharsLeft + 1 ]);
while( IsValid() && (nCharsLeft > 0) )
{
@@ -921,7 +921,7 @@ void XclImpStream::IgnoreUniString( sal_uInt16 nChars )
OUString XclImpStream::ReadRawByteString( sal_uInt16 nChars )
{
nChars = GetMaxRawReadSize(nChars);
- boost::scoped_array<sal_Char> pcBuffer(new sal_Char[ nChars + 1 ]);
+ std::unique_ptr<sal_Char[]> pcBuffer(new sal_Char[ nChars + 1 ]);
sal_uInt16 nCharsRead = ReadRawData( pcBuffer.get(), nChars );
pcBuffer[ nCharsRead ] = '\0';
OUString aRet( pcBuffer.get(), strlen(pcBuffer.get()), mrRoot.GetTextEncoding() );
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index ae0ce8280b5f..32d5a1da12c5 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -68,7 +68,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
@@ -686,9 +686,9 @@ void ScHTMLLayoutParser::SetWidths()
// Why actually no pE?
if ( nFirstTableCell < maList.size() )
{
- boost::scoped_array<sal_uInt16> pOffsets(new sal_uInt16[ nColsPerRow+1 ]);
+ std::unique_ptr<sal_uInt16[]> pOffsets(new sal_uInt16[ nColsPerRow+1 ]);
memset( pOffsets.get(), 0, (nColsPerRow+1) * sizeof(sal_uInt16) );
- boost::scoped_array<sal_uInt16> pWidths(new sal_uInt16[ nColsPerRow ]);
+ std::unique_ptr<sal_uInt16[]> pWidths(new sal_uInt16[ nColsPerRow ]);
memset( pWidths.get(), 0, nColsPerRow * sizeof(sal_uInt16) );
pOffsets[0] = nColOffsetStart;
for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i )
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index d08715e5fc13..9ec3a5030d47 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -29,7 +29,7 @@
#include <math.h>
#include <comphelper/string.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
static const sal_Char* GetAddInName( const sal_uInt8 nIndex );
@@ -600,7 +600,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
if( nStrLen )
{
- boost::scoped_array<sal_Char> p(new (::std::nothrow) sal_Char[ nStrLen + 1 ]);
+ std::unique_ptr<sal_Char[]> p(new (::std::nothrow) sal_Char[ nStrLen + 1 ]);
if (p)
{
aIn.Read( p.get(), nStrLen );
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index fba14cd67f73..4cd5df25f558 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -50,7 +50,7 @@
#include <vector>
#include <map>
-#include <boost/scoped_array.hpp>
+#include <memory>
static sal_uInt16 nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * 10 );
@@ -117,7 +117,7 @@ void OP_Label(LotusContext& rContext, SvStream& r, sal_uInt16 n)
n -= (n > 5) ? 5 : n;
- boost::scoped_array<sal_Char> pText(new sal_Char[n + 1]);
+ std::unique_ptr<sal_Char[]> pText(new sal_Char[n + 1]);
r.Read( pText.get(), n );
pText[n] = 0;
@@ -356,7 +356,7 @@ void OP_Label123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
n -= (n > 4) ? 4 : n;
- boost::scoped_array<sal_Char> pText(new sal_Char[n + 1]);
+ std::unique_ptr<sal_Char[]> pText(new sal_Char[n + 1]);
r.Read( pText.get(), n );
pText[ n ] = 0;
@@ -437,7 +437,7 @@ void OP_Note123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
n -= (n > 4) ? 4 : n;
- boost::scoped_array<sal_Char> pText(new sal_Char[n + 1]);
+ std::unique_ptr<sal_Char[]> pText(new sal_Char[n + 1]);
r.Read( pText.get(), n );
pText[ n ] = 0;
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 442a0adaf17c..8195b82efb89 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -33,7 +33,7 @@
#include "formulacell.hxx"
#include "biff.hxx"
#include <tools/stream.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pStyle )
{
@@ -223,7 +223,7 @@ bool ScQProReader::nextRecord()
void ScQProReader::readString( OUString &rString, sal_uInt16 nLength )
{
- boost::scoped_array<sal_Char> pText(new sal_Char[ nLength + 1 ]);
+ std::unique_ptr<sal_Char[]> pText(new sal_Char[ nLength + 1 ]);
nLength = mpStream->Read(pText.get(), nLength);
pText[ nLength ] = 0;
rString = OUString( pText.get(), strlen(pText.get()), mpStream->GetStreamCharSet() );
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index fbdbd01885d9..db6680129eca 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -67,7 +67,7 @@
#include "tabprotection.hxx"
#include "fprogressbar.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -1661,7 +1661,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
nNoteLen = nAvailable;
if (nNoteLen != 0)
{
- boost::scoped_array<sal_Char> xNote(new sal_Char[nNoteLen+1]);
+ std::unique_ptr<sal_Char[]> xNote(new sal_Char[nNoteLen+1]);
nNoteLen = rStream.Read(xNote.get(), nNoteLen);
xNote[nNoteLen] = 0;
OUString aNoteText( SC10TOSTRING(xNote.get()));
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index e36c39f1e963..2b2ba2162a55 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -30,7 +30,7 @@
#include "subtdlg.hxx"
#include "tpsubt.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
// Subtotals group tabpage:
@@ -197,8 +197,8 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
theSubTotalData = static_cast<const ScSubTotalItem*>(pItem)->GetSubTotalData();
}
- boost::scoped_array<ScSubTotalFunc> pFunctions;
- boost::scoped_array<SCCOL> pSubTotals;
+ std::unique_ptr<ScSubTotalFunc[]> pFunctions;
+ std::unique_ptr<SCCOL[]> pSubTotals;
sal_uInt16 nGroup = mpLbGroup->GetSelectEntryPos();
sal_uInt16 nEntryCount = (sal_uInt16)mpLbColumns->GetEntryCount();
sal_uInt16 nCheckCount = mpLbColumns->GetCheckedEntryCount();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index bbb6fd5ab174..ff9f8c2713dd 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -91,7 +91,6 @@
#include <memory>
#include <utility>
#include <basic/basmgr.hxx>
-#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <set>
#include <vector>
@@ -5103,7 +5102,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
rDoc.BeginDrawUndo(); // wegen Hoehenanpassung
}
- boost::scoped_array<ScRangeData*> ppSortArray(new ScRangeData* [ nValidCount ]);
+ std::unique_ptr<ScRangeData*[]> ppSortArray(new ScRangeData* [ nValidCount ]);
sal_uInt16 j = 0;
for (ScRangeName::iterator itr = itrLocalBeg; itr != itrLocalEnd; ++itr)
{
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 09aa41a4b34f..edcb21c7dfa2 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::lang::XMultiServiceFactory;
@@ -285,7 +285,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS
if ( nSourceCount == 0 )
return; // no source styles
- boost::scoped_array<ScStylePair> pStyles(new ScStylePair[ nSourceCount ]);
+ std::unique_ptr<ScStylePair[]> pStyles(new ScStylePair[ nSourceCount ]);
sal_uInt16 nFound = 0;
// first create all new styles
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index dc188dd35d6d..bfe4be618bbc 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -24,7 +24,7 @@
#include "docsh.hxx"
#include "crnrdlg.hxx"
#include <vcl/msgbox.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define ERRORBOX(s) ScopedVclPtr<MessageDialog>::Create(this, s)->Execute()
#define QUERYBOX(m) ScopedVclPtr<QueryBox>::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute()
@@ -375,7 +375,7 @@ void ScColRowNameRangesDlg::UpdateNames()
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataDelim) );
if ( (nCount = xColNameRanges->size()) > 0 )
{
- boost::scoped_array<ScRangePair*> ppSortArray(xColNameRanges->CreateNameSortedArray(
+ std::unique_ptr<ScRangePair*[]> ppSortArray(xColNameRanges->CreateNameSortedArray(
nCount, pDoc ));
for ( j=0; j < nCount; j++ )
{
@@ -418,7 +418,7 @@ void ScColRowNameRangesDlg::UpdateNames()
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataDelim) );
if ( (nCount = xRowNameRanges->size()) > 0 )
{
- boost::scoped_array<ScRangePair*> ppSortArray(xRowNameRanges->CreateNameSortedArray(
+ std::unique_ptr<ScRangePair*[]> ppSortArray(xRowNameRanges->CreateNameSortedArray(
nCount, pDoc ));
for ( j=0; j < nCount; j++ )
{
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 14959c292c80..bc4463e300e5 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -38,7 +38,7 @@
#include "funcdesc.hxx"
#include <com/sun/star/document/LinkUpdateModes.hpp>
#include <com/sun/star/sheet/FunctionArgument.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -501,7 +501,7 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
sal_uInt16 nCount = (sal_uInt16) std::min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX );
const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
- boost::scoped_array<sal_uInt16> pFuncs(nCount ? new sal_uInt16[nCount] : NULL);
+ std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : NULL);
for (sal_uInt16 i=0; i<nCount; i++)
pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen?
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 247c7e19957c..b7922d608ee6 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -130,7 +130,7 @@
#include "condformatuno.hxx"
#include <list>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
using namespace com::sun::star;
@@ -2688,7 +2688,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString
const OUString* pNames = aPropertyNames.getConstArray();
const uno::Any* pValues = aValues.getConstArray();
- boost::scoped_array<const SfxItemPropertySimpleEntry*> pEntryArray(new const SfxItemPropertySimpleEntry*[nCount]);
+ std::unique_ptr<const SfxItemPropertySimpleEntry*[]> pEntryArray(new const SfxItemPropertySimpleEntry*[nCount]);
sal_Int32 i;
for(i = 0; i < nCount; i++)
@@ -2831,7 +2831,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
const OUString* pNames = aPropertyNames.getConstArray();
const uno::Any* pValues = aValues.getConstArray();
- boost::scoped_array<const SfxItemPropertySimpleEntry*> pMapArray(new const SfxItemPropertySimpleEntry*[nCount]);
+ std::unique_ptr<const SfxItemPropertySimpleEntry*[]> pMapArray(new const SfxItemPropertySimpleEntry*[nCount]);
sal_Int32 i;
for(i = 0; i < nCount; i++)
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 0b826ff680c8..0de088ebe4e9 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -59,7 +59,7 @@
#include <svx/dataaccessdescriptor.hxx>
#include <limits>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -896,7 +896,7 @@ void SAL_CALL ScConsolidationDescriptor::setSources(
if (nCount)
{
const table::CellRangeAddress* pAry = aSources.getConstArray();
- boost::scoped_array<ScArea*> pNew(new ScArea*[nCount]);
+ std::unique_ptr<ScArea*[]> pNew(new ScArea*[nCount]);
sal_uInt16 i;
for (i=0; i<nCount; i++)
pNew[i] = new ScArea( pAry[i].Sheet,
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 0873a0a0d715..3429aeec4660 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -75,7 +75,7 @@
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index e6af0be68110..9613ea63befb 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -60,7 +60,7 @@
#include "FactoryIds.hxx"
#include "sdabstdlg.hxx"
#include <boost/shared_ptr.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "slideshow.hxx"
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
@@ -916,7 +916,7 @@ OutlineToImpressFinalizer::OutlineToImpressFinalizer (
// the original stream.
mpStream.reset(new SvMemoryStream());
static const sal_Size nBufferSize = 4096;
- ::boost::scoped_array<sal_Int8> pBuffer (new sal_Int8[nBufferSize]);
+ ::std::unique_ptr<sal_Int8[]> pBuffer (new sal_Int8[nBufferSize]);
sal_uInt64 nReadPosition(0);
bool bLoop (true);
diff --git a/sd/source/ui/inc/assclass.hxx b/sd/source/ui/inc/assclass.hxx
index 6a0709da717a..c7b4cff7d909 100644
--- a/sd/source/ui/inc/assclass.hxx
+++ b/sd/source/ui/inc/assclass.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SD_SOURCE_UI_INC_ASSCLASS_HXX
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "sddllapi.h"
@@ -40,7 +40,7 @@ class SD_DLLPUBLIC Assistent
int mnCurrentPage;
- boost::scoped_array<bool> mpPageStatus;
+ std::unique_ptr<bool[]> mpPageStatus;
public:
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index e6aa81a23a91..37debdb2a14d 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -47,7 +47,7 @@
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index cc65fa6e47d0..5a7d29ff01b5 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -63,7 +63,7 @@
#include <sfx2/msgpool.hxx>
#include <com/sun/star/frame/XModuleManager.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <unordered_map>
@@ -1431,7 +1431,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
}
// Create a Set from the ranges
- boost::scoped_array<sal_uInt16> pRanges(new sal_uInt16[rFound.size() * 2 + 1]);
+ std::unique_ptr<sal_uInt16[]> pRanges(new sal_uInt16[rFound.size() * 2 + 1]);
int j = 0;
sal_uInt16 i = 0;
while ( i < rFound.size() )
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index faf46aa367bd..c7d5cde56e11 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -74,7 +74,7 @@
#include <sfx2/request.hxx>
#include "openflag.hxx"
#include "querytemplate.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
@@ -335,7 +335,7 @@ void SfxObjectShell::LoadStyles
SfxStyleSheetBasePool *pMyPool = GetStyleSheetPool();
DBG_ASSERT(pMyPool, "Dest-DocumentShell ohne StyleSheetPool");
pSourcePool->SetSearchMask(SFX_STYLE_FAMILY_ALL, SFXSTYLEBIT_ALL);
- boost::scoped_array<Styles_Impl> pFound(new Styles_Impl[pSourcePool->Count()]);
+ std::unique_ptr<Styles_Impl[]> pFound(new Styles_Impl[pSourcePool->Count()]);
sal_uInt16 nFound = 0;
SfxStyleSheetBase *pSource = pSourcePool->First();
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 81d37c69bf54..918b5ac9b191 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -53,7 +53,6 @@
#include <boost/bind.hpp>
#include <boost/function.hpp>
-#include <boost/scoped_array.hpp>
using namespace css;
using namespace css::uno;
diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx
index a94980958199..660df09203b2 100644
--- a/slideshow/source/engine/sp_debug.cxx
+++ b/slideshow/source/engine/sp_debug.cxx
@@ -32,7 +32,6 @@
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
#include <boost/assert.hpp>
-#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/detail/lightweight_mutex.hpp>
diff --git a/slideshow/source/engine/transitions/randomwipe.hxx b/slideshow/source/engine/transitions/randomwipe.hxx
index c7100e733694..bafde24edd1b 100644
--- a/slideshow/source/engine/transitions/randomwipe.hxx
+++ b/slideshow/source/engine/transitions/randomwipe.hxx
@@ -22,7 +22,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/point/b2dpoint.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "parametricpolypolygon.hxx"
#include "transitiontools.hxx"
@@ -39,7 +39,7 @@ public:
false: generates a dissolve wipe */ );
virtual ::basegfx::B2DPolyPolygon operator () ( double t ) SAL_OVERRIDE;
private:
- ::boost::scoped_array< ::basegfx::B2DPoint > m_positions;
+ ::std::unique_ptr< ::basegfx::B2DPoint []> m_positions;
sal_Int32 m_nElements;
::basegfx::B2DPolygon m_rect;
};
diff --git a/sot/inc/pch/precompiled_sot.hxx b/sot/inc/pch/precompiled_sot.hxx
index b38649a4b1dc..eb156a53042c 100644
--- a/sot/inc/pch/precompiled_sot.hxx
+++ b/sot/inc/pch/precompiled_sot.hxx
@@ -17,7 +17,7 @@
#include "rtl/string.h"
#include <algorithm>
#include <assert.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 653e10abd259..f48141ad2906 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -30,7 +30,7 @@
#include <osl/diagnose.h>
#include <sal/log.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
//////////////////////////// class StgDirEntry
@@ -356,7 +356,7 @@ bool StgDirEntry::SetSize( sal_Int32 nNewSize )
// if so, we probably need to copy the old data
if( nOldSize )
{
- boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[ nOldSize ]);
+ std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nOldSize ]);
pOld->Pos2Page( 0L );
pStgStrm->Pos2Page( 0L );
if( pOld->Read( pBuf.get(), nOldSize )
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 72a3a29ea6f0..ae5b58c39e8a 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -22,7 +22,7 @@
#include "rtl/string.h"
#include "stgole.hxx"
#include "sot/storinfo.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <sot/exchange.hxx>
#ifdef _MSC_VER
@@ -121,7 +121,7 @@ bool StgCompObjStream::Load()
// higher bits are ignored
sal_uLong nStrLen = ::std::min( nLen1, (sal_Int32)0xFFFE );
- boost::scoped_array<sal_Char> p(new sal_Char[ nStrLen+1 ]);
+ std::unique_ptr<sal_Char[]> p(new sal_Char[ nStrLen+1 ]);
p[nStrLen] = 0;
if( Read( p.get(), nStrLen ) == nStrLen )
{
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index acc0417fefc4..e85e0c67eac9 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -31,7 +31,7 @@
#include "stgstrms.hxx"
#include "stgdir.hxx"
#include "stgio.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
///////////////////////////// class StgFAT
@@ -1148,7 +1148,7 @@ bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
SetSize( n );
if( GetError() == SVSTREAM_OK )
{
- boost::scoped_array<sal_uInt8> p(new sal_uInt8[ 4096 ]);
+ std::unique_ptr<sal_uInt8[]> p(new sal_uInt8[ 4096 ]);
rSrc.Seek( 0L );
Seek( 0L );
while( n )
@@ -1209,7 +1209,7 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
sal_uLong i = nEndOfData;
if( i )
{
- boost::scoped_array<sal_uInt8> p(new sal_uInt8[ 4096 ]);
+ std::unique_ptr<sal_uInt8[]> p(new sal_uInt8[ 4096 ]);
Seek( 0L );
while( i )
{
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index faa6fcd5d787..4421bcdd1ad0 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -36,7 +36,7 @@
#include <unotools/localfilehelper.hxx>
#include <unotools/ucbhelper.hxx>
#include <comphelper/processfactory.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star;
@@ -225,7 +225,7 @@ bool SotStorageStream::CopyTo( SotStorageStream * pDestStm )
Seek( 0L );
pDestStm->SetSize( 0 ); // Ziel-Stream leeren
- boost::scoped_array<sal_uInt8> pMem(new sal_uInt8[ 8192 ]);
+ std::unique_ptr<sal_uInt8[]> pMem(new sal_uInt8[ 8192 ]);
sal_uLong nRead;
while( 0 != (nRead = Read( pMem.get(), 8192 )) )
{
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index bba6d8f058eb..d1ea728ec4d4 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -21,7 +21,7 @@
#include <sot/stg.hxx>
#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
/************** class SvStorageInfo **************************************
*************************************************************************/
@@ -35,7 +35,7 @@ SotClipboardFormatId ReadClipboardFormat( SvStream & rStm )
if( nLen > 0 )
{
// get a string name
- boost::scoped_array<sal_Char> p(new( ::std::nothrow ) sal_Char[ nLen ]);
+ std::unique_ptr<sal_Char[]> p(new( ::std::nothrow ) sal_Char[ nLen ]);
if( p && rStm.Read( p.get(), nLen ) == (sal_uLong) nLen )
{
nFormat = SotExchange::RegisterFormatName(OUString(p.get(), nLen-1, RTL_TEXTENCODING_ASCII_US));
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index a4e1110610a7..47f659f793cd 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -43,7 +43,7 @@
#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <rtl/digest.h>
#include <osl/diagnose.h>
@@ -1399,7 +1399,7 @@ bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
if( pDestStm->SetSize( n ) && n )
{
- boost::scoped_array<sal_uInt8> p(new sal_uInt8[ 4096 ]);
+ std::unique_ptr<sal_uInt8[]> p(new sal_uInt8[ 4096 ]);
Seek( 0L );
pDestStm->Seek( 0L );
while( n )
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index a97c8046995e..8d195e965b88 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -48,7 +48,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
@@ -757,7 +757,7 @@ void Invocation_Impl::getInfoSequenceImpl
sal_Int32 nTotalCount = nNameAccessCount + nPropertyCount + nMethodCount;
// Create and fill array of MemberItems
- boost::scoped_array< MemberItem > pItems( new MemberItem[ nTotalCount ] );
+ std::unique_ptr< MemberItem []> pItems( new MemberItem[ nTotalCount ] );
const OUString* pStrings = aNameAccessNames.getConstArray();
const Property* pProps = aPropertySeq.getConstArray();
const Reference< XIdlMethod >* pMethods = aMethodSeq.getConstArray();
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 8ccd0c108540..cad4d0dbed0f 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -79,7 +79,6 @@
#include <memory>
#include <vector>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
// Properties of the javavm can be put
// as a komma separated list in this
@@ -709,12 +708,12 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
m_xContext);
//Create the JavaVMOption array
const std::vector<OUString> & props = aJvm.getProperties();
- boost::scoped_array<JavaVMOption> sarOptions(
+ std::unique_ptr<JavaVMOption[]> sarOptions(
new JavaVMOption[props.size()]);
JavaVMOption * arOptions = sarOptions.get();
//Create an array that contains the strings which are passed
//into the options
- boost::scoped_array<OString> sarPropStrings(
+ std::unique_ptr<OString[]> sarPropStrings(
new OString[props.size()]);
OString * arPropStrings = sarPropStrings.get();
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index 00ebf9c005e3..e97160fae71a 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -22,7 +22,7 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace
{
@@ -58,7 +58,7 @@ Primitive2DSequence Test::parseSvg(const char* aSource)
SvFileStream aFileStream(aUrl, StreamMode::READ);
sal_Size nSize = aFileStream.remainingSize();
- boost::scoped_array<sal_Int8> pBuffer(new sal_Int8[nSize + 1]);
+ std::unique_ptr<sal_Int8[]> pBuffer(new sal_Int8[nSize + 1]);
aFileStream.Read(pBuffer.get(), nSize);
pBuffer[nSize] = 0;
diff --git a/svl/inc/pch/precompiled_svl.hxx b/svl/inc/pch/precompiled_svl.hxx
index 34b9604332d4..dc1b13df3317 100644
--- a/svl/inc/pch/precompiled_svl.hxx
+++ b/svl/inc/pch/precompiled_svl.hxx
@@ -20,7 +20,7 @@
#include <boost/numeric/conversion/cast.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <cassert>
#include <cmath>
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index 35b2e482a0bb..d454058bc726 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -20,7 +20,7 @@
#include <cassert>
#include <vector>
// compiled via include from itemset.cxx only!
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <osl/diagnose.h>
@@ -400,7 +400,7 @@ SfxUShortRanges& SfxUShortRanges::operator -=
// (size is computed for maximal possibly split-count plus terminating 0)
sal_uInt16 nThisSize = Count_Impl(_pRanges);
sal_uInt16 nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) );
- boost::scoped_array<sal_uInt16> pTarget(new sal_uInt16[ nTargetSize ]);
+ std::unique_ptr<sal_uInt16[]> pTarget(new sal_uInt16[ nTargetSize ]);
memset( pTarget.get(), 0, sizeof(sal_uInt16)*nTargetSize );
memcpy( pTarget.get(), _pRanges, sizeof(sal_uInt16)*nThisSize );
@@ -545,7 +545,7 @@ SfxUShortRanges& SfxUShortRanges::operator /=
// (size is computed for maximal possibly split-count plus terminating 0)
sal_uInt16 nThisSize = Count_Impl(_pRanges);
sal_uInt16 nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) );
- boost::scoped_array<sal_uInt16> pTarget(new sal_uInt16[ nTargetSize ]);
+ std::unique_ptr<sal_uInt16[]> pTarget(new sal_uInt16[ nTargetSize ]);
memset( pTarget.get(), 0, sizeof(sal_uInt16)*nTargetSize );
memcpy( pTarget.get(), _pRanges, sizeof(sal_uInt16)*nThisSize );
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 8abb03b57c94..918330f6fa5a 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -28,7 +28,6 @@
#include <svl/filerec.hxx>
#include "poolio.hxx"
#include <boost/scoped_ptr.hpp>
-#include <boost/scoped_array.hpp>
/**
* Returns the <SfxItemPool> that is being saved.
diff --git a/svl/source/misc/PasswordHelper.cxx b/svl/source/misc/PasswordHelper.cxx
index 43d320dfb8f1..00558f6a1630 100644
--- a/svl/source/misc/PasswordHelper.cxx
+++ b/svl/source/misc/PasswordHelper.cxx
@@ -20,7 +20,7 @@
#include <svl/PasswordHelper.hxx>
#include <rtl/digest.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -38,7 +38,7 @@ void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const
void SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass)
{
sal_Int32 nSize(sPass.getLength());
- boost::scoped_array<sal_Char> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]);
+ std::unique_ptr<sal_Char[]> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]);
for (sal_Int32 i = 0; i < nSize; ++i)
{
@@ -53,7 +53,7 @@ void SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence<sal_Int8>& rPas
void SvPasswordHelper::GetHashPasswordBigEndian(uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass)
{
sal_Int32 nSize(sPass.getLength());
- boost::scoped_array<sal_Char> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]);
+ std::unique_ptr<sal_Char[]> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]);
for (sal_Int32 i = 0; i < nSize; ++i)
{
diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx
index 34843886b2e6..ba111fc0760e 100644
--- a/svtools/inc/pch/precompiled_svt.hxx
+++ b/svtools/inc/pch/precompiled_svt.hxx
@@ -24,7 +24,7 @@
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 2d9aef0e5100..4595b42028e5 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -29,7 +29,6 @@
#include <svtools/svtools.hrc>
#include <svtools/colorcfg.hxx>
-#include <boost/scoped_array.hpp>
#include <vector>
using namespace std;
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 03867e54cd22..e469805d803e 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -33,7 +33,7 @@
#include <vcl/virdev.hxx>
#include "grfcache.hxx"
#include <svtools/grfmgr.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
// - defines -
@@ -334,10 +334,10 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
bool bHMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Horizontal );
bool bVMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Vertical );
- boost::scoped_array<long> pMapIX(new long[ aUnrotatedWidth ]);
- boost::scoped_array<long> pMapFX(new long[ aUnrotatedWidth ]);
- boost::scoped_array<long> pMapIY(new long[ aUnrotatedHeight ]);
- boost::scoped_array<long> pMapFY(new long[ aUnrotatedHeight ]);
+ std::unique_ptr<long[]> pMapIX(new long[ aUnrotatedWidth ]);
+ std::unique_ptr<long[]> pMapFX(new long[ aUnrotatedWidth ]);
+ std::unique_ptr<long[]> pMapIY(new long[ aUnrotatedHeight ]);
+ std::unique_ptr<long[]> pMapFY(new long[ aUnrotatedHeight ]);
double fRevScaleX;
double fRevScaleY;
@@ -431,10 +431,10 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
const double fSinAngle = sin( nRot10 * F_PI1800 );
const long aTargetWidth = nEndX - nStartX + 1L;
const long aTargetHeight = nEndY - nStartY + 1L;
- boost::scoped_array<long> pCosX(new long[ aTargetWidth ]);
- boost::scoped_array<long> pSinX(new long[ aTargetWidth ]);
- boost::scoped_array<long> pCosY(new long[ aTargetHeight ]);
- boost::scoped_array<long> pSinY(new long[ aTargetHeight ]);
+ std::unique_ptr<long[]> pCosX(new long[ aTargetWidth ]);
+ std::unique_ptr<long[]> pSinX(new long[ aTargetWidth ]);
+ std::unique_ptr<long[]> pCosY(new long[ aTargetHeight ]);
+ std::unique_ptr<long[]> pSinY(new long[ aTargetHeight ]);
long nUnRotX, nUnRotY, nSinY, nCosY;
sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1;
bool bRet = false;
@@ -798,8 +798,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
if( !aMsk || ( ( pMAcc = aMsk.AcquireReadAccess() ) != NULL ) )
{
- boost::scoped_array<long> pMapLX(new long[ aUnrotatedWidth ]);
- boost::scoped_array<long> pMapLY(new long[ aUnrotatedHeight ]);
+ std::unique_ptr<long[]> pMapLX(new long[ aUnrotatedWidth ]);
+ std::unique_ptr<long[]> pMapLY(new long[ aUnrotatedHeight ]);
BitmapColor aTestB;
if( pMAcc )
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index db9d7fed3000..fb6c52896c3d 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -64,7 +64,7 @@
#include <basic/sbxvar.hxx>
#include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 48875a7a60a9..88b47f3e4210 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -95,7 +95,7 @@
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/spirit/include/classic_core.hpp>
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index f544be3fc852..83bb285511d8 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -30,7 +30,7 @@
#include <svx/dialogs.hrc>
#include <bmpmask.hrc>
#include <svx/svxids.hrc>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include "helpid.hrc"
@@ -725,12 +725,12 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
long nR;
long nG;
long nB;
- boost::scoped_array<long> pMinR(new long[nCount]);
- boost::scoped_array<long> pMaxR(new long[nCount]);
- boost::scoped_array<long> pMinG(new long[nCount]);
- boost::scoped_array<long> pMaxG(new long[nCount]);
- boost::scoped_array<long> pMinB(new long[nCount]);
- boost::scoped_array<long> pMaxB(new long[nCount]);
+ std::unique_ptr<long[]> pMinR(new long[nCount]);
+ std::unique_ptr<long[]> pMaxR(new long[nCount]);
+ std::unique_ptr<long[]> pMinG(new long[nCount]);
+ std::unique_ptr<long[]> pMaxG(new long[nCount]);
+ std::unique_ptr<long[]> pMinB(new long[nCount]);
+ std::unique_ptr<long[]> pMaxB(new long[nCount]);
sal_uInt16 i;
aMtf.SetPrefSize( rMtf.GetPrefSize() );
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 64bd0bf7af39..124d545b62b0 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -68,7 +68,7 @@
#include <tools/resary.hxx>
#include <svx/svxdlg.hxx>
#include <vcl/toolbox.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
using namespace com::sun::star::i18n;
@@ -1897,7 +1897,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl)
while( *pTmp )
pTmp++;
nCnt = pTmp - pPtr + 7;
- boost::scoped_array<sal_uInt16> pWhRanges(new sal_uInt16[nCnt]);
+ std::unique_ptr<sal_uInt16[]> pWhRanges(new sal_uInt16[nCnt]);
sal_uInt16 nPos = 0;
while( *pPtr )
diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx
index ca4a14e57d7b..40412ed1270f 100644
--- a/svx/source/gallery2/codec.cxx
+++ b/svx/source/gallery2/codec.cxx
@@ -21,7 +21,7 @@
#include <tools/stream.hxx>
#include <tools/zcodec.hxx>
#include "codec.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
// - GalleryCodec -
@@ -98,10 +98,10 @@ void GalleryCodec::Read( SvStream& rStmToRead )
// decompress
if( 1 == nVersion )
{
- boost::scoped_array<sal_uInt8> pCompressedBuffer(new sal_uInt8[ nCompressedSize ]);
+ std::unique_ptr<sal_uInt8[]> pCompressedBuffer(new sal_uInt8[ nCompressedSize ]);
rStm.Read( pCompressedBuffer.get(), nCompressedSize );
sal_uInt8* pInBuf = pCompressedBuffer.get();
- boost::scoped_array<sal_uInt8> pOutBuf(new sal_uInt8[ nUnCompressedSize ]);
+ std::unique_ptr<sal_uInt8[]> pOutBuf(new sal_uInt8[ nUnCompressedSize ]);
sal_uInt8* pTmpBuf = pOutBuf.get();
sal_uInt8* pLast = pOutBuf.get() + nUnCompressedSize - 1;
sal_uIntPtr nIndex = 0UL, nCountByte, nRunByte;
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index b63d7fd87d2d..f1b8ecac0ef1 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -55,7 +55,7 @@
#include "galtheme.hrc"
#include <vcl/lstbox.hxx>
#include "gallerydrawmodel.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star;
@@ -1367,7 +1367,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
if( nRest )
{
- boost::scoped_array<char> pReserve(new char[ nRest ]);
+ std::unique_ptr<char[]> pReserve(new char[ nRest ]);
memset( pReserve.get(), 0, nRest );
rOStm.Write( pReserve.get(), nRest );
}
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index a62dc3d2ee6f..9e39384031eb 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -25,7 +25,7 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <svx/sidebar/PanelLayout.hxx>
#include <svx/xtable.hxx>
#include "LineWidthPopup.hxx"
@@ -137,7 +137,7 @@ private:
Image maIMGNone;
// multi-images
- boost::scoped_array<Image> mpIMGWidthIcon;
+ std::unique_ptr<Image[]> mpIMGWidthIcon;
css::uno::Reference<css::frame::XFrame> mxFrame;
SfxBindings* mpBindings;
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index d0d6e70af045..0a4a9aaf5d42 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -65,7 +65,7 @@
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
@@ -1897,7 +1897,7 @@ void SdrHdlList::TravelFocusHdl(bool bForward)
}
// allocate pointer array for sorted handle list
- boost::scoped_array<ImplHdlAndIndex> pHdlAndIndex(new ImplHdlAndIndex[aList.size()]);
+ std::unique_ptr<ImplHdlAndIndex[]> pHdlAndIndex(new ImplHdlAndIndex[aList.size()]);
// build sorted handle list
for( size_t a = 0; a < aList.size(); ++a)
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 47c3c21d7aa2..e8a1dc35300b 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -86,7 +86,7 @@
#include <svl/itemset.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <libxml/xmlwriter.h>
using namespace ::com::sun::star;
@@ -1559,7 +1559,7 @@ void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
// at first, save the pointers of the affected pages in an array
sal_uInt16 nPageNum=nFirstPageNum;
sal_uInt16 nCopyAnz=((!bReverse)?(nLastPageNum-nFirstPageNum):(nFirstPageNum-nLastPageNum))+1;
- boost::scoped_array<SdrPage*> pPagePtrs(new SdrPage*[nCopyAnz]);
+ std::unique_ptr<SdrPage*[]> pPagePtrs(new SdrPage*[nCopyAnz]);
sal_uInt16 nCopyNum;
for(nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++)
{
@@ -1637,8 +1637,8 @@ void SdrModel::Merge(SdrModel& rSourceModel,
if (nLastPageNum>nMaxSrcPage) nLastPageNum =nMaxSrcPage;
bool bReverse=nLastPageNum<nFirstPageNum;
- boost::scoped_array<sal_uInt16> pMasterMap;
- boost::scoped_array<bool> pMasterNeed;
+ std::unique_ptr<sal_uInt16[]> pMasterMap;
+ std::unique_ptr<bool[]> pMasterNeed;
sal_uInt16 nMasterNeed=0;
if (bMergeMasterPages && nSrcMasterPageAnz!=0) {
// determine which MasterPages from rSrcModel we need
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index e7c1a37ebfc1..fe581c43c7cf 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -31,7 +31,7 @@
#include <vcl/graphicfilter.hxx>
#include <vcl/cvtgrf.hxx>
#include <sax/tools/converter.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#define FORMAT_BMP "bmp"
#define FORMAT_GIF "gif"
@@ -516,8 +516,8 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
const long nStartY1 = aWorkRect.Top() + 1L;
const long nEndY1 = aWorkRect.Bottom();
const long nStartY2 = nEndY1 - 1L;
- boost::scoped_array<Point> pPoints1;
- boost::scoped_array<Point> pPoints2;
+ std::unique_ptr<Point[]> pPoints1;
+ std::unique_ptr<Point[]> pPoints2;
long nX, nY;
sal_uInt16 nPolyPos = 0;
const BitmapColor aBlack = pAcc->GetBestMatchingColor( Color( COL_BLACK ) );
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index 390d4493be1f..1d3b9c1b8c5e 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -19,7 +19,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basic/basmgr.hxx>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertyContainer.hpp>
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 44aa8cc86805..f14d1c9f54f9 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -50,7 +50,7 @@
#include <boost/numeric/conversion/cast.hpp>
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_set.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/tuple/tuple.hpp>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index e03b3e9accd5..473c61c9abd3 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -17,7 +17,7 @@
#include <algorithm>
#include <basic/basmgr.hxx>
#include <basic/sbmod.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/awt/PosSize.hpp>
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index fc01911fd83e..ad472e8ed2a3 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -48,7 +48,7 @@
#include <list>
#include <cctype>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
@@ -1583,8 +1583,8 @@ void CompareData::CheckForChangesInLine( const CompareData& rData,
rStt, rEnd );
int nMinLen = std::min( aCmp.GetLen1(), aCmp.GetLen2() );
- boost::scoped_array<int> pLcsDst(new int[ nMinLen ]);
- boost::scoped_array<int> pLcsSrc(new int[ nMinLen ]);
+ std::unique_ptr<int[]> pLcsDst(new int[ nMinLen ]);
+ std::unique_ptr<int[]> pLcsSrc(new int[ nMinLen ]);
FastCommonSubseq subseq( aCmp );
int nLcsLen = subseq.Find( pLcsDst.get(), pLcsSrc.get() );
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index c52209f895fd..152e35854801 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -35,7 +35,7 @@
#include <vector>
#include <set>
#include <list>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <editeng/boxitem.hxx>
#include <editeng/protitem.hxx>
@@ -1097,10 +1097,10 @@ static void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt,
return;
if( nCnt > nCount )
nCnt = nCount;
- ::boost::scoped_array<size_t> const pSplitIdx(new size_t[nCnt]);
+ ::std::unique_ptr<size_t[]> const pSplitIdx(new size_t[nCnt]);
if( bSameHeight )
{
- ::boost::scoped_array<SwTwips> const pHeights(new SwTwips[nCount]);
+ ::std::unique_ptr<SwTwips[]> const pHeights(new SwTwips[nCount]);
SwTwips nHeight = 0;
for (size_t i = 0; i < nCount; ++i)
{
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 202bad3582af..a43a7f60e38f 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <tools/stream.hxx>
#include <hintids.hxx>
#include <rtl/tencinfo.h>
@@ -293,7 +293,7 @@ sal_uLong SwASCIIParser::ReadChars()
bSwapUnicode = rInput.IsEndianSwap();
}
- boost::scoped_array<sal_Unicode> aWork;
+ std::unique_ptr<sal_Unicode[]> aWork;
sal_uLong nArrOffset = 0;
do {
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 543dd4b8c592..a0a656931fb6 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -18,7 +18,7 @@
*/
#include <iodetect.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <osl/endian.h>
#include <sot/storage.hxx>
#include <svtools/parhtml.hxx>
@@ -268,7 +268,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
if (eCharSet != RTL_TEXTENCODING_DONTKNOW)
{
- boost::scoped_array<sal_Unicode> aWork(new sal_Unicode[rLen+1]);
+ std::unique_ptr<sal_Unicode[]> aWork(new sal_Unicode[rLen+1]);
sal_Unicode *pNewBuf = aWork.get();
sal_Size nNewLen;
if (eCharSet != RTL_TEXTENCODING_UCS2)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 0ed89171b3f1..b351a574f14a 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -21,7 +21,7 @@
#include <functional>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <rtl/tencinfo.h>
@@ -80,7 +80,7 @@ using namespace nsHdFtFlags;
/// For the output of sections.
struct WW8_PdAttrDesc
{
- ::boost::scoped_array<sal_uInt8> m_pData;
+ ::std::unique_ptr<sal_uInt8[]> m_pData;
sal_uInt16 m_nLen;
WW8_FC m_nSepxFcPos;
WW8_PdAttrDesc() : m_nLen(0), m_nSepxFcPos(0xffffffff) /*default: none*/
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 9c4e50a615f0..6d60d9853619 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -94,6 +94,7 @@
#include <svx/hlnkitem.hxx>
#include <svl/whiter.hxx>
#include <o3tl/enumrange.hxx>
+#include <memory>
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
@@ -417,7 +418,7 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
return 0;
sal_uInt16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
- boost::scoped_array<SVBT16> xP(new SVBT16[nCount * 2]);
+ std::unique_ptr<SVBT16[]> xP(new SVBT16[nCount * 2]);
bool bCouldRead = checkRead(*m_pStrm, xP.get(), nCount * 4); // Punkte einlesen
OSL_ENSURE(bCouldRead, "Short PolyLine header");
@@ -1203,7 +1204,7 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
return 0;
sal_uInt16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
- boost::scoped_array<SVBT16> xP(new SVBT16[nCount * 2]);
+ std::unique_ptr<SVBT16[]> xP(new SVBT16[nCount * 2]);
bool bCouldRead = checkRead(*m_pStrm, xP.get(), nCount * 4); // Punkte einlesen
OSL_ENSURE(bCouldRead, "Short CaptionBox header");
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 906825a5a755..ed9e52e9d397 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -44,7 +44,7 @@
#include <vector>
#include <algorithm>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include "swabstdlg.hxx"
@@ -370,7 +370,7 @@ SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl* pColl, bool bSende
std::vector<sal_uInt16> pVec = ::lcl_convertRangesToList(pRanges);
std::vector<sal_uInt16> aVec = ::lcl_convertRangesToList(aRanges);
pVec.insert(pVec.end(), aVec.begin(), aVec.end());
- boost::scoped_array<sal_uInt16> pNewRanges(::lcl_convertListToRanges(pVec));
+ std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(pVec));
pAddrSet = new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(),
pNewRanges.get());
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index cdebce3d2171..fb697963a42c 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -128,7 +128,7 @@
#include <vcl/GraphicNativeMetadata.hxx>
#include <comphelper/lok.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
extern bool g_bFrmDrag;
@@ -3706,7 +3706,7 @@ bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
pDocShell->GetTitle(SFX_TITLE_FULLNAME), eEncoding));
const OString aName(OUStringToOString(sName, eEncoding));
- boost::scoped_array<sal_Char> pMem(new sal_Char[ aAppNm.getLength() + aTopic.getLength() + aName.getLength() + 4 ]);
+ std::unique_ptr<sal_Char[]> pMem(new sal_Char[ aAppNm.getLength() + aTopic.getLength() + aName.getLength() + 4 ]);
sal_Int32 nLen = aAppNm.getLength();
memcpy( pMem.get(), aAppNm.getStr(), nLen );
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 665e815f44b4..22293eb4c5d3 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -151,7 +151,7 @@
#include "../../core/inc/rootfrm.hxx"
#include <unotools/syslocaleoptions.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
using namespace sw::mark;
@@ -5479,7 +5479,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
else
{
- boost::scoped_array<Rectangle> aRects(new Rectangle[ nSize ]);
+ std::unique_ptr<Rectangle[]> aRects(new Rectangle[ nSize ]);
int nRectIndex = 0;
for ( SwIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex )
{
diff --git a/sw/source/uibase/table/swtablerep.cxx b/sw/source/uibase/table/swtablerep.cxx
index 07cbad16a25c..5324aa866464 100644
--- a/sw/source/uibase/table/swtablerep.cxx
+++ b/sw/source/uibase/table/swtablerep.cxx
@@ -51,7 +51,7 @@
#include <cmdid.h>
#include <table.hrc>
#include "swtablerep.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
SwTableRep::SwTableRep( const SwTabCols& rTabCol )
:
@@ -110,7 +110,7 @@ bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
{
// The invisible separators are taken from the old TabCols,
// the visible coming from pTColumns.
- boost::scoped_array<TColumn> pOldTColumns(new TColumn[nAllCols + 1]);
+ std::unique_ptr<TColumn[]> pOldTColumns(new TColumn[nAllCols + 1]);
SwTwips nStart = 0;
for ( sal_uInt16 i = 0; i < nAllCols - 1; ++i )
{
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 40a68ce1f694..b7ad99b0ad81 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -32,7 +32,7 @@
#include <isheadless.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <cstring>
using namespace ::com::sun::star;
@@ -138,7 +138,7 @@ OString loadFile(const OUString& rURL)
CPPUNIT_ASSERT_EQUAL(eStatus, osl::FileBase::E_None);
sal_uInt64 nSize;
aFile.getSize(nSize);
- boost::scoped_array<char> aBytes(new char[nSize]);
+ std::unique_ptr<char[]> aBytes(new char[nSize]);
sal_uInt64 nBytesRead;
aFile.read(aBytes.get(), nSize, nBytesRead);
CPPUNIT_ASSERT_EQUAL(nSize, nBytesRead);
diff --git a/test/source/htmltesttools.cxx b/test/source/htmltesttools.cxx
index 274166bde855..85d65c0c0d71 100644
--- a/test/source/htmltesttools.cxx
+++ b/test/source/htmltesttools.cxx
@@ -9,7 +9,7 @@
#include <test/htmltesttools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
htmlDocPtr HtmlTestTools::parseHtml(utl::TempFile& aTempFile)
{
@@ -27,7 +27,7 @@ htmlDocPtr HtmlTestTools::parseHtml(utl::TempFile& aTempFile)
htmlDocPtr HtmlTestTools::parseHtmlStream(SvStream* pStream)
{
sal_Size nSize = pStream->remainingSize();
- boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[nSize + 1]);
+ std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[nSize + 1]);
pStream->Read(pBuffer.get(), nSize);
pBuffer[nSize] = 0;
return htmlParseDoc(reinterpret_cast<xmlChar*>(pBuffer.get()), NULL);
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 749e87e89cf2..f1b6484f107e 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -9,7 +9,7 @@
#include <test/xmltesttools.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
namespace {
@@ -43,7 +43,7 @@ xmlDocPtr XmlTestTools::parseXml(utl::TempFile& aTempFile)
xmlDocPtr XmlTestTools::parseXmlStream(SvStream* pStream)
{
sal_Size nSize = pStream->remainingSize();
- boost::scoped_array<sal_uInt8> pBuffer(new sal_uInt8[nSize + 1]);
+ std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[nSize + 1]);
pStream->Read(pBuffer.get(), nSize);
pBuffer[nSize] = 0;
return xmlParseDoc(reinterpret_cast<xmlChar*>(pBuffer.get()));
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 97955830281e..b7edf0edd497 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -30,7 +30,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
@@ -1587,7 +1587,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
}
// remember the to be moved entries
- boost::scoped_array<sal_IntPtr> pTmpArr(new sal_IntPtr[ nCount ]);
+ std::unique_ptr<sal_IntPtr[]> pTmpArr(new sal_IntPtr[ nCount ]);
for ( i=0; i<nCount; i++ )
pTmpArr[i] = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( (sal_uInt32)( nPos+i ) ));
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 988103519e9a..68010c9e0e83 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -23,7 +23,7 @@
#include "filstr.hxx"
#include "shell.hxx"
#include "prov.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace fileaccess;
using namespace com::sun::star;
@@ -143,7 +143,7 @@ XStream_impl::readBytes(
if( ! m_nIsOpen )
throw io::IOException( THROW_WHERE );
- boost::scoped_array<sal_Int8> buffer;
+ std::unique_ptr<sal_Int8[]> buffer;
try
{
buffer.reset(new sal_Int8[nBytesToRead]);
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 8ede7cd2b068..6a0cd881b67a 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -38,7 +38,7 @@
#include "ftphandleprovider.hxx"
#include "ftpcfunc.hxx"
#include "ftpcontainer.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ftp;
using namespace com::sun::star::ucb;
@@ -159,7 +159,7 @@ void FTPURL::parse(const OUString& url)
strncmp("ftp://",lower.getStr(),6))
throw malformed_exception();
- boost::scoped_array<char> buffer(new char[1+aIdent.getLength()]);
+ std::unique_ptr<char[]> buffer(new char[1+aIdent.getLength()]);
const char* p2 = aIdent.getStr();
p2 += 6;
diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
index 7ed95627988f..deef57085606 100644
--- a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
@@ -38,7 +38,7 @@
#include "LockSequence.hxx"
#include "LockEntrySequence.hxx"
#include "UCBDeadPropertyValue.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace com::sun::star::uno;
using namespace com::sun::star::ucb;
@@ -250,7 +250,7 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession,
int thePropCount = inPropNames.size();
if ( thePropCount > 0 )
{
- boost::scoped_array<NeonPropName> thePropNames(new NeonPropName[ thePropCount + 1 ]);
+ std::unique_ptr<NeonPropName[]> thePropNames(new NeonPropName[ thePropCount + 1 ]);
int theIndex;
for ( theIndex = 0; theIndex < thePropCount; theIndex ++ )
diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx
index 51baa036a2fc..c61df46360ff 100644
--- a/unoxml/source/dom/elementlist.hxx
+++ b/unoxml/source/dom/elementlist.hxx
@@ -22,7 +22,7 @@
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <libxml/tree.h>
@@ -57,8 +57,8 @@ namespace DOM
::rtl::Reference<CElement> const m_pElement;
::osl::Mutex & m_rMutex;
- ::boost::scoped_array<xmlChar> const m_pName;
- ::boost::scoped_array<xmlChar> const m_pURI;
+ ::std::unique_ptr<xmlChar[]> const m_pName;
+ ::std::unique_ptr<xmlChar[]> const m_pURI;
bool m_bRebuild;
nodevector_t m_nodevector;
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 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;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index b8e266cb9ef3..9f08021e7308 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>
@@ -2660,7 +2660,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 778961faa1bb..bd385db1ce4a 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();
diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx
index 9d16f44a58e9..685fa2b448ed 100644
--- a/xmloff/inc/pch/precompiled_xo.hxx
+++ b/xmloff/inc/pch/precompiled_xo.hxx
@@ -36,7 +36,7 @@
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 89759dd10378..88c868ca819b 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -20,7 +20,7 @@
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -522,7 +522,7 @@ struct XMLTextImportHelper::Impl
- data structure contains more than one candidate for each list level
of the outline style (#i69629#)
*/
- ::boost::scoped_array< ::std::vector< OUString > >
+ ::std::unique_ptr< ::std::vector< OUString > []>
m_xOutlineStylesCandidates;
// start range, xml:id, RDFa stuff
diff --git a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
index 092c5c12b211..21050aec8a39 100644
--- a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
+++ b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
@@ -16,7 +16,7 @@
#include "libxml/parserInternals.h"
#include <boost/noncopyable.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 8e7498a47cab..a61ebd6e17eb 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -49,7 +49,7 @@
#include "digestcontext.hxx"
#include "ciphercontext.hxx"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <nspr.h>
#include <cert.h>
@@ -265,7 +265,7 @@ bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContex
int errlen = PR_GetErrorTextLength();
if(errlen > 0)
{
- boost::scoped_array<char> const error(new char[errlen + 1]);
+ std::unique_ptr<char[]> const error(new char[errlen + 1]);
PR_GetErrorText(error.get());
SAL_INFO("xmlsecurity.xmlsec", error.get());
}
@@ -282,7 +282,7 @@ bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContex
int errlen = PR_GetErrorTextLength();
if(errlen > 0)
{
- boost::scoped_array<char> const error(new char[errlen + 1]);
+ std::unique_ptr<char[]> const error(new char[errlen + 1]);
PR_GetErrorText(error.get());
SAL_INFO("xmlsecurity.xmlsec", error.get());
}
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 7b93d34dde0d..f0dfc81d93c3 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -38,7 +38,7 @@
#include <sal/log.hxx>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <osl/thread.h>
#include "secerror.hxx"
@@ -923,7 +923,7 @@ xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Except
* crypto engine
*/
int cSlots = m_Slots.size();
- boost::scoped_array<PK11SlotInfo*> sarSlots(new PK11SlotInfo*[cSlots]);
+ std::unique_ptr<PK11SlotInfo*[]> sarSlots(new PK11SlotInfo*[cSlots]);
PK11SlotInfo** slots = sarSlots.get();
int count = 0;
for (CIT_SLOTS islots = m_Slots.begin();islots != m_Slots.end(); islots++, count++)