diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-10 14:12:04 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-10 15:42:38 -0400 |
commit | ecf648b3a5881a5f24f5b26d51fb4823b225aed4 (patch) | |
tree | 37e88e1ef42f68b74e33cf2591a3a46a0e2f2a51 /chart2 | |
parent | acfabbf06d37b5bcd18dc27fcbf75a3943f498f8 (diff) |
Make the variable name shorter and sweeter...
Change-Id: Ibea26f3c99b50f2011050960794d9736566ee7ce
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/VCoordinateSystem.cxx | 38 | ||||
-rw-r--r-- | chart2/source/view/inc/VCoordinateSystem.hxx | 7 |
2 files changed, 27 insertions, 18 deletions
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx index 1f1fe68386a9..7e880977990d 100644 --- a/chart2/source/view/axes/VCoordinateSystem.cxx +++ b/chart2/source/view/axes/VCoordinateSystem.cxx @@ -77,7 +77,7 @@ VCoordinateSystem::VCoordinateSystem( const Reference< XCoordinateSystem >& xCoo , m_eLeftWallPos(CuboidPlanePosition_Left) , m_eBackWallPos(CuboidPlanePosition_Back) , m_eBottomPos(CuboidPlanePosition_Bottom) - , m_aMergedMinimumAndMaximumSupplier() + , m_aMergedMinMaxSupplier() , m_aExplicitScales(3) , m_aExplicitIncrements(3) , m_apExplicitCategoriesProvider(NULL) @@ -360,13 +360,14 @@ void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAuto { if( rScaleAutomatism.getScale().AxisType==AxisType::DATE && nDimIndex==0 ) { + // This is a date X dimension. Determine proper time resolution. sal_Int32 nTimeResolution = ::com::sun::star::chart::TimeUnit::MONTH; if( !(rScaleAutomatism.getScale().TimeIncrement.TimeResolution >>= nTimeResolution) ) { - nTimeResolution = m_aMergedMinimumAndMaximumSupplier.calculateTimeResolutionOnXAxis(); + nTimeResolution = m_aMergedMinMaxSupplier.calculateTimeResolutionOnXAxis(); rScaleAutomatism.setAutomaticTimeResolution( nTimeResolution ); } - m_aMergedMinimumAndMaximumSupplier.setTimeResolutionOnXAxis( nTimeResolution, rScaleAutomatism.getNullDate() ); + m_aMergedMinMaxSupplier.setTimeResolutionOnXAxis( nTimeResolution, rScaleAutomatism.getNullDate() ); } double fMin = 0.0; @@ -375,31 +376,34 @@ void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAuto ::rtl::math::setInf(&fMax, true); if( 0 == nDimIndex ) { - fMin = m_aMergedMinimumAndMaximumSupplier.getMinimumX(); - fMax = m_aMergedMinimumAndMaximumSupplier.getMaximumX(); + // x dimension + fMin = m_aMergedMinMaxSupplier.getMinimumX(); + fMax = m_aMergedMinMaxSupplier.getMaximumX(); } else if( 1 == nDimIndex ) { + // y dimension ExplicitScaleData aScale = getExplicitScale( 0, 0 ); - fMin = m_aMergedMinimumAndMaximumSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); - fMax = m_aMergedMinimumAndMaximumSupplier.getMaximumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); + fMin = m_aMergedMinMaxSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); + fMax = m_aMergedMinMaxSupplier.getMaximumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex); } else if( 2 == nDimIndex ) { - fMin = m_aMergedMinimumAndMaximumSupplier.getMinimumZ(); - fMax = m_aMergedMinimumAndMaximumSupplier.getMaximumZ(); + // z dimension + fMin = m_aMergedMinMaxSupplier.getMinimumZ(); + fMax = m_aMergedMinMaxSupplier.getMaximumZ(); } //merge our values with those already contained in rScaleAutomatism rScaleAutomatism.expandValueRange( fMin, fMax ); rScaleAutomatism.setAutoScalingOptions( - m_aMergedMinimumAndMaximumSupplier.isExpandBorderToIncrementRhythm( nDimIndex ), - m_aMergedMinimumAndMaximumSupplier.isExpandIfValuesCloseToBorder( nDimIndex ), - m_aMergedMinimumAndMaximumSupplier.isExpandWideValuesToZero( nDimIndex ), - m_aMergedMinimumAndMaximumSupplier.isExpandNarrowValuesTowardZero( nDimIndex ) ); + m_aMergedMinMaxSupplier.isExpandBorderToIncrementRhythm( nDimIndex ), + m_aMergedMinMaxSupplier.isExpandIfValuesCloseToBorder( nDimIndex ), + m_aMergedMinMaxSupplier.isExpandWideValuesToZero( nDimIndex ), + m_aMergedMinMaxSupplier.isExpandNarrowValuesTowardZero( nDimIndex ) ); - VAxisBase* pVAxis( this->getVAxis( nDimIndex, nAxisIndex ) ); + VAxisBase* pVAxis = getVAxis(nDimIndex, nAxisIndex); if( pVAxis ) rScaleAutomatism.setMaximumAutoMainIncrementCount( pVAxis->estimateMaximumAutoMainIncrementCount() ); } @@ -530,17 +534,17 @@ void VCoordinateSystem::createGridShapes() } void VCoordinateSystem::addMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier ) { - m_aMergedMinimumAndMaximumSupplier.addMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier); + m_aMergedMinMaxSupplier.addMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier); } bool VCoordinateSystem::hasMinimumAndMaximumSupplier( MinimumAndMaximumSupplier* pMinimumAndMaximumSupplier ) { - return m_aMergedMinimumAndMaximumSupplier.hasMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier); + return m_aMergedMinMaxSupplier.hasMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier); } void VCoordinateSystem::clearMinimumAndMaximumSupplierList() { - m_aMergedMinimumAndMaximumSupplier.clearMinimumAndMaximumSupplierList(); + m_aMergedMinMaxSupplier.clearMinimumAndMaximumSupplierList(); } bool VCoordinateSystem::getPropertySwapXAndYAxis() const diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx index 7439535da4ee..cde8c1b26cee 100644 --- a/chart2/source/view/inc/VCoordinateSystem.hxx +++ b/chart2/source/view/inc/VCoordinateSystem.hxx @@ -172,7 +172,12 @@ protected: //member CuboidPlanePosition m_eBackWallPos; CuboidPlanePosition m_eBottomPos; - MergedMinimumAndMaximumSupplier m_aMergedMinimumAndMaximumSupplier; //this is used only for autoscaling purpose + /** + * Collection of min-max suppliers which are basically different chart + * types present in the same coordinate system. This is used only for + * auto-scaling purposes. + */ + MergedMinimumAndMaximumSupplier m_aMergedMinMaxSupplier; ::com::sun::star::uno::Sequence< OUString > m_aSeriesNamesForZAxis; |