chart2/inc/pch/precompiled_chartcontroller.hxx | 1 chart2/inc/pch/precompiled_chartcore.hxx | 1 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx | 1 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx | 1 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 51 - chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 1 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 30 chart2/source/controller/chartapiwrapper/GridWrapper.cxx | 1 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx | 1 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx | 1 chart2/source/controller/dialogs/ChartTypeDialogController.cxx | 171 ++--- chart2/source/controller/dialogs/ChartTypeDialogController.hxx | 7 chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx | 7 chart2/source/controller/inc/ItemPropertyMap.hxx | 8 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 19 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx | 34 - chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 7 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx | 84 +- chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx | 15 chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx | 7 chart2/source/controller/main/ChartController_Window.cxx | 1 chart2/source/model/main/ChartModel.cxx | 20 chart2/source/model/template/ChartTypeManager.cxx | 143 ++-- chart2/source/tools/ObjectIdentifier.cxx | 25 chart2/source/view/inc/PropertyMapper.hxx | 24 chart2/source/view/main/OpenGLRender.cxx | 1 chart2/source/view/main/OpenglShapeFactory.cxx | 6 chart2/source/view/main/PropertyMapper.cxx | 315 +++++----- chart2/source/view/main/ShapeFactory.cxx | 6 include/comphelper/InlineContainer.hxx | 65 -- xmloff/source/chart/SchXMLTools.cxx | 63 -- 31 files changed, 490 insertions(+), 627 deletions(-)
New commits: commit a82805f8f97eeb6acadd7806cdb7120bed45a376 Author: Stephan Bergmann <sberg...@redhat.com> Date: Sun Apr 24 20:11:47 2016 +0200 Kill comphelper::MakeMap Change-Id: I97e9e79ef51e3d78f01b831dd3eee91218058823 Reviewed-on: https://gerrit.libreoffice.org/24344 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index 7aa7fdd..b74e19a 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -309,7 +309,6 @@ #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/view/PrintableState.hpp> -#include <comphelper/InlineContainer.hxx> #include <comphelper/broadcasthelper.hxx> #include <comphelper/comphelperdllapi.h> #include <comphelper/fileformat.h> diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx index 4c7b206..8d02451 100644 --- a/chart2/inc/pch/precompiled_chartcore.hxx +++ b/chart2/inc/pch/precompiled_chartcore.hxx @@ -159,7 +159,6 @@ #include <com/sun/star/uno/Type.hxx> #include <com/sun/star/util/NumberFormat.hpp> #include <com/sun/star/util/XCloneable.hpp> -#include <comphelper/InlineContainer.hxx> #include <comphelper/comphelperdllapi.h> #include <comphelper/fileformat.h> #include <comphelper/processfactory.hxx> diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx index b66e2cf..58b0eb2 100644 --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -22,7 +22,6 @@ #include "ContainerHelper.hxx" #include "Chart2ModelContact.hxx" #include "WrappedDirectStateProperty.hxx" -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/drawing/FillStyle.hpp> #include <cppuhelper/supportsservice.hxx> diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index ae1bc5b..5ed3cce 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -30,7 +30,6 @@ #include <unonames.hxx> #include <cppuhelper/supportsservice.hxx> -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp> #include <com/sun/star/chart/ChartAxisPosition.hpp> diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 82b6c9c..3ad6522 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -51,7 +51,6 @@ #include <com/sun/star/chart2/XTitled.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> #include <com/sun/star/chart/ChartDataRowSource.hpp> -#include <comphelper/InlineContainer.hxx> #include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -66,6 +65,7 @@ #include <vector> #include <algorithm> #include <functional> +#include <map> #include <o3tl/functional.hxx> using namespace ::com::sun::star; @@ -106,35 +106,32 @@ enum eServiceType }; typedef ::std::map< OUString, enum eServiceType > tServiceNameMap; -typedef ::comphelper::MakeMap< OUString, enum eServiceType > tMakeServiceNameMap; tServiceNameMap & lcl_getStaticServiceNameMap() { - static tServiceNameMap aServiceNameMap( - tMakeServiceNameMap - ( "com.sun.star.chart.AreaDiagram", SERVICE_NAME_AREA_DIAGRAM ) - ( "com.sun.star.chart.BarDiagram", SERVICE_NAME_BAR_DIAGRAM ) - ( "com.sun.star.chart.DonutDiagram", SERVICE_NAME_DONUT_DIAGRAM ) - ( "com.sun.star.chart.LineDiagram", SERVICE_NAME_LINE_DIAGRAM ) - ( "com.sun.star.chart.NetDiagram", SERVICE_NAME_NET_DIAGRAM ) - ( "com.sun.star.chart.FilledNetDiagram", SERVICE_NAME_FILLED_NET_DIAGRAM ) - ( "com.sun.star.chart.PieDiagram", SERVICE_NAME_PIE_DIAGRAM ) - ( "com.sun.star.chart.StockDiagram", SERVICE_NAME_STOCK_DIAGRAM ) - ( "com.sun.star.chart.XYDiagram", SERVICE_NAME_XY_DIAGRAM ) - ( "com.sun.star.chart.BubbleDiagram", SERVICE_NAME_BUBBLE_DIAGRAM ) - ( "com.sun.star.chart.GL3DBarDiagram", SERVICE_NAME_GL3DBAR_DIAGRAM ) - - ( "com.sun.star.drawing.DashTable", SERVICE_NAME_DASH_TABLE ) - ( "com.sun.star.drawing.GradientTable", SERVICE_NAME_GARDIENT_TABLE ) - ( "com.sun.star.drawing.HatchTable", SERVICE_NAME_HATCH_TABLE ) - ( "com.sun.star.drawing.BitmapTable", SERVICE_NAME_BITMAP_TABLE ) - ( "com.sun.star.drawing.TransparencyGradientTable", SERVICE_NAME_TRANSP_GRADIENT_TABLE ) - ( "com.sun.star.drawing.MarkerTable", SERVICE_NAME_MARKER_TABLE ) - - ( "com.sun.star.xml.NamespaceMap", SERVICE_NAME_NAMESPACE_MAP ) - ( "com.sun.star.document.ExportGraphicObjectResolver", SERVICE_NAME_EXPORT_GRAPHIC_RESOLVER ) - ( "com.sun.star.document.ImportGraphicObjectResolver", SERVICE_NAME_IMPORT_GRAPHIC_RESOLVER ) - ); + static tServiceNameMap aServiceNameMap{ + {"com.sun.star.chart.AreaDiagram", SERVICE_NAME_AREA_DIAGRAM}, + {"com.sun.star.chart.BarDiagram", SERVICE_NAME_BAR_DIAGRAM}, + {"com.sun.star.chart.DonutDiagram", SERVICE_NAME_DONUT_DIAGRAM}, + {"com.sun.star.chart.LineDiagram", SERVICE_NAME_LINE_DIAGRAM}, + {"com.sun.star.chart.NetDiagram", SERVICE_NAME_NET_DIAGRAM}, + {"com.sun.star.chart.FilledNetDiagram", SERVICE_NAME_FILLED_NET_DIAGRAM}, + {"com.sun.star.chart.PieDiagram", SERVICE_NAME_PIE_DIAGRAM}, + {"com.sun.star.chart.StockDiagram", SERVICE_NAME_STOCK_DIAGRAM}, + {"com.sun.star.chart.XYDiagram", SERVICE_NAME_XY_DIAGRAM}, + {"com.sun.star.chart.BubbleDiagram", SERVICE_NAME_BUBBLE_DIAGRAM}, + {"com.sun.star.chart.GL3DBarDiagram", SERVICE_NAME_GL3DBAR_DIAGRAM}, + + {"com.sun.star.drawing.DashTable", SERVICE_NAME_DASH_TABLE}, + {"com.sun.star.drawing.GradientTable", SERVICE_NAME_GARDIENT_TABLE}, + {"com.sun.star.drawing.HatchTable", SERVICE_NAME_HATCH_TABLE}, + {"com.sun.star.drawing.BitmapTable", SERVICE_NAME_BITMAP_TABLE}, + {"com.sun.star.drawing.TransparencyGradientTable", SERVICE_NAME_TRANSP_GRADIENT_TABLE}, + {"com.sun.star.drawing.MarkerTable", SERVICE_NAME_MARKER_TABLE}, + + {"com.sun.star.xml.NamespaceMap", SERVICE_NAME_NAMESPACE_MAP}, + {"com.sun.star.document.ExportGraphicObjectResolver", SERVICE_NAME_EXPORT_GRAPHIC_RESOLVER}, + {"com.sun.star.document.ImportGraphicObjectResolver", SERVICE_NAME_IMPORT_GRAPHIC_RESOLVER}}; return aServiceNameMap; } diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index d8805ea..21e54a5 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -45,7 +45,6 @@ #include <rtl/math.hxx> #include <algorithm> -#include <comphelper/InlineContainer.hxx> #include <cppuhelper/supportsservice.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/chart/ChartAxisAssign.hpp> diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 21eb43f..9ffd2e8 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -45,7 +45,6 @@ #include "ControllerLockGuard.hxx" #include "ModifyListenerHelper.hxx" #include "DisposeHelper.hxx" -#include <comphelper/InlineContainer.hxx> #include "WrappedAutomaticPositionProperties.hxx" #include "CommonConverters.hxx" #include <unonames.hxx> @@ -64,6 +63,7 @@ #include "SceneProperties.hxx" #include <algorithm> +#include <map> #include <rtl/ustrbuf.hxx> #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/util/XRefreshable.hpp> @@ -589,24 +589,22 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) return OUString(); } -typedef ::comphelper::MakeMap< OUString, OUString > tMakeStringStringMap; +typedef std::map< OUString, OUString > tMakeStringStringMap; const tMakeStringStringMap& lcl_getChartTypeNameMap() { - static tMakeStringStringMap g_aChartTypeNameMap = - tMakeStringStringMap - ( "com.sun.star.chart2.LineChartType", "com.sun.star.chart.LineDiagram" ) - ( "com.sun.star.chart2.AreaChartType", "com.sun.star.chart.AreaDiagram" ) - ( "com.sun.star.chart2.ColumnChartType", "com.sun.star.chart.BarDiagram" ) - ( "com.sun.star.chart2.PieChartType", "com.sun.star.chart.PieDiagram" ) - ( "com.sun.star.chart2.DonutChartType", "com.sun.star.chart.DonutDiagram" ) - ( "com.sun.star.chart2.ScatterChartType", "com.sun.star.chart.XYDiagram" ) - ( "com.sun.star.chart2.FilledNetChartType", "com.sun.star.chart.FilledNetDiagram" ) - ( "com.sun.star.chart2.NetChartType", "com.sun.star.chart.NetDiagram" ) - ( "com.sun.star.chart2.CandleStickChartType", "com.sun.star.chart.StockDiagram" ) - ( "com.sun.star.chart2.BubbleChartType", "com.sun.star.chart.BubbleDiagram" ) - ( "com.sun.star.chart2.GL3DBarChartType", "com.sun.star.chart.GL3DBarDiagram" ) - ; + static tMakeStringStringMap g_aChartTypeNameMap{ + {"com.sun.star.chart2.LineChartType", "com.sun.star.chart.LineDiagram"}, + {"com.sun.star.chart2.AreaChartType", "com.sun.star.chart.AreaDiagram"}, + {"com.sun.star.chart2.ColumnChartType", "com.sun.star.chart.BarDiagram"}, + {"com.sun.star.chart2.PieChartType", "com.sun.star.chart.PieDiagram"}, + {"com.sun.star.chart2.DonutChartType", "com.sun.star.chart.DonutDiagram"}, + {"com.sun.star.chart2.ScatterChartType", "com.sun.star.chart.XYDiagram"}, + {"com.sun.star.chart2.FilledNetChartType", "com.sun.star.chart.FilledNetDiagram"}, + {"com.sun.star.chart2.NetChartType", "com.sun.star.chart.NetDiagram"}, + {"com.sun.star.chart2.CandleStickChartType", "com.sun.star.chart.StockDiagram"}, + {"com.sun.star.chart2.BubbleChartType", "com.sun.star.chart.BubbleDiagram"}, + {"com.sun.star.chart2.GL3DBarChartType", "com.sun.star.chart.GL3DBarDiagram"}}; return g_aChartTypeNameMap; } diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx index 45ad726..c72d95f 100644 --- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx @@ -23,7 +23,6 @@ #include "Chart2ModelContact.hxx" #include "ContainerHelper.hxx" #include "AxisIndexDefines.hxx" -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include "LinePropertiesHelper.hxx" diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index ef0768a..eebcf9b 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -22,7 +22,6 @@ #include "Chart2ModelContact.hxx" #include "LegendHelper.hxx" #include "ContainerHelper.hxx" -#include <comphelper/InlineContainer.hxx> #include <cppuhelper/supportsservice.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/chart2/XTitled.hpp> diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index f2c46f5..a06080d 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -22,7 +22,6 @@ #include "ContainerHelper.hxx" #include "ControllerLockGuard.hxx" -#include <comphelper/InlineContainer.hxx> #include <cppuhelper/supportsservice.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 6b58614..3059988 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -448,16 +448,14 @@ Image ColumnChartDialogController::getImage() } const tTemplateServiceChartTypeParameterMap& ColumnChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.Column" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE) ) - ( "com.sun.star.chart2.template.StackedColumn" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) ) - ( "com.sun.star.chart2.template.PercentStackedColumn" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT) ) - ( "com.sun.star.chart2.template.ThreeDColumnFlat" , ChartTypeParameter(1,false,true,GlobalStackMode_NONE) ) - ( "com.sun.star.chart2.template.StackedThreeDColumnFlat" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y) ) - ( "com.sun.star.chart2.template.PercentStackedThreeDColumnFlat" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT) ) - ( "com.sun.star.chart2.template.ThreeDColumnDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.Column" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE)}, + {"com.sun.star.chart2.template.StackedColumn" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)}, + {"com.sun.star.chart2.template.PercentStackedColumn" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT)}, + {"com.sun.star.chart2.template.ThreeDColumnFlat" , ChartTypeParameter(1,false,true,GlobalStackMode_NONE)}, + {"com.sun.star.chart2.template.StackedThreeDColumnFlat" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y)}, + {"com.sun.star.chart2.template.PercentStackedThreeDColumnFlat" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT)}, + {"com.sun.star.chart2.template.ThreeDColumnDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}}; return s_aTemplateMap; } void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -523,16 +521,14 @@ Image BarChartDialogController::getImage() } const tTemplateServiceChartTypeParameterMap& BarChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.Bar" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE) ) - ( "com.sun.star.chart2.template.StackedBar" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) ) - ( "com.sun.star.chart2.template.PercentStackedBar" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT) ) - ( "com.sun.star.chart2.template.ThreeDBarFlat" , ChartTypeParameter(1,false,true,GlobalStackMode_NONE) ) - ( "com.sun.star.chart2.template.StackedThreeDBarFlat" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y) ) - ( "com.sun.star.chart2.template.PercentStackedThreeDBarFlat" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT) ) - ( "com.sun.star.chart2.template.ThreeDBarDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.Bar" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE)}, + {"com.sun.star.chart2.template.StackedBar" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)}, + {"com.sun.star.chart2.template.PercentStackedBar" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT)}, + {"com.sun.star.chart2.template.ThreeDBarFlat" , ChartTypeParameter(1,false,true,GlobalStackMode_NONE)}, + {"com.sun.star.chart2.template.StackedThreeDBarFlat" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y)}, + {"com.sun.star.chart2.template.PercentStackedThreeDBarFlat" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT)}, + {"com.sun.star.chart2.template.ThreeDBarDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}}; return s_aTemplateMap; } void BarChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -597,17 +593,15 @@ Image PieChartDialogController::getImage() } const tTemplateServiceChartTypeParameterMap& PieChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.Pie" , ChartTypeParameter(1,false,false) ) - ( "com.sun.star.chart2.template.PieAllExploded" , ChartTypeParameter(2,false,false) ) - ( "com.sun.star.chart2.template.Donut" , ChartTypeParameter(3,false,false) ) - ( "com.sun.star.chart2.template.DonutAllExploded" , ChartTypeParameter(4,false,false) ) - ( "com.sun.star.chart2.template.ThreeDPie" , ChartTypeParameter(1,false,true) ) - ( "com.sun.star.chart2.template.ThreeDPieAllExploded" , ChartTypeParameter(2,false,true) ) - ( "com.sun.star.chart2.template.ThreeDDonut" , ChartTypeParameter(3,false,true) ) - ( "com.sun.star.chart2.template.ThreeDDonutAllExploded" , ChartTypeParameter(4,false,true) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.Pie" , ChartTypeParameter(1,false,false)}, + {"com.sun.star.chart2.template.PieAllExploded" , ChartTypeParameter(2,false,false)}, + {"com.sun.star.chart2.template.Donut" , ChartTypeParameter(3,false,false)}, + {"com.sun.star.chart2.template.DonutAllExploded" , ChartTypeParameter(4,false,false)}, + {"com.sun.star.chart2.template.ThreeDPie" , ChartTypeParameter(1,false,true)}, + {"com.sun.star.chart2.template.ThreeDPieAllExploded" , ChartTypeParameter(2,false,true)}, + {"com.sun.star.chart2.template.ThreeDDonut" , ChartTypeParameter(3,false,true)}, + {"com.sun.star.chart2.template.ThreeDDonutAllExploded" , ChartTypeParameter(4,false,true)}}; return s_aTemplateMap; } void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -659,21 +653,19 @@ Image LineChartDialogController::getImage() } const tTemplateServiceChartTypeParameterMap& LineChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.Symbol" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false) ) - ( "com.sun.star.chart2.template.StackedSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false) ) - ( "com.sun.star.chart2.template.PercentStackedSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false) ) - ( "com.sun.star.chart2.template.LineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true) ) - ( "com.sun.star.chart2.template.StackedLineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true) ) - ( "com.sun.star.chart2.template.PercentStackedLineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true) ) - ( "com.sun.star.chart2.template.Line" , ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true) ) - ( "com.sun.star.chart2.template.StackedLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true) ) - ( "com.sun.star.chart2.template.PercentStackedLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true) ) - ( "com.sun.star.chart2.template.StackedThreeDLine" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y,false,true) ) - ( "com.sun.star.chart2.template.PercentStackedThreeDLine" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y_PERCENT,false,true) ) - ( "com.sun.star.chart2.template.ThreeDLineDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.Symbol" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false)}, + {"com.sun.star.chart2.template.StackedSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false)}, + {"com.sun.star.chart2.template.PercentStackedSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false)}, + {"com.sun.star.chart2.template.LineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true)}, + {"com.sun.star.chart2.template.StackedLineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true)}, + {"com.sun.star.chart2.template.PercentStackedLineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true)}, + {"com.sun.star.chart2.template.Line" , ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true)}, + {"com.sun.star.chart2.template.StackedLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true)}, + {"com.sun.star.chart2.template.PercentStackedLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true)}, + {"com.sun.star.chart2.template.StackedThreeDLine" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y,false,true)}, + {"com.sun.star.chart2.template.PercentStackedThreeDLine" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y_PERCENT,false,true)}, + {"com.sun.star.chart2.template.ThreeDLineDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true)}}; return s_aTemplateMap; } void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -807,13 +799,11 @@ Image XYChartDialogController::getImage() } const tTemplateServiceChartTypeParameterMap& XYChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.ScatterSymbol" , ChartTypeParameter(1,true,false,GlobalStackMode_NONE,true,false) ) - ( "com.sun.star.chart2.template.ScatterLineSymbol" , ChartTypeParameter(2,true,false,GlobalStackMode_NONE,true,true) ) - ( "com.sun.star.chart2.template.ScatterLine" , ChartTypeParameter(3,true,false,GlobalStackMode_NONE,false,true) ) - ( "com.sun.star.chart2.template.ThreeDScatter" , ChartTypeParameter(4,true,true,GlobalStackMode_NONE,false,true) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.ScatterSymbol" , ChartTypeParameter(1,true,false,GlobalStackMode_NONE,true,false)}, + {"com.sun.star.chart2.template.ScatterLineSymbol" , ChartTypeParameter(2,true,false,GlobalStackMode_NONE,true,true)}, + {"com.sun.star.chart2.template.ScatterLine" , ChartTypeParameter(3,true,false,GlobalStackMode_NONE,false,true)}, + {"com.sun.star.chart2.template.ThreeDScatter" , ChartTypeParameter(4,true,true,GlobalStackMode_NONE,false,true)}}; return s_aTemplateMap; } void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -910,15 +900,13 @@ bool AreaChartDialogController::shouldShow_3DLookControl() const } const tTemplateServiceChartTypeParameterMap& AreaChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.Area" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE) ) - ( "com.sun.star.chart2.template.ThreeDArea" , ChartTypeParameter(1,false,true,GlobalStackMode_STACK_Z) ) - ( "com.sun.star.chart2.template.StackedArea" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) ) - ( "com.sun.star.chart2.template.StackedThreeDArea" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y) ) - ( "com.sun.star.chart2.template.PercentStackedArea" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT) ) - ( "com.sun.star.chart2.template.PercentStackedThreeDArea" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.Area" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE)}, + {"com.sun.star.chart2.template.ThreeDArea" , ChartTypeParameter(1,false,true,GlobalStackMode_STACK_Z)}, + {"com.sun.star.chart2.template.StackedArea" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)}, + {"com.sun.star.chart2.template.StackedThreeDArea" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y)}, + {"com.sun.star.chart2.template.PercentStackedArea" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT)}, + {"com.sun.star.chart2.template.PercentStackedThreeDArea" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT)}}; return s_aTemplateMap; } void AreaChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -992,25 +980,23 @@ bool NetChartDialogController::shouldShow_StackingControl() const } const tTemplateServiceChartTypeParameterMap& NetChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ //@todo need templates with symbols only - ( "com.sun.star.chart2.template.NetSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false) ) - ( "com.sun.star.chart2.template.StackedNetSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false) ) - ( "com.sun.star.chart2.template.PercentStackedNetSymbol" ,ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false) ) - - ( "com.sun.star.chart2.template.Net" , ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true) ) - ( "com.sun.star.chart2.template.StackedNet" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true) ) - ( "com.sun.star.chart2.template.PercentStackedNet" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true) ) - - ( "com.sun.star.chart2.template.NetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true) ) - ( "com.sun.star.chart2.template.StackedNetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true) ) - ( "com.sun.star.chart2.template.PercentStackedNetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true) ) - - ( "com.sun.star.chart2.template.FilledNet" , ChartTypeParameter(4,false,false,GlobalStackMode_NONE,false,false) ) - ( "com.sun.star.chart2.template.StackedFilledNet" , ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y,false,false) ) - ( "com.sun.star.chart2.template.PercentStackedFilledNet" ,ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false) ) - ; + {"com.sun.star.chart2.template.NetSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false)}, + {"com.sun.star.chart2.template.StackedNetSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false)}, + {"com.sun.star.chart2.template.PercentStackedNetSymbol" ,ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false)}, + + {"com.sun.star.chart2.template.Net" , ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true)}, + {"com.sun.star.chart2.template.StackedNet" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true)}, + {"com.sun.star.chart2.template.PercentStackedNet" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true)}, + + {"com.sun.star.chart2.template.NetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true)}, + {"com.sun.star.chart2.template.StackedNetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true)}, + {"com.sun.star.chart2.template.PercentStackedNetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true)}, + + {"com.sun.star.chart2.template.FilledNet" , ChartTypeParameter(4,false,false,GlobalStackMode_NONE,false,false)}, + {"com.sun.star.chart2.template.StackedFilledNet" , ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y,false,false)}, + {"com.sun.star.chart2.template.PercentStackedFilledNet" ,ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false)}}; return s_aTemplateMap; } void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) @@ -1083,13 +1069,11 @@ Image StockChartDialogController::getImage() const tTemplateServiceChartTypeParameterMap& StockChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.StockLowHighClose" , ChartTypeParameter(1) ) - ( "com.sun.star.chart2.template.StockOpenLowHighClose" , ChartTypeParameter(2) ) - ( "com.sun.star.chart2.template.StockVolumeLowHighClose" , ChartTypeParameter(3) ) - ( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ,ChartTypeParameter(4) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.StockLowHighClose" , ChartTypeParameter(1)}, + {"com.sun.star.chart2.template.StockOpenLowHighClose" , ChartTypeParameter(2)}, + {"com.sun.star.chart2.template.StockVolumeLowHighClose" , ChartTypeParameter(3)}, + {"com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ,ChartTypeParameter(4)}}; return s_aTemplateMap; } @@ -1132,11 +1116,9 @@ Image CombiColumnLineChartDialogController::getImage( ) const tTemplateServiceChartTypeParameterMap& CombiColumnLineChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.ColumnWithLine" , ChartTypeParameter(1) ) - ( "com.sun.star.chart2.template.StackedColumnWithLine" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) ) - ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.ColumnWithLine" , ChartTypeParameter(1)}, + {"com.sun.star.chart2.template.StackedColumnWithLine" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)}}; return s_aTemplateMap; } @@ -1263,9 +1245,8 @@ Image BubbleChartDialogController::getImage() } const tTemplateServiceChartTypeParameterMap& BubbleChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap s_aTemplateMap = - tTemplateServiceChartTypeParameterMap - ( "com.sun.star.chart2.template.Bubble" , ChartTypeParameter(1,true) ) ; + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.Bubble" , ChartTypeParameter(1,true)}}; return s_aTemplateMap; } void BubbleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx index 6697b17..5a7ffaf 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx @@ -20,9 +20,12 @@ #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHARTTYPEDIALOGCONTROLLER_HXX #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHARTTYPEDIALOGCONTROLLER_HXX +#include <sal/config.h> + +#include <map> + #include "ChangingResource.hxx" #include "ThreeDHelper.hxx" -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> @@ -83,7 +86,7 @@ public: bool mbRoundedEdge; }; -typedef ::comphelper::MakeMap< OUString, ChartTypeParameter > tTemplateServiceChartTypeParameterMap; +typedef std::map< OUString, ChartTypeParameter > tTemplateServiceChartTypeParameterMap; class ChartTypeDialogController : public ChangingResource { diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx index 08cb2ec..88dd865 100644 --- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx +++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx @@ -38,10 +38,9 @@ Image GL3DBarChartDialogController::getImage() const tTemplateServiceChartTypeParameterMap& GL3DBarChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap aMap = - tTemplateServiceChartTypeParameterMap - ("com.sun.star.chart2.template.GL3DBar", ChartTypeParameter(1)) - ("com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(2)); + static tTemplateServiceChartTypeParameterMap aMap{ + {"com.sun.star.chart2.template.GL3DBar", ChartTypeParameter(1)}, + {"com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(2)}}; return aMap; } diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx index f2fa063..2e940be 100644 --- a/chart2/source/controller/inc/ItemPropertyMap.hxx +++ b/chart2/source/controller/inc/ItemPropertyMap.hxx @@ -19,18 +19,14 @@ #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMPROPERTYMAP_HXX #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_ITEMPROPERTYMAP_HXX -#include <comphelper/InlineContainer.hxx> -#include "ItemConverter.hxx" +#include <sal/config.h> -#define IPM_MAP_ENTRY(wid,uno,mid) (wid, ::std::make_pair< ::chart::wrapper::ItemConverter::tPropertyNameType, ::chart::wrapper::ItemConverter::tMemberIdType >(\ - uno, mid)) +#include <map> namespace chart { namespace wrapper { typedef ::std::map< ItemConverter::tWhichIdType, ::std::pair< ItemConverter::tPropertyNameType, ItemConverter::tMemberIdType > > ItemPropertyMapType; -typedef ::comphelper::MakeMap< ItemConverter::tWhichIdType, ::std::pair< ItemConverter::tPropertyNameType, ItemConverter::tMemberIdType > > - MakeItemPropertyMap; }} diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index eb49b10..8c99140 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -58,17 +58,14 @@ namespace { ItemPropertyMapType & lcl_GetAxisPropertyMap() { - static ItemPropertyMapType aAxisPropertyMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( SCHATTR_AXIS_SHOWDESCR, "DisplayLabels", 0 ) - IPM_MAP_ENTRY( SCHATTR_AXIS_TICKS, "MajorTickmarks", 0 ) - IPM_MAP_ENTRY( SCHATTR_AXIS_HELPTICKS, "MinorTickmarks", 0 ) - IPM_MAP_ENTRY( SCHATTR_AXIS_LABEL_ORDER, "ArrangeOrder", 0 ) - IPM_MAP_ENTRY( SCHATTR_TEXT_STACKED, "StackCharacters", 0 ) - IPM_MAP_ENTRY( SCHATTR_AXIS_LABEL_BREAK, "TextBreak", 0 ) - IPM_MAP_ENTRY( SCHATTR_AXIS_LABEL_OVERLAP, "TextOverlap", 0 ) - ); - + static ItemPropertyMapType aAxisPropertyMap{ + {SCHATTR_AXIS_SHOWDESCR, {"DisplayLabels", 0}}, + {SCHATTR_AXIS_TICKS, {"MajorTickmarks", 0}}, + {SCHATTR_AXIS_HELPTICKS, {"MinorTickmarks", 0}}, + {SCHATTR_AXIS_LABEL_ORDER, {"ArrangeOrder", 0}}, + {SCHATTR_TEXT_STACKED, {"StackCharacters", 0}}, + {SCHATTR_AXIS_LABEL_BREAK, {"TextBreak", 0}}, + {SCHATTR_AXIS_LABEL_OVERLAP, {"TextOverlap", 0}}}; return aAxisPropertyMap; }; diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx index c56c093..aa44d3a 100644 --- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -43,24 +43,22 @@ namespace { ItemPropertyMapType & lcl_GetCharacterPropertyPropertyMap() { - static ItemPropertyMapType aCharacterPropertyMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( EE_CHAR_COLOR, "CharColor", 0 ) - IPM_MAP_ENTRY( EE_CHAR_LANGUAGE, "CharLocale", MID_LANG_LOCALE ) - IPM_MAP_ENTRY( EE_CHAR_LANGUAGE_CJK, "CharLocaleAsian", MID_LANG_LOCALE ) - IPM_MAP_ENTRY( EE_CHAR_LANGUAGE_CTL, "CharLocaleComplex", MID_LANG_LOCALE ) - - IPM_MAP_ENTRY( EE_CHAR_STRIKEOUT, "CharStrikeout", MID_CROSS_OUT ) - IPM_MAP_ENTRY( EE_CHAR_WLM, "CharWordMode", 0 ) - IPM_MAP_ENTRY( EE_CHAR_SHADOW, "CharShadowed", 0 ) - IPM_MAP_ENTRY( EE_CHAR_RELIEF, "CharRelief", 0 ) - IPM_MAP_ENTRY( EE_CHAR_OUTLINE, "CharContoured", 0 ) - IPM_MAP_ENTRY( EE_CHAR_EMPHASISMARK, "CharEmphasis", 0 ) - - IPM_MAP_ENTRY( EE_PARA_WRITINGDIR, "WritingMode", 0 ) - - IPM_MAP_ENTRY( EE_PARA_ASIANCJKSPACING, "ParaIsCharacterDistance", 0 ) - ); + static ItemPropertyMapType aCharacterPropertyMap{ + {EE_CHAR_COLOR, {"CharColor", 0}}, + {EE_CHAR_LANGUAGE, {"CharLocale", MID_LANG_LOCALE}}, + {EE_CHAR_LANGUAGE_CJK, {"CharLocaleAsian", MID_LANG_LOCALE}}, + {EE_CHAR_LANGUAGE_CTL, {"CharLocaleComplex", MID_LANG_LOCALE}}, + + {EE_CHAR_STRIKEOUT, {"CharStrikeout", MID_CROSS_OUT}}, + {EE_CHAR_WLM, {"CharWordMode", 0}}, + {EE_CHAR_SHADOW, {"CharShadowed", 0}}, + {EE_CHAR_RELIEF, {"CharRelief", 0}}, + {EE_CHAR_OUTLINE, {"CharContoured", 0}}, + {EE_CHAR_EMPHASISMARK, {"CharEmphasis", 0}}, + + {EE_PARA_WRITINGDIR, {"WritingMode", 0}}, + + {EE_PARA_ASIANCJKSPACING, {"ParaIsCharacterDistance", 0}}}; return aCharacterPropertyMap; } diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index d92caaa..9f4ce52 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -61,11 +61,8 @@ namespace { ItemPropertyMapType & lcl_GetDataPointPropertyMap() { - static ItemPropertyMapType aDataPointPropertyMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( SCHATTR_STYLE_SHAPE, "Geometry3D", 0 ) - ); - + static ItemPropertyMapType aDataPointPropertyMap{ + {SCHATTR_STYLE_SHAPE, {"Geometry3D", 0}}}; return aDataPointPropertyMap; }; diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index 714bb23..4632694 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -51,66 +51,54 @@ namespace { ItemPropertyMapType & lcl_GetDataPointFilledPropertyMap() { - static ItemPropertyMapType aDataPointPropertyFilledMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( XATTR_FILLSTYLE, "FillStyle", 0 ) - IPM_MAP_ENTRY( XATTR_FILLCOLOR, "Color", 0 ) - IPM_MAP_ENTRY( XATTR_LINECOLOR, "BorderColor", 0 ) - IPM_MAP_ENTRY( XATTR_LINESTYLE, "BorderStyle", 0 ) - IPM_MAP_ENTRY( XATTR_LINEWIDTH, "BorderWidth", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBACKGROUND, "FillBackground", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_POS, "FillBitmapRectanglePoint", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_SIZEX, "FillBitmapSizeX", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_SIZEY, "FillBitmapSizeY", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_SIZELOG, "FillBitmapLogicalSize", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_TILEOFFSETX, "FillBitmapOffsetX", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_TILEOFFSETY, "FillBitmapOffsetY", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_POSOFFSETX, "FillBitmapPositionOffsetX", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_POSOFFSETY, "FillBitmapPositionOffsetY", 0 ) - ); - + static ItemPropertyMapType aDataPointPropertyFilledMap{ + {XATTR_FILLSTYLE, {"FillStyle", 0}}, + {XATTR_FILLCOLOR, {"Color", 0}}, + {XATTR_LINECOLOR, {"BorderColor", 0}}, + {XATTR_LINESTYLE, {"BorderStyle", 0}}, + {XATTR_LINEWIDTH, {"BorderWidth", 0}}, + {XATTR_FILLBACKGROUND, {"FillBackground", 0}}, + {XATTR_FILLBMP_POS, {"FillBitmapRectanglePoint", 0}}, + {XATTR_FILLBMP_SIZEX, {"FillBitmapSizeX", 0}}, + {XATTR_FILLBMP_SIZEY, {"FillBitmapSizeY", 0}}, + {XATTR_FILLBMP_SIZELOG, {"FillBitmapLogicalSize", 0}}, + {XATTR_FILLBMP_TILEOFFSETX, {"FillBitmapOffsetX", 0}}, + {XATTR_FILLBMP_TILEOFFSETY, {"FillBitmapOffsetY", 0}}, + {XATTR_FILLBMP_POSOFFSETX, {"FillBitmapPositionOffsetX", 0}}, + {XATTR_FILLBMP_POSOFFSETY, {"FillBitmapPositionOffsetY", 0}}}; return aDataPointPropertyFilledMap; } ItemPropertyMapType & lcl_GetDataPointLinePropertyMap() { - static ItemPropertyMapType aDataPointPropertyLineMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( XATTR_LINECOLOR, "Color", 0 ) - IPM_MAP_ENTRY( XATTR_LINESTYLE, "LineStyle", 0 ) - IPM_MAP_ENTRY( XATTR_LINEWIDTH, "LineWidth", 0 ) - ); - + static ItemPropertyMapType aDataPointPropertyLineMap{ + {XATTR_LINECOLOR, {"Color", 0}}, + {XATTR_LINESTYLE, {"LineStyle", 0}}, + {XATTR_LINEWIDTH, {"LineWidth", 0}}}; return aDataPointPropertyLineMap; } ItemPropertyMapType & lcl_GetLinePropertyMap() { - static ItemPropertyMapType aLinePropertyMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( XATTR_LINESTYLE, "LineStyle", 0 ) - IPM_MAP_ENTRY( XATTR_LINEWIDTH, "LineWidth", 0 ) - IPM_MAP_ENTRY( XATTR_LINECOLOR, "LineColor", 0 ) - IPM_MAP_ENTRY( XATTR_LINEJOINT, "LineJoint", 0 ) - ); - + static ItemPropertyMapType aLinePropertyMap{ + {XATTR_LINESTYLE, {"LineStyle", 0}}, + {XATTR_LINEWIDTH, {"LineWidth", 0}}, + {XATTR_LINECOLOR, {"LineColor", 0}}, + {XATTR_LINEJOINT, {"LineJoint", 0}}}; return aLinePropertyMap; } ItemPropertyMapType & lcl_GetFillPropertyMap() { - static ItemPropertyMapType aFillPropertyMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( XATTR_FILLSTYLE, "FillStyle", 0 ) - IPM_MAP_ENTRY( XATTR_FILLCOLOR, "FillColor", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBACKGROUND, "FillBackground", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_POS, "FillBitmapRectanglePoint", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_SIZEX, "FillBitmapSizeX", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_SIZEY, "FillBitmapSizeY", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_SIZELOG, "FillBitmapLogicalSize", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_TILEOFFSETX, "FillBitmapOffsetX", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_TILEOFFSETY, "FillBitmapOffsetY", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_POSOFFSETX, "FillBitmapPositionOffsetX", 0 ) - IPM_MAP_ENTRY( XATTR_FILLBMP_POSOFFSETY, "FillBitmapPositionOffsetY", 0 ) - ); - + static ItemPropertyMapType aFillPropertyMap{ + {XATTR_FILLSTYLE, {"FillStyle", 0}}, + {XATTR_FILLCOLOR, {"FillColor", 0}}, + {XATTR_FILLBACKGROUND, {"FillBackground", 0}}, + {XATTR_FILLBMP_POS, {"FillBitmapRectanglePoint", 0}}, + {XATTR_FILLBMP_SIZEX, {"FillBitmapSizeX", 0}}, + {XATTR_FILLBMP_SIZEY, {"FillBitmapSizeY", 0}}, + {XATTR_FILLBMP_SIZELOG, {"FillBitmapLogicalSize", 0}}, + {XATTR_FILLBMP_TILEOFFSETX, {"FillBitmapOffsetX", 0}}, + {XATTR_FILLBMP_TILEOFFSETY, {"FillBitmapOffsetY", 0}}, + {XATTR_FILLBMP_POSOFFSETX, {"FillBitmapPositionOffsetX", 0}}, + {XATTR_FILLBMP_POSOFFSETY, {"FillBitmapPositionOffsetY", 0}}}; return aFillPropertyMap; } diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index 57f755c..69251ca 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -49,15 +49,12 @@ namespace { const ItemPropertyMapType& getTextLabelPropertyMap() { - static ItemPropertyMapType aMap( - MakeItemPropertyMap - IPM_MAP_ENTRY(XATTR_LINESTYLE, CHART_UNONAME_LABEL_BORDER_STYLE, 0) - IPM_MAP_ENTRY(XATTR_LINEWIDTH, CHART_UNONAME_LABEL_BORDER_WIDTH, 0) - IPM_MAP_ENTRY(XATTR_LINEDASH, CHART_UNONAME_LABEL_BORDER_DASH, 0) - IPM_MAP_ENTRY(XATTR_LINECOLOR, CHART_UNONAME_LABEL_BORDER_COLOR, 0) - IPM_MAP_ENTRY(XATTR_LINETRANSPARENCE, CHART_UNONAME_LABEL_BORDER_TRANS, 0) - ); - + static ItemPropertyMapType aMap{ + {XATTR_LINESTYLE, {CHART_UNONAME_LABEL_BORDER_STYLE, 0}}, + {XATTR_LINEWIDTH, {CHART_UNONAME_LABEL_BORDER_WIDTH, 0}}, + {XATTR_LINEDASH, {CHART_UNONAME_LABEL_BORDER_DASH, 0}}, + {XATTR_LINECOLOR, {CHART_UNONAME_LABEL_BORDER_COLOR, 0}}, + {XATTR_LINETRANSPARENCE, {CHART_UNONAME_LABEL_BORDER_TRANS, 0}}}; return aMap; }; diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx index b35df9f..c3186da 100644 --- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx @@ -41,11 +41,8 @@ namespace { ItemPropertyMapType & lcl_GetTitlePropertyMap() { - static ItemPropertyMapType aTitlePropertyMap( - MakeItemPropertyMap - IPM_MAP_ENTRY( SCHATTR_TEXT_STACKED, "StackCharacters", 0 ) - ); - + static ItemPropertyMapType aTitlePropertyMap{ + {SCHATTR_TEXT_STACKED, {"StackCharacters", 0}}}; return aTitlePropertyMap; }; diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index f1082da..639dfa8 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -55,7 +55,6 @@ #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> #include <com/sun/star/util/XUpdatable.hpp> -#include <comphelper/InlineContainer.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/propertyvalue.hxx> diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index f57da88..2228337 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -38,7 +38,6 @@ #include <com/sun/star/chart/ChartDataRowSource.hpp> -#include <comphelper/InlineContainer.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> @@ -1206,20 +1205,17 @@ enum eServiceType }; typedef ::std::map< OUString, enum eServiceType > tServiceNameMap; -typedef ::comphelper::MakeMap< OUString, enum eServiceType > tMakeServiceNameMap; tServiceNameMap & lcl_getStaticServiceNameMap() { - static tServiceNameMap aServiceNameMap( - tMakeServiceNameMap - ( "com.sun.star.drawing.DashTable", SERVICE_DASH_TABLE ) - ( "com.sun.star.drawing.GradientTable", SERVICE_GARDIENT_TABLE ) - ( "com.sun.star.drawing.HatchTable", SERVICE_HATCH_TABLE ) - ( "com.sun.star.drawing.BitmapTable", SERVICE_BITMAP_TABLE ) - ( "com.sun.star.drawing.TransparencyGradientTable", SERVICE_TRANSP_GRADIENT_TABLE ) - ( "com.sun.star.drawing.MarkerTable", SERVICE_MARKER_TABLE ) - ( "com.sun.star.xml.NamespaceMap", SERVICE_NAMESPACE_MAP ) - ); + static tServiceNameMap aServiceNameMap{ + {"com.sun.star.drawing.DashTable", SERVICE_DASH_TABLE}, + {"com.sun.star.drawing.GradientTable", SERVICE_GARDIENT_TABLE}, + {"com.sun.star.drawing.HatchTable", SERVICE_HATCH_TABLE}, + {"com.sun.star.drawing.BitmapTable", SERVICE_BITMAP_TABLE}, + {"com.sun.star.drawing.TransparencyGradientTable", SERVICE_TRANSP_GRADIENT_TABLE}, + {"com.sun.star.drawing.MarkerTable", SERVICE_MARKER_TABLE}, + {"com.sun.star.xml.NamespaceMap", SERVICE_NAMESPACE_MAP}}; return aServiceNameMap; } } diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index ad53907..a4bdb98 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -39,7 +39,6 @@ #endif #include <cppuhelper/component_context.hxx> #include <cppuhelper/supportsservice.hxx> -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/container/XContentEnumerationAccess.hpp> #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/chart/ChartSolidType.hpp> @@ -134,78 +133,76 @@ typedef ::std::map< OUString, TemplateId > tTemplateMapType; const tTemplateMapType & lcl_DefaultChartTypeMap() { - static const tTemplateMapType aMap = tTemplateMapType( - ::comphelper::MakeMap< tTemplateMapType::key_type, tTemplateMapType::mapped_type > - ( "com.sun.star.chart2.template.Symbol", TEMPLATE_SYMBOL ) - ( "com.sun.star.chart2.template.StackedSymbol", TEMPLATE_STACKEDSYMBOL ) - ( "com.sun.star.chart2.template.PercentStackedSymbol", TEMPLATE_PERCENTSTACKEDSYMBOL ) - ( "com.sun.star.chart2.template.Line", TEMPLATE_LINE ) - ( "com.sun.star.chart2.template.StackedLine", TEMPLATE_STACKEDLINE ) - ( "com.sun.star.chart2.template.PercentStackedLine", TEMPLATE_PERCENTSTACKEDLINE ) - ( "com.sun.star.chart2.template.LineSymbol", TEMPLATE_LINESYMBOL ) - ( "com.sun.star.chart2.template.StackedLineSymbol", TEMPLATE_STACKEDLINESYMBOL ) - ( "com.sun.star.chart2.template.PercentStackedLineSymbol", TEMPLATE_PERCENTSTACKEDLINESYMBOL ) - ( "com.sun.star.chart2.template.ThreeDLine", TEMPLATE_THREEDLINE ) - ( "com.sun.star.chart2.template.StackedThreeDLine", TEMPLATE_STACKEDTHREEDLINE ) - ( "com.sun.star.chart2.template.PercentStackedThreeDLine", TEMPLATE_PERCENTSTACKEDTHREEDLINE ) - ( "com.sun.star.chart2.template.ThreeDLineDeep", TEMPLATE_THREEDLINEDEEP ) - ( "com.sun.star.chart2.template.Column", TEMPLATE_COLUMN ) - ( "com.sun.star.chart2.template.StackedColumn", TEMPLATE_STACKEDCOLUMN ) - ( "com.sun.star.chart2.template.PercentStackedColumn", TEMPLATE_PERCENTSTACKEDCOLUMN ) - ( "com.sun.star.chart2.template.Bar", TEMPLATE_BAR ) - ( "com.sun.star.chart2.template.StackedBar", TEMPLATE_STACKEDBAR ) - ( "com.sun.star.chart2.template.PercentStackedBar", TEMPLATE_PERCENTSTACKEDBAR ) - ( "com.sun.star.chart2.template.ThreeDColumnDeep", TEMPLATE_THREEDCOLUMNDEEP ) - ( "com.sun.star.chart2.template.ThreeDColumnFlat", TEMPLATE_THREEDCOLUMNFLAT ) - ( "com.sun.star.chart2.template.StackedThreeDColumnFlat", TEMPLATE_STACKEDTHREEDCOLUMNFLAT ) - ( "com.sun.star.chart2.template.PercentStackedThreeDColumnFlat", TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT ) - ( "com.sun.star.chart2.template.ThreeDBarDeep", TEMPLATE_THREEDBARDEEP ) - ( "com.sun.star.chart2.template.ThreeDBarFlat", TEMPLATE_THREEDBARFLAT ) - ( "com.sun.star.chart2.template.StackedThreeDBarFlat", TEMPLATE_STACKEDTHREEDBARFLAT ) - ( "com.sun.star.chart2.template.PercentStackedThreeDBarFlat", TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT ) - ( "com.sun.star.chart2.template.ColumnWithLine", TEMPLATE_COLUMNWITHLINE ) - ( "com.sun.star.chart2.template.StackedColumnWithLine", TEMPLATE_STACKEDCOLUMNWITHLINE ) - ( "com.sun.star.chart2.template.Area", TEMPLATE_AREA ) - ( "com.sun.star.chart2.template.StackedArea", TEMPLATE_STACKEDAREA ) - ( "com.sun.star.chart2.template.PercentStackedArea", TEMPLATE_PERCENTSTACKEDAREA ) - ( "com.sun.star.chart2.template.ThreeDArea", TEMPLATE_THREEDAREA ) - ( "com.sun.star.chart2.template.StackedThreeDArea", TEMPLATE_STACKEDTHREEDAREA ) - ( "com.sun.star.chart2.template.PercentStackedThreeDArea", TEMPLATE_PERCENTSTACKEDTHREEDAREA ) - ( "com.sun.star.chart2.template.Pie", TEMPLATE_PIE ) - ( "com.sun.star.chart2.template.PieAllExploded", TEMPLATE_PIEALLEXPLODED ) - ( "com.sun.star.chart2.template.Donut", TEMPLATE_DONUT ) - ( "com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED ) - ( "com.sun.star.chart2.template.ThreeDPie", TEMPLATE_THREEDPIE ) - ( "com.sun.star.chart2.template.ThreeDPieAllExploded", TEMPLATE_THREEDPIEALLEXPLODED ) - ( "com.sun.star.chart2.template.ThreeDDonut", TEMPLATE_THREEDDONUT ) - ( "com.sun.star.chart2.template.ThreeDDonutAllExploded", TEMPLATE_THREEDDONUTALLEXPLODED ) - ( "com.sun.star.chart2.template.ScatterLineSymbol", TEMPLATE_SCATTERLINESYMBOL ) - ( "com.sun.star.chart2.template.ScatterLine", TEMPLATE_SCATTERLINE ) - ( "com.sun.star.chart2.template.ScatterSymbol", TEMPLATE_SCATTERSYMBOL ) - ( "com.sun.star.chart2.template.ThreeDScatter", TEMPLATE_THREEDSCATTER ) - ( "com.sun.star.chart2.template.Net", TEMPLATE_NET ) - ( "com.sun.star.chart2.template.NetSymbol", TEMPLATE_NETSYMBOL ) - ( "com.sun.star.chart2.template.NetLine", TEMPLATE_NETLINE ) - ( "com.sun.star.chart2.template.StackedNet", TEMPLATE_STACKEDNET ) - ( "com.sun.star.chart2.template.StackedNetSymbol", TEMPLATE_STACKEDNETSYMBOL ) - ( "com.sun.star.chart2.template.StackedNetLine", TEMPLATE_STACKEDNETLINE ) - ( "com.sun.star.chart2.template.PercentStackedNet", TEMPLATE_PERCENTSTACKEDNET ) - ( "com.sun.star.chart2.template.PercentStackedNetSymbol", TEMPLATE_PERCENTSTACKEDNETSYMBOL ) - ( "com.sun.star.chart2.template.PercentStackedNetLine", TEMPLATE_PERCENTSTACKEDNETLINE ) - ( "com.sun.star.chart2.template.FilledNet", TEMPLATE_FILLEDNET ) - ( "com.sun.star.chart2.template.StackedFilledNet", TEMPLATE_STACKEDFILLEDNET ) - ( "com.sun.star.chart2.template.PercentStackedFilledNet", TEMPLATE_PERCENTSTACKEDFILLEDNET ) - ( "com.sun.star.chart2.template.StockLowHighClose", TEMPLATE_STOCKLOWHIGHCLOSE ) - ( "com.sun.star.chart2.template.StockOpenLowHighClose", TEMPLATE_STOCKOPENLOWHIGHCLOSE ) - ( "com.sun.star.chart2.template.StockVolumeLowHighClose", TEMPLATE_STOCKVOLUMELOWHIGHCLOSE ) - ( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose", TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE ) - ( "com.sun.star.chart2.template.Bubble", TEMPLATE_BUBBLE ) - ( "com.sun.star.chart2.template.GL3DBar", TEMPLATE_GL3DBAR ) - ( "com.sun.star.chart2.template.GL3DBarRoundedRectangle", TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE ) -// ( "com.sun.star.chart2.template.Surface", TEMPLATE_SURFACE ) -// ( "com.sun.star.chart2.template.Addin", TEMPLATE_ADDIN ) - ); - + static const tTemplateMapType aMap{ + {"com.sun.star.chart2.template.Symbol", TEMPLATE_SYMBOL}, + {"com.sun.star.chart2.template.StackedSymbol", TEMPLATE_STACKEDSYMBOL}, + {"com.sun.star.chart2.template.PercentStackedSymbol", TEMPLATE_PERCENTSTACKEDSYMBOL}, + {"com.sun.star.chart2.template.Line", TEMPLATE_LINE}, + {"com.sun.star.chart2.template.StackedLine", TEMPLATE_STACKEDLINE}, + {"com.sun.star.chart2.template.PercentStackedLine", TEMPLATE_PERCENTSTACKEDLINE}, + {"com.sun.star.chart2.template.LineSymbol", TEMPLATE_LINESYMBOL}, + {"com.sun.star.chart2.template.StackedLineSymbol", TEMPLATE_STACKEDLINESYMBOL}, + {"com.sun.star.chart2.template.PercentStackedLineSymbol", TEMPLATE_PERCENTSTACKEDLINESYMBOL}, + {"com.sun.star.chart2.template.ThreeDLine", TEMPLATE_THREEDLINE}, + {"com.sun.star.chart2.template.StackedThreeDLine", TEMPLATE_STACKEDTHREEDLINE}, + {"com.sun.star.chart2.template.PercentStackedThreeDLine", TEMPLATE_PERCENTSTACKEDTHREEDLINE}, + {"com.sun.star.chart2.template.ThreeDLineDeep", TEMPLATE_THREEDLINEDEEP}, + {"com.sun.star.chart2.template.Column", TEMPLATE_COLUMN}, + {"com.sun.star.chart2.template.StackedColumn", TEMPLATE_STACKEDCOLUMN}, + {"com.sun.star.chart2.template.PercentStackedColumn", TEMPLATE_PERCENTSTACKEDCOLUMN}, + {"com.sun.star.chart2.template.Bar", TEMPLATE_BAR}, + {"com.sun.star.chart2.template.StackedBar", TEMPLATE_STACKEDBAR}, + {"com.sun.star.chart2.template.PercentStackedBar", TEMPLATE_PERCENTSTACKEDBAR}, + {"com.sun.star.chart2.template.ThreeDColumnDeep", TEMPLATE_THREEDCOLUMNDEEP}, + {"com.sun.star.chart2.template.ThreeDColumnFlat", TEMPLATE_THREEDCOLUMNFLAT}, + {"com.sun.star.chart2.template.StackedThreeDColumnFlat", TEMPLATE_STACKEDTHREEDCOLUMNFLAT}, + {"com.sun.star.chart2.template.PercentStackedThreeDColumnFlat", TEMPLATE_PERCENTSTACKEDTHREEDCOLUMNFLAT}, + {"com.sun.star.chart2.template.ThreeDBarDeep", TEMPLATE_THREEDBARDEEP}, + {"com.sun.star.chart2.template.ThreeDBarFlat", TEMPLATE_THREEDBARFLAT}, + {"com.sun.star.chart2.template.StackedThreeDBarFlat", TEMPLATE_STACKEDTHREEDBARFLAT}, + {"com.sun.star.chart2.template.PercentStackedThreeDBarFlat", TEMPLATE_PERCENTSTACKEDTHREEDBARFLAT}, + {"com.sun.star.chart2.template.ColumnWithLine", TEMPLATE_COLUMNWITHLINE}, + {"com.sun.star.chart2.template.StackedColumnWithLine", TEMPLATE_STACKEDCOLUMNWITHLINE}, + {"com.sun.star.chart2.template.Area", TEMPLATE_AREA}, + {"com.sun.star.chart2.template.StackedArea", TEMPLATE_STACKEDAREA}, + {"com.sun.star.chart2.template.PercentStackedArea", TEMPLATE_PERCENTSTACKEDAREA}, + {"com.sun.star.chart2.template.ThreeDArea", TEMPLATE_THREEDAREA}, + {"com.sun.star.chart2.template.StackedThreeDArea", TEMPLATE_STACKEDTHREEDAREA}, + {"com.sun.star.chart2.template.PercentStackedThreeDArea", TEMPLATE_PERCENTSTACKEDTHREEDAREA}, + {"com.sun.star.chart2.template.Pie", TEMPLATE_PIE}, + {"com.sun.star.chart2.template.PieAllExploded", TEMPLATE_PIEALLEXPLODED}, + {"com.sun.star.chart2.template.Donut", TEMPLATE_DONUT}, + {"com.sun.star.chart2.template.DonutAllExploded", TEMPLATE_DONUTALLEXPLODED}, + {"com.sun.star.chart2.template.ThreeDPie", TEMPLATE_THREEDPIE}, + {"com.sun.star.chart2.template.ThreeDPieAllExploded", TEMPLATE_THREEDPIEALLEXPLODED}, + {"com.sun.star.chart2.template.ThreeDDonut", TEMPLATE_THREEDDONUT}, + {"com.sun.star.chart2.template.ThreeDDonutAllExploded", TEMPLATE_THREEDDONUTALLEXPLODED}, + {"com.sun.star.chart2.template.ScatterLineSymbol", TEMPLATE_SCATTERLINESYMBOL}, + {"com.sun.star.chart2.template.ScatterLine", TEMPLATE_SCATTERLINE}, + {"com.sun.star.chart2.template.ScatterSymbol", TEMPLATE_SCATTERSYMBOL}, + {"com.sun.star.chart2.template.ThreeDScatter", TEMPLATE_THREEDSCATTER}, + {"com.sun.star.chart2.template.Net", TEMPLATE_NET}, + {"com.sun.star.chart2.template.NetSymbol", TEMPLATE_NETSYMBOL}, + {"com.sun.star.chart2.template.NetLine", TEMPLATE_NETLINE}, + {"com.sun.star.chart2.template.StackedNet", TEMPLATE_STACKEDNET}, + {"com.sun.star.chart2.template.StackedNetSymbol", TEMPLATE_STACKEDNETSYMBOL}, + {"com.sun.star.chart2.template.StackedNetLine", TEMPLATE_STACKEDNETLINE}, + {"com.sun.star.chart2.template.PercentStackedNet", TEMPLATE_PERCENTSTACKEDNET}, + {"com.sun.star.chart2.template.PercentStackedNetSymbol", TEMPLATE_PERCENTSTACKEDNETSYMBOL}, + {"com.sun.star.chart2.template.PercentStackedNetLine", TEMPLATE_PERCENTSTACKEDNETLINE}, + {"com.sun.star.chart2.template.FilledNet", TEMPLATE_FILLEDNET}, + {"com.sun.star.chart2.template.StackedFilledNet", TEMPLATE_STACKEDFILLEDNET}, + {"com.sun.star.chart2.template.PercentStackedFilledNet", TEMPLATE_PERCENTSTACKEDFILLEDNET}, + {"com.sun.star.chart2.template.StockLowHighClose", TEMPLATE_STOCKLOWHIGHCLOSE}, + {"com.sun.star.chart2.template.StockOpenLowHighClose", TEMPLATE_STOCKOPENLOWHIGHCLOSE}, + {"com.sun.star.chart2.template.StockVolumeLowHighClose", TEMPLATE_STOCKVOLUMELOWHIGHCLOSE}, + {"com.sun.star.chart2.template.StockVolumeOpenLowHighClose", TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE}, + {"com.sun.star.chart2.template.Bubble", TEMPLATE_BUBBLE}, + {"com.sun.star.chart2.template.GL3DBar", TEMPLATE_GL3DBAR}, + {"com.sun.star.chart2.template.GL3DBarRoundedRectangle", TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE}, +// {"com.sun.star.chart2.template.Surface", TEMPLATE_SURFACE}, +// {"com.sun.star.chart2.template.Addin", TEMPLATE_ADDIN}, + }; return aMap; } diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx index 198d494..7ef0a95 100644 --- a/chart2/source/tools/ObjectIdentifier.cxx +++ b/chart2/source/tools/ObjectIdentifier.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <map> + #include "ObjectIdentifier.hxx" #include "macros.hxx" #include "TitleHelper.hxx" @@ -34,8 +38,6 @@ #include <com/sun/star/chart2/XAxis.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> -#include <comphelper/InlineContainer.hxx> - #include <rtl/ustrbuf.hxx> namespace chart @@ -92,19 +94,18 @@ OUString lcl_createClassificationStringForType( ObjectType eObjectType return aRet.makeStringAndClear(); } -typedef ::comphelper::MakeMap< TitleHelper::eTitleType, OUString > tTitleMap; +typedef std::map< TitleHelper::eTitleType, OUString > tTitleMap; const tTitleMap& lcl_getTitleMap() { //maps the title type to the ParentParticle for that title - static tTitleMap s_aTitleMap = tTitleMap - ( TitleHelper::MAIN_TITLE, "" ) - ( TitleHelper::SUB_TITLE, "D=0" ) - ( TitleHelper::X_AXIS_TITLE, "D=0:CS=0:Axis=0,0" ) - ( TitleHelper::Y_AXIS_TITLE, "D=0:CS=0:Axis=1,0" ) - ( TitleHelper::Z_AXIS_TITLE, "D=0:CS=0:Axis=2,0" ) - ( TitleHelper::SECONDARY_X_AXIS_TITLE, "D=0:CS=0:Axis=0,1" ) - ( TitleHelper::SECONDARY_Y_AXIS_TITLE, "D=0:CS=0:Axis=1,1" ) - ; + static tTitleMap s_aTitleMap{ + {TitleHelper::MAIN_TITLE, ""}, + {TitleHelper::SUB_TITLE, "D=0"}, + {TitleHelper::X_AXIS_TITLE, "D=0:CS=0:Axis=0,0"}, + {TitleHelper::Y_AXIS_TITLE, "D=0:CS=0:Axis=1,0"}, + {TitleHelper::Z_AXIS_TITLE, "D=0:CS=0:Axis=2,0"}, + {TitleHelper::SECONDARY_X_AXIS_TITLE, "D=0:CS=0:Axis=0,1"}, + {TitleHelper::SECONDARY_Y_AXIS_TITLE, "D=0:CS=0:Axis=1,1"}}; return s_aTitleMap; } diff --git a/chart2/source/view/inc/PropertyMapper.hxx b/chart2/source/view/inc/PropertyMapper.hxx index 595a343..fbdd90a 100644 --- a/chart2/source/view/inc/PropertyMapper.hxx +++ b/chart2/source/view/inc/PropertyMapper.hxx @@ -19,7 +19,10 @@ #ifndef INCLUDED_CHART2_SOURCE_VIEW_INC_PROPERTYMAPPER_HXX #define INCLUDED_CHART2_SOURCE_VIEW_INC_PROPERTYMAPPER_HXX -#include <comphelper/InlineContainer.hxx> +#include <sal/config.h> + +#include <map> + #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/drawing/XShape.hpp> @@ -29,7 +32,6 @@ namespace chart { typedef ::std::map< OUString, OUString > tPropertyNameMap; -typedef ::comphelper::MakeMap< OUString, OUString > tMakePropertyNameMap; typedef ::std::map< OUString, css::uno::Any > tPropertyNameValueMap; typedef css::uno::Sequence< OUString > tNameSequence; typedef css::uno::Sequence< css::uno::Any > tAnySequence; @@ -93,16 +95,16 @@ public: , const tAnySequence& rValues , const css::uno::Reference< css::beans::XPropertySet >& xTarget ); - static const tMakePropertyNameMap& getPropertyNameMapForCharacterProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForParagraphProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForFillProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForLineProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForFillAndLineProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForTextShapeProperties(); + static const tPropertyNameMap& getPropertyNameMapForCharacterProperties(); + static const tPropertyNameMap& getPropertyNameMapForParagraphProperties(); + static const tPropertyNameMap& getPropertyNameMapForFillProperties(); + static const tPropertyNameMap& getPropertyNameMapForLineProperties(); + static const tPropertyNameMap& getPropertyNameMapForFillAndLineProperties(); + static const tPropertyNameMap& getPropertyNameMapForTextShapeProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForFilledSeriesProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForLineSeriesProperties(); - static const tMakePropertyNameMap& getPropertyNameMapForTextLabelProperties(); + static const tPropertyNameMap& getPropertyNameMapForFilledSeriesProperties(); + static const tPropertyNameMap& getPropertyNameMapForLineSeriesProperties(); + static const tPropertyNameMap& getPropertyNameMapForTextLabelProperties(); static void getTextLabelMultiPropertyLists( const css::uno::Reference< css::beans::XPropertySet >& xSourceProp diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 83c6f51..3182e66 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -14,7 +14,6 @@ #include <com/sun/star/awt/XBitmap.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/graphic/XGraphic.hpp> -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/drawing/CircleKind.hpp> #include <com/sun/star/drawing/DoubleSequence.hpp> #include <com/sun/star/drawing/FlagSequence.hpp> diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index da75502..39c740c 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -25,7 +25,6 @@ #include "CommonConverters.hxx" #include "macros.hxx" #include "PropertyMapper.hxx" -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/drawing/CircleKind.hpp> #include <com/sun/star/drawing/DoubleSequence.hpp> @@ -419,8 +418,9 @@ uno::Reference< drawing::XShape > tPropertyNameValueMap aValueMap; //fill line-, fill- and paragraph-properties into the ValueMap { - tMakePropertyNameMap aNameMap = PropertyMapper::getPropertyNameMapForParagraphProperties(); - aNameMap( PropertyMapper::getPropertyNameMapForFillAndLineProperties() ); + tPropertyNameMap aNameMap = PropertyMapper::getPropertyNameMapForParagraphProperties(); + auto const & add = PropertyMapper::getPropertyNameMapForFillAndLineProperties(); + aNameMap.insert(add.begin(), add.end()); PropertyMapper::getValueMap( aValueMap, aNameMap, xTextProperties ); } diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index 73ee2b9..41bd757 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -184,202 +184,209 @@ uno::Any* PropertyMapper::getValuePointerForLimitedSpace( tAnySequence& rPropVal , bLimitedHeight ? OUString("TextMaximumFrameHeight") : OUString("TextMaximumFrameWidth") ); } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProperties() +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProperties() { //shape property -- chart model object property - static tMakePropertyNameMap s_aShapePropertyMapForCharacterProperties = - tMakePropertyNameMap - ( "CharColor", "CharColor" ) - ( "CharContoured", "CharContoured" ) - ( "CharEmphasis", "CharEmphasis" )//the service style::CharacterProperties describes a property called 'CharEmphasize' which is nowhere implemented - - ( "CharFontFamily", "CharFontFamily" ) - ( "CharFontFamilyAsian", "CharFontFamilyAsian" ) - ( "CharFontFamilyComplex", "CharFontFamilyComplex" ) - ( "CharFontCharSet", "CharFontCharSet" ) - ( "CharFontCharSetAsian", "CharFontCharSetAsian" ) - ( "CharFontCharSetComplex", "CharFontCharSetComplex" ) - ( "CharFontName", "CharFontName" ) - ( "CharFontNameAsian", "CharFontNameAsian" ) - ( "CharFontNameComplex", "CharFontNameComplex" ) - ( "CharFontPitch", "CharFontPitch" ) - ( "CharFontPitchAsian", "CharFontPitchAsian" ) - ( "CharFontPitchComplex", "CharFontPitchComplex" ) - ( "CharFontStyleName", "CharFontStyleName" ) - ( "CharFontStyleNameAsian", "CharFontStyleNameAsian" ) - ( "CharFontStyleNameComplex", "CharFontStyleNameComplex" ) - - ( "CharHeight", "CharHeight" ) - ( "CharHeightAsian", "CharHeightAsian" ) - ( "CharHeightComplex", "CharHeightComplex" ) - ( "CharKerning", "CharKerning" ) - ( "CharLocale", "CharLocale" ) - ( "CharLocaleAsian", "CharLocaleAsian" ) - ( "CharLocaleComplex", "CharLocaleComplex" ) - ( "CharPosture", "CharPosture" ) - ( "CharPostureAsian", "CharPostureAsian" ) - ( "CharPostureComplex", "CharPostureComplex" ) - ( "CharRelief", "CharRelief" ) - ( "CharShadowed", "CharShadowed" ) - ( "CharStrikeout", "CharStrikeout" ) - ( "CharUnderline", "CharUnderline" ) - ( "CharUnderlineColor", "CharUnderlineColor" ) - ( "CharUnderlineHasColor", "CharUnderlineHasColor" ) - ( "CharOverline", "CharOverline" ) - ( "CharOverlineColor", "CharOverlineColor" ) - ( "CharOverlineHasColor", "CharOverlineHasColor" ) - ( "CharWeight", "CharWeight" ) - ( "CharWeightAsian", "CharWeightAsian" ) - ( "CharWeightComplex", "CharWeightComplex" ) - ( "CharWordMode", "CharWordMode" ) - - ( "WritingMode", "WritingMode" ) - - ( "ParaIsCharacterDistance", "ParaIsCharacterDistance" ) - ; + static tPropertyNameMap s_aShapePropertyMapForCharacterProperties{ + {"CharColor", "CharColor"}, + {"CharContoured", "CharContoured"}, + {"CharEmphasis", "CharEmphasis"},//the service style::CharacterProperties describes a property called 'CharEmphasize' which is nowhere implemented + + {"CharFontFamily", "CharFontFamily"}, + {"CharFontFamilyAsian", "CharFontFamilyAsian"}, + {"CharFontFamilyComplex", "CharFontFamilyComplex"}, + {"CharFontCharSet", "CharFontCharSet"}, + {"CharFontCharSetAsian", "CharFontCharSetAsian"}, + {"CharFontCharSetComplex", "CharFontCharSetComplex"}, + {"CharFontName", "CharFontName"}, + {"CharFontNameAsian", "CharFontNameAsian"}, + {"CharFontNameComplex", "CharFontNameComplex"}, + {"CharFontPitch", "CharFontPitch"}, + {"CharFontPitchAsian", "CharFontPitchAsian"}, + {"CharFontPitchComplex", "CharFontPitchComplex"}, + {"CharFontStyleName", "CharFontStyleName"}, + {"CharFontStyleNameAsian", "CharFontStyleNameAsian"}, + {"CharFontStyleNameComplex", "CharFontStyleNameComplex"}, + + {"CharHeight", "CharHeight"}, + {"CharHeightAsian", "CharHeightAsian"}, + {"CharHeightComplex", "CharHeightComplex"}, + {"CharKerning", "CharKerning"}, + {"CharLocale", "CharLocale"}, + {"CharLocaleAsian", "CharLocaleAsian"}, + {"CharLocaleComplex", "CharLocaleComplex"}, + {"CharPosture", "CharPosture"}, + {"CharPostureAsian", "CharPostureAsian"}, + {"CharPostureComplex", "CharPostureComplex"}, + {"CharRelief", "CharRelief"}, + {"CharShadowed", "CharShadowed"}, + {"CharStrikeout", "CharStrikeout"}, + {"CharUnderline", "CharUnderline"}, + {"CharUnderlineColor", "CharUnderlineColor"}, + {"CharUnderlineHasColor", "CharUnderlineHasColor"}, + {"CharOverline", "CharOverline"}, + {"CharOverlineColor", "CharOverlineColor"}, + {"CharOverlineHasColor", "CharOverlineHasColor"}, + {"CharWeight", "CharWeight"}, + {"CharWeightAsian", "CharWeightAsian"}, + {"CharWeightComplex", "CharWeightComplex"}, + {"CharWordMode", "CharWordMode"}, + + {"WritingMode", "WritingMode"}, + + {"ParaIsCharacterDistance", "ParaIsCharacterDistance"}}; + return s_aShapePropertyMapForCharacterProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForParagraphProperties() +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForParagraphProperties() { //shape property -- chart model object property - static tMakePropertyNameMap s_aShapePropertyMapForParagraphProperties = - tMakePropertyNameMap - ( "ParaAdjust", "ParaAdjust" ) - ( "ParaBottomMargin", "ParaBottomMargin" ) - ( "ParaIsHyphenation", "ParaIsHyphenation" ) - ( "ParaLastLineAdjust", "ParaLastLineAdjust" ) - ( "ParaLeftMargin", "ParaLeftMargin" ) - ( "ParaRightMargin", "ParaRightMargin" ) - ( "ParaTopMargin", "ParaTopMargin" ) - ; + static tPropertyNameMap s_aShapePropertyMapForParagraphProperties{ + {"ParaAdjust", "ParaAdjust"}, + {"ParaBottomMargin", "ParaBottomMargin"}, + {"ParaIsHyphenation", "ParaIsHyphenation"}, + {"ParaLastLineAdjust", "ParaLastLineAdjust"}, + {"ParaLeftMargin", "ParaLeftMargin"}, + {"ParaRightMargin", "ParaRightMargin"}, + {"ParaTopMargin", "ParaTopMargin"}}; return s_aShapePropertyMapForParagraphProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForFillProperties() +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForFillProperties() { //shape property -- chart model object property - static tMakePropertyNameMap s_aShapePropertyMapForFillProperties = - tMakePropertyNameMap - ( "FillBackground", "FillBackground" ) - ( "FillBitmapName", "FillBitmapName" ) - ( "FillColor", "FillColor" ) - ( "FillGradientName", "FillGradientName" ) - ( "FillGradientStepCount", "FillGradientStepCount" ) - ( "FillHatchName", "FillHatchName" ) - ( "FillStyle", "FillStyle" ) - ( "FillTransparence", "FillTransparence" ) - ( "FillTransparenceGradientName", "FillTransparenceGradientName" ) + static tPropertyNameMap s_aShapePropertyMapForFillProperties{ + {"FillBackground", "FillBackground"}, + {"FillBitmapName", "FillBitmapName"}, + {"FillColor", "FillColor"}, + {"FillGradientName", "FillGradientName"}, + {"FillGradientStepCount", "FillGradientStepCount"}, + {"FillHatchName", "FillHatchName"}, + {"FillStyle", "FillStyle"}, + {"FillTransparence", "FillTransparence"}, + {"FillTransparenceGradientName", "FillTransparenceGradientName"}, //bitmap properties - ( "FillBitmapMode", "FillBitmapMode" ) - ( "FillBitmapSizeX", "FillBitmapSizeX" ) - ( "FillBitmapSizeY", "FillBitmapSizeY" ) - ( "FillBitmapLogicalSize", "FillBitmapLogicalSize" ) - ( "FillBitmapOffsetX", "FillBitmapOffsetX" ) - ( "FillBitmapOffsetY", "FillBitmapOffsetY" ) - ( "FillBitmapRectanglePoint", "FillBitmapRectanglePoint" ) - ( "FillBitmapPositionOffsetX", "FillBitmapPositionOffsetX" ) - ( "FillBitmapPositionOffsetY", "FillBitmapPositionOffsetY" ) - ; + {"FillBitmapMode", "FillBitmapMode"}, + {"FillBitmapSizeX", "FillBitmapSizeX"}, + {"FillBitmapSizeY", "FillBitmapSizeY"}, + {"FillBitmapLogicalSize", "FillBitmapLogicalSize"}, + {"FillBitmapOffsetX", "FillBitmapOffsetX"}, + {"FillBitmapOffsetY", "FillBitmapOffsetY"}, + {"FillBitmapRectanglePoint", "FillBitmapRectanglePoint"}, + {"FillBitmapPositionOffsetX", "FillBitmapPositionOffsetX"}, + {"FillBitmapPositionOffsetY", "FillBitmapPositionOffsetY"}}; return s_aShapePropertyMapForFillProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForLineProperties() +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForLineProperties() { //shape property -- chart model object property - static tMakePropertyNameMap s_aShapePropertyMapForLineProperties = - tMakePropertyNameMap - ( "LineColor", "LineColor" ) - ( "LineDashName", "LineDashName" ) - ( "LineJoint", "LineJoint" ) - ( "LineStyle", "LineStyle" ) - ( "LineTransparence", "LineTransparence" ) - ( "LineWidth", "LineWidth" ) - ; + static tPropertyNameMap s_aShapePropertyMapForLineProperties{ + {"LineColor", "LineColor"}, + {"LineDashName", "LineDashName"}, + {"LineJoint", "LineJoint"}, + {"LineStyle", "LineStyle"}, + {"LineTransparence", "LineTransparence"}, + {"LineWidth", "LineWidth"}}; return s_aShapePropertyMapForLineProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForFillAndLineProperties() +namespace { + tPropertyNameMap getPropertyNameMapForFillAndLineProperties_() { + auto map = PropertyMapper::getPropertyNameMapForFillProperties(); + auto const & add + = PropertyMapper::getPropertyNameMapForLineProperties(); + map.insert(add.begin(), add.end()); + return map; + } +} +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForFillAndLineProperties() { - static tMakePropertyNameMap s_aShapePropertyMapForFillAndLineProperties = - tMakePropertyNameMap - ( PropertyMapper::getPropertyNameMapForFillProperties() ) - ( PropertyMapper::getPropertyNameMapForLineProperties() ) - ; - + static tPropertyNameMap s_aShapePropertyMapForFillAndLineProperties + = getPropertyNameMapForFillAndLineProperties_(); return s_aShapePropertyMapForFillAndLineProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForTextShapeProperties() +namespace { + tPropertyNameMap getPropertyNameMapForTextShapeProperties_() { + auto map = PropertyMapper::getPropertyNameMapForCharacterProperties(); + auto const & add1 + = PropertyMapper::getPropertyNameMapForFillProperties(); + map.insert(add1.begin(), add1.end()); + auto const & add2 + = PropertyMapper::getPropertyNameMapForLineProperties(); + map.insert(add2.begin(), add2.end()); + return map; + } +} +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForTextShapeProperties() { - static tMakePropertyNameMap s_aShapePropertyMapForTextShapeProperties = - tMakePropertyNameMap - ( PropertyMapper::getPropertyNameMapForCharacterProperties() ) - ( PropertyMapper::getPropertyNameMapForFillProperties() ) - ( PropertyMapper::getPropertyNameMapForLineProperties() ); - + static tPropertyNameMap s_aShapePropertyMapForTextShapeProperties + = getPropertyNameMapForTextShapeProperties_(); return s_aShapePropertyMapForTextShapeProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForLineSeriesProperties() +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForLineSeriesProperties() { //shape property -- chart model object property - static tMakePropertyNameMap s_aShapePropertyMapForLineSeriesProperties = - tMakePropertyNameMap - ( "LineColor", "Color" ) - ( "LineDashName", "LineDashName" ) - ( "LineStyle", "LineStyle" ) - ( "LineTransparence", "Transparency" ) - ( "LineWidth", "LineWidth" ) - - ; + static tPropertyNameMap s_aShapePropertyMapForLineSeriesProperties{ + {"LineColor", "Color"}, + {"LineDashName", "LineDashName"}, + {"LineStyle", "LineStyle"}, + {"LineTransparence", "Transparency"}, + {"LineWidth", "LineWidth"}}; return s_aShapePropertyMapForLineSeriesProperties; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForTextLabelProperties() +namespace { + tPropertyNameMap getPropertyNameMapForTextLabelProperties_() { + auto map = PropertyMapper::getPropertyNameMapForCharacterProperties(); + map.insert({ + {"LineStyle", CHART_UNONAME_LABEL_BORDER_STYLE}, + {"LineWidth", CHART_UNONAME_LABEL_BORDER_WIDTH}, + {"LineColor", CHART_UNONAME_LABEL_BORDER_COLOR}, + {"LineTransparence", CHART_UNONAME_LABEL_BORDER_TRANS}}); + // fix the spelling! + return map; + } +} +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForTextLabelProperties() { // target name (drawing layer) : source name (chart model) - static tMakePropertyNameMap aMap = tMakePropertyNameMap - ( getPropertyNameMapForCharacterProperties() ) - ( "LineStyle", CHART_UNONAME_LABEL_BORDER_STYLE ) - ( "LineWidth", CHART_UNONAME_LABEL_BORDER_WIDTH ) - ( "LineColor", CHART_UNONAME_LABEL_BORDER_COLOR ) - ( "LineTransparence", CHART_UNONAME_LABEL_BORDER_TRANS ) // fix the spelling! - ; + static tPropertyNameMap aMap = getPropertyNameMapForTextLabelProperties_(); return aMap; } -const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForFilledSeriesProperties() +const tPropertyNameMap& PropertyMapper::getPropertyNameMapForFilledSeriesProperties() { //shape property -- chart model object property - static tMakePropertyNameMap s_aShapePropertyMapForFilledSeriesProperties = - tMakePropertyNameMap - ( "FillBackground", "FillBackground" ) - ( "FillBitmapName", "FillBitmapName" ) - ( "FillColor", "Color" ) - ( "FillGradientName", "GradientName" ) - ( "FillGradientStepCount", "GradientStepCount" ) - ( "FillHatchName", "HatchName" ) - ( "FillStyle", "FillStyle" ) - ( "FillTransparence", "Transparency" ) - ( "FillTransparenceGradientName", "TransparencyGradientName" ) + static tPropertyNameMap s_aShapePropertyMapForFilledSeriesProperties{ + {"FillBackground", "FillBackground"}, + {"FillBitmapName", "FillBitmapName"}, + {"FillColor", "Color"}, + {"FillGradientName", "GradientName"}, + {"FillGradientStepCount", "GradientStepCount"}, + {"FillHatchName", "HatchName"}, + {"FillStyle", "FillStyle"}, + {"FillTransparence", "Transparency"}, + {"FillTransparenceGradientName", "TransparencyGradientName"}, //bitmap properties - ( "FillBitmapMode", "FillBitmapMode" ) - ( "FillBitmapSizeX", "FillBitmapSizeX" ) - ( "FillBitmapSizeY", "FillBitmapSizeY" ) - ( "FillBitmapLogicalSize", "FillBitmapLogicalSize" ) - ( "FillBitmapOffsetX", "FillBitmapOffsetX" ) - ( "FillBitmapOffsetY", "FillBitmapOffsetY" ) - ( "FillBitmapRectanglePoint", "FillBitmapRectanglePoint" ) - ( "FillBitmapPositionOffsetX", "FillBitmapPositionOffsetX" ) - ( "FillBitmapPositionOffsetY", "FillBitmapPositionOffsetY" ) + {"FillBitmapMode", "FillBitmapMode"}, + {"FillBitmapSizeX", "FillBitmapSizeX"}, + {"FillBitmapSizeY", "FillBitmapSizeY"}, + {"FillBitmapLogicalSize", "FillBitmapLogicalSize"}, + {"FillBitmapOffsetX", "FillBitmapOffsetX"}, + {"FillBitmapOffsetY", "FillBitmapOffsetY"}, + {"FillBitmapRectanglePoint", "FillBitmapRectanglePoint"}, + {"FillBitmapPositionOffsetX", "FillBitmapPositionOffsetX"}, + {"FillBitmapPositionOffsetY", "FillBitmapPositionOffsetY"}, //line properties - ( "LineColor", "BorderColor" ) - ( "LineDashName", "BorderDashName" ) - ( "LineStyle", "BorderStyle" ) - ( "LineTransparence", "BorderTransparency" ) - ( "LineWidth", "BorderWidth" ) - ; + {"LineColor", "BorderColor"}, + {"LineDashName", "BorderDashName"}, + {"LineStyle", "BorderStyle"}, + {"LineTransparence", "BorderTransparency"}, + {"LineWidth", "BorderWidth"}}; return s_aShapePropertyMapForFilledSeriesProperties; } @@ -441,7 +448,7 @@ void PropertyMapper::getTextLabelMultiPropertyLists( { //fill character properties into the ValueMap tPropertyNameValueMap aValueMap; - tMakePropertyNameMap aNameMap = bSupportsLabelBorder ? PropertyMapper::getPropertyNameMapForTextLabelProperties() : getPropertyNameMapForCharacterProperties(); + tPropertyNameMap const & aNameMap = bSupportsLabelBorder ? PropertyMapper::getPropertyNameMapForTextLabelProperties() : getPropertyNameMapForCharacterProperties(); PropertyMapper::getValueMap(aValueMap, aNameMap, xSourceProp); diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index fe022f0..be3064f 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -24,7 +24,6 @@ #include "macros.hxx" #include "RelativeSizeHelper.hxx" #include "PropertyMapper.hxx" -#include <comphelper/InlineContainer.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/drawing/CircleKind.hpp> #include <com/sun/star/drawing/DoubleSequence.hpp> @@ -2268,8 +2267,9 @@ uno::Reference< drawing::XShape > tPropertyNameValueMap aValueMap; //fill line-, fill- and paragraph-properties into the ValueMap { - tMakePropertyNameMap aNameMap = PropertyMapper::getPropertyNameMapForParagraphProperties(); - aNameMap( PropertyMapper::getPropertyNameMapForFillAndLineProperties() ); + tPropertyNameMap aNameMap = PropertyMapper::getPropertyNameMapForParagraphProperties(); + auto const & add = PropertyMapper::getPropertyNameMapForFillAndLineProperties(); + aNameMap.insert(add.begin(), add.end()); PropertyMapper::getValueMap( aValueMap, aNameMap, xTextProperties ); } diff --git a/include/comphelper/InlineContainer.hxx b/include/comphelper/InlineContainer.hxx deleted file mode 100644 index 1c2aa7d..0000000 --- a/include/comphelper/InlineContainer.hxx +++ /dev/null @@ -1,65 +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 . - */ -#ifndef INCLUDED_COMPHELPER_INLINECONTAINER_HXX -#define INCLUDED_COMPHELPER_INLINECONTAINER_HXX - -#include <map> - -namespace comphelper -{ - -/** usage: - - map< k, v > aMap( MakeMap< k, v > - ( key_1, value_1 ) - ( key_2, value_2 ) - ( key_3, value_3 ) - ... - ( key_n, value_n ) - ); - */ -template < typename Key, typename Value > -class MakeMap : public ::std::map< Key, Value > -{ -private: - typedef typename ::std::map< Key, Value >::value_type value_type; -public: - explicit MakeMap( const Key &k, const Value &v ) - { - this->insert( value_type( k, v ) ); - } - MakeMap &operator()( const Key &k, const Value &v ) - { - this->insert( value_type( k, v ) ); - return *this; - } - - MakeMap &operator()( const MakeMap& rSource ) - { - this->insert(rSource.begin(),rSource.end()); - return *this; - } -}; - -} // namespace comphelper - -#endif -// INCLUDED_COMPHELPER_INLINECONTAINER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 2618566..34b1a3e 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -20,7 +20,6 @@ #include "SchXMLTools.hxx" #include <rtl/ustrbuf.hxx> -#include <comphelper/InlineContainer.hxx> #include <xmloff/xmluconv.hxx> #include <xmloff/xmlement.hxx> #include <xmloff/xmlimppr.hxx> @@ -48,6 +47,7 @@ #include <comphelper/processfactory.hxx> #include <algorithm> +#include <map> using namespace com::sun::star; using namespace ::xmloff::token; @@ -153,47 +153,34 @@ SchXMLChartTypeEnum GetChartTypeEnum( const OUString& rClassName ) return SchXMLChartTypeEnum(nEnumVal); } -typedef ::comphelper::MakeMap< OUString, OUString > tMakeStringStringMap; +typedef std::map< OUString, OUString > tMakeStringStringMap; //static const tMakeStringStringMap& lcl_getChartTypeNameMap() { //shape property -- chart model object property - static const tMakeStringStringMap g_aChartTypeNameMap = - tMakeStringStringMap - ( OUString( "com.sun.star.chart.LineDiagram" ) - , OUString( "com.sun.star.chart2.LineChartType" ) ) - - ( OUString( "com.sun.star.chart.AreaDiagram" ) - , OUString( "com.sun.star.chart2.AreaChartType" ) ) - - ( OUString( "com.sun.star.chart.BarDiagram" ) - , OUString( "com.sun.star.chart2.ColumnChartType" ) ) - - ( OUString( "com.sun.star.chart.PieDiagram" ) - , OUString( "com.sun.star.chart2.PieChartType" ) ) - - ( OUString( "com.sun.star.chart.DonutDiagram" ) - , OUString( "com.sun.star.chart2.DonutChartType" ) ) - - ( OUString( "com.sun.star.chart.XYDiagram" ) - , OUString( "com.sun.star.chart2.ScatterChartType" ) ) - - ( OUString( "com.sun.star.chart.NetDiagram" ) - , OUString( "com.sun.star.chart2.NetChartType" ) ) - - ( OUString( "com.sun.star.chart.FilledNetDiagram" ) - , OUString( "com.sun.star.chart2.FilledNetChartType" ) ) - - ( OUString( "com.sun.star.chart.StockDiagram" ) - , OUString( "com.sun.star.chart2.CandleStickChartType" ) ) - - ( OUString( "com.sun.star.chart.BubbleDiagram" ) - , OUString( "com.sun.star.chart2.BubbleChartType" ) ) - - ( OUString( "com.sun.star.chart.GL3DBarDiagram" ) - , OUString( "com.sun.star.chart2.GL3DBarChartType" ) ) - - ; + static const tMakeStringStringMap g_aChartTypeNameMap{ + {"com.sun.star.chart.LineDiagram", + "com.sun.star.chart2.LineChartType"}, + {"com.sun.star.chart.AreaDiagram", + "com.sun.star.chart2.AreaChartType"}, + {"com.sun.star.chart.BarDiagram", + "com.sun.star.chart2.ColumnChartType"}, + {"com.sun.star.chart.PieDiagram", + "com.sun.star.chart2.PieChartType"}, + {"com.sun.star.chart.DonutDiagram", + "com.sun.star.chart2.DonutChartType"}, + {"com.sun.star.chart.XYDiagram", + "com.sun.star.chart2.ScatterChartType"}, + {"com.sun.star.chart.NetDiagram", + "com.sun.star.chart2.NetChartType"}, + {"com.sun.star.chart.FilledNetDiagram", + "com.sun.star.chart2.FilledNetChartType"}, + {"com.sun.star.chart.StockDiagram", + "com.sun.star.chart2.CandleStickChartType"}, + {"com.sun.star.chart.BubbleDiagram", + "com.sun.star.chart2.BubbleChartType"}, + {"com.sun.star.chart.GL3DBarDiagram", + "com.sun.star.chart2.GL3DBarChartType"}}; return g_aChartTypeNameMap; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits