chart2/source/inc/chartview/ExplicitScaleValues.hxx | 2 +- chart2/source/view/axes/ScaleAutomatism.cxx | 12 ++++++------ chart2/source/view/axes/VAxisBase.cxx | 2 +- chart2/source/view/axes/VCartesianAxis.cxx | 4 ++-- chart2/source/view/inc/PlottingPositionHelper.hxx | 8 ++++---- chart2/source/view/main/ChartView.cxx | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-)
New commits: commit 1c90d26f455cf5f7a066eeb4fdcbd6fca2cf60cd Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Nov 15 20:20:52 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Nov 16 08:05:42 2021 +0100 chart2: disambiguate ShiftedCategoryPosition There are two of these: one sal_Bool in a .idl file and a bool in a .hxx file. They need to be printed differently with SAL_DEBUG(), so rename the C++ one to avoid confusion. Change-Id: I0f79908a7b74742410813166370cb8ba3017e727 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125256 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/chart2/source/inc/chartview/ExplicitScaleValues.hxx b/chart2/source/inc/chartview/ExplicitScaleValues.hxx index 1aa9a26c46d6..a49dddeb6658 100644 --- a/chart2/source/inc/chartview/ExplicitScaleValues.hxx +++ b/chart2/source/inc/chartview/ExplicitScaleValues.hxx @@ -48,7 +48,7 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitScaleData css::uno::Reference<css::chart2::XScaling> Scaling; sal_Int32 AxisType; //see css::chart2::AxisType - bool ShiftedCategoryPosition; + bool m_bShiftedCategoryPosition; sal_Int32 TimeResolution; //constant of type <type>css::chart::TimeUnit</type> Date NullDate; }; diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx index 7748df078ec6..24195c8fdc93 100644 --- a/chart2/source/view/axes/ScaleAutomatism.cxx +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -65,7 +65,7 @@ ExplicitScaleData::ExplicitScaleData() , Origin(0.0) , Orientation(css::chart2::AxisOrientation_MATHEMATICAL) , AxisType(css::chart2::AxisType::REALNUMBER) - , ShiftedCategoryPosition(false) + , m_bShiftedCategoryPosition(false) , TimeResolution(css::chart::TimeUnit::DAY) , NullDate(30,12,1899) { @@ -202,7 +202,7 @@ void ScaleAutomatism::calculateExplicitScaleAndIncrement( //fill explicit increment - rExplicitScale.ShiftedCategoryPosition = m_aSourceScale.ShiftedCategoryPosition; + rExplicitScale.m_bShiftedCategoryPosition = m_aSourceScale.ShiftedCategoryPosition; bool bIsLogarithm = false; //minimum and maximum of the ExplicitScaleData may be changed if allowed @@ -242,7 +242,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForCategory( // no scaling for categories rExplicitScale.Scaling.clear(); - if( rExplicitScale.ShiftedCategoryPosition ) + if( rExplicitScale.m_bShiftedCategoryPosition ) rExplicitScale.Maximum += 1.0; // ensure that at least one category is visible @@ -565,13 +565,13 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis( switch( rExplicitScale.TimeResolution ) { case DAY: - if( rExplicitScale.ShiftedCategoryPosition ) + if( rExplicitScale.m_bShiftedCategoryPosition ) ++aMaxDate; //for explicit scales we need one interval more (maximum excluded) break; case MONTH: aMinDate.SetDay(1); aMaxDate.SetDay(1); - if( rExplicitScale.ShiftedCategoryPosition ) + if( rExplicitScale.m_bShiftedCategoryPosition ) aMaxDate = DateHelper::GetDateSomeMonthsAway(aMaxDate,1);//for explicit scales we need one interval more (maximum excluded) if( DateHelper::IsLessThanOneMonthAway( aMinDate, aMaxDate ) ) { @@ -586,7 +586,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis( aMinDate.SetMonth(1); aMaxDate.SetDay(1); aMaxDate.SetMonth(1); - if( rExplicitScale.ShiftedCategoryPosition ) + if( rExplicitScale.m_bShiftedCategoryPosition ) aMaxDate = DateHelper::GetDateSomeYearsAway(aMaxDate,1);//for explicit scales we need one interval more (maximum excluded) if( DateHelper::IsLessThanOneYearAway( aMinDate, aMaxDate ) ) { diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx index 6e6f40b65684..32a0458ea325 100644 --- a/chart2/source/view/axes/VAxisBase.cxx +++ b/chart2/source/view/axes/VAxisBase.cxx @@ -159,7 +159,7 @@ void VAxisBase::setExplicitScaleAndIncrement( void VAxisBase::createAllTickInfos( TickInfoArraysType& rAllTickInfos ) { std::unique_ptr< TickFactory > apTickFactory( createTickFactory() ); - if( m_aScale.ShiftedCategoryPosition ) + if( m_aScale.m_bShiftedCategoryPosition ) apTickFactory->getAllTicksShifted( rAllTickInfos ); else apTickFactory->getAllTicks( rAllTickInfos ); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 17295029e26d..9df05ad36620 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -1912,13 +1912,13 @@ void VCartesianAxis::createShapes() //create normal ticks for major and minor intervals { TickInfoArraysType aUnshiftedTickInfos; - if( m_aScale.ShiftedCategoryPosition )// if ShiftedCategoryPosition==true the tickmarks in m_aAllTickInfos are shifted + if( m_aScale.m_bShiftedCategoryPosition )// if m_bShiftedCategoryPosition==true the tickmarks in m_aAllTickInfos are shifted { pTickFactory2D->getAllTicks( aUnshiftedTickInfos ); pTickFactory2D->updateScreenValues( aUnshiftedTickInfos ); hideIdenticalScreenValues( aUnshiftedTickInfos ); } - TickInfoArraysType& rAllTickInfos = m_aScale.ShiftedCategoryPosition ? aUnshiftedTickInfos : m_aAllTickInfos; + TickInfoArraysType& rAllTickInfos = m_aScale.m_bShiftedCategoryPosition ? aUnshiftedTickInfos : m_aAllTickInfos; if (rAllTickInfos.empty()) return; diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx index 30f1bc9a75c2..1349bd8f46a8 100644 --- a/chart2/source/view/inc/PlottingPositionHelper.hxx +++ b/chart2/source/view/inc/PlottingPositionHelper.hxx @@ -281,9 +281,9 @@ bool PlottingPositionHelper::isStrongLowerRequested( sal_Int32 nDimensionIndex ) if( m_aScales.empty() ) return false; if( 0==nDimensionIndex ) - return m_bAllowShiftXAxisPos && m_aScales[nDimensionIndex].ShiftedCategoryPosition; + return m_bAllowShiftXAxisPos && m_aScales[nDimensionIndex].m_bShiftedCategoryPosition; else if( 2==nDimensionIndex ) - return m_bAllowShiftZAxisPos && m_aScales[nDimensionIndex].ShiftedCategoryPosition; + return m_bAllowShiftZAxisPos && m_aScales[nDimensionIndex].m_bShiftedCategoryPosition; return false; } @@ -301,7 +301,7 @@ void PlottingPositionHelper::doLogicScaling( double* pX, double* pY, double* pZ { if( m_aScales[0].Scaling.is()) *pX = m_aScales[0].Scaling->doScaling(*pX); - if( m_bAllowShiftXAxisPos && m_aScales[0].ShiftedCategoryPosition ) + if( m_bAllowShiftXAxisPos && m_aScales[0].m_bShiftedCategoryPosition ) (*pX) += m_fScaledCategoryWidth/2.0; } if(pY && m_aScales[1].Scaling.is()) @@ -310,7 +310,7 @@ void PlottingPositionHelper::doLogicScaling( double* pX, double* pY, double* pZ { if( m_aScales[2].Scaling.is()) *pZ = m_aScales[2].Scaling->doScaling(*pZ); - if( m_bAllowShiftZAxisPos && m_aScales[2].ShiftedCategoryPosition) + if( m_bAllowShiftZAxisPos && m_aScales[2].m_bShiftedCategoryPosition) (*pZ) += 0.5; } } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 021853b6408f..2387e297b54e 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1688,7 +1688,7 @@ bool ChartView::getExplicitValuesForAxis( { rExplicitScale = pVCooSys->getExplicitScale(nDimensionIndex,nAxisIndex); rExplicitIncrement = pVCooSys->getExplicitIncrement(nDimensionIndex,nAxisIndex); - if( rExplicitScale.ShiftedCategoryPosition ) + if( rExplicitScale.m_bShiftedCategoryPosition ) { //remove 'one' from max if( rExplicitScale.AxisType == css::chart2::AxisType::DATE )