[Libreoffice-commits] core.git: avmedia/source basic/inc basic/source canvas/source chart2/inc chart2/source comphelper/inc comphelper/source connectivity/inc connectivity/source cppcanvas/inc cppcanvas/source cppuhelper/inc cppuhelper/source cppu/qa cui/inc cui/source dbaccess/inc dbaccess/source desktop/inc desktop/source editeng/inc editeng/source embeddedobj/source extensions/source filter/source formula/source helpcompiler/source i18npool/source include/svx jvmfwk/plugins jvmfwk/source l10ntools/source libreofficekit/qa lingucomponent/source lotuswordpro/inc lotuswordpro/source opencl/source sal/cppunittester sal/inc sal/qa sal/textenc sax/source sc/inc sc/source sd/inc sd/source sfx2/inc sfx2/source slideshow/source sot/inc sot/source stoc/source svgio/qa svl/inc svl/source svtools/inc svtools/source svx/inc svx/source sw/inc sw/source test/source ucb/source unoxml/source vcl/generic vcl/inc vcl/source vcl/unx xmloff/inc xmloff/source xmlsecurity/inc xmlsecurity/source
Takeshi Abe
tabe at fixedpoint.jp
Wed Jun 17 08:51:14 PDT 2015
avmedia/source/opengl/oglframegrabber.cxx | 4 -
basic/inc/pch/precompiled_sb.hxx | 2
basic/source/classes/image.cxx | 6 -
basic/source/classes/sb.cxx | 4 -
basic/source/classes/sbunoobj.cxx | 8 +-
basic/source/runtime/methods.cxx | 4 -
basic/source/runtime/methods1.cxx | 4 -
basic/source/runtime/runtime.cxx | 14 ++--
basic/source/sbx/sbxdec.cxx | 4 -
canvas/source/cairo/cairo_textlayout.cxx | 4 -
canvas/source/directx/dx_canvasbitmap.cxx | 4 -
canvas/source/directx/dx_impltools.cxx | 2
canvas/source/directx/dx_textlayout_drawhelper.cxx | 4 -
canvas/source/directx/dx_vcltools.cxx | 2
canvas/source/opengl/ogl_canvashelper.cxx | 4 -
canvas/source/vcl/textlayout.cxx | 8 +-
chart2/inc/pch/precompiled_chartcore.hxx | 2
chart2/source/tools/OPropertySet.cxx | 6 -
chart2/source/view/charttypes/Splines.cxx | 12 +--
chart2/source/view/main/GL3DRenderer.cxx | 4 -
comphelper/inc/pch/precompiled_comphelper.hxx | 2
comphelper/source/property/propagg.cxx | 14 ++--
comphelper/source/property/propertysethelper.cxx | 8 +-
connectivity/inc/pch/precompiled_dbase.hxx | 2
connectivity/source/drivers/dbase/dindexnode.cxx | 4 -
cppcanvas/inc/pch/precompiled_cppcanvas.hxx | 2
cppcanvas/source/mtfrenderer/implrenderer.cxx | 4 -
cppcanvas/source/mtfrenderer/textaction.cxx | 4 -
cppu/qa/cppumaker/test_cppumaker.cxx | 4 -
cppuhelper/inc/pch/precompiled_cppuhelper.hxx | 2
cppuhelper/source/component_context.cxx | 4 -
cppuhelper/source/interfacecontainer.cxx | 6 -
cppuhelper/source/propshlp.cxx | 12 +--
cppuhelper/source/tdmgr.cxx | 4 -
cui/inc/pch/precompiled_cui.hxx | 2
cui/source/tabpages/numfmt.cxx | 4 -
dbaccess/inc/pch/precompiled_dbu.hxx | 2
dbaccess/source/ui/misc/TokenWriter.cxx | 10 +--
desktop/inc/pch/precompiled_deploymentmisc.hxx | 2
desktop/inc/pch/precompiled_sofficeapp.hxx | 2
desktop/source/app/officeipcthread.cxx | 4 -
desktop/source/deployment/misc/dp_misc.cxx | 4 -
desktop/source/migration/services/jvmfwk.cxx | 1
desktop/source/migration/services/jvmfwk.hxx | 2
desktop/source/pkgchk/unopkg/unopkg_app.cxx | 1
editeng/inc/pch/precompiled_editeng.hxx | 2
editeng/source/accessibility/AccessibleEditableTextPara.cxx | 4 -
editeng/source/editeng/impedit2.cxx | 4 -
editeng/source/editeng/impedit3.cxx | 6 -
editeng/source/outliner/outliner.cxx | 4 -
editeng/source/uno/unonrule.cxx | 4 -
embeddedobj/source/msole/olecomponent.cxx | 4 -
extensions/source/ole/oleobjw.cxx | 23 +++----
extensions/source/ole/unoconversionutilities.hxx | 9 +-
extensions/source/plugin/base/nfuncs.cxx | 4 -
extensions/source/plugin/base/xplugin.cxx | 4 -
extensions/source/plugin/unx/mediator.cxx | 6 -
extensions/source/propctrlr/formcomponenthandler.cxx | 4 -
extensions/source/scanner/grid.cxx | 6 -
extensions/source/scanner/sane.cxx | 12 +--
extensions/source/scanner/sanedlg.cxx | 6 -
filter/source/flash/swfwriter1.cxx | 8 +-
filter/source/graphicfilter/egif/egif.cxx | 4 -
filter/source/graphicfilter/eos2met/eos2met.cxx | 6 -
filter/source/graphicfilter/epict/epict.cxx | 6 -
filter/source/graphicfilter/icgm/bundles.cxx | 4 -
filter/source/graphicfilter/icgm/class4.cxx | 4 -
filter/source/graphicfilter/ieps/ieps.cxx | 6 -
filter/source/graphicfilter/ios2met/ios2met.cxx | 8 +-
filter/source/graphicfilter/ipict/ipict.cxx | 4 -
filter/source/graphicfilter/ipsd/ipsd.cxx | 4 -
filter/source/msfilter/escherex.cxx | 6 -
filter/source/msfilter/msdffimp.cxx | 7 --
filter/source/msfilter/svdfppt.cxx | 18 ++---
formula/source/core/api/token.cxx | 4 -
helpcompiler/source/HelpLinker.cxx | 4 -
i18npool/source/nativenumber/nativenumbersupplier.cxx | 8 +-
i18npool/source/textconversion/textconversion_ko.cxx | 4 -
i18npool/source/textconversion/textconversion_zh.cxx | 4 -
i18npool/source/transliteration/transliteration_body.cxx | 4 -
include/svx/ruler.hxx | 1
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 4 -
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 12 +--
jvmfwk/source/framework.cxx | 4 -
jvmfwk/source/fwkutil.cxx | 6 -
l10ntools/source/xrmmerge.cxx | 4 -
libreofficekit/qa/unit/tiledrendering.cxx | 6 -
lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 10 +--
lotuswordpro/inc/pch/precompiled_lwpft.hxx | 2
lotuswordpro/source/filter/lwpobjstrm.cxx | 4 -
lotuswordpro/source/filter/lwptblformula.cxx | 4 -
opencl/source/openclwrapper.cxx | 16 ++---
sal/cppunittester/cppunittester.cxx | 4 -
sal/inc/pch/precompiled_sal.hxx | 2
sal/qa/rtl/digest/rtl_digest.cxx | 16 ++---
sal/textenc/tencinfo.cxx | 6 -
sax/source/expatwrap/saxwriter.cxx | 4 -
sax/source/expatwrap/xml2utf.cxx | 6 -
sc/inc/pch/precompiled_sc.hxx | 2
sc/inc/pch/precompiled_scfilt.hxx | 2
sc/inc/pch/precompiled_scui.hxx | 2
sc/source/core/data/documen4.cxx | 10 +--
sc/source/core/data/drwlayer.cxx | 6 -
sc/source/core/data/table1.cxx | 4 -
sc/source/core/data/table3.cxx | 4 -
sc/source/core/opencl/formulagroupcl.cxx | 4 -
sc/source/core/tool/addincol.cxx | 8 +-
sc/source/core/tool/appoptio.cxx | 4 -
sc/source/core/tool/chartpos.cxx | 4 -
sc/source/core/tool/consoli.cxx | 6 -
sc/source/core/tool/detfunc.cxx | 8 +-
sc/source/core/tool/interpr4.cxx | 4 -
sc/source/filter/excel/excimp8.cxx | 2
sc/source/filter/excel/xestream.cxx | 4 -
sc/source/filter/excel/xistream.cxx | 8 +-
sc/source/filter/html/htmlpars.cxx | 6 -
sc/source/filter/lotus/lotform.cxx | 4 -
sc/source/filter/lotus/op.cxx | 8 +-
sc/source/filter/qpro/qpro.cxx | 4 -
sc/source/filter/starcalc/scflt.cxx | 4 -
sc/source/ui/dbgui/tpsubt.cxx | 6 -
sc/source/ui/docshell/docfunc.cxx | 3
sc/source/ui/docshell/docsh6.cxx | 4 -
sc/source/ui/miscdlgs/crnrdlg.cxx | 6 -
sc/source/ui/unoobj/appluno.cxx | 4 -
sc/source/ui/unoobj/cellsuno.cxx | 6 -
sc/source/ui/unoobj/datauno.cxx | 4 -
sd/inc/pch/precompiled_sd.hxx | 2
sd/source/ui/app/sdmod1.cxx | 4 -
sd/source/ui/inc/assclass.hxx | 4 -
sfx2/inc/pch/precompiled_sfx.hxx | 2
sfx2/source/control/bindings.cxx | 4 -
sfx2/source/doc/objcont.cxx | 4 -
sfx2/source/sidebar/SidebarController.cxx | 1
slideshow/source/engine/sp_debug.cxx | 1
slideshow/source/engine/transitions/randomwipe.hxx | 4 -
sot/inc/pch/precompiled_sot.hxx | 2
sot/source/sdstor/stgdir.cxx | 4 -
sot/source/sdstor/stgole.cxx | 4 -
sot/source/sdstor/stgstrms.cxx | 6 -
sot/source/sdstor/storage.cxx | 4 -
sot/source/sdstor/storinfo.cxx | 4 -
sot/source/sdstor/ucbstorage.cxx | 4 -
stoc/source/invocation/invocation.cxx | 4 -
stoc/source/javavm/javavm.cxx | 5 -
svgio/qa/cppunit/SvgImportTest.cxx | 4 -
svl/inc/pch/precompiled_svl.hxx | 2
svl/source/items/nranges.cxx | 6 -
svl/source/items/poolio.cxx | 1
svl/source/misc/PasswordHelper.cxx | 6 -
svtools/inc/pch/precompiled_svt.hxx | 2
svtools/source/control/ruler.cxx | 1
svtools/source/graphic/grfmgr2.cxx | 22 +++---
svx/inc/pch/precompiled_svx.hxx | 2
svx/inc/pch/precompiled_svxcore.hxx | 2
svx/source/dialog/_bmpmask.cxx | 14 ++--
svx/source/dialog/srchdlg.cxx | 4 -
svx/source/gallery2/codec.cxx | 6 -
svx/source/gallery2/galtheme.cxx | 4 -
svx/source/sidebar/line/LinePropertyPanel.hxx | 4 -
svx/source/svdraw/svdhdl.cxx | 4 -
svx/source/svdraw/svdmodel.cxx | 8 +-
svx/source/xoutdev/_xoutbmp.cxx | 6 -
sw/inc/pch/precompiled_msword.hxx | 2
sw/inc/pch/precompiled_sw.hxx | 2
sw/inc/pch/precompiled_swui.hxx | 2
sw/source/core/doc/doccomp.cxx | 6 -
sw/source/core/table/swnewtable.cxx | 6 -
sw/source/filter/ascii/parasc.cxx | 4 -
sw/source/filter/basflt/iodetect.cxx | 4 -
sw/source/filter/ww8/wrtw8sty.cxx | 4 -
sw/source/filter/ww8/ww8graf.cxx | 5 -
sw/source/ui/envelp/envfmt.cxx | 4 -
sw/source/uibase/dochdl/swdtflvr.cxx | 4 -
sw/source/uibase/docvw/edtwin.cxx | 4 -
sw/source/uibase/table/swtablerep.cxx | 4 -
test/source/bootstrapfixture.cxx | 4 -
test/source/htmltesttools.cxx | 4 -
test/source/xmltesttools.cxx | 4 -
ucb/source/sorter/sortresult.cxx | 4 -
ucb/source/ucp/file/filstr.cxx | 4 -
ucb/source/ucp/ftp/ftpurl.cxx | 4 -
ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx | 4 -
unoxml/source/dom/elementlist.hxx | 6 -
vcl/generic/fontmanager/helper.cxx | 6 -
vcl/inc/pch/precompiled_vcl.hxx | 2
vcl/source/app/dbggui.cxx | 4 -
vcl/source/bitmap/bitmapscalesuper.cxx | 10 +--
vcl/source/control/edit.cxx | 12 +--
vcl/source/filter/GraphicNativeMetadata.cxx | 4 -
vcl/source/filter/graphicfilter.cxx | 3
vcl/source/filter/igif/gifread.cxx | 6 -
vcl/source/filter/jpeg/Exif.cxx | 4 -
vcl/source/filter/jpeg/JpegReader.cxx | 4 -
vcl/source/filter/jpeg/jpegc.cxx | 4 -
vcl/source/filter/sgfbram.cxx | 4 -
vcl/source/filter/sgvspln.cxx | 12 +--
vcl/source/filter/sgvtext.cxx | 5 -
vcl/source/filter/wmf/emfwr.cxx | 4 -
vcl/source/filter/wmf/enhwmf.cxx | 12 +--
vcl/source/filter/wmf/winwmf.cxx | 18 ++---
vcl/source/filter/wmf/wmfwr.cxx | 6 -
vcl/source/gdi/bitmap.cxx | 30 ++++-----
vcl/source/gdi/bitmap3.cxx | 32 +++++-----
vcl/source/gdi/cvtsvm.cxx | 6 -
vcl/source/gdi/dibtools.cxx | 14 ++--
vcl/source/gdi/image.cxx | 2
vcl/source/gdi/impimage.cxx | 8 +-
vcl/source/gdi/impvect.cxx | 5 -
vcl/source/gdi/jobset.cxx | 4 -
vcl/source/gdi/pdfwriter_impl.cxx | 14 ++--
vcl/source/gdi/pngwrite.cxx | 4 -
vcl/source/gdi/salgdilayout.cxx | 11 +--
vcl/source/gdi/sallayout.cxx | 4 -
vcl/source/gdi/salmisc.cxx | 4 -
vcl/source/gdi/textlayout.cxx | 4 -
vcl/source/opengl/OpenGLContext.cxx | 1
vcl/source/opengl/OpenGLHelper.cxx | 6 -
vcl/source/outdev/bitmap.cxx | 14 ++--
vcl/source/outdev/hatch.cxx | 4 -
vcl/source/outdev/pixel.cxx | 4 -
vcl/source/outdev/polygon.cxx | 6 -
vcl/source/outdev/transparent.cxx | 6 -
vcl/unx/generic/app/saldisp.cxx | 4 -
vcl/unx/generic/printer/jobdata.cxx | 4 -
xmloff/inc/pch/precompiled_xo.hxx | 2
xmloff/source/text/txtimp.cxx | 4 -
xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx | 2
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 6 -
xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 4 -
230 files changed, 613 insertions(+), 637 deletions(-)
New commits:
commit 09800956191c90035872cbc18cd304fee043c710
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Mon Jun 15 17:58:15 2015 +0900
Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/avmedia/source/opengl/oglframegrabber.cxx b/avmedia/source/opengl/oglframegrabber.cxx
index 33ee878..551c033 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 d797b0b..089523c 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 d99259b..0fa3d13 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 e449e82..e1730d7 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 5726137..9cd21d0 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 48e9d87..73cd355 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 9740bc1..55c80d6 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 4ccf505..e71fe13 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 267bee9..ae07e21 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 6f53264..f2f552a 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 9526615..df06327 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 3f38dc3..7830d00 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 c46a49f..e02c765 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 7270080..92b1a2d 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 501e7f8..15bac80 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 9e4c712..d550541 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 7527cd7..4999b67 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 c54537f..939741c 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 660c8ce..c57acb6 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 ee3dbb5..4d10e4f 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 6349721..d0de0e3 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 9d4930c..815a095 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 35b574f..de7df6a 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 4c40a52..a5b82b4 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 5e5c4dd..9f4f842 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 914bfd2..ad6cf5b 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 56ed3d9..8574e88 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 ec0b131..8d09fed 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 f6bff00..691e2a8 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 3bcc6fd..0eae678 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 4dede24..f5d5e97 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 9800a19..5bd20a4 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 904bf9a..199b53b 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 d93d107..6aaf34e 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 ec60619..a830a65 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 ed933d7..c641314 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 ac40b27..89f563b 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 fb96739..e88d9da 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 fdfc13b..2eae9cd 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 764e801..c4c2e70 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 cb6ad0b..71fcfc3 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 bae1859..807eacb 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 f8dd6ba2..8b56c7a 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 a248ce5d..66e7565 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 c214149..b1330da 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 5831f78..4502080 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 f2714fb..8ce55d8 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 ba2276e..99f08d3 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 bca39a4b..e4b9f56 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 b573ea1..1deb55f 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 bc13c08..5e26bd6 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 edafa43..3135899 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 01f8aa3..364e256 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 1984d10..122acc5 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 dfeff97..f36e89b 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 f5f54fe..506f776 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 76045f3..4aecda0 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 b3e544a..78f2551 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 496542f..67a47a6 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 1a7a106..cde7224 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 57e80bb..9078823 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 11446dd..c321ec0 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 621cf32..d2b1695 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 1f5b80c..dac76c9 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 9610b37..23f8464 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 d310891..6062b9b 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 4544a3f..e484e52 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 2ebffb1..634983f 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 c32808e..f1b9981 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 6621edd..e6b7fd0 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 c25468c..be25647 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 0079569..df4b6b5 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 3cf0c9e..55f4f3f 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 07aa1e3..330cf43 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 0d272fb..6e938cd 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 624f8de..77202b9 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 1fb6953..ba56624 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 b80ec02..d3fac1e 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 ea60ba0..0844605 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 0a78040..e48b6a6 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 4968655..f736732 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 4094600..518a1a9 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 66bfde5..a22b7e0 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 eff92ec..f15a045 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 fcb622f..a48f25f 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 b47c7c3..a0f5b7d 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
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list