chart2/source/controller/inc/AxisItemConverter.hxx                          |  
  2 
 chart2/source/controller/inc/CharacterPropertyItemConverter.hxx             |  
  2 
 chart2/source/controller/inc/DataPointItemConverter.hxx                     |  
  2 
 chart2/source/controller/inc/ErrorBarItemConverter.hxx                      |  
  2 
 chart2/source/controller/inc/GraphicPropertyItemConverter.hxx               |  
  2 
 chart2/source/controller/inc/ItemConverter.hxx                              |  
 13 
 chart2/source/controller/inc/LegendItemConverter.hxx                        |  
  2 
 chart2/source/controller/inc/MultipleChartConverters.hxx                    |  
 10 
 chart2/source/controller/inc/RegressionCurveItemConverter.hxx               |  
  2 
 chart2/source/controller/inc/RegressionEquationItemConverter.hxx            |  
  2 
 chart2/source/controller/inc/SeriesOptionsItemConverter.hxx                 |  
  2 
 chart2/source/controller/inc/StatisticsItemConverter.hxx                    |  
  2 
 chart2/source/controller/inc/TextLabelItemConverter.hxx                     |  
  2 
 chart2/source/controller/inc/TitleItemConverter.hxx                         |  
  2 
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx               |  
  2 
 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx  |  
  2 
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx          |  
  2 
 chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx           |  
  2 
 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx    |  
 13 
 chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx             |  
  2 
 chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx         |  
 10 
 chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx    |  
  2 
 chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx |  
  2 
 chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx                   |  
136 +++-------
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx      |  
  2 
 chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx         |  
  2 
 chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx          |  
  2 
 chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx              |  
  6 
 28 files changed, 94 insertions(+), 138 deletions(-)

New commits:
commit ecd6e3ac757575deb3162b3bdd470b6a74f5dd70
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jul 15 20:39:26 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jul 15 22:13:46 2021 +0200

    use WhichRangesContainer in chart2
    
    Change-Id: Iedb30b5dae868953517c0bb87fcfc91d747ae65f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118995
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx 
b/chart2/source/controller/inc/AxisItemConverter.hxx
index 7f42853d1088..76c047105d3c 100644
--- a/chart2/source/controller/inc/AxisItemConverter.hxx
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -50,7 +50,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx 
b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
index 4322c8c391fd..96138e237230 100644
--- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -42,7 +42,7 @@ public:
     virtual ~CharacterPropertyItemConverter() override;
 
 private:
-    virtual const sal_uInt16* GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
     virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & 
rItemSet ) override;
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx 
b/chart2/source/controller/inc/DataPointItemConverter.hxx
index f2fbfdf9ca99..0c4fcb3f7038 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -62,7 +62,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/ErrorBarItemConverter.hxx 
b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
index e370ddd99fe0..788206e15b93 100644
--- a/chart2/source/controller/inc/ErrorBarItemConverter.hxx
+++ b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
@@ -44,7 +44,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx 
b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
index fd221336b774..6b0376033d7a 100644
--- a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
+++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
@@ -47,7 +47,7 @@ public:
     virtual ~GraphicPropertyItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/ItemConverter.hxx 
b/chart2/source/controller/inc/ItemConverter.hxx
index 80b6c9cd2119..865268a3abf9 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -116,18 +116,9 @@ public:
 
 protected:
 
-    /** implement this method to provide an array of which-ranges of the form:
-
-        const sal_uInt16 aMyPairs[] =
-        {
-            from_1, to_1,
-            from_2, to_2,
-            ...
-            from_n, to_n,
-            0
-        };
+    /** implement this method to provide an array of which-ranges
     */
-    virtual const sal_uInt16 * GetWhichPairs() const = 0;
+    virtual const WhichRangesContainer& GetWhichPairs() const = 0;
 
     /** implement this method to return a Property object for a given which id.
 
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx 
b/chart2/source/controller/inc/LegendItemConverter.hxx
index efa167db0856..c3872e2d7f66 100644
--- a/chart2/source/controller/inc/LegendItemConverter.hxx
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -46,7 +46,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx 
b/chart2/source/controller/inc/MultipleChartConverters.hxx
index 6a9110d45be2..f4d61154b04e 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -40,7 +40,7 @@ public:
     virtual ~AllAxisItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
 };
 
 class AllGridItemConverter : public MultipleItemConverter
@@ -54,7 +54,7 @@ public:
     virtual ~AllGridItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
 };
 
 class AllDataLabelItemConverter : public MultipleItemConverter
@@ -69,7 +69,7 @@ public:
     virtual ~AllDataLabelItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
 };
 
 class AllTitleItemConverter : public MultipleItemConverter
@@ -83,7 +83,7 @@ public:
     virtual ~AllTitleItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
 };
 
 class AllSeriesStatisticsConverter : public MultipleItemConverter
@@ -94,7 +94,7 @@ public:
     virtual ~AllSeriesStatisticsConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
 };
 
 } // namespace chart::wrapper
diff --git a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx 
b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
index c5e1665d61a0..a374796f846c 100644
--- a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
@@ -43,7 +43,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx 
b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
index df05d6e7f8e8..0ab13a086a96 100644
--- a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -46,7 +46,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx 
b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index d43c7cb6d234..bb5b2c441a7d 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -39,7 +39,7 @@ public:
     virtual ~SeriesOptionsItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/StatisticsItemConverter.hxx 
b/chart2/source/controller/inc/StatisticsItemConverter.hxx
index 5d9fb544c605..d94759c30ecd 100644
--- a/chart2/source/controller/inc/StatisticsItemConverter.hxx
+++ b/chart2/source/controller/inc/StatisticsItemConverter.hxx
@@ -35,7 +35,7 @@ public:
     virtual ~StatisticsItemConverter() override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/TextLabelItemConverter.hxx 
b/chart2/source/controller/inc/TextLabelItemConverter.hxx
index ebe1b3961d89..3d06e9d9b63f 100644
--- a/chart2/source/controller/inc/TextLabelItemConverter.hxx
+++ b/chart2/source/controller/inc/TextLabelItemConverter.hxx
@@ -49,7 +49,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16* GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx 
b/chart2/source/controller/inc/TitleItemConverter.hxx
index bc8e87e10cf0..e9335d3a3d19 100644
--- a/chart2/source/controller/inc/TitleItemConverter.hxx
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -44,7 +44,7 @@ public:
     virtual bool ApplyItemSet( const SfxItemSet & rItemSet ) override;
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
     virtual bool GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const override;
 
     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & 
rOutItemSet ) const override;
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 297b3de704ee..28d5cf4cabc7 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -128,7 +128,7 @@ bool AxisItemConverter::ApplyItemSet( const SfxItemSet & 
rItemSet )
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * AxisItemConverter::GetWhichPairs() const
+const WhichRangesContainer& AxisItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nAxisWhichPairs;
diff --git 
a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index 49945b2f5803..5345f9168ca3 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -87,7 +87,7 @@ 
CharacterPropertyItemConverter::CharacterPropertyItemConverter(
 CharacterPropertyItemConverter::~CharacterPropertyItemConverter()
 {}
 
-const sal_uInt16 * CharacterPropertyItemConverter::GetWhichPairs() const
+const WhichRangesContainer& CharacterPropertyItemConverter::GetWhichPairs() 
const
 {
     return nCharacterPropertyWhichPairs;
 }
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 589972740e86..51dfcf3e7dc0 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -289,7 +289,7 @@ bool DataPointItemConverter::ApplyItemSet( const SfxItemSet 
& rItemSet )
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * DataPointItemConverter::GetWhichPairs() const
+const WhichRangesContainer& DataPointItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     if( m_bDataSeries )
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index 5a8114c215c9..89c4e8cc212a 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -110,7 +110,7 @@ bool ErrorBarItemConverter::ApplyItemSet( const SfxItemSet 
& rItemSet )
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * ErrorBarItemConverter::GetWhichPairs() const
+const WhichRangesContainer& ErrorBarItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nErrorBarWhichPairs;
diff --git 
a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index f553ff16bc34..e265e4198180 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -148,22 +148,21 @@ 
GraphicPropertyItemConverter::GraphicPropertyItemConverter(
 GraphicPropertyItemConverter::~GraphicPropertyItemConverter()
 {}
 
-const sal_uInt16 * GraphicPropertyItemConverter::GetWhichPairs() const
+const WhichRangesContainer& GraphicPropertyItemConverter::GetWhichPairs() const
 {
-    const sal_uInt16 * pResult = nullptr;
-
     switch( m_GraphicObjectType )
     {
         case GraphicObjectType::LineDataPoint:
         case GraphicObjectType::FilledDataPoint:
-            pResult = nRowWhichPairs; break;
+            return nRowWhichPairs;
         case GraphicObjectType::LineProperties:
-            pResult = nLinePropertyWhichPairs; break;
+            return nLinePropertyWhichPairs;
         case GraphicObjectType::LineAndFillProperties:
-            pResult = nLineAndFillPropertyWhichPairs; break;
+            return nLineAndFillPropertyWhichPairs;
     }
 
-    return pResult;
+    static const WhichRangesContainer empty;
+    return empty;
 }
 
 bool GraphicPropertyItemConverter::GetItemProperty( tWhichIdType nWhichId, 
tPropertyNameWithMemberId & rOutProperty ) const
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index 9ae14be68a21..081e8ebbd390 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -76,7 +76,7 @@ bool LegendItemConverter::ApplyItemSet( const SfxItemSet & 
rItemSet )
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * LegendItemConverter::GetWhichPairs() const
+const WhichRangesContainer& LegendItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nLegendWhichPairs;
diff --git 
a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx 
b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 8351e5bf02ab..25b2623f82a2 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -65,7 +65,7 @@ AllAxisItemConverter::~AllAxisItemConverter()
 {
 }
 
-const sal_uInt16 * AllAxisItemConverter::GetWhichPairs() const
+const WhichRangesContainer& AllAxisItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nAllAxisWhichPairs;
@@ -92,7 +92,7 @@ AllGridItemConverter::~AllGridItemConverter()
 {
 }
 
-const sal_uInt16 * AllGridItemConverter::GetWhichPairs() const
+const WhichRangesContainer& AllGridItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nGridWhichPairs;
@@ -129,7 +129,7 @@ AllDataLabelItemConverter::~AllDataLabelItemConverter()
 {
 }
 
-const sal_uInt16 * AllDataLabelItemConverter::GetWhichPairs() const
+const WhichRangesContainer& AllDataLabelItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nDataLabelWhichPairs;
@@ -158,7 +158,7 @@ AllTitleItemConverter::~AllTitleItemConverter()
 {
 }
 
-const sal_uInt16 * AllTitleItemConverter::GetWhichPairs() const
+const WhichRangesContainer& AllTitleItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nTitleWhichPairs;
@@ -183,7 +183,7 @@ AllSeriesStatisticsConverter::AllSeriesStatisticsConverter(
 AllSeriesStatisticsConverter::~AllSeriesStatisticsConverter()
 {}
 
-const sal_uInt16 * AllSeriesStatisticsConverter::GetWhichPairs() const
+const WhichRangesContainer& AllSeriesStatisticsConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nStatWhichPairs;
diff --git 
a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index 7fe5d2acad41..f98ec6375f3b 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -116,7 +116,7 @@ bool RegressionCurveItemConverter::ApplyItemSet( const 
SfxItemSet & rItemSet )
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * RegressionCurveItemConverter::GetWhichPairs() const
+const WhichRangesContainer& RegressionCurveItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nRegressionCurveWhichPairs;
diff --git 
a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
index 234d2b5ba47f..22fc379b2a2c 100644
--- 
a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
+++ 
b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
@@ -85,7 +85,7 @@ bool RegressionEquationItemConverter::ApplyItemSet( const 
SfxItemSet & rItemSet
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * RegressionEquationItemConverter::GetWhichPairs() const
+const WhichRangesContainer& RegressionEquationItemConverter::GetWhichPairs() 
const
 {
     // must span all used items!
     return nRegEquationWhichPairs;
diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx 
b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index 94d22f401d70..8d4094bae0a8 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -25,68 +25,55 @@
 
 #include <chartview/ChartSfxItemIds.hxx>
 
-const sal_uInt16 nTitleWhichPairs[] =
-{
+const WhichRangesContainer nTitleWhichPairs(svl::Items<
     SCHATTR_TEXT_START, SCHATTR_TEXT_END,
     XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
     XATTR_FILL_FIRST, XATTR_FILL_LAST,              //  1018 -  1046  
svx/xdef.hxx
     SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,      //  1067 -  1078  
svx/svddef.hxx
     EE_ITEMS_START, EE_ITEMS_END,                             // Characters
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, // Characters
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
+>::value);
 
-const sal_uInt16 nAxisWhichPairs[] =
-{
+const WhichRangesContainer nAxisWhichPairs(svl::Items<
     SCHATTR_TEXT_START, SCHATTR_TEXT_END,
     SCHATTR_AXIS_START, SCHATTR_AXIS_END,
     XATTR_LINE_FIRST, XATTR_LINE_LAST,                          //  1000 -  
1016  svx/xdef.hxx
     EE_ITEMS_START, EE_ITEMS_END,                             // Characters
     SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,   // 10585 - 
10585  svx/svxids.hrc
     SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, // 11432       
   svx/svxids.hrc
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, // Characters
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
+>::value);
 
-const sal_uInt16 nAllAxisWhichPairs[] =
-{
+const WhichRangesContainer nAllAxisWhichPairs(svl::Items<
     SCHATTR_TEXT_START, SCHATTR_TEXT_END,
     SCHATTR_AXIS_LABEL_START, SCHATTR_AXIS_LABEL_END,
     XATTR_LINE_FIRST, XATTR_LINE_LAST,
     EE_ITEMS_START, EE_ITEMS_END,                             // Characters
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, // Characters
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
+>::value);
 
-const sal_uInt16 nGridWhichPairs[] =
-{
-    XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
-    0
-};
+const WhichRangesContainer nGridWhichPairs(svl::Items<
+    XATTR_LINE_FIRST, XATTR_LINE_LAST              //  1000 -  1016  
svx/xdef.hxx
+>::value);
 
-const sal_uInt16 nLegendWhichPairs[] =
-{
+const WhichRangesContainer nLegendWhichPairs(svl::Items<
     SCHATTR_LEGEND_START, SCHATTR_LEGEND_END,       //     3 -     3  
sch/schattr.hxx
     XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
     XATTR_FILL_FIRST, XATTR_FILL_LAST,              //  1018 -  1046  
svx/xdef.hxx
     SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,      //  1067 -  1078  
svx/svddef.hxx
     EE_ITEMS_START, EE_ITEMS_END,                             // Characters
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, // Characters
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
+>::value);
 
-const sal_uInt16 nDataLabelWhichPairs[] =
-{
+const WhichRangesContainer nDataLabelWhichPairs(svl::Items<
     SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END,
     SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES,
     EE_PARA_WRITINGDIR,EE_PARA_WRITINGDIR,
     SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO,    /* 10585 - 
10585  svx/svxids.hrc */
-    SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, /* 11432       
   svx/svxids.hrc */
-    0
-};
+    SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE /* 11432        
  svx/svxids.hrc */
+>::value);
 
-const sal_uInt16 nDataPointWhichPairs[] =
-{
+const WhichRangesContainer nDataPointWhichPairs(svl::Items<
     SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, /*     1 -     2  
sch/schattr.hxx*/
     SCHATTR_TEXT_DEGREES, SCHATTR_TEXT_DEGREES,
     SCHATTR_STYLE_START,SCHATTR_STYLE_END,          /*    59 -    68  
sch/schattr.hxx*/
@@ -99,12 +86,10 @@ const sal_uInt16 nDataPointWhichPairs[] =
     EE_ITEMS_START, EE_ITEMS_END,                   /*  3994 -  4037  
editeng/eeitem.hxx */
     SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO,    /* 10585 - 
10585  svx/svxids.hrc */
     SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, /* 11432       
   svx/svxids.hrc */
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING,
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING
+>::value);
 
-const sal_uInt16 nTextLabelWhichPairs[] =
-{
+const WhichRangesContainer nTextLabelWhichPairs(svl::Items<
     SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END,
     SCHATTR_TEXT_DEGREES, SCHATTR_TEXT_DEGREES,
     SCHATTR_STYLE_SYMBOL, SCHATTR_STYLE_SYMBOL,
@@ -115,21 +100,17 @@ const sal_uInt16 nTextLabelWhichPairs[] =
     EE_ITEMS_START, EE_ITEMS_END,
     SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO,
     SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE,
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING,
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING
+>::value);
 
-const sal_uInt16 nSeriesOptionsWhichPairs[] =
-{
+const WhichRangesContainer nSeriesOptionsWhichPairs(svl::Items<
     SCHATTR_AXIS,SCHATTR_AXIS,                      /*    69          
sch/schattr.hxx*/
     SCHATTR_BAR_OVERLAP,SCHATTR_BAR_CONNECT,         /*    98 - 100 (incl. 
SCHATTR_GAPWIDTH) */
-    SCHATTR_GROUP_BARS_PER_AXIS,SCHATTR_AXIS_FOR_ALL_SERIES,
-    0
-};
+    SCHATTR_GROUP_BARS_PER_AXIS,SCHATTR_AXIS_FOR_ALL_SERIES
+>::value);
 
 // nDataPointWhichPairs + nSeriesOptionsWhichPairs
-const sal_uInt16 nRowWhichPairs[] =
-{
+const WhichRangesContainer nRowWhichPairs(svl::Items<
     SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, /*     1 -     2  
sch/schattr.hxx*/
     SCHATTR_TEXT_DEGREES, SCHATTR_TEXT_DEGREES,
     SCHATTR_STYLE_START,SCHATTR_STYLE_END,          /*    59 -    68  
sch/schattr.hxx*/
@@ -145,63 +126,48 @@ const sal_uInt16 nRowWhichPairs[] =
     EE_ITEMS_START, EE_ITEMS_END,                   /*  3994 -  4037  
editeng/eeitem.hxx */
     SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO,    /* 10585 - 
10585  svx/svxids.hrc */
     SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, /* 11432       
   svx/svxids.hrc */
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING,
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING
+>::value);
 
-const sal_uInt16 nStatWhichPairs[]=
-{
+const WhichRangesContainer nStatWhichPairs(svl::Items<
     SCHATTR_STAT_START, SCHATTR_STAT_END,           //    45 -    52  
sch/schattr.hxx
-    SCHATTR_REGRESSION_START, SCHATTR_REGRESSION_END, // 108 -   109
-    0
-};
+    SCHATTR_REGRESSION_START, SCHATTR_REGRESSION_END // 108 -   109
+>::value);
 
-const sal_uInt16 nErrorBarWhichPairs[]=
-{
+const WhichRangesContainer nErrorBarWhichPairs(svl::Items<
     SCHATTR_STAT_START, SCHATTR_STAT_END,           //    45 -    52  
sch/schattr.hxx
-    XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
-    0
-};
+    XATTR_LINE_FIRST, XATTR_LINE_LAST              //  1000 -  1016  
svx/xdef.hxx
+>::value);
 
 // for CharacterProperties
 
-const sal_uInt16 nCharacterPropertyWhichPairs[] =
-{
+const WhichRangesContainer nCharacterPropertyWhichPairs(svl::Items<
     EE_ITEMS_START, EE_ITEMS_END,                             // Characters
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, // Characters
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
+>::value);
 
-const sal_uInt16 nLinePropertyWhichPairs[] =
-{
-    XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
-    0
-};
+const WhichRangesContainer nLinePropertyWhichPairs(svl::Items<
+    XATTR_LINE_FIRST, XATTR_LINE_LAST              //  1000 -  1016  
svx/xdef.hxx
+>::value);
 
-const sal_uInt16 nLineAndFillPropertyWhichPairs[] =
-{
+const WhichRangesContainer nLineAndFillPropertyWhichPairs(svl::Items<
     XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
     XATTR_FILL_FIRST, XATTR_FILL_LAST,              //  1000 -  1016  
svx/xdef.hxx
-    SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,      //  1067 -  1078  
svx/svddef.hxx
-    0
-};
+    SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST      //  1067 -  1078  
svx/svddef.hxx
+>::value);
 
-const sal_uInt16 nRegressionCurveWhichPairs[] =
-{
+const WhichRangesContainer nRegressionCurveWhichPairs(svl::Items<
     SCHATTR_REGRESSION_START, SCHATTR_REGRESSION_END, // 108 -   109
-    XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
-    0
-};
+    XATTR_LINE_FIRST, XATTR_LINE_LAST              //  1000 -  1016  
svx/xdef.hxx
+>::value);
 
-const sal_uInt16 nRegEquationWhichPairs[] =
-{
+const WhichRangesContainer nRegEquationWhichPairs(svl::Items<
     XATTR_LINE_FIRST, XATTR_LINE_LAST,              //  1000 -  1016  
svx/xdef.hxx
     XATTR_FILL_FIRST, XATTR_FILL_LAST,              //  1018 -  1046  
svx/xdef.hxx
     SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,      //  1067 -  1078  
svx/svddef.hxx
     EE_ITEMS_START, EE_ITEMS_END,                             // Characters
     SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,   // 10585 - 
10585  svx/svxids.hrc
-    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, // Characters
-    0
-};
+    SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING // Characters
+>::value);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 
a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index fc25407d1a58..60f225db577f 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -160,7 +160,7 @@ SeriesOptionsItemConverter::~SeriesOptionsItemConverter()
 {
 }
 
-const sal_uInt16 * SeriesOptionsItemConverter::GetWhichPairs() const
+const WhichRangesContainer& SeriesOptionsItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nSeriesOptionsWhichPairs;
diff --git 
a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index d9ec4ea1f534..1e736662ebdd 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -223,7 +223,7 @@ StatisticsItemConverter::~StatisticsItemConverter()
 {
 }
 
-const sal_uInt16 * StatisticsItemConverter::GetWhichPairs() const
+const WhichRangesContainer& StatisticsItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nStatWhichPairs;
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index f7849456d401..58780f44537e 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -241,7 +241,7 @@ bool TextLabelItemConverter::ApplyItemSet( const 
SfxItemSet& rItemSet )
     return ItemConverter::ApplyItemSet(rItemSet) || bResult;
 }
 
-const sal_uInt16* TextLabelItemConverter::GetWhichPairs() const
+const WhichRangesContainer& TextLabelItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nTextLabelWhichPairs;
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index 9109bc3ea3a1..95fa5147433f 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -55,7 +55,7 @@ public:
         const uno::Reference< beans::XPropertySet > & xParentProp );
 
 protected:
-    virtual const sal_uInt16 * GetWhichPairs() const override;
+    virtual const WhichRangesContainer& GetWhichPairs() const override;
 };
 
 } // anonymous namespace
@@ -83,7 +83,7 @@ FormattedStringsConverter::FormattedStringsConverter(
     }
 }
 
-const sal_uInt16 * FormattedStringsConverter::GetWhichPairs() const
+const WhichRangesContainer& FormattedStringsConverter::GetWhichPairs() const
 {
     return nCharacterPropertyWhichPairs;
 }
@@ -139,7 +139,7 @@ bool TitleItemConverter::ApplyItemSet( const SfxItemSet & 
rItemSet )
     return ItemConverter::ApplyItemSet( rItemSet ) || bResult;
 }
 
-const sal_uInt16 * TitleItemConverter::GetWhichPairs() const
+const WhichRangesContainer& TitleItemConverter::GetWhichPairs() const
 {
     // must span all used items!
     return nTitleWhichPairs;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to