summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-02 20:49:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-03 07:46:45 +0100
commit7c36f46a1ea35633d64c44a2ee1e834b1f88cc8d (patch)
tree9cd0edfd08b67053ed5ff64e6d523166478baf34 /chart2
parent5f41e5741fa3abe59dd14a50e692d425eed472d5 (diff)
add new SvxShape hierarchy class
to serve as a shared/common base class, so I can plumb SvxShape types through chart2. Change-Id: I8758fff1599c92a214b334ee44cf7b4e582c1915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127873 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/inc/ChartView.hxx3
-rw-r--r--chart2/source/controller/drawinglayer/ViewElementListProvider.cxx2
-rw-r--r--chart2/source/inc/chartview/DataPointSymbolSupplier.hxx2
-rw-r--r--chart2/source/view/axes/VAxisBase.hxx4
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx6
-rw-r--r--chart2/source/view/axes/VCartesianAxis.hxx4
-rw-r--r--chart2/source/view/axes/VCartesianGrid.cxx10
-rw-r--r--chart2/source/view/axes/VCoordinateSystem.cxx6
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.cxx2
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.hxx2
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx14
-rw-r--r--chart2/source/view/axes/VPolarGrid.hxx2
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.cxx4
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.hxx4
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx10
-rw-r--r--chart2/source/view/charttypes/AreaChart.hxx8
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx21
-rw-r--r--chart2/source/view/charttypes/BarChart.hxx2
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx9
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.cxx18
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx10
-rw-r--r--chart2/source/view/charttypes/NetChart.hxx4
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx9
-rw-r--r--chart2/source/view/charttypes/PieChart.hxx6
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx120
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx36
-rw-r--r--chart2/source/view/inc/LabelPositionHelper.hxx6
-rw-r--r--chart2/source/view/inc/LegendEntryProvider.hxx2
-rw-r--r--chart2/source/view/inc/PlotterBase.hxx14
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx4
-rw-r--r--chart2/source/view/inc/PolarLabelPositionHelper.hxx2
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx65
-rw-r--r--chart2/source/view/inc/VCoordinateSystem.hxx14
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx10
-rw-r--r--chart2/source/view/inc/VDiagram.hxx12
-rw-r--r--chart2/source/view/inc/VLegendSymbolFactory.hxx3
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx46
-rw-r--r--chart2/source/view/main/ChartView.cxx22
-rw-r--r--chart2/source/view/main/DataPointSymbolSupplier.cxx2
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx2
-rw-r--r--chart2/source/view/main/PlotterBase.cxx8
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx2
-rw-r--r--chart2/source/view/main/PolarLabelPositionHelper.cxx2
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx106
-rw-r--r--chart2/source/view/main/VButton.cxx5
-rw-r--r--chart2/source/view/main/VButton.hxx4
-rw-r--r--chart2/source/view/main/VLegend.cxx10
-rw-r--r--chart2/source/view/main/VLegend.hxx4
-rw-r--r--chart2/source/view/main/VLegendSymbolFactory.cxx7
-rw-r--r--chart2/source/view/main/VTitle.cxx2
-rw-r--r--chart2/source/view/main/VTitle.hxx5
51 files changed, 346 insertions, 331 deletions
diff --git a/chart2/inc/ChartView.hxx b/chart2/inc/ChartView.hxx
index fb73f06a2d1f..27408b53f844 100644
--- a/chart2/inc/ChartView.hxx
+++ b/chart2/inc/ChartView.hxx
@@ -36,6 +36,7 @@
#include <com/sun/star/util/XUpdatable2.hpp>
#include <rtl/ref.hxx>
#include <svx/unopage.hxx>
+#include <svx/unoshape.hxx>
#include <vector>
#include <memory>
@@ -217,7 +218,7 @@ private: //member
m_xShapeFactory;
rtl::Reference<SvxDrawPage>
m_xDrawPage;
- css::uno::Reference< css::drawing::XShapes >
+ rtl::Reference<SvxShapeGroupAnyD>
mxRootShape;
css::uno::Reference< css::uno::XInterface > m_xDashTable;
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index c5a63bf19161..77099c9444fe 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -115,7 +115,7 @@ SdrObjList* ViewElementListProvider::GetSymbolList() const
m_pDrawModelWrapper->getShapeFactory());
//get hidden draw page (target):
- uno::Reference<drawing::XShapes> xTarget = m_pDrawModelWrapper->getHiddenDrawPage();
+ rtl::Reference<SvxDrawPage> xTarget = m_pDrawModelWrapper->getHiddenDrawPage();
//create symbols via uno and convert to native sdr objects
drawing::Direction3D aSymbolSize(220, 220, 0); // should be 250, but 250 -> 280 ??
diff --git a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
index 9b236cfb06d5..6e25a84520d9 100644
--- a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
+++ b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
@@ -34,7 +34,7 @@ class OOO_DLLPUBLIC_CHARTVIEW DataPointSymbolSupplier
{
public:
static rtl::Reference< SvxShapeGroup >
- create2DSymbolList( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ create2DSymbolList( const rtl::Reference<SvxDrawPage>& xTarget
, const css::drawing::Direction3D& rSize );
};
diff --git a/chart2/source/view/axes/VAxisBase.hxx b/chart2/source/view/axes/VAxisBase.hxx
index dd7be23e3cc6..31badb749c9d 100644
--- a/chart2/source/view/axes/VAxisBase.hxx
+++ b/chart2/source/view/axes/VAxisBase.hxx
@@ -77,8 +77,8 @@ protected: //member
css::uno::Sequence< OUString > m_aTextLabels;
bool m_bUseTextLabels;
- css::uno::Reference< css::drawing::XShapes > m_xGroupShape_Shapes;
- css::uno::Reference< css::drawing::XShapes > m_xTextTarget;
+ rtl::Reference< SvxShapeGroupAnyD > m_xGroupShape_Shapes;
+ rtl::Reference< SvxShapeGroupAnyD > m_xTextTarget;
/**
* This typically consists of 2 TickInfo vectors (i.e. the outer vector
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 5910a0c73ab3..e6d72b45f666 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -113,7 +113,7 @@ static void lcl_ResizeTextShapeToFitAvailableSpace( SvxShapeText& rShape2DText,
}
static rtl::Reference<SvxShapeText> createSingleLabel(
- const Reference< drawing::XShapes >& xTarget
+ const rtl::Reference< SvxShapeGroupAnyD >& xTarget
, const awt::Point& rAnchorScreenPosition2D
, const OUString& rLabel
, const AxisLabelProperties& rAxisLabelProperties
@@ -699,7 +699,7 @@ sal_Int32 VCartesianAxis::getTextLevelCount() const
}
bool VCartesianAxis::createTextShapes(
- const Reference<drawing::XShapes>& xTarget, TickIter& rTickIter,
+ const rtl::Reference< SvxShapeGroupAnyD >& xTarget, TickIter& rTickIter,
AxisLabelProperties& rAxisLabelProperties, TickFactory2D const * pTickFactory,
sal_Int32 nScreenDistanceBetweenTicks )
{
@@ -946,7 +946,7 @@ bool VCartesianAxis::createTextShapes(
}
bool VCartesianAxis::createTextShapesSimple(
- const Reference<drawing::XShapes>& xTarget, TickIter& rTickIter,
+ const rtl::Reference< SvxShapeGroupAnyD >& xTarget, TickIter& rTickIter,
AxisLabelProperties& rAxisLabelProperties, TickFactory2D const * pTickFactory )
{
FixedNumberFormatter aFixedNumberFormatter(
diff --git a/chart2/source/view/axes/VCartesianAxis.hxx b/chart2/source/view/axes/VCartesianAxis.hxx
index 7474c38b6c49..94e9b2ab967a 100644
--- a/chart2/source/view/axes/VCartesianAxis.hxx
+++ b/chart2/source/view/axes/VCartesianAxis.hxx
@@ -117,7 +117,7 @@ private: //methods
* method once again to get the text shapes created.
*/
bool createTextShapes(
- const css::uno::Reference<css::drawing::XShapes >& xTarget,
+ const rtl::Reference< SvxShapeGroupAnyD >& xTarget,
TickIter& rTickIter, AxisLabelProperties& rAxisLabelProperties,
TickFactory2D const * pTickFactory, sal_Int32 nScreenDistanceBetweenTicks );
@@ -127,7 +127,7 @@ private: //methods
* are to be resolved only by adjusting the label tick interval.
*/
bool createTextShapesSimple(
- const css::uno::Reference<css::drawing::XShapes >& xTarget,
+ const rtl::Reference< SvxShapeGroupAnyD >& xTarget,
TickIter& rTickIter, AxisLabelProperties& rAxisLabelProperties,
TickFactory2D const * pTickFactory );
diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx
index 277ad26fd625..93ebb6eb3e78 100644
--- a/chart2/source/view/axes/VCartesianGrid.cxx
+++ b/chart2/source/view/axes/VCartesianGrid.cxx
@@ -200,7 +200,7 @@ void VCartesianGrid::createShapes()
//somehow equal to axis tickmarks
//create named group shape
- Reference< drawing::XShapes > xGroupShape_Shapes(
+ rtl::Reference< SvxShapeGroupAnyD > xGroupShape_Shapes(
createGroupShape( m_xLogicTarget, m_aCID ) );
if(!xGroupShape_Shapes.is())
@@ -231,14 +231,14 @@ void VCartesianGrid::createShapes()
if( !aLinePropertiesList[nDepth].isLineVisible() )
continue;
- Reference< drawing::XShapes > xTarget( xGroupShape_Shapes );
+ rtl::Reference< SvxShapeGroupAnyD > xTarget( xGroupShape_Shapes );
if( nDepth > 0 )
{
- xTarget.set( createGroupShape( m_xLogicTarget
+ xTarget = createGroupShape( m_xLogicTarget
, ObjectIdentifier::addChildParticle( m_aCID, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_SUBGRID, nDepth-1 ) )
- ) );
+ );
if(!xTarget.is())
- xTarget.set( xGroupShape_Shapes );
+ xTarget = xGroupShape_Shapes;
}
if(m_nDimension==2)
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 4ae45fd7c549..785bc955f602 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -83,10 +83,10 @@ VCoordinateSystem::~VCoordinateSystem()
{
}
-void VCoordinateSystem::initPlottingTargets( const Reference< drawing::XShapes >& xLogicTarget
- , const Reference< drawing::XShapes >& xFinalTarget
+void VCoordinateSystem::initPlottingTargets( const rtl::Reference< SvxShapeGroupAnyD >& xLogicTarget
+ , const rtl::Reference< SvxShapeGroupAnyD >& xFinalTarget
, const Reference< lang::XMultiServiceFactory >& xShapeFactory
- , Reference< drawing::XShapes >& xLogicTargetForSeriesBehindAxis )
+ , rtl::Reference<SvxShapeGroupAnyD>& xLogicTargetForSeriesBehindAxis )
{
OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters");
//is only allowed to be called once
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 7bd037096984..fad802e107a8 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -47,7 +47,7 @@ VPolarAngleAxis::~VPolarAngleAxis()
}
void VPolarAngleAxis::createTextShapes_ForAngleAxis(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, EquidistantTickIter& rTickIter
, AxisLabelProperties const & rAxisLabelProperties
, double fLogicRadius
diff --git a/chart2/source/view/axes/VPolarAngleAxis.hxx b/chart2/source/view/axes/VPolarAngleAxis.hxx
index 57ade3826cdb..0e0774e9ebc5 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.hxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.hxx
@@ -40,7 +40,7 @@ public:
private: //methods
void createTextShapes_ForAngleAxis(
- const css::uno::Reference< css::drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, EquidistantTickIter& rTickIter
, AxisLabelProperties const & rAxisLabelProperties
, double fLogicRadius, double fLogicZ );
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index 79f3cb66d787..188042449c8f 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -154,13 +154,13 @@ void VPolarGrid::create2DAngleGrid( const Reference< drawing::XShapes >& xLogicT
}
#endif
-void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogicTarget
+void VPolarGrid::create2DRadiusGrid( const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
, TickInfoArraysType& rRadiusTickInfos
, TickInfoArraysType& rAngleTickInfos
, const std::vector<VLineProperties>& rLinePropertiesList )
{
- Reference< drawing::XShapes > xMainTarget(
- createGroupShape( xLogicTarget, m_aCID ) );
+ rtl::Reference<SvxShapeGroupAnyD> xMainTarget =
+ createGroupShape( xLogicTarget, m_aCID );
const std::vector<ExplicitScaleData>& rScales = m_pPosHelper->getScales();
const ExplicitScaleData& rRadiusScale = rScales[1];
@@ -180,14 +180,14 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic
if( !rLinePropertiesList[nDepth].isLineVisible() )
continue;
- Reference< drawing::XShapes > xTarget( xMainTarget );
+ rtl::Reference<SvxShapeGroupAnyD> xTarget( xMainTarget );
if( nDepth > 0 )
{
- xTarget.set( createGroupShape( xLogicTarget
+ xTarget = createGroupShape( xLogicTarget
, ObjectIdentifier::addChildParticle( m_aCID, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_SUBGRID, nDepth-1 ) )
- ) );
+ );
if(!xTarget.is())
- xTarget.set( xMainTarget );
+ xTarget = xMainTarget;
}
//create axis main lines
diff --git a/chart2/source/view/axes/VPolarGrid.hxx b/chart2/source/view/axes/VPolarGrid.hxx
index 304cdfe34b87..c5a9df7bb6e9 100644
--- a/chart2/source/view/axes/VPolarGrid.hxx
+++ b/chart2/source/view/axes/VPolarGrid.hxx
@@ -60,7 +60,7 @@ private: //member
void getAllTickInfos( sal_Int32 nDimensionIndex, TickInfoArraysType& rAllTickInfos ) const;
- void create2DRadiusGrid( const css::uno::Reference<css::drawing::XShapes>& xLogicTarget
+ void create2DRadiusGrid( const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
, TickInfoArraysType& rRadiusTickInfos
, TickInfoArraysType& rAngleTickInfos
, const std::vector<VLineProperties>& rLinePropertiesList );
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.cxx b/chart2/source/view/axes/VPolarRadiusAxis.cxx
index 0c3e2aaa4d80..04ed5b1d0273 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.cxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.cxx
@@ -62,8 +62,8 @@ void VPolarRadiusAxis::setExplicitScaleAndIncrement(
m_apAxisWithLabels->setExplicitScaleAndIncrement( rScale, rIncrement );
}
-void VPolarRadiusAxis::initPlotter( const uno::Reference< drawing::XShapes >& xLogicTarget
- , const uno::Reference< drawing::XShapes >& xFinalTarget
+void VPolarRadiusAxis::initPlotter( const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
, const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory
, const OUString& rCID )
{
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.hxx b/chart2/source/view/axes/VPolarRadiusAxis.hxx
index 3d69154cee07..36cc0b250c6b 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.hxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.hxx
@@ -35,8 +35,8 @@ public:
virtual ~VPolarRadiusAxis() override;
virtual void initPlotter(
- const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
- , const css::uno::Reference< css::drawing::XShapes >& xFinalTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
, const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, const OUString& rCID
) override;
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index d80a78d7f03f..f141d09a64e4 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -366,7 +366,7 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
, PlottingPositionHelper* pPosHelper )
{
//return true if a line was created successfully
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
drawing::PolyPolygonShape3D aPoly;
if(m_eCurveStyle==CurveStyle_CUBIC_SPLINES)
@@ -452,7 +452,7 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries
{
//return true if an area was created successfully
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
double zValue = pSeries->m_fLogicZPos;
drawing::PolyPolygonShape3D aPoly( *pSeriesPoly );
@@ -694,7 +694,7 @@ void AreaChart::createShapes()
if(!pSeries)
continue;
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeFrontChild(pSeries.get(), m_xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShapeFrontChild(pSeries.get(), m_xSeriesTarget);
sal_Int32 nAttachedAxisIndex = pSeries->getAttachedAxisIndex();
double fXMin, fXMax;
@@ -841,9 +841,9 @@ void AreaChart::createShapes()
//create a group shape for this point and add to the series shape:
OUString aPointCID = ObjectIdentifier::createPointCID(
pSeries->getPointCID_Stub(), nIndex );
- uno::Reference< drawing::XShapes > xPointGroupShape_Shapes(
+ rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes(
createGroupShape(xSeriesGroupShape_Shapes,aPointCID) );
- uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes, uno::UNO_QUERY );
+ uno::Reference<drawing::XShape> xPointGroupShape_Shape( static_cast<cppu::OWeakObject*>(xPointGroupShape_Shapes.get()), uno::UNO_QUERY );
{
nCreatedPoints++;
diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx
index 02bfd7255f4a..ce7bd7d2f965 100644
--- a/chart2/source/view/charttypes/AreaChart.hxx
+++ b/chart2/source/view/charttypes/AreaChart.hxx
@@ -76,10 +76,10 @@ private: //member
sal_Int32 m_nCurveResolution;
sal_Int32 m_nSplineOrder;
- css::uno::Reference< css::drawing::XShapes > m_xSeriesTarget;
- css::uno::Reference< css::drawing::XShapes > m_xErrorBarTarget;
- css::uno::Reference< css::drawing::XShapes > m_xTextTarget;
- css::uno::Reference< css::drawing::XShapes > m_xRegressionCurveEquationTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xSeriesTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xErrorBarTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xTextTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xRegressionCurveEquationTarget;
};
} //namespace chart
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 285329033931..c7582f07eefc 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -297,7 +297,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
}
rtl::Reference< SvxShape > BarChart::createDataPoint3D_Bar(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
, const uno::Reference< beans::XPropertySet >& xObjectProperties
@@ -462,15 +462,12 @@ void BarChart::createShapes()
//the regression curves should always be on top of the bars but beneath the text labels
//to achieve this the regression curve target is created after the series target and before the text target
- uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget ));
- uno::Reference< drawing::XShapes > xRegressionCurveTarget(
- createGroupShape( m_xLogicTarget ));
- uno::Reference< drawing::XShapes > xTextTarget(
- ShapeFactory::createGroup2D( m_xFinalTarget ));
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTarget = createGroupShape( m_xLogicTarget );
+ rtl::Reference<SvxShapeGroupAnyD> xRegressionCurveTarget = createGroupShape( m_xLogicTarget );
+ rtl::Reference<SvxShapeGroupAnyD> xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget );
- uno::Reference< drawing::XShapes > xRegressionCurveEquationTarget(
- ShapeFactory::createGroup2D( m_xFinalTarget ));
+ rtl::Reference<SvxShapeGroupAnyD> xRegressionCurveEquationTarget =
+ ShapeFactory::createGroup2D( m_xFinalTarget );
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
double fLogicZ = 1.0;//as defined
@@ -628,8 +625,8 @@ void BarChart::createShapes()
bDrawConnectionLinesInited = true;
}
- uno::Reference<drawing::XShapes> xSeriesGroupShape_Shapes(getSeriesGroupShape(pSeries.get(), xSeriesTarget));
- uno::Reference<drawing::XShape> xSeriesGroupShape(xSeriesGroupShape_Shapes, uno::UNO_QUERY);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes(getSeriesGroupShape(pSeries.get(), xSeriesTarget));
+ uno::Reference<drawing::XShape> xSeriesGroupShape(static_cast<cppu::OWeakObject*>(xSeriesGroupShape_Shapes.get()), uno::UNO_QUERY);
// Suspend setting rects dirty for the duration of this call
aShapeSet.insert(xSeriesGroupShape);
E3dScene* pScene = lcl_getE3dScene(xSeriesGroupShape);
@@ -952,7 +949,7 @@ void BarChart::createShapes()
//transformation 3) -> 4)
pPosHelper->transformScaledLogicToScene( aPoly );
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes(
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes(
getSeriesGroupShape(pSeries.get(), xSeriesTarget) );
rtl::Reference<SvxShapePolyPolygon> xShape( ShapeFactory::createLine2D(
xSeriesGroupShape_Shapes, PolyToPointSequence( aPoly ) ) );
diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx
index 5e1ebee666d1..08eaeadab2e6 100644
--- a/chart2/source/view/charttypes/BarChart.hxx
+++ b/chart2/source/view/charttypes/BarChart.hxx
@@ -44,7 +44,7 @@ public:
private: //methods
static rtl::Reference< SvxShape >
createDataPoint3D_Bar(
- const css::uno::Reference< css::drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 9c9755154406..782d91b9762c 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -169,8 +169,7 @@ void BubbleChart::createShapes()
//therefore create an own group for the texts and the error bars to move them to front
//(because the text group is created after the series group the texts are displayed on top)
- uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget ));
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTarget = createGroupShape( m_xLogicTarget );
rtl::Reference< SvxShapeGroup > xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget );
//update/create information for current group
@@ -208,7 +207,7 @@ void BubbleChart::createShapes()
bool bHasFillColorMapping = pSeries->hasPropertyMapping("FillColor");
bool bHasBorderColorMapping = pSeries->hasPropertyMapping("LineColor");
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries.get(), xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries.get(), xSeriesTarget);
sal_Int32 nAttachedAxisIndex = pSeries->getAttachedAxisIndex();
PlottingPositionHelper& rPosHelper
@@ -262,9 +261,9 @@ void BubbleChart::createShapes()
//create a group shape for this point and add to the series shape:
OUString aPointCID = ObjectIdentifier::createPointCID(
pSeries->getPointCID_Stub(), nIndex );
- uno::Reference< drawing::XShapes > xPointGroupShape_Shapes(
+ rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes(
createGroupShape(xSeriesGroupShape_Shapes,aPointCID) );
- uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes, uno::UNO_QUERY );
+ uno::Reference<drawing::XShape> xPointGroupShape_Shape = xPointGroupShape_Shapes;
{
nCreatedPoints++;
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index cc34aac023e7..0c678ed744f3 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -86,14 +86,14 @@ void CandleStickChart::createShapes()
//therefore create an own group for the texts to move them to front
//(because the text group is created after the series group the texts are displayed on top)
- uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget ));
- uno::Reference< drawing::XShapes > xLossTarget(
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTarget =
+ createGroupShape( m_xLogicTarget );
+ rtl::Reference<SvxShapeGroupAnyD> xLossTarget =
createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
- OBJECTTYPE_DATA_STOCK_LOSS, u"" )));
- uno::Reference< drawing::XShapes > xGainTarget(
+ OBJECTTYPE_DATA_STOCK_LOSS, u"" ));
+ rtl::Reference<SvxShapeGroupAnyD> xGainTarget =
createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
- OBJECTTYPE_DATA_STOCK_GAIN, u"" )));
+ OBJECTTYPE_DATA_STOCK_GAIN, u"" ));
rtl::Reference< SvxShapeGroup > xTextTarget =
ShapeFactory::createGroup2D( m_xFinalTarget );
@@ -201,15 +201,15 @@ void CandleStickChart::createShapes()
drawing::Position3D aPosMiddleMinimum( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Min ,0 ,true ) );
drawing::Position3D aPosMiddleMaximum( pPosHelper->transformScaledLogicToScene( fScaledX, fScaledY_Max ,0 ,true ) );
- uno::Reference< drawing::XShapes > xLossGainTarget( xGainTarget );
+ rtl::Reference<SvxShapeGroupAnyD> xLossGainTarget( xGainTarget );
if(bBlack)
xLossGainTarget = xLossTarget;
uno::Reference< beans::XPropertySet > xPointProp( pSeries->getPropertiesOfPoint( nIndex ));
- uno::Reference< drawing::XShapes > xPointGroupShape_Shapes;
+ rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes;
{
OUString aPointCID = ObjectIdentifier::createPointCID( pSeries->getPointCID_Stub(), nIndex );
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes( getSeriesGroupShape(pSeries.get(), xSeriesTarget) );
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes( getSeriesGroupShape(pSeries.get(), xSeriesTarget) );
xPointGroupShape_Shapes = createGroupShape(xSeriesGroupShape_Shapes,aPointCID);
}
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index e721d158e17b..210843dce479 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -115,7 +115,7 @@ bool NetChart::impl_createLine( VDataSeries* pSeries
, PlottingPositionHelper const * pPosHelper )
{
//return true if a line was created successfully
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
drawing::PolyPolygonShape3D aPoly;
{
@@ -170,7 +170,7 @@ bool NetChart::impl_createArea( VDataSeries* pSeries
{
//return true if an area was created successfully
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
double zValue = pSeries->m_fLogicZPos;
drawing::PolyPolygonShape3D aPoly( *pSeriesPoly );
@@ -400,7 +400,7 @@ void NetChart::createShapes()
if( m_bArea && (rXSlot.m_aSeriesVector.size() == 1) && (nIndex >= pSeries->getTotalPointCount()) )
continue;
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeFrontChild(pSeries.get(), m_xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShapeFrontChild(pSeries.get(), m_xSeriesTarget);
sal_Int32 nAttachedAxisIndex = pSeries->getAttachedAxisIndex();
m_pPosHelper = &getPlottingPositionHelper(nAttachedAxisIndex);
@@ -527,9 +527,9 @@ void NetChart::createShapes()
//create a group shape for this point and add to the series shape:
OUString aPointCID = ObjectIdentifier::createPointCID(
pSeries->getPointCID_Stub(), nIndex );
- uno::Reference< drawing::XShapes > xPointGroupShape_Shapes(
+ rtl::Reference<SvxShapeGroupAnyD> xPointGroupShape_Shapes(
createGroupShape(xSeriesGroupShape_Shapes,aPointCID) );
- uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes, uno::UNO_QUERY );
+ uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes );
{
//create data point
diff --git a/chart2/source/view/charttypes/NetChart.hxx b/chart2/source/view/charttypes/NetChart.hxx
index 04e39080a06b..4ab3432bb777 100644
--- a/chart2/source/view/charttypes/NetChart.hxx
+++ b/chart2/source/view/charttypes/NetChart.hxx
@@ -66,8 +66,8 @@ private: //member
bool m_bArea;//false -> line or symbol only
bool m_bLine;
- css::uno::Reference< css::drawing::XShapes > m_xSeriesTarget;
- css::uno::Reference< css::drawing::XShapes > m_xTextTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xSeriesTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xTextTarget;
};
} //namespace chart
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 2a60740a75ff..9acf1e961fb7 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -248,7 +248,7 @@ bool PieChart::shouldSnapRectToUsedArea()
}
rtl::Reference<SvxShape> PieChart::createDataPoint(
- const uno::Reference<drawing::XShapes>& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const uno::Reference<beans::XPropertySet>& xObjectProperties,
tPropertyNameValueMap const * pOverwritePropertiesMap,
const ShapeParam& rParam )
@@ -286,7 +286,7 @@ rtl::Reference<SvxShape> PieChart::createDataPoint(
}
void PieChart::createTextLabelShape(
- const uno::Reference<drawing::XShapes>& xTextTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
VDataSeries& rSeries, sal_Int32 nPointIndex, ShapeParam& rParam )
{
if (!rSeries.getDataPointLabelIfLabel(nPointIndex))
@@ -672,8 +672,7 @@ void PieChart::createShapes()
///therefore create an own group for the texts to move them to front
///(because the text group is created after the series group the texts are
///displayed on top)
- uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget ));
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTarget = createGroupShape( m_xLogicTarget );
rtl::Reference<SvxShapeGroup> xTextTarget = ShapeFactory::createGroup2D( m_xFinalTarget );
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
@@ -778,7 +777,7 @@ void PieChart::createShapes()
aParam.mfDepth = getTransformedDepth() * (n3DRelativeHeight / 100.0);
- uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesGroupShape_Shapes = getSeriesGroupShape(pSeries, xSeriesTarget);
///collect data point information (logic coordinates, style ):
double fLogicYValue = fabs(pSeries->getYValue( nPointIndex ));
if( std::isnan(fLogicYValue) )
diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx
index 43725639e1e2..2f57b118b089 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -65,7 +65,7 @@ public:
private: //methods
rtl::Reference<SvxShape>
createDataPoint(
- const css::uno::Reference<css::drawing::XShapes>& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::uno::Reference<css::beans::XPropertySet>& xObjectProperties,
tPropertyNameValueMap const * pOverWritePropertiesMap,
const ShapeParam& rParam );
@@ -82,7 +82,7 @@ private: //methods
* ShapeParam object.
*/
void createTextLabelShape(
- const css::uno::Reference<css::drawing::XShapes>& xTextTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget,
VDataSeries& rSeries, sal_Int32 nPointIndex, ShapeParam& rParam );
/** This method sets `m_fMaxOffset` to the maximum `Offset` property and
@@ -129,7 +129,7 @@ private: //member
bool bMovementAllowed;
bool bMoved;
bool bShowLeaderLine;
- css::uno::Reference< css::drawing::XShapes > xTextTarget;
+ rtl::Reference<SvxShapeGroupAnyD> xTextTarget;
PieLabelInfo* pPrevious;
PieLabelInfo* pNext;
css::awt::Point aPreviousPosition;
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index d6d71f2836d9..92f6b2144184 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -271,53 +271,45 @@ void VSeriesPlotter::releaseShapes()
}
}
-uno::Reference< drawing::XShapes > VSeriesPlotter::getSeriesGroupShape( VDataSeries* pDataSeries
- , const uno::Reference< drawing::XShapes >& xTarget )
+rtl::Reference<SvxShapeGroupAnyD> VSeriesPlotter::getSeriesGroupShape( VDataSeries* pDataSeries
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
- uno::Reference< drawing::XShapes > xShapes( pDataSeries->m_xGroupShape );
- if( !xShapes.is() )
- {
+ if( !pDataSeries->m_xGroupShape )
//create a group shape for this series and add to logic target:
- xShapes = createGroupShape( xTarget,pDataSeries->getCID() );
- pDataSeries->m_xGroupShape = xShapes;
- }
- return xShapes;
+ pDataSeries->m_xGroupShape = createGroupShape( xTarget,pDataSeries->getCID() );
+ return pDataSeries->m_xGroupShape;
}
-uno::Reference< drawing::XShapes > VSeriesPlotter::getSeriesGroupShapeFrontChild( VDataSeries* pDataSeries
- , const uno::Reference< drawing::XShapes >& xTarget )
+rtl::Reference<SvxShapeGroupAnyD> VSeriesPlotter::getSeriesGroupShapeFrontChild( VDataSeries* pDataSeries
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
- uno::Reference< drawing::XShapes > xShapes( pDataSeries->m_xFrontSubGroupShape );
- if(!xShapes.is())
+ if(!pDataSeries->m_xFrontSubGroupShape)
{
//ensure that the series group shape is already created
- uno::Reference< drawing::XShapes > xSeriesShapes( getSeriesGroupShape( pDataSeries, xTarget ) );
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesShapes( getSeriesGroupShape( pDataSeries, xTarget ) );
//ensure that the back child is created first
getSeriesGroupShapeBackChild( pDataSeries, xTarget );
//use series group shape as parent for the new created front group shape
- xShapes = createGroupShape( xSeriesShapes );
- pDataSeries->m_xFrontSubGroupShape = xShapes;
+ pDataSeries->m_xFrontSubGroupShape = createGroupShape( xSeriesShapes );
}
- return xShapes;
+ return pDataSeries->m_xFrontSubGroupShape;
}
-uno::Reference< drawing::XShapes > VSeriesPlotter::getSeriesGroupShapeBackChild( VDataSeries* pDataSeries
- , const uno::Reference< drawing::XShapes >& xTarget )
+rtl::Reference<SvxShapeGroupAnyD> VSeriesPlotter::getSeriesGroupShapeBackChild( VDataSeries* pDataSeries
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
- uno::Reference< drawing::XShapes > xShapes( pDataSeries->m_xBackSubGroupShape );
- if(!xShapes.is())
+ if(!pDataSeries->m_xBackSubGroupShape)
{
//ensure that the series group shape is already created
- uno::Reference< drawing::XShapes > xSeriesShapes( getSeriesGroupShape( pDataSeries, xTarget ) );
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesShapes( getSeriesGroupShape( pDataSeries, xTarget ) );
//use series group shape as parent for the new created back group shape
- xShapes = createGroupShape( xSeriesShapes );
- pDataSeries->m_xBackSubGroupShape = xShapes;
+ pDataSeries->m_xBackSubGroupShape = createGroupShape( xSeriesShapes );
}
- return xShapes;
+ return pDataSeries->m_xBackSubGroupShape;
}
rtl::Reference<SvxShapeGroup> VSeriesPlotter::getLabelsGroupShape( VDataSeries& rDataSeries
- , const uno::Reference< drawing::XShapes >& xTextTarget )
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTextTarget )
{
//xTextTarget needs to be a 2D shape container always!
if(!rDataSeries.m_xLabelsGroupShape)
@@ -328,21 +320,19 @@ rtl::Reference<SvxShapeGroup> VSeriesPlotter::getLabelsGroupShape( VDataSeries&
return rDataSeries.m_xLabelsGroupShape;
}
-uno::Reference< drawing::XShapes > VSeriesPlotter::getErrorBarsGroupShape( VDataSeries& rDataSeries
- , const uno::Reference< drawing::XShapes >& xTarget
+rtl::Reference<SvxShapeGroupAnyD> VSeriesPlotter::getErrorBarsGroupShape( VDataSeries& rDataSeries
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, bool bYError )
{
- uno::Reference< css::drawing::XShapes > &rShapeGroup =
+ rtl::Reference<SvxShapeGroupAnyD> &rShapeGroup =
bYError ? rDataSeries.m_xErrorYBarsGroupShape : rDataSeries.m_xErrorXBarsGroupShape;
- uno::Reference< drawing::XShapes > xShapes( rShapeGroup );
- if(!xShapes.is())
+ if(!rShapeGroup)
{
//create a group shape for this series and add to logic target:
- xShapes = createGroupShape( xTarget,rDataSeries.getErrorBarsCID(bYError) );
- rShapeGroup = xShapes;
+ rShapeGroup = createGroupShape( xTarget,rDataSeries.getErrorBarsCID(bYError) );
}
- return xShapes;
+ return rShapeGroup;
}
@@ -389,7 +379,7 @@ OUString VSeriesPlotter::getLabelTextForValue( VDataSeries const & rDataSeries
return aNumber;
}
-rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const uno::Reference< drawing::XShapes >& xTarget
+rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, VDataSeries& rDataSeries
, sal_Int32 nPointIndex
, double fValue
@@ -466,9 +456,9 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const uno::Referen
awt::Size aMaxSymbolExtent( nSymbolWidth, nSymbolHeight );
if( rDataSeries.isVaryColorsByPoint() )
- xSymbol = VSeriesPlotter::createLegendSymbolForPoint( aMaxSymbolExtent, rDataSeries, nPointIndex, xTarget_, m_xShapeFactory );
+ xSymbol = VSeriesPlotter::createLegendSymbolForPoint( aMaxSymbolExtent, rDataSeries, nPointIndex, xTarget_ );
else
- xSymbol = VSeriesPlotter::createLegendSymbolForSeries( aMaxSymbolExtent, rDataSeries, xTarget_, m_xShapeFactory );
+ xSymbol = VSeriesPlotter::createLegendSymbolForSeries( aMaxSymbolExtent, rDataSeries, xTarget_ );
}
//prepare text
@@ -949,7 +939,7 @@ drawing::Position3D lcl_transformMixedToScene( PlottingPositionHelper const * pP
} // anonymous namespace
void VSeriesPlotter::createErrorBar(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rUnscaledLogicPosition
, const uno::Reference< beans::XPropertySet > & xErrorBarProperties
, const VDataSeries& rVDataSeries
@@ -1095,7 +1085,7 @@ void VSeriesPlotter::createErrorBar(
void VSeriesPlotter::addErrorBorder(
const drawing::Position3D& rPos0
,const drawing::Position3D& rPos1
- ,const uno::Reference< drawing::XShapes >& rTarget
+ ,const rtl::Reference<SvxShapeGroupAnyD>& rTarget
,const uno::Reference< beans::XPropertySet >& rErrorBorderProp )
{
drawing::PolyPolygonShape3D aPoly;
@@ -1112,7 +1102,7 @@ void VSeriesPlotter::createErrorRectangle(
const drawing::Position3D& rUnscaledLogicPosition
,VDataSeries& rVDataSeries
,sal_Int32 nIndex
- ,const uno::Reference< drawing::XShapes >& rTarget
+ ,const rtl::Reference<SvxShapeGroupAnyD>& rTarget
,bool bUseXErrorData
,bool bUseYErrorData )
{
@@ -1127,8 +1117,8 @@ void VSeriesPlotter::createErrorRectangle(
if ( !xErrorBorderPropX.is() )
return;
}
- uno::Reference< drawing::XShapes > xErrorBorder_ShapesX(
- getErrorBarsGroupShape( rVDataSeries, rTarget, false ) );
+ rtl::Reference<SvxShapeGroupAnyD> xErrorBorder_ShapesX =
+ getErrorBarsGroupShape( rVDataSeries, rTarget, false );
if ( bUseYErrorData )
{
@@ -1136,8 +1126,8 @@ void VSeriesPlotter::createErrorRectangle(
if ( !xErrorBorderPropY.is() )
return;
}
- uno::Reference< drawing::XShapes > xErrorBorder_ShapesY(
- getErrorBarsGroupShape( rVDataSeries, rTarget, true ) );
+ rtl::Reference<SvxShapeGroupAnyD> xErrorBorder_ShapesY =
+ getErrorBarsGroupShape( rVDataSeries, rTarget, true );
if( !ChartTypeHelper::isSupportingStatisticProperties( m_xChartTypeModel, m_nDimension ) )
return;
@@ -1255,7 +1245,7 @@ void VSeriesPlotter::createErrorRectangle(
void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogicPosition
, VDataSeries& rVDataSeries, sal_Int32 nPointIndex
- , const uno::Reference< drawing::XShapes >& xTarget )
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
if(m_nDimension!=2)
return;
@@ -1263,8 +1253,8 @@ void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogic
uno::Reference< beans::XPropertySet > xErrorBarProp(rVDataSeries.getXErrorBarProperties(nPointIndex));
if( xErrorBarProp.is())
{
- uno::Reference< drawing::XShapes > xErrorBarsGroup_Shapes(
- getErrorBarsGroupShape(rVDataSeries, xTarget, false) );
+ rtl::Reference<SvxShapeGroupAnyD> xErrorBarsGroup_Shapes =
+ getErrorBarsGroupShape(rVDataSeries, xTarget, false);
createErrorBar( xErrorBarsGroup_Shapes
, rUnscaledLogicPosition, xErrorBarProp
@@ -1276,7 +1266,7 @@ void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogic
void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogicPosition
, VDataSeries& rVDataSeries, sal_Int32 nPointIndex
- , const uno::Reference< drawing::XShapes >& xTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, double const * pfScaledLogicX )
{
if(m_nDimension!=2)
@@ -1285,8 +1275,8 @@ void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogic
uno::Reference< beans::XPropertySet > xErrorBarProp(rVDataSeries.getYErrorBarProperties(nPointIndex));
if( xErrorBarProp.is())
{
- uno::Reference< drawing::XShapes > xErrorBarsGroup_Shapes(
- getErrorBarsGroupShape(rVDataSeries, xTarget, true) );
+ rtl::Reference<SvxShapeGroupAnyD> xErrorBarsGroup_Shapes =
+ getErrorBarsGroupShape(rVDataSeries, xTarget, true);
createErrorBar( xErrorBarsGroup_Shapes
, rUnscaledLogicPosition, xErrorBarProp
@@ -1297,8 +1287,8 @@ void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogic
}
void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSeries,
- const uno::Reference< drawing::XShapes >& xTarget,
- const uno::Reference< drawing::XShapes >& xEquationTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xEquationTarget,
bool bMaySkipPoints )
{
if(m_nDimension!=2)
@@ -1434,7 +1424,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSer
aVLineProperties.initFromPropertySet( xProperties );
//create an extra group shape for each curve for selection handling
- uno::Reference< drawing::XShapes > xRegressionGroupShapes =
+ rtl::Reference<SvxShapeGroupAnyD> xRegressionGroupShapes =
createGroupShape( xTarget, rVDataSeries.getDataCurveCID( nN, bAverageLine ) );
rtl::Reference<SvxShapePolyPolygon> xShape = ShapeFactory::createLine2D(
xRegressionGroupShapes, PolyToPointSequence( aRegressionPoly ), &aVLineProperties );
@@ -1476,7 +1466,7 @@ static sal_Int32 lcl_getOUStringMaxLineLength ( OUStringBuffer const & aString )
void VSeriesPlotter::createRegressionCurveEquationShapes(
const OUString & rEquationCID,
const uno::Reference< beans::XPropertySet > & xEquationProperties,
- const uno::Reference< drawing::XShapes >& xEquationTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xEquationTarget,
const uno::Reference< chart2::XRegressionCurveCalculator > & xRegressionCurveCalculator,
awt::Point aDefaultPos )
{
@@ -2372,7 +2362,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries(
const awt::Size& rEntryKeyAspectRatio
, LegendPosition eLegendPosition
, const Reference< beans::XPropertySet >& xTextProperties
- , const Reference< drawing::XShapes >& xTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const Reference< lang::XMultiServiceFactory >& xShapeFactory
, const Reference< uno::XComponentContext >& xContext
, ChartModel& rModel
@@ -2565,8 +2555,7 @@ uno::Any VSeriesPlotter::getExplicitSymbol( const VDataSeries& /*rSeries*/, sal_
rtl::Reference<SvxShapeGroup> VSeriesPlotter::createLegendSymbolForSeries(
const awt::Size& rEntryKeyAspectRatio
, const VDataSeries& rSeries
- , const Reference< drawing::XShapes >& xTarget
- , const Reference< lang::XMultiServiceFactory >& xShapeFactory )
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
LegendSymbolStyle eLegendSymbolStyle = getLegendSymbolStyle();
@@ -2586,8 +2575,8 @@ rtl::Reference<SvxShapeGroup> VSeriesPlotter::createLegendSymbolForSeries(
break;
}
rtl::Reference<SvxShapeGroup> xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
- xTarget, eLegendSymbolStyle, xShapeFactory
- , rSeries.getPropertiesOfSeries(), ePropType, aExplicitSymbol );
+ xTarget, eLegendSymbolStyle,
+ rSeries.getPropertiesOfSeries(), ePropType, aExplicitSymbol );
return xShape;
}
@@ -2596,8 +2585,7 @@ rtl::Reference< SvxShapeGroup > VSeriesPlotter::createLegendSymbolForPoint(
const awt::Size& rEntryKeyAspectRatio
, const VDataSeries& rSeries
, sal_Int32 nPointIndex
- , const Reference< drawing::XShapes >& xTarget
- , const Reference< lang::XMultiServiceFactory >& xShapeFactory )
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
LegendSymbolStyle eLegendSymbolStyle = getLegendSymbolStyle();
@@ -2642,7 +2630,7 @@ rtl::Reference< SvxShapeGroup > VSeriesPlotter::createLegendSymbolForPoint(
}
rtl::Reference< SvxShapeGroup > xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
- xTarget, eLegendSymbolStyle, xShapeFactory, xPointSet, ePropType, aExplicitSymbol );
+ xTarget, eLegendSymbolStyle, xPointSet, ePropType, aExplicitSymbol );
return xShape;
}
@@ -2651,7 +2639,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
const awt::Size& rEntryKeyAspectRatio
, const VDataSeries& rSeries
, const Reference< beans::XPropertySet >& xTextProperties
- , const Reference< drawing::XShapes >& xTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const Reference< lang::XMultiServiceFactory >& xShapeFactory
, const Reference< uno::XComponentContext >& xContext
)
@@ -2713,7 +2701,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
// create the symbol
rtl::Reference< SvxShapeGroup > xShape = createLegendSymbolForPoint( rEntryKeyAspectRatio,
- rSeries, nIdx, xSymbolGroup, xShapeFactory );
+ rSeries, nIdx, xSymbolGroup );
// set CID to symbol for selection
if( xShape.is() )
@@ -2742,7 +2730,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
// create the symbol
rtl::Reference<SvxShapeGroup> xShape = createLegendSymbolForSeries(
- rEntryKeyAspectRatio, rSeries, xSymbolGroup, xShapeFactory );
+ rEntryKeyAspectRatio, rSeries, xSymbolGroup );
// set CID to symbol for selection
if( xShape.is())
@@ -2785,7 +2773,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
// create the symbol
rtl::Reference<SvxShapeGroup> xShape = VLegendSymbolFactory::createSymbol( rEntryKeyAspectRatio,
- xSymbolGroup, LegendSymbolStyle::Line, xShapeFactory,
+ xSymbolGroup, LegendSymbolStyle::Line,
Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ),
VLegendSymbolFactory::PropertyType::Line, uno::Any() );
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index a4296c3ff331..871e2fbab29c 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -75,7 +75,7 @@ VDiagram::~VDiagram()
}
void VDiagram::init(
- const uno::Reference< drawing::XShapes >& xTarget, const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget, const uno::Reference< lang::XMultiServiceFactory >& xFactory )
{
OSL_PRECOND(xFactory.is(), "no proper initialization parameters");
@@ -142,16 +142,13 @@ void VDiagram::createShapes_2d()
return;
//create group shape
- uno::Reference< drawing::XShapes > xOuterGroup_Shapes = ShapeFactory::createGroup2D(m_xTarget);
- m_xOuterGroupShape.set( xOuterGroup_Shapes, uno::UNO_QUERY );
+ rtl::Reference<SvxShapeGroupAnyD> xOuterGroup_Shapes = ShapeFactory::createGroup2D(m_xTarget);
+ m_xOuterGroupShape = xOuterGroup_Shapes;
- uno::Reference< drawing::XShapes > xGroupForWall( ShapeFactory::createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") );
+ rtl::Reference<SvxShapeGroupAnyD> xGroupForWall( ShapeFactory::createGroup2D(xOuterGroup_Shapes,"PlotAreaExcludingAxes") );
//create independent group shape as container for datapoints and such things
- {
- uno::Reference< drawing::XShapes > xShapes = ShapeFactory::createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID");
- m_xCoordinateRegionShape.set( xShapes, uno::UNO_QUERY );
- }
+ m_xCoordinateRegionShape = ShapeFactory::createGroup2D(xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID");
bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram );
@@ -449,14 +446,14 @@ void VDiagram::createShapes_3d()
//create shape
rtl::Reference<Svx3DSceneObject> xShapes = ShapeFactory::createGroup3D( m_xTarget, "PlotAreaExcludingAxes" );
- m_xOuterGroupShape.set( static_cast<cppu::OWeakObject*>(xShapes.get()), uno::UNO_QUERY);
+ m_xOuterGroupShape = xShapes;
- uno::Reference< drawing::XShapes > xOuterGroup_Shapes( m_xOuterGroupShape, uno::UNO_QUERY );
+ rtl::Reference<SvxShapeGroupAnyD> xOuterGroup_Shapes = m_xOuterGroupShape;
//create additional group to manipulate the aspect ratio of the whole diagram:
xOuterGroup_Shapes = ShapeFactory::createGroup3D( xOuterGroup_Shapes );
- m_xAspectRatio3D.set( xOuterGroup_Shapes, uno::UNO_QUERY );
+ m_xAspectRatio3D = xOuterGroup_Shapes;
bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram );
@@ -537,27 +534,26 @@ void VDiagram::createShapes_3d()
try
{
uno::Reference< beans::XPropertySet > xSourceProp( m_xDiagram, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xDestProp( m_xOuterGroupShape, uno::UNO_QUERY_THROW );
//perspective
{
//ignore distance and focal length from file format and model completely
//use vrp only to indicate the distance of the camera and thus influence the perspective
- xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_DISTANCE, uno::Any(
+ m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_DISTANCE, uno::Any(
static_cast<sal_Int32>(ThreeDHelper::getCameraDistance( xSourceProp ))));
- xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE,
+ m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE,
xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_PERSPECTIVE));
}
//light
{
- xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE,
+ m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE,
xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_SHADE_MODE));
- xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR,
+ m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR,
xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_AMBIENTCOLOR));
- xDestProp->setPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING,
+ m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING,
xSourceProp->getPropertyValue( UNO_NAME_3D_SCENE_TWO_SIDED_LIGHTING));
- lcl_setLightSources( xSourceProp, xDestProp );
+ lcl_setLightSources( xSourceProp, m_xOuterGroupShape );
}
//rotation
@@ -577,7 +573,7 @@ void VDiagram::createShapes_3d()
//#i98497# 3D charts are rendered with wrong size
E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene(m_xOuterGroupShape));
- xDestProp->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX,
+ m_xOuterGroupShape->setPropertyValue( UNO_NAME_3D_TRANSFORM_MATRIX,
uno::Any( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aEffectiveTransformation ) ) );
}
}
@@ -618,7 +614,7 @@ void VDiagram::createShapes_3d()
//create an additional scene for the smaller inner coordinate region:
{
rtl::Reference<Svx3DSceneObject> xShapes2 = ShapeFactory::createGroup3D( xOuterGroup_Shapes,"testonly;CooContainer=XXX_CID" );
- m_xCoordinateRegionShape.set( static_cast<cppu::OWeakObject*>(xShapes2.get()), uno::UNO_QUERY );
+ m_xCoordinateRegionShape = xShapes2;
try
{
diff --git a/chart2/source/view/inc/LabelPositionHelper.hxx b/chart2/source/view/inc/LabelPositionHelper.hxx
index 811d8c13be24..ee1c7c8f0105 100644
--- a/chart2/source/view/inc/LabelPositionHelper.hxx
+++ b/chart2/source/view/inc/LabelPositionHelper.hxx
@@ -22,6 +22,8 @@
#include "LabelAlignment.hxx"
#include "PropertyMapper.hxx"
#include <com/sun/star/awt/Point.hpp>
+#include <rtl/ref.hxx>
+#include <svx/unoshape.hxx>
namespace com::sun::star::drawing { struct Position3D; }
namespace com::sun::star::drawing { class XShapes; }
@@ -37,7 +39,7 @@ public:
LabelPositionHelper() = delete;
LabelPositionHelper(
sal_Int32 nDimensionCount
- , const css::uno::Reference< css::drawing::XShapes >& xLogicTarget );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget );
virtual ~LabelPositionHelper();
css::awt::Point transformSceneToScreenPosition(
@@ -56,7 +58,7 @@ protected:
private:
//these members are only necessary for transformation from 3D to 2D
- css::uno::Reference< css::drawing::XShapes > m_xLogicTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xLogicTarget;
};
} //namespace chart
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx
index 8a4efd602605..b5ffb5e356fe 100644
--- a/chart2/source/view/inc/LegendEntryProvider.hxx
+++ b/chart2/source/view/inc/LegendEntryProvider.hxx
@@ -75,7 +75,7 @@ public:
const css::awt::Size& rEntryKeyAspectRatio,
css::chart2::LegendPosition eLegendPosition,
const css::uno::Reference< css::beans::XPropertySet >& xTextProperties,
- const css::uno::Reference< css::drawing::XShapes >& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
ChartModel& rModel
diff --git a/chart2/source/view/inc/PlotterBase.hxx b/chart2/source/view/inc/PlotterBase.hxx
index 187f755f5318..1d553e5c68d3 100644
--- a/chart2/source/view/inc/PlotterBase.hxx
+++ b/chart2/source/view/inc/PlotterBase.hxx
@@ -20,6 +20,7 @@
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring.hxx>
+#include <svx/unoshape.hxx>
#include <vector>
namespace com::sun::star::drawing { struct HomogenMatrix; }
@@ -47,8 +48,8 @@ public:
/// @throws css::uno::RuntimeException
virtual void initPlotter(
- const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
- , const css::uno::Reference< css::drawing::XShapes >& xFinalTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
, const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, const OUString& rCID
);
@@ -62,14 +63,13 @@ public:
static bool isValidPosition( const css::drawing::Position3D& rPos );
protected: //methods
- css::uno::Reference< css::drawing::XShapes >
- createGroupShape( const css::uno::Reference<
- css::drawing::XShapes >& xTarget
+ rtl::Reference< SvxShapeGroupAnyD >
+ createGroupShape( const rtl::Reference< SvxShapeGroupAnyD >& xTarget
, const OUString& rName=OUString() );
protected: //member
- css::uno::Reference< css::drawing::XShapes > m_xLogicTarget;
- css::uno::Reference< css::drawing::XShapes > m_xFinalTarget;
+ rtl::Reference< SvxShapeGroupAnyD > m_xLogicTarget;
+ rtl::Reference< SvxShapeGroupAnyD > m_xFinalTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
ShapeFactory* m_pShapeFactory;
OUString m_aCID;
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx
index 106eff673011..f5360942b2d7 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -31,6 +31,8 @@
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ref.hxx>
+#include <svx/unoshape.hxx>
namespace com::sun::star::chart2 { class XTransformation; }
namespace com::sun::star::drawing { class XShapes; }
@@ -85,7 +87,7 @@ public:
static css::awt::Point transformSceneToScreenPosition(
const css::drawing::Position3D& rScenePosition3D
- , const css::uno::Reference< css::drawing::XShapes >& xSceneTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xSceneTarget
, sal_Int32 nDimensionCount );
inline double getLogicMinX() const;
diff --git a/chart2/source/view/inc/PolarLabelPositionHelper.hxx b/chart2/source/view/inc/PolarLabelPositionHelper.hxx
index 5365320358e6..37cd95c02c75 100644
--- a/chart2/source/view/inc/PolarLabelPositionHelper.hxx
+++ b/chart2/source/view/inc/PolarLabelPositionHelper.hxx
@@ -33,7 +33,7 @@ public:
PolarLabelPositionHelper(
PolarPlottingPositionHelper* pPosHelper
, sal_Int32 nDimensionCount
- , const css::uno::Reference< css::drawing::XShapes >& xLogicTarget );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget );
virtual ~PolarLabelPositionHelper() override;
css::awt::Point getLabelScreenPositionAndAlignmentForLogicValues(
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index e42655284d65..6f9bc6e12ab4 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -82,16 +82,21 @@ public:
static rtl::Reference< SvxShapeGroup >
createGroup2D(
- const css::uno::Reference< css::drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const OUString& aName = OUString() );
+
+ static rtl::Reference< SvxShapeGroup >
+ createGroup2D(
+ const rtl::Reference<SvxDrawPage>& xTarget
, const OUString& aName = OUString() );
static rtl::Reference<Svx3DSceneObject>
createGroup3D(
- const css::uno::Reference< css::drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const OUString& aName = OUString() );
static rtl::Reference<Svx3DExtrudeObject>
- createCube( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createCube( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize
, sal_Int32 nRotateZAngleHundredthDegree
@@ -100,13 +105,13 @@ public:
, bool bRounded = false);
static rtl::Reference<Svx3DLatheObject>
- createCylinder( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createCylinder( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize
, sal_Int32 nRotateZAngleHundredthDegree );
static rtl::Reference<Svx3DSceneObject>
- createPyramid( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createPyramid( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize
, double fTopHeight
@@ -115,20 +120,20 @@ public:
, const tPropertyNameMap& rPropertyNameMap);
static rtl::Reference<Svx3DLatheObject>
- createCone( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createCone( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree );
static rtl::Reference<SvxShapePolyPolygon>
- createPieSegment2D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createPieSegment2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
, const css::drawing::Direction3D& rOffset
, const css::drawing::HomogenMatrix& rUnitCircleToScene );
static rtl::Reference<Svx3DExtrudeObject>
- createPieSegment( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createPieSegment( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
, const css::drawing::Direction3D& rOffset
@@ -136,7 +141,7 @@ public:
, double fDepth );
static rtl::Reference<Svx3DPolygonObject>
- createStripe( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createStripe( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const Stripe& rStripe
, const css::uno::Reference< css::beans::XPropertySet >& xSourceProp
, const tPropertyNameMap& rPropertyNameMap
@@ -145,16 +150,16 @@ public:
, bool bFlatNormals=true );
static rtl::Reference<Svx3DExtrudeObject>
- createArea3D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createArea3D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::PolyPolygonShape3D& rPolyPolygon
, double fDepth);
static rtl::Reference<SvxShapePolyPolygon>
- createArea2D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createArea2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::PolyPolygonShape3D& rPolyPolygon);
static rtl::Reference<SvxShapePolyPolygon>
- createSymbol2D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createSymbol2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPos
, const css::drawing::Direction3D& rSize
, sal_Int32 nStandardSymbol
@@ -162,37 +167,37 @@ public:
, sal_Int32 nFillColor );
static rtl::Reference<SvxGraphicObject>
- createGraphic2D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createGraphic2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPos
, const css::drawing::Direction3D& rSize
, const css::uno::Reference< css::graphic::XGraphic >& xGraphic );
static rtl::Reference<SvxShapePolyPolygon>
- createLine2D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createLine2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::PointSequenceSequence& rPoints
, const VLineProperties* pLineProperties = nullptr );
static rtl::Reference<SvxShapePolyPolygon>
- createLine ( const css::uno::Reference< css::drawing::XShapes >& xTarget,
+ createLine ( const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::awt::Size& rSize, const css::awt::Point& rPosition );
static rtl::Reference<Svx3DPolygonObject>
- createLine3D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createLine3D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::PolyPolygonShape3D& rPoints
, const VLineProperties& rLineProperties );
static rtl::Reference<SvxShapeCircle>
- createCircle2D( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createCircle2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPos
, const css::drawing::Direction3D& rSize );
static rtl::Reference<SvxShapeCircle>
- createCircle( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createCircle( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::awt::Size& rSize
, const css::awt::Point& rPosition );
static rtl::Reference<SvxShapeText>
- createText( const css::uno::Reference< css::drawing::XShapes >& xTarget2D
+ createText( const rtl::Reference<SvxShapeGroupAnyD>& xTarget2D
, const OUString& rText
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues
@@ -200,14 +205,14 @@ public:
);
static rtl::Reference<SvxShapeText>
- createText(const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createText(const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& xFormattedString
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues
, const css::uno::Any& rATransformation);
static rtl::Reference<SvxShapeText>
- createText( const css::uno::Reference< css::drawing::XShapes >& xTarget2D,
+ createText( const rtl::Reference<SvxShapeGroupAnyD>& xTarget2D,
const css::awt::Size& rSize,
const css::awt::Point& rPosition,
css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& xFormattedString,
@@ -216,12 +221,12 @@ public:
static rtl::Reference<SvxShapeRect>
createInvisibleRectangle(
- const css::uno::Reference< css::drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::awt::Size& rSize );
static rtl::Reference<SvxShapeRect>
createRectangle(
- const css::uno::Reference< css::drawing::XShapes >& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::awt::Size& rSize,
const css::awt::Point& rPosition,
const tNameSequence& rPropNames,
@@ -230,15 +235,15 @@ public:
static rtl::Reference<SvxShapeRect>
createRectangle(
- const css::uno::Reference< css::drawing::XShapes >& xTarget );
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
- static css::uno::Reference< css::drawing::XShapes >
+ static rtl::Reference<SvxShapeGroupAnyD>
getOrCreateChartRootShape( const rtl::Reference<SvxDrawPage>& xPage );
- static void setPageSize(const css::uno::Reference<css::drawing::XShapes>& xChartShapes,
+ static void setPageSize(const rtl::Reference<SvxShapeGroupAnyD>& xChartShapes,
const css::awt::Size& rSize);
- static css::uno::Reference< css::drawing::XShapes >
+ static rtl::Reference<SvxShapeGroupAnyD>
getChartRootShape( const rtl::Reference<SvxDrawPage>& xPage );
static void makeShapeInvisible( const rtl::Reference< SvxShape >& rShape );
@@ -270,19 +275,19 @@ public:
static css::awt::Size getSizeAfterRotation(
SvxShape& rShape, double fRotationAngleDegree );
- static void removeSubShapes( const css::uno::Reference< css::drawing::XShapes >& xShapes );
+ static void removeSubShapes( const rtl::Reference<SvxShapeGroupAnyD>& xShapes );
static sal_Int32 getSymbolCount() { return Symbol_COUNT; }
private:
static rtl::Reference<Svx3DExtrudeObject>
- impl_createCube( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ impl_createCube( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize, sal_Int32 nRotateZAngleHundredthDegree
, bool bRounded );
static rtl::Reference<Svx3DLatheObject>
- impl_createConeOrCylinder( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ impl_createConeOrCylinder( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D& rPosition
, const css::drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx
index 3cae017fdd74..e958b7248c0d 100644
--- a/chart2/source/view/inc/VCoordinateSystem.hxx
+++ b/chart2/source/view/inc/VCoordinateSystem.hxx
@@ -23,6 +23,8 @@
#include <chartview/ExplicitScaleValues.hxx>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ref.hxx>
+#include <svx/unoshape.hxx>
#include <map>
#include <memory>
@@ -55,10 +57,10 @@ public:
/// @throws css::uno::RuntimeException
void initPlottingTargets(
- const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
- , const css::uno::Reference< css::drawing::XShapes >& xFinalTarget
+ const rtl::Reference< SvxShapeGroupAnyD >& xLogicTarget
+ , const rtl::Reference< SvxShapeGroupAnyD >& xFinalTarget
, const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
- , css::uno::Reference< css::drawing::XShapes >& xLogicTargetForSeriesBehindAxis );
+ , rtl::Reference<SvxShapeGroupAnyD>& xLogicTargetForSeriesBehindAxis );
void setParticle( const OUString& rCooSysParticle );
@@ -165,9 +167,9 @@ protected: //member
typedef std::pair< sal_Int32, sal_Int32 > tFullAxisIndex; //first index is the dimension, second index is the axis index that indicates whether this is a main or secondary axis
- css::uno::Reference< css::drawing::XShapes > m_xLogicTargetForGrids;
- css::uno::Reference< css::drawing::XShapes > m_xLogicTargetForAxes;
- css::uno::Reference< css::drawing::XShapes > m_xFinalTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xLogicTargetForGrids;
+ rtl::Reference<SvxShapeGroupAnyD> m_xLogicTargetForAxes;
+ rtl::Reference<SvxShapeGroupAnyD> m_xFinalTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
css::drawing::HomogenMatrix m_aMatrixSceneToScreen;
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index b8922c4d47f9..48ea0d4234ff 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -182,15 +182,15 @@ private: //methods
VDataSeries();
public: //member
- css::uno::Reference<css::drawing::XShapes> m_xGroupShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xGroupShape;
rtl::Reference<SvxShapeGroup> m_xLabelsGroupShape;
- css::uno::Reference<css::drawing::XShapes> m_xErrorXBarsGroupShape;
- css::uno::Reference<css::drawing::XShapes> m_xErrorYBarsGroupShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xErrorXBarsGroupShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xErrorYBarsGroupShape;
//the following group shapes will be created as children of m_xGroupShape on demand
//they can be used to assure that some parts of a series shape are always in front of others (e.g. symbols in front of lines)
- css::uno::Reference<css::drawing::XShapes> m_xFrontSubGroupShape;
- css::uno::Reference<css::drawing::XShapes> m_xBackSubGroupShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xFrontSubGroupShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xBackSubGroupShape;
private: //member
css::uno::Reference<css::chart2::XDataSeries> m_xDataSeries;
diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx
index 757cc1ec61cf..6e18280079ac 100644
--- a/chart2/source/view/inc/VDiagram.hxx
+++ b/chart2/source/view/inc/VDiagram.hxx
@@ -51,14 +51,14 @@ public: //methods
~VDiagram();
void init(
- const css::uno::Reference<css::drawing::XShapes>& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory );
void createShapes( const css::awt::Point& rPos
, const css::awt::Size& rSize );
- css::uno::Reference< css::drawing::XShapes >
- getCoordinateRegion() const { return css::uno::Reference<css::drawing::XShapes>( m_xCoordinateRegionShape, css::uno::UNO_QUERY );}
+ const rtl::Reference<SvxShapeGroupAnyD> &
+ getCoordinateRegion() const { return m_xCoordinateRegionShape; }
/**
* Get current bounding rectangle for the diagram without axes.
@@ -86,14 +86,14 @@ private: //methods
private: //members
VDiagram(const VDiagram& rD) = delete;
- css::uno::Reference< css::drawing::XShapes > m_xTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
ShapeFactory* m_pShapeFactory;
// this is the surrounding shape which contains floor, wall and coordinate
- css::uno::Reference< css::drawing::XShape > m_xOuterGroupShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xOuterGroupShape;
// this is an additional inner shape that represents the coordinate region - that is - where to place data points
- css::uno::Reference< css::drawing::XShape > m_xCoordinateRegionShape;
+ rtl::Reference<SvxShapeGroupAnyD> m_xCoordinateRegionShape;
rtl::Reference<SvxShapeRect> m_xWall2D;
sal_Int32 m_nDimensionCount;
diff --git a/chart2/source/view/inc/VLegendSymbolFactory.hxx b/chart2/source/view/inc/VLegendSymbolFactory.hxx
index d9189575ee24..f637a5894912 100644
--- a/chart2/source/view/inc/VLegendSymbolFactory.hxx
+++ b/chart2/source/view/inc/VLegendSymbolFactory.hxx
@@ -42,9 +42,8 @@ namespace chart::VLegendSymbolFactory
rtl::Reference< SvxShapeGroup >
createSymbol(
const css::awt::Size& rEntryKeyAspectRatio,
- const css::uno::Reference< css::drawing::XShapes >& rSymbolContainer,
+ const rtl::Reference<SvxShapeGroupAnyD>& rSymbolContainer,
LegendSymbolStyle eStyle,
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xShapeFactory,
const css::uno::Reference< css::beans::XPropertySet > & xLegendEntryProperties,
PropertyType ePropertyType,
const css::uno::Any& rExplicitSymbol /*should contain a css::chart2::Symbol without automatic symbol if the charttype does support symbols else empty*/);
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index d80d248a3c70..93b09cb32d59 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -186,7 +186,7 @@ public:
const css::awt::Size& rEntryKeyAspectRatio,
css::chart2::LegendPosition eLegendPosition,
const css::uno::Reference< css::beans::XPropertySet >& xTextProperties,
- const css::uno::Reference< css::drawing::XShapes >& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
ChartModel& rModel
@@ -200,21 +200,19 @@ public:
rtl::Reference<SvxShapeGroup> createLegendSymbolForSeries(
const css::awt::Size& rEntryKeyAspectRatio
, const VDataSeries& rSeries
- , const css::uno::Reference< css::drawing::XShapes >& xTarget
- , const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
rtl::Reference< SvxShapeGroup > createLegendSymbolForPoint(
const css::awt::Size& rEntryKeyAspectRatio
, const VDataSeries& rSeries
, sal_Int32 nPointIndex
- , const css::uno::Reference< css::drawing::XShapes >& xTarget
- , const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
std::vector< ViewLegendEntry > createLegendEntriesForSeries(
const css::awt::Size& rEntryKeyAspectRatio,
const VDataSeries& rSeries,
const css::uno::Reference< css::beans::XPropertySet >& xTextProperties,
- const css::uno::Reference< css::drawing::XShapes >& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory,
const css::uno::Reference< css::uno::XComponentContext >& xContext
);
@@ -264,29 +262,29 @@ protected:
// Methods for group shapes.
- css::uno::Reference< css::drawing::XShapes >
+ rtl::Reference<SvxShapeGroupAnyD>
getSeriesGroupShape( VDataSeries* pDataSeries
- , const css:: uno::Reference< css::drawing::XShapes >& xTarget );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
//the following group shapes will be created as children of SeriesGroupShape on demand
//they can be used to assure that some parts of a series shape are always in front of others (e.g. symbols in front of lines)
//parameter xTarget will be used as parent for the series group shape
- css::uno::Reference< css::drawing::XShapes >
+ rtl::Reference<SvxShapeGroupAnyD>
getSeriesGroupShapeFrontChild( VDataSeries* pDataSeries
- , const css:: uno::Reference< css::drawing::XShapes >& xTarget );
- css::uno::Reference< css::drawing::XShapes >
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
+ rtl::Reference<SvxShapeGroupAnyD>
getSeriesGroupShapeBackChild( VDataSeries* pDataSeries
- , const css:: uno::Reference< css::drawing::XShapes >& xTarget );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
/// This method creates a 2D group shape for containing all text shapes
/// needed for this series; the group is added to the text target;
static rtl::Reference<SvxShapeGroup>
getLabelsGroupShape( VDataSeries& rDataSeries
- , const css:: uno::Reference< css::drawing::XShapes >& xTarget );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
- css::uno::Reference< css::drawing::XShapes >
+ rtl::Reference<SvxShapeGroupAnyD>
getErrorBarsGroupShape( VDataSeries& rDataSeries
- , const css:: uno::Reference< css::drawing::XShapes >& xTarget, bool bYError );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget, bool bYError );
/** This method creates a text shape for a label related to a data point
* and append it to the root text shape group (xTarget).
@@ -314,7 +312,7 @@ protected:
* a reference to the created text shape.
*/
rtl::Reference<SvxShapeText>
- createDataLabel( const css::uno::Reference< css::drawing::XShapes >& xTarget
+ createDataLabel( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, VDataSeries& rDataSeries
, sal_Int32 nPointIndex
, double fValue
@@ -349,7 +347,7 @@ protected:
for y-error bars this is true, for x-error-bars it is false.
*/
void createErrorBar(
- const css::uno::Reference< css::drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const css::drawing::Position3D & rPos
, const css::uno::Reference< css::beans::XPropertySet > & xErrorBarProperties
, const VDataSeries& rVDataSeries
@@ -362,7 +360,7 @@ protected:
const css::drawing::Position3D& rUnscaledLogicPosition
, VDataSeries& rVDataSeries
, sal_Int32 nIndex
- , const css::uno::Reference< css::drawing::XShapes >& rTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& rTarget
, bool bUseXErrorData
, bool bUseYErrorData
);
@@ -370,26 +368,26 @@ protected:
static void addErrorBorder(
const css::drawing::Position3D& rPos0
, const css::drawing::Position3D& rPos1
- , const css::uno::Reference< css::drawing::XShapes >& rTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& rTarget
, const css::uno::Reference< css::beans::XPropertySet >& rErrorBorderProp );
void createErrorBar_X( const css::drawing::Position3D& rUnscaledLogicPosition
, VDataSeries& rVDataSeries, sal_Int32 nPointIndex
- , const css::uno::Reference< css::drawing::XShapes >& xTarget );
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
void createErrorBar_Y( const css::drawing::Position3D& rUnscaledLogicPosition
, VDataSeries& rVDataSeries, sal_Int32 nPointIndex
- , const css::uno::Reference< css::drawing::XShapes >& xTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, double const * pfScaledLogicX );
void createRegressionCurvesShapes( VDataSeries const & rVDataSeries
- , const css::uno::Reference< css::drawing::XShapes >& xTarget
- , const css::uno::Reference< css::drawing::XShapes >& xEquationTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xEquationTarget
, bool bMaySkipPointsInRegressionCalculation );
void createRegressionCurveEquationShapes( const OUString & rEquationCID
, const css::uno::Reference< css::beans::XPropertySet > & xEquationProperties
- , const css::uno::Reference< css::drawing::XShapes >& xEquationTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xEquationTarget
, const css::uno::Reference< css::chart2::XRegressionCurveCalculator > & xRegressionCurveCalculator
, css::awt::Point aDefaultPos );
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 85e4e5fcb7f1..97fd3ab42dab 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1440,8 +1440,8 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
drawing::Direction3D aPreferredAspectRatio =
rParam.mpSeriesPlotterContainer->getPreferredAspectRatio();
- uno::Reference< drawing::XShapes > xSeriesTargetInFrontOfAxis;
- uno::Reference< drawing::XShapes > xSeriesTargetBehindAxis;
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTargetInFrontOfAxis;
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTargetBehindAxis;
VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount);
{//create diagram
aVDiagram.init(rParam.mxDiagramWithAxesShapes, m_xShapeFactory);
@@ -1536,7 +1536,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
for( const std::unique_ptr<VSeriesPlotter>& aPlotter : rSeriesPlotterList )
{
VSeriesPlotter* pSeriesPlotter = aPlotter.get();
- uno::Reference< drawing::XShapes > xSeriesTarget;
+ rtl::Reference<SvxShapeGroupAnyD> xSeriesTarget;
if( pSeriesPlotter->WantToPlotInFrontOfAxisLine() )
xSeriesTarget = xSeriesTargetInFrontOfAxis;
else
@@ -2066,7 +2066,7 @@ void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment
}
std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
- , const uno::Reference< drawing::XShapes>& xPageShapes
+ , const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes
, const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory
, ChartModel& rModel
, awt::Rectangle& rRemainingSpace
@@ -2200,7 +2200,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
}
bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
- , const uno::Reference< drawing::XShapes>& xPageShapes
+ , const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes
, const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory
, const uno::Reference< uno::XComponentContext > & xContext
, awt::Rectangle & rRemainingSpace
@@ -2222,7 +2222,7 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
return true;
}
-void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes,
+void lcl_createButtons(const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes,
const uno::Reference<lang::XMultiServiceFactory>& xShapeFactory,
ChartModel& rModel,
awt::Rectangle& rRemainingSpace)
@@ -2296,8 +2296,7 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes,
void formatPage(
ChartModel& rChartModel
, const awt::Size& rPageSize
- , const uno::Reference< drawing::XShapes >& xTarget
- , const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory
+ , const rtl::Reference<SvxShapeGroupAnyD>& xTarget
)
{
try
@@ -2306,9 +2305,6 @@ void formatPage(
if( ! xModelPage.is())
return;
- if( !xShapeFactory.is() )
- return;
-
//format page
tPropertyNameValueMap aNameValueMap;
PropertyMapper::getValueMap( aNameValueMap, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xModelPage );
@@ -2836,7 +2832,7 @@ OUString ChartView::dump()
uno::Reference< drawing::XShapes > xShape(m_xDrawPage->getByIndex(i), uno::UNO_QUERY);
if(xShape.is())
{
- OUString aString = XShapeDumper::dump(mxRootShape);
+ OUString aString = XShapeDumper::dump(uno::Reference<drawing::XShapes>(mxRootShape));
aBuffer.append(aString);
}
else
@@ -2885,7 +2881,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
{
// todo: it would be nicer to just pass the page m_xDrawPage and format it,
// but the draw page does not support XPropertySet
- formatPage( mrChartModel, rPageSize, mxRootShape, m_xShapeFactory );
+ formatPage( mrChartModel, rPageSize, mxRootShape );
CreateShapeParam2D aParam;
aParam.maRemainingSpace.X = 0;
diff --git a/chart2/source/view/main/DataPointSymbolSupplier.cxx b/chart2/source/view/main/DataPointSymbolSupplier.cxx
index ba112e082b33..ff7f8370ac32 100644
--- a/chart2/source/view/main/DataPointSymbolSupplier.cxx
+++ b/chart2/source/view/main/DataPointSymbolSupplier.cxx
@@ -26,7 +26,7 @@ namespace chart
using namespace ::com::sun::star;
rtl::Reference< SvxShapeGroup > DataPointSymbolSupplier::create2DSymbolList(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxDrawPage>& xTarget
, const drawing::Direction3D& rSize )
{
rtl::Reference< SvxShapeGroup > xGroupShapes = ShapeFactory::createGroup2D( xTarget );
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index c427e429fb44..a632947758c9 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -35,7 +35,7 @@ using namespace ::com::sun::star::chart2;
LabelPositionHelper::LabelPositionHelper(
sal_Int32 nDimensionCount
- , const uno::Reference< drawing::XShapes >& xLogicTarget)
+ , const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget)
: m_nDimensionCount(nDimensionCount)
, m_xLogicTarget(xLogicTarget)
{
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx
index 382d3fa7a18a..93c80ca1574e 100644
--- a/chart2/source/view/main/PlotterBase.cxx
+++ b/chart2/source/view/main/PlotterBase.cxx
@@ -34,8 +34,8 @@ PlotterBase::PlotterBase( sal_Int32 nDimensionCount )
{
}
-void PlotterBase::initPlotter( const uno::Reference< drawing::XShapes >& xLogicTarget
- , const uno::Reference< drawing::XShapes >& xFinalTarget
+void PlotterBase::initPlotter( const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
, const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory
, const OUString& rCID )
{
@@ -72,8 +72,8 @@ void PlotterBase::setTransformationSceneToScreen( const drawing::HomogenMatrix&
m_pPosHelper->setTransformationSceneToScreen( rMatrix );
}
-uno::Reference< drawing::XShapes > PlotterBase::createGroupShape(
- const uno::Reference< drawing::XShapes >& xTarget
+rtl::Reference<SvxShapeGroupAnyD> PlotterBase::createGroupShape(
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const OUString& rName )
{
if(!m_xShapeFactory.is())
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index e105393236d5..350c0942ae78 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -193,7 +193,7 @@ drawing::Position3D PlottingPositionHelper::transformScaledLogicToScene(
}
awt::Point PlottingPositionHelper::transformSceneToScreenPosition( const drawing::Position3D& rScenePosition3D
- , const uno::Reference< drawing::XShapes >& xSceneTarget
+ , const rtl::Reference<SvxShapeGroupAnyD>& xSceneTarget
, sal_Int32 nDimensionCount )
{
//@todo would like to have a cheaper method to do this transformation
diff --git a/chart2/source/view/main/PolarLabelPositionHelper.cxx b/chart2/source/view/main/PolarLabelPositionHelper.cxx
index 8ca4a44ac46e..d5c819954a91 100644
--- a/chart2/source/view/main/PolarLabelPositionHelper.cxx
+++ b/chart2/source/view/main/PolarLabelPositionHelper.cxx
@@ -32,7 +32,7 @@ using namespace ::com::sun::star::chart2;
PolarLabelPositionHelper::PolarLabelPositionHelper(
PolarPlottingPositionHelper* pPosHelper
, sal_Int32 nDimensionCount
- , const uno::Reference< drawing::XShapes >& xLogicTarget )
+ , const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget )
: LabelPositionHelper( nDimensionCount, xLogicTarget )
, m_pPosHelper(pPosHelper)
{
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 45c63c425646..afcea1802274 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -83,10 +83,10 @@ void lcl_addProperty(uno::Sequence<OUString> & rPropertyNames, uno::Sequence<uno
} // end anonymous namespace
-uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape(
+rtl::Reference<SvxShapeGroupAnyD> ShapeFactory::getOrCreateChartRootShape(
const rtl::Reference<SvxDrawPage>& xDrawPage )
{
- uno::Reference<drawing::XShapes> xRet = ShapeFactory::getChartRootShape(xDrawPage);
+ rtl::Reference<SvxShapeGroupAnyD> xRet = ShapeFactory::getChartRootShape(xDrawPage);
if (xRet.is())
return xRet;
@@ -98,13 +98,12 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape(
xDrawPage->addBottom(xShape);
setShapeName(xShapeGroup, "com.sun.star.chart2.shapes");
- xShape->setSize(awt::Size(0,0));
+ xShapeGroup->setSize(awt::Size(0,0));
- xRet.set(xShape, uno::UNO_QUERY);
- return xRet;
+ return xShapeGroup;
}
-void ShapeFactory::setPageSize(const uno::Reference<drawing::XShapes>&, const awt::Size&) {}
+void ShapeFactory::setPageSize(const rtl::Reference<SvxShapeGroupAnyD>&, const awt::Size&) {}
// diverse tools::PolyPolygon create methods
@@ -360,7 +359,7 @@ static uno::Any createPolyPolygon_Cone( double fHeight, double fRadius, double f
rtl::Reference<Svx3DExtrudeObject>
ShapeFactory::createCube(
- const uno::Reference<drawing::XShapes>& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, sal_Int32 nRotateZAngleHundredthDegree
, const uno::Reference< beans::XPropertySet >& xSourceProp
@@ -394,7 +393,7 @@ rtl::Reference<Svx3DExtrudeObject>
rtl::Reference<Svx3DExtrudeObject>
ShapeFactory::impl_createCube(
- const uno::Reference<drawing::XShapes>& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, sal_Int32 nRotateZAngleHundredthDegree
, bool bRounded )
@@ -450,7 +449,7 @@ rtl::Reference<Svx3DExtrudeObject>
rtl::Reference<Svx3DLatheObject>
ShapeFactory::createCylinder(
- const uno::Reference<drawing::XShapes>& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, sal_Int32 nRotateZAngleHundredthDegree )
{
@@ -460,7 +459,7 @@ rtl::Reference<Svx3DLatheObject>
rtl::Reference<Svx3DSceneObject>
ShapeFactory::createPyramid(
- const uno::Reference<drawing::XShapes>& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, double fTopHeight, bool bRotateZ
, const uno::Reference< beans::XPropertySet >& xSourceProp
@@ -620,7 +619,7 @@ rtl::Reference<Svx3DSceneObject>
rtl::Reference<Svx3DLatheObject>
ShapeFactory::createCone(
- const uno::Reference<drawing::XShapes>& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree )
{
@@ -629,7 +628,7 @@ rtl::Reference<Svx3DLatheObject>
rtl::Reference<Svx3DLatheObject>
ShapeFactory::impl_createConeOrCylinder(
- const uno::Reference<drawing::XShapes>& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
, bool bCylinder )
@@ -852,7 +851,7 @@ static drawing::PolyPolygonBezierCoords getRingBezierCoords(
rtl::Reference<SvxShapePolyPolygon>
ShapeFactory::createPieSegment2D(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
, const drawing::Direction3D& rOffset
@@ -898,7 +897,7 @@ rtl::Reference<SvxShapePolyPolygon>
rtl::Reference<Svx3DExtrudeObject>
ShapeFactory::createPieSegment(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
, const drawing::Direction3D& rOffset
@@ -973,7 +972,7 @@ rtl::Reference<Svx3DExtrudeObject>
}
rtl::Reference<Svx3DPolygonObject>
- ShapeFactory::createStripe( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createStripe( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const Stripe& rStripe
, const uno::Reference< beans::XPropertySet >& xSourceProp
, const tPropertyNameMap& rPropertyNameMap
@@ -1028,7 +1027,7 @@ rtl::Reference<Svx3DPolygonObject>
}
rtl::Reference<Svx3DExtrudeObject>
- ShapeFactory::createArea3D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createArea3D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::PolyPolygonShape3D& rPolyPolygon
, double fDepth )
{
@@ -1082,7 +1081,7 @@ rtl::Reference<Svx3DExtrudeObject>
rtl::Reference<SvxShapePolyPolygon>
- ShapeFactory::createArea2D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createArea2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::PolyPolygonShape3D& rPolyPolygon )
{
if( !xTarget.is() )
@@ -1618,7 +1617,7 @@ static drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Posi
rtl::Reference<SvxShapePolyPolygon>
ShapeFactory::createSymbol2D(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition
, const drawing::Direction3D& rSize
, sal_Int32 nStandardSymbol
@@ -1660,7 +1659,7 @@ rtl::Reference<SvxShapePolyPolygon>
rtl::Reference<SvxGraphicObject>
ShapeFactory::createGraphic2D(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition
, const drawing::Direction3D& rSize
, const uno::Reference< graphic::XGraphic >& xGraphic )
@@ -1702,7 +1701,39 @@ rtl::Reference<SvxGraphicObject>
}
rtl::Reference< SvxShapeGroup >
- ShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createGroup2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
+ , const OUString& aName )
+{
+ if( !xTarget.is() )
+ return nullptr;
+ try
+ {
+ //create and add to target
+ rtl::Reference<SvxShapeGroup> xShapeGroup = new SvxShapeGroup(nullptr, nullptr);
+ xShapeGroup->setShapeKind(OBJ_GRUP);
+ uno::Reference< drawing::XShape > xShape(static_cast<cppu::OWeakObject*>(xShapeGroup.get()), uno::UNO_QUERY_THROW);
+ xTarget->add(xShape);
+
+ //set name
+ if(!aName.isEmpty())
+ setShapeName( xShapeGroup, aName );
+
+ {//workaround
+ //need this null size as otherwise empty group shapes where painted with a gray border
+ xShapeGroup->setSize(awt::Size(0,0));
+ }
+
+ return xShapeGroup;
+ }
+ catch( const uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("chart2", "" );
+ }
+ return nullptr;
+}
+
+rtl::Reference< SvxShapeGroup >
+ ShapeFactory::createGroup2D( const rtl::Reference<SvxDrawPage>& xTarget
, const OUString& aName )
{
if( !xTarget.is() )
@@ -1734,7 +1765,7 @@ rtl::Reference< SvxShapeGroup >
}
rtl::Reference<Svx3DSceneObject>
- ShapeFactory::createGroup3D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createGroup3D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const OUString& aName )
{
if( !xTarget.is() )
@@ -1776,7 +1807,7 @@ rtl::Reference<Svx3DSceneObject>
}
rtl::Reference<SvxShapeCircle>
- ShapeFactory::createCircle2D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createCircle2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::Position3D& rPosition
, const drawing::Direction3D& rSize )
{
@@ -1815,7 +1846,7 @@ rtl::Reference<SvxShapeCircle>
}
rtl::Reference<SvxShapeCircle>
- ShapeFactory::createCircle( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createCircle( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const awt::Size& rSize
, const awt::Point& rPosition )
{
@@ -1829,7 +1860,7 @@ rtl::Reference<SvxShapeCircle>
}
rtl::Reference<Svx3DPolygonObject>
- ShapeFactory::createLine3D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createLine3D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::PolyPolygonShape3D& rPoints
, const VLineProperties& rLineProperties )
{
@@ -1898,7 +1929,7 @@ rtl::Reference<Svx3DPolygonObject>
}
rtl::Reference<SvxShapePolyPolygon>
- ShapeFactory::createLine2D( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createLine2D( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const drawing::PointSequenceSequence& rPoints
, const VLineProperties* pLineProperties )
{
@@ -1961,7 +1992,7 @@ rtl::Reference<SvxShapePolyPolygon>
}
rtl::Reference<SvxShapePolyPolygon>
- ShapeFactory::createLine ( const uno::Reference< drawing::XShapes >& xTarget,
+ ShapeFactory::createLine ( const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const awt::Size& rSize, const awt::Point& rPosition )
{
//create shape
@@ -1975,7 +2006,7 @@ rtl::Reference<SvxShapePolyPolygon>
}
rtl::Reference<SvxShapeRect> ShapeFactory::createInvisibleRectangle(
- const uno::Reference< drawing::XShapes >& xTarget
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const awt::Size& rSize )
{
try
@@ -1998,7 +2029,7 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createInvisibleRectangle(
}
rtl::Reference<SvxShapeRect> ShapeFactory::createRectangle(
- const uno::Reference< drawing::XShapes >& xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const awt::Size& rSize,
const awt::Point& rPosition,
const tNameSequence& rPropNames,
@@ -2009,7 +2040,7 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createRectangle(
xShape->setShapeKind(OBJ_RECT);
if (ePos == StackPosition::Bottom)
{
- uno::Reference<drawing::XShapes2> xTarget2(xTarget, uno::UNO_QUERY);
+ uno::Reference<drawing::XShapes2> xTarget2(static_cast<cppu::OWeakObject*>(xTarget.get()), uno::UNO_QUERY);
if (xTarget2.is())
xTarget2->addBottom(xShape);
}
@@ -2025,7 +2056,7 @@ rtl::Reference<SvxShapeRect> ShapeFactory::createRectangle(
rtl::Reference<SvxShapeRect>
ShapeFactory::createRectangle(
- const uno::Reference< drawing::XShapes >& xTarget )
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
rtl::Reference<SvxShapeRect> xShape = new SvxShapeRect(nullptr);
xShape->setShapeKind(OBJ_RECT);
@@ -2035,7 +2066,7 @@ rtl::Reference<SvxShapeRect>
}
rtl::Reference<SvxShapeText>
- ShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createText( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const OUString& rText
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues
@@ -2076,7 +2107,7 @@ rtl::Reference<SvxShapeText>
}
rtl::Reference<SvxShapeText>
- ShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget
+ ShapeFactory::createText( const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString
, const tNameSequence& rPropNames
, const tAnySequence& rPropValues
@@ -2161,7 +2192,7 @@ rtl::Reference<SvxShapeText>
}
rtl::Reference<SvxShapeText>
- ShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget,
+ ShapeFactory::createText( const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
const awt::Size& rSize,
const awt::Point& rPos,
uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString,
@@ -2310,10 +2341,10 @@ ShapeFactory* ShapeFactory::getOrCreateShapeFactory(const uno::Reference< lang::
return pShapeFactory;
}
-uno::Reference< drawing::XShapes > ShapeFactory::getChartRootShape(
+rtl::Reference<SvxShapeGroupAnyD> ShapeFactory::getChartRootShape(
const rtl::Reference<SvxDrawPage>& xDrawPage )
{
- uno::Reference< drawing::XShapes > xRet;
+ rtl::Reference<SvxShapeGroupAnyD> xRet;
const uno::Reference< drawing::XShapes > xShapes = xDrawPage;
if( xShapes.is() )
{
@@ -2325,7 +2356,8 @@ uno::Reference< drawing::XShapes > ShapeFactory::getChartRootShape(
{
if( ShapeFactory::getShapeName( xShape ) == "com.sun.star.chart2.shapes" )
{
- xRet.set( xShape, uno::UNO_QUERY );
+ xRet = dynamic_cast<SvxShapeGroupAnyD*>(xShape.get());
+ assert(xRet);
break;
}
}
@@ -2510,7 +2542,7 @@ awt::Size ShapeFactory::getSizeAfterRotation(
return aRet;
}
-void ShapeFactory::removeSubShapes( const uno::Reference< drawing::XShapes >& xShapes )
+void ShapeFactory::removeSubShapes( const rtl::Reference<SvxShapeGroupAnyD>& xShapes )
{
if( xShapes.is() )
{
diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx
index b28f42d6f52f..d19f3ef4fa0d 100644
--- a/chart2/source/view/main/VButton.cxx
+++ b/chart2/source/view/main/VButton.cxx
@@ -35,7 +35,7 @@ VButton::VButton()
{
}
-void VButton::init(const uno::Reference<drawing::XShapes>& xTargetPage,
+void VButton::init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
const uno::Reference<lang::XMultiServiceFactory>& xFactory)
{
m_xTarget = xTargetPage;
@@ -102,8 +102,7 @@ void VButton::createShapes(const uno::Reference<beans::XPropertySet>& xTextProp)
m_xShape->setPosition(m_aPosition);
m_xShape->setSize(m_aSize);
- uno::Reference<drawing::XShapes> xContainer(static_cast<cppu::OWeakObject*>(m_xShape.get()),
- uno::UNO_QUERY_THROW);
+ rtl::Reference<SvxShapeGroupAnyD> xContainer = m_xShape;
tPropertyNameValueMap aTextValueMap;
aTextValueMap["CharHeight"] <<= 10.0f;
diff --git a/chart2/source/view/main/VButton.hxx b/chart2/source/view/main/VButton.hxx
index 35761e349991..9d9e3f28b43e 100644
--- a/chart2/source/view/main/VButton.hxx
+++ b/chart2/source/view/main/VButton.hxx
@@ -28,7 +28,7 @@ class VButton final
{
private:
css::uno::Reference<css::lang::XMultiServiceFactory> m_xShapeFactory;
- css::uno::Reference<css::drawing::XShapes> m_xTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
rtl::Reference<SvxShapeGroup> m_xShape;
OUString m_sLabel;
OUString m_sCID;
@@ -44,7 +44,7 @@ private:
public:
VButton();
- void init(const css::uno::Reference<css::drawing::XShapes>& xTargetPage,
+ void init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory);
void createShapes(const css::uno::Reference<css::beans::XPropertySet>& xTextProp);
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 370093d636e7..9ed83a77b086 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -149,7 +149,7 @@ void lcl_getProperties(
awt::Size lcl_createTextShapes(
const std::vector<ViewLegendEntry> & rEntries,
- const Reference< drawing::XShapes > & xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD> & xTarget,
std::vector< rtl::Reference<SvxShapeText> > & rOutTextShapes,
const tPropertyValues & rTextProperties )
{
@@ -265,7 +265,7 @@ awt::Size lcl_placeLegendEntries(
double fViewFontSize,
const awt::Size& rMaxSymbolExtent,
tPropertyValues & rTextProperties,
- const Reference< drawing::XShapes > & xTarget,
+ const rtl::Reference<SvxShapeGroupAnyD> & xTarget,
const awt::Size& rRemainingSpace,
sal_Int32 nYStartPosition,
const awt::Size& rPageSize,
@@ -820,7 +820,7 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe
}
std::vector<std::shared_ptr<VButton>> lcl_createButtons(
- uno::Reference<drawing::XShapes> const & xLegendContainer,
+ rtl::Reference<SvxShapeGroupAnyD> const & xLegendContainer,
uno::Reference<lang::XMultiServiceFactory> const & xShapeFactory,
ChartModel& rModel, bool bPlaceButtonsVertically, tools::Long & nUsedHeight)
{
@@ -875,7 +875,7 @@ VLegend::VLegend(
const Reference< XLegend > & xLegend,
const Reference< uno::XComponentContext > & xContext,
std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
- const Reference< drawing::XShapes >& xTargetPage,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
const Reference< lang::XMultiServiceFactory >& xFactory,
ChartModel& rModel )
: m_xTarget(xTargetPage)
@@ -930,7 +930,7 @@ void VLegend::createShapes(
ObjectIdentifier::createClassifiedIdentifierForParticle( aLegendParticle ) );
// create and insert sub-shapes
- Reference< drawing::XShapes > xLegendContainer = m_xShape;
+ rtl::Reference<SvxShapeGroupAnyD> xLegendContainer = m_xShape;
if( xLegendContainer.is() )
{
// for quickly setting properties
diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx
index d4963cd69671..6750cc780465 100644
--- a/chart2/source/view/main/VLegend.hxx
+++ b/chart2/source/view/main/VLegend.hxx
@@ -43,7 +43,7 @@ public:
VLegend( const css::uno::Reference< css::chart2::XLegend > & xLegend,
const css::uno::Reference< css::uno::XComponentContext > & xContext,
std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
- const css::uno::Reference< css::drawing::XShapes >& xTargetPage,
+ const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory,
ChartModel& rModel );
@@ -71,7 +71,7 @@ public:
const css::uno::Reference< css::chart2::XLegend > & xLegend );
private:
- css::uno::Reference< css::drawing::XShapes > m_xTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
css::uno::Reference< css::chart2::XLegend > m_xLegend;
rtl::Reference< SvxShapeGroup > m_xShape;
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index d70a5e09af1d..f4bec2397d89 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -92,22 +92,21 @@ namespace chart
rtl::Reference< SvxShapeGroup > VLegendSymbolFactory::createSymbol(
const awt::Size& rEntryKeyAspectRatio,
- const Reference< drawing::XShapes >& rSymbolContainer,
+ const rtl::Reference<SvxShapeGroupAnyD>& rSymbolContainer,
LegendSymbolStyle eStyle,
- const Reference< lang::XMultiServiceFactory > & xShapeFactory,
const Reference< beans::XPropertySet > & xLegendEntryProperties,
PropertyType ePropertyType, const uno::Any& rExplicitSymbol )
{
rtl::Reference< SvxShapeGroup > xResult;
- if( ! (rSymbolContainer.is() && xShapeFactory.is()))
+ if( !rSymbolContainer)
return xResult;
xResult = ShapeFactory::createGroup2D( rSymbolContainer );
if( ! xResult)
return xResult;
- Reference< drawing::XShapes > xResultGroup( static_cast<cppu::OWeakObject*>(xResult.get()), uno::UNO_QUERY_THROW );
+ rtl::Reference<SvxShapeGroupAnyD> xResultGroup = xResult;
// add an invisible square box to maintain aspect ratio
ShapeFactory::createInvisibleRectangle( xResultGroup, rEntryKeyAspectRatio );
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index d50d11f10a69..16c09cc08bd8 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -43,7 +43,7 @@ VTitle::~VTitle()
}
void VTitle::init(
- const uno::Reference< drawing::XShapes >& xTargetPage
+ const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage
, const uno::Reference< lang::XMultiServiceFactory >& xFactory
, const OUString& rCID )
{
diff --git a/chart2/source/view/main/VTitle.hxx b/chart2/source/view/main/VTitle.hxx
index ad3d1d815b88..69b7edd0cfb4 100644
--- a/chart2/source/view/main/VTitle.hxx
+++ b/chart2/source/view/main/VTitle.hxx
@@ -23,6 +23,7 @@
#include <rtl/ustring.hxx>
#include <rtl/ref.hxx>
#include <sal/types.h>
+#include <svx/unoshape.hxx>
namespace com::sun::star::awt { struct Point; }
namespace com::sun::star::chart2 { class XTitle; }
@@ -40,7 +41,7 @@ public:
explicit VTitle( const css::uno::Reference< css::chart2::XTitle > & xTitle );
~VTitle();
- void init( const css::uno::Reference< css::drawing::XShapes >& xTargetPage
+ void init( const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage
, const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, const OUString& rCID );
@@ -57,7 +58,7 @@ public:
const css::uno::Reference< css::chart2::XTitle > & xTitle);
private:
- css::uno::Reference< css::drawing::XShapes > m_xTarget;
+ rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
css::uno::Reference< css::chart2::XTitle > m_xTitle;
rtl::Reference<SvxShapeText> m_xShape;