summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 15:55:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 16:57:05 +0200
commit7ae43f63aad28c2cabb7cde6ea308055133fbde8 (patch)
tree26b244b295d518419243b7b7dd99429c5b796309 /xmloff
parent3e52f67c49b5cde7661d0cca2ea72ff10d55a12c (diff)
loplugin:constvars in writerfilter..xmlscript
Change-Id: I5a318632bcc575ea7e476ec0fb74c905b252ecdd Reviewed-on: https://gerrit.libreoffice.org/77829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx4
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/shapeimport.cxx2
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx2
-rw-r--r--xmloff/source/forms/layerimport.cxx6
-rw-r--r--xmloff/source/style/prhdlfac.cxx2
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx2
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx6
-rw-r--r--xmloff/source/text/XMLSectionExport.hxx2
-rw-r--r--xmloff/source/transform/ChartPlotAreaOOoTContext.cxx2
10 files changed, 16 insertions, 16 deletions
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 51d49b12067a..b7ca64652410 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -738,7 +738,7 @@ void SchXMLSeries2Context::setDefaultsToSeries( SeriesDefaultsAndStyles& rSeries
// iterate over series
// call initSeriesPropertySets first
- for (auto & seriesStyle : rSeriesDefaultsAndStyles.maSeriesStyleVector)
+ for (const auto & seriesStyle : rSeriesDefaultsAndStyles.maSeriesStyleVector)
{
if( seriesStyle.meType != DataRowPointStyle::DATA_SERIES )
continue;
@@ -790,7 +790,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
, tSchXMLLSequencesPerIndex & rInOutLSequencesPerIndex )
{
// iterate over series
- for (auto & seriesStyle : rSeriesDefaultsAndStyles.maSeriesStyleVector)
+ for (const auto & seriesStyle : rSeriesDefaultsAndStyles.maSeriesStyleVector)
{
if( seriesStyle.meType == DataRowPointStyle::DATA_SERIES )
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 9e75edacafaa..8f4e09d431a0 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -716,7 +716,7 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr
void SdXMLExport::ImpWriteAutoLayoutInfos()
{
- for(auto & pInfo : mvAutoLayoutInfoList)
+ for(const auto & pInfo : mvAutoLayoutInfoList)
{
if(pInfo)
{
@@ -1289,7 +1289,7 @@ ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString&
{
if(!rName.isEmpty())
{
- for(auto & pInfo : mvPageMasterInfoList)
+ for(const auto & pInfo : mvPageMasterInfoList)
{
if(pInfo)
{
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index bc7851676f6a..423327c8b0b9 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -803,7 +803,7 @@ void ShapeSortContext::popGroupAndSort()
// this is the current index, all shapes before that
// index are finished
sal_Int32 nIndex = 0;
- for (ZOrderHint& rHint : maZOrderList)
+ for (const ZOrderHint& rHint : maZOrderList)
{
for (vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; )
{
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 19539ab5b2a8..f484ac7b6664 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -1227,7 +1227,7 @@ void XMLEnhancedCustomShapeContext::EndElement()
}
// Path
- for ( beans::PropertyValue& rPathItem : maPath )
+ for ( const beans::PropertyValue& rPathItem : maPath )
{
switch( EASGet( rPathItem.Name ) )
{
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index ce19c3eb657d..da569c8e29b0 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -548,13 +548,13 @@ void OFormLayerXMLImport_Impl::documentDone( )
}
// process XForms-bindings; call registerXFormsValueBinding for each
- for (auto& aXFormsValueBinding : m_aXFormsValueBindings)
+ for (const auto& aXFormsValueBinding : m_aXFormsValueBindings)
bindXFormsValueBinding(rImport.GetModel(), aXFormsValueBinding);
// same for list bindings
- for (auto& aXFormsListBindings : m_aXFormsListBindings)
+ for (const auto& aXFormsListBindings : m_aXFormsListBindings)
bindXFormsListBinding(rImport.GetModel(), aXFormsListBindings);
// same for submissions
- for (auto& aXFormsSubmission : m_aXFormsSubmissions)
+ for (const auto& aXFormsSubmission : m_aXFormsSubmissions)
bindXFormsSubmission(rImport.GetModel(), aXFormsSubmission);
}
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx
index 8dede8e8faa3..f9ef62fa23ee 100644
--- a/xmloff/source/style/prhdlfac.cxx
+++ b/xmloff/source/style/prhdlfac.cxx
@@ -129,7 +129,7 @@ XMLPropertyHandlerFactory::XMLPropertyHandlerFactory() :
XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory()
{
- for( auto& rCacheEntry : mpImpl->maHandlerCache )
+ for( const auto& rCacheEntry : mpImpl->maHandlerCache )
delete rCacheEntry.second;
}
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index 5437cd4cfe22..ea4db1d5024b 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -67,7 +67,7 @@ void XMLPropertyBackpatcher<A>::ResolveId(
// (and preserve Property, if appropriate)
Any aAny;
aAny <<= aValue;
- for(auto& rBackpatch : *pList)
+ for(const auto& rBackpatch : *pList)
{
rBackpatch->setPropertyValue(sPropertyName, aAny);
}
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 421bbd51aa25..46da47e49a5a 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -975,7 +975,7 @@ bool XMLSectionExport::ExportIndexTemplate(
SectionTypeEnum eType,
sal_Int32 nOutlineLevel,
const Reference<XPropertySet> & rPropertySet,
- Sequence<Sequence<PropertyValue> > & rValues)
+ const Sequence<Sequence<PropertyValue> > & rValues)
{
OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type");
OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type");
@@ -1643,9 +1643,9 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
aAny = xPropSet->getPropertyValue(sSortKeys);
Sequence<Sequence<PropertyValue> > aKeys;
aAny >>= aKeys;
- for(Sequence<PropertyValue> & rKey : aKeys)
+ for(const Sequence<PropertyValue> & rKey : std::as_const(aKeys))
{
- for(PropertyValue& rValue : rKey)
+ for(const PropertyValue& rValue : rKey)
{
if (rValue.Name == "SortKey")
{
diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx
index da8145bfdcd5..21894717b4f6 100644
--- a/xmloff/source/text/XMLSectionExport.hxx
+++ b/xmloff/source/text/XMLSectionExport.hxx
@@ -238,7 +238,7 @@ private:
SectionTypeEnum eType, /// index type
sal_Int32 nLevel, /// outline level (if applicable)
const css::uno::Reference< css::beans::XPropertySet> & rPropSet,
- css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue> > & rValues);
+ const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue> > & rValues);
/// export a single template element (e.g. span or tab-stop)
void ExportIndexTemplateElement(
diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
index 770cf41f531c..76a732799daf 100644
--- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
+++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
@@ -141,7 +141,7 @@ rtl::Reference<XMLTransformerContext> XMLChartPlotAreaOOoTContext::CreateChildCo
bool bFound =false;
// iterate over axis elements
- for( auto& rChildContext : m_aChildContexts )
+ for( const auto& rChildContext : m_aChildContexts )
{
XMLAxisOOoContext * pAxisContext = rChildContext.get();
if( pAxisContext != nullptr )