diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-26 19:00:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-27 19:45:32 +0100 |
commit | 883ae88f297fc83a5a47a85dbcd1802a15e8eb3c (patch) | |
tree | 44df629802bbfae446d7ef83151ce0034cd2806a /chart2/source | |
parent | 7bd5f80185a349e3660d19b4b4a5d4dd1e2208e3 (diff) |
use more concrete types in chart2, BaseCoordinateSystem
Change-Id: Iacbca66dbb5cfe617c5e8ca25796a7261f1ce10d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129053
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/dialogs/ObjectNameProvider.cxx | 2 | ||||
-rw-r--r-- | chart2/source/inc/ExplicitCategoriesProvider.hxx | 9 | ||||
-rw-r--r-- | chart2/source/tools/AxisHelper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/tools/ExplicitCategoriesProvider.cxx | 10 |
4 files changed, 12 insertions, 11 deletions
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 5bf7efbbd144..7221030ba494 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -98,7 +98,7 @@ void lcl_addText( OUString& rOut, std::u16string_view rSeparator, std::u16string } OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal_Int32 nPointIndex, - const Reference< XCoordinateSystem >& xCooSys, + const rtl::Reference< BaseCoordinateSystem >& xCooSys, const Reference< frame::XModel >& xChartModel ) { diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx index 63097a3aea11..e8d1ebf50664 100644 --- a/chart2/source/inc/ExplicitCategoriesProvider.hxx +++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx @@ -19,7 +19,7 @@ #pragma once #include "charttoolsdllapi.hxx" -#include <cppuhelper/weakref.hxx> +#include <unotools/weakref.hxx> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Sequence.h> @@ -33,6 +33,7 @@ namespace com::sun::star::uno { class Any; } namespace chart { +class BaseCoordinateSystem; struct OOO_DLLPUBLIC_CHARTTOOLS ComplexCategory { @@ -55,7 +56,7 @@ public: class OOO_DLLPUBLIC_CHARTTOOLS ExplicitCategoriesProvider final { public: - ExplicitCategoriesProvider( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSysModel + ExplicitCategoriesProvider( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSysModel , ChartModel& rChartModel ); ~ExplicitCategoriesProvider(); @@ -68,7 +69,7 @@ public: const std::vector<ComplexCategory>* getCategoriesByLevel( sal_Int32 nLevel ); static OUString getCategoryByIndex( - const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSysModel + const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSysModel , ChartModel& rModel , sal_Int32 nIndex ); @@ -93,7 +94,7 @@ private: ExplicitCategoriesProvider& operator =(ExplicitCategoriesProvider const &) = delete; bool volatile m_bDirty; - css::uno::WeakReference< css::chart2::XCoordinateSystem > m_xCooSysModel; + unotools::WeakReference< ::chart::BaseCoordinateSystem > m_xCooSysModel; ChartModel& mrModel; css::uno::Reference< css::chart2::data::XLabeledDataSequence> m_xOriginalCategories; diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index 595c607eda1a..9d8af98c757f 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -101,7 +101,7 @@ bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling ) chart2::ScaleData AxisHelper::getDateCheckedScale( const Reference< chart2::XAxis >& xAxis, ChartModel& rModel ) { ScaleData aScale = xAxis->getScaleData(); - Reference< chart2::XCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( &rModel ) ); + rtl::Reference< BaseCoordinateSystem > xCooSys( ChartModelHelper::getFirstCoordinateSystem( &rModel ) ); if( aScale.AutoDateAxis && aScale.AxisType == AxisType::CATEGORY ) { sal_Int32 nDimensionIndex=0; sal_Int32 nAxisIndex=0; diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx index 7c294acc2778..5d69decfdd03 100644 --- a/chart2/source/tools/ExplicitCategoriesProvider.cxx +++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx @@ -46,10 +46,10 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using std::vector; -ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2::XCoordinateSystem >& xCooSysModel +ExplicitCategoriesProvider::ExplicitCategoriesProvider( const rtl::Reference< BaseCoordinateSystem >& xCooSysModel , ChartModel& rModel ) : m_bDirty(true) - , m_xCooSysModel( xCooSysModel ) + , m_xCooSysModel( xCooSysModel.get() ) , mrModel(rModel) , m_bIsExplicitCategoriesInited(false) , m_bIsDateAxis(false) @@ -481,7 +481,7 @@ void ExplicitCategoriesProvider::init() { if(m_bIsDateAxis) { - if( ChartTypeHelper::isSupportingDateAxis( AxisHelper::getChartTypeByIndex( m_xCooSysModel, 0 ), 0 ) ) + if( ChartTypeHelper::isSupportingDateAxis( AxisHelper::getChartTypeByIndex( m_xCooSysModel.get(), 0 ), 0 ) ) m_bIsDateAxis = lcl_fillDateCategories( m_xOriginalCategories->getValues(), m_aDateCategories, m_bIsAutoDate, mrModel ); else m_bIsDateAxis = false; @@ -518,7 +518,7 @@ Sequence< OUString > const & ExplicitCategoriesProvider::getSimpleCategories() } } if(!m_aExplicitCategories.hasElements()) - m_aExplicitCategories = DiagramHelper::generateAutomaticCategoriesFromCooSys( m_xCooSysModel ); + m_aExplicitCategories = DiagramHelper::generateAutomaticCategoriesFromCooSys( m_xCooSysModel.get() ); m_bIsExplicitCategoriesInited = true; } return m_aExplicitCategories; @@ -534,7 +534,7 @@ const std::vector<ComplexCategory>* ExplicitCategoriesProvider::getCategoriesByL } OUString ExplicitCategoriesProvider::getCategoryByIndex( - const Reference< XCoordinateSystem >& xCooSysModel + const rtl::Reference< BaseCoordinateSystem >& xCooSysModel , ChartModel& rModel , sal_Int32 nIndex ) { |