[Libreoffice-commits] core.git: chart2/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Dec 20 09:16:14 UTC 2017


 chart2/source/controller/dialogs/res_DataLabel.cxx                     |    2 
 chart2/source/controller/dialogs/res_Trendline.cxx                     |    1 
 chart2/source/controller/dialogs/tp_PolarOptions.cxx                   |    2 
 chart2/source/controller/dialogs/tp_SeriesToAxis.cxx                   |    2 
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx          |   17 
 chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx      |    4 
 chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx              |    5 
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |    2 
 chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx    |   26 -
 chart2/source/inc/chartview/ChartSfxItemIds.hxx                        |  190 +++++-----
 10 files changed, 129 insertions(+), 122 deletions(-)

New commits:
commit 18c40a087f7846a2fc16e7dc6d8bb325d28e99b0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Dec 19 16:09:23 2017 +0200

    convert chart2 to TypedWhichId
    
    Change-Id: I1dc569d5a1667e3288fa64f16c22d39db130e906
    Reviewed-on: https://gerrit.libreoffice.org/46813
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index e7cc81283bab..25ea30bc51b4 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -161,7 +161,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window
 
     if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, true, &pPoolItem) == SfxItemState::SET )
     {
-        bool bForbidPercentValue = static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue();
+        bool bForbidPercentValue = rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE ).GetValue();
         if( bForbidPercentValue )
             m_pCBPercent->Enable(false);
     }
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 9ac6b1bb9414..67589fa8980c 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -23,6 +23,7 @@
 #include <bitmaps.hlst>
 #include <chartview/ChartSfxItemIds.hxx>
 
+#include <editeng/sizeitem.hxx>
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
 #include <sfx2/tabdlg.hxx>
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index b675531b7062..39b8b3d9a9a0 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -21,9 +21,11 @@
 #include <ResId.hxx>
 #include <chartview/ChartSfxItemIds.hxx>
 
+#include <editeng/sizeitem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
 #include <svtools/controldims.hxx>
+#include <svx/chrtitem.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index fac9c8bb2979..fa2590da00d1 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -22,10 +22,12 @@
 #include <ResId.hxx>
 #include <chartview/ChartSfxItemIds.hxx>
 
+#include <editeng/sizeitem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
 #include <svl/ilstitem.hxx>
 #include <svtools/controldims.hxx>
+#include <svx/chrtitem.hxx>
 
 #include <com/sun/star/chart/MissingValueTreatment.hpp>
 
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index eee760d7cf23..13c8c2246ab3 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -443,19 +443,19 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
 
 bool lcl_isDateAxis( const SfxItemSet & rItemSet )
 {
-    sal_Int32 nAxisType = static_cast< const SfxInt32Item & >( rItemSet.Get( SCHATTR_AXISTYPE )).GetValue();//css::chart2::AxisType
+    sal_Int32 nAxisType = rItemSet.Get( SCHATTR_AXISTYPE ).GetValue();//css::chart2::AxisType
     return (nAxisType == chart2::AxisType::DATE);
 }
 
 bool lcl_isAutoMajor( const SfxItemSet & rItemSet )
 {
-    bool bRet = static_cast< const SfxBoolItem & >( rItemSet.Get( SCHATTR_AXIS_AUTO_STEP_MAIN )).GetValue();
+    bool bRet = rItemSet.Get( SCHATTR_AXIS_AUTO_STEP_MAIN ).GetValue();
     return bRet;
 }
 
 bool lcl_isAutoMinor( const SfxItemSet & rItemSet )
 {
-    bool bRet = static_cast< const SfxBoolItem & >( rItemSet.Get( SCHATTR_AXIS_AUTO_STEP_HELP )).GetValue();
+    bool bRet = rItemSet.Get( SCHATTR_AXIS_AUTO_STEP_HELP ).GetValue();
     return bRet;
 }
 
@@ -484,8 +484,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
 
         case SCHATTR_AXIS_MAX:
             // only if auto if false
-            if( ! (static_cast< const SfxBoolItem & >(
-                       rItemSet.Get( SCHATTR_AXIS_AUTO_MAX )).GetValue() ))
+            if( ! (rItemSet.Get( SCHATTR_AXIS_AUTO_MAX ).GetValue() ))
             {
                 rItemSet.Get( nWhichId ).QueryValue( aValue );
 
@@ -508,8 +507,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
 
         case SCHATTR_AXIS_MIN:
             // only if auto if false
-            if( ! (static_cast< const SfxBoolItem & >(
-                       rItemSet.Get( SCHATTR_AXIS_AUTO_MIN )).GetValue() ))
+            if( ! (rItemSet.Get( SCHATTR_AXIS_AUTO_MIN ).GetValue() ))
             {
                 rItemSet.Get( nWhichId ).QueryValue( aValue );
 
@@ -677,7 +675,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
             break;
         case SCHATTR_AXIS_TIME_RESOLUTION:
             // only if auto is false
-            if( ! (static_cast< const SfxBoolItem & >( rItemSet.Get( SCHATTR_AXIS_AUTO_TIME_RESOLUTION )).GetValue() ))
+            if( ! ( rItemSet.Get( SCHATTR_AXIS_AUTO_TIME_RESOLUTION ).GetValue() ))
             {
                 rItemSet.Get( nWhichId ).QueryValue( aValue );
 
@@ -702,8 +700,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
         case SCHATTR_AXIS_ORIGIN:
         {
             // only if auto is false
-            if( ! (static_cast< const SfxBoolItem & >(
-                       rItemSet.Get( SCHATTR_AXIS_AUTO_ORIGIN )).GetValue() ))
+            if( ! (rItemSet.Get( SCHATTR_AXIS_AUTO_ORIGIN ).GetValue() ))
             {
                 rItemSet.Get( nWhichId ).QueryValue( aValue );
 
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index 9f2e2091df74..3c81e03bfa62 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -272,7 +272,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
         {
             // @todo: also be able to deal with x-error bars
             const bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
 
             uno::Reference< chart2::data::XDataSource > xErrorBarSource( GetPropertySet(), uno::UNO_QUERY );
             uno::Reference< chart2::XChartDocument > xChartDoc( m_xModel, uno::UNO_QUERY );
@@ -424,7 +424,7 @@ void ErrorBarItemConverter::FillSpecialItem(
         case SCHATTR_STAT_RANGE_NEG:
         {
             const bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
 
             uno::Reference< chart2::data::XDataSource > xErrorBarSource( GetPropertySet(), uno::UNO_QUERY );
             if( xErrorBarSource.is())
diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index b8c85f61c046..8ec702ff8813 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -19,10 +19,15 @@
 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_ITEMSETWRAPPER_SCHWHICHPAIRS_HXX
 #define INCLUDED_CHART2_SOURCE_CONTROLLER_ITEMSETWRAPPER_SCHWHICHPAIRS_HXX
 
+#include <svl/intitem.hxx>
+#include <svl/ilstitem.hxx>
 #include <svx/svxids.hrc>
 #include <svx/xdef.hxx>
 #include <svx/svddef.hxx>
+#include <svx/chrtitem.hxx>
+#include <editeng/brushitem.hxx>
 #include <editeng/eeitem.hxx>
+#include <editeng/sizeitem.hxx>
 
 #include <chartview/ChartSfxItemIds.hxx>
 
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index c12a5aa0eac5..1d9324e6bcb9 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -221,7 +221,7 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
                     {
                         if( xChartTypeProps->getPropertyValue( aPropName ) >>= aBarPositionSequence )
                         {
-                            bool bGroupBarsPerAxis =  static_cast< const SfxBoolItem & >(rItemSet.Get( SCHATTR_GROUP_BARS_PER_AXIS )).GetValue();
+                            bool bGroupBarsPerAxis =  rItemSet.Get( SCHATTR_GROUP_BARS_PER_AXIS ).GetValue();
                             if(!bGroupBarsPerAxis)
                             {
                                 //set the same value for all axes
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index 81b3abe3c803..0a1c5d678510 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -281,7 +281,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
         case SCHATTR_STAT_KIND_ERROR:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
 
             uno::Reference< beans::XPropertySet > xErrorBarProp(
                 lcl_GetErrorBar( GetPropertySet(), bYError ));
@@ -336,7 +336,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
         {
             OSL_FAIL( "Deprecated item" );
             bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
 
             uno::Reference< beans::XPropertySet > xErrorBarProp(
                 lcl_GetErrorBar( GetPropertySet(), bYError));
@@ -362,7 +362,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
         case SCHATTR_STAT_CONSTPLUS:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
 
             uno::Reference< beans::XPropertySet > xErrorBarProp(
                 lcl_GetErrorBar( GetPropertySet(),bYError));
@@ -386,7 +386,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
         case SCHATTR_STAT_CONSTMINUS:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp(
                 lcl_GetErrorBar( GetPropertySet(),bYError));
             bool bOldHasErrorBar = xErrorBarProp.is();
@@ -525,7 +525,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
         case SCHATTR_STAT_INDICATE:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp(
                 lcl_GetErrorBar( GetPropertySet(),bYError));
             bool bOldHasErrorBar = xErrorBarProp.is();
@@ -555,7 +555,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
         case SCHATTR_STAT_RANGE_NEG:
         {
             const bool bYError =
-                static_cast<const SfxBoolItem&>(rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< chart2::data::XDataSource > xErrorBarSource( lcl_GetErrorBar( GetPropertySet(), bYError),
                                                                          uno::UNO_QUERY );
             uno::Reference< chart2::XChartDocument > xChartDoc( m_xModel, uno::UNO_QUERY );
@@ -626,7 +626,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_KIND_ERROR:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             SvxChartKindError eErrorKind = SvxChartKindError::NONE;
             uno::Reference< beans::XPropertySet > xErrorBarProp(
                 lcl_GetErrorBar( GetPropertySet(), bYError));
@@ -663,7 +663,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_PERCENT:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp( lcl_GetErrorBar( GetPropertySet(),bYError));
             if( xErrorBarProp.is())
             {
@@ -677,7 +677,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_BIGERROR:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp( lcl_GetErrorBar( GetPropertySet(),bYError));
             if( xErrorBarProp.is())
             {
@@ -691,7 +691,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_CONSTPLUS:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp( lcl_GetErrorBar( GetPropertySet(),bYError));
             if( xErrorBarProp.is())
             {
@@ -705,7 +705,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_CONSTMINUS:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp( lcl_GetErrorBar( GetPropertySet(),bYError));
             if( xErrorBarProp.is())
             {
@@ -807,7 +807,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_INDICATE:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< beans::XPropertySet > xErrorBarProp( lcl_GetErrorBar( GetPropertySet(),bYError));
             SvxChartIndicate eIndicate = SvxChartIndicate::Both;
             if( xErrorBarProp.is())
@@ -838,7 +838,7 @@ void StatisticsItemConverter::FillSpecialItem(
         case SCHATTR_STAT_RANGE_NEG:
         {
             bool bYError =
-                static_cast<const SfxBoolItem&>(rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE)).GetValue();
+                rOutItemSet.Get(SCHATTR_STAT_ERRORBAR_TYPE).GetValue();
             uno::Reference< chart2::data::XDataSource > xErrorBarSource( lcl_GetErrorBar( GetPropertySet(),bYError),
                                                                          uno::UNO_QUERY );
             if( xErrorBarSource.is())
diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index f87fcd57df93..df7a72890fe4 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -25,43 +25,43 @@
 #define SCHATTR_START                       1
 
 #define SCHATTR_DATADESCR_START             SCHATTR_START
-#define SCHATTR_DATADESCR_SHOW_NUMBER       SCHATTR_DATADESCR_START
-#define SCHATTR_DATADESCR_SHOW_PERCENTAGE   (SCHATTR_DATADESCR_START + 1)
-#define SCHATTR_DATADESCR_SHOW_CATEGORY     (SCHATTR_DATADESCR_START + 2)
-#define SCHATTR_DATADESCR_SHOW_SYMBOL       (SCHATTR_DATADESCR_START + 3)
-#define SCHATTR_DATADESCR_WRAP_TEXT         (SCHATTR_DATADESCR_START + 4)
-#define SCHATTR_DATADESCR_SEPARATOR         (SCHATTR_DATADESCR_START + 5)
-#define SCHATTR_DATADESCR_PLACEMENT         (SCHATTR_DATADESCR_START + 6)
-#define SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS   (SCHATTR_DATADESCR_START + 7)
-#define SCHATTR_DATADESCR_NO_PERCENTVALUE   (SCHATTR_DATADESCR_START + 8) //percentage values should not be offered
-#define SCHATTR_PERCENT_NUMBERFORMAT_VALUE  (SCHATTR_DATADESCR_START + 9)
-#define SCHATTR_PERCENT_NUMBERFORMAT_SOURCE (SCHATTR_DATADESCR_START + 10)
+#define SCHATTR_DATADESCR_SHOW_NUMBER       TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START)
+#define SCHATTR_DATADESCR_SHOW_PERCENTAGE   TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START + 1)
+#define SCHATTR_DATADESCR_SHOW_CATEGORY     TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START + 2)
+#define SCHATTR_DATADESCR_SHOW_SYMBOL       TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START + 3)
+#define SCHATTR_DATADESCR_WRAP_TEXT         TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START + 4)
+#define SCHATTR_DATADESCR_SEPARATOR         TypedWhichId<SfxStringItem>(SCHATTR_DATADESCR_START + 5)
+#define SCHATTR_DATADESCR_PLACEMENT         TypedWhichId<SfxInt32Item>(SCHATTR_DATADESCR_START + 6)
+#define SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS   TypedWhichId<SfxIntegerListItem>(SCHATTR_DATADESCR_START + 7)
+#define SCHATTR_DATADESCR_NO_PERCENTVALUE   TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START + 8) //percentage values should not be offered
+#define SCHATTR_PERCENT_NUMBERFORMAT_VALUE  TypedWhichId<SfxUInt32Item>(SCHATTR_DATADESCR_START + 9)
+#define SCHATTR_PERCENT_NUMBERFORMAT_SOURCE TypedWhichId<SfxBoolItem>(SCHATTR_DATADESCR_START + 10)
 #define SCHATTR_DATADESCR_END               SCHATTR_PERCENT_NUMBERFORMAT_SOURCE
 
 //legend
 #define SCHATTR_LEGEND_START                (SCHATTR_DATADESCR_END + 1)
-#define SCHATTR_LEGEND_POS                  SCHATTR_LEGEND_START
-#define SCHATTR_LEGEND_SHOW                 (SCHATTR_LEGEND_START + 1)
+#define SCHATTR_LEGEND_POS                  TypedWhichId<SfxInt32Item>(SCHATTR_LEGEND_START)
+#define SCHATTR_LEGEND_SHOW                 TypedWhichId<SfxBoolItem>(SCHATTR_LEGEND_START + 1)
 #define SCHATTR_LEGEND_END                  SCHATTR_LEGEND_SHOW
 
 //text
 #define SCHATTR_TEXT_START                  (SCHATTR_LEGEND_END + 1)
-#define SCHATTR_TEXT_DEGREES                SCHATTR_TEXT_START
-#define SCHATTR_TEXT_STACKED                (SCHATTR_TEXT_START + 1)
+#define SCHATTR_TEXT_DEGREES                TypedWhichId<SfxInt32Item>(SCHATTR_TEXT_START)
+#define SCHATTR_TEXT_STACKED                TypedWhichId<SfxBoolItem>(SCHATTR_TEXT_START + 1)
 #define SCHATTR_TEXT_END                    SCHATTR_TEXT_STACKED
 
 // statistic
 #define SCHATTR_STAT_START                  (SCHATTR_TEXT_END + 1)
-#define SCHATTR_STAT_AVERAGE                SCHATTR_STAT_START
-#define SCHATTR_STAT_KIND_ERROR             (SCHATTR_STAT_START + 1)
-#define SCHATTR_STAT_PERCENT                (SCHATTR_STAT_START + 2)
-#define SCHATTR_STAT_BIGERROR               (SCHATTR_STAT_START + 3)
-#define SCHATTR_STAT_CONSTPLUS              (SCHATTR_STAT_START + 4)
-#define SCHATTR_STAT_CONSTMINUS             (SCHATTR_STAT_START + 5)
-#define SCHATTR_STAT_INDICATE               (SCHATTR_STAT_START + 6)
-#define SCHATTR_STAT_RANGE_POS              (SCHATTR_STAT_START + 7)
-#define SCHATTR_STAT_RANGE_NEG              (SCHATTR_STAT_START + 8)
-#define SCHATTR_STAT_ERRORBAR_TYPE          (SCHATTR_STAT_START + 9)
+#define SCHATTR_STAT_AVERAGE                TypedWhichId<SfxBoolItem>(SCHATTR_STAT_START)
+#define SCHATTR_STAT_KIND_ERROR             TypedWhichId<SvxChartKindErrorItem>(SCHATTR_STAT_START + 1)
+#define SCHATTR_STAT_PERCENT                TypedWhichId<SvxDoubleItem>(SCHATTR_STAT_START + 2)
+#define SCHATTR_STAT_BIGERROR               TypedWhichId<SvxDoubleItem>(SCHATTR_STAT_START + 3)
+#define SCHATTR_STAT_CONSTPLUS              TypedWhichId<SvxDoubleItem>(SCHATTR_STAT_START + 4)
+#define SCHATTR_STAT_CONSTMINUS             TypedWhichId<SvxDoubleItem>(SCHATTR_STAT_START + 5)
+#define SCHATTR_STAT_INDICATE               TypedWhichId<SvxChartIndicateItem>(SCHATTR_STAT_START + 6)
+#define SCHATTR_STAT_RANGE_POS              TypedWhichId<SfxStringItem>(SCHATTR_STAT_START + 7)
+#define SCHATTR_STAT_RANGE_NEG              TypedWhichId<SfxStringItem>(SCHATTR_STAT_START + 8)
+#define SCHATTR_STAT_ERRORBAR_TYPE          TypedWhichId<SfxBoolItem>(SCHATTR_STAT_START + 9)
 #define SCHATTR_STAT_END                    SCHATTR_STAT_ERRORBAR_TYPE
 
 // these attributes are for replacement of enum eChartStyle
@@ -69,107 +69,107 @@
 #define SCHATTR_STYLE_START             ( SCHATTR_STAT_END +1 )
 
 // for whole chart
-#define SCHATTR_STYLE_DEEP              ( SCHATTR_STYLE_START     )
-#define SCHATTR_STYLE_3D                ( SCHATTR_STYLE_START + 1 )
-#define SCHATTR_STYLE_VERTICAL          ( SCHATTR_STYLE_START + 2 )
+#define SCHATTR_STYLE_DEEP              TypedWhichId<SfxBoolItem>( SCHATTR_STYLE_START     )
+#define SCHATTR_STYLE_3D                TypedWhichId<SfxBoolItem>( SCHATTR_STYLE_START + 1 )
+#define SCHATTR_STYLE_VERTICAL          TypedWhichId<SfxBoolItem>( SCHATTR_STYLE_START + 2 )
 
 // also for series
-#define SCHATTR_STYLE_BASETYPE          ( SCHATTR_STYLE_START + 3 )// Line,Area,...,Pie
-#define SCHATTR_STYLE_LINES             ( SCHATTR_STYLE_START + 4 )// draw line
-#define SCHATTR_STYLE_PERCENT           ( SCHATTR_STYLE_START + 5 )
-#define SCHATTR_STYLE_STACKED           ( SCHATTR_STYLE_START + 6 )
-#define SCHATTR_STYLE_SPLINES           ( SCHATTR_STYLE_START + 7 )
+#define SCHATTR_STYLE_BASETYPE          TypedWhichId<SfxInt32Item>( SCHATTR_STYLE_START + 3 )// Line,Area,...,Pie
+#define SCHATTR_STYLE_LINES             TypedWhichId<SfxBoolItem>( SCHATTR_STYLE_START + 4 )// draw line
+#define SCHATTR_STYLE_PERCENT           TypedWhichId<SfxBoolItem>( SCHATTR_STYLE_START + 5 )
+#define SCHATTR_STYLE_STACKED           TypedWhichId<SfxBoolItem>( SCHATTR_STYLE_START + 6 )
+#define SCHATTR_STYLE_SPLINES           TypedWhichId<SfxInt32Item>( SCHATTR_STYLE_START + 7 )
 
 // also for data point
-#define SCHATTR_STYLE_SYMBOL            ( SCHATTR_STYLE_START + 8 )
-#define SCHATTR_STYLE_SHAPE             ( SCHATTR_STYLE_START + 9 )
+#define SCHATTR_STYLE_SYMBOL            TypedWhichId<SfxInt32Item>( SCHATTR_STYLE_START + 8 )
+#define SCHATTR_STYLE_SHAPE             TypedWhichId<SfxInt32Item>( SCHATTR_STYLE_START + 9 )
 #define SCHATTR_STYLE_END               ( SCHATTR_STYLE_SHAPE )
 
-#define SCHATTR_AXIS                    (SCHATTR_STYLE_END + 1)// see chtmodel.hxx defines CHART_AXIS_PRIMARY_X, etc.
+#define SCHATTR_AXIS                    TypedWhichId<SfxInt32Item>(SCHATTR_STYLE_END + 1)// see chtmodel.hxx defines CHART_AXIS_PRIMARY_X, etc.
 //Re-mapped:
 #define SCHATTR_AXIS_START              (SCHATTR_AXIS + 1)
 //axis scale
-#define SCHATTR_AXISTYPE                 SCHATTR_AXIS_START
-#define SCHATTR_AXIS_REVERSE            (SCHATTR_AXIS_START + 1)
-#define SCHATTR_AXIS_AUTO_MIN           (SCHATTR_AXIS_START + 2)
-#define SCHATTR_AXIS_MIN                (SCHATTR_AXIS_START + 3)
-#define SCHATTR_AXIS_AUTO_MAX           (SCHATTR_AXIS_START + 4)
-#define SCHATTR_AXIS_MAX                (SCHATTR_AXIS_START + 5)
-#define SCHATTR_AXIS_AUTO_STEP_MAIN     (SCHATTR_AXIS_START + 6)
-#define SCHATTR_AXIS_STEP_MAIN          (SCHATTR_AXIS_START + 7)
-#define SCHATTR_AXIS_MAIN_TIME_UNIT     (SCHATTR_AXIS_START + 8)
-#define SCHATTR_AXIS_AUTO_STEP_HELP     (SCHATTR_AXIS_START + 9)
-#define SCHATTR_AXIS_STEP_HELP          (SCHATTR_AXIS_START + 10)
-#define SCHATTR_AXIS_HELP_TIME_UNIT     (SCHATTR_AXIS_START + 11)
-#define SCHATTR_AXIS_AUTO_TIME_RESOLUTION   (SCHATTR_AXIS_START + 12)
-#define SCHATTR_AXIS_TIME_RESOLUTION    (SCHATTR_AXIS_START + 13)
-#define SCHATTR_AXIS_LOGARITHM          (SCHATTR_AXIS_START + 14)
-#define SCHATTR_AXIS_AUTO_DATEAXIS      (SCHATTR_AXIS_START + 15)
-#define SCHATTR_AXIS_ALLOW_DATEAXIS     (SCHATTR_AXIS_START + 16)
-#define SCHATTR_AXIS_AUTO_ORIGIN        (SCHATTR_AXIS_START + 17)
-#define SCHATTR_AXIS_ORIGIN             (SCHATTR_AXIS_START + 18)
+#define SCHATTR_AXISTYPE                TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_START)
+#define SCHATTR_AXIS_REVERSE            TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 1)
+#define SCHATTR_AXIS_AUTO_MIN           TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 2)
+#define SCHATTR_AXIS_MIN                TypedWhichId<SvxDoubleItem>(SCHATTR_AXIS_START + 3)
+#define SCHATTR_AXIS_AUTO_MAX           TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 4)
+#define SCHATTR_AXIS_MAX                TypedWhichId<SvxDoubleItem>(SCHATTR_AXIS_START + 5)
+#define SCHATTR_AXIS_AUTO_STEP_MAIN     TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 6)
+#define SCHATTR_AXIS_STEP_MAIN          TypedWhichId<SvxDoubleItem>(SCHATTR_AXIS_START + 7)
+#define SCHATTR_AXIS_MAIN_TIME_UNIT     TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_START + 8)
+#define SCHATTR_AXIS_AUTO_STEP_HELP     TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 9)
+#define SCHATTR_AXIS_STEP_HELP          TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_START + 10)
+#define SCHATTR_AXIS_HELP_TIME_UNIT     TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_START + 11)
+#define SCHATTR_AXIS_AUTO_TIME_RESOLUTION   TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 12)
+#define SCHATTR_AXIS_TIME_RESOLUTION    TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_START + 13)
+#define SCHATTR_AXIS_LOGARITHM          TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 14)
+#define SCHATTR_AXIS_AUTO_DATEAXIS      TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 15)
+#define SCHATTR_AXIS_ALLOW_DATEAXIS     TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 16)
+#define SCHATTR_AXIS_AUTO_ORIGIN        TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_START + 17)
+#define SCHATTR_AXIS_ORIGIN             TypedWhichId<SvxDoubleItem>(SCHATTR_AXIS_START + 18)
 //axis position
 #define SCHATTR_AXIS_POSITION_START     (SCHATTR_AXIS_ORIGIN +1)
-#define SCHATTR_AXIS_TICKS              SCHATTR_AXIS_POSITION_START
-#define SCHATTR_AXIS_HELPTICKS          (SCHATTR_AXIS_POSITION_START + 1)
-#define SCHATTR_AXIS_POSITION           (SCHATTR_AXIS_POSITION_START + 2)
-#define SCHATTR_AXIS_POSITION_VALUE     (SCHATTR_AXIS_POSITION_START + 3)
-#define SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT    (SCHATTR_AXIS_POSITION_START + 4)
-#define SCHATTR_AXIS_LABEL_POSITION     (SCHATTR_AXIS_POSITION_START + 5)
-#define SCHATTR_AXIS_MARK_POSITION      (SCHATTR_AXIS_POSITION_START + 6)
+#define SCHATTR_AXIS_TICKS              TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_POSITION_START)
+#define SCHATTR_AXIS_HELPTICKS          TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_POSITION_START + 1)
+#define SCHATTR_AXIS_POSITION           TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_POSITION_START + 2)
+#define SCHATTR_AXIS_POSITION_VALUE     TypedWhichId<SvxDoubleItem>(SCHATTR_AXIS_POSITION_START + 3)
+#define SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT    TypedWhichId<SfxUInt32Item>(SCHATTR_AXIS_POSITION_START + 4)
+#define SCHATTR_AXIS_LABEL_POSITION     TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_POSITION_START + 5)
+#define SCHATTR_AXIS_MARK_POSITION      TypedWhichId<SfxInt32Item>(SCHATTR_AXIS_POSITION_START + 6)
 //axis label
 #define SCHATTR_AXIS_LABEL_START        (SCHATTR_AXIS_MARK_POSITION +1)
-#define SCHATTR_AXIS_SHOWDESCR          SCHATTR_AXIS_LABEL_START
-#define SCHATTR_AXIS_LABEL_ORDER        (SCHATTR_AXIS_LABEL_START + 1)
-#define SCHATTR_AXIS_LABEL_OVERLAP      (SCHATTR_AXIS_LABEL_START + 2)
-#define SCHATTR_AXIS_LABEL_BREAK        (SCHATTR_AXIS_LABEL_START + 3)
+#define SCHATTR_AXIS_SHOWDESCR          TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_LABEL_START)
+#define SCHATTR_AXIS_LABEL_ORDER        TypedWhichId<SvxChartTextOrderItem>(SCHATTR_AXIS_LABEL_START + 1)
+#define SCHATTR_AXIS_LABEL_OVERLAP      TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_LABEL_START + 2)
+#define SCHATTR_AXIS_LABEL_BREAK        TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_LABEL_START + 3)
 #define SCHATTR_AXIS_LABEL_END          SCHATTR_AXIS_LABEL_BREAK
 
 #define SCHATTR_AXIS_END                SCHATTR_AXIS_LABEL_END
 
-#define SCHATTR_SYMBOL_BRUSH            (SCHATTR_AXIS_END + 1)
-#define SCHATTR_STOCK_VOLUME            (SCHATTR_AXIS_END + 2)
-#define SCHATTR_STOCK_UPDOWN            (SCHATTR_AXIS_END + 3)
-#define SCHATTR_SYMBOL_SIZE             (SCHATTR_AXIS_END + 4)
+#define SCHATTR_SYMBOL_BRUSH            TypedWhichId<SvxBrushItem>(SCHATTR_AXIS_END + 1)
+#define SCHATTR_STOCK_VOLUME            TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_END + 2)
+#define SCHATTR_STOCK_UPDOWN            TypedWhichId<SfxBoolItem>(SCHATTR_AXIS_END + 3)
+#define SCHATTR_SYMBOL_SIZE             TypedWhichId<SvxSizeItem>(SCHATTR_AXIS_END + 4)
 
 // non persistent items (binary format)
 #define SCHATTR_CHARTTYPE_START         (SCHATTR_SYMBOL_SIZE + 1)
 
 // new from New Chart
-#define SCHATTR_BAR_OVERLAP             (SCHATTR_CHARTTYPE_START )
-#define SCHATTR_BAR_GAPWIDTH            (SCHATTR_CHARTTYPE_START + 1)
-#define SCHATTR_BAR_CONNECT             (SCHATTR_CHARTTYPE_START + 2)
-#define SCHATTR_NUM_OF_LINES_FOR_BAR    (SCHATTR_CHARTTYPE_START + 3)
-#define SCHATTR_SPLINE_ORDER            (SCHATTR_CHARTTYPE_START + 4)
-#define SCHATTR_SPLINE_RESOLUTION       (SCHATTR_CHARTTYPE_START + 5)
-#define SCHATTR_GROUP_BARS_PER_AXIS     (SCHATTR_CHARTTYPE_START + 6)
-#define SCHATTR_STARTING_ANGLE          (SCHATTR_CHARTTYPE_START + 7)
-#define SCHATTR_CLOCKWISE               (SCHATTR_CHARTTYPE_START + 8)
-#define SCHATTR_MISSING_VALUE_TREATMENT     (SCHATTR_CHARTTYPE_START + 9)
-#define SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS (SCHATTR_CHARTTYPE_START + 10)
-#define SCHATTR_INCLUDE_HIDDEN_CELLS    (SCHATTR_CHARTTYPE_START + 11)
+#define SCHATTR_BAR_OVERLAP             TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START )
+#define SCHATTR_BAR_GAPWIDTH            TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START + 1)
+#define SCHATTR_BAR_CONNECT             TypedWhichId<SfxBoolItem>(SCHATTR_CHARTTYPE_START + 2)
+#define SCHATTR_NUM_OF_LINES_FOR_BAR    TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START + 3)
+#define SCHATTR_SPLINE_ORDER            TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START + 4)
+#define SCHATTR_SPLINE_RESOLUTION       TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START + 5)
+#define SCHATTR_GROUP_BARS_PER_AXIS     TypedWhichId<SfxBoolItem>(SCHATTR_CHARTTYPE_START + 6)
+#define SCHATTR_STARTING_ANGLE          TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START + 7)
+#define SCHATTR_CLOCKWISE               TypedWhichId<SfxBoolItem>(SCHATTR_CHARTTYPE_START + 8)
+#define SCHATTR_MISSING_VALUE_TREATMENT     TypedWhichId<SfxInt32Item>(SCHATTR_CHARTTYPE_START + 9)
+#define SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS TypedWhichId<SfxIntegerListItem>(SCHATTR_CHARTTYPE_START + 10)
+#define SCHATTR_INCLUDE_HIDDEN_CELLS    TypedWhichId<SfxBoolItem>(SCHATTR_CHARTTYPE_START + 11)
 
 #define SCHATTR_CHARTTYPE_END           SCHATTR_INCLUDE_HIDDEN_CELLS
 
 // items for transporting information to dialogs
 #define SCHATTR_MISC_START              (SCHATTR_CHARTTYPE_END + 1)
-#define SCHATTR_AXIS_FOR_ALL_SERIES     (SCHATTR_MISC_START)
+#define SCHATTR_AXIS_FOR_ALL_SERIES     TypedWhichId<SfxInt32Item>(SCHATTR_MISC_START)
 #define SCHATTR_MISC_END                 SCHATTR_AXIS_FOR_ALL_SERIES
 
 // regression curve
 #define SCHATTR_REGRESSION_START                (SCHATTR_MISC_END + 1)
-#define SCHATTR_REGRESSION_TYPE                  SCHATTR_REGRESSION_START
-#define SCHATTR_REGRESSION_SHOW_EQUATION        (SCHATTR_REGRESSION_START + 1)
-#define SCHATTR_REGRESSION_SHOW_COEFF           (SCHATTR_REGRESSION_START + 2)
-#define SCHATTR_REGRESSION_DEGREE               (SCHATTR_REGRESSION_START + 3)
-#define SCHATTR_REGRESSION_PERIOD               (SCHATTR_REGRESSION_START + 4)
-#define SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD  (SCHATTR_REGRESSION_START + 5)
-#define SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD (SCHATTR_REGRESSION_START + 6)
-#define SCHATTR_REGRESSION_SET_INTERCEPT        (SCHATTR_REGRESSION_START + 7)
-#define SCHATTR_REGRESSION_INTERCEPT_VALUE      (SCHATTR_REGRESSION_START + 8)
-#define SCHATTR_REGRESSION_CURVE_NAME           (SCHATTR_REGRESSION_START + 9)
-#define SCHATTR_REGRESSION_XNAME                (SCHATTR_REGRESSION_START + 10)
-#define SCHATTR_REGRESSION_YNAME                (SCHATTR_REGRESSION_START + 11)
+#define SCHATTR_REGRESSION_TYPE                 TypedWhichId<SvxChartRegressItem>(SCHATTR_REGRESSION_START)
+#define SCHATTR_REGRESSION_SHOW_EQUATION        TypedWhichId<SfxBoolItem>(SCHATTR_REGRESSION_START + 1)
+#define SCHATTR_REGRESSION_SHOW_COEFF           TypedWhichId<SfxBoolItem>(SCHATTR_REGRESSION_START + 2)
+#define SCHATTR_REGRESSION_DEGREE               TypedWhichId<SfxInt32Item>(SCHATTR_REGRESSION_START + 3)
+#define SCHATTR_REGRESSION_PERIOD               TypedWhichId<SfxInt32Item>(SCHATTR_REGRESSION_START + 4)
+#define SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD  TypedWhichId<SvxDoubleItem>(SCHATTR_REGRESSION_START + 5)
+#define SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD TypedWhichId<SvxDoubleItem>(SCHATTR_REGRESSION_START + 6)
+#define SCHATTR_REGRESSION_SET_INTERCEPT        TypedWhichId<SfxBoolItem>(SCHATTR_REGRESSION_START + 7)
+#define SCHATTR_REGRESSION_INTERCEPT_VALUE      TypedWhichId<SvxDoubleItem>(SCHATTR_REGRESSION_START + 8)
+#define SCHATTR_REGRESSION_CURVE_NAME           TypedWhichId<SfxStringItem>(SCHATTR_REGRESSION_START + 9)
+#define SCHATTR_REGRESSION_XNAME                TypedWhichId<SfxStringItem>(SCHATTR_REGRESSION_START + 10)
+#define SCHATTR_REGRESSION_YNAME                TypedWhichId<SfxStringItem>(SCHATTR_REGRESSION_START + 11)
 #define SCHATTR_REGRESSION_END                   SCHATTR_REGRESSION_YNAME
 
 #define SCHATTR_END                     SCHATTR_REGRESSION_END


More information about the Libreoffice-commits mailing list