summaryrefslogtreecommitdiff
path: root/chart2/source/tools/DataSeriesHelper.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-29 10:34:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-29 19:02:25 +0000
commit99463a6f7f25d53e806fb475a6d5e2ced13b10e6 (patch)
tree85f21f15fa344fe411c904c950b7d65c06fd314b /chart2/source/tools/DataSeriesHelper.cxx
parentc6431ba1d041379c37292337337690c01f144fe2 (diff)
use more get/setFastPropertyValue in chart2
Change-Id: I1471309e200c8eec21844658b873f817565f9604 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools/DataSeriesHelper.cxx')
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 9935aa0e5fd3..883b72f2908d 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -19,6 +19,7 @@
#include <DataSeriesHelper.hxx>
#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <DataSource.hxx>
#include <ChartType.hxx>
#include <unonames.hxx>
@@ -49,6 +50,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -128,7 +130,8 @@ void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const rtl::Reference< ::c
}
xSeries->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabelAtSeries));
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -486,7 +489,8 @@ void setPropertyAlsoToAllAttributedDataPoints( const rtl::Reference< ::chart::Da
xSeries->setPropertyValue( rPropertyName, rPropertyValue );
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -500,15 +504,15 @@ void setPropertyAlsoToAllAttributedDataPoints( const rtl::Reference< ::chart::Da
}
}
-bool hasAttributedDataPointDifferentValue( const Reference< chart2::XDataSeries >& xSeries,
+bool hasAttributedDataPointDifferentValue( const rtl::Reference< DataSeries >& xSeries,
const OUString& rPropertyName, const uno::Any& rPropertyValue )
{
- Reference< beans::XPropertySet > xSeriesProperties( xSeries, uno::UNO_QUERY );
- if( !xSeriesProperties.is() )
+ if( !xSeries.is() )
return false;
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeriesProperties->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -590,7 +594,8 @@ bool hasDataLabelsAtPoints( const rtl::Reference< DataSeries >& xSeries )
if( xSeries.is() )
{
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -625,7 +630,8 @@ bool hasDataLabelAtPoint( const rtl::Reference< DataSeries >& xSeries, sal_Int32
if( xSeries.is() )
{
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
auto aIt = std::find( std::as_const(aAttributedDataPointIndexList).begin(), std::as_const(aAttributedDataPointIndexList).end(), nPointIndex );
if( aIt != std::as_const(aAttributedDataPointIndexList).end())