chart2/source/controller/dialogs/DialogModel.cxx             |    6 
 chart2/source/inc/ChartTypeTemplate.hxx                      |    6 
 chart2/source/inc/DataInterpreter.hxx                        |   81 ++++++-----
 chart2/source/model/template/BubbleChartTypeTemplate.cxx     |    2 
 chart2/source/model/template/BubbleChartTypeTemplate.hxx     |    2 
 chart2/source/model/template/BubbleDataInterpreter.cxx       |    6 
 chart2/source/model/template/BubbleDataInterpreter.hxx       |   10 -
 chart2/source/model/template/ChartTypeTemplate.cxx           |   10 -
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx |    4 
 chart2/source/model/template/ColumnLineChartTypeTemplate.hxx |    2 
 chart2/source/model/template/ColumnLineDataInterpreter.cxx   |    4 
 chart2/source/model/template/ColumnLineDataInterpreter.hxx   |   14 -
 chart2/source/model/template/DataInterpreter.cxx             |   12 -
 chart2/source/model/template/DataInterpreter.hxx             |   77 ----------
 chart2/source/model/template/ScatterChartTypeTemplate.cxx    |    2 
 chart2/source/model/template/ScatterChartTypeTemplate.hxx    |    2 
 chart2/source/model/template/StockChartTypeTemplate.cxx      |    2 
 chart2/source/model/template/StockChartTypeTemplate.hxx      |    2 
 chart2/source/model/template/StockDataInterpreter.cxx        |    8 -
 chart2/source/model/template/StockDataInterpreter.hxx        |   10 -
 chart2/source/model/template/XYDataInterpreter.cxx           |    6 
 chart2/source/model/template/XYDataInterpreter.hxx           |   10 -
 offapi/UnoApi_offapi.mk                                      |    1 
 solenv/clang-format/excludelist                              |    2 
 24 files changed, 112 insertions(+), 169 deletions(-)

New commits:
commit bc518de4b9ae9d5985b3706dd4fbf60a0d6e1a79
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Jan 22 21:27:28 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Jan 23 12:45:18 2022 +0100

    remove css::chart::XDataInterpreter
    
    these are purely internal interfaces, they cannot be used
    from outside chart2.
    
    Change-Id: I43c6d8aa96eb94e47767a4b16b89b4889f571579
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128792
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx 
b/chart2/source/controller/dialogs/DialogModel.cxx
index 86a742d2e0cb..fabb4235d796 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -19,6 +19,7 @@
 
 #include "DialogModel.hxx"
 #include <RangeSelectionHelper.hxx>
+#include <DataInterpreter.hxx>
 #include <DataSeriesHelper.hxx>
 #include <DataSourceHelper.hxx>
 #include <DiagramHelper.hxx>
@@ -39,7 +40,6 @@
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/chart2/XDataInterpreter.hpp>
 #include <com/sun/star/chart2/data/XDataSink.hpp>
 #include <comphelper/sequence.hxx>
 #include <tools/diagnose_ex.h>
@@ -346,7 +346,7 @@ Reference< XDataSeries > lcl_CreateNewSeries(
             //special handling for candlestick type
             if( xTemplate.is())
             {
-                Reference< XDataInterpreter > xInterpreter( 
xTemplate->getDataInterpreter());
+                rtl::Reference< ::chart::DataInterpreter > xInterpreter( 
xTemplate->getDataInterpreter());
                 if( xInterpreter.is())
                 {
                     sal_Int32 nStockVariant;
@@ -767,7 +767,7 @@ void DialogModel::setData(
         Reference< chart2::data::XDataSource > xDataSource(
             xDataProvider->createDataSource( rArguments ) );
 
-        Reference< chart2::XDataInterpreter > xInterpreter(
+        rtl::Reference< ::chart::DataInterpreter > xInterpreter(
             m_xTemplate->getDataInterpreter());
         if( xInterpreter.is())
         {
diff --git a/chart2/source/inc/ChartTypeTemplate.hxx 
b/chart2/source/inc/ChartTypeTemplate.hxx
index 331298a0e8da..58c940b2b65d 100644
--- a/chart2/source/inc/ChartTypeTemplate.hxx
+++ b/chart2/source/inc/ChartTypeTemplate.hxx
@@ -30,7 +30,6 @@ namespace com::sun::star::chart2 { class XChartType; }
 namespace com::sun::star::chart2 { class XCoordinateSystem; }
 namespace com::sun::star::chart2 { class XCoordinateSystemContainer; }
 namespace com::sun::star::chart2 { class XDataSeries; }
-namespace com::sun::star::chart2 { class XDataInterpreter; }
 namespace com::sun::star::chart2 { class XDiagram; }
 namespace com::sun::star::chart2::data { class XDataSource; }
 namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
@@ -40,6 +39,7 @@ namespace chart
 {
 class ChartType;
 class Diagram;
+class DataInterpreter;
 
 /** For creating diagrams and modifying existing diagrams.  A base class that
     implements XChartTypeTemplate and offers some tooling for classes that
@@ -103,7 +103,7 @@ public:
     virtual rtl::Reference< ::chart::ChartType >
         getChartTypeForNewSeries( const std::vector<
             rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) 
= 0;
-    virtual css::uno::Reference< css::chart2::XDataInterpreter > 
getDataInterpreter();
+    virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter();
     virtual void applyStyle(
         const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
         ::sal_Int32 nChartTypeIndex,
@@ -237,7 +237,7 @@ public:
 
 protected:
     css::uno::Reference< css::uno::XComponentContext >  m_xContext;
-    mutable css::uno::Reference< css::chart2::XDataInterpreter > 
m_xDataInterpreter;
+    mutable rtl::Reference< ::chart::DataInterpreter > m_xDataInterpreter;
 
 private:
     const OUString m_aServiceName;
diff --git a/offapi/com/sun/star/chart2/XDataInterpreter.idl 
b/chart2/source/inc/DataInterpreter.hxx
similarity index 55%
rename from offapi/com/sun/star/chart2/XDataInterpreter.idl
rename to chart2/source/inc/DataInterpreter.hxx
index f8826ee8e23c..eb914208684f 100644
--- a/offapi/com/sun/star/chart2/XDataInterpreter.idl
+++ b/chart2/source/inc/DataInterpreter.hxx
@@ -16,29 +16,52 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef com_sun_star_chart2_XDataInterpreter_idl
-#define com_sun_star_chart2_XDataInterpreter_idl
+#pragma once
 
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/beans/PropertyValue.idl>
-#include <com/sun/star/chart2/InterpretedData.idl>
-#include <com/sun/star/chart2/data/XDataSource.idl>
-#include <com/sun/star/chart2/XDataSeries.idl>
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/chart2/InterpretedData.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
 
-module com
-{
-module sun
-{
-module star
-{
-module chart2
+namespace chart
 {
 
 /** offers tooling to interpret different data sources in a structural
     and chart-type-dependent way.
  */
-interface XDataInterpreter  : ::com::sun::star::uno::XInterface
+class DataInterpreter : public ::cppu::WeakImplHelper<
+        css::lang::XServiceInfo >
 {
+public:
+    explicit DataInterpreter();
+    virtual ~DataInterpreter() override;
+
+    /// XServiceInfo declarations
+    virtual OUString SAL_CALL getImplementationName() override;
+    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
+    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
+
+    // convenience methods
+    static  OUString GetRole( const css::uno::Reference< 
css::chart2::data::XDataSequence > & xSeq );
+
+    static void SetRole(
+        const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq,
+        const OUString & rRole );
+
+    static css::uno::Any GetProperty(
+        const css::uno::Sequence<css::beans::PropertyValue > & aArguments,
+        std::u16string_view rName );
+
+    static bool HasCategories(
+        const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
+        const css::uno::Sequence< css::uno::Reference< 
css::chart2::data::XLabeledDataSequence > > & rData );
+
+    static bool UseCategoriesAsX(
+        const css::uno::Sequence< css::beans::PropertyValue > & rArguments );
+
+    // ____ DataInterpreter ____
     /** Interprets the given data.
 
         @param xSource
@@ -57,15 +80,16 @@ interface XDataInterpreter  : 
::com::sun::star::uno::XInterface
             use all the data series given here for the result before
             creating new ones.
      */
-    InterpretedData interpretDataSource(
-        [in] com::sun::star::chart2::data::XDataSource xSource,
-        [in] sequence< com::sun::star::beans::PropertyValue > aArguments,
-        [in] sequence< XDataSeries > aSeriesToReUse );
+    virtual css::chart2::InterpretedData interpretDataSource(
+        const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
+        const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
+        const css::uno::Sequence< css::uno::Reference< 
css::chart2::XDataSeries > >& aSeriesToReUse );
 
     /** Re-interprets the data given in <code>aInterpretedData</code>
         while keeping the number of data series and the categories.
      */
-    InterpretedData reinterpretDataSeries( [in] InterpretedData 
aInterpretedData );
+    virtual css::chart2::InterpretedData reinterpretDataSeries(
+        const css::chart2::InterpretedData& aInterpretedData );
 
     /** parses the given data and states, if a
         reinterpretDataSeries() call can be done
@@ -76,7 +100,8 @@ interface XDataInterpreter  : 
::com::sun::star::uno::XInterface
             <code>aInterpretedData</code> has a similar structure than
             the one required is used as output of the data interpreter.
      */
-    boolean isDataCompatible( [in] InterpretedData aInterpretedData );
+    virtual bool isDataCompatible(
+        const css::chart2::InterpretedData& aInterpretedData );
 
     /** Try to reverse the operation done in
         interpretDataSource().
@@ -85,7 +110,8 @@ interface XDataInterpreter  : 
::com::sun::star::uno::XInterface
         interpretDataSource()( <code>xSource</code> ),
         the result of this method should be <code>xSource</code>.</p>
      */
-    com::sun::star::chart2::data::XDataSource mergeInterpretedData( [in] 
InterpretedData aInterpretedData );
+    virtual css::uno::Reference< css::chart2::data::XDataSource > 
mergeInterpretedData(
+        const css::chart2::InterpretedData& aInterpretedData );
 
     /** Get chart information that is specific to a particular chart
         type, by key.
@@ -103,15 +129,10 @@ interface XDataInterpreter  : 
::com::sun::star::uno::XInterface
         @return
             The value requested, or nothing if not present.
     */
-    any getChartTypeSpecificData([in] string sKey );
+    virtual css::uno::Any getChartTypeSpecificData(
+        const OUString& sKey );
 };
 
-} ; // chart2
-} ; // com
-} ; // sun
-} ; // star
-
-
-#endif
+} // namespace chart
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx 
b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index 029e3c9b24c8..4edd89886b0d 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -181,7 +181,7 @@ rtl::Reference< ChartType > 
BubbleChartTypeTemplate::getChartTypeForNewSeries(
     return xResult;
 }
 
-Reference< chart2::XDataInterpreter > 
BubbleChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > BubbleChartTypeTemplate::getDataInterpreter()
 {
     if( ! m_xDataInterpreter.is())
         m_xDataInterpreter.set( new BubbleDataInterpreter );
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.hxx 
b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
index c0dcd6bb36b9..696bd36c60a8 100644
--- a/chart2/source/model/template/BubbleChartTypeTemplate.hxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.hxx
@@ -56,7 +56,7 @@ protected:
     virtual rtl::Reference< ::chart::ChartType >
         getChartTypeForNewSeries( const std::vector<
             rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) 
override;
-    virtual css::uno::Reference< css::chart2::XDataInterpreter > 
getDataInterpreter() override;
+    virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() 
override;
     virtual void applyStyle(
         const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
         ::sal_Int32 nChartTypeGroupIndex,
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx 
b/chart2/source/model/template/BubbleDataInterpreter.cxx
index 09fd1c25d7da..863126fa48ce 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -44,7 +44,7 @@ BubbleDataInterpreter::~BubbleDataInterpreter()
 }
 
 // ____ XDataInterpreter ____
-chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource(
+chart2::InterpretedData BubbleDataInterpreter::interpretDataSource(
     const Reference< chart2::data::XDataSource >& xSource,
     const Sequence< beans::PropertyValue >& aArguments,
     const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
@@ -151,7 +151,7 @@ chart2::InterpretedData SAL_CALL 
BubbleDataInterpreter::interpretDataSource(
     return InterpretedData( { comphelper::containerToSequence(aSeriesVec) }, 
xCategories );
 }
 
-chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
+chart2::InterpretedData BubbleDataInterpreter::reinterpretDataSeries(
     const chart2::InterpretedData& aInterpretedData )
 {
     InterpretedData aResult( aInterpretedData );
@@ -254,7 +254,7 @@ chart2::InterpretedData SAL_CALL 
BubbleDataInterpreter::reinterpretDataSeries(
     return aResult;
 }
 
-sal_Bool SAL_CALL BubbleDataInterpreter::isDataCompatible(
+bool BubbleDataInterpreter::isDataCompatible(
     const chart2::InterpretedData& aInterpretedData )
 {
     const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( 
aInterpretedData.Series ));
diff --git a/chart2/source/model/template/BubbleDataInterpreter.hxx 
b/chart2/source/model/template/BubbleDataInterpreter.hxx
index e5a9041a75e3..7c33251790db 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.hxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
 
 namespace chart
 {
@@ -30,14 +30,14 @@ public:
     virtual ~BubbleDataInterpreter() override;
 
 protected:
-    // ____ XDataInterpreter ____
-    virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+    // ____ DataInterpreter ____
+    virtual css::chart2::InterpretedData interpretDataSource(
         const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
         const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
         const css::uno::Sequence< css::uno::Reference< 
css::chart2::XDataSeries > >& aSeriesToReUse ) override;
-    virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
+    virtual css::chart2::InterpretedData reinterpretDataSeries(
         const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual sal_Bool SAL_CALL isDataCompatible(
+    virtual bool isDataCompatible(
         const css::chart2::InterpretedData& aInterpretedData ) override;
 };
 
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx 
b/chart2/source/model/template/ChartTypeTemplate.cxx
index 44f33ace9e1e..cabeedb76304 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <ChartTypeTemplate.hxx>
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
 #include <CommonConverters.hxx>
 #include <ChartTypeHelper.hxx>
 #include <ChartType.hxx>
@@ -150,7 +150,7 @@ rtl::Reference< Diagram > 
ChartTypeTemplate::createDiagramByDataSource(
         xDia = new Diagram(GetComponentContext());
 
         // modify diagram
-        Reference< chart2::XDataInterpreter > xInterpreter( 
getDataInterpreter());
+        rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter());
         chart2::InterpretedData aData(
             xInterpreter->interpretDataSource(
                 xDataSource, aArguments, Sequence< Reference< XDataSeries > 
>() ));
@@ -190,7 +190,7 @@ void ChartTypeTemplate::changeDiagram( const 
uno::Reference< XDiagram >& xDiagra
         const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.getLength();
 
         // chart-type specific interpretation of existing data series
-        Reference< chart2::XDataInterpreter > xInterpreter( 
getDataInterpreter());
+        rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter());
         chart2::InterpretedData aData;
         aData.Series = aSeriesSeq;
         aData.Categories = DiagramHelper::getCategoriesFromDiagram( xDiagram );
@@ -265,7 +265,7 @@ void ChartTypeTemplate::changeDiagramData(
         Sequence< Reference< XDataSeries > > aFlatSeriesSeq(
             comphelper::containerToSequence( 
DiagramHelper::getDataSeriesFromDiagram( xDiagram )));
         const sal_Int32 nFormerSeriesCount = aFlatSeriesSeq.getLength();
-        Reference< chart2::XDataInterpreter > xInterpreter( 
getDataInterpreter());
+        rtl::Reference< DataInterpreter > xInterpreter( getDataInterpreter());
         chart2::InterpretedData aData =
             xInterpreter->interpretDataSource( xDataSource, aArguments, 
aFlatSeriesSeq );
 
@@ -361,7 +361,7 @@ bool ChartTypeTemplate::matchesTemplate(
     return bResult;
 }
 
-Reference< chart2::XDataInterpreter > ChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > ChartTypeTemplate::getDataInterpreter()
 {
     if( ! m_xDataInterpreter.is())
         m_xDataInterpreter.set( new DataInterpreter );
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx 
b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index 9d5ef9274ace..181012dfa63b 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -378,13 +378,13 @@ rtl::Reference< ChartType > 
ColumnLineChartTypeTemplate::getChartTypeForNewSerie
     return xResult;
 }
 
-Reference< XDataInterpreter > ColumnLineChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > 
ColumnLineChartTypeTemplate::getDataInterpreter()
 {
     if( ! m_xDataInterpreter.is())
     {
         sal_Int32 nNumberOfLines = 1;
         getFastPropertyValue( PROP_COL_LINE_NUMBER_OF_LINES ) >>= 
nNumberOfLines;
-        m_xDataInterpreter.set( new ColumnLineDataInterpreter( nNumberOfLines 
) );
+        m_xDataInterpreter = new ColumnLineDataInterpreter( nNumberOfLines );
     }
     else
     {
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx 
b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
index 31d7b2bc9b16..42705776cce4 100644
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
@@ -67,7 +67,7 @@ protected:
         ::sal_Int32 nChartTypeGroupIndex,
         ::sal_Int32 nSeriesIndex,
         ::sal_Int32 nSeriesCount ) override;
-    virtual css::uno::Reference< css::chart2::XDataInterpreter > 
getDataInterpreter() override;
+    virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() 
override;
 
     // ____ ChartTypeTemplate ____
     virtual void createChartTypes(
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.cxx 
b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
index 658bf2fd62d9..8f34411ccb72 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.cxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
@@ -41,8 +41,8 @@ ColumnLineDataInterpreter::ColumnLineDataInterpreter(
 ColumnLineDataInterpreter::~ColumnLineDataInterpreter()
 {}
 
-// ____ XDataInterpreter ____
-InterpretedData SAL_CALL ColumnLineDataInterpreter::interpretDataSource(
+// ____ DataInterpreter ____
+InterpretedData ColumnLineDataInterpreter::interpretDataSource(
     const Reference< data::XDataSource >& xSource,
     const Sequence< beans::PropertyValue >& aArguments,
     const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.hxx 
b/chart2/source/model/template/ColumnLineDataInterpreter.hxx
index 43801bc249d3..f7f4d0f36dec 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.hxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
 
 namespace chart
 {
@@ -29,12 +29,12 @@ public:
     virtual ~ColumnLineDataInterpreter() override;
 
 protected:
-    // ____ XDataInterpreter ____
-    virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
-        const css::uno::Reference<css::chart2::data::XDataSource>& xSource,
-        const css::uno::Sequence<css::beans::PropertyValue>& aArguments,
-        const 
css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries>>& 
aSeriesToReUse)
-        override;
+    // ____ DataInterpreter ____
+    virtual css::chart2::InterpretedData
+    interpretDataSource(const 
css::uno::Reference<css::chart2::data::XDataSource>& xSource,
+                        const css::uno::Sequence<css::beans::PropertyValue>& 
aArguments,
+                        const 
css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries>>&
+                            aSeriesToReUse) override;
 
 private:
     sal_Int32 m_nNumberOfLines;
diff --git a/chart2/source/model/template/DataInterpreter.cxx 
b/chart2/source/model/template/DataInterpreter.cxx
index 524ce73d0d2d..2e0981b191ad 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
 #include <DataSeries.hxx>
 #include <DataSourceHelper.hxx>
 #include <DataSeriesHelper.hxx>
@@ -54,7 +54,7 @@ DataInterpreter::~DataInterpreter()
 {}
 
 // ____ XDataInterpreter ____
-InterpretedData SAL_CALL DataInterpreter::interpretDataSource(
+InterpretedData DataInterpreter::interpretDataSource(
     const Reference< data::XDataSource >& xSource,
     const Sequence< beans::PropertyValue >& aArguments,
     const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
@@ -126,7 +126,7 @@ InterpretedData SAL_CALL 
DataInterpreter::interpretDataSource(
     return InterpretedData( { comphelper::containerToSequence( aSeriesVec ) }, 
xCategories );
 }
 
-InterpretedData SAL_CALL DataInterpreter::reinterpretDataSeries(
+InterpretedData DataInterpreter::reinterpretDataSeries(
     const InterpretedData& aInterpretedData )
 {
     InterpretedData aResult( aInterpretedData );
@@ -181,7 +181,7 @@ InterpretedData SAL_CALL 
DataInterpreter::reinterpretDataSeries(
 }
 
 // criterion: all series must have exactly one data::XLabeledDataSequence
-sal_Bool SAL_CALL DataInterpreter::isDataCompatible(
+bool DataInterpreter::isDataCompatible(
     const chart2::InterpretedData& aInterpretedData )
 {
     const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( 
aInterpretedData.Series ));
@@ -256,7 +256,7 @@ private:
 
 } // anonymous namespace
 
-Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
+Reference< data::XDataSource > DataInterpreter::mergeInterpretedData(
     const InterpretedData& aInterpretedData )
 {
     vector< Reference< data::XLabeledDataSequence > > aResultVec;
@@ -295,7 +295,7 @@ Reference< data::XDataSource > SAL_CALL 
DataInterpreter::mergeInterpretedData(
     return DataSourceHelper::createDataSource( 
comphelper::containerToSequence( aResultVec ) );
 }
 
-uno::Any SAL_CALL DataInterpreter::getChartTypeSpecificData(
+uno::Any DataInterpreter::getChartTypeSpecificData(
     const OUString & )
 {
     return uno::Any();
diff --git a/chart2/source/model/template/DataInterpreter.hxx 
b/chart2/source/model/template/DataInterpreter.hxx
deleted file mode 100644
index 5f9a9239202f..000000000000
--- a/chart2/source/model/template/DataInterpreter.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#pragma once
-
-#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/chart2/XDataInterpreter.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-namespace chart
-{
-
-class DataInterpreter : public ::cppu::WeakImplHelper<
-        css::chart2::XDataInterpreter,
-        css::lang::XServiceInfo >
-{
-public:
-    explicit DataInterpreter();
-    virtual ~DataInterpreter() override;
-
-    /// XServiceInfo declarations
-    virtual OUString SAL_CALL getImplementationName() override;
-    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
override;
-    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
-
-    // convenience methods
-    static  OUString GetRole( const css::uno::Reference< 
css::chart2::data::XDataSequence > & xSeq );
-
-    static void SetRole(
-        const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq,
-        const OUString & rRole );
-
-    static css::uno::Any GetProperty(
-        const css::uno::Sequence<css::beans::PropertyValue > & aArguments,
-        std::u16string_view rName );
-
-    static bool HasCategories(
-        const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
-        const css::uno::Sequence< css::uno::Reference< 
css::chart2::data::XLabeledDataSequence > > & rData );
-
-    static bool UseCategoriesAsX(
-        const css::uno::Sequence< css::beans::PropertyValue > & rArguments );
-
-protected:
-    // ____ XDataInterpreter ____
-    virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
-        const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
-        const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
-        const css::uno::Sequence< css::uno::Reference< 
css::chart2::XDataSeries > >& aSeriesToReUse ) override;
-    virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
-        const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual sal_Bool SAL_CALL isDataCompatible(
-        const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual css::uno::Reference< css::chart2::data::XDataSource > SAL_CALL 
mergeInterpretedData(
-        const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual css::uno::Any SAL_CALL getChartTypeSpecificData(
-        const OUString& sKey ) override;
-};
-
-} // namespace chart
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx 
b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index 533908daf0e1..c2b2d4e68035 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -364,7 +364,7 @@ rtl::Reference< ChartType > 
ScatterChartTypeTemplate::getChartTypeForNewSeries(
     return xResult;
 }
 
-Reference< chart2::XDataInterpreter > 
ScatterChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > 
ScatterChartTypeTemplate::getDataInterpreter()
 {
     if( ! m_xDataInterpreter.is())
         m_xDataInterpreter.set( new XYDataInterpreter );
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx 
b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
index 5d5f8189af9e..7f9decd0341d 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx
@@ -62,7 +62,7 @@ protected:
     virtual rtl::Reference< ::chart::ChartType >
         getChartTypeForNewSeries( const std::vector<
             rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) 
override;
-    virtual css::uno::Reference< css::chart2::XDataInterpreter > 
getDataInterpreter() override;
+    virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() 
override;
     virtual void applyStyle(
         const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
         ::sal_Int32 nChartTypeGroupIndex,
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx 
b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 58db1062100c..43018fe8b657 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -455,7 +455,7 @@ rtl::Reference< ChartType > 
StockChartTypeTemplate::getChartTypeForNewSeries(
     return xResult;
 }
 
-Reference< XDataInterpreter > StockChartTypeTemplate::getDataInterpreter()
+rtl::Reference< DataInterpreter > StockChartTypeTemplate::getDataInterpreter()
 {
     if( ! m_xDataInterpreter.is())
         m_xDataInterpreter.set( new StockDataInterpreter( m_eStockVariant ) );
diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx 
b/chart2/source/model/template/StockChartTypeTemplate.hxx
index f0a6d73b0883..61a4017250dd 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.hxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.hxx
@@ -76,7 +76,7 @@ protected:
     virtual rtl::Reference< ::chart::ChartType >
         getChartTypeForNewSeries( const std::vector<
             rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) 
override;
-    virtual css::uno::Reference< css::chart2::XDataInterpreter > 
getDataInterpreter() override;
+    virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter() 
override;
     virtual void applyStyle(
         const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
         ::sal_Int32 nChartTypeIndex,
diff --git a/chart2/source/model/template/StockDataInterpreter.cxx 
b/chart2/source/model/template/StockDataInterpreter.cxx
index 7647f475f1f8..3e82715dd3eb 100644
--- a/chart2/source/model/template/StockDataInterpreter.cxx
+++ b/chart2/source/model/template/StockDataInterpreter.cxx
@@ -43,7 +43,7 @@ StockDataInterpreter::~StockDataInterpreter()
 {}
 
 // ____ XDataInterpreter ____
-InterpretedData SAL_CALL StockDataInterpreter::interpretDataSource(
+InterpretedData StockDataInterpreter::interpretDataSource(
     const Reference< data::XDataSource >& xSource,
     const Sequence< beans::PropertyValue >& rArguments,
     const Sequence< Reference< XDataSeries > >& rSeriesToReUse )
@@ -258,7 +258,7 @@ InterpretedData SAL_CALL 
StockDataInterpreter::interpretDataSource(
 
 // todo: skip first criterion? (to allow easy switch from stock-chart without
 // volume to one with volume)
-sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
+bool StockDataInterpreter::isDataCompatible(
     const InterpretedData& aInterpretedData )
 {
     // high/low/close
@@ -314,14 +314,14 @@ sal_Bool SAL_CALL StockDataInterpreter::isDataCompatible(
     return true;
 }
 
-InterpretedData SAL_CALL StockDataInterpreter::reinterpretDataSeries(
+InterpretedData StockDataInterpreter::reinterpretDataSeries(
     const InterpretedData& aInterpretedData )
 {
     // prerequisite: StockDataInterpreter::isDataCompatible() returned true
     return aInterpretedData;
 }
 
-uno::Any SAL_CALL StockDataInterpreter::getChartTypeSpecificData(
+uno::Any StockDataInterpreter::getChartTypeSpecificData(
     const OUString& sKey )
 {
     if( sKey == "stock variant" )
diff --git a/chart2/source/model/template/StockDataInterpreter.hxx 
b/chart2/source/model/template/StockDataInterpreter.hxx
index ba2d5ee79111..f5a9678f53f8 100644
--- a/chart2/source/model/template/StockDataInterpreter.hxx
+++ b/chart2/source/model/template/StockDataInterpreter.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
 
 #include "StockChartTypeTemplate.hxx"
 
@@ -34,15 +34,15 @@ public:
 
 protected:
     // ____ XDataInterpreter ____
-    virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+    virtual css::chart2::InterpretedData interpretDataSource(
         const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
         const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
         const css::uno::Sequence< css::uno::Reference< 
css::chart2::XDataSeries > >& aSeriesToReUse ) override;
-    virtual sal_Bool SAL_CALL isDataCompatible(
+    virtual bool isDataCompatible(
         const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
+    virtual css::chart2::InterpretedData reinterpretDataSeries(
         const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual css::uno::Any SAL_CALL getChartTypeSpecificData(
+    virtual css::uno::Any getChartTypeSpecificData(
         const OUString& sKey ) override;
 
 private:
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx 
b/chart2/source/model/template/XYDataInterpreter.cxx
index 1f0480a28c39..82f5a547a68b 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -45,7 +45,7 @@ XYDataInterpreter::~XYDataInterpreter()
 }
 
 // ____ XDataInterpreter ____
-chart2::InterpretedData SAL_CALL XYDataInterpreter::interpretDataSource(
+chart2::InterpretedData XYDataInterpreter::interpretDataSource(
     const Reference< chart2::data::XDataSource >& xSource,
     const Sequence< beans::PropertyValue >& aArguments,
     const Sequence< Reference< XDataSeries > >& aSeriesToReUse )
@@ -135,7 +135,7 @@ chart2::InterpretedData SAL_CALL 
XYDataInterpreter::interpretDataSource(
     return InterpretedData( { comphelper::containerToSequence( aSeriesVec ) }, 
xCategories );
 }
 
-chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
+chart2::InterpretedData XYDataInterpreter::reinterpretDataSeries(
     const chart2::InterpretedData& aInterpretedData )
 {
     InterpretedData aResult( aInterpretedData );
@@ -219,7 +219,7 @@ chart2::InterpretedData SAL_CALL 
XYDataInterpreter::reinterpretDataSeries(
 }
 
 // criterion: all series must have exactly two data::XLabeledDataSequences
-sal_Bool SAL_CALL XYDataInterpreter::isDataCompatible(
+bool XYDataInterpreter::isDataCompatible(
     const chart2::InterpretedData& aInterpretedData )
 {
     const Sequence< Reference< XDataSeries > > aSeries( FlattenSequence( 
aInterpretedData.Series ));
diff --git a/chart2/source/model/template/XYDataInterpreter.hxx 
b/chart2/source/model/template/XYDataInterpreter.hxx
index 24f640c143f6..1e7d93216110 100644
--- a/chart2/source/model/template/XYDataInterpreter.hxx
+++ b/chart2/source/model/template/XYDataInterpreter.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include "DataInterpreter.hxx"
+#include <DataInterpreter.hxx>
 
 namespace chart
 {
@@ -30,14 +30,14 @@ public:
     virtual ~XYDataInterpreter() override;
 
 protected:
-    // ____ XDataInterpreter ____
-    virtual css::chart2::InterpretedData SAL_CALL interpretDataSource(
+    // ____ DataInterpreter ____
+    virtual css::chart2::InterpretedData interpretDataSource(
         const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
         const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
         const css::uno::Sequence< css::uno::Reference< 
css::chart2::XDataSeries > >& aSeriesToReUse ) override;
-    virtual css::chart2::InterpretedData SAL_CALL reinterpretDataSeries(
+    virtual css::chart2::InterpretedData reinterpretDataSeries(
         const css::chart2::InterpretedData& aInterpretedData ) override;
-    virtual sal_Bool SAL_CALL isDataCompatible(
+    virtual bool isDataCompatible(
         const css::chart2::InterpretedData& aInterpretedData ) override;
 };
 
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index e623c75084d0..3998e2af0541 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2033,7 +2033,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2,\
        XColorScheme \
        XCoordinateSystem \
        XCoordinateSystemContainer \
-       XDataInterpreter \
        XDataProviderAccess \
        XDataPointCustomLabelField \
        XDataSeries \
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 6f3bbedafa9c..374ec7c1d052 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -1021,6 +1021,7 @@ chart2/source/inc/ColorPerPointHelper.hxx
 chart2/source/inc/CommonConverters.hxx
 chart2/source/inc/CommonFunctors.hxx
 chart2/source/inc/ConfigColorScheme.hxx
+chart2/source/inc/DataInterpreter.hxx
 chart2/source/inc/DataSeriesHelper.hxx
 chart2/source/inc/DataSource.hxx
 chart2/source/inc/DataSourceHelper.hxx
@@ -1135,7 +1136,6 @@ 
chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
 chart2/source/model/template/ColumnLineChartTypeTemplate.hxx
 chart2/source/model/template/ColumnLineDataInterpreter.cxx
 chart2/source/model/template/DataInterpreter.cxx
-chart2/source/model/template/DataInterpreter.hxx
 chart2/source/model/template/FilledNetChartType.cxx
 chart2/source/model/template/LineChartType.cxx
 chart2/source/model/template/LineChartType.hxx

Reply via email to