diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-07 20:17:34 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-07 20:22:17 -0400 |
commit | 276a046d5256b14478ab283f420654df6ae76b55 (patch) | |
tree | 1bd8cb090c3aa0bb914685ea42b2fcd2be014422 /chart2 | |
parent | a98f12b0ad7a5ef30219bfdf4a3ab1507bcd0bec (diff) |
Annotate code.
Change-Id: If26d21593f36a39de3bc5b81717e5000795c97ae
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/VAxisBase.cxx | 5 | ||||
-rw-r--r-- | chart2/source/view/axes/VAxisBase.hxx | 6 | ||||
-rw-r--r-- | chart2/source/view/axes/VCartesianCoordinateSystem.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/inc/VCoordinateSystem.hxx | 3 |
4 files changed, 15 insertions, 1 deletions
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx index 1f0f9a0cc04c..15f75caa20ec 100644 --- a/chart2/source/view/axes/VAxisBase.cxx +++ b/chart2/source/view/axes/VAxisBase.cxx @@ -118,6 +118,11 @@ void VAxisBase::setExrtaLinePositionAtOtherAxis( const double& fCrossingAt ) m_aAxisProperties.m_pfExrtaLinePositionAtOtherAxis = new double(fCrossingAt); } +sal_Int32 VAxisBase::getDimensionCount() const +{ + return m_nDimension; +} + bool VAxisBase::isAnythingToDraw() { if( !m_aAxisProperties.m_xAxisModel.is() ) diff --git a/chart2/source/view/axes/VAxisBase.hxx b/chart2/source/view/axes/VAxisBase.hxx index 3c39c033e1a6..cc2ef5875205 100644 --- a/chart2/source/view/axes/VAxisBase.hxx +++ b/chart2/source/view/axes/VAxisBase.hxx @@ -39,7 +39,11 @@ public: ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier ); virtual ~VAxisBase(); - sal_Int32 getDimensionCount() { return m_nDimension;} + /** + * Return the number of dimensions the diagram has. 2 for x and y, and 3 + * for x, y, and z. + */ + sal_Int32 getDimensionCount() const; virtual void createMaximumLabels()=0; virtual void createLabels()=0; diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx index 03eca709063d..79005bf4195b 100644 --- a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx @@ -109,8 +109,10 @@ void VCartesianCoordinateSystem::createVAxisList( sal_Int32 nDimensionIndex = 0; + // dimension index -> x, y or z axis. for( nDimensionIndex = 0; nDimensionIndex < nDimensionCount; nDimensionIndex++ ) { + // axis index -> primary or secondary axis. sal_Int32 nMaxAxisIndex = m_xCooSysModel->getMaximumAxisIndexByDimension(nDimensionIndex); for( sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; nAxisIndex++ ) { diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx index 3e7de00fe150..54df0b35fd7e 100644 --- a/chart2/source/view/inc/VCoordinateSystem.hxx +++ b/chart2/source/view/inc/VCoordinateSystem.hxx @@ -98,6 +98,9 @@ public: ::com::sun::star::chart2::XCoordinateSystem > getModel() const { return m_xCooSysModel;} + /** + * Create "view" axis obejcts 'VAxis' from the coordinate system model. + */ virtual void createVAxisList( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xNumberFormatsSupplier , const ::com::sun::star::awt::Size& rFontReferenceSize |