summaryrefslogtreecommitdiff
path: root/xmloff/source/text
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 20:26:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-16 08:11:34 +0200
commit50679d449fa71bebdc3cba1d30c6c81ac846990c (patch)
treef903dc5160a9953cd9211efe44261ba7cd77b520 /xmloff/source/text
parenta0073744aac89648e89506b79e227b17dacf58d0 (diff)
loplugin:sequenceloop in xmloff
Change-Id: I1fde11da5f6e97255a9140f11c298d6d525f7230 Reviewed-on: https://gerrit.libreoffice.org/77543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx2
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx4
-rw-r--r--xmloff/source/text/XMLSectionExport.hxx2
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx2
-rw-r--r--xmloff/source/text/txtflde.cxx4
-rw-r--r--xmloff/source/text/txtfldi.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx4
7 files changed, 10 insertions, 10 deletions
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index e700de15670f..6ac62d6d6cb2 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -539,7 +539,7 @@ void XMLRedlineExport::ExportStartOrEndRedline(
bool bIsStart = true;
OUString sId;
bool bIdOK = false; // have we seen an ID?
- for(const auto& rValue : aValues)
+ for(const auto& rValue : std::as_const(aValues))
{
if (rValue.Name == "RedlineIdentifier")
{
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index f01dd7d16879..421bbd51aa25 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -1143,7 +1143,7 @@ SvXMLEnumMapEntry<sal_Int16> const aBibliographyDataFieldMap[] =
void XMLSectionExport::ExportIndexTemplateElement(
SectionTypeEnum eType, //i90246
- Sequence<PropertyValue> & rValues)
+ const Sequence<PropertyValue> & rValues)
{
// variables for template values
@@ -1525,7 +1525,7 @@ void XMLSectionExport::ExportLevelParagraphStyles(
true, true);
// iterate over styles in this level
- for(const auto& rStyleName : aStyleNames)
+ for(const auto& rStyleName : std::as_const(aStyleNames))
{
// stylename attribute
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx
index c2291e373652..da8145bfdcd5 100644
--- a/xmloff/source/text/XMLSectionExport.hxx
+++ b/xmloff/source/text/XMLSectionExport.hxx
@@ -243,7 +243,7 @@ private:
/// export a single template element (e.g. span or tab-stop)
void ExportIndexTemplateElement(
SectionTypeEnum eType, //i90246, needed for ODF 1.0, 1.0 and 1.2 management
- css::uno::Sequence<
+ const css::uno::Sequence<
css::beans::PropertyValue> & rValues);
/// export level paragraph styles
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index ff7bb4e4c89d..ec42039dde8c 100644
--- a/xmloff/source/text/XMLTextColumnsExport.cxx
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -62,7 +62,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
Reference < XTextColumns > xColumns;
rAny >>= xColumns;
- Sequence < TextColumn > aColumns = xColumns->getColumns();
+ const Sequence < TextColumn > aColumns = xColumns->getColumns();
sal_Int32 nCount = aColumns.getLength();
OUStringBuffer sValue;
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index ca796c95cc58..19d7ed74cad9 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1965,7 +1965,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
aFieldMasters = xFieldMasterNameAccess->getElementNames();
}
- for(const OUString& sFieldMaster : aFieldMasters) {
+ for(const OUString& sFieldMaster : std::as_const(aFieldMasters)) {
// workaround for #no-bug#
if ( sFieldMaster.startsWithIgnoreAsciiCase(
@@ -2706,7 +2706,7 @@ void XMLTextFieldExport::ProcessBibliographyData(
aAny >>= aValues;
// one attribute per value (unless empty)
- for (const auto& rProp : aValues)
+ for (const auto& rProp : std::as_const(aValues))
{
if( rProp.Name == "BibiliographicType" )
{
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 95986dd42a0a..8a9bcbf84671 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2490,7 +2490,7 @@ void XMLMacroFieldImportContext::PrepareField(
Sequence<PropertyValue> aValues;
pEvents->GetEventSequence( "OnClick", aValues );
- for( const auto& rValue : aValues )
+ for( const auto& rValue : std::as_const(aValues) )
{
if ( rValue.Name == "ScriptType" )
{
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 5a9ebfcb3dfd..d7bf4e5f433f 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -461,7 +461,7 @@ void FieldParamExporter::Export()
const Type aBoolType = cppu::UnoType<sal_Bool>::get();
const Type aSeqType = cppu::UnoType<Sequence<OUString>>::get();
const Type aIntType = ::cppu::UnoType<sal_Int32>::get();
- Sequence<OUString> vParameters(m_xFieldParams->getElementNames());
+ const Sequence<OUString> vParameters(m_xFieldParams->getElementNames());
for(const auto & rParameter : vParameters)
{
const Any aValue = m_xFieldParams->getByName(rParameter);
@@ -507,7 +507,7 @@ void FieldParamExporter::Export()
{
Sequence<OUString> vValue;
aValue >>= vValue;
- for(const OUString & i : vValue)
+ for(const OUString & i : std::as_const(vValue))
{
ExportParameter(rParameter, i);
}