summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 16:14:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 20:24:12 +0200
commitdc50b7f952cf339f66fcdf1ac78d7fbeb31014d4 (patch)
tree596885ca242c8a71fc4afd4958bbbc767ffa93a0 /writerfilter/source
parent7841194ed70385627b9f8f88315fb1d0b5b8147c (diff)
loplugin:sequenceloop in writerfilter..xmlhelp
Change-Id: I7c9c911aa6b051eeab46344f25ea2919605de645 Reviewed-on: https://gerrit.libreoffice.org/77534 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx8
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx4
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.cxx4
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
7 files changed, 16 insertions, 16 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7e4728af2bac..1fe07ac3d8e5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2375,7 +2375,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Sequence<beans::PropertyValue> aGrabBag;
xShapePropertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
if (rProp.Name == "VML-Z-ORDER")
{
@@ -2419,7 +2419,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
xShapePropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
if (rProp.Name == "VML-Z-ORDER")
{
@@ -2553,14 +2553,14 @@ bool DomainMapper_Impl::IsSdtEndBefore()
PropertyMapPtr pContext = GetTopContextOfType(CONTEXT_CHARACTER);
if(pContext)
{
- uno::Sequence< beans::PropertyValue > currentCharProps = pContext->GetPropertyValues();
+ const uno::Sequence< beans::PropertyValue > currentCharProps = pContext->GetPropertyValues();
for (const auto& rCurrentCharProp : currentCharProps)
{
if (rCurrentCharProp.Name == "CharInteropGrabBag")
{
uno::Sequence<beans::PropertyValue> aCharGrabBag;
rCurrentCharProp.Value >>= aCharGrabBag;
- for (const auto& rProp : aCharGrabBag)
+ for (const auto& rProp : std::as_const(aCharGrabBag))
{
if(rProp.Name == "SdtEndBefore")
{
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index e5bf229d174e..659bbed2bb90 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -72,7 +72,7 @@ static sal_Int32 lcl_findProperty( const uno::Sequence< beans::PropertyValue >&
return nPos;
}
-static void lcl_mergeProperties( uno::Sequence< beans::PropertyValue >& aSrc,
+static void lcl_mergeProperties( const uno::Sequence< beans::PropertyValue >& aSrc,
uno::Sequence< beans::PropertyValue >& aDst )
{
for ( const auto& rProp : aSrc )
@@ -329,7 +329,7 @@ void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props
if( hasFirstLineIndent && hasIndentAt )
return; // has them all, nothing to add
- uno::Sequence< beans::PropertyValue > aParaProps = m_pParaStyle->pProperties->GetPropertyValues( );
+ const uno::Sequence< beans::PropertyValue > aParaProps = m_pParaStyle->pProperties->GetPropertyValues( );
// ParaFirstLineIndent -> FirstLineIndent
// ParaLeftMargin -> IndentAt
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index f720131c5fd5..1cd31bb56954 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1596,7 +1596,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
// Unfortunately using setParent() does not work for page styles, so make a deep copy of the page style.
uno::Reference< beans::XPropertySet > pageProperties( m_bTitlePage ? m_aFirstPageStyle : m_aFollowPageStyle );
uno::Reference< beans::XPropertySetInfo > pagePropertiesInfo( pageProperties->getPropertySetInfo() );
- uno::Sequence< beans::Property > propertyList( pagePropertiesInfo->getProperties() );
+ const uno::Sequence< beans::Property > propertyList( pagePropertiesInfo->getProperties() );
// Ignore write-only properties.
static const std::set<OUString> aBlacklist
= { "FooterBackGraphicURL", "BackGraphicURL", "HeaderBackGraphicURL" };
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index da7fef117c63..8864336611ce 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1499,7 +1499,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
// This is the built-in default style that every style inherits from
xParagraphStyles->getByName("Paragraph style") >>= xDefault;
- uno::Sequence< beans::PropertyValue > aPropValues = m_pImpl->m_pDefaultParaProps->GetPropertyValues();
+ const uno::Sequence< beans::PropertyValue > aPropValues = m_pImpl->m_pDefaultParaProps->GetPropertyValues();
for( const auto& rPropValue : aPropValues )
{
try
@@ -1514,7 +1514,7 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
}
if( !bParaProperties && m_pImpl->m_pDefaultCharProps.get())
{
- uno::Sequence< beans::PropertyValue > aPropValues = m_pImpl->m_pDefaultCharProps->GetPropertyValues();
+ const uno::Sequence< beans::PropertyValue > aPropValues = m_pImpl->m_pDefaultCharProps->GetPropertyValues();
for( const auto& rPropValue : aPropValues )
{
try
@@ -1548,7 +1548,7 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
xStyleFamilies->getByName("CharacterStyles") >>= xCharStyles;
//search for all character styles with the name sListLabel + <index>
sal_Int32 nStyleFound = 0;
- uno::Sequence< OUString > aStyleNames = xCharStyles->getElementNames();
+ const uno::Sequence< OUString > aStyleNames = xCharStyles->getElementNames();
for( const auto& rStyleName : aStyleNames )
{
OUString sSuffix;
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index e8386c5898ef..3042407088fa 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -557,7 +557,7 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
static const char sCustomType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
static const char sCustomTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/customXml";
bool bFound = false;
- uno::Sequence<uno::Sequence< beans::StringPair>> aSeqs = xRelationshipAccess->getAllRelationships();
+ const uno::Sequence<uno::Sequence< beans::StringPair>> aSeqs = xRelationshipAccess->getAllRelationships();
std::vector<uno::Reference<xml::dom::XDocument>> aCustomXmlDomList;
std::vector<uno::Reference<xml::dom::XDocument>> aCustomXmlDomPropsList;
for (const uno::Sequence<beans::StringPair>& aSeq : aSeqs)
@@ -625,7 +625,7 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/)
if (xRelationshipAccess.is())
{
- uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
+ const uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
std::vector< uno::Sequence<uno::Any> > aGlossaryDomList;
for (const uno::Sequence< beans::StringPair >& aSeq : aSeqs)
{
@@ -724,7 +724,7 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS
bool bFound = false;
bool bHeaderFooterFound = false;
OOXMLStream::StreamType_t streamType = OOXMLStream::UNKNOWN;
- uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
+ const uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs = xRelationshipAccess->getAllRelationships();
for (const uno::Sequence< beans::StringPair >& aSeq : aSeqs)
{
for (const beans::StringPair& aPair : aSeq)
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index cd9426fe1a41..417dd1acf0b2 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -95,7 +95,7 @@ bool OOXMLStreamImpl::lcl_getTarget(const uno::Reference<embed::XRelationshipAcc
if (maIdCache.empty())
{
// Cache is empty? Then let's build it!
- uno::Sequence< uno::Sequence<beans::StringPair> >aSeqs = xRelationshipAccess->getAllRelationships();
+ const uno::Sequence< uno::Sequence<beans::StringPair> >aSeqs = xRelationshipAccess->getAllRelationships();
for (const uno::Sequence<beans::StringPair>& rSeq : aSeqs)
{
OUString aId;
@@ -257,7 +257,7 @@ bool OOXMLStreamImpl::lcl_getTarget(const uno::Reference<embed::XRelationshipAcc
if (xRelationshipAccess.is())
{
- uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs =
+ const uno::Sequence< uno::Sequence< beans::StringPair > >aSeqs =
xRelationshipAccess->getAllRelationships();
for (const uno::Sequence< beans::StringPair > &rSeq : aSeqs)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a022b6c67de3..14fb9f711527 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3138,7 +3138,7 @@ RTFError RTFDocumentImpl::popState()
xClipboardPropertyContainer, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xDocumentPropertySet(xDocumentPropertyContainer,
uno::UNO_QUERY);
- uno::Sequence<beans::Property> aClipboardProperties
+ const uno::Sequence<beans::Property> aClipboardProperties
= xClipboardPropertySet->getPropertySetInfo()->getProperties();
uno::Sequence<beans::Property> aDocumentProperties
= xDocumentPropertySet->getPropertySetInfo()->getProperties();