summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-21 10:11:40 +0200
committerNoel Grandin <noel@peralex.com>2016-04-21 10:12:01 +0200
commitb19ac3c4c6b4a41a1f3acac68b299fd676428a87 (patch)
tree8118fee67c28847bc69ead176621d8e8554260e2 /accessibility
parent7b65087eabf9bd233a899723f662665ee5867378 (diff)
clang-tidy modernize-loop-convert in a*
Change-Id: If8eada464c6dc7350e50fc90eb27aa47bd90e198
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/accessibletabbar.cxx4
-rw-r--r--accessibility/source/extended/accessibletabbarpagelist.cxx7
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx14
-rw-r--r--accessibility/source/standard/vclxaccessiblestatusbar.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx11
5 files changed, 20 insertions, 24 deletions
diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index f35f73f29c0b..9b5cd91e683b 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -175,9 +175,9 @@ namespace accessibility
AccessibleTabBarBase::disposing();
// dispose all children
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx
index d0b89b9a6f6e..0ef33627c4c0 100644
--- a/accessibility/source/extended/accessibletabbarpagelist.cxx
+++ b/accessibility/source/extended/accessibletabbarpagelist.cxx
@@ -60,9 +60,8 @@ namespace accessibility
void AccessibleTabBarPageList::UpdateShowing( bool bShowing )
{
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
{
- Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
{
AccessibleTabBarPage* pAccessibleTabBarPage = static_cast< AccessibleTabBarPage* >( xChild.get() );
@@ -352,9 +351,9 @@ namespace accessibility
AccessibleTabBarBase::disposing();
// dispose all children
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 1e032f6dfe78..9ef64b410fc6 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -232,9 +232,8 @@ void OAccessibleMenuBaseComponent::UpdateFocused( sal_Int32 i, bool bFocused )
void OAccessibleMenuBaseComponent::UpdateVisible()
{
SetVisible( IsVisible() );
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
{
- Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
{
OAccessibleMenuBaseComponent* pComp = static_cast< OAccessibleMenuBaseComponent* >( xChild.get() );
@@ -462,9 +461,8 @@ bool OAccessibleMenuBaseComponent::IsChildHighlighted()
{
bool bChildHighlighted = false;
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
{
- Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
{
OAccessibleMenuBaseComponent* pComp = static_cast< OAccessibleMenuBaseComponent* >( xChild.get() );
@@ -628,9 +626,9 @@ void OAccessibleMenuBaseComponent::ProcessMenuEvent( const VclMenuEvent& rVclMen
m_pMenu = nullptr;
// dispose all menu items
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
@@ -672,9 +670,9 @@ void OAccessibleMenuBaseComponent::disposing()
m_pMenu = nullptr;
// dispose all menu items
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
index 1ef43c54e266..25029fa85778 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
@@ -229,9 +229,9 @@ void VCLXAccessibleStatusBar::ProcessWindowEvent( const VclWindowEvent& rVclWind
m_pStatusBar = nullptr;
// dispose all children
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
@@ -259,9 +259,9 @@ void VCLXAccessibleStatusBar::disposing()
m_pStatusBar = nullptr;
// dispose all children
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index c65688efa2d3..e9ee495f527e 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -56,9 +56,8 @@ VCLXAccessibleTabControl::~VCLXAccessibleTabControl()
void VCLXAccessibleTabControl::UpdateFocused()
{
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& xChild : m_aAccessibleChildren)
{
- Reference< XAccessible > xChild( m_aAccessibleChildren[i] );
if ( xChild.is() )
{
VCLXAccessibleTabPage* pVCLXAccessibleTabPage = static_cast< VCLXAccessibleTabPage* >( xChild.get() );
@@ -234,9 +233,9 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const VclWindowEvent& rVclWin
m_pTabControl = nullptr;
// dispose all tab pages
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
@@ -314,9 +313,9 @@ void VCLXAccessibleTabControl::disposing()
m_pTabControl = nullptr;
// dispose all tab pages
- for ( size_t i = 0; i < m_aAccessibleChildren.size(); ++i )
+ for (Reference<XAccessible>& i : m_aAccessibleChildren)
{
- Reference< XComponent > xComponent( m_aAccessibleChildren[i], UNO_QUERY );
+ Reference< XComponent > xComponent( i, UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}