Line data Source code
1 :
2 : #include "doctok/sprmids.hxx"
3 : #include "doctok/resourceids.hxx"
4 : #include "ooxml/resourceids.hxx"
5 : #include "OOXMLFactory_values.hxx"
6 : #include "OOXMLFactory_dml-shapeProperties.hxx"
7 : #include "ooxml/OOXMLFastHelper.hxx"
8 :
9 : #ifdef _MSC_VER
10 : #pragma warning(disable:4065) // switch statement contains 'default' but no 'case' labels
11 : #endif
12 :
13 : namespace writerfilter {
14 : namespace ooxml {
15 :
16 : /// @cond GENERATED
17 :
18 : typedef rtl::Static < osl::Mutex, OOXMLFactory_dml_shapeProperties > OOXMLFactory_dml_shapeProperties_Mutex;
19 :
20 2 : OOXMLFactory_dml_shapeProperties::OOXMLFactory_dml_shapeProperties()
21 : {
22 : // multi-thread-safe mutex for all platforms
23 :
24 2 : osl::MutexGuard aGuard(OOXMLFactory_dml_shapeProperties_Mutex::get());
25 2 : }
26 :
27 4 : OOXMLFactory_dml_shapeProperties::~OOXMLFactory_dml_shapeProperties()
28 : {
29 4 : }
30 :
31 5 : OOXMLFactory_ns::Pointer_t OOXMLFactory_dml_shapeProperties::m_pInstance;
32 :
33 426 : OOXMLFactory_ns::Pointer_t OOXMLFactory_dml_shapeProperties::getInstance()
34 : {
35 426 : if (m_pInstance.get() == NULL)
36 2 : m_pInstance.reset(new OOXMLFactory_dml_shapeProperties());
37 :
38 426 : return m_pInstance;
39 : }
40 :
41 0 : AttributeToResourceMapPointer OOXMLFactory_dml_shapeProperties::createAttributeToResourceMap(Id nId)
42 : {
43 0 : AttributeToResourceMapPointer pMap(new AttributeToResourceMap());
44 :
45 0 : switch (nId)
46 : {
47 : case NN_dml_shapeProperties|DEFINE_CT_ShapeProperties:
48 : // CT_ShapeProperties
49 : // empty resource: OOXML_bwMode
50 0 : break;
51 : case NN_dml_shapeProperties|DEFINE_CT_GroupShapeProperties:
52 : // CT_GroupShapeProperties
53 : // empty resource: OOXML_bwMode
54 0 : break;
55 : default:
56 0 : break;
57 : }
58 :
59 0 : return pMap;
60 : }
61 :
62 0 : ListValueMapPointer OOXMLFactory_dml_shapeProperties::createListValueMap(Id nId)
63 : {
64 0 : ListValueMapPointer pMap(new ListValueMap());
65 :
66 : switch (nId)
67 : {
68 : default:
69 0 : break;
70 : }
71 :
72 0 : return pMap;
73 : }
74 6 : CreateElementMapPointer OOXMLFactory_dml_shapeProperties::createCreateElementMap(Id nId)
75 : {
76 6 : CreateElementMapPointer pMap(new CreateElementMap());
77 :
78 6 : switch (nId)
79 : {
80 : case NN_dml_shapeProperties|DEFINE_CT_ShapeProperties:
81 : /* ref: EG_Geometry*/
82 0 : (*pMap)[NS_drawingml|OOXML_custGeom] = CreateElement(RT_Properties, NN_dml_shapeGeometry|DEFINE_CT_CustomGeometry2D);
83 0 : (*pMap)[NS_drawingml|OOXML_prstGeom] = CreateElement(RT_Properties, NN_dml_shapeGeometry|DEFINE_CT_PresetGeometry2D);
84 : /* ref: EG_FillProperties*/
85 0 : (*pMap)[NS_drawingml|OOXML_solidFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_SolidColorFillProperties);
86 0 : (*pMap)[NS_drawingml|OOXML_blipFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_BlipFillProperties);
87 : /* ref: EG_EffectProperties*/
88 0 : (*pMap)[NS_drawingml|OOXML_effectDag] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_EffectContainer);
89 0 : (*pMap)[NS_drawingml|OOXML_xfrm] = CreateElement(RT_Properties, NN_dml_baseTypes|DEFINE_CT_Transform2D);
90 0 : (*pMap)[NS_drawingml|OOXML_ln] = CreateElement(RT_Properties, NN_dml_shapeLineProperties|DEFINE_CT_LineProperties);
91 0 : break;
92 : case NN_dml_shapeProperties|DEFINE_CT_GroupShapeProperties:
93 : /* ref: EG_FillProperties*/
94 0 : (*pMap)[NS_drawingml|OOXML_solidFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_SolidColorFillProperties);
95 0 : (*pMap)[NS_drawingml|OOXML_blipFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_BlipFillProperties);
96 : /* ref: EG_EffectProperties*/
97 0 : (*pMap)[NS_drawingml|OOXML_effectDag] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_EffectContainer);
98 0 : break;
99 : default:
100 6 : break;
101 : }
102 :
103 6 : return pMap;
104 : }
105 :
106 0 : void OOXMLFactory_dml_shapeProperties::charactersAction(OOXMLFastContextHandler*, const OUString &)
107 : {
108 0 : }
109 :
110 0 : string OOXMLFactory_dml_shapeProperties::getDefineName(Id nId) const
111 : {
112 0 : static IdToStringMapPointer pMap;
113 :
114 0 : if (pMap.get() == NULL)
115 : {
116 0 : pMap = IdToStringMapPointer(new IdToStringMap());
117 :
118 :
119 0 : (*pMap)[NN_dml_shapeProperties|DEFINE_CT_ShapeProperties] = "CT_ShapeProperties";
120 0 : (*pMap)[NN_dml_shapeProperties|DEFINE_CT_GroupShapeProperties] = "CT_GroupShapeProperties";
121 : }
122 :
123 0 : return (*pMap)[nId];
124 : }
125 :
126 :
127 6 : TokenToIdMapPointer OOXMLFactory_dml_shapeProperties::createTokenToIdMap(Id nId)
128 : {
129 6 : TokenToIdMapPointer pMap(new TokenToIdMap());
130 :
131 6 : switch (nId)
132 : {
133 : case NN_dml_shapeProperties|DEFINE_CT_ShapeProperties:
134 : // EG_Geometry
135 0 : (*pMap)[NS_drawingml|OOXML_custGeom] = NS_ooxml::LN_EG_Geometry_custGeom;
136 0 : (*pMap)[NS_drawingml|OOXML_prstGeom] = NS_ooxml::LN_EG_Geometry_prstGeom;
137 : // CT_ShapeProperties
138 0 : (*pMap)[NS_drawingml|OOXML_xfrm] = NS_ooxml::LN_CT_ShapeProperties_xfrm;
139 0 : (*pMap)[NS_drawingml|OOXML_ln] = NS_ooxml::LN_CT_ShapeProperties_ln;
140 0 : (*pMap)[NS_drawingml|OOXML_scene3d] = NS_ooxml::LN_CT_ShapeProperties_scene3d;
141 0 : (*pMap)[NS_drawingml|OOXML_sp3d] = NS_ooxml::LN_CT_ShapeProperties_sp3d;
142 0 : (*pMap)[NS_drawingml|OOXML_extLst] = NS_ooxml::LN_CT_ShapeProperties_extLst;
143 0 : (*pMap)[OOXML_bwMode] = NS_ooxml::LN_CT_ShapeProperties_bwMode;
144 0 : break;
145 : default:
146 6 : break;
147 : }
148 :
149 6 : return pMap;
150 : }
151 :
152 0 : void OOXMLFactory_dml_shapeProperties::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
153 : {
154 0 : }
155 :
156 : #ifdef DEBUG_FACTORY
157 : string OOXMLFactory_dml_shapeProperties::getName() const
158 : {
159 : return "dml-shapeProperties";
160 : }
161 : #endif
162 :
163 : /// @endcond
164 15 : }}
|