summaryrefslogtreecommitdiff
path: root/chart2/source/controller/itemsetwrapper
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/itemsetwrapper')
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx11
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx4
3 files changed, 9 insertions, 10 deletions
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 244cbf9a23bb..8351e5bf02ab 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -50,10 +50,10 @@ AllAxisItemConverter::AllAxisItemConverter(
: MultipleItemConverter( rItemPool )
{
Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- Sequence< Reference< XAxis > > aElementList( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
- for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ )
+ const Sequence< Reference< XAxis > > aElementList( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
+ for( Reference< XAxis > const & axis : aElementList )
{
- uno::Reference< beans::XPropertySet > xObjectProperties(aElementList[nA], uno::UNO_QUERY);
+ uno::Reference< beans::XPropertySet > xObjectProperties(axis, uno::UNO_QUERY);
m_aConverters.emplace_back( new ::chart::wrapper::AxisItemConverter(
xObjectProperties, rItemPool, rDrawModel,
uno::Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY ), nullptr, nullptr,
@@ -79,10 +79,9 @@ AllGridItemConverter::AllGridItemConverter(
: MultipleItemConverter( rItemPool )
{
Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
- Sequence< Reference< beans::XPropertySet > > aElementList( AxisHelper::getAllGrids( xDiagram ) );
- for( sal_Int32 nA = 0; nA < aElementList.getLength(); nA++ )
+ const Sequence< Reference< beans::XPropertySet > > aElementList( AxisHelper::getAllGrids( xDiagram ) );
+ for( Reference< beans::XPropertySet > const & xObjectProperties : aElementList )
{
- Reference< beans::XPropertySet > xObjectProperties(aElementList[nA]);
m_aConverters.emplace_back( new ::chart::wrapper::GraphicPropertyItemConverter(
xObjectProperties, rItemPool, rDrawModel, xNamedPropertyContainerFactory,
::chart::wrapper::GraphicObjectType::LineProperties ) );
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index e4952bbc0329..d50f39abc3bb 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -219,8 +219,8 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
if(!bGroupBarsPerAxis)
{
//set the same value for all axes
- for( sal_Int32 nN = 0; nN < aBarPositionSequence.getLength(); nN++ )
- aBarPositionSequence[nN] = rBarPosition;
+ for( auto & pos : aBarPositionSequence )
+ pos = rBarPosition;
}
else if( nAxisIndex >= 0 && nAxisIndex < aBarPositionSequence.getLength() )
aBarPositionSequence[nAxisIndex] = rBarPosition;
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index 75638edfed22..dfc57623bf2d 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -67,9 +67,9 @@ FormattedStringsConverter::FormattedStringsConverter(
MultipleItemConverter( rItemPool )
{
bool bHasRefSize = (pRefSize && xParentProp.is());
- for( sal_Int32 i = 0; i < aStrings.getLength(); ++i )
+ for( uno::Reference< chart2::XFormattedString > const & formattedStr : aStrings )
{
- uno::Reference< beans::XPropertySet > xProp( aStrings[ i ], uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProp( formattedStr, uno::UNO_QUERY );
if( xProp.is())
{
if( bHasRefSize )