summaryrefslogtreecommitdiff
path: root/chart2/source/view/charttypes
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-02 11:29:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-02 17:58:44 +0100
commit5f567b9aec84283546c3084f015d01a70bd76c86 (patch)
treece39f0360dcb63c34668bb4149b5fd285ebaef14 /chart2/source/view/charttypes
parent0249e598044b12e7f82cc6e95546687cfbbdfe38 (diff)
use more SvxShape in chart2
Change-Id: I53e4f5e68a982bec1fcbcd626f60124ebd0d51b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127861 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/charttypes')
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx4
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx9
-rw-r--r--chart2/source/view/charttypes/BarChart.hxx2
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx2
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx5
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx6
6 files changed, 13 insertions, 15 deletions
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 4d06dc41bc27..46c271bc6e7c 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -407,7 +407,7 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
pPosHelper->transformScaledLogicToScene( aPoly );
//create line:
- uno::Reference< drawing::XShape > xShape;
+ rtl::Reference< SvxShape > xShape;
if(m_nDimension==3)
{
double fDepth = getTransformedDepth();
@@ -501,7 +501,7 @@ bool AreaChart::impl_createArea( VDataSeries* pSeries
pPosHelper->transformScaledLogicToScene( aPoly );
//create area:
- uno::Reference< drawing::XShape > xShape;
+ rtl::Reference< SvxShape > xShape;
if(m_nDimension==3)
{
xShape = ShapeFactory::createArea3D( xSeriesGroupShape_Shapes
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index f41770fb67dc..f7211e857dd3 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -296,7 +296,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
.transformSceneToScreenPosition( aScenePosition3D );
}
-uno::Reference< drawing::XShape > BarChart::createDataPoint3D_Bar(
+rtl::Reference< SvxShape > BarChart::createDataPoint3D_Bar(
const uno::Reference< drawing::XShapes >& xTarget
, const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
, double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree
@@ -319,7 +319,7 @@ uno::Reference< drawing::XShape > BarChart::createDataPoint3D_Bar(
TOOLS_WARN_EXCEPTION("chart2", "" );
}
- uno::Reference< drawing::XShape > xShape;
+ rtl::Reference< SvxShape > xShape;
switch( nGeometry3D )
{
case DataPointGeometry3D::CYLINDER:
@@ -797,7 +797,7 @@ void BarChart::createShapes()
//create partial point
if( !approxEqual(fLowerYValue,fUpperYValue) )
{
- uno::Reference< drawing::XShape > xShape;
+ rtl::Reference< SvxShape > xShape;
if( m_nDimension==3 )
{
drawing::Position3D aLogicBottom (fLogicX,fLogicYStart,fLogicZ);
@@ -862,8 +862,7 @@ void BarChart::createShapes()
double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
if(!std::isnan(nPropVal))
{
- uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(nPropVal)));
+ xShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(nPropVal)));
}
}
//set name/classified ObjectID (CID)
diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx
index f5d918e7f74b..5e1ebee666d1 100644
--- a/chart2/source/view/charttypes/BarChart.hxx
+++ b/chart2/source/view/charttypes/BarChart.hxx
@@ -42,7 +42,7 @@ public:
virtual css::drawing::Direction3D getPreferredDiagramAspectRatio() const override;
private: //methods
- static css::uno::Reference< css::drawing::XShape >
+ static rtl::Reference< SvxShape >
createDataPoint3D_Bar(
const css::uno::Reference< css::drawing::XShapes >& xTarget
, const css::drawing::Position3D& rPosition
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 425898514ac7..aeb1e4018ac2 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -222,7 +222,7 @@ bool NetChart::impl_createArea( VDataSeries* pSeries
pPosHelper->transformScaledLogicToScene( aPoly );
//create area:
- uno::Reference< drawing::XShape >
+ rtl::Reference<SvxShapePolyPolygon>
xShape = ShapeFactory::createArea2D( xSeriesGroupShape_Shapes
, aPoly );
setMappedProperties( xShape
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 61ba53079ccc..ffa7a6a20685 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -828,7 +828,7 @@ void PieChart::createShapes()
///create data point
aParam.mfLogicZ = -1.0; // For 3D pie chart label position
- uno::Reference<drawing::XShape> xPointShape =
+ rtl::Reference<SvxShape> xPointShape =
createDataPoint(
xSeriesGroupShape_Shapes, xPointProperties, apOverwritePropertiesMap.get(), aParam);
@@ -837,8 +837,7 @@ void PieChart::createShapes()
double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
if(!std::isnan(nPropVal))
{
- uno::Reference< beans::XPropertySet > xProps( xPointShape, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>( nPropVal)));
+ xPointShape->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>( nPropVal)));
}
}
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 48094a6d63b7..f4dd9990ea97 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2724,7 +2724,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) );
aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
- ShapeFactory::setShapeName( *xShape, aCID );
+ ShapeFactory::setShapeName( xShape, aCID );
}
// label
@@ -2752,7 +2752,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
- ShapeFactory::setShapeName( *xShape, aCID );
+ ShapeFactory::setShapeName( xShape, aCID );
}
// label
@@ -2800,7 +2800,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) );
aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) );
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForParticles( rSeries.getSeriesParticle(), aChildParticle );
- ShapeFactory::setShapeName( *xShape, aCID );
+ ShapeFactory::setShapeName( xShape, aCID );
}
aResult.push_back(aEntry);