diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-12-18 23:05:49 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-12-19 23:30:30 +0000 |
commit | 1e2c5f68119d8856b2da1497c29a09e6dc8f06e9 (patch) | |
tree | e941feadc3f6b12d8cc264300b2738e17522d1f5 /sc | |
parent | 64642dcacfc66e45977919682a026d21ca8f725b (diff) |
no need to repeatedly call getLength
Change-Id: I0cf06ab1975886fbcc7c751c98c5aa1fdeaa8979
Reviewed-on: https://gerrit.libreoffice.org/20810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 695ab81f335f..20932b4043e0 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2000,7 +2000,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum xDataSource->getDataSequences(); std::map<std::pair<OUString, OUString>,sal_Int32> aOldEntryToIndex; - for( sal_Int32 nIndex = 0; nIndex < aOldSequences.getLength(); nIndex++ ) + for( sal_Int32 nIndex = 0, n = aOldSequences.getLength(); nIndex < n; nIndex++ ) { const uno::Reference< chart2::data::XLabeledDataSequence>& xOld( aOldSequences[nIndex] ); if( xOld.is() ) @@ -2010,7 +2010,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum } } - for( sal_Int32 nNewIndex = 0; nNewIndex < aNewSequences.getLength(); nNewIndex++ ) + for( sal_Int32 nNewIndex = 0, n = aNewSequences.getLength(); nNewIndex < n; nNewIndex++ ) { const uno::Reference< chart2::data::XLabeledDataSequence>& xNew( aNewSequences[nNewIndex] ); if( !xNew.is() ) |