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 /include/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 'include/oox')
-rw-r--r-- | include/oox/export/chartexport.hxx | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index c043fd7157cd..da434b120753 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -64,18 +64,25 @@ namespace com { namespace sun { namespace star { namespace oox { namespace drawingml { -const sal_Int32 AXIS_PRIMARY_X = 1; -const sal_Int32 AXIS_PRIMARY_Y = 2; -const sal_Int32 AXIS_PRIMARY_Z = 3; -const sal_Int32 AXIS_SECONDARY_X = 4; -const sal_Int32 AXIS_SECONDARY_Y = 5; +enum AxesType +{ + AXIS_PRIMARY_X = 1, + AXIS_PRIMARY_Y = 2, + AXIS_PRIMARY_Z = 3, + AXIS_SECONDARY_X = 4, + AXIS_SECONDARY_Y = 5 +}; struct AxisIdPair{ - sal_Int32 nAxisType; + AxesType nAxisType; sal_Int32 nAxisId; sal_Int32 nCrossAx; - AxisIdPair( sal_Int32 nType, sal_Int32 nId, sal_Int32 nAx ): nAxisType( nType ),nAxisId( nId ),nCrossAx( nAx ) {} + AxisIdPair(AxesType nType, sal_Int32 nId, sal_Int32 nAx) + : nAxisType(nType) + , nAxisId(nId) + , nCrossAx(nAx) + {} }; class OOX_DLLPUBLIC ChartExport : public DrawingML { @@ -145,14 +152,14 @@ private: void exportHiLowLines(); void exportUpDownBars(css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportAllSeries(css::uno::Reference<css::chart2::XChartType> xChartType, sal_Int32& nAttachedAxis); + void exportAllSeries(css::uno::Reference<css::chart2::XChartType> xChartType, AxesType& rAttachedAxis); void exportSeries(css::uno::Reference< css::chart2::XChartType > xChartType, - css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries> >& rSeriesSeq, sal_Int32& nAttachedAxis ); + css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries> >& rSeriesSeq, AxesType& rAttachedAxis ); void exportCandleStickSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeriesSeq, - bool bJapaneseCandleSticks, sal_Int32& nAttachedAxis ); + bool bJapaneseCandleSticks, AxesType& rAttachedAxis ); void exportSeriesText( const css::uno::Reference< css::chart2::data::XDataSequence >& xValueSeq ); void exportSeriesCategory( @@ -186,7 +193,7 @@ private: sal_Int32 nAxisType, const char* sAxisPos, const AxisIdPair& rAxisIdPair ); - void exportAxesId( sal_Int32 nAttachedAxis ); + void exportAxesId(AxesType nAttachedAxis); void exportView3D(); bool isDeep3dChart(); |