chart2/source/inc/AxisHelper.hxx   |    4 ++--
 chart2/source/tools/AxisHelper.cxx |   17 ++++++++---------
 2 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 5482a582db942fcb02aec57a904ab16d496006f2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Mar 28 14:41:25 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Mar 29 06:41:04 2023 +0000

    use more concrete types in chart2
    
    Change-Id: I7ec6df57504b3515be09796016b6db02521e5d67
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149673
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index 03d67fe3b5dd..65afc65faaa4 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -105,8 +105,8 @@ public:
     static void hideAxisIfNoDataIsAttached( const rtl::Reference< 
::chart::Axis >& xAxis
                                           , const rtl::Reference< 
::chart::Diagram >& xDiagram);
 
-    SAL_DLLPRIVATE static bool areAxisLabelsVisible( const 
css::uno::Reference< css::beans::XPropertySet >& xAxisProperties );
-    static bool isAxisVisible( const css::uno::Reference< css::chart2::XAxis 
>& xAxis );
+    SAL_DLLPRIVATE static bool areAxisLabelsVisible( const rtl::Reference< 
::chart::Axis >& xAxisProperties );
+    static bool isAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
     static bool isGridVisible( const css::uno::Reference< 
css::beans::XPropertySet >& xGridProperties );
 
     static rtl::Reference< ::chart::BaseCoordinateSystem >
diff --git a/chart2/source/tools/AxisHelper.cxx 
b/chart2/source/tools/AxisHelper.cxx
index 4eac09bdab4a..98d269388972 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -645,27 +645,26 @@ bool AxisHelper::isAxisShown( sal_Int32 nDimensionIndex, 
bool bMainAxis
     return AxisHelper::isAxisVisible( AxisHelper::getAxis( nDimensionIndex, 
bMainAxis, xDiagram ) );
 }
 
-bool AxisHelper::isAxisVisible( const Reference< XAxis >& xAxis )
+bool AxisHelper::isAxisVisible( const rtl::Reference< Axis >& xAxis )
 {
     bool bRet = false;
 
-    Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
-    if( xProps.is() )
+    if( xAxis.is() )
     {
-        xProps->getPropertyValue( "Show" ) >>= bRet;
-        bRet = bRet && ( LinePropertiesHelper::IsLineVisible( xProps )
-            || areAxisLabelsVisible( xProps ) );
+        xAxis->getPropertyValue( "Show" ) >>= bRet;
+        bRet = bRet && ( LinePropertiesHelper::IsLineVisible( xAxis )
+            || areAxisLabelsVisible( xAxis ) );
     }
 
     return bRet;
 }
 
-bool AxisHelper::areAxisLabelsVisible( const Reference< beans::XPropertySet >& 
xAxisProperties )
+bool AxisHelper::areAxisLabelsVisible( const rtl::Reference< Axis >& xAxis )
 {
     bool bRet = false;
-    if( xAxisProperties.is() )
+    if( xAxis.is() )
     {
-        xAxisProperties->getPropertyValue( "DisplayLabels" ) >>= bRet;
+        xAxis->getPropertyValue( "DisplayLabels" ) >>= bRet;
     }
     return bRet;
 }

Reply via email to