[Libreoffice-commits] core.git: avmedia/source basic/source sc/source sd/source svx/qa sw/qa sw/source
Nathan Yee
ny.nathan.yee at gmail.com
Mon Jan 5 01:34:32 PST 2015
avmedia/source/framework/modeltools.cxx | 7 ++---
basic/source/sbx/sbxbase.cxx | 5 +--
sc/source/ui/unoobj/viewuno.cxx | 15 +++++------
sd/source/filter/eppt/pptx-epptooxml.cxx | 2 -
svx/qa/unit/svdraw/test_SdrTextObject.cxx | 4 --
sw/qa/core/uwriter.cxx | 3 --
sw/source/core/doc/CntntIdxStore.cxx | 19 ++++++--------
sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 18 +++++--------
sw/source/core/doc/docnew.cxx | 13 ++++-----
sw/source/core/doc/gctable.cxx | 5 +--
sw/source/core/doc/htmltbl.cxx | 7 ++---
sw/source/core/doc/sortopt.cxx | 3 --
sw/source/core/doc/tblcpy.cxx | 5 +--
sw/source/core/doc/tblrwcl.cxx | 19 ++++++--------
sw/source/core/docnode/ndcopy.cxx | 5 +--
sw/source/core/docnode/ndtbl.cxx | 11 +++-----
sw/source/core/docnode/ndtbl1.cxx | 3 --
sw/source/core/frmedt/tblsel.cxx | 3 --
sw/source/core/text/itratr.cxx | 3 --
sw/source/core/tox/ToxLinkProcessor.cxx | 3 --
sw/source/filter/xml/xmltble.cxx | 7 ++---
21 files changed, 69 insertions(+), 91 deletions(-)
New commits:
commit a509a8d9951a0c31bea0f4ff8942720cad8b6e7f
Author: Nathan Yee <ny.nathan.yee at gmail.com>
Date: Thu Jan 1 10:50:39 2015 -0800
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index 524e37a..fe6ea56 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -26,7 +26,6 @@
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
-#include <boost/foreach.hpp>
#include <boost/optional.hpp>
#include <config_features.h>
@@ -174,7 +173,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed:
json_parser::read_json( sUrl, aTree );
// Buffers for geometry and animations
- BOOST_FOREACH(ptree::value_type &rVal,aTree.get_child("buffers"))
+ for( ptree::value_type &rVal : aTree.get_child("buffers") )
{
const std::string sBufferUri(rVal.second.get<std::string>("path"));
vExternals.push_back(sBufferUri);
@@ -185,7 +184,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed:
boost::optional< ptree& > aImages = aTree.get_child_optional("images");
if( aImages )
{
- BOOST_FOREACH(ptree::value_type &rVal,aImages.get())
+ for( ptree::value_type &rVal : aImages.get() )
{
const std::string sImageUri(rVal.second.get<std::string>("path"));
if( !sImageUri.empty() )
@@ -197,7 +196,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed:
}
}
// Shaders (contains names only)
- BOOST_FOREACH(ptree::value_type &rVal,aTree.get_child("programs"))
+ for( ptree::value_type &rVal : aTree.get_child("programs") )
{
vExternals.push_back(rVal.second.get<std::string>("fragmentShader") + ".glsl");
vExternals.push_back(rVal.second.get<std::string>("vertexShader") + ".glsl");
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 0a88f54..6e795a9 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -27,7 +27,6 @@
#include <rtl/instance.hxx>
#include <rtl/ustring.hxx>
-#include <boost/foreach.hpp>
// AppData-Structure for SBX:
@@ -175,7 +174,7 @@ SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator )
// Unknown type: go over the factories!
SbxAppData& r = GetSbxData_Impl();
SbxBase* pNew = NULL;
- BOOST_FOREACH(SbxFactory& rFac, r.aFacs)
+ for( SbxFactory& rFac : r.aFacs )
{
pNew = rFac.Create( nSbxId, nCreator );
if( pNew )
@@ -189,7 +188,7 @@ SbxObject* SbxBase::CreateObject( const OUString& rClass )
{
SbxAppData& r = GetSbxData_Impl();
SbxObject* pNew = NULL;
- BOOST_FOREACH(SbxFactory& rFac, r.aFacs)
+ for( SbxFactory& rFac : r.aFacs )
{
pNew = rFac.CreateObject( rClass );
if( pNew )
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index b4c925b..83902ca 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -67,7 +67,6 @@
#include "scextopt.hxx"
#include "preview.hxx"
#include <svx/sdrhittesthelper.hxx>
-#include <boost/foreach.hpp>
#include "formatsh.hxx"
#include <sfx2/app.hxx>
@@ -1341,7 +1340,7 @@ void ScTabViewObj::EndMouseListening()
{
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- BOOST_FOREACH(const XMouseClickHandlerUnoRef rListener, aMouseClickHandlers)
+ for (const XMouseClickHandlerUnoRef rListener : aMouseClickHandlers)
{
try
{
@@ -1362,7 +1361,7 @@ void ScTabViewObj::EndActivationListening()
{
lang::EventObject aEvent;
aEvent.Source = (cppu::OWeakObject*)this;
- BOOST_FOREACH(const XActivationEventListenerUnoRef rListener, aActivationListeners)
+ for (const XActivationEventListenerUnoRef rListener : aActivationListeners)
{
try
{
@@ -1746,7 +1745,7 @@ void ScTabViewObj::SelectionChanged()
aShell.ExecuteStyle( aReq );
lang::EventObject aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- BOOST_FOREACH(const XSelectionChangeListenerUnoRef rListener, aSelectionChgListeners)
+ for (const XSelectionChangeListenerUnoRef rListener : aSelectionChgListeners)
rListener->selectionChanged( aEvent );
// handle sheet events
@@ -2038,7 +2037,7 @@ void ScTabViewObj::VisAreaChanged()
{
beans::PropertyChangeEvent aEvent;
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
- BOOST_FOREACH(const XViewPropertyChangeListenerUnoRef rListener, aPropertyChgListeners)
+ for (const XViewPropertyChangeListenerUnoRef rListener : aPropertyChgListeners)
rListener->propertyChange( aEvent );
}
@@ -2156,7 +2155,7 @@ void ScTabViewObj::RangeSelDone( const OUString& rText )
// copy on the stack because listener could remove itself
XRangeSelectionListenerVector const listeners(aRangeSelListeners);
- BOOST_FOREACH(const XRangeSelectionListenerUnoRef rListener, listeners)
+ for (const XRangeSelectionListenerUnoRef rListener : listeners)
rListener->done( aEvent );
}
@@ -2169,7 +2168,7 @@ void ScTabViewObj::RangeSelAborted( const OUString& rText )
// copy on the stack because listener could remove itself
XRangeSelectionListenerVector const listeners(aRangeSelListeners);
- BOOST_FOREACH(const XRangeSelectionListenerUnoRef rListener, listeners)
+ for (const XRangeSelectionListenerUnoRef rListener : listeners)
rListener->aborted( aEvent );
}
@@ -2182,7 +2181,7 @@ void ScTabViewObj::RangeSelChanged( const OUString& rText )
// copy on the stack because listener could remove itself
XRangeSelectionChangeListenerVector const listener(aRangeChgListeners);
- BOOST_FOREACH(const XRangeSelectionChangeListenerUnoRef rListener, listener)
+ for (const XRangeSelectionChangeListenerUnoRef rListener : listener)
rListener->descriptorChanged( aEvent );
}
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 6b5d150..b27fa08 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1273,7 +1273,7 @@ void PowerPointExport::WriteAuthors()
FSNS( XML_xmlns, XML_p ), "http://schemas.openxmlformats.org/presentationml/2006/main",
FSEND );
- BOOST_FOREACH( AuthorsMap::value_type i, maAuthors ) {
+ for( AuthorsMap::value_type i : maAuthors ) {
pFS->singleElementNS( XML_p, XML_cmAuthor,
XML_id, I32S( i.second.nId ),
XML_name, USS( i.first ),
diff --git a/svx/qa/unit/svdraw/test_SdrTextObject.cxx b/svx/qa/unit/svdraw/test_SdrTextObject.cxx
index fe16805..3b8264d 100644
--- a/svx/qa/unit/svdraw/test_SdrTextObject.cxx
+++ b/svx/qa/unit/svdraw/test_SdrTextObject.cxx
@@ -15,8 +15,6 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
-#include <boost/foreach.hpp>
-
class SdrTextObjTest : public CppUnit::TestFixture {
public:
void AllFamiliesCanBeRestoredFromSavedString();
@@ -33,7 +31,7 @@ void SdrTextObjTest::AllFamiliesCanBeRestoredFromSavedString() {
allFamilies.push_back(SFX_STYLE_FAMILY_PAGE);
allFamilies.push_back(SFX_STYLE_FAMILY_PSEUDO);
- BOOST_FOREACH(SfxStyleFamily family, allFamilies) {
+ for (SfxStyleFamily family : allFamilies) {
OUString styleName = "styleName";
SdrTextObj::AppendFamilyToStyleName(styleName, family);
SfxStyleFamily readFamily = SdrTextObj::ReadFamilyFromStyleName(styleName);
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index f1232cc..80c4ce4 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -10,7 +10,6 @@
#include <sal/config.h>
#include <test/bootstrapfixture.hxx>
-#include <boost/foreach.hpp>
#include <rtl/strbuf.hxx>
#include <osl/file.hxx>
@@ -1317,7 +1316,7 @@ void SwDocTest::testIntrusiveRing()
aRing5.MoveTo(&aRing4);
CPPUNIT_ASSERT_EQUAL(aRing4.GetRingContainer().size(), static_cast<size_t>(2));
aRing4.GetRingContainer().merge(aRing1.GetRingContainer());
- BOOST_FOREACH(TestRing* pRing, vRings)
+ for(TestRing* pRing : vRings)
{
CPPUNIT_ASSERT_EQUAL(pRing->GetRingContainer().size(), static_cast<size_t>(5));
}
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 3ce5b12..1f752ad 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 1d596a4..8505940 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 97ddb74..f7c4028 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 705670a..51acdd3 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 cf6b790..5aa4d67 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 555e444..7705280 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 cd750e0..18b06bb 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 9f28bb3..fc34d7d 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 b26299c..04f697a 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 bdd3b9c..eda68f0 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 a731e4d..c59071c 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 2e65da8..b3402ae 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 2a97c44..0a486f6 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 e778f55..30b0cbf 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 a698c94..c92a55e 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 );
}
}
More information about the Libreoffice-commits
mailing list