diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 16:14:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 20:24:12 +0200 |
commit | dc50b7f952cf339f66fcdf1ac78d7fbeb31014d4 (patch) | |
tree | 596885ca242c8a71fc4afd4958bbbc767ffa93a0 | |
parent | 7841194ed70385627b9f8f88315fb1d0b5b8147c (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>
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 | ||||
-rw-r--r-- | writerperfect/qa/unit/WpftLoader.cxx | 2 | ||||
-rw-r--r-- | writerperfect/source/writer/EPUBExportFilter.cxx | 2 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 2 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 2 |
11 files changed, 20 insertions, 20 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(); diff --git a/writerperfect/qa/unit/WpftLoader.cxx b/writerperfect/qa/unit/WpftLoader.cxx index 4c5696c18067..f29cd89c001f 100644 --- a/writerperfect/qa/unit/WpftLoader.cxx +++ b/writerperfect/qa/unit/WpftLoader.cxx @@ -190,7 +190,7 @@ void WpftLoader::impl_detectFilterName(uno::Sequence<beans::PropertyValue>& rDes uno::Sequence<beans::PropertyValue> aTypes; if (m_xTypeMap->getByName(rTypeName) >>= aTypes) { - for (const auto& rType : aTypes) + for (const auto& rType : std::as_const(aTypes)) { OUString aFilterName; if (("PreferredFilter" == rType.Name) && (rType.Value >>= aFilterName)) diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx index 747206ec7e45..d944b080ddd3 100644 --- a/writerperfect/source/writer/EPUBExportFilter.cxx +++ b/writerperfect/source/writer/EPUBExportFilter.cxx @@ -69,7 +69,7 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue>& rDe if (aFilterOptions == "layout=fixed") nLayoutMethod = libepubgen::EPUB_LAYOUT_METHOD_FIXED; - for (const auto& rProp : aFilterData) + for (const auto& rProp : std::as_const(aFilterData)) { if (rProp.Name == "EPUBVersion") rProp.Value >>= nVersion; diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 20f8b51fd861..c097c08a40b3 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -1308,7 +1308,7 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUS { rv.clear(); OUString aExtensionPath = xPackage->getURL(); - Sequence< OUString > aEntrySeq = m_xSFA->getFolderContents( aExtensionPath, true ); + const Sequence< OUString > aEntrySeq = m_xSFA->getFolderContents( aExtensionPath, true ); for( const OUString& aEntry : aEntrySeq ) { diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 1aacebcf8768..4ae8f7a0aff8 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -1018,7 +1018,7 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUS { rv.clear(); OUString aExtensionPath = xPackage->getURL(); - Sequence< OUString > aEntrySeq = m_xSFA->getFolderContents( aExtensionPath, true ); + const Sequence< OUString > aEntrySeq = m_xSFA->getFolderContents( aExtensionPath, true ); for( const OUString& aEntry : aEntrySeq ) { |