[Libreoffice-commits] core.git: accessibility/source avmedia/source UnoControls/source
Noel Grandin
noel at peralex.com
Thu Apr 21 08:12:53 UTC 2016
UnoControls/source/controls/progressmonitor.cxx | 18 +++-------
accessibility/source/extended/accessibletabbar.cxx | 4 +-
accessibility/source/extended/accessibletabbarpagelist.cxx | 7 +--
accessibility/source/standard/accessiblemenubasecomponent.cxx | 14 +++----
accessibility/source/standard/vclxaccessiblestatusbar.cxx | 8 ++--
accessibility/source/standard/vclxaccessibletabcontrol.cxx | 11 ++----
avmedia/source/opengl/oglplayer.cxx | 3 -
7 files changed, 27 insertions(+), 38 deletions(-)
New commits:
commit b19ac3c4c6b4a41a1f3acac68b299fd676428a87
Author: Noel Grandin <noel at peralex.com>
Date: Thu Apr 21 10:11:40 2016 +0200
clang-tidy modernize-loop-convert in a*
Change-Id: If8eada464c6dc7350e50fc90eb27aa47bd90e198
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index 86bf0d8..62446f5 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -741,9 +741,8 @@ void ProgressMonitor::impl_rebuildFixedText ()
// Collect all topics from list and format text.
// "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!!
- for ( size_t n = 0; n < maTextlist_Top.size(); ++n )
+ for (IMPL_TextlistItem* pSearchItem : maTextlist_Top)
{
- IMPL_TextlistItem* pSearchItem = maTextlist_Top[ n ];
aCollectString += pSearchItem->sTopic;
aCollectString += "\n";
}
@@ -758,9 +757,8 @@ void ProgressMonitor::impl_rebuildFixedText ()
// Collect all topics from list and format text.
// "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!!
- for ( size_t n = 0; n < maTextlist_Top.size(); ++n )
+ for (IMPL_TextlistItem* pSearchItem : maTextlist_Top)
{
- IMPL_TextlistItem* pSearchItem = maTextlist_Top[ n ];
aCollectString += pSearchItem->sText;
aCollectString += "\n";
}
@@ -777,9 +775,8 @@ void ProgressMonitor::impl_rebuildFixedText ()
// Collect all topics from list and format text.
// "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!!
- for ( size_t n = 0; n < maTextlist_Bottom.size(); ++n )
+ for (IMPL_TextlistItem* pSearchItem : maTextlist_Bottom)
{
- IMPL_TextlistItem* pSearchItem = maTextlist_Bottom[ n ];
aCollectString += pSearchItem->sTopic;
aCollectString += "\n";
}
@@ -794,9 +791,8 @@ void ProgressMonitor::impl_rebuildFixedText ()
// Collect all topics from list and format text.
// "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!!
- for ( size_t n = 0; n < maTextlist_Bottom.size(); ++n )
+ for (IMPL_TextlistItem* pSearchItem : maTextlist_Bottom)
{
- IMPL_TextlistItem* pSearchItem = maTextlist_Bottom[ n ];
aCollectString += pSearchItem->sText;
aCollectString += "\n";
}
@@ -813,16 +809,14 @@ void ProgressMonitor::impl_cleanMemory ()
// Delete all of lists.
- for ( size_t nPosition = 0; nPosition < maTextlist_Top.size(); ++nPosition )
+ for (IMPL_TextlistItem* pSearchItem : maTextlist_Top)
{
- IMPL_TextlistItem* pSearchItem = maTextlist_Top[ nPosition ];
delete pSearchItem;
}
maTextlist_Top.clear();
- for ( size_t nPosition = 0; nPosition < maTextlist_Bottom.size(); ++nPosition )
+ for (IMPL_TextlistItem* pSearchItem : maTextlist_Bottom)
{
- IMPL_TextlistItem* pSearchItem = maTextlist_Bottom[ nPosition ];
delete pSearchItem;
}
maTextlist_Bottom.clear();
diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index f35f73f..9b5cd91 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 d0b89b9..0ef3362 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 1e032f6..9ef64b4 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 1ef43c5..25029fa 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 c65688e..e9ee495 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();
}
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 4aade3c..883d0c2 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -83,9 +83,8 @@ bool OGLPlayer::create( const OUString& rURL )
}
// Load external resources
- for( size_t i = 0; i < m_vInputFiles.size(); ++i )
+ for(glTFFile & rFile : m_vInputFiles)
{
- glTFFile& rFile = m_vInputFiles[i];
if( !rFile.filename.empty() )
{
const OUString sFilesURL =
More information about the Libreoffice-commits
mailing list