summaryrefslogtreecommitdiff
path: root/svx/source/gallery2/galtheme.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-11 09:53:05 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-12 07:12:21 +0000
commit875984617cfd6c773eb93f339929eb3fabd3e97b (patch)
treeabb092c1b0d995d55f2f4508801df23377c9cc6d /svx/source/gallery2/galtheme.cxx
parent6bc3c2bdc5279314881b7e950d76d4d813470d11 (diff)
clang-tidy modernize-loop-convert in svx
Change-Id: I09e5243e5dff46ceccef1a707e648ee9cb0c37c5 Reviewed-on: https://gerrit.libreoffice.org/24875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx/source/gallery2/galtheme.cxx')
-rw-r--r--svx/source/gallery2/galtheme.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 9ecaca4f5202..bd3ea97c6e7f 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -77,9 +77,8 @@ GalleryTheme::~GalleryTheme()
{
ImplWrite();
- for ( size_t i = 0, n = aObjectList.size(); i < n; ++i )
+ for (GalleryObject* pEntry : aObjectList)
{
- GalleryObject* pEntry = aObjectList[ i ];
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
delete pEntry;
@@ -221,9 +220,9 @@ void GalleryTheme::ImplWrite()
const GalleryObject* GalleryTheme::ImplGetGalleryObject( const INetURLObject& rURL )
{
- for ( size_t i = 0, n = aObjectList.size(); i < n; ++i )
- if ( aObjectList[ i ]->aURL == rURL )
- return aObjectList[ i ];
+ for (GalleryObject* i : aObjectList)
+ if ( i->aURL == rURL )
+ return i;
return nullptr;
}
@@ -294,8 +293,8 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat
bExists = false;
- for ( size_t i = 0, n = aObjectList.size(); i < n; ++i )
- if ( aObjectList[ i ]->aURL == aNewURL )
+ for (GalleryObject* p : aObjectList)
+ if ( p->aURL == aNewURL )
{
bExists = true;
break;
@@ -616,9 +615,9 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
if( pIStm && pTmpStm )
{
- for ( size_t i = 0, n = aObjectList.size(); i < n; ++i )
+ for (GalleryObject* i : aObjectList)
{
- pEntry = aObjectList[ i ];
+ pEntry = i;
std::unique_ptr<SgaObject> pObj;
switch( pEntry->eObjKind )
@@ -1397,9 +1396,9 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
sal_uInt32 nId1, nId2;
bool bRel;
- for( size_t i = 0, n = aObjectList.size(); i < n; ++i )
+ for(GalleryObject* i : aObjectList)
{
- pObj = aObjectList[ i ];
+ pObj = i;
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) );
Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) );
delete pObj;