diff options
Diffstat (limited to 'chart2/source/view/axes/VCartesianAxis.cxx')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index c53f890a07a6..9493102a93c4 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -104,25 +104,13 @@ Reference< drawing::XShape > createSingleLabel( bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& xShape , double fRotationAngleDegree - , const basegfx::B2DVector& rTickScreenPosition - , bool bIsHorizontalAxis, bool bIsVerticalAxis ) + , const basegfx::B2DVector& rTickScreenPosition ) { if(!xShape.is()) return false; ::basegfx::B2IRectangle aShapeRect = BaseGFXHelper::makeRectangle(xShape->getPosition(),AbstractShapeFactory::getSizeAfterRotation( xShape, fRotationAngleDegree )); - if( bIsVerticalAxis ) - { - return ( (rTickScreenPosition.getY() >= aShapeRect.getMinY()) - && (rTickScreenPosition.getY() <= aShapeRect.getMaxY()) ); - } - if( bIsHorizontalAxis ) - { - return ( (rTickScreenPosition.getX() >= aShapeRect.getMinX()) - && (rTickScreenPosition.getX() <= aShapeRect.getMaxX()) ); - } - basegfx::B2IVector aPosition( static_cast<sal_Int32>( rTickScreenPosition.getX() ) , static_cast<sal_Int32>( rTickScreenPosition.getY() ) ); @@ -744,8 +732,7 @@ bool VCartesianAxis::createTextShapes( if( lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape , rAxisLabelProperties.fRotationAngleDegree - , pTickInfo->aTickScreenPosition - , bIsHorizontalAxis, bIsVerticalAxis ) ) + , pTickInfo->aTickScreenPosition ) ) { // This tick overlaps with its neighbor. Try to stagger (if // auto staggering is allowed) to avoid overlapping. @@ -759,8 +746,7 @@ bool VCartesianAxis::createTextShapes( if( !pLastVisibleNeighbourTickInfo || !lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape , rAxisLabelProperties.fRotationAngleDegree - , pTickInfo->aTickScreenPosition - , bIsHorizontalAxis, bIsVerticalAxis ) ) + , pTickInfo->aTickScreenPosition ) ) bOverlapsAfterAutoStagger = false; } @@ -841,8 +827,7 @@ bool VCartesianAxis::createTextShapes( if( !pLastVisibleNeighbourTickInfo || !lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape , rAxisLabelProperties.fRotationAngleDegree - , pTickInfo->aTickScreenPosition - , bIsHorizontalAxis, bIsVerticalAxis ) ) + , pTickInfo->aTickScreenPosition ) ) bOverlapsAfterAutoStagger = false; } } @@ -933,8 +918,7 @@ bool VCartesianAxis::createTextShapesSimple( if( lcl_doesShapeOverlapWithTickmark( pLastVisibleNeighbourTickInfo->xTextShape , rAxisLabelProperties.fRotationAngleDegree - , pTickInfo->aTickScreenPosition - , bIsHorizontalAxis, bIsVerticalAxis ) ) + , pTickInfo->aTickScreenPosition ) ) { // This tick overlaps with its neighbor. Increment the visible // tick intervals (if that's allowed) and start over. |