summaryrefslogtreecommitdiff
path: root/chart2/source
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
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')
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx6
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx14
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx14
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx5
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx2
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx8
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx9
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx22
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx8
-rw-r--r--chart2/source/view/main/VDataSeries.cxx10
10 files changed, 61 insertions, 37 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 8d71463263af..5e1c76958ab4 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -20,6 +20,7 @@
#include "DiagramWrapper.hxx"
#include <servicenames_charttypes.hxx>
#include "DataSeriesPointWrapper.hxx"
+#include <DataSeriesProperties.hxx>
#include "AxisWrapper.hxx"
#include "Chart2ModelContact.hxx"
#include "WallFloorWrapper.hxx"
@@ -71,6 +72,7 @@
using namespace ::com::sun::star;
using namespace ::chart::wrapper;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
@@ -1605,7 +1607,7 @@ void WrappedAttributedDataPointsProperty::setPropertyValue( const Any& rOuterVal
uno::Sequence< sal_Int32 > aSeq;
aVal <<= aSeq;
}
- series->setPropertyValue( "AttributedDataPoints", aVal );
+ series->setFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS, aVal ); // "AttributedDataPoints"
++i;
}
}
@@ -1625,7 +1627,7 @@ Any WrappedAttributedDataPointsProperty::getPropertyValue( const Reference< bean
for (auto const& series : aSeriesVector)
{
uno::Any aVal(
- series->getPropertyValue("AttributedDataPoints"));
+ series->getFastPropertyValue(PROP_DATASERIES_ATTRIBUTED_DATA_POINTS)); // "AttributedDataPoints"
uno::Sequence< sal_Int32 > aSeq;
if( aVal >>= aSeq )
aResultRange[ i ] = aSeq;
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index f096ecd4e1f3..314778deac4f 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -133,7 +133,7 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe
uno::Any aOldValue( xPropertySet->getPropertyValue(aPropertyName) );
if( bOverwriteAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( xPropertySet, uno::UNO_QUERY);
+ rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(xPropertySet.get()) );
if( aValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, aPropertyName, aOldValue ) )
{
@@ -181,7 +181,7 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
uno::Any aOldValue( xPropertySet->getPropertyValue(aPropertyName) );
if( bOverwriteAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( xPropertySet, uno::UNO_QUERY);
+ rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(xPropertySet.get()) );
if( aNewValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, aPropertyName, aOldValue ) )
{
@@ -341,7 +341,7 @@ bool DataPointItemConverter::ApplySpecialItem(
rValue = rItem.GetValue();
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( bOldValue != bool(rValue) ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, CHART_UNONAME_LABEL , aOldValue ) )
{
@@ -382,7 +382,7 @@ bool DataPointItemConverter::ApplySpecialItem(
GetPropertySet()->getPropertyValue( "LabelSeparator" ) >>= aOldValue;
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( aOldValue != aNewValue ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelSeparator" , uno::Any( aOldValue ) ) )
{
@@ -413,7 +413,7 @@ bool DataPointItemConverter::ApplySpecialItem(
GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bOld;
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( bOld!=bNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "TextWordWrap", uno::Any( bOld ) ) )
{
@@ -445,7 +445,7 @@ bool DataPointItemConverter::ApplySpecialItem(
GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld;
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if( nOld!=nNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "LabelPlacement" , uno::Any( nOld ) ) )
{
@@ -635,7 +635,7 @@ void DataPointItemConverter::FillSpecialItem(
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
{
if( DataSeriesHelper::hasAttributedDataPointDifferentValue(
- Reference< chart2::XDataSeries >( GetPropertySet(), uno::UNO_QUERY), CHART_UNONAME_LABEL , uno::Any(aLabel) ) )
+ dynamic_cast<DataSeries*>(GetPropertySet().get()), CHART_UNONAME_LABEL , uno::Any(aLabel) ) )
{
rOutItemSet.InvalidateItem(nWhichId);
}
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 439820912a9d..df7c46a6b342 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -127,7 +127,7 @@ bool numberFormatFromItemToPropertySet(
uno::Any aOldValue = xPropertySet->getPropertyValue(aPropertyName);
if (bOverwriteDataPoints)
{
- Reference<chart2::XDataSeries> xSeries(xPropertySet, uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries( dynamic_cast<DataSeries*>(xPropertySet.get()) );
if (aValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, aPropertyName, aOldValue))
{
@@ -177,7 +177,7 @@ bool useSourceFormatFromItemToPropertySet(
uno::Any aOldValue(xPropertySet->getPropertyValue(aPropertyName));
if (bOverwriteDataPoints)
{
- Reference<chart2::XDataSeries> xSeries(xPropertySet, uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(xPropertySet.get()));
if (aNewValue != aOldValue ||
::chart::DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, aPropertyName, aOldValue))
{
@@ -289,7 +289,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
rValue = rItem.GetValue();
if (mbDataSeries)
{
- Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if (bOldValue != bool(rValue) ||
DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, CHART_UNONAME_LABEL, aOldValue))
{
@@ -327,7 +327,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
GetPropertySet()->getPropertyValue("LabelSeparator") >>= aOldValue;
if (mbDataSeries)
{
- Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if (aOldValue != aNewValue ||
DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelSeparator", uno::Any(aOldValue)))
{
@@ -357,7 +357,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
GetPropertySet()->getPropertyValue( "TextWordWrap" ) >>= bOld;
if( mbDataSeries )
{
- Reference< chart2::XDataSeries > xSeries( GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference< DataSeries > xSeries( dynamic_cast<DataSeries*>(GetPropertySet().get()) );
if( bOld!=bNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue( xSeries, "TextWordWrap", uno::Any( bOld ) ) )
{
@@ -387,7 +387,7 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
GetPropertySet()->getPropertyValue("LabelPlacement") >>= nOld;
if (mbDataSeries)
{
- Reference<chart2::XDataSeries> xSeries(GetPropertySet(), uno::UNO_QUERY);
+ rtl::Reference<DataSeries> xSeries(dynamic_cast<DataSeries*>(GetPropertySet().get()));
if (nOld != nNew ||
DataSeriesHelper::hasAttributedDataPointDifferentValue(xSeries, "LabelPlacement", uno::Any(nOld)))
{
@@ -553,7 +553,7 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
if (mbDataSeries)
{
if (DataSeriesHelper::hasAttributedDataPointDifferentValue(
- Reference<chart2::XDataSeries>(GetPropertySet(), uno::UNO_QUERY), CHART_UNONAME_LABEL, uno::Any(aLabel)))
+ dynamic_cast<DataSeries*>(GetPropertySet().get()), CHART_UNONAME_LABEL, uno::Any(aLabel)))
{
rOutItemSet.InvalidateItem(nWhichId);
}
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index e993cdeb80f2..81474c5295eb 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -48,6 +48,7 @@
#include <StatisticsHelper.hxx>
#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <DataSeriesProperties.hxx>
#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <LegendHelper.hxx>
@@ -97,6 +98,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
namespace chart
@@ -1061,7 +1063,8 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
if( xSeries.is() )
{
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ // "AttributedDataPoints"
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
if( aAttributedDataPointIndexList.hasElements() )
{
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index 474c49bb8277..2de09db7cd76 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -156,7 +156,7 @@ OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(
OOO_DLLPUBLIC_CHARTTOOLS bool hasAttributedDataPointDifferentValue(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
const OUString& rPropertyName,
const css::uno::Any& rPropertyValue );
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index c99171e5432a..49c93766cd53 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -23,6 +23,7 @@
#include <ChartTypeHelper.hxx>
#include <ChartType.hxx>
#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <DataSource.hxx>
#include <GridProperties.hxx>
@@ -47,6 +48,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
@@ -380,7 +382,8 @@ void ChartTypeTemplate::applyStyle2(
lcl_ensureCorrectLabelPlacement( xSeries, aAvailablePlacements );
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--;)
lcl_ensureCorrectLabelPlacement( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), aAvailablePlacements );
}
@@ -444,7 +447,8 @@ void ChartTypeTemplate::resetStyles2( const rtl::Reference< ::chart::Diagram >&
lcl_resetLabelPlacementIfDefault( xSeries, nDefaultPlacement );
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--;)
lcl_resetLabelPlacementIfDefault( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]), nDefaultPlacement );
}
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 021b3ab6c8f2..88e9ab645f91 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -26,6 +26,7 @@
#include <DiagramHelper.hxx>
#include <DataSeries.hxx>
#include <DataSeriesHelper.hxx>
+#include <DataSeriesProperties.hxx>
#include <Axis.hxx>
#include <AxisHelper.hxx>
#include <ThreeDHelper.hxx>
@@ -41,6 +42,7 @@
#include <algorithm>
using namespace ::com::sun::star;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::Sequence;
@@ -305,9 +307,9 @@ bool PieChartTypeTemplate::matchesTemplate2(
rtl::Reference< DataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] );
xSeries->getPropertyValue( "Offset") >>= fOffset;
- //get AttributedDataPoints
+ // "AttributedDataPoints"
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- if( xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList )
+ if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
{
for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
{
@@ -428,7 +430,8 @@ void PieChartTypeTemplate::applyStyle2(
double fOffsetToSet = fDefaultOffset;
uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
- xSeries->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList;
+ // "AttributedDataPoints"
+ xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList;
// determine whether to set the new offset
bool bSetOffset = ( ePieOffsetMode == chart2::PieChartOffsetMode_ALL_EXPLODED );
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())
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index e67d4fbe4a57..ad71d4e72641 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -22,6 +22,7 @@
#include <ChartModelHelper.hxx>
#include <ChartModel.hxx>
#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <DiagramHelper.hxx>
#include <Diagram.hxx>
#include <Axis.hxx>
@@ -32,6 +33,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;
@@ -103,7 +105,8 @@ void ReferenceSizeProvider::setValuesAtAllDataSeries()
Sequence< sal_Int32 > aPointIndexes;
try
{
- if( elem->getPropertyValue( "AttributedDataPoints") >>= aPointIndexes )
+ // "AttributedDataPoints"
+ if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes )
{
for( sal_Int32 idx : std::as_const(aPointIndexes) )
setValuesAtPropertySet(
@@ -265,7 +268,8 @@ ReferenceSizeProvider::AutoResizeState ReferenceSizeProvider::getAutoResizeState
Sequence< sal_Int32 > aPointIndexes;
try
{
- if( elem->getPropertyValue( "AttributedDataPoints") >>= aPointIndexes )
+ // "AttributedDataPoints"
+ if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes )
{
for( sal_Int32 idx : std::as_const(aPointIndexes) )
{
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 6b6df81dde54..feac68042af5 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -21,6 +21,7 @@
#include <memory>
#include <VDataSeries.hxx>
#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <ObjectIdentifier.hxx>
#include <CommonConverters.hxx>
#include <LabelPositionHelper.hxx>
@@ -47,6 +48,7 @@ namespace chart {
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
+using namespace ::chart::DataSeriesProperties;
void VDataSequence::init( const uno::Reference< data::XDataSequence >& xModel )
{
@@ -227,12 +229,12 @@ VDataSeries::VDataSeries( const rtl::Reference< DataSeries >& xDataSeries )
try
{
- //get AttributedDataPoints
- xDataSeries->getPropertyValue("AttributedDataPoints") >>= m_aAttributedDataPointIndexList;
+ // "AttributedDataPoints"
+ xDataSeries->getFastPropertyValue(PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= m_aAttributedDataPointIndexList;
- xDataSeries->getPropertyValue("StackingDirection") >>= m_eStackingDirection;
+ xDataSeries->getFastPropertyValue(PROP_DATASERIES_STACKING_DIRECTION) >>= m_eStackingDirection; // "StackingDirection"
- xDataSeries->getPropertyValue("AttachedAxisIndex") >>= m_nAxisIndex;
+ xDataSeries->getFastPropertyValue(PROP_DATASERIES_ATTACHED_AXIS_INDEX) >>= m_nAxisIndex; // "AttachedAxisIndex"
if(m_nAxisIndex<0)
m_nAxisIndex=0;
}