summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes/VCartesianAxis.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-10-05 01:50:11 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-19 13:47:33 +0100
commitee5ef16d352bdcb2eb8fe1f4530b7f5c43bed911 (patch)
tree8825e9036147ec627a0c434d071d2dfdd16e451f /chart2/source/view/axes/VCartesianAxis.cxx
parent5c0a5503b692fa29b167e1b9a317fc77ef1baaf0 (diff)
make it possible to switch between different ShapeFactories
Change-Id: I49f6b16182c25ead486a15ab86f722902b36933e
Diffstat (limited to 'chart2/source/view/axes/VCartesianAxis.cxx')
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index b022fdf2fa39..be3922b2572c 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -21,7 +21,7 @@
#include "VCartesianAxis.hxx"
#include "PlottingPositionHelper.hxx"
-#include "ShapeFactory.hxx"
+#include "AbstractShapeFactory.hxx"
#include "CommonConverters.hxx"
#include "macros.hxx"
#include "ViewDefines.hxx"
@@ -93,11 +93,11 @@ Reference< drawing::XShape > createSingleLabel(
// #i78696# use mathematically correct rotation now
const double fRotationAnglePi(rAxisLabelProperties.fRotationAngleDegree * (F_PI / -180.0));
- uno::Any aATransformation = ShapeFactory::makeTransformation( rAnchorScreenPosition2D, fRotationAnglePi );
- OUString aLabel = ShapeFactory::getStackedString( rLabel, rAxisLabelProperties.bStackCharacters );
+ uno::Any aATransformation = AbstractShapeFactory::makeTransformation( rAnchorScreenPosition2D, fRotationAnglePi );
+ OUString aLabel = AbstractShapeFactory::getStackedString( rLabel, rAxisLabelProperties.bStackCharacters );
- Reference< drawing::XShape > xShape2DText = ShapeFactory(xShapeFactory)
- .createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation );
+ Reference< drawing::XShape > xShape2DText = AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory)
+ ->createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation );
LabelPositionHelper::correctPositionForRotation( xShape2DText
, rAxisProperties.m_aLabelAlignment, rAxisLabelProperties.fRotationAngleDegree, rAxisProperties.m_bComplexCategories );
@@ -113,7 +113,7 @@ bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& xShap
if(!xShape.is())
return false;
- ::basegfx::B2IRectangle aShapeRect = BaseGFXHelper::makeRectangle(xShape->getPosition(),ShapeFactory::getSizeAfterRotation( xShape, fRotationAngleDegree ));
+ ::basegfx::B2IRectangle aShapeRect = BaseGFXHelper::makeRectangle(xShape->getPosition(),AbstractShapeFactory::getSizeAfterRotation( xShape, fRotationAngleDegree ));
if( bIsVerticalAxis )
{
@@ -293,7 +293,7 @@ B2DVector lcl_getLabelsDistance( TickIter& rIter, const B2DVector& rDistanceTick
xShape2DText = pTickInfo->xTextShape;
if( xShape2DText.is() )
{
- awt::Size aSize = ShapeFactory::getSizeAfterRotation( xShape2DText, fRotationAngleDegree );
+ awt::Size aSize = AbstractShapeFactory::getSizeAfterRotation( xShape2DText, fRotationAngleDegree );
if(fabs(aStaggerDirection.getX())>fabs(aStaggerDirection.getY()))
nDistance = ::std::max(nDistance,aSize.Width);
else
@@ -1525,7 +1525,7 @@ void VCartesianAxis::updatePositions()
// #i78696# use mathematically correct rotation now
const double fRotationAnglePi(fRotationAngleDegree * (F_PI / -180.0));
- uno::Any aATransformation = ShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
+ uno::Any aATransformation = AbstractShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
//set new position
uno::Reference< beans::XPropertySet > xProp( xShape2DText, uno::UNO_QUERY );