chart2/IwyuFilter_chart2.yaml | 4 chart2/inc/ChartModel.hxx | 4 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx | 1 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 1 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 2 chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx | 1 chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx | 1 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx | 1 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx | 32 - chart2/source/controller/dialogs/ChartTypeDialogController.cxx | 2 chart2/source/controller/dialogs/DataBrowser.cxx | 1 chart2/source/controller/dialogs/DialogModel.cxx | 3 chart2/source/controller/dialogs/DialogModel.hxx | 4 chart2/source/controller/dialogs/ObjectNameProvider.cxx | 1 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 1 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx | 2 chart2/source/controller/dialogs/tp_RangeChooser.hxx | 1 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 1 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx | 1 chart2/source/controller/main/ChartController_Insert.cxx | 1 chart2/source/controller/main/ChartController_Properties.cxx | 3 chart2/source/controller/main/ChartController_Window.cxx | 2 chart2/source/controller/main/ControllerCommandDispatch.cxx | 1 chart2/source/inc/ChartTypeDialogController.hxx | 4 chart2/source/inc/ChartTypeTemplate.hxx | 42 + chart2/source/inc/DiagramHelper.hxx | 4 chart2/source/model/main/ChartModel.cxx | 10 chart2/source/model/main/ChartModel_Persistence.cxx | 2 chart2/source/model/template/AreaChartTypeTemplate.cxx | 10 chart2/source/model/template/AreaChartTypeTemplate.hxx | 8 chart2/source/model/template/BarChartTypeTemplate.cxx | 15 chart2/source/model/template/BarChartTypeTemplate.hxx | 12 chart2/source/model/template/BubbleChartTypeTemplate.cxx | 11 chart2/source/model/template/BubbleChartTypeTemplate.hxx | 10 chart2/source/model/template/ChartTypeTemplate.cxx | 22 - chart2/source/model/template/ColumnLineChartTypeTemplate.cxx | 11 chart2/source/model/template/ColumnLineChartTypeTemplate.hxx | 10 chart2/source/model/template/LineChartTypeTemplate.cxx | 12 chart2/source/model/template/LineChartTypeTemplate.hxx | 8 chart2/source/model/template/NetChartTypeTemplate.cxx | 12 chart2/source/model/template/NetChartTypeTemplate.hxx | 10 chart2/source/model/template/PieChartTypeTemplate.cxx | 11 chart2/source/model/template/PieChartTypeTemplate.hxx | 10 chart2/source/model/template/ScatterChartTypeTemplate.cxx | 15 chart2/source/model/template/ScatterChartTypeTemplate.hxx | 12 chart2/source/model/template/StockChartTypeTemplate.cxx | 14 chart2/source/model/template/StockChartTypeTemplate.hxx | 12 chart2/source/tools/ChartTypeHelper.cxx | 4 chart2/source/tools/DataSourceHelper.cxx | 1 chart2/source/tools/DiagramHelper.cxx | 1 chart2/source/tools/ExplicitCategoriesProvider.cxx | 1 chart2/source/tools/InternalDataProvider.cxx | 1 chart2/source/tools/RegressionCurveHelper.cxx | 2 chart2/source/tools/ThreeDHelper.cxx | 1 chart2/source/view/charttypes/VSeriesPlotter.cxx | 1 chart2/source/view/diagram/VDiagram.cxx | 1 offapi/UnoApi_offapi.mk | 2 offapi/com/sun/star/chart2/ChartTypeTemplate.idl | 46 -- offapi/com/sun/star/chart2/XChartTypeTemplate.idl | 215 ---------- 59 files changed, 205 insertions(+), 429 deletions(-)
New commits: commit 58766f997d59e4684f2887fd8cdeb12d2f8a9366 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Fri Jan 21 22:02:24 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jan 22 20:26:06 2022 +0100 remove css::chart::XChartTypeTemplate these are purely internal interfaces, they cannot be used from outside chart2. Change-Id: Ib89e98e8099c34a530951bd85236fced216aff18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml index da282c91d93b..276007e29fa3 100644 --- a/chart2/IwyuFilter_chart2.yaml +++ b/chart2/IwyuFilter_chart2.yaml @@ -73,9 +73,6 @@ excludelist: - com/sun/star/chart2/data/XDataSink.hpp - com/sun/star/chart2/data/XDataSource.hpp - com/sun/star/lang/XServiceInfo.hpp - chart2/source/inc/DiagramHelper.hxx: - # # typedef in base class needs a complete type - - com/sun/star/chart2/XChartTypeTemplate.hpp chart2/source/inc/ErrorBar.hxx: # base class has to be a complete type - com/sun/star/beans/XPropertySet.hpp @@ -291,7 +288,6 @@ excludelist: - com/sun/star/util/XModifyListener.hpp chart2/source/model/template/ChartTypeTemplate.hxx: # base class has to be a complete type - - com/sun/star/chart2/XChartTypeTemplate.hpp - com/sun/star/lang/XServiceName.hpp chart2/source/model/template/DataInterpreter.hxx: # base class has to be a complete type diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx index cad6f0422a72..b575a856da8c 100644 --- a/chart2/inc/ChartModel.hxx +++ b/chart2/inc/ChartModel.hxx @@ -57,7 +57,6 @@ #include <memory> namespace com::sun::star::awt { class XRequestCallback; } -namespace com::sun::star::chart2 { class XChartTypeTemplate; } namespace com::sun::star::chart2::data { class XDataProvider; } namespace com::sun::star::document { class XFilter; } namespace com::sun::star::embed { class XStorage; } @@ -72,6 +71,7 @@ namespace chart { class Diagram; class ChartTypeManager; +class ChartTypeTemplate; class InternalDataProvider; class NameContainer; class PageBackground; @@ -205,7 +205,7 @@ private: css::uno::Reference< css::document::XFilter > impl_createFilter( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor ); - css::uno::Reference< css::chart2::XChartTypeTemplate > impl_createDefaultChartTypeTemplate(); + rtl::Reference< ::chart::ChartTypeTemplate > impl_createDefaultChartTypeTemplate(); css::uno::Reference< css::chart2::data::XDataSource > impl_createDefaultData(); void impl_adjustAdditionalShapesPositionAndSize( diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index aefdc29b1dce..fa12304263f6 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -32,6 +32,7 @@ #include <ChartModel.hxx> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <comphelper/servicehelper.hxx> #include <tools/diagnose_ex.h> diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index e7f4129df17b..a048fa820759 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -46,6 +46,7 @@ #include <com/sun/star/chart/ChartAxisAssign.hpp> #include <com/sun/star/chart/ChartErrorCategory.hpp> #include <com/sun/star/chart/ChartSymbolType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/drawing/LineJoint.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/FillStyle.hpp> diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index cb28be651c19..1054d20b3088 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -52,6 +52,8 @@ #include <com/sun/star/chart2/RelativeSize.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart/ChartSolidType.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx index e613161bf10f..0d73a59bd61f 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx @@ -21,6 +21,7 @@ #include "Chart2ModelContact.hxx" #include <ChartType.hxx> #include <DiagramHelper.hxx> +#include <com/sun/star/chart2/XChartType.hpp> #include <tools/long.hxx> using namespace ::com::sun::star; diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx index 88dc862ea2d9..529df87d72c1 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx @@ -21,6 +21,7 @@ #include <WrappedProperty.hxx> #include "Chart2ModelContact.hxx" #include <DiagramHelper.hxx> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <memory> #include <vector> diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx index 102acfb02ba2..8bbcf985b4a6 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx @@ -28,6 +28,7 @@ #include <sal/log.hxx> #include <com/sun/star/chart2/CurveStyle.hpp> +#include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx index 3a8068ec984a..852c50bfc829 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx @@ -50,7 +50,7 @@ public: css::uno::Any getPropertyDefault( const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const override; - virtual uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const = 0; + virtual rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const = 0; protected: std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact; @@ -87,7 +87,7 @@ void WrappedStockProperty::setPropertyValue( const css::uno::Any& rOuterValue, c DiagramHelper::tTemplateWithServiceName aTemplateAndService = DiagramHelper::getTemplateForDiagram( xDiagram, xChartTypeManager ); - uno::Reference< chart2::XChartTypeTemplate > xTemplate = + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate = getNewTemplate( bNewValue, aTemplateAndService.sServiceName, xChartTypeManager ); if(!xTemplate.is()) @@ -119,7 +119,7 @@ public: css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override; - uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const override; + rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const override; }; } @@ -155,9 +155,9 @@ css::uno::Any WrappedVolumeProperty::getPropertyValue( const css::uno::Reference return m_aOuterValue; } -uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const +rtl::Reference< ::chart::ChartTypeTemplate > WrappedVolumeProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ::chart::ChartTypeManager >& xFactory ) const { - uno::Reference< chart2::XChartTypeTemplate > xTemplate; + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate; if(!xFactory.is()) return xTemplate; @@ -165,16 +165,16 @@ uno::Reference< chart2::XChartTypeTemplate > WrappedVolumeProperty::getNewTempla if( bNewValue ) //add volume { if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ); } else //remove volume { if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" ); } return xTemplate; } @@ -188,7 +188,7 @@ public: css::uno::Any getPropertyValue( const css::uno::Reference< css::beans::XPropertySet >& xInnerPropertySet ) const override; - uno::Reference< chart2::XChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const override; + rtl::Reference< ::chart::ChartTypeTemplate > getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ChartTypeManager >& xFactory ) const override; }; } @@ -223,22 +223,22 @@ css::uno::Any WrappedUpDownProperty::getPropertyValue( const css::uno::Reference } return m_aOuterValue; } -uno::Reference< chart2::XChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const Reference< lang::XMultiServiceFactory >& xFactory ) const +rtl::Reference< ::chart::ChartTypeTemplate > WrappedUpDownProperty::getNewTemplate( bool bNewValue, const OUString& rCurrentTemplate, const rtl::Reference< ChartTypeManager >& xFactory ) const { - uno::Reference< chart2::XChartTypeTemplate > xTemplate; + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate; if( bNewValue ) //add open series { if( rCurrentTemplate == "com.sun.star.chart2.template.StockLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockOpenLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockOpenLowHighClose" ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ); } else //remove open series { if( rCurrentTemplate == "com.sun.star.chart2.template.StockOpenLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockLowHighClose" ); else if( rCurrentTemplate == "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) - xTemplate.set( xFactory->createInstance( "com.sun.star.chart2.template.StockVolumeLowHighClose" ), uno::UNO_QUERY ); + xTemplate = xFactory->createTemplate( "com.sun.star.chart2.template.StockVolumeLowHighClose" ); } return xTemplate; } diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 06d2dd952892..2dccc37c2798 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -309,7 +309,7 @@ void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame , const rtl::Reference<::chart::ChartModel>& xChartModel ) { rtl::Reference< ::chart::ChartTypeManager > xTemplateManager = xChartModel->getTypeManager(); - uno::Reference< XChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) ); + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) ); if(!xTemplate.is()) return; diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index ebe1941010ad..0fc400b740c9 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -43,6 +43,7 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/container/XIndexReplace.hpp> #include <algorithm> diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 0efd1d979afe..86a742d2e0cb 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -39,6 +39,7 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> +#include <com/sun/star/chart2/XDataInterpreter.hpp> #include <com/sun/star/chart2/data/XDataSink.hpp> #include <comphelper/sequence.hxx> #include <tools/diagnose_ex.h> @@ -295,7 +296,7 @@ Reference< XDataSeries > lcl_CreateNewSeries( sal_Int32 nNewSeriesIndex, sal_Int32 nTotalNumberOfSeriesInCTGroup, const Reference< XDiagram > & xDiagram, - const Reference< XChartTypeTemplate > & xTemplate, + const rtl::Reference< ::chart::ChartTypeTemplate > & xTemplate, bool bCreateDataCachedSequences ) { // create plain series diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx index 2bd8d55faf00..01156ac64605 100644 --- a/chart2/source/controller/dialogs/DialogModel.hxx +++ b/chart2/source/controller/dialogs/DialogModel.hxx @@ -37,7 +37,6 @@ namespace com::sun::star::chart2 { class XDataSeriesContainer; class XDataSeries; class XChartType; - class XChartTypeTemplate; struct InterpretedData; namespace data { class XDataProvider; @@ -155,8 +154,7 @@ private: rtl::Reference<::chart::ChartModel> m_xChartDocument; - css::uno::Reference< css::chart2::XChartTypeTemplate > - m_xTemplate; + rtl::Reference< ::chart::ChartTypeTemplate > m_xTemplate; css::uno::Reference< css::uno::XComponentContext > m_xContext; diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 4053d3a75599..5bf7efbbd144 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -45,6 +45,7 @@ #include <com/sun/star/chart2/XTitle.hpp> #include <com/sun/star/chart2/MovingAverageType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <tools/diagnose_ex.h> diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index e1d4c0175845..3acad5007365 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -49,6 +49,7 @@ #include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/XAxis.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <svl/intitem.hxx> #include <svl/ctloptions.hxx> diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index 3385330e913c..3135a2b0db2d 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -24,6 +24,8 @@ #include <ChartTypeHelper.hxx> #include <ThreeDHelper.hxx> #include <ControllerLockGuard.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/drawing/ProjectionMode.hpp> #include <tools/diagnose_ex.h> #include <tools/helpers.hxx> diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx index e372b3f159b1..fff338324e1a 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx @@ -24,7 +24,6 @@ #include <vcl/wizardmachine.hxx> namespace chart { class TabPageNotifiable; } -namespace com::sun::star::chart2 { class XChartTypeTemplate; } namespace chart { diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 34d81b353bdc..a4d336ce8216 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -39,6 +39,7 @@ #include <com/sun/star/chart2/DataPointLabel.hpp> #include <com/sun/star/chart2/Symbol.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XModel.hpp> diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index ea7e3b9c59fd..cc21bd3604da 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -47,6 +47,7 @@ #include <com/sun/star/chart2/DataPointLabel.hpp> #include <com/sun/star/chart2/Symbol.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/frame/XModel.hpp> #include <memory> diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index b14a788f2140..f84afc78a2e8 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -55,6 +55,7 @@ #include <com/sun/star/chart2/XRegressionCurve.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <svx/ActionDescriptionProvider.hxx> diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index f4d5aaa6209d..b66a248c7fe4 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -54,8 +54,9 @@ #include <ReferenceSizeProvider.hxx> #include <RegressionCurveHelper.hxx> #include <com/sun/star/chart2/XChartDocument.hpp> -#include <com/sun/star/util/CloseVetoException.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> +#include <com/sun/star/util/CloseVetoException.hpp> #include <comphelper/servicehelper.hxx> #include <memory> diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index c8aa8a694e7d..9d5a703b27a4 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -57,6 +57,8 @@ #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/awt/PopupMenuDirection.hpp> #include <com/sun/star/frame/DispatchHelper.hpp> diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index af549e1722bc..91d3dfe3e558 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -47,6 +47,7 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XRegressionCurve.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart2/XDataProviderAccess.hpp> // only needed until #i68864# is fixed diff --git a/chart2/source/inc/ChartTypeDialogController.hxx b/chart2/source/inc/ChartTypeDialogController.hxx index a027c99d7ac5..4c03ff269e1f 100644 --- a/chart2/source/inc/ChartTypeDialogController.hxx +++ b/chart2/source/inc/ChartTypeDialogController.hxx @@ -37,10 +37,6 @@ namespace com::sun::star::chart2 { class XChartDocument; } -namespace com::sun::star::chart2 -{ -class XChartTypeTemplate; -} namespace com::sun::star::lang { class XMultiServiceFactory; diff --git a/chart2/source/inc/ChartTypeTemplate.hxx b/chart2/source/inc/ChartTypeTemplate.hxx index 69cec8d1b1d3..ce32ba0e19e0 100644 --- a/chart2/source/inc/ChartTypeTemplate.hxx +++ b/chart2/source/inc/ChartTypeTemplate.hxx @@ -20,15 +20,20 @@ #include <cppuhelper/implbase.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> #include <vector> +namespace com::sun::star::beans { struct PropertyValue; } namespace com::sun::star::chart2 { class XChartType; } +namespace com::sun::star::chart2 { class XCoordinateSystem; } namespace com::sun::star::chart2 { class XCoordinateSystemContainer; } namespace com::sun::star::chart2 { class XDataSeries; } +namespace com::sun::star::chart2 { class XDataInterpreter; } +namespace com::sun::star::chart2 { class XDiagram; } +namespace com::sun::star::chart2::data { class XDataSource; } +namespace com::sun::star::chart2::data { class XLabeledDataSequence; } namespace com::sun::star::uno { class XComponentContext; } namespace chart @@ -70,7 +75,6 @@ class ChartType; * create an XLegend via the global service factory, set it at the diagram. */ class SAL_DLLPUBLIC_RTTI ChartTypeTemplate : public ::cppu::WeakImplHelper< - css::chart2::XChartTypeTemplate, css::lang::XServiceName > { public: @@ -78,32 +82,33 @@ public: const OUString & rServiceName ); virtual ~ChartTypeTemplate() override; - // ____ XChartTypeTemplate ____ - virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL createDiagramByDataSource( + virtual css::uno::Reference< css::chart2::XDiagram > createDiagramByDataSource( const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource, - const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override; + const css::uno::Sequence< css::beans::PropertyValue >& aArguments ); /// denotes if the chart needs categories at the first scale - virtual sal_Bool SAL_CALL supportsCategories() override; + virtual bool supportsCategories(); - virtual void SAL_CALL changeDiagram( - const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override; - virtual void SAL_CALL changeDiagramData( + virtual void changeDiagram( + const css::uno::Reference< css::chart2::XDiagram >& xDiagram ); + virtual void 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; - virtual sal_Bool SAL_CALL matchesTemplate( + const css::uno::Sequence< css::beans::PropertyValue >& aArguments ); + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - // still abstract: getChartTypeForNewSeries() - virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override; - virtual void SAL_CALL applyStyle( + bool bAdaptProperties ); + virtual css::uno::Reference< css::chart2::XChartType > + getChartTypeForNewSeries( const css::uno::Sequence< + css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) = 0; + virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter(); + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, - ::sal_Int32 nSeriesCount ) override; - virtual void SAL_CALL resetStyles( - const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override; + ::sal_Int32 nSeriesCount ); + virtual void resetStyles( + const css::uno::Reference< css::chart2::XDiagram >& xDiagram ); /// @throws css::uno::RuntimeException void applyStyles( @@ -248,7 +253,6 @@ private: css::chart2::data::XLabeledDataSequence >& xCategories, const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq); - using XChartTypeTemplate::getChartTypeForNewSeries; rtl::Reference< ChartType > getChartTypeForNewSeries( const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes ); }; diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx index f80d9c61ea96..0877668da13c 100644 --- a/chart2/source/inc/DiagramHelper.hxx +++ b/chart2/source/inc/DiagramHelper.hxx @@ -21,7 +21,6 @@ #include "StackMode.hxx" #include "charttoolsdllapi.hxx" #include <com/sun/star/awt/Rectangle.hpp> -#include <com/sun/star/chart2/XChartTypeTemplate.hpp> #include <rtl/ref.hxx> #include <utility> @@ -30,8 +29,11 @@ namespace chart { class ChartModel; } namespace com::sun::star::chart2 { class XAxis; } namespace com::sun::star::chart2 { class XChartDocument; } +namespace com::sun::star::chart2 { class XChartType; } namespace com::sun::star::chart2 { class XCoordinateSystem; } namespace com::sun::star::chart2 { class XDiagram; } +namespace com::sun::star::chart2 { class XDataSeries; } +namespace com::sun::star::chart2::data { class XLabeledDataSequence; } namespace com::sun::star::frame { class XModel; } namespace com::sun::star::lang { class XMultiServiceFactory; } namespace com::sun::star::uno { class XComponentContext; } diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index b05db28661dd..c7189ff3189e 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -19,6 +19,7 @@ #include <ChartModel.hxx> #include <ChartTypeManager.hxx> +#include <ChartTypeTemplate.hxx> #include <servicenames.hxx> #include <DataSourceHelper.hxx> #include <ChartModelHelper.hxx> @@ -55,7 +56,6 @@ #include <com/sun/star/document/DocumentProperties.hpp> #include <com/sun/star/util/CloseVetoException.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> -#include <com/sun/star/chart2/XChartTypeTemplate.hpp> #include <sal/log.hxx> #include <tools/diagnose_ex.h> @@ -839,7 +839,7 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >& Reference< chart2::XDiagram > xDia( getFirstDiagram() ); if( !xDia.is() ) { - Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() ); + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() ); if( xTemplate.is()) setFirstDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ) ); } @@ -888,11 +888,11 @@ Reference<awt::XRequestCallback> SAL_CALL ChartModel::getPopupRequest() return m_xPopupRequest; } -Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate() +rtl::Reference< ::chart::ChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate() { - Reference< chart2::XChartTypeTemplate > xTemplate; + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate; if( m_xChartTypeManager.is() ) - xTemplate.set( m_xChartTypeManager->createInstance( "com.sun.star.chart2.template.Column" ), uno::UNO_QUERY ); + xTemplate = m_xChartTypeManager->createTemplate( "com.sun.star.chart2.template.Column" ); return xTemplate; } diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 458d23b6283a..975ffaeb1d81 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -387,7 +387,7 @@ void ChartModel::insertDefaultChart() try { // create default chart - Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() ); + rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() ); if( xTemplate.is()) { try diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx index 6087c21251fb..35310754f693 100644 --- a/chart2/source/model/template/AreaChartTypeTemplate.cxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx @@ -23,6 +23,8 @@ #include <DataSeriesHelper.hxx> #include <PropertyHelper.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -173,8 +175,8 @@ StackMode AreaChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ ) return m_eStackMode; } -// ____ XChartTypeTemplate ____ -void SAL_CALL AreaChartTypeTemplate::applyStyle( +// ____ ChartTypeTemplate ____ +void AreaChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -184,7 +186,7 @@ void SAL_CALL AreaChartTypeTemplate::applyStyle( DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) ); } -void SAL_CALL AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) +void AreaChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) { ChartTypeTemplate::resetStyles( xDiagram ); std::vector< Reference< chart2::XDataSeries > > aSeriesVec( @@ -222,7 +224,7 @@ Reference< chart2::XChartType > AreaChartTypeTemplate::getChartTypeForIndex( sal return xResult; } -Reference< chart2::XChartType > SAL_CALL AreaChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > AreaChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) ); diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx index 6954513481e4..ffbcda3d22be 100644 --- a/chart2/source/model/template/AreaChartTypeTemplate.hxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx @@ -55,16 +55,16 @@ protected: virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - // ____ XChartTypeTemplate ____ - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + // ____ ChartTypeTemplate ____ + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual void SAL_CALL applyStyle( + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount ) override; - virtual void SAL_CALL resetStyles( + virtual void resetStyles( const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override; // ____ ChartTypeTemplate ____ diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx index f4534a27071a..dc109e845696 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.cxx +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -25,7 +25,10 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/chart2/DataPointGeometry3D.hpp> +#include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> +#include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <tools/diagnose_ex.h> @@ -159,10 +162,10 @@ bool BarChartTypeTemplate::isSwapXAndY() const return (m_eBarDirection == HORIZONTAL); } -// ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL BarChartTypeTemplate::matchesTemplate( +// ____ ChartTypeTemplate ____ +bool BarChartTypeTemplate::matchesTemplate( const Reference< chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) + bool bAdaptProperties ) { bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties ); @@ -215,7 +218,7 @@ Reference< chart2::XChartType > BarChartTypeTemplate::getChartTypeForIndex( sal_ return xResult; } -Reference< chart2::XChartType > SAL_CALL BarChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > BarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) ); @@ -245,7 +248,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL BarChartTypeTemplate::getPropertyS return *StaticBarChartTypeTemplateInfo::get(); } -void SAL_CALL BarChartTypeTemplate::applyStyle( +void BarChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -269,7 +272,7 @@ void SAL_CALL BarChartTypeTemplate::applyStyle( } } -void SAL_CALL BarChartTypeTemplate::resetStyles( +void BarChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) { ChartTypeTemplate::resetStyles( xDiagram ); diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx index 4146e2611c55..0ab70f4acc00 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.hxx +++ b/chart2/source/model/template/BarChartTypeTemplate.hxx @@ -62,19 +62,19 @@ protected: virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL matchesTemplate( + // ____ ChartTypeTemplate ____ + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual void SAL_CALL applyStyle( + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount ) override; - virtual void SAL_CALL resetStyles( + virtual void resetStyles( const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override; // ____ ChartTypeTemplate ____ diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx index 3d7416b288cd..66945af4a1ed 100644 --- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx +++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx @@ -21,6 +21,7 @@ #include "BubbleDataInterpreter.hxx" #include <servicenames_charttypes.hxx> #include <DataSeriesHelper.hxx> +#include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <PropertyHelper.hxx> #include <com/sun/star/uno/XComponentContext.hpp> @@ -139,7 +140,7 @@ StackMode BubbleChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ return StackMode::NONE; } -void SAL_CALL BubbleChartTypeTemplate::applyStyle( +void BubbleChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -149,8 +150,8 @@ void SAL_CALL BubbleChartTypeTemplate::applyStyle( DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) ); } -// ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL BubbleChartTypeTemplate::supportsCategories() +// ____ ChartTypeTemplate ____ +bool BubbleChartTypeTemplate::supportsCategories() { return false; } @@ -174,7 +175,7 @@ Reference< chart2::XChartType > BubbleChartTypeTemplate::getChartTypeForIndex( s return xResult; } -Reference< chart2::XChartType > SAL_CALL BubbleChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > BubbleChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult; @@ -196,7 +197,7 @@ Reference< chart2::XChartType > SAL_CALL BubbleChartTypeTemplate::getChartTypeFo return xResult; } -Reference< chart2::XDataInterpreter > SAL_CALL BubbleChartTypeTemplate::getDataInterpreter() +Reference< chart2::XDataInterpreter > BubbleChartTypeTemplate::getDataInterpreter() { 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 d04e09e38481..806ccea95fa3 100644 --- a/chart2/source/model/template/BubbleChartTypeTemplate.hxx +++ b/chart2/source/model/template/BubbleChartTypeTemplate.hxx @@ -51,12 +51,12 @@ protected: virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL supportsCategories() override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + // ____ ChartTypeTemplate ____ + virtual bool supportsCategories() override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override; - virtual void SAL_CALL applyStyle( + virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override; + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index eaecc8230fa2..c5119e9570f5 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -34,6 +34,8 @@ #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <com/sun/star/chart2/XColorScheme.hpp> +#include <com/sun/star/chart2/XDiagram.hpp> #include <tools/diagnose_ex.h> #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> @@ -134,8 +136,8 @@ ChartTypeTemplate::ChartTypeTemplate( ChartTypeTemplate::~ChartTypeTemplate() {} -// ____ XChartTypeTemplate ____ -uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource( +// ____ ChartTypeTemplate ____ +uno::Reference< XDiagram > ChartTypeTemplate::createDiagramByDataSource( const uno::Reference< data::XDataSource >& xDataSource, const uno::Sequence< beans::PropertyValue >& aArguments ) { @@ -173,12 +175,12 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource return xDia; } -sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories() +bool ChartTypeTemplate::supportsCategories() { return true; } -void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >& xDiagram ) +void ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram >& xDiagram ) { if( ! xDiagram.is()) return; @@ -251,7 +253,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagram( const uno::Reference< XDiagram > } } -void SAL_CALL ChartTypeTemplate::changeDiagramData( +void ChartTypeTemplate::changeDiagramData( const Reference< chart2::XDiagram >& xDiagram, const Reference< chart2::data::XDataSource >& xDataSource, const Sequence< beans::PropertyValue >& aArguments ) @@ -301,9 +303,9 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData( } } -sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate( +bool ChartTypeTemplate::matchesTemplate( const Reference< chart2::XDiagram >& xDiagram, - sal_Bool /* bAdaptProperties */ ) + bool /* bAdaptProperties */ ) { bool bResult = false; @@ -362,7 +364,7 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate( return bResult; } -Reference< chart2::XDataInterpreter > SAL_CALL ChartTypeTemplate::getDataInterpreter() +Reference< chart2::XDataInterpreter > ChartTypeTemplate::getDataInterpreter() { if( ! m_xDataInterpreter.is()) m_xDataInterpreter.set( new DataInterpreter ); @@ -370,7 +372,7 @@ Reference< chart2::XDataInterpreter > SAL_CALL ChartTypeTemplate::getDataInterpr return m_xDataInterpreter; } -void SAL_CALL ChartTypeTemplate::applyStyle( +void ChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 /* nSeriesIndex */, @@ -427,7 +429,7 @@ void ChartTypeTemplate::applyStyles( const Reference< chart2::XDiagram >& xDiagr lcl_ensureCorrectMissingValueTreatment( xDiagram, getChartTypeForIndex( 0 ) ); } -void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) +void ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) { // reset number format if we had percent stacking on bool bPercent = (getStackMode(0) == StackMode::YStackedPercent); diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index e0ab9a713903..6ed0bf845657 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -235,7 +236,7 @@ void ColumnLineChartTypeTemplate::createChartTypes( } } -void SAL_CALL ColumnLineChartTypeTemplate::applyStyle( +void ColumnLineChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -267,9 +268,9 @@ StackMode ColumnLineChartTypeTemplate::getStackMode( sal_Int32 nChartTypeIndex ) } // ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL ColumnLineChartTypeTemplate::matchesTemplate( +bool ColumnLineChartTypeTemplate::matchesTemplate( const uno::Reference< XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) + bool bAdaptProperties ) { bool bResult = false; @@ -364,7 +365,7 @@ Reference< chart2::XChartType > ColumnLineChartTypeTemplate::getChartTypeForInde return xCT; } -Reference< XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForNewSeries( +Reference< XChartType > ColumnLineChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult; @@ -385,7 +386,7 @@ Reference< XChartType > SAL_CALL ColumnLineChartTypeTemplate::getChartTypeForNew return xResult; } -Reference< XDataInterpreter > SAL_CALL ColumnLineChartTypeTemplate::getDataInterpreter() +Reference< XDataInterpreter > ColumnLineChartTypeTemplate::getDataInterpreter() { if( ! m_xDataInterpreter.is()) { diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx index 8bb28db244de..893b67f2743d 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx @@ -56,18 +56,18 @@ protected: getPropertySetInfo() override; // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL matchesTemplate( + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual void SAL_CALL applyStyle( + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount ) override; - virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override; + virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override; // ____ ChartTypeTemplate ____ virtual void createChartTypes( diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx index dc243571393f..889c9d81b801 100644 --- a/chart2/source/model/template/LineChartTypeTemplate.cxx +++ b/chart2/source/model/template/LineChartTypeTemplate.cxx @@ -28,6 +28,8 @@ #include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/SymbolStyle.hpp> #include <com/sun/star/chart2/Symbol.hpp> +#include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -196,10 +198,10 @@ StackMode LineChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ ) return m_eStackMode; } -// ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate( +// ____ ChartTypeTemplate ____ +bool LineChartTypeTemplate::matchesTemplate( const uno::Reference< chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) + bool bAdaptProperties ) { bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties ); @@ -313,7 +315,7 @@ Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForIndex( sal return xResult; } -Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult; @@ -346,7 +348,7 @@ Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForN return xResult; } -void SAL_CALL LineChartTypeTemplate::applyStyle( +void LineChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx index 84d87a32185c..878c53807793 100644 --- a/chart2/source/model/template/LineChartTypeTemplate.hxx +++ b/chart2/source/model/template/LineChartTypeTemplate.hxx @@ -57,12 +57,12 @@ protected: getPropertySetInfo() override; // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL matchesTemplate( + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual void SAL_CALL applyStyle( + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx index 880b6841a7d5..c2b5501030ba 100644 --- a/chart2/source/model/template/NetChartTypeTemplate.cxx +++ b/chart2/source/model/template/NetChartTypeTemplate.cxx @@ -25,6 +25,8 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/chart2/SymbolStyle.hpp> #include <com/sun/star/chart2/Symbol.hpp> +#include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <tools/diagnose_ex.h> @@ -59,7 +61,7 @@ StackMode NetChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex */ ) return m_eStackMode; } -void SAL_CALL NetChartTypeTemplate::applyStyle( +void NetChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -81,10 +83,10 @@ void SAL_CALL NetChartTypeTemplate::applyStyle( } } -// ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL NetChartTypeTemplate::matchesTemplate( +// ____ ChartTypeTemplate ____ +bool NetChartTypeTemplate::matchesTemplate( const Reference< chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) + bool bAdaptProperties ) { bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties ); @@ -182,7 +184,7 @@ Reference< chart2::XChartType > NetChartTypeTemplate::getChartTypeForIndex( sal_ return xResult; } -Reference< chart2::XChartType > SAL_CALL NetChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > NetChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult( getChartTypeForIndex( 0 ) ); diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx index ac0ee3aebf0b..a9dd49eab6e1 100644 --- a/chart2/source/model/template/NetChartTypeTemplate.hxx +++ b/chart2/source/model/template/NetChartTypeTemplate.hxx @@ -38,13 +38,13 @@ public: virtual ~NetChartTypeTemplate() override; protected: - // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL matchesTemplate( + // ____ ChartTypeTemplate ____ + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual void SAL_CALL applyStyle( + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 6d87cee6628b..fcda6c10f218 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <officecfg/Office/Compatibility.hxx> @@ -314,9 +315,9 @@ void PieChartTypeTemplate::createChartTypes( } // ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL PieChartTypeTemplate::matchesTemplate( +bool PieChartTypeTemplate::matchesTemplate( const uno::Reference< chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) + bool bAdaptProperties ) { bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties ); @@ -430,7 +431,7 @@ Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForIndex( sal_ return xResult; } -Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > PieChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult; @@ -458,7 +459,7 @@ Reference< chart2::XChartType > SAL_CALL PieChartTypeTemplate::getChartTypeForNe return xResult; } -void SAL_CALL PieChartTypeTemplate::applyStyle( +void PieChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -553,7 +554,7 @@ void SAL_CALL PieChartTypeTemplate::applyStyle( } } -void SAL_CALL PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) +void PieChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) { // reset axes and grids Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY ); diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx index b4a010b17647..c8698e1c23d9 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.hxx +++ b/chart2/source/model/template/PieChartTypeTemplate.hxx @@ -57,18 +57,18 @@ protected: getPropertySetInfo() override; // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL matchesTemplate( + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual void SAL_CALL applyStyle( + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount ) override; - virtual void SAL_CALL resetStyles( + virtual void resetStyles( const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override; // ____ ChartTypeTemplate ____ diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx index c6caa7aa4724..8ee9a0a2254a 100644 --- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/SymbolStyle.hpp> #include <com/sun/star/chart2/Symbol.hpp> +#include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -197,7 +198,7 @@ StackMode ScatterChartTypeTemplate::getStackMode( sal_Int32 /* nChartTypeIndex * return StackMode::NONE; } -void SAL_CALL ScatterChartTypeTemplate::applyStyle( +void ScatterChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -221,15 +222,15 @@ void SAL_CALL ScatterChartTypeTemplate::applyStyle( } } -// ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL ScatterChartTypeTemplate::supportsCategories() +// ____ ChartTypeTemplate ____ +bool ScatterChartTypeTemplate::supportsCategories() { return false; } -sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate( +bool ScatterChartTypeTemplate::matchesTemplate( const Reference< chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) + bool bAdaptProperties ) { bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, bAdaptProperties ); @@ -343,7 +344,7 @@ Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForIndex( return xResult; } -Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeForNewSeries( +Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult; @@ -376,7 +377,7 @@ Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeF return xResult; } -Reference< chart2::XDataInterpreter > SAL_CALL ScatterChartTypeTemplate::getDataInterpreter() +Reference< chart2::XDataInterpreter > ScatterChartTypeTemplate::getDataInterpreter() { 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 f25d6ebcbf49..c693c8700f0b 100644 --- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx @@ -55,15 +55,15 @@ protected: getPropertySetInfo() override; // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL supportsCategories() override; - virtual sal_Bool SAL_CALL matchesTemplate( + virtual bool supportsCategories() override; + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override; - virtual void SAL_CALL applyStyle( + virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override; + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index c1ee6d341d60..b476c53fc18a 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -186,7 +186,7 @@ sal_Int32 StockChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension return bHasVolume ? 2 : 1; } -void SAL_CALL StockChartTypeTemplate::applyStyle( +void StockChartTypeTemplate::applyStyle( const Reference< chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, @@ -230,7 +230,7 @@ void SAL_CALL StockChartTypeTemplate::applyStyle( } } -void SAL_CALL StockChartTypeTemplate::resetStyles( +void StockChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram >& xDiagram ) { ChartTypeTemplate::resetStyles( xDiagram ); @@ -364,10 +364,10 @@ void StockChartTypeTemplate::createChartTypes( } } -// ____ XChartTypeTemplate ____ -sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate( +// ____ ChartTypeTemplate ____ +bool StockChartTypeTemplate::matchesTemplate( const uno::Reference< XDiagram >& xDiagram, - sal_Bool /* bAdaptProperties */ ) + bool /* bAdaptProperties */ ) { bool bResult = false; @@ -439,7 +439,7 @@ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate( return bResult; } -Reference< XChartType > SAL_CALL StockChartTypeTemplate::getChartTypeForNewSeries( +Reference< XChartType > StockChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence< Reference< chart2::XChartType > >& aFormerlyUsedChartTypes ) { Reference< chart2::XChartType > xResult; @@ -460,7 +460,7 @@ Reference< XChartType > SAL_CALL StockChartTypeTemplate::getChartTypeForNewSerie return xResult; } -Reference< XDataInterpreter > SAL_CALL StockChartTypeTemplate::getDataInterpreter() +Reference< XDataInterpreter > StockChartTypeTemplate::getDataInterpreter() { 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 a16fd26efbe5..e92e07b54d83 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.hxx +++ b/chart2/source/model/template/StockChartTypeTemplate.hxx @@ -70,20 +70,20 @@ protected: getPropertySetInfo() override; // ____ XChartTypeTemplate ____ - virtual sal_Bool SAL_CALL matchesTemplate( + virtual bool matchesTemplate( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, - sal_Bool bAdaptProperties ) override; - virtual css::uno::Reference< css::chart2::XChartType > SAL_CALL + bool bAdaptProperties ) override; + virtual css::uno::Reference< css::chart2::XChartType > getChartTypeForNewSeries( const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override; - virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override; - virtual void SAL_CALL applyStyle( + virtual css::uno::Reference< css::chart2::XDataInterpreter > getDataInterpreter() override; + virtual void applyStyle( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount ) override; - virtual void SAL_CALL resetStyles( + virtual void resetStyles( const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override; // ChartTypeTemplate diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx index e921f01c1581..286e4ab5e307 100644 --- a/chart2/source/tools/ChartTypeHelper.cxx +++ b/chart2/source/tools/ChartTypeHelper.cxx @@ -24,9 +24,11 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/chart/DataLabelPlacement.hpp> +#include <com/sun/star/chart/MissingValueTreatment.hpp> #include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/StackingDirection.hpp> -#include <com/sun/star/chart/MissingValueTreatment.hpp> +#include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <tools/diagnose_ex.h> using namespace ::com::sun::star; diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx index 1881df79097e..627d94416d63 100644 --- a/chart2/source/tools/DataSourceHelper.cxx +++ b/chart2/source/tools/DataSourceHelper.cxx @@ -30,6 +30,7 @@ #include <unonames.hxx> #include <com/sun/star/chart2/XChartDocument.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart2/data/XDataSource.hpp> #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp> diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index b75df5b0f29c..b47fe41b0140 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -40,7 +40,6 @@ #include <com/sun/star/chart2/XAnyDescriptionAccess.hpp> #include <com/sun/star/chart2/XTitled.hpp> #include <com/sun/star/chart2/XChartTypeContainer.hpp> -#include <com/sun/star/chart2/XChartTypeTemplate.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <com/sun/star/chart2/AxisType.hpp> diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx index 95ef825f7ecc..d2070abd1237 100644 --- a/chart2/source/tools/ExplicitCategoriesProvider.cxx +++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx @@ -30,6 +30,7 @@ #include <BaseCoordinateSystem.hxx> #include <com/sun/star/chart2/AxisType.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <o3tl/safeint.hxx> #include <rtl/ustrbuf.hxx> #include <tools/diagnose_ex.h> diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index dd70b4617547..d39addeaf8ce 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -34,6 +34,7 @@ #include <BaseCoordinateSystem.hxx> #include <com/sun/star/chart2/data/XDataSequence.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <cppuhelper/supportsservice.hxx> #include <comphelper/sequenceashashmap.hxx> diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index c7e231a614c2..4c7a1e53394b 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -36,6 +36,8 @@ #include <com/sun/star/chart2/AxisType.hpp> #include <com/sun/star/chart2/XRegressionCurveCalculator.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> +#include <com/sun/star/chart2/data/XDataSource.hpp> #include <tools/diagnose_ex.h> #include <comphelper/property.hxx> diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index 361b2f0b17a6..33427cccf7dc 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -28,6 +28,7 @@ #include <editeng/unoprnms.hxx> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/chart2/XDiagram.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> #include <tools/diagnose_ex.h> diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index af54871ff49d..8f0c19e83078 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -61,6 +61,7 @@ #include <com/sun/star/chart/TimeUnit.hpp> #include <com/sun/star/chart2/MovingAverageType.hpp> #include <com/sun/star/chart2/XDataPointCustomLabelField.hpp> +#include <com/sun/star/chart2/XDataSeries.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 6033760e8499..3e2b58458990 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -33,6 +33,7 @@ #include <svx/scene3d.hxx> #include <svx/e3dsceneupdater.hxx> #include <tools/diagnose_ex.h> +#include <com/sun/star/chart2/XDiagram.hpp> namespace chart { diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 68068ab4a864..e623c75084d0 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -642,7 +642,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/chart2,\ ChartDocumentWrapper \ ChartType \ ChartTypeManager \ - ChartTypeTemplate\ CoordinateSystem \ CoordinateSystemType \ DataPoint \ @@ -2031,7 +2030,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2,\ XChartType \ XChartTypeContainer \ XChartTypeManager \ - XChartTypeTemplate \ XColorScheme \ XCoordinateSystem \ XCoordinateSystemContainer \ diff --git a/offapi/com/sun/star/chart2/ChartTypeTemplate.idl b/offapi/com/sun/star/chart2/ChartTypeTemplate.idl deleted file mode 100644 index e2f74c2ba532..000000000000 --- a/offapi/com/sun/star/chart2/ChartTypeTemplate.idl +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef com_sun_star_chart2_ChartTypeTemplate_idl -#define com_sun_star_chart2_ChartTypeTemplate_idl - -#include <com/sun/star/chart2/XChartTypeTemplate.idl> - -module com -{ -module sun -{ -module star -{ -module chart2 -{ - -service ChartTypeTemplate -{ - interface ::com::sun::star::chart2::XChartTypeTemplate; -}; - -} ; // chart2 -} ; // com -} ; // sun -} ; // star - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/chart2/XChartTypeTemplate.idl b/offapi/com/sun/star/chart2/XChartTypeTemplate.idl deleted file mode 100644 index 7fe22af5ef55..000000000000 --- a/offapi/com/sun/star/chart2/XChartTypeTemplate.idl +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef com_sun_star_chart2_XChartTypeTemplate_idl -#define com_sun_star_chart2_XChartTypeTemplate_idl - -#include <com/sun/star/uno/XInterface.idl> -#include <com/sun/star/beans/PropertyValue.idl> -#include <com/sun/star/lang/IllegalArgumentException.idl> -#include <com/sun/star/chart2/XDiagram.idl> -#include <com/sun/star/chart2/data/XDataSource.idl> -#include <com/sun/star/chart2/XChartType.idl> -#include <com/sun/star/chart2/XDataInterpreter.idl> - -module com -{ -module sun -{ -module star -{ -module chart2 -{ - -interface XChartTypeTemplate : ::com::sun::star::uno::XInterface -{ - /** Creates a new diagram based upon the given data . - - @param xDataSource - This data source will be interpreted in a chart-type - specific way and appropriate DataSeries will - be created which serve as input for the new diagram. - - @param aArguments - Arguments that tell the template how to slice the given - range. The properties should be defined in a separate - service. - - <p>For standard parameters that may be used, see the - service StandardDiagramCreationParameters. - </p> - - @return - The new diagram which represents this - ChartTypeTemplate. - */ - XDiagram createDiagramByDataSource( - [in] com::sun::star::chart2::data::XDataSource xDataSource, - [in] sequence< com::sun::star::beans::PropertyValue > aArguments ); - - /** @return - `TRUE` if the template does support categories - */ - boolean supportsCategories(); - - /** Analyses the given diagram and reinterprets its - DataSeries and Categories and - creates a new diagram based on these series. - - <p>Note, that if matchesTemplate() returns - `TRUE` for the given XDiagram, the latter should - not be changed.</p> - - @param xDiagram - The diagram given will be modified such that it represents - this ChartTypeTemplate. - */ - void changeDiagram( [in] XDiagram xDiagram ); - - /** Changes the given diagram <code>xDiagram</code> by using the - new data given in <code>xDataSource</code>. - - <p>Note that the data is interpreted in a way that fits this - template, but not necessarily the chart-types of the diagram. - This method should only be called if the data-format of the - diagram is compatible with the data-format of this - template.</p> - - <p>Ideally a matchesTemplate() call for the - given diagram should return `TRUE` before this method is - called.</p> - - @param xDiagram - The diagram to be changed. - - @param xDataSource - This data source will be interpreted in a chart-type - specific way and the DataSeries found in - <code>xDiagram</code> will be adapted to the new data. - Missing data series will be created and unused ones will - be deleted in <code>xDiagram</code>. - - @param aArguments - Arguments that tell the template how to slice the given - range. The properties should be defined in a separate - service. - - <p>For standard parameters that may be used, see the - service StandardDiagramCreationParameters. - </p> - */ - void changeDiagramData( - [in] XDiagram xDiagram, - [in] com::sun::star::chart2::data::XDataSource xDataSource, - [in] sequence< com::sun::star::beans::PropertyValue > aArguments ); - - /** States whether the given diagram could have been created by - the template. - - <p>The template will parse the DataSeriesTree of - the diagram to determine if the structure matches the one - which would have been created by - createDiagramByDataSource().</p> - - <p>For analysis all parts of the diagram may be used, - e.g. also properties set at the data series (like symbols)./p> - - @param xDiagram - The diagram to be analyzed. - - @param bAdaptProperties - If `TRUE` the properties of the template are set, such - that the template matches more accurately. E.g. for a - line-chart with symbols the property "Symbol" would be set - to `TRUE`. If this parameter is `FALSE` the template - itself stays unmodified. - - @return - `TRUE` if the diagram given is structurally identical to - a diagram that was created using - createDiagramByDataSource() or - changeDiagram(). If `FALSE` is returned - the template stays unmodified even if - <code>bAdaptProperties</code> is `TRUE`. - */ - boolean matchesTemplate( [in] XDiagram xDiagram, - [in] boolean bAdaptProperties ); - - /** Provides a chart type object that can be used to create new - series. - - @param aFormerlyUsedChartTypes - The list can be used to copy some aspects from old chart types during the creation of a new chart type. - The list might be empty. - */ - XChartType getChartTypeForNewSeries( [in] sequence< XChartType > aFormerlyUsedChartTypes ); - - XDataInterpreter getDataInterpreter(); - - /** Applies a chart-type specific style (e.g. symbols) to all series in the - sequence aSeries. - - @param xSeries - a single data series to which a style will be applied - - @param nChartTypeGroupIndex - Denotes in which chart-type group the series lies, such this method - can apply different styles for different chart-type groups - - @param nSeriesIndex - The index of the series inside the current chart-type group. - nSeriesIndex does not uniquely identify a data series alone, but - only together with nChartTypeGroupIndex - - @param nSeriesCount - The number of series in the current chart-type group. - - @todo In the future, this should only change the "Style" property and no - hard attributes. - */ - void applyStyle( [in] XDataSeries xSeries, - [in] long nChartTypeGroupIndex, - [in] long nSeriesIndex, - [in] long nSeriesCount ); - - /** Resets all styles that were changed from the default at any - object in the chart and have not been later modified. - - <p>In createDiagramByDataSource() or - changeDiagram() a template might e.g. change - the page background color or the line style of all data - series. This method should reset all objects that still have - the changed settings to the default.</p> - - <p>If for example the template changed the - com::sun::star::drawing::LineStyle of all - series to NONE, this method should reset all series with - LineStyle NONE back to SOLID. If a series has a style DASH, - it must not be changed.</p> - */ - void resetStyles( [in] XDiagram xDiagram ); -}; - -} ; // chart2 -} ; // com -} ; // sun -} ; // star - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */