summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-01-26 10:03:50 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-01-27 12:11:11 +0100
commit85295504351bf71206fd36bcb38e3e8a262996a3 (patch)
treeb06f52b1ff7a26fea576428fd0ce091814c52252 /chart2/source/view
parentdf60fbc3614ed7dd66b6ce935ef5236b9ef0ef32 (diff)
chart2: use c++11 for-loop in VLegend
Change-Id: I8f42fa30f49a8c1dc271017dda826279c45460eb
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/main/VLegend.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index a923694cfa13..6aa089b9d63d 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -867,12 +867,9 @@ void VLegend::createShapes(
sal_Int32 nSymbolHeight = static_cast< sal_Int32 >( fViewFontSize * 0.6 );
sal_Int32 nSymbolWidth = static_cast< sal_Int32 >( nSymbolHeight );
- ::std::vector< LegendEntryProvider* >::const_iterator aIter = m_aLegendEntryProviderList.begin();
- const ::std::vector< LegendEntryProvider* >::const_iterator aEnd = m_aLegendEntryProviderList.end();
- for( aIter = m_aLegendEntryProviderList.begin(); aIter != aEnd; ++aIter )
+ for (LegendEntryProvider* pLegendEntryProvider : m_aLegendEntryProviderList)
{
- LegendEntryProvider* pLegendEntryProvider( *aIter );
- if( pLegendEntryProvider )
+ if (pLegendEntryProvider)
{
awt::Size aCurrentRatio = pLegendEntryProvider->getPreferredLegendKeyAspectRatio();
sal_Int32 nCurrentWidth = aCurrentRatio.Width;
@@ -886,10 +883,9 @@ void VLegend::createShapes(
awt::Size aMaxSymbolExtent( nSymbolWidth, nSymbolHeight );
tViewLegendEntryContainer aViewEntries;
- for( aIter = m_aLegendEntryProviderList.begin(); aIter != aEnd; ++aIter )
+ for(LegendEntryProvider* pLegendEntryProvider : m_aLegendEntryProviderList)
{
- LegendEntryProvider* pLegendEntryProvider( *aIter );
- if( pLegendEntryProvider )
+ if (pLegendEntryProvider)
{
std::vector< ViewLegendEntry > aNewEntries = pLegendEntryProvider->createLegendEntries( aMaxSymbolExtent, eExpansion, xLegendProp, xLegendContainer, m_xShapeFactory, m_xContext );
aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() );