writerfilter/source/ooxml/OOXMLPropertySet.cxx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
New commits: commit 25cd067a82742210793e39708cc1de9ff84692a7 Author: Serge Krot <serge.k...@cib.de> Date: Thu Sep 28 12:55:45 2017 +0200 writerfilter: convert loops to range-based-for Change-Id: I424fd1bf8eef7112a8cff54ab46a07bb41596ca5 Reviewed-on: https://gerrit.libreoffice.org/42901 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index bd80f8dc5112..d4b7d1284af7 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits