summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scaddins/source/analysis/analysishelper.cxx4
-rw-r--r--sccomp/source/solver/CoinMPSolver.cxx4
-rw-r--r--sccomp/source/solver/LpsolveSolver.cxx6
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx2
-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
9 files changed, 17 insertions, 17 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index c608732b14d6..502e47a5d252 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -1481,7 +1481,7 @@ void SortedIndividualInt32List::InsertHolidayList(
if( !(rHolAny >>= aAnySeq) )
throw lang::IllegalArgumentException();
- for( const uno::Sequence< uno::Any >& rSubSeq : aAnySeq )
+ for( const uno::Sequence< uno::Any >& rSubSeq : std::as_const(aAnySeq) )
{
for( const uno::Any& rAny : rSubSeq )
InsertHolidayList( rAnyConv, rAny, nNullDate, false/*bInsertOnWeekend*/ );
@@ -2036,7 +2036,7 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars )
if( !(r >>= aValArr) )
throw lang::IllegalArgumentException();
- for( const uno::Sequence< uno::Any >& rArr : aValArr )
+ for( const uno::Sequence< uno::Any >& rArr : std::as_const(aValArr) )
Append( rArr );
}
break;
diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx
index f7a357e11eb9..41d3601b114e 100644
--- a/sccomp/source/solver/CoinMPSolver.cxx
+++ b/sccomp/source/solver/CoinMPSolver.cxx
@@ -72,7 +72,7 @@ void SAL_CALL CoinMPSolver::solve()
ScSolverCellHashMap aCellsHash;
aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function
- for (const auto& rConstr : maConstraints)
+ for (const auto& rConstr : std::as_const(maConstraints))
{
table::CellAddress aCellAddr = rConstr.Left;
aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side
@@ -255,7 +255,7 @@ void SAL_CALL CoinMPSolver::solve()
// apply single-var integer constraints
- for (const auto& rConstr : maConstraints)
+ for (const auto& rConstr : std::as_const(maConstraints))
{
sheet::SolverConstraintOperator eOp = rConstr.Operator;
if ( eOp == sheet::SolverConstraintOperator_INTEGER ||
diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx
index b1ab44e66350..01f4bfba2bb1 100644
--- a/sccomp/source/solver/LpsolveSolver.cxx
+++ b/sccomp/source/solver/LpsolveSolver.cxx
@@ -107,7 +107,7 @@ void SAL_CALL LpsolveSolver::solve()
ScSolverCellHashMap aCellsHash;
aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function
- for (const auto& rConstr : maConstraints)
+ for (const auto& rConstr : std::as_const(maConstraints))
{
table::CellAddress aCellAddr = rConstr.Left;
aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side
@@ -192,7 +192,7 @@ void SAL_CALL LpsolveSolver::solve()
set_add_rowmode(lp, TRUE);
- for (const auto& rConstr : maConstraints)
+ for (const auto& rConstr : std::as_const(maConstraints))
{
// integer constraints are set later
sheet::SolverConstraintOperator eOp = rConstr.Operator;
@@ -260,7 +260,7 @@ void SAL_CALL LpsolveSolver::solve()
// apply single-var integer constraints
- for (const auto& rConstr : maConstraints)
+ for (const auto& rConstr : std::as_const(maConstraints))
{
sheet::SolverConstraintOperator eOp = rConstr.Operator;
if ( eOp == sheet::SolverConstraintOperator_INTEGER ||
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index 1e6604245dfe..25bccc57970b 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -513,7 +513,7 @@ void SAL_CALL SwarmSolver::solve()
}
// Determine variable bounds
- for (sheet::SolverConstraint const& rConstraint : maConstraints)
+ for (sheet::SolverConstraint const& rConstraint : std::as_const(maConstraints))
{
table::CellAddress aLeftCellAddress = rConstraint.Left;
sheet::SolverConstraintOperator eOp = rConstraint.Operator;
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 );