summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-13 15:14:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-21 11:16:15 +0200
commit10280dabe2c1c47c3cddbc28fcd701deb618772f (patch)
treec5a619a444356a7ba62e2c356c88854a797b510c /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parent96b5152e0009ff0ea26200d9b6e4bd3e0e8073ed (diff)
loplugin:constvars, look for loop vars that can be const
Change-Id: I67ee714739800f3718f9d3facf57474cd564d855 Reviewed-on: https://gerrit.libreoffice.org/77415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 14fb9f711527..c396f7fb1787 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -448,11 +448,11 @@ static void lcl_copyFlatten(RTFReferenceProperties& rProps, RTFSprms& rStyleAttr
{
// rPr can have both attributes and SPRMs, copy over both types.
RTFSprms& rRPrSprms = rSprm.second->getSprms();
- for (auto& rRPrSprm : rRPrSprms)
+ for (const auto& rRPrSprm : rRPrSprms)
rStyleSprms.set(rRPrSprm.first, rRPrSprm.second);
RTFSprms& rRPrAttributes = rSprm.second->getAttributes();
- for (auto& rRPrAttribute : rRPrAttributes)
+ for (const auto& rRPrAttribute : rRPrAttributes)
rStyleAttributes.set(rRPrAttribute.first, rRPrAttribute.second);
}
else
@@ -460,7 +460,7 @@ static void lcl_copyFlatten(RTFReferenceProperties& rProps, RTFSprms& rStyleAttr
}
RTFSprms& rAttributes = rProps.getAttributes();
- for (auto& rAttribute : rAttributes)
+ for (const auto& rAttribute : rAttributes)
rStyleAttributes.set(rAttribute.first, rAttribute.second);
}
@@ -1047,7 +1047,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
auto pExtentValue = new RTFValue(aExtentAttributes);
// docpr sprm
RTFSprms aDocprAttributes;
- for (auto& rCharacterAttribute : m_aStates.top().getCharacterAttributes())
+ for (const auto& rCharacterAttribute : m_aStates.top().getCharacterAttributes())
if (rCharacterAttribute.first == NS_ooxml::LN_CT_NonVisualDrawingProps_name
|| rCharacterAttribute.first == NS_ooxml::LN_CT_NonVisualDrawingProps_descr)
aDocprAttributes.set(rCharacterAttribute.first, rCharacterAttribute.second);
@@ -1075,7 +1075,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
NS_ooxml::LN_CT_Anchor_behindDoc,
new RTFValue((m_aStates.top().getShape().getInBackground()) ? 1 : 0));
RTFSprms aAnchorSprms;
- for (auto& rCharacterAttribute : m_aStates.top().getCharacterAttributes())
+ for (const auto& rCharacterAttribute : m_aStates.top().getCharacterAttributes())
{
if (rCharacterAttribute.first == NS_ooxml::LN_CT_WrapSquare_wrapText)
aAnchorWrapAttributes.set(rCharacterAttribute.first, rCharacterAttribute.second);
@@ -2218,7 +2218,7 @@ RTFError RTFDocumentImpl::popState()
}
break;
case Destination::LISTENTRY:
- for (auto& rListLevelEntry : aState.getListLevelEntries())
+ for (const auto& rListLevelEntry : aState.getListLevelEntries())
aState.getTableSprms().set(rListLevelEntry.first, rListLevelEntry.second,
RTFOverwrite::NO_APPEND);
break;
@@ -2402,7 +2402,7 @@ RTFError RTFDocumentImpl::popState()
auto pValue = new RTFValue(m_aStates.top().getShape());
// Buffer wrap type.
- for (auto& rCharacterSprm : m_aStates.top().getCharacterSprms())
+ for (const auto& rCharacterSprm : m_aStates.top().getCharacterSprms())
{
if (rCharacterSprm.first == NS_ooxml::LN_EG_WrapType_wrapNone
|| rCharacterSprm.first == NS_ooxml::LN_EG_WrapType_wrapTight)
@@ -2419,7 +2419,7 @@ RTFError RTFDocumentImpl::popState()
else if (aState.getInShapeGroup() && !aState.getInShape())
{
// End of a groupshape, as we're in shapegroup, but not in a real shape.
- for (auto& rGroupProperty : aState.getShape().getGroupProperties())
+ for (const auto& rGroupProperty : aState.getShape().getGroupProperties())
m_pSdrImport->appendGroupProperty(rGroupProperty.first, rGroupProperty.second);
aState.getShape().getGroupProperties().clear();
}