diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-02-04 17:46:04 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-02-06 12:59:59 +0100 |
commit | 67cf91ec83a5933b07a87bdeb6ddeb6e1f781dea (patch) | |
tree | b80691782503b6cc90b2d21102dd90d31eb16191 /chart2/source | |
parent | b0011dd5b23d926b3a0d62af7d0c1133ecbe580c (diff) |
chart: prefix members of AxisLabelProperties
Change-Id: Ife658e44dc039811d61b45f4712635920f5c34b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129545
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/axes/VAxisBase.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/axes/VAxisProperties.cxx | 38 | ||||
-rw-r--r-- | chart2/source/view/axes/VAxisProperties.hxx | 14 | ||||
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 132 | ||||
-rw-r--r-- | chart2/source/view/axes/VPolarAngleAxis.cxx | 10 |
5 files changed, 99 insertions, 99 deletions
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx index 3844a1074df9..b225b1f7c0c7 100644 --- a/chart2/source/view/axes/VAxisBase.cxx +++ b/chart2/source/view/axes/VAxisBase.cxx @@ -85,10 +85,10 @@ void VAxisBase::initAxisLabelProperties( const css::awt::Size& rFontReferenceSiz m_bUseTextLabels = true; } - m_aAxisLabelProperties.nNumberFormatKey = m_aAxisProperties.m_nNumberFormatKey; + m_aAxisLabelProperties.m_nNumberFormatKey = m_aAxisProperties.m_nNumberFormatKey; m_aAxisLabelProperties.init(m_aAxisProperties.m_xAxisModel); if( m_aAxisProperties.m_bComplexCategories && m_aAxisProperties.m_nAxisType == AxisType::CATEGORY ) - m_aAxisLabelProperties.eStaggering = AxisLabelStaggering::SideBySide; + m_aAxisLabelProperties.m_eStaggering = AxisLabelStaggering::SideBySide; } bool VAxisBase::isDateAxis() const diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx index 295ad21a68e6..656612cc67fc 100644 --- a/chart2/source/view/axes/VAxisProperties.cxx +++ b/chart2/source/view/axes/VAxisProperties.cxx @@ -330,13 +330,13 @@ void AxisProperties::init( bool bCartesian ) AxisLabelProperties::AxisLabelProperties() : m_aFontReferenceSize( ChartModelHelper::getDefaultPageSize() ) , m_aMaximumSpaceForLabels( 0 , 0, m_aFontReferenceSize.Width, m_aFontReferenceSize.Height ) - , nNumberFormatKey(0) - , eStaggering( AxisLabelStaggering::SideBySide ) - , bLineBreakAllowed( false ) - , bOverlapAllowed( false ) - , bStackCharacters( false ) - , fRotationAngleDegree( 0.0 ) - , nRhythm( 1 ) + , m_nNumberFormatKey(0) + , m_eStaggering( AxisLabelStaggering::SideBySide ) + , m_bLineBreakAllowed( false ) + , m_bOverlapAllowed( false ) + , m_bStackCharacters( false ) + , m_fRotationAngleDegree( 0.0 ) + , m_nRhythm( 1 ) { } @@ -350,26 +350,26 @@ void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel ) try { - xProp->getPropertyValue( "TextBreak" ) >>= bLineBreakAllowed; - xProp->getPropertyValue( "TextOverlap" ) >>= bOverlapAllowed; - xProp->getPropertyValue( "StackCharacters" ) >>= bStackCharacters; - xProp->getPropertyValue( "TextRotation" ) >>= fRotationAngleDegree; + xProp->getPropertyValue( "TextBreak" ) >>= m_bLineBreakAllowed; + xProp->getPropertyValue( "TextOverlap" ) >>= m_bOverlapAllowed; + xProp->getPropertyValue( "StackCharacters" ) >>= m_bStackCharacters; + xProp->getPropertyValue( "TextRotation" ) >>= m_fRotationAngleDegree; css::chart::ChartAxisArrangeOrderType eArrangeOrder; xProp->getPropertyValue( "ArrangeOrder" ) >>= eArrangeOrder; switch(eArrangeOrder) { case css::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE: - eStaggering = AxisLabelStaggering::SideBySide; + m_eStaggering = AxisLabelStaggering::SideBySide; break; case css::chart::ChartAxisArrangeOrderType_STAGGER_EVEN: - eStaggering = AxisLabelStaggering::StaggerEven; + m_eStaggering = AxisLabelStaggering::StaggerEven; break; case css::chart::ChartAxisArrangeOrderType_STAGGER_ODD: - eStaggering = AxisLabelStaggering::StaggerOdd; + m_eStaggering = AxisLabelStaggering::StaggerOdd; break; default: - eStaggering = AxisLabelStaggering::StaggerAuto; + m_eStaggering = AxisLabelStaggering::StaggerAuto; break; } } @@ -381,14 +381,14 @@ void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel ) bool AxisLabelProperties::isStaggered() const { - return ( eStaggering == AxisLabelStaggering::StaggerOdd || eStaggering == AxisLabelStaggering::StaggerEven ); + return ( m_eStaggering == AxisLabelStaggering::StaggerOdd || m_eStaggering == AxisLabelStaggering::StaggerEven ); } void AxisLabelProperties::autoRotate45() { - fRotationAngleDegree = 45; - bLineBreakAllowed = false; - eStaggering = AxisLabelStaggering::SideBySide; + m_fRotationAngleDegree = 45; + m_bLineBreakAllowed = false; + m_eStaggering = AxisLabelStaggering::SideBySide; } } //namespace chart diff --git a/chart2/source/view/axes/VAxisProperties.hxx b/chart2/source/view/axes/VAxisProperties.hxx index 454ea1097c86..44778cbf916e 100644 --- a/chart2/source/view/axes/VAxisProperties.hxx +++ b/chart2/source/view/axes/VAxisProperties.hxx @@ -58,17 +58,17 @@ struct AxisLabelProperties final css::awt::Size m_aFontReferenceSize;//reference size to calculate the font height css::awt::Rectangle m_aMaximumSpaceForLabels;//Labels need to be clipped in order to fit into this rectangle - sal_Int32 nNumberFormatKey; + sal_Int32 m_nNumberFormatKey; - AxisLabelStaggering eStaggering; + AxisLabelStaggering m_eStaggering; - bool bLineBreakAllowed; - bool bOverlapAllowed; + bool m_bLineBreakAllowed; + bool m_bOverlapAllowed; - bool bStackCharacters; - double fRotationAngleDegree; + bool m_bStackCharacters; + double m_fRotationAngleDegree; - sal_Int32 nRhythm; //show only each nth label with n==nRhythm + sal_Int32 m_nRhythm; //show only each nth label with n==nRhythm //methods: void init( const css::uno::Reference< css::chart2::XAxis >& xAxisModel ); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 120513ee9831..645afcce2cb6 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -87,8 +87,8 @@ static void lcl_ResizeTextShapeToFitAvailableSpace( SvxShapeText& rShape2DText, sal_Int32 nMaxLabelsSize = bIsHorizontalAxis ? rAxisLabelProperties.m_aMaximumSpaceForLabels.Height : rAxisLabelProperties.m_aMaximumSpaceForLabels.Width; const sal_Int32 nAvgCharWidth = rShape2DText.getSize().Width / rLabel.getLength(); - const sal_Int32 nTextSize = bIsHorizontalAxis ? ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.fRotationAngleDegree).Height : - ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.fRotationAngleDegree).Width; + const sal_Int32 nTextSize = bIsHorizontalAxis ? ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.m_fRotationAngleDegree).Height : + ShapeFactory::getSizeAfterRotation(rShape2DText, rAxisLabelProperties.m_fRotationAngleDegree).Width; if( !nAvgCharWidth ) return; @@ -127,9 +127,9 @@ static rtl::Reference<SvxShapeText> createSingleLabel( return nullptr; // #i78696# use mathematically correct rotation now - const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.fRotationAngleDegree)); + const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.m_fRotationAngleDegree)); uno::Any aATransformation = ShapeFactory::makeTransformation( rAnchorScreenPosition2D, fRotationAnglePi ); - OUString aLabel = ShapeFactory::getStackedString( rLabel, rAxisLabelProperties.bStackCharacters ); + OUString aLabel = ShapeFactory::getStackedString( rLabel, rAxisLabelProperties.m_bStackCharacters ); rtl::Reference<SvxShapeText> xShape2DText = ShapeFactory::createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation ); @@ -138,7 +138,7 @@ static rtl::Reference<SvxShapeText> createSingleLabel( lcl_ResizeTextShapeToFitAvailableSpace(*xShape2DText, rAxisLabelProperties, aLabel, rPropNames, rPropValues, bIsHorizontalAxis); LabelPositionHelper::correctPositionForRotation( xShape2DText - , rAxisProperties.maLabelAlignment.meAlignment, rAxisLabelProperties.fRotationAngleDegree, rAxisProperties.m_bComplexCategories ); + , rAxisProperties.maLabelAlignment.meAlignment, rAxisLabelProperties.m_fRotationAngleDegree, rAxisProperties.m_bComplexCategories ); return xShape2DText; } @@ -507,16 +507,16 @@ bool VCartesianAxis::isBreakOfLabelsAllowed( { if( m_aTextLabels.getLength() > 100 ) return false; - if( !rAxisLabelProperties.bLineBreakAllowed ) + if( !rAxisLabelProperties.m_bLineBreakAllowed ) return false; - if( rAxisLabelProperties.bStackCharacters ) + if( rAxisLabelProperties.m_bStackCharacters ) return false; //no break for value axis if( !m_bUseTextLabels ) return false; - if( !( rAxisLabelProperties.fRotationAngleDegree == 0.0 || - rAxisLabelProperties.fRotationAngleDegree == 90.0 || - rAxisLabelProperties.fRotationAngleDegree == 270.0 ) ) + if( !( rAxisLabelProperties.m_fRotationAngleDegree == 0.0 || + rAxisLabelProperties.m_fRotationAngleDegree == 90.0 || + rAxisLabelProperties.m_fRotationAngleDegree == 270.0 ) ) return false; //no break for complex vertical category axis if( !m_aAxisProperties.m_bSwapXAndY ) @@ -532,26 +532,26 @@ bool canAutoAdjustLabelPlacement( const AxisLabelProperties& rAxisLabelProperties, bool bIsHorizontalAxis, bool bIsVerticalAxis) { // joined prerequisite checks for auto rotate and auto stagger - if( rAxisLabelProperties.bOverlapAllowed ) + if( rAxisLabelProperties.m_bOverlapAllowed ) return false; - if( rAxisLabelProperties.bLineBreakAllowed ) // auto line break may conflict with... + if( rAxisLabelProperties.m_bLineBreakAllowed ) // auto line break may conflict with... return false; - if( rAxisLabelProperties.fRotationAngleDegree != 0.0 ) + if( rAxisLabelProperties.m_fRotationAngleDegree != 0.0 ) return false; // automatic adjusting labels only works for // horizontal axis with horizontal text // or vertical axis with vertical text if( bIsHorizontalAxis ) - return !rAxisLabelProperties.bStackCharacters; + return !rAxisLabelProperties.m_bStackCharacters; if( bIsVerticalAxis ) - return rAxisLabelProperties.bStackCharacters; + return rAxisLabelProperties.m_bStackCharacters; return false; } bool isAutoStaggeringOfLabelsAllowed( const AxisLabelProperties& rAxisLabelProperties, bool bIsHorizontalAxis, bool bIsVerticalAxis ) { - if( rAxisLabelProperties.eStaggering != AxisLabelStaggering::StaggerAuto ) + if( rAxisLabelProperties.m_eStaggering != AxisLabelStaggering::StaggerAuto ) return false; return canAutoAdjustLabelPlacement(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis); } @@ -721,7 +721,7 @@ bool VCartesianAxis::createTextShapes( return createTextShapesSimple(xTarget, rTickIter, rAxisLabelProperties, pTickFactory); FixedNumberFormatter aFixedNumberFormatter( - m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey ); + m_xNumberFormatsSupplier, rAxisLabelProperties.m_nNumberFormatKey ); bool bIsStaggered = rAxisLabelProperties.isStaggered(); B2DVector aTextToTickDistance = pTickFactory->getDistanceAxisTickToText(m_aAxisProperties, true); @@ -742,14 +742,14 @@ bool VCartesianAxis::createTextShapes( } // recalculate the nLimitedSpaceForText in case of 90 and 270 degree if the text break is true - if ( rAxisLabelProperties.fRotationAngleDegree == 90.0 || rAxisLabelProperties.fRotationAngleDegree == 270.0 ) + if ( rAxisLabelProperties.m_fRotationAngleDegree == 90.0 || rAxisLabelProperties.m_fRotationAngleDegree == 270.0 ) { nLimitedSpaceForText = rAxisLabelProperties.m_aMaximumSpaceForLabels.Height; m_aAxisProperties.m_bLimitSpaceForLabels = false; } // recalculate the nLimitedSpaceForText in case of vertical category axis if the text break is true - if ( m_aAxisProperties.m_bSwapXAndY && bIsVerticalAxis && rAxisLabelProperties.fRotationAngleDegree == 0.0 ) + if ( m_aAxisProperties.m_bSwapXAndY && bIsVerticalAxis && rAxisLabelProperties.m_fRotationAngleDegree == 0.0 ) { nLimitedSpaceForText = pTickFactory->getXaxisStartPos().getX(); m_aAxisProperties.m_bLimitSpaceForLabels = false; @@ -790,21 +790,21 @@ bool VCartesianAxis::createTextShapes( pPREPreviousVisibleTickInfo : pPreviousVisibleTickInfo; //don't create labels which does not fit into the rhythm - if( nTick%rAxisLabelProperties.nRhythm != 0 ) + if( nTick%rAxisLabelProperties.m_nRhythm != 0 ) continue; //don't create labels for invisible ticks if( !pTickInfo->bPaintIt ) continue; - if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed ) + if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed ) { // Overlapping is not allowed. If the label overlaps with its // neighboring label, try increasing the tick interval (or rhythm // as it's called) and start over. if( lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape - , rAxisLabelProperties.fRotationAngleDegree + , rAxisLabelProperties.m_fRotationAngleDegree , pTickInfo->aTickScreenPosition ) ) { // This tick overlaps with its neighbor. Try to stagger (if @@ -814,11 +814,11 @@ bool VCartesianAxis::createTextShapes( if( !bIsStaggered && isAutoStaggeringOfLabelsAllowed( rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis ) ) { bIsStaggered = true; - rAxisLabelProperties.eStaggering = AxisLabelStaggering::StaggerEven; + rAxisLabelProperties.m_eStaggering = AxisLabelStaggering::StaggerEven; pLastVisibleNeighbourTickInfo = pPREPreviousVisibleTickInfo; if( !pLastVisibleNeighbourTickInfo || !lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape - , rAxisLabelProperties.fRotationAngleDegree + , rAxisLabelProperties.m_fRotationAngleDegree , pTickInfo->aTickScreenPosition ) ) bOverlapsAfterAutoStagger = false; } @@ -829,8 +829,8 @@ bool VCartesianAxis::createTextShapes( // Increment the visible tick intervals (if that's // allowed) and start over. - rAxisLabelProperties.nRhythm++; - removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget ); + rAxisLabelProperties.m_nRhythm++; + removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget ); return false; } } @@ -863,30 +863,30 @@ bool VCartesianAxis::createTextShapes( if(!pTickInfo->xTextShape.is()) continue; - recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ); + recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree ); // Label has multiple lines and the words are broken - if( nLimitedSpaceForText>0 && !rAxisLabelProperties.bOverlapAllowed - && rAxisLabelProperties.fRotationAngleDegree == 0.0 + if( nLimitedSpaceForText>0 && !rAxisLabelProperties.m_bOverlapAllowed + && rAxisLabelProperties.m_fRotationAngleDegree == 0.0 && lcl_hasWordBreak( pTickInfo->xTextShape ) ) { // Label has multiple lines and belongs to a complex category // axis. Rotate 90 degrees to try to avoid overlaps. if ( m_aAxisProperties.m_bComplexCategories ) { - rAxisLabelProperties.fRotationAngleDegree = 90; + rAxisLabelProperties.m_fRotationAngleDegree = 90; } - rAxisLabelProperties.bLineBreakAllowed = false; - m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; + rAxisLabelProperties.m_bLineBreakAllowed = false; + m_aAxisLabelProperties.m_fRotationAngleDegree = rAxisLabelProperties.m_fRotationAngleDegree; removeTextShapesFromTicks(); return false; } //if NO OVERLAP -> remove overlapping shapes - if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed ) + if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed ) { // Check if the label still overlaps with its neighbor. - if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ) ) + if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree ) ) { // It overlaps. Check if staggering helps. bool bOverlapsAfterAutoStagger = true; @@ -898,11 +898,11 @@ bool VCartesianAxis::createTextShapes( || m_aAxisProperties.m_bTryStaggeringFirst ) { bIsStaggered = true; - rAxisLabelProperties.eStaggering = AxisLabelStaggering::StaggerEven; + rAxisLabelProperties.m_eStaggering = AxisLabelStaggering::StaggerEven; pLastVisibleNeighbourTickInfo = pPREPreviousVisibleTickInfo; if( !pLastVisibleNeighbourTickInfo || !lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape - , rAxisLabelProperties.fRotationAngleDegree + , rAxisLabelProperties.m_fRotationAngleDegree , pTickInfo->aTickScreenPosition ) ) bOverlapsAfterAutoStagger = false; } @@ -919,15 +919,15 @@ bool VCartesianAxis::createTextShapes( // The nRhythm parameter is reset to 1 since the layout // used for text labels is changed. rAxisLabelProperties.autoRotate45(); - m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; // Store it for future runs. + m_aAxisLabelProperties.m_fRotationAngleDegree = rAxisLabelProperties.m_fRotationAngleDegree; // Store it for future runs. removeTextShapesFromTicks(); - rAxisLabelProperties.nRhythm = 1; + rAxisLabelProperties.m_nRhythm = 1; return false; } // Try incrementing the tick interval and start over. - rAxisLabelProperties.nRhythm++; - removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget ); + rAxisLabelProperties.m_nRhythm++; + removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget ); return false; } } @@ -944,7 +944,7 @@ bool VCartesianAxis::createTextShapesSimple( AxisLabelProperties& rAxisLabelProperties, TickFactory2D const * pTickFactory ) { FixedNumberFormatter aFixedNumberFormatter( - m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey ); + m_xNumberFormatsSupplier, rAxisLabelProperties.m_nNumberFormatKey ); const bool bIsHorizontalAxis = pTickFactory->isHorizontalAxis(); const bool bIsVerticalAxis = pTickFactory->isVerticalAxis(); @@ -979,28 +979,28 @@ bool VCartesianAxis::createTextShapesSimple( const TickInfo* pLastVisibleNeighbourTickInfo = pPreviousVisibleTickInfo; //don't create labels which does not fit into the rhythm - if( nTick%rAxisLabelProperties.nRhythm != 0 ) + if( nTick%rAxisLabelProperties.m_nRhythm != 0 ) continue; //don't create labels for invisible ticks if( !pTickInfo->bPaintIt ) continue; - if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed ) + if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed ) { // Overlapping is not allowed. If the label overlaps with its // neighboring label, try increasing the tick interval (or rhythm // as it's called) and start over. if( lcl_doesShapeOverlapWithTickmark( *pLastVisibleNeighbourTickInfo->xTextShape - , rAxisLabelProperties.fRotationAngleDegree + , rAxisLabelProperties.m_fRotationAngleDegree , pTickInfo->aTickScreenPosition ) ) { // This tick overlaps with its neighbor. Increment the visible // tick intervals (if that's allowed) and start over. - rAxisLabelProperties.nRhythm++; - removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget ); + rAxisLabelProperties.m_nRhythm++; + removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget ); return false; } } @@ -1032,13 +1032,13 @@ bool VCartesianAxis::createTextShapesSimple( if(!pTickInfo->xTextShape.is()) continue; - recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ); + recordMaximumTextSize( *pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree ); //if NO OVERLAP -> remove overlapping shapes - if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed ) + if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.m_bOverlapAllowed ) { // Check if the label still overlaps with its neighbor. - if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ) ) + if( doesOverlap( pLastVisibleNeighbourTickInfo->xTextShape, pTickInfo->xTextShape, rAxisLabelProperties.m_fRotationAngleDegree ) ) { // It overlaps. if( isAutoRotatingOfLabelsAllowed(rAxisLabelProperties, bIsHorizontalAxis, bIsVerticalAxis) ) @@ -1049,15 +1049,15 @@ bool VCartesianAxis::createTextShapesSimple( // The nRhythm parameter is reset to 1 since the layout // used for text labels is changed. rAxisLabelProperties.autoRotate45(); - m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; // Store it for future runs. + m_aAxisLabelProperties.m_fRotationAngleDegree = rAxisLabelProperties.m_fRotationAngleDegree; // Store it for future runs. removeTextShapesFromTicks(); - rAxisLabelProperties.nRhythm = 1; + rAxisLabelProperties.m_nRhythm = 1; return false; } // Try incrementing the tick interval and start over. - rAxisLabelProperties.nRhythm++; - removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.nRhythm, nTick, xTarget ); + rAxisLabelProperties.m_nRhythm++; + removeShapesAtWrongRhythm( rTickIter, rAxisLabelProperties.m_nRhythm, nTick, xTarget ); return false; } } @@ -1556,7 +1556,7 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount() // tdf#48041: do not duplicate the value labels because of rounding if (m_aAxisProperties.m_nAxisType != css::chart2::AxisType::DATE) { - FixedNumberFormatter aFixedNumberFormatterTest(m_xNumberFormatsSupplier, m_aAxisLabelProperties.nNumberFormatKey); + FixedNumberFormatter aFixedNumberFormatterTest(m_xNumberFormatsSupplier, m_aAxisLabelProperties.m_nNumberFormatKey); OUString sPreviousValueLabel; sal_Int32 nSameLabel = 0; for (sal_Int32 nLabel = 0; nLabel < static_cast<sal_Int32>(m_aAllTickInfos[0].size()); ++nLabel) @@ -1610,7 +1610,7 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel std::unique_ptr<TickIter> apTickIter(createLabelTickIterator(nTextLevel)); if (apTickIter) { - double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree; + double fRotationAngleDegree = m_aAxisLabelProperties.m_fRotationAngleDegree; if( nTextLevel>0 ) { lcl_shiftLabels(*apTickIter, aCumulatedLabelsDistance); @@ -1630,8 +1630,8 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel { if( !m_aAllTickInfos.empty() ) { - LabelIterator aInnerIter( m_aAllTickInfos[0], rAxisLabelProperties.eStaggering, true ); - LabelIterator aOuterIter( m_aAllTickInfos[0], rAxisLabelProperties.eStaggering, false ); + LabelIterator aInnerIter( m_aAllTickInfos[0], rAxisLabelProperties.m_eStaggering, true ); + LabelIterator aOuterIter( m_aAllTickInfos[0], rAxisLabelProperties.m_eStaggering, false ); lcl_shiftLabels( aOuterIter , lcl_getLabelsDistance( aInnerIter @@ -1677,15 +1677,15 @@ void VCartesianAxis::createLabels() AxisLabelProperties aComplexProps(m_aAxisLabelProperties); if( m_aAxisProperties.m_bComplexCategories ) { - aComplexProps.bLineBreakAllowed = true; - aComplexProps.bOverlapAllowed = aComplexProps.fRotationAngleDegree != 0.0; + aComplexProps.m_bLineBreakAllowed = true; + aComplexProps.m_bOverlapAllowed = aComplexProps.m_fRotationAngleDegree != 0.0; if( nTextLevel > 0 ) { //multilevel labels: 0 or 90 by default if( m_aAxisProperties.m_bSwapXAndY ) - aComplexProps.fRotationAngleDegree = 90.0; + aComplexProps.m_fRotationAngleDegree = 90.0; else - aComplexProps.fRotationAngleDegree = 0.0; + aComplexProps.m_fRotationAngleDegree = 0.0; } } AxisLabelProperties& rAxisLabelProperties = m_aAxisProperties.m_bComplexCategories ? aComplexProps : m_aAxisLabelProperties; @@ -1720,10 +1720,10 @@ void VCartesianAxis::createMaximumLabels() AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties ); if( isAutoStaggeringOfLabelsAllowed( aAxisLabelProperties, pTickFactory2D->isHorizontalAxis(), pTickFactory2D->isVerticalAxis() ) ) - aAxisLabelProperties.eStaggering = AxisLabelStaggering::StaggerEven; + aAxisLabelProperties.m_eStaggering = AxisLabelStaggering::StaggerEven; - aAxisLabelProperties.bOverlapAllowed = true; - aAxisLabelProperties.bLineBreakAllowed = false; + aAxisLabelProperties.m_bOverlapAllowed = true; + aAxisLabelProperties.m_bLineBreakAllowed = false; sal_Int32 nTextLevelCount = getTextLevelCount(); for( sal_Int32 nTextLevel=0; nTextLevel<nTextLevelCount; nTextLevel++ ) { @@ -1766,7 +1766,7 @@ void VCartesianAxis::updatePositions() static_cast<sal_Int32>(aTickScreenPos2D.getX()) ,static_cast<sal_Int32>(aTickScreenPos2D.getY())); - double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree; + double fRotationAngleDegree = m_aAxisLabelProperties.m_fRotationAngleDegree; if( nDepth > 0 ) { //multilevel labels: 0 or 90 by default @@ -1858,7 +1858,7 @@ void VCartesianAxis::createShapes() std::unique_ptr< TickIter > apTickIter(createLabelTickIterator( nTextLevel )); if( apTickIter ) { - double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree; + double fRotationAngleDegree = m_aAxisLabelProperties.m_fRotationAngleDegree; if( nTextLevel > 0 ) { //Multi-level Labels: default to 0 or 90 diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx index fad802e107a8..533ffbc92dd1 100644 --- a/chart2/source/view/axes/VPolarAngleAxis.cxx +++ b/chart2/source/view/axes/VPolarAngleAxis.cxx @@ -54,7 +54,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis( , double fLogicZ ) { FixedNumberFormatter aFixedNumberFormatter( - m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey ); + m_xNumberFormatsSupplier, rAxisLabelProperties.m_nNumberFormatKey ); //prepare text properties for multipropertyset-interface of shape tNameSequence aPropNames; @@ -80,7 +80,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis( ; pTickInfo = rTickIter.nextInfo(), nTick++ ) { //don't create labels which does not fit into the rhythm - if( nTick%rAxisLabelProperties.nRhythm != 0) + if( nTick%rAxisLabelProperties.m_nRhythm != 0) continue; //don't create labels for invisible ticks @@ -120,10 +120,10 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis( LabelPositionHelper::changeTextAdjustment( aPropValues, aPropNames, eLabelAlignment ); // #i78696# use mathematically correct rotation now - const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.fRotationAngleDegree)); + const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.m_fRotationAngleDegree)); uno::Any aATransformation = ShapeFactory::makeTransformation( aAnchorScreenPosition2D, fRotationAnglePi ); - OUString aStackedLabel = ShapeFactory::getStackedString( aLabel, rAxisLabelProperties.bStackCharacters ); + OUString aStackedLabel = ShapeFactory::getStackedString( aLabel, rAxisLabelProperties.m_bStackCharacters ); pTickInfo->xTextShape = ShapeFactory::createText( xTarget, aStackedLabel, aPropNames, aPropValues, aATransformation ); } @@ -170,7 +170,7 @@ void VPolarAngleAxis::createLabels() removeTextShapesFromTicks(); AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties ); - aAxisLabelProperties.bOverlapAllowed = true; + aAxisLabelProperties.m_bOverlapAllowed = true; double const fLogicZ = 1.0;//as defined createTextShapes_ForAngleAxis( m_xTextTarget, aTickIter , aAxisLabelProperties |