Kaydet (Commit) a82805f8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Kill comphelper::MakeMap

Change-Id: I97e9e79ef51e3d78f01b831dd3eee91218058823
Reviewed-on: https://gerrit.libreoffice.org/24344Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 2b68383e
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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;
}
......
......@@ -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>
......
......@@ -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;
}
......
......@@ -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"
......
......@@ -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>
......
......@@ -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>
......
......@@ -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
{
......
......@@ -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;
}
......
......@@ -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;
}}
......
......@@ -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;
};
......
......@@ -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;
}
......
......@@ -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;
};
......
......@@ -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;
}
......
......@@ -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;
};
......
......@@ -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;
};
......
......@@ -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>
......
......@@ -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;
}
}
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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>
......
......@@ -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 );
}
......
......@@ -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 );
}
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*