writerfilter: convert loops to range-based-for
Change-Id: I424fd1bf8eef7112a8cff54ab46a07bb41596ca5 Reviewed-on: https://gerrit.libreoffice.org/42901 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
This commit is contained in:
committed by
Thorsten Behrens
parent
5501c18e6b
commit
25cd067a82
@@ -329,8 +329,8 @@ OOXMLValue * OOXMLInputStreamValue::clone() const
|
||||
*/
|
||||
|
||||
OOXMLPropertySet::OOXMLPropertySet()
|
||||
: maType("OOXMLPropertySet")
|
||||
{
|
||||
maType = "OOXMLPropertySet";
|
||||
}
|
||||
|
||||
OOXMLPropertySet::~OOXMLPropertySet()
|
||||
@@ -343,10 +343,8 @@ void OOXMLPropertySet::resolve(Properties & rHandler)
|
||||
// be appended to mProperties. I don't think it can cause elements
|
||||
// to be deleted. But let's check with < here just to be safe that
|
||||
// the indexing below works.
|
||||
for (size_t nIt = 0; nIt < mProperties.size(); ++nIt)
|
||||
for (OOXMLProperty::Pointer_t & pProp : mProperties)
|
||||
{
|
||||
OOXMLProperty::Pointer_t pProp = mProperties[nIt];
|
||||
|
||||
if (pProp.get() != nullptr)
|
||||
pProp->resolve(rHandler);
|
||||
}
|
||||
@@ -747,23 +745,17 @@ OOXMLTable::~OOXMLTable()
|
||||
|
||||
void OOXMLTable::resolve(Table & rTable)
|
||||
{
|
||||
Table * pTable = &rTable;
|
||||
|
||||
int nPos = 0;
|
||||
|
||||
PropertySets_t::iterator it = mPropertySets.begin();
|
||||
PropertySets_t::iterator itEnd = mPropertySets.end();
|
||||
|
||||
while (it != itEnd)
|
||||
for (const ValuePointer_t & it : mPropertySets)
|
||||
{
|
||||
writerfilter::Reference<Properties>::Pointer_t pProperties
|
||||
((*it)->getProperties());
|
||||
(it->getProperties());
|
||||
|
||||
if (pProperties.get() != nullptr)
|
||||
pTable->entry(nPos, pProperties);
|
||||
rTable.entry(nPos, pProperties);
|
||||
|
||||
++nPos;
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user