summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-12-30 15:30:29 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-01-13 11:02:15 +0100
commit7b95484915e476bba5af96ad27c4a6aae16c72b9 (patch)
tree3df095ee238b0090dffb20050a43485e711c2b73 /xmloff
parentc7e7146e2bb81e18753becaf6ca363d3d9dedeba (diff)
Base loops on getToken index, not on numer of tokens
Change-Id: I5dea52157b42749bcd1925bd7a9fcefad1dc857f Reviewed-on: https://gerrit.libreoffice.org/66224 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/animationimport.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 6402d130f26e..ccf3dfb39325 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -476,11 +476,8 @@ Sequence< Any > AnimationsImportHelperImpl::convertValueSequence( XMLTokenEnum e
// fill the sequence
Any* pValues = aValues.getArray();
- sal_Int32 nIndex;
- for( nIndex = 0; nElements && (nIndex >= 0); nElements-- )
- {
+ for (sal_Int32 nIndex = 0; nIndex >= 0; )
*pValues++ = convertValue( eAttributeName, rValue.getToken( 0, ';', nIndex ) );
- }
}
return aValues;
@@ -556,8 +553,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
// fill the sequence
Sequence< Any > aValues( nElements );
Any* pValues = aValues.getArray();
- sal_Int32 nIndex = 0;
- while( (nElements--) && (nIndex >= 0) )
+ for (sal_Int32 nIndex = 0; nIndex >= 0; )
*pValues++ = convertTiming( rValue.getToken( 0, ';', nIndex ) );
aAny <<= aValues;
@@ -578,8 +574,7 @@ Sequence< double > AnimationsImportHelperImpl::convertKeyTimes( const OUString&
if( nElements )
{
double* pValues = aKeyTimes.getArray();
- sal_Int32 nIndex = 0;
- while( (nElements--) && (nIndex >= 0) )
+ for (sal_Int32 nIndex = 0; nIndex >= 0; )
*pValues++ = rValue.getToken( 0, ';', nIndex ).toDouble();
}
@@ -598,8 +593,7 @@ Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( const
if( nElements )
{
TimeFilterPair* pValues = aTimeFilter.getArray();
- sal_Int32 nIndex = 0;
- while( (nElements--) && (nIndex >= 0) )
+ for (sal_Int32 nIndex = 0; nIndex >= 0; )
{
const OUString aToken( rValue.getToken( 0, ';', nIndex ) );