summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNathan Yee <ny.nathan.yee@gmail.com>2015-01-01 10:50:39 -0800
committerCaolán McNamara <caolanm@redhat.com>2015-01-05 09:34:08 +0000
commita509a8d9951a0c31bea0f4ff8942720cad8b6e7f (patch)
treed4494eb4ec45284869a373316a135ee1b181ac64 /sw/source
parentdf5fa4082cfb17c5d5be6678995689485df6d429 (diff)
Resolves: fdo#87003 Kill BOOST_FOREACH on master
use C++11s range-based for() loops instead Conflicts: sd/source/filter/eppt/pptx-epptooxml.cxx Change-Id: I0868eb345932c05b7e40b087035da252b99bf0b9 Reviewed-on: https://gerrit.libreoffice.org/13714 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx19
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx18
-rw-r--r--sw/source/core/doc/docnew.cxx13
-rw-r--r--sw/source/core/doc/gctable.cxx5
-rw-r--r--sw/source/core/doc/htmltbl.cxx7
-rw-r--r--sw/source/core/doc/sortopt.cxx3
-rw-r--r--sw/source/core/doc/tblcpy.cxx5
-rw-r--r--sw/source/core/doc/tblrwcl.cxx19
-rw-r--r--sw/source/core/docnode/ndcopy.cxx5
-rw-r--r--sw/source/core/docnode/ndtbl.cxx11
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx3
-rw-r--r--sw/source/core/frmedt/tblsel.cxx3
-rw-r--r--sw/source/core/text/itratr.cxx3
-rw-r--r--sw/source/core/tox/ToxLinkProcessor.cxx3
-rw-r--r--sw/source/filter/xml/xmltble.cxx7
15 files changed, 54 insertions, 70 deletions
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 3ce5b12164bf..1f752adb3c5e 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -18,7 +18,6 @@
*/
#include <bookmrk.hxx>
-#include <boost/foreach.hpp>
#include <boost/function.hpp>
#include <boost/make_shared.hpp>
#include <cntfrm.hxx>
@@ -207,7 +206,7 @@ namespace
#if 0
static void DumpEntries(std::vector<MarkEntry>* pEntries)
{
- BOOST_FOREACH(MarkEntry& aEntry, *pEntries)
+ for (MarkEntry& aEntry : *pEntries)
aEntry.Dump();
}
#endif
@@ -253,7 +252,7 @@ void CntntIdxStoreImpl::SaveBkmks(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt
void CntntIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, updater_t& rUpdater)
{
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- BOOST_FOREACH(const MarkEntry& aEntry, m_aBkmkEntries)
+ for (const MarkEntry& aEntry : m_aBkmkEntries)
{
if (MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[aEntry.m_nIdx].get()))
{
@@ -268,7 +267,7 @@ void CntntIdxStoreImpl::SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCn
{
SwRedlineTbl const & pRedlineTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl();
long int nIdx = 0;
- BOOST_FOREACH(const SwRangeRedline* pRdl, std::make_pair(pRedlineTbl.begin(), pRedlineTbl.end()))
+ for (const SwRangeRedline* pRdl : pRedlineTbl)
{
int nPointPos = lcl_RelativePosition( *pRdl->GetPoint(), nNode, nCntnt );
int nMarkPos = pRdl->HasMark() ? lcl_RelativePosition( *pRdl->GetMark(), nNode, nCntnt ) :
@@ -295,7 +294,7 @@ void CntntIdxStoreImpl::SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCn
void CntntIdxStoreImpl::RestoreRedlines(SwDoc* pDoc, updater_t& rUpdater)
{
const SwRedlineTbl& rRedlTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl();
- BOOST_FOREACH(const MarkEntry& aEntry, m_aRedlineEntries)
+ for (const MarkEntry& aEntry : m_aRedlineEntries)
{
SwPosition* const pPos = (SwPosition*)( aEntry.m_bOther
? rRedlTbl[ aEntry.m_nIdx ]->GetMark()
@@ -316,7 +315,7 @@ void CntntIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt,
return; // if we have a layout and no DrawObjs, we can skip this
}
MarkEntry aSave = { 0, false, 0 };
- BOOST_FOREACH(const SwFrmFmt* pFrmFmt, *pDoc->GetSpzFrmFmts())
+ for (const SwFrmFmt* pFrmFmt : *pDoc->GetSpzFrmFmts())
{
if ( RES_FLYFRMFMT == pFrmFmt->Which() || RES_DRAWFRMFMT == pFrmFmt->Which() )
{
@@ -350,7 +349,7 @@ void CntntIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt,
void CntntIdxStoreImpl::RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAuto)
{
SwFrmFmts* pSpz = pDoc->GetSpzFrmFmts();
- BOOST_FOREACH(const MarkEntry& aEntry, m_aFlyEntries)
+ for (const MarkEntry& aEntry : m_aFlyEntries)
{
if(!aEntry.m_bOther)
{
@@ -380,7 +379,7 @@ void CntntIdxStoreImpl::RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAuto
void CntntIdxStoreImpl::SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt)
{
- BOOST_FOREACH(const SwUnoCrsr* pUnoCrsr, pDoc->GetUnoCrsrTbl())
+ for (const SwUnoCrsr* pUnoCrsr : pDoc->GetUnoCrsrTbl())
{
for(SwPaM& rPaM : (const_cast<SwUnoCrsr*>(pUnoCrsr))->GetRingContainer())
{
@@ -399,7 +398,7 @@ void CntntIdxStoreImpl::SaveUnoCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCn
void CntntIdxStoreImpl::RestoreUnoCrsrs(updater_t& rUpdater)
{
- BOOST_FOREACH(const PaMEntry& aEntry, m_aUnoCrsrEntries)
+ for (const PaMEntry& aEntry : m_aUnoCrsrEntries)
{
rUpdater(aEntry.m_pPaM->GetBound(!aEntry.m_isMark), aEntry.m_nCntnt);
}
@@ -431,7 +430,7 @@ void CntntIdxStoreImpl::SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 n
void CntntIdxStoreImpl::RestoreShellCrsrs(updater_t& rUpdater)
{
- BOOST_FOREACH(const PaMEntry& aEntry, m_aShellCrsrEntries)
+ for (const PaMEntry& aEntry : m_aShellCrsrEntries)
{
rUpdater(aEntry.m_pPaM->GetBound(aEntry.m_isMark), aEntry.m_nCntnt);
}
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index 1d596a4ee67c..85059402f2dd 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -44,8 +44,6 @@
#include <ndtxt.hxx>
#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
-//#include <rtl/string.h>
-#include <boost/foreach.hpp>
using namespace ::com::sun::star;
@@ -250,7 +248,7 @@ bool DocumentLinksAdministrationManager::GetData( const OUString& rItem, const O
// Do we already have the Item?
OUString sItem( bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem));
_FindItem aPara( sItem );
- BOOST_FOREACH( const SwSectionFmt* pFmt, m_rDoc.GetSections() )
+ for( const SwSectionFmt* pFmt : m_rDoc.GetSections() )
{
if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive)))
break;
@@ -266,7 +264,7 @@ bool DocumentLinksAdministrationManager::GetData( const OUString& rItem, const O
}
_FindItem aPara( GetAppCharClass().lowercase( rItem ));
- BOOST_FOREACH( const SwFrmFmt* pFmt, *m_rDoc.GetTblFrmFmts() )
+ for( const SwFrmFmt* pFmt : *m_rDoc.GetTblFrmFmts() )
{
if (!(lcl_FindTable(pFmt, &aPara)))
break;
@@ -293,7 +291,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
// Do we already have the Item?
OUString sItem( bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem));
_FindItem aPara( sItem );
- BOOST_FOREACH( const SwSectionFmt* pFmt, m_rDoc.GetSections() )
+ for( const SwSectionFmt* pFmt : m_rDoc.GetSections() )
{
if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive)))
break;
@@ -310,7 +308,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
OUString sItem(GetAppCharClass().lowercase(rItem));
_FindItem aPara( sItem );
- BOOST_FOREACH( const SwFrmFmt* pFmt, *m_rDoc.GetTblFrmFmts() )
+ for( const SwFrmFmt* pFmt : *m_rDoc.GetTblFrmFmts() )
{
if (!(lcl_FindTable(pFmt, &aPara)))
break;
@@ -346,7 +344,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
_FindItem aPara(bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem));
// sections
- BOOST_FOREACH( const SwSectionFmt* pFmt, m_rDoc.GetSections() )
+ for( const SwSectionFmt* pFmt : m_rDoc.GetSections() )
{
if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive)))
break;
@@ -369,7 +367,7 @@ bool DocumentLinksAdministrationManager::SetData( const OUString& rItem, const O
_FindItem aPara( GetAppCharClass().lowercase(rItem) );
// tables
- BOOST_FOREACH( const SwFrmFmt* pFmt, *m_rDoc.GetTblFrmFmts() )
+ for( const SwFrmFmt* pFmt : *m_rDoc.GetTblFrmFmts() )
{
if (!(lcl_FindTable(pFmt, &aPara)))
break;
@@ -458,7 +456,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
if( sCmp == "table" )
{
sName = rCC.lowercase( sName );
- BOOST_FOREACH( const SwFrmFmt* pFmt, *m_rDoc.GetTblFrmFmts() )
+ for( const SwFrmFmt* pFmt : *m_rDoc.GetTblFrmFmts() )
{
if (!(lcl_FindTable(pFmt, &aPara)))
break;
@@ -539,7 +537,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
if( !m_rDoc.GetSections().empty() )
{
- BOOST_FOREACH( const SwSectionFmt* pFmt, m_rDoc.GetSections() )
+ for( const SwSectionFmt* pFmt : m_rDoc.GetSections() )
{
if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive)))
break;
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 97ddb7463c54..f7c40286abbd 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -116,7 +116,6 @@
#include <sfx2/Metadatable.hxx>
#include <fmtmeta.hxx>
-#include <boost/foreach.hpp>
//UUUU
#include <svx/xfillit0.hxx>
@@ -507,18 +506,18 @@ SwDoc::~SwDoc()
// Any of the FrmFormats can still have indices registered.
// These need to be destroyed now at the latest.
- BOOST_FOREACH( SwFrmFmt* pFmt, *mpFrmFmtTbl )
+ for( SwFrmFmt* pFmt : *mpFrmFmtTbl )
lcl_DelFmtIndices( pFmt );
- BOOST_FOREACH( SwFrmFmt* pFmt, *mpSpzFrmFmtTbl )
+ for( SwFrmFmt* pFmt : *mpSpzFrmFmtTbl )
lcl_DelFmtIndices( pFmt );
- BOOST_FOREACH( SwSectionFmt* pFmt, *mpSectionFmtTbl )
+ for( SwSectionFmt* pFmt : *mpSectionFmtTbl )
lcl_DelFmtIndices( pFmt );
// The formats/styles that follow depend on the default formats.
// Destroy these only after destroying the FmtIndices, because the content
// of headers/footers has to be deleted as well. If in the headers/footers
// there are still Flys registered at that point, we have a problem.
- BOOST_FOREACH(SwPageDesc *pPageDesc, maPageDescs)
+ for(SwPageDesc *pPageDesc : maPageDescs)
delete pPageDesc;
maPageDescs.clear();
@@ -707,7 +706,7 @@ void SwDoc::ClearDoc()
// destruction of numbering rules and creation of new outline rule
// *after* the document nodes are deleted.
mpOutlineRule = NULL;
- BOOST_FOREACH( SwNumRule* pNumRule, *mpNumRuleTbl )
+ for( SwNumRule* pNumRule : *mpNumRuleTbl )
delete pNumRule;
mpNumRuleTbl->clear();
@@ -725,7 +724,7 @@ void SwDoc::ClearDoc()
if (FindPageDesc(pDummyPgDsc->GetName(), &nDummyPgDsc))
maPageDescs.erase(maPageDescs.begin() + nDummyPgDsc);
- BOOST_FOREACH(SwPageDesc *pPageDesc, maPageDescs)
+ for( SwPageDesc *pPageDesc : maPageDescs )
delete pPageDesc;
maPageDescs.clear();
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 705670a24a04..51acdd3e11f5 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -22,7 +22,6 @@
#include <tblrwcl.hxx>
#include <swtblfmt.hxx>
#include <algorithm>
-#include <boost/foreach.hpp>
using namespace ::editeng;
@@ -86,7 +85,7 @@ static void lcl_GCBorder_GetLastBox_B( const SwTableBox* pBox, SwTableBoxes* pPa
const SwTableLines& rLines = pBox->GetTabLines();
if( !rLines.empty() )
{
- BOOST_FOREACH( const SwTableLine* pLine, rLines )
+ for( const SwTableLine* pLine : rLines )
lcl_GCBorder_GetLastBox_L( pLine, pPara );
}
else
@@ -311,7 +310,7 @@ static void lcl_GC_Box_Border( const SwTableBox* pBox, _SwGCLineBorder* pPara )
{
_SwGCLineBorder aPara( *pBox );
aPara.pShareFmts = pPara->pShareFmts;
- BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+ for( const SwTableLine* pLine : pBox->GetTabLines() )
sw_GC_Line_Border( pLine, &aPara );
}
}
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index cf6b79072a82..5aa4d674987b 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -41,7 +41,6 @@
#include "ndindex.hxx"
#include "switerator.hxx"
#include <o3tl/numeric.hxx>
-#include <boost/foreach.hpp>
#ifdef DBG_UTIL
#include "tblrwcl.hxx"
#endif
@@ -1575,7 +1574,7 @@ static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth )
if( !pBox->GetSttNd() )
{
sal_uInt16 nWidth = 0;
- BOOST_FOREACH( const SwTableLine *pLine, pBox->GetTabLines() )
+ for( const SwTableLine *pLine : pBox->GetTabLines() )
lcl_ResizeLine( pLine, &nWidth );
pBox->GetFrmFmt()->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
*pWidth = *pWidth + nWidth;
@@ -1590,7 +1589,7 @@ static void lcl_ResizeLine( const SwTableLine* pLine, sal_uInt16 *pWidth )
{
sal_uInt16 nOldWidth = *pWidth;
*pWidth = 0;
- BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
+ for( const SwTableBox* pBox : pLine->GetTabBoxes() )
lcl_ResizeBox(pBox, pWidth );
SAL_WARN_IF( nOldWidth && std::abs(*pWidth-nOldWidth) >= COLFUZZY, "sw.core",
@@ -1661,7 +1660,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
if( IsTopTable() )
{
sal_uInt16 nCalcTabWidth = 0;
- BOOST_FOREACH( const SwTableLine *pLine, pSwTable->GetTabLines() )
+ for( const SwTableLine *pLine : pSwTable->GetTabLines() )
lcl_ResizeLine( pLine, &nCalcTabWidth );
SAL_WARN_IF( std::abs( nRelTabWidth-nCalcTabWidth ) >= COLFUZZY, "sw.core",
"Table width is not equal to the row width" );
diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx
index 555e44493175..7705280eb910 100644
--- a/sw/source/core/doc/sortopt.cxx
+++ b/sw/source/core/doc/sortopt.cxx
@@ -19,7 +19,6 @@
#include <i18nlangtag/lang.h>
#include <sortopt.hxx>
-#include <boost/foreach.hpp>
SwSortKey::SwSortKey() :
eSortOrder( SRT_ASCENDING ),
@@ -69,7 +68,7 @@ SwSortOptions::SwSortOptions(const SwSortOptions& rOpt) :
SwSortOptions::~SwSortOptions()
{
- BOOST_FOREACH(SwSortKey *pKey, aKeys)
+ for( SwSortKey *pKey : aKeys )
delete pKey;
}
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index cd750e0a595a..18b06bb1052c 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -45,7 +45,6 @@
#include <redline.hxx>
#include <fmtfsize.hxx>
#include <list>
-#include <boost/foreach.hpp>
#include <boost/scoped_ptr.hpp>
static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
@@ -1037,7 +1036,7 @@ static void _FndCntntBox( const SwTableBox* pBox, SwSelBoxes* pPara )
{
if( !pBox->GetTabLines().empty() )
{
- BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+ for( const SwTableLine* pLine : pBox->GetTabLines() )
_FndCntntLine( pLine, pPara );
}
else
@@ -1046,7 +1045,7 @@ static void _FndCntntBox( const SwTableBox* pBox, SwSelBoxes* pPara )
static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara )
{
- BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
+ for( const SwTableBox* pBox : pLine->GetTabBoxes() )
_FndCntntBox(pBox, pPara );
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 9f28bb34f82a..fc34d7db4fe8 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -58,7 +58,6 @@
#include <o3tl/numeric.hxx>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
-#include <boost/foreach.hpp>
#include <switerator.hxx>
#include <docary.hxx>
@@ -378,7 +377,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara)
_CpyPara aPara( *pCpyPara, pBox );
aPara.nDelBorderFlag &= 7;
- BOOST_FOREACH( _FndLine & rFndLine, rFndBox.GetLines() )
+ for( _FndLine & rFndLine : rFndBox.GetLines() )
lcl_CopyRow( rFndLine, &aPara );
}
else
@@ -623,7 +622,7 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
{
if( bBehind )
aCpyPara.nDelBorderFlag = 1;
- BOOST_FOREACH( _FndLine& rFndLine, pFndBox->GetLines() )
+ for( _FndLine& rFndLine : pFndBox->GetLines() )
lcl_CopyRow( rFndLine, &aCpyPara );
}
@@ -1628,11 +1627,11 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// Move the Boxes extending into the selected Area from left/right
aPara.SetLeft( pLeftBox );
- BOOST_FOREACH(_FndLine& rFndLine, pFndBox->GetLines() )
+ for (_FndLine& rFndLine : pFndBox->GetLines() )
lcl_Merge_MoveLine( rFndLine, &aPara );
aPara.SetRight( pRightBox );
- BOOST_FOREACH(_FndLine& rFndLine, pFndBox->GetLines() )
+ for(_FndLine& rFndLine : pFndBox->GetLines() )
lcl_Merge_MoveLine( rFndLine, &aPara );
if( pLeftBox->GetTabLines().empty() )
@@ -1870,7 +1869,7 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara)
pCpyPara->pInsLine->GetTabBoxes().insert( pCpyPara->pInsLine->GetTabBoxes().begin() + pCpyPara->nInsPos++, pBox );
_CpyPara aPara( *pCpyPara, pBox );
aPara.nNewSize = nSize; // get the size
- BOOST_FOREACH(_FndLine const& rFndLine, rFndBox.GetLines())
+ for(_FndLine const& rFndLine : rFndBox.GetLines())
lcl_CopyLineToDoc( rFndLine, &aPara );
}
else
@@ -2027,7 +2026,7 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
// Copy
if( IsNewModel() )
lcl_CalcNewWidths( aFndBox.GetLines(), aPara );
- BOOST_FOREACH( _FndLine& rFndLine, aFndBox.GetLines() )
+ for( _FndLine& rFndLine : aFndBox.GetLines() )
lcl_CopyLineToDoc( rFndLine, &aPara );
if( rTblNd.GetTable().IsNewModel() )
{ // The copied line must not contain any row span attributes > 1
@@ -2121,7 +2120,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( IsNewModel() )
lcl_CalcNewWidths( aFndBox.GetLines(), aPara );
// Copy
- BOOST_FOREACH( _FndLine& rFndLine, aFndBox.GetLines() )
+ for( _FndLine& rFndLine : aFndBox.GetLines() )
lcl_CopyLineToDoc( rFndLine, &aPara );
// Set the "right" margin above/below
@@ -2323,13 +2322,13 @@ static void lcl_BoxSetHeadCondColl( const SwTableBox* pBox )
if( pSttNd )
pSttNd->CheckSectionCondColl();
else
- BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+ for( const SwTableLine* pLine : pBox->GetTabLines() )
sw_LineSetHeadCondColl( pLine );
}
void sw_LineSetHeadCondColl( const SwTableLine* pLine )
{
- BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
+ for( const SwTableBox* pBox : pLine->GetTabBoxes() )
lcl_BoxSetHeadCondColl(pBox);
}
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index b26299ccb5f9..04f697aaf101 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -28,7 +28,6 @@
#include <ddefld.hxx>
#include <swddetbl.hxx>
#include <svtools/fmtfield.hxx>
-#include <boost/foreach.hpp>
#include <vector>
@@ -191,7 +190,7 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
{
_CopyTable aPara( *pCT );
aPara.pInsBox = pNewBox;
- BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+ for( const SwTableLine* pLine : pBox->GetTabLines() )
lcl_CopyTblLine( pLine, &aPara );
}
else if( pNewBox->IsInHeadline( &pCT->pTblNd->GetTable() ))
@@ -309,7 +308,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
_MapTblFrmFmts aMapArr;
_CopyTable aPara( pDoc, aMapArr, GetIndex(), *pTblNd, &GetTable() );
- BOOST_FOREACH(const SwTableLine* pLine, GetTable().GetTabLines() )
+ for( const SwTableLine* pLine : GetTable().GetTabLines() )
lcl_CopyTblLine( pLine, &aPara );
if( pDDEType )
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index bdd3b9c1f4b6..eda68f0c66e9 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -93,7 +93,6 @@
#include <fldupde.hxx>
#include <switerator.hxx>
#include <o3tl/numeric.hxx>
-#include <boost/foreach.hpp>
#include <tools/datetimeutils.hxx>
#ifdef DBG_UTIL
@@ -1497,7 +1496,7 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
// Delete the Box's Lines
if( !pBox->GetTabLines().empty() )
{
- BOOST_FOREACH( SwTableLine* pLine, pBox->GetTabLines() )
+ for( SwTableLine* pLine : pBox->GetTabLines() )
lcl_DelLine( pLine, pDelPara );
}
else
@@ -1574,7 +1573,7 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// "Delete" the Table and merge all Lines/Boxes
_DelTabPara aDelPara( *this, cCh, pUndo );
- BOOST_FOREACH( SwTableLine *pLine, pTblNd->pTable->GetTabLines() )
+ for( SwTableLine *pLine : pTblNd->pTable->GetTabLines() )
lcl_DelLine( pLine, &aDelPara );
// We just created a TextNode with fitting separator for every TableLine.
@@ -3332,7 +3331,7 @@ static void lcl_SplitTable_CpyBox( SwTableBox* pBox, _SplitTable_Para* pPara )
if( pBox->GetSttNd() )
pPara->ChgBox( pBox );
else
- BOOST_FOREACH( SwTableLine* pLine, pBox->GetTabLines() )
+ for( SwTableLine* pLine : pBox->GetTabLines() )
lcl_SplitTable_CpyLine( pLine, pPara );
}
@@ -3420,7 +3419,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter,
// Move the affected Boxes. Make the Formats unique and correct the StartNodes
_SplitTable_Para aPara( pNewTblNd, rTbl );
- BOOST_FOREACH( SwTableLine* pNewLine, rNewTbl.GetTabLines() )
+ for( SwTableLine* pNewLine : rNewTbl.GetTabLines() )
lcl_SplitTable_CpyLine( pNewLine, &aPara );
rTbl.CleanUpBottomRowSpan( nDeleted );
}
@@ -3689,7 +3688,7 @@ static bool lcl_SetAFmtBox( _FndBox & rBox, _SetAFmtTabPara *pSetPara )
}
}
else
- BOOST_FOREACH( _FndLine& rFndLine, rBox.GetLines() )
+ for( _FndLine& rFndLine : rBox.GetLines() )
lcl_SetAFmtLine( rFndLine, pSetPara );
if (!rBox.GetUpper()->GetUpper()) // a BaseLine
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index a731e4d11e9b..c59071c941b3 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -50,7 +50,6 @@
#include "undobj.hxx"
#include "switerator.hxx"
#include <UndoTable.hxx>
-#include <boost/foreach.hpp>
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
@@ -180,7 +179,7 @@ bool _FindBox( _FndBox & rBox, LinesAndTable* pPara )
if (!rBox.GetLines().empty())
{
pPara->bInsertLines = true;
- BOOST_FOREACH( _FndLine & rFndLine, rBox.GetLines() )
+ for( _FndLine & rFndLine : rBox.GetLines() )
_FindLine( rFndLine, pPara );
if ( pPara->bInsertLines )
{
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 2e65da8b6071..b3402aee12be 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -48,7 +48,6 @@
#include <frmtool.hxx>
#include <switerator.hxx>
#include <deque>
-#include <boost/foreach.hpp>
// see also swtable.cxx
#define COLFUZZY 20L
@@ -1413,7 +1412,7 @@ static bool lcl_CheckCol( _FndBox const& rFndBox, bool* pPara )
}
else
{
- BOOST_FOREACH( _FndLine const& rFndLine, rFndBox.GetLines() )
+ for( _FndLine const& rFndLine : rFndBox.GetLines() )
lcl_CheckRow( rFndLine, pPara );
}
}
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 2a97c4481b1e..0a486f6a0398 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -55,7 +55,6 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#include <editeng/lrspitem.hxx>
#include <switerator.hxx>
-#include <boost/foreach.hpp>
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star;
@@ -593,7 +592,7 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
if( pTmp )
{
aNodeArgs.nIndx = nIndex;
- BOOST_FOREACH( SwFrmFmt *pFmt, *pTmp )
+ for( SwFrmFmt *pFmt : *pTmp )
lcl_MinMaxNode( pFmt, &aNodeArgs );
}
}
diff --git a/sw/source/core/tox/ToxLinkProcessor.cxx b/sw/source/core/tox/ToxLinkProcessor.cxx
index e778f5529596..30b0cbfa1cfb 100644
--- a/sw/source/core/tox/ToxLinkProcessor.cxx
+++ b/sw/source/core/tox/ToxLinkProcessor.cxx
@@ -13,7 +13,6 @@
#include "ndtxt.hxx"
#include <poolfmt.hrc>
-#include <boost/foreach.hpp>
#include <stdexcept>
namespace sw {
@@ -64,7 +63,7 @@ ToxLinkProcessor::ObtainPoolId(const OUString& characterStyle) const
void
ToxLinkProcessor::InsertLinkAttributes(SwTxtNode& node)
{
- BOOST_FOREACH(ClosedLink& clink, mClosedLinks) {
+ for (ClosedLink& clink : mClosedLinks) {
node.InsertItem(clink.mINetFmt, clink.mStartTextPos, clink.mEndTextPos);
}
}
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index a698c9416ee5..c92a55ef728c 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -48,7 +48,6 @@
#include "unotbl.hxx"
#include "xmltexte.hxx"
#include "xmlexp.hxx"
-#include <boost/foreach.hpp>
#include <o3tl/sorted_vector.hxx>
#include <textboxhelper.hxx>
@@ -1040,7 +1039,7 @@ static void lcl_xmltble_ClearName_Box( SwTableBox* pBox )
{
if( !pBox->GetSttNd() )
{
- BOOST_FOREACH( SwTableLine* pLine, pBox->GetTabLines() )
+ for( SwTableLine* pLine : pBox->GetTabLines() )
lcl_xmltble_ClearName_Line( pLine );
}
else
@@ -1053,7 +1052,7 @@ static void lcl_xmltble_ClearName_Box( SwTableBox* pBox )
void lcl_xmltble_ClearName_Line( SwTableLine* pLine )
{
- BOOST_FOREACH( SwTableBox* pBox, pLine->GetTabBoxes() )
+ for( SwTableBox* pBox : pLine->GetTabBoxes() )
lcl_xmltble_ClearName_Box( pBox );
}
@@ -1114,7 +1113,7 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd )
SwXMLTableInfo_Impl aTblInfo( &rTbl, nPrefix );
ExportTableLines( rTbl.GetTabLines(), aTblInfo, rTbl.GetRowsToRepeat() );
- BOOST_FOREACH( SwTableLine *pLine, ((SwTable &)rTbl).GetTabLines() )
+ for( SwTableLine *pLine : ((SwTable &)rTbl).GetTabLines() )
lcl_xmltble_ClearName_Line( pLine );
}
}