chart2/source/inc/ChartTypeHelper.hxx | 3 ++- chart2/source/inc/DataSeriesProperties.hxx | 4 ++-- chart2/source/model/main/DataSeries.cxx | 2 +- chart2/source/model/main/DataSeriesProperties.cxx | 2 +- chart2/source/tools/ChartTypeHelper.cxx | 10 +++++----- solenv/clang-format/excludelist | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-)
New commits: commit 856e6627c21b84a0b9ab2e3cb95a5a57864854e8 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Mar 29 08:49:42 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 29 12:50:32 2023 +0000 use more concrete types in chart2 Change-Id: I938aa1d6d3c20b35d9e11818d4b641d8a03decaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx index cd5985f9a51c..379f96ad0e44 100644 --- a/chart2/source/inc/ChartTypeHelper.hxx +++ b/chart2/source/inc/ChartTypeHelper.hxx @@ -29,6 +29,7 @@ namespace com::sun::star::chart2 { class XDataSeries; } namespace chart { class ChartType; +class DataSeries; class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper { @@ -56,7 +57,7 @@ public: //returns sequence of css::chart::DataLabelPlacement static css::uno::Sequence < sal_Int32 > getSupportedLabelPlacements( const rtl::Reference< ::chart::ChartType >& xChartType, bool bSwapXAndY - , const css::uno::Reference< css::chart2::XDataSeries >& xSeries ); + , const rtl::Reference< ::chart::DataSeries >& xSeries ); //returns sequence of css::chart::MissingValueTreatment static css::uno::Sequence < sal_Int32 > getSupportedMissingValueTreatments( diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/inc/DataSeriesProperties.hxx similarity index 96% rename from chart2/source/model/main/DataSeriesProperties.hxx rename to chart2/source/inc/DataSeriesProperties.hxx index 13636d442fb5..7d36721ef066 100644 --- a/chart2/source/model/main/DataSeriesProperties.hxx +++ b/chart2/source/inc/DataSeriesProperties.hxx @@ -18,8 +18,8 @@ */ #pragma once -#include <PropertyHelper.hxx> -#include <FastPropertyIdRanges.hxx> +#include "PropertyHelper.hxx" +#include "FastPropertyIdRanges.hxx" #include <vector> diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx index 9008ab8e664b..38f2c474b47a 100644 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -18,7 +18,7 @@ */ #include <DataSeries.hxx> -#include "DataSeriesProperties.hxx" +#include <DataSeriesProperties.hxx> #include "DataPointProperties.hxx" #include <CharacterProperties.hxx> #include <UserDefinedProperties.hxx> diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx index d85d264753c1..92201a3544fe 100644 --- a/chart2/source/model/main/DataSeriesProperties.cxx +++ b/chart2/source/model/main/DataSeriesProperties.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "DataSeriesProperties.hxx" +#include <DataSeriesProperties.hxx> #include "DataPointProperties.hxx" #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/chart2/StackingDirection.hpp> diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx index 92b0337b917f..b393b344fb0d 100644 --- a/chart2/source/tools/ChartTypeHelper.cxx +++ b/chart2/source/tools/ChartTypeHelper.cxx @@ -20,6 +20,7 @@ #include <ChartTypeHelper.hxx> #include <ChartType.hxx> #include <BaseCoordinateSystem.hxx> +#include <DataSeriesProperties.hxx> #include <DiagramHelper.hxx> #include <servicenames_charttypes.hxx> @@ -33,6 +34,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; +using namespace ::chart::DataSeriesProperties; namespace chart { @@ -240,7 +242,7 @@ bool ChartTypeHelper::isSupportingBarConnectors( uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const rtl::Reference< ChartType >& xChartType , bool bSwapXAndY - , const uno::Reference< chart2::XDataSeries >& xSeries ) + , const rtl::Reference< DataSeries >& xSeries ) { uno::Sequence < sal_Int32 > aRet; if( !xChartType.is() ) @@ -288,9 +290,8 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const bool bStacked = false; { - uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY ); chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING; - xSeriesProp->getPropertyValue( "StackingDirection" ) >>= eStacking; + xSeries->getFastPropertyValue( PROP_DATASERIES_STACKING_DIRECTION ) >>= eStacking; // "StackingDirection" bStacked = (eStacking == chart2::StackingDirection_Y_STACKING); } @@ -319,9 +320,8 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const { bool bStacked = false; { - uno::Reference<beans::XPropertySet> xSeriesProp(xSeries, uno::UNO_QUERY); chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING; - xSeriesProp->getPropertyValue("StackingDirection") >>= eStacking; + xSeries->getFastPropertyValue(PROP_DATASERIES_STACKING_DIRECTION) >>= eStacking; // "StackingDirection" bStacked = (eStacking == chart2::StackingDirection_Y_STACKING); } diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 94845e7ecedd..54e71626d64c 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -1007,6 +1007,7 @@ chart2/source/inc/ConfigColorScheme.hxx chart2/source/inc/DataInterpreter.hxx chart2/source/inc/DataSeries.hxx chart2/source/inc/DataSeriesHelper.hxx +chart2/source/inc/DataSeriesProperties.hxx chart2/source/inc/DataSource.hxx chart2/source/inc/DataSourceHelper.hxx chart2/source/inc/Diagram.hxx @@ -1080,7 +1081,6 @@ chart2/source/model/main/DataPointProperties.cxx chart2/source/model/main/DataPointProperties.hxx chart2/source/model/main/DataSeries.cxx chart2/source/model/main/DataSeriesProperties.cxx -chart2/source/model/main/DataSeriesProperties.hxx chart2/source/model/main/Diagram.cxx chart2/source/model/main/FormattedString.cxx chart2/source/model/main/GridProperties.cxx