summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-11-18 10:58:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-11-19 15:50:48 +0100
commitec6502a1f61fcbd4bf05b62f172650fe442c3a1d (patch)
tree383be2227aa9d6dd0bef8577bf478b3af3e33767 /chart2
parenta38bb773bb568ef942293f23d0701da933817e8f (diff)
tdf#151846 Restore XChartTypeTemplate
Which I removed in commit 58766f997d59e4684f2887fd8cdeb12d2f8a9366. Turns out it does have some usefulness for extensions. So restore most of it. The exception is the getDataInterpreter method, for which I have added a placeholder, so that the restored class has the same vtable layout as the original. Change-Id: Ief9b48ef2c408580bc24b5a8a0e11131edb3b943 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142908 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx2
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx2
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx8
-rw-r--r--chart2/source/inc/ChartTypeTemplate.hxx45
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx2
-rw-r--r--chart2/source/model/main/Diagram.cxx2
-rw-r--r--chart2/source/model/template/AreaChartTypeTemplate.cxx10
-rw-r--r--chart2/source/model/template/AreaChartTypeTemplate.hxx6
-rw-r--r--chart2/source/model/template/BarChartTypeTemplate.cxx14
-rw-r--r--chart2/source/model/template/BarChartTypeTemplate.hxx10
-rw-r--r--chart2/source/model/template/BubbleChartTypeTemplate.cxx12
-rw-r--r--chart2/source/model/template/BubbleChartTypeTemplate.hxx8
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx83
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.cxx10
-rw-r--r--chart2/source/model/template/ColumnLineChartTypeTemplate.hxx10
-rw-r--r--chart2/source/model/template/LineChartTypeTemplate.cxx10
-rw-r--r--chart2/source/model/template/LineChartTypeTemplate.hxx10
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.cxx10
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.hxx6
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx14
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.hxx10
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.cxx16
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.hxx12
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.cxx14
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.hxx10
-rw-r--r--chart2/source/tools/DiagramHelper.cxx2
26 files changed, 204 insertions, 134 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index eefed59e3e6a..7b911fbd3820 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1195,7 +1195,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
DiagramHelper::tTemplateWithServiceName aTemplateWithService(
DiagramHelper::getTemplateForDiagram( xDiagram, xTemplateManager ));
if( aTemplateWithService.xChartTypeTemplate.is())
- aTemplateWithService.xChartTypeTemplate->resetStyles( xDiagram );//#i109371#
+ aTemplateWithService.xChartTypeTemplate->resetStyles2( xDiagram );//#i109371#
xTemplate->changeDiagram( xDiagram );
if( AllSettings::GetMathLayoutRTL() )
AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 4c157611f21b..72c51a30d6d0 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -318,7 +318,7 @@ void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
DiagramHelper::tTemplateWithServiceName aTemplateWithService(
DiagramHelper::getTemplateForDiagram( xDiagram, xTemplateManager ));
if( aTemplateWithService.xChartTypeTemplate.is())
- aTemplateWithService.xChartTypeTemplate->resetStyles( xDiagram );
+ aTemplateWithService.xChartTypeTemplate->resetStyles2( xDiagram );
xTemplate->changeDiagram( xDiagram );
if( AllSettings::GetMathLayoutRTL() )
AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 248a44087004..564343c62671 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -253,7 +253,7 @@ rtl::Reference< ::chart::DataSeries > lcl_CreateNewSeries(
if( nGroupIndex == aCTs.size())
nGroupIndex = 0;
}
- xTemplate->applyStyle( xResult, nGroupIndex, nNewSeriesIndex, nTotalNumberOfSeriesInCTGroup );
+ xTemplate->applyStyle2( xResult, nGroupIndex, nNewSeriesIndex, nTotalNumberOfSeriesInCTGroup );
}
if( bCreateDataCachedSequences )
@@ -270,7 +270,7 @@ rtl::Reference< ::chart::DataSeries > lcl_CreateNewSeries(
//special handling for candlestick type
if( xTemplate.is())
{
- rtl::Reference< ::chart::DataInterpreter > xInterpreter( xTemplate->getDataInterpreter());
+ rtl::Reference< ::chart::DataInterpreter > xInterpreter( xTemplate->getDataInterpreter2());
if( xInterpreter.is())
{
sal_Int32 nStockVariant;
@@ -704,7 +704,7 @@ void DialogModel::setData(
xDataProvider->createDataSource( rArguments ) );
rtl::Reference< ::chart::DataInterpreter > xInterpreter(
- m_xTemplate->getDataInterpreter());
+ m_xTemplate->getDataInterpreter2());
if( xInterpreter.is())
{
rtl::Reference< Diagram > xDiagram( m_xChartDocument->getFirstChartDiagram() );
@@ -795,7 +795,7 @@ void DialogModel::applyInterpretedData(
aSeries[nSeries]->setPropertyValue( "Color" ,
uno::Any( xColorScheme->getColorByIndex( nSeriesCounter )));
}
- m_xTemplate->applyStyle( aSeries[nSeries], nGroup, nNewSeriesIndex++, nSeriesInGroup );
+ m_xTemplate->applyStyle2( aSeries[nSeries], nGroup, nNewSeriesIndex++, nSeriesInGroup );
}
}
}
diff --git a/chart2/source/inc/ChartTypeTemplate.hxx b/chart2/source/inc/ChartTypeTemplate.hxx
index 79f03325fa9c..b22165e79fa9 100644
--- a/chart2/source/inc/ChartTypeTemplate.hxx
+++ b/chart2/source/inc/ChartTypeTemplate.hxx
@@ -19,7 +19,9 @@
#pragma once
#include <cppuhelper/implbase.hxx>
+#include "DataInterpreter.hxx"
#include "StackMode.hxx"
+#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include "charttoolsdllapi.hxx"
#include <rtl/ref.hxx>
@@ -39,7 +41,6 @@ namespace chart
{
class BaseCoordinateSystem;
class ChartType;
-class DataInterpreter;
class DataSeries;
class Diagram;
class LabeledDataSequence;
@@ -78,7 +79,8 @@ class LabeledDataSequence;
* create an XLegend via the global service factory, set it at the diagram.
*/
-class SAL_DLLPUBLIC_RTTI ChartTypeTemplate : public ::cppu::WeakImplHelper<
+class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeTemplate : public ::cppu::WeakImplHelper<
+ css::chart2::XChartTypeTemplate,
css::lang::XServiceName >
{
public:
@@ -86,34 +88,55 @@ public:
OUString aServiceName );
virtual ~ChartTypeTemplate() override;
- OOO_DLLPUBLIC_CHARTTOOLS
- rtl::Reference< ::chart::Diagram > createDiagramByDataSource(
+ rtl::Reference< ::chart::Diagram > createDiagramByDataSource2(
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
+ // ____ XChartTypeTemplate ____
+ virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL createDiagramByDataSource(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override final;
/// denotes if the chart needs categories at the first scale
- virtual bool supportsCategories();
+ virtual sal_Bool SAL_CALL supportsCategories() override;
+ virtual void SAL_CALL changeDiagram(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override final;
+ virtual void SAL_CALL changeDiagramData(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override final;
+ virtual sal_Bool SAL_CALL matchesTemplate(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ sal_Bool bAdaptProperties ) override final;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getDataInterpreter() override final;
+ virtual css::uno::Reference< ::css::chart2::XChartType > SAL_CALL getChartTypeForNewSeries(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override final;
+ virtual void SAL_CALL applyStyle(
+ const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ ::sal_Int32 nChartTypeIndex,
+ ::sal_Int32 nSeriesIndex,
+ ::sal_Int32 nSeriesCount ) override final;
+ virtual void SAL_CALL resetStyles(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override final;
- OOO_DLLPUBLIC_CHARTTOOLS
void changeDiagram(
const rtl::Reference< ::chart::Diagram >& xDiagram );
void changeDiagramData(
const rtl::Reference< ::chart::Diagram >& xDiagram,
const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
- virtual bool matchesTemplate(
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties );
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) = 0;
- virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter();
- virtual void applyStyle(
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2();
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount );
- virtual void resetStyles(
+ virtual void resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram );
/// @throws css::uno::RuntimeException
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index e91df2e705a5..3572f1fa4288 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -402,7 +402,7 @@ void ChartModel::insertDefaultChart()
beans::PropertyState_DIRECT_VALUE ) };
}
- rtl::Reference< Diagram > xDiagram( xTemplate->createDiagramByDataSource( xDataSource, aParam ) );
+ rtl::Reference< Diagram > xDiagram( xTemplate->createDiagramByDataSource2( xDataSource, aParam ) );
setFirstDiagram( xDiagram );
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index a6fa518ee52e..a8ddca69627b 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -395,7 +395,7 @@ void SAL_CALL Diagram::setDiagramData(
xTemplate = xChartTypeManager->createTemplate( "com.sun.star.chart2.template.Column" );
if(!xTemplate.is())
return;
- xTemplate->changeDiagramData( this, xDataSource, aArguments );
+ xTemplate->changeDiagramData( rtl::Reference< ::chart::Diagram >(this), xDataSource, aArguments );
}
// ____ XTitled ____
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx
index 4b0a6a7ff52c..e3011816153c 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.cxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx
@@ -175,19 +175,19 @@ StackMode AreaChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
}
// ____ ChartTypeTemplate ____
-void AreaChartTypeTemplate::applyStyle(
+void AreaChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
-void AreaChartTypeTemplate::resetStyles( const rtl::Reference< ::chart::Diagram >& xDiagram )
+void AreaChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
- ChartTypeTemplate::resetStyles( xDiagram );
+ ChartTypeTemplate::resetStyles2( xDiagram );
std::vector< rtl::Reference< ::chart::DataSeries > > aSeriesVec(
DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
uno::Any aLineStyleAny( drawing::LineStyle_NONE );
@@ -205,7 +205,7 @@ rtl::Reference< ChartType > AreaChartTypeTemplate::getChartTypeForIndex( sal_Int
return new AreaChartType();
}
-rtl::Reference< ChartType > AreaChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > AreaChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult( getChartTypeForIndex( 0 ) );
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx
index e3fec3b1e457..3116c0d59a99 100644
--- a/chart2/source/model/template/AreaChartTypeTemplate.hxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx
@@ -57,14 +57,14 @@ protected:
// ____ ChartTypeTemplate ____
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void applyStyle(
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void resetStyles(
+ virtual void resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx
index 7daceacab9dc..9cebf6fa6cfe 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -160,11 +160,11 @@ bool BarChartTypeTemplate::isSwapXAndY() const
}
// ____ ChartTypeTemplate ____
-bool BarChartTypeTemplate::matchesTemplate(
+bool BarChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
//check BarDirection
if( bResult )
@@ -202,7 +202,7 @@ rtl::Reference< ChartType > BarChartTypeTemplate::getChartTypeForIndex( sal_Int3
return new ColumnChartType();
}
-rtl::Reference< ChartType > BarChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > BarChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult( getChartTypeForIndex( 0 ) );
@@ -232,13 +232,13 @@ Reference< beans::XPropertySetInfo > SAL_CALL BarChartTypeTemplate::getPropertyS
return *StaticBarChartTypeTemplateInfo::get();
}
-void BarChartTypeTemplate::applyStyle(
+void BarChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
if( getDimension() != 3 )
return;
@@ -256,10 +256,10 @@ void BarChartTypeTemplate::applyStyle(
}
}
-void BarChartTypeTemplate::resetStyles(
+void BarChartTypeTemplate::resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram )
{
- ChartTypeTemplate::resetStyles( xDiagram );
+ ChartTypeTemplate::resetStyles2( xDiagram );
std::vector< rtl::Reference< DataSeries > > aSeriesVec(
DiagramHelper::getDataSeriesFromDiagram( xDiagram ));
uno::Any aLineStyleAny( drawing::LineStyle_NONE );
diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx
index c17c5148c3c2..62188279ea29 100644
--- a/chart2/source/model/template/BarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.hxx
@@ -63,21 +63,19 @@ protected:
getPropertySetInfo() override;
// ____ ChartTypeTemplate ____
- virtual bool matchesTemplate(
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void applyStyle(
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void resetStyles(
+ virtual void resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
-
- // ____ ChartTypeTemplate ____
virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index cba67168d38d..21956ca78bd7 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -139,18 +139,18 @@ StackMode BubbleChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */
return StackMode::NONE;
}
-void BubbleChartTypeTemplate::applyStyle(
+void BubbleChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
}
-// ____ ChartTypeTemplate ____
-bool BubbleChartTypeTemplate::supportsCategories()
+// ____ XChartTypeTemplate ____
+sal_Bool SAL_CALL BubbleChartTypeTemplate::supportsCategories()
{
return false;
}
@@ -160,7 +160,7 @@ rtl::Reference< ChartType > BubbleChartTypeTemplate::getChartTypeForIndex( sal_I
return new BubbleChartType();
}
-rtl::Reference< ChartType > BubbleChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > BubbleChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult;
@@ -179,7 +179,7 @@ rtl::Reference< ChartType > BubbleChartTypeTemplate::getChartTypeForNewSeries(
return xResult;
}
-rtl::Reference< DataInterpreter > BubbleChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > BubbleChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new BubbleDataInterpreter );
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.hxx b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
index 0649a57bb0b5..f4e5c9b3c790 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
@@ -52,12 +52,12 @@ protected:
getPropertySetInfo() override;
// ____ ChartTypeTemplate ____
- virtual bool supportsCategories() override;
+ virtual sal_Bool SAL_CALL supportsCategories() override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() override;
- virtual void applyStyle(
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 6dfff2b39d57..1e49054f5b8b 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -137,7 +137,7 @@ ChartTypeTemplate::~ChartTypeTemplate()
{}
// ____ ChartTypeTemplate ____
-rtl::Reference< Diagram > ChartTypeTemplate::createDiagramByDataSource(
+rtl::Reference< Diagram > ChartTypeTemplate::createDiagramByDataSource2(
const uno::Reference< data::XDataSource >& xDataSource,
const uno::Sequence< beans::PropertyValue >& aArguments )
{
@@ -149,7 +149,7 @@ rtl::Reference< Diagram > ChartTypeTemplate::createDiagramByDataSource(
xDia = new Diagram(GetComponentContext());
// modify diagram
- rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter());
+ rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter2());
InterpretedData aData(
xInterpreter->interpretDataSource(
xDataSource, aArguments, {} ));
@@ -170,7 +170,7 @@ rtl::Reference< Diagram > ChartTypeTemplate::createDiagramByDataSource(
return xDia;
}
-bool ChartTypeTemplate::supportsCategories()
+sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
{
return true;
}
@@ -188,7 +188,7 @@ void ChartTypeTemplate::changeDiagram( const rtl::Reference< Diagram >& xDiagram
const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.size();
// chart-type specific interpretation of existing data series
- rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter());
+ rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter2());
InterpretedData aData;
aData.Series = aSeriesSeq;
aData.Categories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
@@ -254,7 +254,7 @@ void ChartTypeTemplate::changeDiagramData(
std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq =
DiagramHelper::getDataSeriesFromDiagram( xDiagram );
const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.size();
- rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter());
+ rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter2());
InterpretedData aData =
xInterpreter->interpretDataSource( xDataSource, aArguments, aFlatSeriesSeq );
@@ -266,7 +266,7 @@ void ChartTypeTemplate::changeDiagramData(
if( nIndex >= nFormerSeriesCount )
{
lcl_applyDefaultStyle( aData.Series[i][j], nIndex, xDiagram );
- applyStyle( aData.Series[i][j], i, j, aData.Series[i].size() );
+ applyStyle2( aData.Series[i][j], i, j, aData.Series[i].size() );
}
}
@@ -287,7 +287,7 @@ void ChartTypeTemplate::changeDiagramData(
}
}
-bool ChartTypeTemplate::matchesTemplate(
+bool ChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool /* bAdaptProperties */ )
{
@@ -306,7 +306,7 @@ bool ChartTypeTemplate::matchesTemplate(
if( bResult )
{
std::vector< rtl::Reference< ChartType > > aFormerlyUsedChartTypes;
- rtl::Reference<ChartType> xOldCT = getChartTypeForNewSeries(aFormerlyUsedChartTypes);
+ rtl::Reference<ChartType> xOldCT = getChartTypeForNewSeries2(aFormerlyUsedChartTypes);
if (!xOldCT.is())
return false;
@@ -342,7 +342,7 @@ bool ChartTypeTemplate::matchesTemplate(
return bResult;
}
-rtl::Reference< DataInterpreter > ChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new DataInterpreter );
@@ -350,7 +350,7 @@ rtl::Reference< DataInterpreter > ChartTypeTemplate::getDataInterpreter()
return m_xDataInterpreter;
}
-void ChartTypeTemplate::applyStyle(
+void ChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 /* nSeriesIndex */,
@@ -399,14 +399,14 @@ void ChartTypeTemplate::applyStyles( const rtl::Reference< ::chart::Diagram >& x
{
const sal_Int32 nNumSeries = aNewSeriesSeq[i].size();
for( sal_Int32 j=0; j<nNumSeries; ++j )
- applyStyle( aNewSeriesSeq[i][j], i, j, nNumSeries );
+ applyStyle2( aNewSeriesSeq[i][j], i, j, nNumSeries );
}
//ensure valid empty cell handling (for first chart type...)
lcl_ensureCorrectMissingValueTreatment( xDiagram, getChartTypeForIndex( 0 ) );
}
-void ChartTypeTemplate::resetStyles( const rtl::Reference< ::chart::Diagram >& xDiagram )
+void ChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
// reset number format if we had percent stacking on
bool bPercent = (getStackMode(0) == StackMode::YStackedPercent);
@@ -479,7 +479,7 @@ void ChartTypeTemplate::createCoordinateSystems(
if( ! xDiagram.is())
return;
std::vector< rtl::Reference< ChartType > > aFormerlyUsedChartTypes;
- rtl::Reference< ChartType > xChartType( getChartTypeForNewSeries(aFormerlyUsedChartTypes));
+ rtl::Reference< ChartType > xChartType( getChartTypeForNewSeries2(aFormerlyUsedChartTypes));
if( ! xChartType.is())
return;
rtl::Reference< BaseCoordinateSystem > xCooSys = xChartType->createCoordinateSystem2( getDimension());
@@ -563,7 +563,7 @@ void ChartTypeTemplate::adaptScales(
aData.Categories = xCategories;
if(bSupportsCategories)
{
- rtl::Reference< ChartType > xChartType = getChartTypeForNewSeries({});
+ rtl::Reference< ChartType > xChartType = getChartTypeForNewSeries2({});
if( aData.AxisType == AxisType::CATEGORY )
{
aData.ShiftedCategoryPosition = m_aServiceName.indexOf("Column") != -1 || m_aServiceName.indexOf("Bar") != -1 || m_aServiceName.endsWith("Close");
@@ -736,7 +736,7 @@ void ChartTypeTemplate::createChartTypes(
if( aSeriesSeq.empty() )
{
// we need a new chart type
- xCT = getChartTypeForNewSeries( aOldChartTypesSeq );
+ xCT = getChartTypeForNewSeries2( aOldChartTypesSeq );
rCoordSys[nCooSysIdx]->setChartTypes(std::vector{ xCT });
}
else
@@ -746,7 +746,7 @@ void ChartTypeTemplate::createChartTypes(
if( nSeriesIdx == nCooSysIdx )
{
// we need a new chart type
- xCT = getChartTypeForNewSeries( aOldChartTypesSeq );
+ xCT = getChartTypeForNewSeries2( aOldChartTypesSeq );
std::vector< rtl::Reference< ChartType > > aCTSeq( rCoordSys[nCooSysIdx]->getChartTypes2());
if( !aCTSeq.empty())
{
@@ -806,6 +806,57 @@ void ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem(
comphelper::copyProperties( xSource, xNewChartType );
}
+css::uno::Reference< css::uno::XInterface > ChartTypeTemplate::getDataInterpreter()
+{
+ return static_cast<cppu::OWeakObject*>(getDataInterpreter2().get());
+}
+css::uno::Reference< css::chart2::XDiagram > ChartTypeTemplate::createDiagramByDataSource(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments )
+{
+ return createDiagramByDataSource2(xDataSource, aArguments);
+}
+void ChartTypeTemplate::changeDiagram(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram )
+{
+ changeDiagram(rtl::Reference<Diagram>(dynamic_cast<Diagram*>(xDiagram.get())));
+}
+void ChartTypeTemplate::changeDiagramData(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments )
+{
+ changeDiagramData(rtl::Reference<Diagram>(dynamic_cast<Diagram*>(xDiagram.get())), xDataSource, aArguments);
+}
+sal_Bool ChartTypeTemplate::matchesTemplate(
+ const css::uno::Reference<css::chart2::XDiagram >& xDiagram,
+ sal_Bool bAdaptProperties )
+{
+ return matchesTemplate2(dynamic_cast<Diagram*>(xDiagram.get()), static_cast<bool>(bAdaptProperties));
+}
+css::uno::Reference< ::css::chart2::XChartType > ChartTypeTemplate::getChartTypeForNewSeries(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes )
+{
+ std::vector< rtl::Reference< ::chart::ChartType > > aTmp;
+ aTmp.reserve(aFormerlyUsedChartTypes.getLength());
+ for (auto const & rxChartType : aFormerlyUsedChartTypes)
+ aTmp.push_back(dynamic_cast<ChartType*>(rxChartType.get()));
+ return getChartTypeForNewSeries2(aTmp);
+}
+void ChartTypeTemplate::applyStyle(
+ const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ ::sal_Int32 nChartTypeIndex,
+ ::sal_Int32 nSeriesIndex,
+ ::sal_Int32 nSeriesCount )
+{
+ applyStyle2(dynamic_cast<DataSeries*>(xSeries.get()), nChartTypeIndex, nSeriesIndex, nSeriesCount);
+}
+void ChartTypeTemplate::resetStyles(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram )
+{
+ resetStyles2(dynamic_cast<Diagram*>(xDiagram.get()));
+}
+
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index 992db10553ba..3a39424de5fe 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -203,13 +203,13 @@ void ColumnLineChartTypeTemplate::createChartTypes(
}
}
-void ColumnLineChartTypeTemplate::applyStyle(
+void ColumnLineChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
if( nChartTypeIndex==0 ) // columns
{
@@ -231,7 +231,7 @@ StackMode ColumnLineChartTypeTemplate::getStackMode( sal_Int32 nChartTypeIndex )
}
// ____ XChartTypeTemplate ____
-bool ColumnLineChartTypeTemplate::matchesTemplate(
+bool ColumnLineChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties )
{
@@ -312,7 +312,7 @@ rtl::Reference< ChartType > ColumnLineChartTypeTemplate::getChartTypeForIndex( s
return new LineChartType();
}
-rtl::Reference< ChartType > ColumnLineChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > ColumnLineChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult;
@@ -330,7 +330,7 @@ rtl::Reference< ChartType > ColumnLineChartTypeTemplate::getChartTypeForNewSerie
return xResult;
}
-rtl::Reference< DataInterpreter > ColumnLineChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ColumnLineChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
{
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
index e28ed68d9566..f76f329a1a4f 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
@@ -55,19 +55,19 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual bool matchesTemplate(
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void applyStyle(
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() override;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
// ____ ChartTypeTemplate ____
virtual void createChartTypes(
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx
index 7143bee56999..128f8b73a4cb 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -167,11 +167,11 @@ StackMode LineChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
}
// ____ ChartTypeTemplate ____
-bool LineChartTypeTemplate::matchesTemplate(
+bool LineChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
// check symbol-style and line-style
// for a template with symbols (or with lines) it is ok, if there is at least one series
@@ -275,7 +275,7 @@ rtl::Reference< ChartType > LineChartTypeTemplate::getChartTypeForIndex( sal_Int
return xResult;
}
-rtl::Reference< ChartType > LineChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > LineChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult;
@@ -301,13 +301,13 @@ rtl::Reference< ChartType > LineChartTypeTemplate::getChartTypeForNewSeries(
return xResult;
}
-void LineChartTypeTemplate::applyStyle(
+void LineChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx
index 7dc454c1e714..88ad1a7da3ef 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.hxx
@@ -56,20 +56,18 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual bool matchesTemplate(
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void applyStyle(
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
-
- // ____ ChartTypeTemplate ____
virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
virtual sal_Int32 getDimension() const override;
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx
index d264dbc9ea84..8366487cbd35 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -61,13 +61,13 @@ StackMode NetChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ )
return m_eStackMode;
}
-void NetChartTypeTemplate::applyStyle(
+void NetChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
@@ -82,11 +82,11 @@ void NetChartTypeTemplate::applyStyle(
}
// ____ ChartTypeTemplate ____
-bool NetChartTypeTemplate::matchesTemplate(
+bool NetChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
if( bResult )
{
@@ -162,7 +162,7 @@ rtl::Reference< ChartType > NetChartTypeTemplate::getChartTypeForIndex( sal_Int3
return new NetChartType();
}
-rtl::Reference< ChartType > NetChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > NetChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult( getChartTypeForIndex( 0 ) );
diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx
index e7a9c407c31a..b1f5ac9dbd83 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.hxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.hxx
@@ -39,13 +39,13 @@ public:
protected:
// ____ ChartTypeTemplate ____
- virtual bool matchesTemplate(
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void applyStyle(
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 55cd07ce6a18..267dc6b8e6c9 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -272,11 +272,11 @@ void PieChartTypeTemplate::createChartTypes(
}
// ____ XChartTypeTemplate ____
-bool PieChartTypeTemplate::matchesTemplate(
+bool PieChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
bool bTemplateUsesRings = false;
getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ) >>= bTemplateUsesRings;
@@ -379,7 +379,7 @@ rtl::Reference< ChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_Int3
return xResult;
}
-rtl::Reference< ChartType > PieChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > PieChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult;
@@ -399,13 +399,13 @@ rtl::Reference< ChartType > PieChartTypeTemplate::getChartTypeForNewSeries(
return xResult;
}
-void PieChartTypeTemplate::applyStyle(
+void PieChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
@@ -492,7 +492,7 @@ void PieChartTypeTemplate::applyStyle(
}
}
-void PieChartTypeTemplate::resetStyles( const rtl::Reference< ::chart::Diagram >& xDiagram )
+void PieChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >& xDiagram )
{
// reset axes and grids
if( xDiagram.is())
@@ -529,7 +529,7 @@ void PieChartTypeTemplate::resetStyles( const rtl::Reference< ::chart::Diagram >
}
}
- ChartTypeTemplate::resetStyles( xDiagram );
+ ChartTypeTemplate::resetStyles2( xDiagram );
// vary colors by point,
// line style
diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx
index 425461afd35d..06e80bbb3b37 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.hxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.hxx
@@ -56,19 +56,19 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual bool matchesTemplate(
+ // ____ ChartTypeTemplate ____
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual void applyStyle(
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void resetStyles(
+ virtual void resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
// ____ ChartTypeTemplate ____
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index f209cbfb3d1c..6fae43023339 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -167,13 +167,13 @@ StackMode ScatterChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex *
return StackMode::NONE;
}
-void ScatterChartTypeTemplate::applyStyle(
+void ScatterChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
@@ -189,17 +189,17 @@ void ScatterChartTypeTemplate::applyStyle(
}
}
-// ____ ChartTypeTemplate ____
-bool ScatterChartTypeTemplate::supportsCategories()
+// ____ XChartTypeTemplate ____
+sal_Bool SAL_CALL ScatterChartTypeTemplate::supportsCategories()
{
return false;
}
-bool ScatterChartTypeTemplate::matchesTemplate(
+bool ScatterChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties )
{
- bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties );
+ bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
// check symbol-style and line-style
// for a template with symbols (or with lines) it is ok, if there is at least one series
@@ -303,7 +303,7 @@ rtl::Reference< ChartType > ScatterChartTypeTemplate::getChartTypeForIndex( sal_
return xResult;
}
-rtl::Reference< ChartType > ScatterChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > ScatterChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult;
@@ -329,7 +329,7 @@ rtl::Reference< ChartType > ScatterChartTypeTemplate::getChartTypeForNewSeries(
return xResult;
}
-rtl::Reference< DataInterpreter > ScatterChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ScatterChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new XYDataInterpreter );
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
index 02f2e84f7425..88441b84482f 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
@@ -54,16 +54,16 @@ protected:
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo() override;
- // ____ XChartTypeTemplate ____
- virtual bool supportsCategories() override;
- virtual bool matchesTemplate(
+ // ____ ChartTypeTemplate ____
+ virtual sal_Bool SAL_CALL supportsCategories() override;
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() override;
- virtual void applyStyle(
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeGroupIndex,
::sal_Int32 nSeriesIndex,
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 48cad7862f3e..3b46cb395290 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -186,13 +186,13 @@ sal_Int32 StockChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension
return bHasVolume ? 2 : 1;
}
-void StockChartTypeTemplate::applyStyle(
+void StockChartTypeTemplate::applyStyle2(
const rtl::Reference< DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount )
{
- ChartTypeTemplate::applyStyle( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
+ ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
try
{
sal_Int32 nNewAxisIndex = 0;
@@ -225,10 +225,10 @@ void StockChartTypeTemplate::applyStyle(
}
}
-void StockChartTypeTemplate::resetStyles(
+void StockChartTypeTemplate::resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram )
{
- ChartTypeTemplate::resetStyles( xDiagram );
+ ChartTypeTemplate::resetStyles2( xDiagram );
if( getDimension() == 3 )
{
std::vector< rtl::Reference< DataSeries > > aSeriesVec =
@@ -337,7 +337,7 @@ void StockChartTypeTemplate::createChartTypes(
}
// ____ ChartTypeTemplate ____
-bool StockChartTypeTemplate::matchesTemplate(
+bool StockChartTypeTemplate::matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool /* bAdaptProperties */ )
{
@@ -401,7 +401,7 @@ bool StockChartTypeTemplate::matchesTemplate(
return bResult;
}
-rtl::Reference< ChartType > StockChartTypeTemplate::getChartTypeForNewSeries(
+rtl::Reference< ChartType > StockChartTypeTemplate::getChartTypeForNewSeries2(
const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
{
rtl::Reference< ChartType > xResult;
@@ -419,7 +419,7 @@ rtl::Reference< ChartType > StockChartTypeTemplate::getChartTypeForNewSeries(
return xResult;
}
-rtl::Reference< DataInterpreter > StockChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > StockChartTypeTemplate::getDataInterpreter2()
{
if( ! m_xDataInterpreter.is())
m_xDataInterpreter.set( new StockDataInterpreter( m_eStockVariant ) );
diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx b/chart2/source/model/template/StockChartTypeTemplate.hxx
index fe2a464f1bc4..78d6c02e11e4 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.hxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.hxx
@@ -70,19 +70,19 @@ protected:
getPropertySetInfo() override;
// ____ XChartTypeTemplate ____
- virtual bool matchesTemplate(
+ virtual bool matchesTemplate2(
const rtl::Reference< ::chart::Diagram >& xDiagram,
bool bAdaptProperties ) override;
virtual rtl::Reference< ::chart::ChartType >
- getChartTypeForNewSeries( const std::vector<
+ getChartTypeForNewSeries2( const std::vector<
rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
- virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() override;
- virtual void applyStyle(
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override;
+ virtual void applyStyle2(
const rtl::Reference< ::chart::DataSeries >& xSeries,
::sal_Int32 nChartTypeIndex,
::sal_Int32 nSeriesIndex,
::sal_Int32 nSeriesCount ) override;
- virtual void resetStyles(
+ virtual void resetStyles2(
const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
// ChartTypeTemplate
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 0f6049ca4ae9..b509f9ec5db3 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -98,7 +98,7 @@ DiagramHelper::tTemplateWithServiceName
rtl::Reference< ::chart::ChartTypeTemplate > xTempl =
xChartTypeManager->createTemplate( aServiceNames[ i ] );
- if (xTempl.is() && xTempl->matchesTemplate(xDiagram, true))
+ if (xTempl.is() && xTempl->matchesTemplate2(xDiagram, true))
{
aResult.xChartTypeTemplate = xTempl;
aResult.sServiceName = aServiceNames[ i ];