summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-08-19 14:15:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-08-19 14:15:20 +0200
commit4b2c05d4f71ae9c6586b423fea802208da265765 (patch)
tree0b4437caea5ed141b72e77503a9afe8bed9fd9b1 /basic
parentdef066bb6559e8c77eeb924db1356f9848f5c8a2 (diff)
Simplify iteration over Sequence
Change-Id: I84b79c6cc11a5cd506e22caf294423a3c0b953f0
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbunoobj.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 6b8544b96bbb..9bc69079656c 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3353,20 +3353,17 @@ void VBAConstantHelper::init()
}
aConstCache.push_back( sLeafName ); // assume constant group names are unique
Sequence< Reference< XConstantTypeDescription > > aConsts = xConstants->getConstants();
- Reference< XConstantTypeDescription >* pSrc = aConsts.getArray();
- sal_Int32 nLen = aConsts.getLength();
- for ( sal_Int32 index =0; index<nLen; ++pSrc, ++index )
+ for (sal_Int32 i = 0; i != aConsts.getLength(); ++i)
{
// store constant member name
- Reference< XConstantTypeDescription >& rXConst = *pSrc;
- sFullName = rXConst->getName();
+ sFullName = aConsts[i]->getName();
indexLastDot = sFullName.lastIndexOf('.');
sLeafName = sFullName;
if ( indexLastDot > -1 )
{
sLeafName = sFullName.copy( indexLastDot + 1);
}
- aConstHash[ sLeafName.toAsciiLowerCase() ] = rXConst->getConstantValue();
+ aConstHash[ sLeafName.toAsciiLowerCase() ] = aConsts[i]->getConstantValue();
}
}
}