diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-29 08:49:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-29 12:50:32 +0000 |
commit | 856e6627c21b84a0b9ab2e3cb95a5a57864854e8 (patch) | |
tree | f0d0be1253d15d629100df6f04ffd40d300cef63 /chart2 | |
parent | 06b34d9f4b7967e87cd53e0effd98bfacfee2bb9 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/inc/ChartTypeHelper.hxx | 3 | ||||
-rw-r--r-- | chart2/source/inc/DataSeriesProperties.hxx (renamed from chart2/source/model/main/DataSeriesProperties.hxx) | 4 | ||||
-rw-r--r-- | chart2/source/model/main/DataSeries.cxx | 2 | ||||
-rw-r--r-- | chart2/source/model/main/DataSeriesProperties.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/ChartTypeHelper.cxx | 10 |
5 files changed, 11 insertions, 10 deletions
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 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); } |