summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/chartapiwrapper')
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx20
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx12
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx24
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx6
4 files changed, 27 insertions, 35 deletions
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 8b6d614be1dd..a0f39774b5f1 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -157,11 +157,10 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const OUString& rPropertyName
Reference< beans::XPropertySet > xPropSet;
Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
- Sequence< Reference< chart2::XChartType > > aTypes(
+ const Sequence< Reference< chart2::XChartType > > aTypes(
::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ )
+ for( Reference< chart2::XChartType > const & xType : aTypes )
{
- Reference< chart2::XChartType > xType( aTypes[nN] );
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
Reference< chart2::XDataSeriesContainer > xSeriesContainer(xType,uno::UNO_QUERY);
@@ -195,11 +194,10 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const OUString& rProperty
Reference< beans::XPropertySet > xPropSet;
Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
- Sequence< Reference< chart2::XChartType > > aTypes(
+ const Sequence< Reference< chart2::XChartType > > aTypes(
::chart::DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ )
+ for( Reference< chart2::XChartType > const & xType : aTypes )
{
- Reference< chart2::XChartType > xType( aTypes[nN] );
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
Reference< chart2::XDataSeriesContainer > xSeriesContainer(xType,uno::UNO_QUERY);
@@ -344,18 +342,16 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyDefault( const OUString& rProper
void SAL_CALL MinMaxLineWrapper::setAllPropertiesToDefault( )
{
const Sequence< beans::Property >& rPropSeq = *StaticMinMaxLineWrapperPropertyArray::get();
- for(sal_Int32 nN=0; nN<rPropSeq.getLength(); nN++)
+ for(beans::Property const & prop : rPropSeq)
{
- OUString aPropertyName( rPropSeq[nN].Name );
- setPropertyToDefault( aPropertyName );
+ setPropertyToDefault( prop.Name );
}
}
void SAL_CALL MinMaxLineWrapper::setPropertiesToDefault( const uno::Sequence< OUString >& rNameSeq )
{
- for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
+ for(OUString const & s : rNameSeq)
{
- OUString aPropertyName( rNameSeq[nN] );
- setPropertyToDefault( aPropertyName );
+ setPropertyToDefault( s );
}
}
uno::Sequence< uno::Any > SAL_CALL MinMaxLineWrapper::getPropertyDefaults( const uno::Sequence< OUString >& rNameSeq )
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 5355c72150c5..7de1b376b3ef 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -90,12 +90,12 @@ Any WrappedTitleStringProperty::getPropertyValue( const Reference< beans::XPrope
Reference< chart2::XTitle > xTitle(xInnerPropertySet,uno::UNO_QUERY);
if(xTitle.is())
{
- Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
+ const Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
OUStringBuffer aBuf;
- for( sal_Int32 i = 0; i < aStrings.getLength(); ++i )
+ for( Reference< chart2::XFormattedString > const & formattedStr : aStrings )
{
- aBuf.append( aStrings[ i ]->getString());
+ aBuf.append( formattedStr->getString());
}
aRet <<= aBuf.makeStringAndClear();
}
@@ -311,12 +311,12 @@ void TitleWrapper::setFastCharacterPropertyValue(
if( !xTitle.is())
return;
- Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
+ const Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
const WrappedProperty* pWrappedProperty = getWrappedProperty( nHandle );
- for( sal_Int32 i = 0; i < aStrings.getLength(); ++i )
+ for( Reference< chart2::XFormattedString > const & formattedStr : aStrings )
{
- Reference< beans::XFastPropertySet > xFastPropertySet( aStrings[ i ], uno::UNO_QUERY );
+ Reference< beans::XFastPropertySet > xFastPropertySet( formattedStr, uno::UNO_QUERY );
Reference< beans::XPropertySet > xPropSet( xFastPropertySet, uno::UNO_QUERY );
if( pWrappedProperty )
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 29c81bec0b23..ab7e5b333a2c 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -162,14 +162,13 @@ void SAL_CALL UpDownBarWrapper::setPropertyValue( const OUString& rPropertyName,
{
Reference< beans::XPropertySet > xPropSet;
- Sequence< Reference< chart2::XChartType > > aTypes(
+ const Sequence< Reference< chart2::XChartType > > aTypes(
::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getChart2Diagram() ) );
- for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ )
+ for( Reference< chart2::XChartType > const & xType : aTypes )
{
- Reference< chart2::XChartType > xType( aTypes[nN] );
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
- Reference< beans::XPropertySet > xTypeProps( aTypes[nN], uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xTypeProps( xType, uno::UNO_QUERY );
if(xTypeProps.is())
{
xTypeProps->getPropertyValue( m_aPropertySetName ) >>= xPropSet;
@@ -185,14 +184,13 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const OUString& rPropertyN
Reference< beans::XPropertySet > xPropSet;
- Sequence< Reference< chart2::XChartType > > aTypes(
+ const Sequence< Reference< chart2::XChartType > > aTypes(
::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getChart2Diagram() ) );
- for( sal_Int32 nN = 0; nN < aTypes.getLength(); nN++ )
+ for( Reference< chart2::XChartType > const & xType : aTypes )
{
- Reference< chart2::XChartType > xType( aTypes[nN] );
if( xType->getChartType() == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
{
- Reference< beans::XPropertySet > xTypeProps( aTypes[nN], uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xTypeProps( xType, uno::UNO_QUERY );
if(xTypeProps.is())
{
xTypeProps->getPropertyValue( m_aPropertySetName ) >>= xPropSet;
@@ -311,18 +309,16 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyDefault( const OUString& rPropert
void SAL_CALL UpDownBarWrapper::setAllPropertiesToDefault( )
{
const Sequence< beans::Property >& rPropSeq = *StaticUpDownBarWrapperPropertyArray::get();
- for(sal_Int32 nN=0; nN<rPropSeq.getLength(); nN++)
+ for(beans::Property const & prop : rPropSeq)
{
- OUString aPropertyName( rPropSeq[nN].Name );
- setPropertyToDefault( aPropertyName );
+ setPropertyToDefault( prop.Name );
}
}
void SAL_CALL UpDownBarWrapper::setPropertiesToDefault( const uno::Sequence< OUString >& rNameSeq )
{
- for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
+ for(OUString const & s : rNameSeq)
{
- OUString aPropertyName( rNameSeq[nN] );
- setPropertyToDefault( aPropertyName );
+ setPropertyToDefault( s );
}
}
uno::Sequence< uno::Any > SAL_CALL UpDownBarWrapper::getPropertyDefaults( const uno::Sequence< OUString >& rNameSeq )
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
index 044dcf28fd5b..63abadee1b85 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx
@@ -71,12 +71,12 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const Any& rOuterValue,
if( m_nDimensionIndex!=1 )
return;
- Sequence< Reference< chart2::XChartType > > aChartTypeList( DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
- for( sal_Int32 nN = 0; nN < aChartTypeList.getLength(); nN++ )
+ const Sequence< Reference< chart2::XChartType > > aChartTypeList( DiagramHelper::getChartTypesFromDiagram( xDiagram ) );
+ for( Reference< chart2::XChartType > const & chartType : aChartTypeList )
{
try
{
- Reference< beans::XPropertySet > xProp( aChartTypeList[nN], uno::UNO_QUERY );
+ Reference< beans::XPropertySet > xProp( chartType, uno::UNO_QUERY );
if( xProp.is() )
{
Sequence< sal_Int32 > aBarPositionSequence;