diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-03 15:07:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-03 16:09:33 +0100 |
commit | 90ea1221856340860c406357e274000771b5b127 (patch) | |
tree | f6d862d1792e8c59f234a752b145212da825b7ce /oox | |
parent | 6f1184dfc0ec6dd1fd24b284737a68b05ffbb61c (diff) |
convert Axis constants to an enum and hilight suspicious absence
that compiler warnings then shows (which I saw manually in the first place)
of AXIS_SECONDARY_X
Change-Id: I873623141020633ea73f14f5c93322c2346b8efb
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 14eb61382ddd..3c0fcaf58683 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -119,7 +119,7 @@ namespace oox { namespace drawingml { namespace { -sal_Int32 translateFromChart2AxisIndexToOox(sal_Int32 nIndex) +AxesType translateFromChart2AxisIndexToOox(sal_Int32 nIndex) { assert(nIndex == 0 || nIndex == 1); if (nIndex == 1) @@ -1533,7 +1533,7 @@ void ChartExport::exportAreaChart( Reference< chart2::XChartType > xChartType ) FSEND ); exportGrouping( ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); exportAxesId( nAttachedAxis ); @@ -1566,7 +1566,7 @@ void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType ) XML_val, varyColors, FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); Reference< XPropertySet > xTypeProp( xChartType, uno::UNO_QUERY ); @@ -1642,7 +1642,7 @@ void ChartExport::exportBubbleChart( Reference< chart2::XChartType > xChartType XML_val, varyColors, FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); pFS->singleElement(FSNS(XML_c, XML_bubble3D), @@ -1660,7 +1660,7 @@ void ChartExport::exportDoughnutChart( Reference< chart2::XChartType > xChartTyp pFS->startElement( FSNS( XML_c, XML_doughnutChart ), FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); // firstSliceAng exportFirstSliceAng( ); @@ -1734,7 +1734,7 @@ void ChartExport::exportLineChart( Reference< chart2::XChartType > xChartType ) exportGrouping( ); // TODO: show marker symbol in series? - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportSeries( xChartType, *itr, nAttachedAxis ); // show marker? @@ -1779,7 +1779,7 @@ void ChartExport::exportPieChart( Reference< chart2::XChartType > xChartType ) XML_val, varyColors, FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); if( !mbIs3DChart ) @@ -1807,7 +1807,7 @@ void ChartExport::exportRadarChart( Reference< chart2::XChartType > xChartType) pFS->singleElement( FSNS( XML_c, XML_radarStyle ), XML_val, radarStyle, FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); exportAxesId( nAttachedAxis ); @@ -1848,7 +1848,7 @@ void ChartExport::exportScatterChart( Reference< chart2::XChartType > xChartType FSEND ); // FIXME: should export xVal and yVal - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportSeries( xChartType, *itr, nAttachedAxis ); exportAxesId( nAttachedAxis ); @@ -1862,7 +1862,7 @@ void ChartExport::exportStockChart( Reference< chart2::XChartType > xChartType ) pFS->startElement( FSNS( XML_c, XML_stockChart ), FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; bool bJapaneseCandleSticks = false; Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY ); @@ -1961,14 +1961,14 @@ void ChartExport::exportSurfaceChart( Reference< chart2::XChartType > xChartType nTypeId = XML_surface3DChart; pFS->startElement( FSNS( XML_c, nTypeId ), FSEND ); - sal_Int32 nAttachedAxis = AXIS_PRIMARY_Y; + AxesType nAttachedAxis = AXIS_PRIMARY_Y; exportAllSeries( xChartType, nAttachedAxis ); exportAxesId( nAttachedAxis ); pFS->endElement( FSNS( XML_c, nTypeId ) ); } -void ChartExport::exportAllSeries(Reference<chart2::XChartType> xChartType, sal_Int32& rAttachedAxis) +void ChartExport::exportAllSeries(Reference<chart2::XChartType> xChartType, AxesType& rAttachedAxis) { Reference< chart2::XDataSeriesContainer > xDSCnt( xChartType, uno::UNO_QUERY ); if( ! xDSCnt.is()) @@ -1980,7 +1980,7 @@ void ChartExport::exportAllSeries(Reference<chart2::XChartType> xChartType, sal_ } void ChartExport::exportSeries( Reference<chart2::XChartType> xChartType, - Sequence<Reference<chart2::XDataSeries> >& rSeriesSeq, sal_Int32& rAttachedAxis ) + Sequence<Reference<chart2::XDataSeries> >& rSeriesSeq, AxesType& rAttachedAxis ) { OUString aLabelRole = xChartType->getRoleOfSequenceForSeriesLabel(); OUString aChartType( xChartType->getChartType()); @@ -2181,7 +2181,7 @@ void ChartExport::exportSeries( Reference<chart2::XChartType> xChartType, void ChartExport::exportCandleStickSeries( const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, bool /*bJapaneseCandleSticks*/, - sal_Int32& rAttachedAxis ) + AxesType& rAttachedAxis ) { for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aSeriesSeq.getLength(); ++nSeriesIdx ) { @@ -2568,6 +2568,11 @@ void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair) sAxPos = "b"; break; } + case AXIS_SECONDARY_X: + { + //TODO: suspicously absent + break; + } case AXIS_SECONDARY_Y: { Reference< css::chart::XTwoAxisYSupplier > xAxisTwoYSupp( mxDiagram, uno::UNO_QUERY ); @@ -3179,7 +3184,7 @@ void ChartExport::exportDataPoints( } } -void ChartExport::exportAxesId( sal_Int32 nAttachedAxis ) +void ChartExport::exportAxesId(AxesType nAttachedAxis) { sal_Int32 nAxisIdx = lcl_generateRandomValue(); sal_Int32 nAxisIdy = lcl_generateRandomValue(); |