Kaydet (Commit) d99af1a6 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:mergeclasses AbstractShapeFactory into ShapeFactory

Change-Id: I9cc607bcc84a14ffdbe22bdbe1a038f5b22b719a
Reviewed-on: https://gerrit.libreoffice.org/58871
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst b26f83b1
......@@ -108,7 +108,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/view/main/PolarLabelPositionHelper \
chart2/source/view/main/PropertyMapper \
chart2/source/view/main/ShapeFactory \
chart2/source/view/main/AbstractShapeFactory \
chart2/source/view/main/Stripe \
chart2/source/view/main/VDataSeries \
chart2/source/view/main/VLegend \
......
......@@ -19,7 +19,7 @@
#include "VCartesianAxis.hxx"
#include <PlottingPositionHelper.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <CommonConverters.hxx>
#include <ViewDefines.hxx>
#include <PropertyMapper.hxx>
......@@ -93,7 +93,7 @@ void lcl_ResizeTextShapeToFitAvailableSpace( Reference< drawing::XShape > const
sal_Int32 nMaxLabelsHeight = nFullHeight - rAxisLabelProperties.m_aMaximumSpaceForLabels.Height - rAxisLabelProperties.m_aMaximumSpaceForLabels.Y;
const sal_Int32 nAvgCharWidth = xShape2DText->getSize().Width / rLabel.getLength();
const sal_Int32 nTextSize = AbstractShapeFactory::getSizeAfterRotation( xShape2DText,
const sal_Int32 nTextSize = ShapeFactory::getSizeAfterRotation( xShape2DText,
rAxisLabelProperties.fRotationAngleDegree ).Height;
if( !nAvgCharWidth )
......@@ -138,10 +138,10 @@ Reference< drawing::XShape > createSingleLabel(
// #i78696# use mathematically correct rotation now
const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.fRotationAngleDegree));
uno::Any aATransformation = AbstractShapeFactory::makeTransformation( rAnchorScreenPosition2D, fRotationAnglePi );
OUString aLabel = AbstractShapeFactory::getStackedString( rLabel, rAxisLabelProperties.bStackCharacters );
uno::Any aATransformation = ShapeFactory::makeTransformation( rAnchorScreenPosition2D, fRotationAnglePi );
OUString aLabel = ShapeFactory::getStackedString( rLabel, rAxisLabelProperties.bStackCharacters );
Reference< drawing::XShape > xShape2DText = AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory)
Reference< drawing::XShape > xShape2DText = ShapeFactory::getOrCreateShapeFactory(xShapeFactory)
->createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation );
if( rAxisProperties.m_bLimitSpaceForLabels )
......@@ -160,7 +160,7 @@ bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& xShap
if(!xShape.is())
return false;
::basegfx::B2IRectangle aShapeRect = BaseGFXHelper::makeRectangle(xShape->getPosition(),AbstractShapeFactory::getSizeAfterRotation( xShape, fRotationAngleDegree ));
::basegfx::B2IRectangle aShapeRect = BaseGFXHelper::makeRectangle(xShape->getPosition(), ShapeFactory::getSizeAfterRotation( xShape, fRotationAngleDegree ));
basegfx::B2IVector aPosition(
static_cast<sal_Int32>( rTickScreenPosition.getX() )
......@@ -331,7 +331,7 @@ B2DVector lcl_getLabelsDistance( TickIter& rIter, const B2DVector& rDistanceTick
xShape2DText = pTickInfo->xTextShape;
if( xShape2DText.is() )
{
awt::Size aSize = AbstractShapeFactory::getSizeAfterRotation( xShape2DText, fRotationAngleDegree );
awt::Size aSize = ShapeFactory::getSizeAfterRotation( xShape2DText, fRotationAngleDegree );
if(fabs(aStaggerDirection.getX())>fabs(aStaggerDirection.getY()))
nDistance = std::max(nDistance,aSize.Width);
else
......@@ -1714,7 +1714,7 @@ void VCartesianAxis::updatePositions()
// #i78696# use mathematically correct rotation now
const double fRotationAnglePi(-basegfx::deg2rad(fRotationAngleDegree));
uno::Any aATransformation = AbstractShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
uno::Any aATransformation = ShapeFactory::makeTransformation(aAnchorScreenPosition2D, fRotationAnglePi);
//set new position
uno::Reference< beans::XPropertySet > xProp( xShape2DText, uno::UNO_QUERY );
......@@ -1848,7 +1848,7 @@ void VCartesianAxis::createShapes()
m_xGroupShape_Shapes, aPoints
, &m_aAxisProperties.m_aLineProperties );
//because of this name this line will be used for marking the axis
::chart::AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
::chart::ShapeFactory::setShapeName( xShape, "MarkHandles" );
}
//create an additional line at NULL
if( !AxisHelper::isAxisPositioningEnabled() )
......
......@@ -272,7 +272,7 @@ void VCartesianGrid::createShapes()
aHandleLineProperties.LineStyle <<= drawing::LineStyle_NONE;
Reference< drawing::XShape > xHandleShape =
m_pShapeFactory->createLine2D( xTarget, aHandlesPoints, &aHandleLineProperties );
::chart::AbstractShapeFactory::setShapeName( xHandleShape, "HandlesOnly" );
::chart::ShapeFactory::setShapeName( xHandleShape, "HandlesOnly" );
}
else //if(2!=m_nDimension)
{
......
......@@ -23,7 +23,7 @@
#include "VPolarCoordinateSystem.hxx"
#include <ScaleAutomatism.hxx>
#include <VSeriesPlotter.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <servicenames_coosystems.hxx>
#include <AxisIndexDefines.hxx>
#include <ObjectIdentifier.hxx>
......@@ -107,7 +107,7 @@ void VCoordinateSystem::initPlottingTargets( const Reference< drawing::XShapes
sal_Int32 nDimensionCount = m_xCooSysModel->getDimension();
//create group shape for grids first thus axes are always painted above grids
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory);
ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xShapeFactory);
if(nDimensionCount==2)
{
//create and add to target
......
......@@ -21,7 +21,7 @@
#include "VPolarAngleAxis.hxx"
#include "VPolarGrid.hxx"
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <NumberFormatterWrapper.hxx>
#include <PolarLabelPositionHelper.hxx>
#include <tools/color.hxx>
......@@ -52,7 +52,7 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
, double fLogicRadius
, double fLogicZ )
{
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
FixedNumberFormatter aFixedNumberFormatter(
m_xNumberFormatsSupplier, rAxisLabelProperties.nNumberFormatKey );
......@@ -123,8 +123,8 @@ void VPolarAngleAxis::createTextShapes_ForAngleAxis(
// #i78696# use mathematically correct rotation now
const double fRotationAnglePi(-basegfx::deg2rad(rAxisLabelProperties.fRotationAngleDegree));
uno::Any aATransformation = AbstractShapeFactory::makeTransformation( aAnchorScreenPosition2D, fRotationAnglePi );
OUString aStackedLabel = AbstractShapeFactory::getStackedString( aLabel, rAxisLabelProperties.bStackCharacters );
uno::Any aATransformation = ShapeFactory::makeTransformation( aAnchorScreenPosition2D, fRotationAnglePi );
OUString aStackedLabel = ShapeFactory::getStackedString( aLabel, rAxisLabelProperties.bStackCharacters );
pTickInfo->xTextShape = pShapeFactory->createText( xTarget, aStackedLabel, aPropNames, aPropValues, aATransformation );
}
......@@ -198,7 +198,7 @@ void VPolarAngleAxis::createShapes()
uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D(
m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties );
//because of this name this line will be used for marking the axis
::chart::AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
::chart::ShapeFactory::setShapeName( xShape, "MarkHandles" );
//create labels
createLabels();
......
......@@ -205,7 +205,7 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic
Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D(
xTarget, aAllPoints, &rLinePropertiesList[nDepth] );
//because of this name this line will be used for marking
::chart::AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
::chart::ShapeFactory::setShapeName( xShape, "MarkHandles" );
}
}
......
......@@ -19,7 +19,7 @@
#include "AreaChart.hxx"
#include <PlottingPositionHelper.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <CommonConverters.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <ViewDefines.hxx>
......@@ -406,7 +406,7 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
Clipping::clipPolygonAtRectangle( *pSeriesPoly, pPosHelper->getScaledLogicClipDoubleRect(), aPoly );
}
if(!AbstractShapeFactory::hasPolygonAnyLines(aPoly))
if(!ShapeFactory::hasPolygonAnyLines(aPoly))
return false;
//transformation 3) -> 4)
......@@ -448,7 +448,7 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
, pSeries->getPropertiesOfSeries()
, PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
//because of this name this line will be used for marking
::chart::AbstractShapeFactory::setShapeName(xShape, "MarkHandles");
::chart::ShapeFactory::setShapeName(xShape, "MarkHandles");
}
return true;
}
......@@ -492,17 +492,17 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries
{
appendPoly( aPoly, *pPreviousSeriesPoly );
}
AbstractShapeFactory::closePolygon(aPoly);
ShapeFactory::closePolygon(aPoly);
//apply clipping
{
drawing::PolyPolygonShape3D aClippedPoly;
Clipping::clipPolygonAtRectangle( aPoly, pPosHelper->getScaledLogicClipDoubleRect(), aClippedPoly, false );
AbstractShapeFactory::closePolygon(aClippedPoly); //again necessary after clipping
ShapeFactory::closePolygon(aClippedPoly); //again necessary after clipping
aPoly = aClippedPoly;
}
if(!AbstractShapeFactory::hasPolygonAnyLines(aPoly))
if(!ShapeFactory::hasPolygonAnyLines(aPoly))
return false;
//transformation 3) -> 4)
......@@ -524,7 +524,7 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries
, pSeries->getPropertiesOfSeries()
, PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
//because of this name this line will be used for marking
::chart::AbstractShapeFactory::setShapeName(xShape, "MarkHandles");
::chart::ShapeFactory::setShapeName(xShape, "MarkHandles");
return true;
}
......
......@@ -19,7 +19,7 @@
#include "BubbleChart.hxx"
#include <PlottingPositionHelper.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <CommonConverters.hxx>
#include <ViewDefines.hxx>
#include <ObjectIdentifier.hxx>
......@@ -304,7 +304,7 @@ void BubbleChart::createShapes()
}
}
::chart::AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
::chart::ShapeFactory::setShapeName( xShape, "MarkHandles" );
//create data point label
if( pSeries->getDataPointLabelIfLabel(nIndex) )
......
......@@ -19,7 +19,7 @@
#include "NetChart.hxx"
#include <PlottingPositionHelper.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <ExplicitCategoriesProvider.hxx>
#include <CommonConverters.hxx>
#include <ViewDefines.hxx>
......@@ -127,7 +127,7 @@ bool NetChart::impl_createLine( VDataSeries* pSeries
drawing::PolyPolygonShape3D aPoly;
{
bool bIsClipped = false;
if( !AbstractShapeFactory::isPolygonEmptyOrSinglePoint(*pSeriesPoly) )
if( !ShapeFactory::isPolygonEmptyOrSinglePoint(*pSeriesPoly) )
{
// do NOT connect last and first point, if one is NAN, and NAN handling is NAN_AS_GAP
double fFirstY = pSeries->getYValue( 0 );
......@@ -150,7 +150,7 @@ bool NetChart::impl_createLine( VDataSeries* pSeries
Clipping::clipPolygonAtRectangle( *pSeriesPoly, pPosHelper->getScaledLogicClipDoubleRect(), aPoly );
}
if(!AbstractShapeFactory::hasPolygonAnyLines(aPoly))
if(!ShapeFactory::hasPolygonAnyLines(aPoly))
return false;
//transformation 3) -> 4)
......@@ -165,7 +165,7 @@ bool NetChart::impl_createLine( VDataSeries* pSeries
, pSeries->getPropertiesOfSeries()
, PropertyMapper::getPropertyNameMapForLineSeriesProperties() );
//because of this name this line will be used for marking
::chart::AbstractShapeFactory::setShapeName(xShape, "MarkHandles");
::chart::ShapeFactory::setShapeName(xShape, "MarkHandles");
}
return true;
}
......@@ -182,7 +182,7 @@ bool NetChart::impl_createArea( VDataSeries* pSeries
drawing::PolyPolygonShape3D aPoly( *pSeriesPoly );
//add second part to the polygon (grounding points or previous series points)
if( !AbstractShapeFactory::isPolygonEmptyOrSinglePoint(*pSeriesPoly) )
if( !ShapeFactory::isPolygonEmptyOrSinglePoint(*pSeriesPoly) )
{
if( pPreviousSeriesPoly )
addPolygon( aPoly, *pPreviousSeriesPoly );
......@@ -212,17 +212,17 @@ bool NetChart::impl_createArea( VDataSeries* pSeries
{
appendPoly( aPoly, *pPreviousSeriesPoly );
}
AbstractShapeFactory::closePolygon(aPoly);
ShapeFactory::closePolygon(aPoly);
//apply clipping
{
drawing::PolyPolygonShape3D aClippedPoly;
Clipping::clipPolygonAtRectangle( aPoly, pPosHelper->getScaledLogicClipDoubleRect(), aClippedPoly, false );
AbstractShapeFactory::closePolygon(aClippedPoly); //again necessary after clipping
ShapeFactory::closePolygon(aClippedPoly); //again necessary after clipping
aPoly = aClippedPoly;
}
if(!AbstractShapeFactory::hasPolygonAnyLines(aPoly))
if(!ShapeFactory::hasPolygonAnyLines(aPoly))
return false;
//transformation 3) -> 4)
......@@ -236,7 +236,7 @@ bool NetChart::impl_createArea( VDataSeries* pSeries
, pSeries->getPropertiesOfSeries()
, PropertyMapper::getPropertyNameMapForFilledSeriesProperties() );
//because of this name this line will be used for marking
::chart::AbstractShapeFactory::setShapeName(xShape, "MarkHandles");
::chart::ShapeFactory::setShapeName(xShape, "MarkHandles");
return true;
}
......
......@@ -21,7 +21,7 @@
#include <VLineProperties.hxx>
#include "PieChart.hxx"
#include <PlottingPositionHelper.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <PolarLabelPositionHelper.hxx>
#include <CommonConverters.hxx>
#include <ViewDefines.hxx>
......@@ -687,7 +687,7 @@ void PieChart::createShapes()
if(!bDoExplode)
{
AbstractShapeFactory::setShapeName( xPointShape
ShapeFactory::setShapeName( xPointShape
, ObjectIdentifier::createPointCID( pSeries->getPointCID_Stub(), nPointIndex ) );
}
else try
......@@ -714,7 +714,7 @@ void PieChart::createShapes()
nOffsetPercent, aMinimumPosition, aMaximumPosition )
) );
AbstractShapeFactory::setShapeName( xPointShape
ShapeFactory::setShapeName( xPointShape
, ObjectIdentifier::createPointCID( aPointCIDStub, nPointIndex ) );
}
catch( const uno::Exception& e )
......
......@@ -20,7 +20,7 @@
#include <memory>
#include <VSeriesPlotter.hxx>
#include <VLineProperties.hxx>
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <chartview/ExplicitValueProvider.hxx>
#include <svl/zformat.hxx>
......@@ -633,9 +633,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
(*pPropValues)[ nProperties ] <<= style::ParagraphAdjust_CENTER;
// create text shape
xTextShape = AbstractShapeFactory::getOrCreateShapeFactory( m_xShapeFactory )->
xTextShape = ShapeFactory::getOrCreateShapeFactory( m_xShapeFactory )->
createText( xTarget_, aFormattedLabels, *pPropNames, *pPropValues,
AbstractShapeFactory::makeTransformation( aScreenPosition2D ) );
ShapeFactory::makeTransformation( aScreenPosition2D ) );
}
else if( bMultiLineLabel )
{
......@@ -655,9 +655,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
aParaPropValues[2][0] <<= style::ParagraphAdjust_CENTER;
//create text shape
xTextShape = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->
xTextShape = ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->
createText( xTarget_, aTextList, aParaPropNames, aParaPropValues
, *pPropNames, *pPropValues, AbstractShapeFactory::makeTransformation( aScreenPosition2D ) );
, *pPropNames, *pPropValues, ShapeFactory::makeTransformation( aScreenPosition2D ) );
}
else
{
......@@ -676,9 +676,9 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
}
//create text shape
xTextShape = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->
xTextShape = ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->
createText( xTarget_, aText.makeStringAndClear()
, *pPropNames, *pPropValues, AbstractShapeFactory::makeTransformation( aScreenPosition2D ) );
, *pPropNames, *pPropValues, ShapeFactory::makeTransformation( aScreenPosition2D ) );
}
if( !xTextShape.is() )
......@@ -727,7 +727,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
const double fDegreesPi( -basegfx::deg2rad(fRotationDegrees) );
uno::Reference< beans::XPropertySet > xProp( xTextShape, uno::UNO_QUERY );
if( xProp.is() )
xProp->setPropertyValue( "Transformation", AbstractShapeFactory::makeTransformation( aScreenPosition2D, fDegreesPi ) );
xProp->setPropertyValue( "Transformation", ShapeFactory::makeTransformation( aScreenPosition2D, fDegreesPi ) );
LabelPositionHelper::correctPositionForRotation( xTextShape, eAlignment, fRotationDegrees, true /*bRotateAroundCenter*/ );
}
......@@ -1262,7 +1262,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
createGroupShape( xTarget, rVDataSeries.getDataCurveCID( nN, bAverageLine ) );
uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D(
xRegressionGroupShapes, PolyToPointSequence( aRegressionPoly ), &aVLineProperties );
AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
ShapeFactory::setShapeName( xShape, "MarkHandles" );
aDefaultPos = xShape->getPosition();
}
......@@ -1400,12 +1400,12 @@ void VSeriesPlotter::createRegressionCurveEquationShapes(
uno::Reference< drawing::XShape > xTextShape = m_pShapeFactory->createText(
xEquationTarget, aFormula.makeStringAndClear(),
aNames, aValues, AbstractShapeFactory::makeTransformation( aScreenPosition2D ));
aNames, aValues, ShapeFactory::makeTransformation( aScreenPosition2D ));
OSL_ASSERT( xTextShape.is());
if( xTextShape.is())
{
AbstractShapeFactory::setShapeName( xTextShape, rEquationCID );
ShapeFactory::setShapeName( xTextShape, rEquationCID );
awt::Size aSize( xTextShape->getSize() );
awt::Point aPos( RelativePositionHelper::getUpperLeftCornerOfAnchoredObject(
aScreenPosition2D, aSize, aRelativePosition.Anchor ) );
......@@ -2475,7 +2475,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx )
{
// symbol
uno::Reference< drawing::XShapes > xSymbolGroup( AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget ));
uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget ));
// create the symbol
Reference< drawing::XShape > xShape( createLegendSymbolForPoint( rEntryKeyAspectRatio,
......@@ -2489,7 +2489,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) );
aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
AbstractShapeFactory::setShapeName( xShape, aCID );
ShapeFactory::setShapeName( xShape, aCID );
}
// label
......@@ -2504,7 +2504,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
else
{
// symbol
uno::Reference< drawing::XShapes > xSymbolGroup( AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget ));
uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget ));
// create the symbol
Reference< drawing::XShape > xShape( createLegendSymbolForSeries(
......@@ -2517,7 +2517,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
AbstractShapeFactory::setShapeName( xShape, aCID );
ShapeFactory::setShapeName( xShape, aCID );
}
// label
......@@ -2547,7 +2547,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aResStr, xTextProperties );
// symbol
uno::Reference< drawing::XShapes > xSymbolGroup( AbstractShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget ));
uno::Reference< drawing::XShapes > xSymbolGroup( ShapeFactory::getOrCreateShapeFactory(xShapeFactory)->createGroup2D( xTarget ));
// create the symbol
Reference< drawing::XShape > xShape( VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
......@@ -2565,7 +2565,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) );
aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
AbstractShapeFactory::setShapeName( xShape, aCID );
ShapeFactory::setShapeName( xShape, aCID );
}
aResult.push_back(aEntry);
......
......@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <VDiagram.hxx>
#include <PropertyMapper.hxx>
#include <ViewDefines.hxx>
......@@ -94,7 +94,7 @@ void VDiagram::init(
m_xTarget = xTarget;
m_xShapeFactory = xFactory;
m_pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(xFactory);
m_pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xFactory);
}
void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize )
......@@ -131,10 +131,10 @@ void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize )
//do not change aspect ratio
awt::Size aAspectRatio( static_cast<sal_Int32>(m_aPreferredAspectRatio.DirectionX*FIXED_SIZE_FOR_3D_CHART_VOLUME),
static_cast<sal_Int32>(m_aPreferredAspectRatio.DirectionY*FIXED_SIZE_FOR_3D_CHART_VOLUME ));
m_aCurrentSizeWithoutAxes = awt::Size( AbstractShapeFactory::calculateNewSizeRespectingAspectRatio(
m_aCurrentSizeWithoutAxes = awt::Size( ShapeFactory::calculateNewSizeRespectingAspectRatio(
rAvailableSize, aAspectRatio ) );
//center diagram position
m_aCurrentPosWithoutAxes = awt::Point( AbstractShapeFactory::calculateTopLeftPositionToCenterObject(
m_aCurrentPosWithoutAxes = awt::Point( ShapeFactory::calculateTopLeftPositionToCenterObject(
rPos, rAvailableSize, m_aCurrentSizeWithoutAxes ) );
}
......@@ -170,7 +170,7 @@ void VDiagram::createShapes_2d()
//add back wall
{
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
ShapeFactory* pShapeFactory = ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
m_xWall2D = pShapeFactory->createRectangle(
xGroupForWall );
......@@ -190,7 +190,7 @@ void VDiagram::createShapes_2d()
{
//we always need this object as dummy object for correct scene dimensions
//but it should not be visible in this case:
AbstractShapeFactory::makeShapeInvisible( m_xWall2D );
ShapeFactory::makeShapeInvisible( m_xWall2D );
}
else
{
......@@ -455,12 +455,12 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize )
adjustAspectRatio3d( rAvailableSize );
//do not change aspect ratio of 3D scene with 2D bound rect
m_aCurrentSizeWithoutAxes = AbstractShapeFactory::calculateNewSizeRespectingAspectRatio(
m_aCurrentSizeWithoutAxes = ShapeFactory::calculateNewSizeRespectingAspectRatio(
rAvailableSize, m_xOuterGroupShape->getSize() );
m_xOuterGroupShape->setSize( m_aCurrentSizeWithoutAxes );
//center diagram position
m_aCurrentPosWithoutAxes= AbstractShapeFactory::calculateTopLeftPositionToCenterObject(
m_aCurrentPosWithoutAxes= ShapeFactory::calculateTopLeftPositionToCenterObject(
rPos, rAvailableSize, m_aCurrentSizeWithoutAxes );
m_xOuterGroupShape->setPosition(m_aCurrentPosWithoutAxes);
......@@ -527,7 +527,7 @@ void VDiagram::createShapes_3d()
{
//we always need this object as dummy object for correct scene dimensions
//but it should not be visible in this case:
AbstractShapeFactory::makeShapeInvisible( xShape );
ShapeFactory::makeShapeInvisible( xShape );
}
}
//add back wall
......@@ -555,7 +555,7 @@ void VDiagram::createShapes_3d()
{
//we always need this object as dummy object for correct scene dimensions
//but it should not be visible in this case:
AbstractShapeFactory::makeShapeInvisible( xShape );
ShapeFactory::makeShapeInvisible( xShape );
}
}
}
......@@ -632,12 +632,12 @@ void VDiagram::createShapes_3d()
{
//we always need this object as dummy object for correct scene dimensions
//but it should not be visible in this case:
AbstractShapeFactory::makeShapeInvisible( xShape );
ShapeFactory::makeShapeInvisible( xShape );
}
else
{
OUString aFloorCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_FLOOR, OUString() ) );//@todo read CID from model
AbstractShapeFactory::setShapeName( xShape, aFloorCID );
ShapeFactory::setShapeName( xShape, aFloorCID );
}
}
......
......@@ -33,7 +33,7 @@ namespace chart
{
class PlottingPositionHelper;
class AbstractShapeFactory;
class ShapeFactory;
class LabelPositionHelper
{
......@@ -42,7 +42,7 @@ public:
LabelPositionHelper(
sal_Int32 nDimensionCount
, const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
, AbstractShapeFactory* pShapeFactory );
, ShapeFactory* pShapeFactory );
virtual ~LabelPositionHelper();
css::awt::Point transformSceneToScreenPosition(
......@@ -62,7 +62,7 @@ protected:
private:
//these members are only necessary for transformation from 3D to 2D
css::uno::Reference< css::drawing::XShapes > m_xLogicTarget;
AbstractShapeFactory* m_pShapeFactory;
ShapeFactory* m_pShapeFactory;
};
} //namespace chart
......
......@@ -33,8 +33,8 @@ namespace chart { struct ExplicitScaleData; }
namespace chart
{
class AbstractShapeFactory;
class PlottingPositionHelper;
class ShapeFactory;
/** This class provides methods for setting axis scales and for performing
* scene to screen transformations. It is used as the base class for all
......@@ -72,7 +72,7 @@ protected: //member
css::uno::Reference< css::drawing::XShapes > m_xLogicTarget;
css::uno::Reference< css::drawing::XShapes > m_xFinalTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
AbstractShapeFactory* m_pShapeFactory;
ShapeFactory* m_pShapeFactory;
OUString m_aCID;
const sal_Int32 m_nDimension;
......
......@@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace drawing { struct Poly
namespace chart
{
class AbstractShapeFactory;
class ShapeFactory;
class PlottingPositionHelper
{
......@@ -83,7 +83,7 @@ public:
static css::awt::Point transformSceneToScreenPosition(
const css::drawing::Position3D& rScenePosition3D
, const css::uno::Reference< css::drawing::XShapes >& xSceneTarget
, AbstractShapeFactory* pShapeFactory, sal_Int32 nDimensionCount );
, ShapeFactory* pShapeFactory, sal_Int32 nDimensionCount );
inline double getLogicMinX() const;
inline double getLogicMinY() const;
......
......@@ -35,7 +35,7 @@ public:
PolarPlottingPositionHelper* pPosHelper
, sal_Int32 nDimensionCount
, const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
, AbstractShapeFactory* pShapeFactory );
, ShapeFactory* pShapeFactory );
virtual ~PolarLabelPositionHelper() override;
css::awt::Point getLabelScreenPositionAndAlignmentForLogicValues(
......
......@@ -34,7 +34,7 @@ namespace com { namespace sun { namespace star { namespace drawing { class XShap
namespace chart
{
class AbstractShapeFactory;
class ShapeFactory;
/** The VDiagram is responsible to generate the visible parts of the Diagram
that is wall, floor, axes and data series.
......@@ -88,7 +88,7 @@ private: //members
css::uno::Reference< css::drawing::XShapes > m_xTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
AbstractShapeFactory* m_pShapeFactory;
ShapeFactory* m_pShapeFactory;
// this is the surrounding shape which contains floor, wall and coordinate
css::uno::Reference< css::drawing::XShape > m_xOuterGroupShape;
......
......@@ -26,7 +26,7 @@
#include <VDiagram.hxx>
#include "VTitle.hxx"
#include "VButton.hxx"
#include <AbstractShapeFactory.hxx>
#include <ShapeFactory.hxx>
#include <VCoordinateSystem.hxx>
#include <VSeriesPlotter.hxx>
#include <CommonConverters.hxx>
......@@ -1521,7 +1521,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
}
uno::Reference< drawing::XShapes > xTextTargetShapes =
AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->createGroup2D(rParam.mxDiagramWithAxesShapes);
ShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->createGroup2D(rParam.mxDiagramWithAxesShapes);
// - create axis and grids for all coordinate systems
......@@ -1549,7 +1549,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
VCoordinateSystem* pVCooSys = rVCooSysList[0];
pVCooSys->createMaximumAxesLabels();
aConsumedOuterRect = AbstractShapeFactory::getRectangleOfShape(xBoundingShape);
aConsumedOuterRect = ShapeFactory::getRectangleOfShape(xBoundingShape);
::basegfx::B2IRectangle aNewInnerRect( aVDiagram.getCurrentRectangle() );
if (!rParam.mbUseFixedInnerSize)
aNewInnerRect = aVDiagram.adjustInnerSize( aConsumedOuterRect );
......@@ -1566,7 +1566,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
bool bLessSpaceConsumedThanExpected = false;
{
aConsumedOuterRect = AbstractShapeFactory::getRectangleOfShape(xBoundingShape);
aConsumedOuterRect = ShapeFactory::getRectangleOfShape(xBoundingShape);
if( aConsumedOuterRect.getMinX() > aAvailableOuterRect.getMinX()
|| aConsumedOuterRect.getMaxX() < aAvailableOuterRect.getMaxX()
|| aConsumedOuterRect.getMinY() > aAvailableOuterRect.getMinY()
......@@ -1629,7 +1629,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
{
m_bPointsWereSkipped = false;
aConsumedOuterRect = ::basegfx::B2IRectangle( AbstractShapeFactory::getRectangleOfShape(xBoundingShape) );
aConsumedOuterRect = ::basegfx::B2IRectangle( ShapeFactory::getRectangleOfShape(xBoundingShape) );
::basegfx::B2IRectangle aNewInnerRect( aVDiagram.getCurrentRectangle() );
if (!rParam.mbUseFixedInnerSize)
aNewInnerRect = aVDiagram.adjustInnerSize( aConsumedOuterRect );
......@@ -1640,9 +1640,9 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
}
//clear and recreate
AbstractShapeFactory::removeSubShapes( xSeriesTargetInFrontOfAxis ); //xSeriesTargetBehindAxis is a sub shape of xSeriesTargetInFrontOfAxis and will be removed here
ShapeFactory::removeSubShapes( xSeriesTargetInFrontOfAxis ); //xSeriesTargetBehindAxis is a sub shape of xSeriesTargetInFrontOfAxis and will be removed here
xSeriesTargetBehindAxis.clear();
AbstractShapeFactory::removeSubShapes( xTextTargetShapes );
ShapeFactory::removeSubShapes( xTextTargetShapes );
//set new transformation