summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/test/testinteractionhandler.hxx12
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx9
2 files changed, 10 insertions, 11 deletions
diff --git a/include/test/testinteractionhandler.hxx b/include/test/testinteractionhandler.hxx
index 8d63b7ae9546..1cfdec663d33 100644
--- a/include/test/testinteractionhandler.hxx
+++ b/include/test/testinteractionhandler.hxx
@@ -82,9 +82,9 @@ public:
if (handlePasswordRequest(rContinuations, aRequest))
return true;
- for (sal_Int32 i = 0; i < rContinuations.getLength(); ++i)
+ for (auto const & cont : rContinuations)
{
- css::uno::Reference<css::task::XInteractionApprove> xApprove(rContinuations[i], css::uno::UNO_QUERY);
+ css::uno::Reference<css::task::XInteractionApprove> xApprove(cont, css::uno::UNO_QUERY);
if (xApprove.is())
xApprove->select();
}
@@ -121,23 +121,23 @@ public:
}
mbPasswordRequested = true;
- for (sal_Int32 i = 0; i < rContinuations.getLength(); ++i)
+ for (auto const & cont : rContinuations)
{
if (mode == css::task::PasswordRequestMode_PASSWORD_REENTER)
{ // cancel re-enter of wrong password, to avoid infinite loop
- css::uno::Reference<css::task::XInteractionAbort> const xAbort(rContinuations[i], css::uno::UNO_QUERY);
+ css::uno::Reference<css::task::XInteractionAbort> const xAbort(cont, css::uno::UNO_QUERY);
if (xAbort.is())
xAbort->select();
}
else if (bIsRequestPasswordToModify)
{
- css::uno::Reference<css::task::XInteractionPassword2> const xIPW2(rContinuations[i], css::uno::UNO_QUERY);
+ css::uno::Reference<css::task::XInteractionPassword2> const xIPW2(cont, css::uno::UNO_QUERY);
xIPW2->setPasswordToModify(msPassword);
xIPW2->select();
}
else
{
- css::uno::Reference<css::task::XInteractionPassword> const xIPW(rContinuations[i], css::uno::UNO_QUERY);
+ css::uno::Reference<css::task::XInteractionPassword> const xIPW(cont, css::uno::UNO_QUERY);
if (xIPW.is())
{
xIPW->setPassword(msPassword);
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index e2441457643f..9bb537e84f17 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -248,13 +248,12 @@ protected:
if( mbIgnoreCase )
{
- css::uno::Sequence< OUString > sElementNames = m_xNameAccess->getElementNames();
- for( sal_Int32 i = 0; i < sElementNames.getLength(); i++ )
+ const css::uno::Sequence< OUString > sElementNames = m_xNameAccess->getElementNames();
+ for( const OUString& rName : sElementNames )
{
- OUString aName = sElementNames[i];
- if( aName.equalsIgnoreAsciiCase( sIndex ) )
+ if( rName.equalsIgnoreAsciiCase( sIndex ) )
{
- return createCollectionObject( m_xNameAccess->getByName( aName ) );
+ return createCollectionObject( m_xNameAccess->getByName( rName ) );
}
}
}