tdf#151424 Spider web chart drawing error
regression from
commit 333ccb081b
Author: Noel Grandin <noelgrandin@gmail.com>
Date: Sat Feb 5 14:58:07 2022 +0200
use more concrete types in chart2, Axis
Change-Id: Ib80bbec9f08b9fafa6ee1c8d0cace8b44fdadabc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141135
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
286347aec2
commit
dfac5bf18b
@@ -69,7 +69,7 @@ public:
|
||||
// still abstract ! implement !
|
||||
virtual OUString SAL_CALL getChartType() override = 0;
|
||||
virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
|
||||
createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
|
||||
createCoordinateSystem( ::sal_Int32 DimensionCount ) final override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL
|
||||
getSupportedMandatoryRoles() override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL
|
||||
@@ -103,8 +103,8 @@ public:
|
||||
const std::vector< rtl::Reference< ::chart::DataSeries > >& aDataSeries );
|
||||
const std::vector< rtl::Reference< ::chart::DataSeries > > & getDataSeries2() const { return m_aDataSeries; }
|
||||
|
||||
static rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
createCoordinateSystem2( ::sal_Int32 DimensionCount );
|
||||
virtual rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
createCoordinateSystem2( sal_Int32 DimensionCount );
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -201,6 +201,8 @@ void SAL_CALL BaseCoordinateSystem::setAxisByDimension(
|
||||
if( nIndex < 0 )
|
||||
throw lang::IndexOutOfBoundsException();
|
||||
|
||||
assert(!xAxis || dynamic_cast<Axis*>(xAxis.get()));
|
||||
|
||||
if( m_aAllAxis[ nDimensionIndex ].size() < o3tl::make_unsigned( nIndex+1 ))
|
||||
{
|
||||
m_aAllAxis[ nDimensionIndex ].resize( nIndex+1 );
|
||||
|
||||
@@ -116,8 +116,8 @@ rtl::Reference< ChartType > BubbleChartType::cloneChartType() const
|
||||
}
|
||||
|
||||
// ____ XChartType ____
|
||||
Reference< chart2::XCoordinateSystem > SAL_CALL
|
||||
BubbleChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
|
||||
rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
BubbleChartType::createCoordinateSystem2( sal_Int32 DimensionCount )
|
||||
{
|
||||
rtl::Reference< CartesianCoordinateSystem > xResult =
|
||||
new CartesianCoordinateSystem( DimensionCount );
|
||||
|
||||
@@ -47,8 +47,6 @@ private:
|
||||
getSupportedMandatoryRoles() override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL
|
||||
getSupportedPropertyRoles() override;
|
||||
virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
|
||||
createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
|
||||
virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel() override;
|
||||
|
||||
// ____ OPropertySet ____
|
||||
@@ -63,6 +61,9 @@ private:
|
||||
|
||||
// ____ XCloneable ____
|
||||
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
|
||||
|
||||
virtual rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
createCoordinateSystem2( sal_Int32 DimensionCount ) override;
|
||||
};
|
||||
|
||||
} // namespace chart
|
||||
|
||||
@@ -482,7 +482,7 @@ void ChartTypeTemplate::createCoordinateSystems(
|
||||
rtl::Reference< ChartType > xChartType( getChartTypeForNewSeries(aFormerlyUsedChartTypes));
|
||||
if( ! xChartType.is())
|
||||
return;
|
||||
rtl::Reference< BaseCoordinateSystem > xCooSys = ChartType::createCoordinateSystem2( getDimension());
|
||||
rtl::Reference< BaseCoordinateSystem > xCooSys = xChartType->createCoordinateSystem2( getDimension());
|
||||
if( ! xCooSys.is())
|
||||
{
|
||||
// chart type wants no coordinate systems
|
||||
|
||||
@@ -48,8 +48,8 @@ NetChartType_Base::NetChartType_Base( const NetChartType_Base & rOther ) :
|
||||
NetChartType_Base::~NetChartType_Base()
|
||||
{}
|
||||
|
||||
Reference< XCoordinateSystem > SAL_CALL
|
||||
NetChartType_Base::createCoordinateSystem( ::sal_Int32 DimensionCount )
|
||||
rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
NetChartType_Base::createCoordinateSystem2( sal_Int32 DimensionCount )
|
||||
{
|
||||
if( DimensionCount != 2 )
|
||||
throw lang::IllegalArgumentException(
|
||||
|
||||
@@ -32,10 +32,6 @@ public:
|
||||
protected:
|
||||
explicit NetChartType_Base( const NetChartType_Base & rOther );
|
||||
|
||||
// ____ XChartType ____
|
||||
virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
|
||||
createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
|
||||
|
||||
// ____ OPropertySet ____
|
||||
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
|
||||
|
||||
@@ -44,6 +40,9 @@ protected:
|
||||
// ____ XPropertySet ____
|
||||
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
|
||||
getPropertySetInfo() override;
|
||||
|
||||
virtual rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
createCoordinateSystem2( sal_Int32 DimensionCount ) override;
|
||||
};
|
||||
|
||||
class NetChartType final : public NetChartType_Base
|
||||
|
||||
@@ -122,8 +122,8 @@ OUString SAL_CALL PieChartType::getChartType()
|
||||
return CHART2_SERVICE_NAME_CHARTTYPE_PIE;
|
||||
}
|
||||
|
||||
Reference< chart2::XCoordinateSystem > SAL_CALL
|
||||
PieChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
|
||||
rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
PieChartType::createCoordinateSystem2( sal_Int32 DimensionCount )
|
||||
{
|
||||
rtl::Reference< PolarCoordinateSystem > xResult =
|
||||
new PolarCoordinateSystem( DimensionCount );
|
||||
|
||||
@@ -43,8 +43,6 @@ private:
|
||||
|
||||
// ____ XChartType ____
|
||||
virtual OUString SAL_CALL getChartType() override;
|
||||
virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
|
||||
createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL
|
||||
getSupportedPropertyRoles() override;
|
||||
|
||||
@@ -60,6 +58,9 @@ private:
|
||||
|
||||
// ____ XCloneable ____
|
||||
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
|
||||
|
||||
virtual rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
createCoordinateSystem2( sal_Int32 DimensionCount ) override;
|
||||
};
|
||||
|
||||
} // namespace chart
|
||||
|
||||
@@ -128,8 +128,8 @@ rtl::Reference< ChartType > ScatterChartType::cloneChartType() const
|
||||
}
|
||||
|
||||
// ____ XChartType ____
|
||||
Reference< chart2::XCoordinateSystem > SAL_CALL
|
||||
ScatterChartType::createCoordinateSystem( ::sal_Int32 DimensionCount )
|
||||
rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
ScatterChartType::createCoordinateSystem2( sal_Int32 DimensionCount )
|
||||
{
|
||||
rtl::Reference< CartesianCoordinateSystem > xResult =
|
||||
new CartesianCoordinateSystem( DimensionCount );
|
||||
|
||||
@@ -45,8 +45,6 @@ private:
|
||||
virtual OUString SAL_CALL getChartType() override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL
|
||||
getSupportedMandatoryRoles() override;
|
||||
virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
|
||||
createCoordinateSystem( ::sal_Int32 DimensionCount ) override;
|
||||
|
||||
// ____ OPropertySet ____
|
||||
virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
|
||||
@@ -60,6 +58,9 @@ private:
|
||||
|
||||
// ____ XCloneable ____
|
||||
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
|
||||
|
||||
virtual rtl::Reference< ::chart::BaseCoordinateSystem >
|
||||
createCoordinateSystem2( sal_Int32 DimensionCount ) override;
|
||||
};
|
||||
|
||||
} // namespace chart
|
||||
|
||||
Reference in New Issue
Block a user