diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-19 21:02:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-22 16:08:05 +0100 |
commit | 8a728ac6cf7d8d032eb93f486618458b7814d42b (patch) | |
tree | d20de8154c46e5208f0405093c0e9b41889b8a23 /chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx | |
parent | Mysql/MariaDB: Clean mysqlc_keys + remove using (diff) | |
download | core-8a728ac6cf7d8d032eb93f486618458b7814d42b.tar.gz core-8a728ac6cf7d8d032eb93f486618458b7814d42b.zip |
use more concrete types in chart2, ChartType
Change-Id: Ibd299e2e8d82169706d810af98c29d684809c320
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128741
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx index 6d088a50bd81..102acfb02ba2 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx @@ -20,6 +20,7 @@ #include "WrappedSplineProperties.hxx" #include "Chart2ModelContact.hxx" #include <FastPropertyIdRanges.hxx> +#include <ChartType.hxx> #include <DiagramHelper.hxx> #include <WrappedProperty.hxx> #include <unonames.hxx> @@ -62,17 +63,13 @@ public: { bool bHasDetectableInnerValue = false; rHasAmbiguousValue = false; - Sequence< css::uno::Reference< css::chart2::XChartType > > aChartTypes( + std::vector< rtl::Reference< ChartType > > aChartTypes( ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getDiagram() ) ); - for( sal_Int32 nN = aChartTypes.getLength(); nN--; ) + for( sal_Int32 nN = aChartTypes.size(); nN--; ) { try { - uno::Reference<beans::XPropertySet> xChartTypePropertySet(aChartTypes[nN], uno::UNO_QUERY); - if (!xChartTypePropertySet.is()) - continue; - - Any aSingleValue = convertInnerToOuterValue( xChartTypePropertySet->getPropertyValue(m_aOwnInnerName) ); + Any aSingleValue = convertInnerToOuterValue( aChartTypes[nN]->getPropertyValue(m_aOwnInnerName) ); PROPERTYTYPE aCurValue = PROPERTYTYPE(); aSingleValue >>= aCurValue; if( !bHasDetectableInnerValue ) @@ -114,17 +111,13 @@ public: if( !(bHasAmbiguousValue || aNewValue != aOldValue) ) return; - Sequence< css::uno::Reference< css::chart2::XChartType > > aChartTypes( + std::vector< rtl::Reference< ChartType > > aChartTypes( ::chart::DiagramHelper::getChartTypesFromDiagram( m_spChart2ModelContact->getDiagram() ) ); - for( sal_Int32 nN = aChartTypes.getLength(); nN--; ) + for( sal_Int32 nN = aChartTypes.size(); nN--; ) { try { - css::uno::Reference< css::beans::XPropertySet > xChartTypePropertySet( aChartTypes[nN], css::uno::UNO_QUERY ); - if( xChartTypePropertySet.is() ) - { - xChartTypePropertySet->setPropertyValue(m_aOwnInnerName,convertOuterToInnerValue(uno::Any(aNewValue))); - } + aChartTypes[nN]->setPropertyValue(m_aOwnInnerName,convertOuterToInnerValue(uno::Any(aNewValue))); } catch( uno::Exception & ex ) { |