summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 12:53:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 20:22:18 +0200
commitf23f9d38db7e0b586130af88c7424cc3d85bc2d2 (patch)
treeba8c0129c84d768b1dcff39f6d9b05f389235ea1 /scripting
parent16d7e22d78cdeac149ee874f803292b3e2634e0a (diff)
loplugin:sequenceloop in scaddins..scripting
Change-Id: I25044332e107b630b257e48d95ee9272145ed344 Reviewed-on: https://gerrit.libreoffice.org/77524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basprov.cxx2
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx2
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.cxx8
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx4
5 files changed, 9 insertions, 9 deletions
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index 9ab855c4207a..f4cad3372572 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -425,7 +425,7 @@ namespace basprov
if ( pBasicManager && xLibContainer.is() )
{
- Sequence< OUString > aLibNames = xLibContainer->getElementNames();
+ const Sequence< OUString > aLibNames = xLibContainer->getElementNames();
sal_Int32 nLibCount = aLibNames.getLength();
aChildNodes.realloc( nLibCount );
Reference< browse::XBrowseNode >* pChildNodes = aChildNodes.getArray();
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 691b12ca757b..5ec4f6fb4d8b 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -220,7 +220,7 @@ namespace dlgprov
Reference< XPropertySet > xProps( xControlModel, uno::UNO_QUERY );
if ( xEventCont.is() )
{
- Sequence< OUString > aNames = xEventCont->getElementNames();
+ const Sequence< OUString > aNames = xEventCont->getElementNames();
for ( const OUString& rName : aNames )
{
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 48334a44538b..59bfbdfe041f 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -324,7 +324,7 @@ namespace dlgprov
}
else
{
- Sequence< OUString > aOpenDocsTdocURLs( MiscUtils::allOpenTDocUrls( m_xContext ) );
+ const Sequence< OUString > aOpenDocsTdocURLs( MiscUtils::allOpenTDocUrls( m_xContext ) );
for ( auto const & tdocURL : aOpenDocsTdocURLs )
{
Reference< frame::XModel > xModel( MiscUtils::tDocUrlToModel( tdocURL ) );
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 3e3bf6b57e20..e89452c3c971 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -215,7 +215,7 @@ private:
{
m_hBNA.reset( new std::unordered_map< OUString, Reference< browse::XBrowseNode > > );
- Sequence< Reference< browse::XBrowseNode > > langNodes =
+ const Sequence< Reference< browse::XBrowseNode > > langNodes =
m_origNode->getChildNodes();
for ( const auto& rLangNode : langNodes )
@@ -230,7 +230,7 @@ private:
xbn.set( rLangNode );
}
- Sequence< Reference< browse::XBrowseNode > > grandchildren =
+ const Sequence< Reference< browse::XBrowseNode > > grandchildren =
xbn->getChildNodes();
for ( const Reference< browse::XBrowseNode >& grandchild : grandchildren )
@@ -262,7 +262,7 @@ namespace
std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Reference< XComponentContext >& xCtx )
{
- Sequence< OUString > openDocs =
+ const Sequence< OUString > openDocs =
MiscUtils::allOpenTDocUrls( xCtx );
Reference< provider::XScriptProviderFactory > xFac;
@@ -395,7 +395,7 @@ public:
if ( hasChildNodes() )
{
vXBrowseNodes aVNodes;
- Sequence < Reference< browse::XBrowseNode > > nodes =
+ const Sequence < Reference< browse::XBrowseNode > > nodes =
m_xWrappedBrowseNode->getChildNodes();
for ( const Reference< browse::XBrowseNode >& xBrowseNode : nodes )
{
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 0cdf6221cc25..7696956fdcc2 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -380,7 +380,7 @@ ScriptEventHelper::getEventListeners()
Reference< beans::XIntrospectionAccess > xIntrospectionAccess =
xIntrospection->inspect( makeAny( m_xControl ) );
- Sequence< Type > aControlListeners =
+ const Sequence< Type > aControlListeners =
xIntrospectionAccess->getSupportedListeners();
for ( const Type& listType : aControlListeners )
{
@@ -397,7 +397,7 @@ ScriptEventHelper::getEventListeners()
Sequence< ScriptEventDescriptor >
ScriptEventHelper::createEvents( const OUString& sCodeName )
{
- Sequence< OUString > aControlListeners = getEventListeners();
+ const Sequence< OUString > aControlListeners = getEventListeners();
sal_Int32 nLength = aControlListeners.getLength();
Sequence< ScriptEventDescriptor > aDest( nLength );