summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-06-15 17:58:15 +0900
committerCaolán McNamara <caolanm@redhat.com>2015-06-17 15:50:45 +0000
commit09800956191c90035872cbc18cd304fee043c710 (patch)
tree9d255ad7629fedc181e8b5cf965a3075a328caaf /editeng
parent9cc52266bd1a4d01552675f151ce2da8c5210f84 (diff)
Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx2
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rw-r--r--editeng/source/outliner/outliner.cxx4
-rw-r--r--editeng/source/uno/unonrule.cxx4
6 files changed, 12 insertions, 12 deletions
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index 5831f78fce09..4502080c8e96 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -25,7 +25,7 @@
#include <boost/intrusive_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/ref.hpp>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <cassert>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index f2714fb01023..8ce55d8010a6 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -73,7 +73,7 @@ using namespace std;
#include "editeng.hrc"
#include <editeng/eerdll.hxx>
#include <editeng/numitem.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -1329,7 +1329,7 @@ namespace accessibility
// build sorted index array
sal_Int32 nLength = aRes.getLength();
const beans::PropertyValue* pPairs = aRes.getConstArray();
- boost::scoped_array<sal_Int32> pIndices(new sal_Int32[nLength]);
+ std::unique_ptr<sal_Int32[]> pIndices(new sal_Int32[nLength]);
sal_Int32 i = 0;
for( i = 0; i < nLength; i++ )
pIndices[i] = i;
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index ba2276e995c4..99f08d3a36f3 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -63,7 +63,7 @@
#include <sot/formats.hxx>
#include <unicode/ubidi.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <boost/scoped_ptr.hpp>
#include <algorithm>
@@ -547,7 +547,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
const EditLine* pLine = pParaPortion->GetLines()[nLine];
if ( pLine )
{
- boost::scoped_array<Rectangle> aRects(new Rectangle[ mpIMEInfos->nLen ]);
+ std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]);
for (sal_Int32 i = 0; i < mpIMEInfos->nLen; ++i)
{
sal_Int32 nInputPos = mpIMEInfos->aPos.GetIndex() + i;
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index bca39a4b191d..e4b9f56a7d88 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -72,7 +72,7 @@
#include <comphelper/processfactory.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/string.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -720,7 +720,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
SvxFont aTmpFont( pNode->GetCharAttribs().GetDefFont() );
bool bCalcCharPositions = true;
- boost::scoped_array<long> pBuf(new long[ pNode->Len() ]);
+ std::unique_ptr<long[]> pBuf(new long[ pNode->Len() ]);
bool bSameLineAgain = false; // For TextRanger, if the height changes.
TabInfo aCurrentTab;
@@ -3041,7 +3041,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
sal_Int32 nTextStart = 0;
sal_Int32 nTextLen = 0;
const long* pDXArray = 0;
- boost::scoped_array<long> pTmpDXArray;
+ std::unique_ptr<long[]> pTmpDXArray;
if ( pTextPortion->GetKind() == PortionKind::TEXT )
{
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index b573ea1ebd5e..1deb55f649aa 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -54,7 +54,7 @@
// calculate if it's RTL or not
#include <unicode/ubidi.h>
#include <cassert>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::std::advance;
@@ -1004,7 +1004,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
if(bStrippingPortions)
{
const vcl::Font aSvxFont(pOutDev->GetFont());
- boost::scoped_array<long> pBuf(new long[ pPara->GetText().getLength() ]);
+ std::unique_ptr<long[]> pBuf(new long[ pPara->GetText().getLength() ]);
pOutDev->GetTextArray( pPara->GetText(), pBuf.get() );
if(bSymbol)
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index bc13c0858b79..5e26bd66653a 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -35,7 +35,7 @@
#include <editeng/unonrule.hxx>
#include <editeng/editids.hrc>
#include <editeng/numdef.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
using ::com::sun::star::util::XCloneable;
using ::com::sun::star::ucb::XAnyCompare;
@@ -178,7 +178,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
sal_uInt16 nIdx = 0;
const int nProps = 15;
- boost::scoped_array<beans::PropertyValue> pArray(new beans::PropertyValue[nProps]);
+ std::unique_ptr<beans::PropertyValue[]> pArray(new beans::PropertyValue[nProps]);
Any aVal;
{