tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / svx / source / customshapes / EnhancedCustomShapeTypeNames.cxx
blob2419930a28d8b182a33b7ad57fc1e21e3c2d6be2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <svx/EnhancedCustomShapeTypeNames.hxx>
21 #include <unordered_map>
23 namespace {
25 struct NameTypeTable
27 OUString pS;
28 MSO_SPT pE;
33 constexpr NameTypeTable pNameTypeTableArray[] =
35 { u"non-primitive"_ustr, mso_sptMin },
36 { u"rectangle"_ustr, mso_sptRectangle },
37 { u"round-rectangle"_ustr, mso_sptRoundRectangle },
38 { u"ellipse"_ustr, mso_sptEllipse },
39 { u"diamond"_ustr, mso_sptDiamond },
40 { u"isosceles-triangle"_ustr, mso_sptIsocelesTriangle },
41 { u"right-triangle"_ustr, mso_sptRightTriangle },
42 { u"parallelogram"_ustr, mso_sptParallelogram },
43 { u"trapezoid"_ustr, mso_sptTrapezoid },
44 { u"hexagon"_ustr, mso_sptHexagon },
45 { u"octagon"_ustr, mso_sptOctagon },
46 { u"cross"_ustr, mso_sptPlus },
47 { u"star5"_ustr, mso_sptStar },
48 { u"right-arrow"_ustr, mso_sptArrow },
49 { u"mso-spt14"_ustr, mso_sptThickArrow },
50 { u"pentagon-right"_ustr, mso_sptHomePlate },
51 { u"cube"_ustr, mso_sptCube },
52 { u"mso-spt17"_ustr, mso_sptBalloon },
53 { u"mso-spt18"_ustr, mso_sptSeal },
54 { u"mso-spt19"_ustr, mso_sptArc },
55 { u"mso-spt20"_ustr, mso_sptLine },
56 { u"mso-spt21"_ustr, mso_sptPlaque },
57 { u"can"_ustr, mso_sptCan },
58 { u"ring"_ustr, mso_sptDonut },
59 { u"mso-spt24"_ustr, mso_sptTextSimple },
60 { u"mso-spt25"_ustr, mso_sptTextOctagon },
61 { u"mso-spt26"_ustr, mso_sptTextHexagon },
62 { u"mso-spt27"_ustr, mso_sptTextCurve },
63 { u"mso-spt28"_ustr, mso_sptTextWave },
64 { u"mso-spt29"_ustr, mso_sptTextRing },
65 { u"mso-spt30"_ustr, mso_sptTextOnCurve },
66 { u"mso-spt31"_ustr, mso_sptTextOnRing },
67 { u"mso-spt32"_ustr, mso_sptStraightConnector1 },
68 { u"mso-spt33"_ustr, mso_sptBentConnector2 },
69 { u"mso-spt34"_ustr, mso_sptBentConnector3 },
70 { u"mso-spt35"_ustr, mso_sptBentConnector4 },
71 { u"mso-spt36"_ustr, mso_sptBentConnector5 },
72 { u"mso-spt37"_ustr, mso_sptCurvedConnector2 },
73 { u"mso-spt38"_ustr, mso_sptCurvedConnector3 },
74 { u"mso-spt39"_ustr, mso_sptCurvedConnector4 },
75 { u"mso-spt40"_ustr, mso_sptCurvedConnector5 },
76 { u"mso-spt41"_ustr, mso_sptCallout1 },
77 { u"mso-spt42"_ustr, mso_sptCallout2 },
78 { u"mso-spt43"_ustr, mso_sptCallout3 },
79 { u"mso-spt44"_ustr, mso_sptAccentCallout1 },
80 { u"mso-spt45"_ustr, mso_sptAccentCallout2 },
81 { u"mso-spt46"_ustr, mso_sptAccentCallout3 },
82 { u"line-callout-1"_ustr, mso_sptBorderCallout1 },
83 { u"line-callout-2"_ustr, mso_sptBorderCallout2 },
84 { u"mso-spt49"_ustr, mso_sptBorderCallout3 },
85 { u"mso-spt50"_ustr, mso_sptAccentBorderCallout1 },
86 { u"mso-spt51"_ustr, mso_sptAccentBorderCallout2 },
87 { u"mso-spt52"_ustr, mso_sptAccentBorderCallout3 },
88 { u"mso-spt53"_ustr, mso_sptRibbon },
89 { u"mso-spt54"_ustr, mso_sptRibbon2 },
90 { u"chevron"_ustr, mso_sptChevron },
91 { u"pentagon"_ustr, mso_sptPentagon },
92 { u"forbidden"_ustr, mso_sptNoSmoking },
93 { u"star8"_ustr, mso_sptSeal8 },
94 { u"mso-spt59"_ustr, mso_sptSeal16 },
95 { u"mso-spt60"_ustr, mso_sptSeal32 },
96 { u"rectangular-callout"_ustr, mso_sptWedgeRectCallout },
97 { u"round-rectangular-callout"_ustr, mso_sptWedgeRRectCallout },
98 { u"round-callout"_ustr, mso_sptWedgeEllipseCallout },
99 { u"mso-spt64"_ustr, mso_sptWave },
100 { u"paper"_ustr, mso_sptFoldedCorner },
101 { u"left-arrow"_ustr, mso_sptLeftArrow },
102 { u"down-arrow"_ustr, mso_sptDownArrow },
103 { u"up-arrow"_ustr, mso_sptUpArrow },
104 { u"left-right-arrow"_ustr, mso_sptLeftRightArrow },
105 { u"up-down-arrow"_ustr, mso_sptUpDownArrow },
106 { u"mso-spt71"_ustr, mso_sptIrregularSeal1 },
107 { u"bang"_ustr, mso_sptIrregularSeal2 },
108 { u"lightning"_ustr, mso_sptLightningBolt },
109 { u"heart"_ustr, mso_sptHeart },
110 { u"mso-spt75"_ustr, mso_sptPictureFrame },
111 { u"quad-arrow"_ustr, mso_sptQuadArrow },
112 { u"left-arrow-callout"_ustr, mso_sptLeftArrowCallout },
113 { u"right-arrow-callout"_ustr, mso_sptRightArrowCallout },
114 { u"up-arrow-callout"_ustr, mso_sptUpArrowCallout },
115 { u"down-arrow-callout"_ustr, mso_sptDownArrowCallout },
116 { u"left-right-arrow-callout"_ustr, mso_sptLeftRightArrowCallout },
117 { u"up-down-arrow-callout"_ustr, mso_sptUpDownArrowCallout },
118 { u"quad-arrow-callout"_ustr, mso_sptQuadArrowCallout },
119 { u"quad-bevel"_ustr, mso_sptBevel },
120 { u"left-bracket"_ustr, mso_sptLeftBracket },
121 { u"right-bracket"_ustr, mso_sptRightBracket },
122 { u"left-brace"_ustr, mso_sptLeftBrace },
123 { u"right-brace"_ustr, mso_sptRightBrace },
124 { u"mso-spt89"_ustr, mso_sptLeftUpArrow },
125 { u"mso-spt90"_ustr, mso_sptBentUpArrow },
126 { u"mso-spt91"_ustr, mso_sptBentArrow },
127 { u"star24"_ustr, mso_sptSeal24 },
128 { u"striped-right-arrow"_ustr, mso_sptStripedRightArrow },
129 { u"notched-right-arrow"_ustr, mso_sptNotchedRightArrow },
130 { u"block-arc"_ustr, mso_sptBlockArc },
131 { u"smiley"_ustr, mso_sptSmileyFace },
132 { u"vertical-scroll"_ustr, mso_sptVerticalScroll },
133 { u"horizontal-scroll"_ustr, mso_sptHorizontalScroll },
134 { u"circular-arrow"_ustr, mso_sptCircularArrow },
135 { u"mso-spt100"_ustr, mso_sptNotchedCircularArrow },
136 { u"mso-spt101"_ustr, mso_sptUturnArrow },
137 { u"mso-spt102"_ustr, mso_sptCurvedRightArrow },
138 { u"mso-spt103"_ustr, mso_sptCurvedLeftArrow },
139 { u"mso-spt104"_ustr, mso_sptCurvedUpArrow },
140 { u"mso-spt105"_ustr, mso_sptCurvedDownArrow },
141 { u"cloud-callout"_ustr, mso_sptCloudCallout },
142 { u"mso-spt107"_ustr, mso_sptEllipseRibbon },
143 { u"mso-spt108"_ustr, mso_sptEllipseRibbon2 },
144 { u"flowchart-process"_ustr, mso_sptFlowChartProcess },
145 { u"flowchart-decision"_ustr, mso_sptFlowChartDecision },
146 { u"flowchart-data"_ustr, mso_sptFlowChartInputOutput },
147 { u"flowchart-predefined-process"_ustr, mso_sptFlowChartPredefinedProcess },
148 { u"flowchart-internal-storage"_ustr, mso_sptFlowChartInternalStorage },
149 { u"flowchart-document"_ustr, mso_sptFlowChartDocument },
150 { u"flowchart-multidocument"_ustr, mso_sptFlowChartMultidocument },
151 { u"flowchart-terminator"_ustr, mso_sptFlowChartTerminator },
152 { u"flowchart-preparation"_ustr, mso_sptFlowChartPreparation },
153 { u"flowchart-manual-input"_ustr, mso_sptFlowChartManualInput },
154 { u"flowchart-manual-operation"_ustr, mso_sptFlowChartManualOperation },
155 { u"flowchart-connector"_ustr, mso_sptFlowChartConnector },
156 { u"flowchart-card"_ustr, mso_sptFlowChartPunchedCard },
157 { u"flowchart-punched-tape"_ustr, mso_sptFlowChartPunchedTape },
158 { u"flowchart-summing-junction"_ustr, mso_sptFlowChartSummingJunction },
159 { u"flowchart-or"_ustr, mso_sptFlowChartOr },
160 { u"flowchart-collate"_ustr, mso_sptFlowChartCollate },
161 { u"flowchart-sort"_ustr, mso_sptFlowChartSort },
162 { u"flowchart-extract"_ustr, mso_sptFlowChartExtract },
163 { u"flowchart-merge"_ustr, mso_sptFlowChartMerge },
164 { u"mso-spt129"_ustr, mso_sptFlowChartOfflineStorage },
165 { u"flowchart-stored-data"_ustr, mso_sptFlowChartOnlineStorage },
166 { u"flowchart-sequential-access"_ustr, mso_sptFlowChartMagneticTape },
167 { u"flowchart-magnetic-disk"_ustr, mso_sptFlowChartMagneticDisk },
168 { u"flowchart-direct-access-storage"_ustr, mso_sptFlowChartMagneticDrum },
169 { u"flowchart-display"_ustr, mso_sptFlowChartDisplay },
170 { u"flowchart-delay"_ustr, mso_sptFlowChartDelay },
171 { u"fontwork-plain-text"_ustr, mso_sptTextPlainText },
172 { u"fontwork-stop"_ustr, mso_sptTextStop },
173 { u"fontwork-triangle-up"_ustr, mso_sptTextTriangle },
174 { u"fontwork-triangle-down"_ustr, mso_sptTextTriangleInverted },
175 { u"fontwork-chevron-up"_ustr, mso_sptTextChevron },
176 { u"fontwork-chevron-down"_ustr, mso_sptTextChevronInverted },
177 { u"mso-spt142"_ustr, mso_sptTextRingInside },
178 { u"mso-spt143"_ustr, mso_sptTextRingOutside },
179 { u"fontwork-arch-up-curve"_ustr, mso_sptTextArchUpCurve },
180 { u"fontwork-arch-down-curve"_ustr, mso_sptTextArchDownCurve },
181 { u"fontwork-circle-curve"_ustr, mso_sptTextCircleCurve },
182 { u"fontwork-open-circle-curve"_ustr, mso_sptTextButtonCurve },
183 { u"fontwork-arch-up-pour"_ustr, mso_sptTextArchUpPour },
184 { u"fontwork-arch-down-pour"_ustr, mso_sptTextArchDownPour },
185 { u"fontwork-circle-pour"_ustr, mso_sptTextCirclePour },
186 { u"fontwork-open-circle-pour"_ustr, mso_sptTextButtonPour },
187 { u"fontwork-curve-up"_ustr, mso_sptTextCurveUp },
188 { u"fontwork-curve-down"_ustr, mso_sptTextCurveDown },
189 { u"fontwork-fade-up-and-right"_ustr, mso_sptTextCascadeUp },
190 { u"fontwork-fade-up-and-left"_ustr, mso_sptTextCascadeDown },
191 { u"fontwork-wave"_ustr, mso_sptTextWave1 },
192 { u"mso-spt157"_ustr, mso_sptTextWave2 },
193 { u"mso-spt158"_ustr, mso_sptTextWave3 },
194 { u"mso-spt159"_ustr, mso_sptTextWave4 },
195 { u"fontwork-inflate"_ustr, mso_sptTextInflate },
196 { u"mso-spt161"_ustr, mso_sptTextDeflate },
197 { u"mso-spt162"_ustr, mso_sptTextInflateBottom },
198 { u"mso-spt163"_ustr, mso_sptTextDeflateBottom },
199 { u"mso-spt164"_ustr, mso_sptTextInflateTop },
200 { u"mso-spt165"_ustr, mso_sptTextDeflateTop },
201 { u"mso-spt166"_ustr, mso_sptTextDeflateInflate },
202 { u"mso-spt167"_ustr, mso_sptTextDeflateInflateDeflate },
203 { u"fontwork-fade-right"_ustr, mso_sptTextFadeRight },
204 { u"fontwork-fade-left"_ustr, mso_sptTextFadeLeft },
205 { u"fontwork-fade-up"_ustr, mso_sptTextFadeUp },
206 { u"fontwork-fade-down"_ustr, mso_sptTextFadeDown },
207 { u"fontwork-slant-up"_ustr, mso_sptTextSlantUp },
208 { u"fontwork-slant-down"_ustr, mso_sptTextSlantDown },
209 { u"mso-spt174"_ustr, mso_sptTextCanUp },
210 { u"mso-spt175"_ustr, mso_sptTextCanDown },
211 { u"flowchart-alternate-process"_ustr, mso_sptFlowChartAlternateProcess },
212 { u"flowchart-off-page-connector"_ustr, mso_sptFlowChartOffpageConnector },
213 { u"mso-spt178"_ustr, mso_sptCallout90 },
214 { u"mso-spt179"_ustr, mso_sptAccentCallout90 },
215 { u"mso-spt180"_ustr, mso_sptBorderCallout90 },
216 { u"line-callout-3"_ustr, mso_sptAccentBorderCallout90 },
217 { u"mso-spt182"_ustr, mso_sptLeftRightUpArrow },
218 { u"sun"_ustr, mso_sptSun },
219 { u"moon"_ustr, mso_sptMoon },
220 { u"bracket-pair"_ustr, mso_sptBracketPair },
221 { u"brace-pair"_ustr, mso_sptBracePair },
222 { u"star4"_ustr, mso_sptSeal4 },
223 { u"mso-spt188"_ustr, mso_sptDoubleWave },
224 { u"mso-spt189"_ustr, mso_sptActionButtonBlank },
225 { u"mso-spt190"_ustr, mso_sptActionButtonHome },
226 { u"mso-spt191"_ustr, mso_sptActionButtonHelp },
227 { u"mso-spt192"_ustr, mso_sptActionButtonInformation },
228 { u"mso-spt193"_ustr, mso_sptActionButtonForwardNext },
229 { u"mso-spt194"_ustr, mso_sptActionButtonBackPrevious },
230 { u"mso-spt195"_ustr, mso_sptActionButtonEnd },
231 { u"mso-spt196"_ustr, mso_sptActionButtonBeginning },
232 { u"mso-spt197"_ustr, mso_sptActionButtonReturn },
233 { u"mso-spt198"_ustr, mso_sptActionButtonDocument },
234 { u"mso-spt199"_ustr, mso_sptActionButtonSound },
235 { u"mso-spt200"_ustr, mso_sptActionButtonMovie },
236 { u"mso-spt201"_ustr, mso_sptHostControl },
237 { u"mso-spt202"_ustr, mso_sptTextBox },
238 { u"teardrop"_ustr, mso_sptTearDrop },
239 { u"ooxml-rect"_ustr, mso_sptRectangle },
240 { u"sinusoid"_ustr, mso_sptSinusoid }
243 // gallery: quadrat
244 // gallery: round-quadrat
245 // gallery: circle
246 // gallery: circle-pie
247 // gallery: frame
248 // gallery: flower
249 // gallery: cloud
250 // gallery: puzzle
251 // gallery: octagon-bevel
252 // gallery: diamond-bevel
253 // gallery: up-right-arrow
254 // gallery: up-right-down-arrow
255 // gallery: corner-right-arrow
256 // gallery: split-arrow
257 // gallery: up-right-arrow-callout
258 // gallery: split-round-arrow
259 // gallery: s-sharped-arrow
260 // Gallery: star6
261 // Gallery: star12
262 // Gallery: concave-star6
263 // Gallery: signet
264 // Gallery: doorplate
265 // gallery: fontwork-arch-left-curve
266 // gallery: fontwork-arch-right-curve
267 // gallery: fontwork-arch-left-pour
268 // gallery: fontwork-arch-right-pour
271 typedef std::unordered_map< OUString, MSO_SPT> TypeNameHashMap;
273 static const TypeNameHashMap& GetTypeNameHashMap()
275 static TypeNameHashMap aMap = []()
277 TypeNameHashMap map;
278 for (auto const & i : pNameTypeTableArray)
279 map[i.pS] = i.pE;
280 return map;
281 }();
282 return aMap;
286 MSO_SPT EnhancedCustomShapeTypeNames::Get( const OUString& rShapeType )
288 const TypeNameHashMap & rTypeMap = GetTypeNameHashMap();
289 MSO_SPT eRetValue = mso_sptNil;
290 auto aHashIter = rTypeMap.find( rShapeType );
291 if ( aHashIter != rTypeMap.end() )
292 eRetValue = (*aHashIter).second;
293 return eRetValue;
296 OUString EnhancedCustomShapeTypeNames::Get( const MSO_SPT eShapeType )
298 return (eShapeType <= mso_sptTextBox && eShapeType >= mso_sptMin)
299 ? pNameTypeTableArray[ eShapeType ].pS
300 : OUString();
303 namespace {
305 struct ACCNameTypeTable
307 OUString pS;
308 OUString pE;
313 constexpr ACCNameTypeTable pACCNameTypeTableArray[]
315 { u"non-primitive"_ustr, u"Non Primitive Shape"_ustr },
316 { u"rectangle"_ustr, u"Rectangle"_ustr },
317 { u"round-rectangle"_ustr, u"Rounded Rectangle"_ustr },
318 { u"ellipse"_ustr, u"Ellipse"_ustr },
319 { u"diamond"_ustr, u"Diamond"_ustr },
320 { u"isosceles-triangle"_ustr, u"Triangle"_ustr },
321 { u"right-triangle"_ustr, u"Right Triangle"_ustr },
322 { u"parallelogram"_ustr, u"Parallelogram"_ustr },
323 { u"trapezoid"_ustr, u"Trapezoid"_ustr },
324 { u"hexagon"_ustr, u"Hexagon"_ustr },
325 { u"octagon"_ustr, u"Octagon"_ustr },
326 { u"cross"_ustr, u"Cross"_ustr },
327 { u"star5"_ustr, u"5-Point Star"_ustr },
328 { u"right-arrow"_ustr, u"Right Arrow"_ustr },
329 //{ u"mso-spt14", mso_sptThickArrow },
330 { u"pentagon-right"_ustr, u"Pentagon"_ustr },
331 { u"cube"_ustr, u"Cuboid"_ustr },
332 { u"mso-spt21"_ustr, u"Doorplate"_ustr },
333 /*{ u"mso-spt17", mso_sptBalloon },
334 { u"mso-spt18", mso_sptSeal },
335 { u"mso-spt19", mso_sptArc },
336 { u"mso-spt20", mso_sptLine },
337 { u"mso-spt21", mso_sptPlaque },
338 { u"can", mso_sptCan },*/
339 { u"ring"_ustr, u"Ring"_ustr },
340 /*{ u"mso-spt24", mso_sptTextSimple },
341 { u"mso-spt25", mso_sptTextOctagon },
342 { u"mso-spt26", mso_sptTextHexagon },
343 { u"mso-spt27", mso_sptTextCurve },
344 { u"mso-spt28", mso_sptTextWave },
345 { u"mso-spt29", mso_sptTextRing },
346 { u"mso-spt30", mso_sptTextOnCurve },
347 { u"mso-spt31", mso_sptTextOnRing },
348 { u"mso-spt32", mso_sptStraightConnector1 },
349 { u"mso-spt33", mso_sptBentConnector2 },
350 { u"mso-spt34", mso_sptBentConnector3 },
351 { u"mso-spt35", mso_sptBentConnector4 },
352 { u"mso-spt36", mso_sptBentConnector5 },
353 { u"mso-spt37", mso_sptCurvedConnector2 },
354 { u"mso-spt38", mso_sptCurvedConnector3 },
355 { u"mso-spt39", mso_sptCurvedConnector4 },
356 { u"mso-spt40", mso_sptCurvedConnector5 },
357 { u"mso-spt41", mso_sptCallout1 },
358 { u"mso-spt42", mso_sptCallout2 },
359 { u"mso-spt43", mso_sptCallout3 },
360 { u"mso-spt44", mso_sptAccentCallout1 },
361 { u"mso-spt45", mso_sptAccentCallout2 },
362 { u"mso-spt46", mso_sptAccentCallout3 },*/
363 { u"line-callout-1"_ustr, u"Line Callout 1"_ustr },
364 { u"line-callout-2"_ustr, u"Line Callout 2"_ustr },
365 /*{ u"mso-spt49", mso_sptBorderCallout3 },
366 { u"mso-spt50", mso_sptAccentBorderCallout1 },
367 { u"mso-spt51", mso_sptAccentBorderCallout2 },
368 { u"mso-spt52", mso_sptAccentBorderCallout3 },
369 { u"mso-spt53", mso_sptRibbon },
370 { u"mso-spt54", mso_sptRibbon2 },*/
371 { u"chevron"_ustr, u"Chevron"_ustr },
372 { u"pentagon"_ustr, u"Pentagon"_ustr },
373 { u"forbidden"_ustr, u"'No' Symbol"_ustr },
374 { u"star8"_ustr, u"8-Point Star"_ustr },
375 /*{ u"mso-spt59", mso_sptSeal16 },
376 { u"mso-spt60", mso_sptSeal32 },*/
377 { u"rectangular-callout"_ustr, u"Rectangular Callout"_ustr },
378 { u"round-rectangular-callout"_ustr, u"Rounded Rectangular Callout"_ustr },
379 { u"round-callout"_ustr, u"Round Callout"_ustr },
380 //{ u"mso-spt64", mso_sptWave },
381 { u"paper"_ustr, u"Folded Corner"_ustr },
382 { u"left-arrow"_ustr, u"Left Arrow"_ustr },
383 { u"down-arrow"_ustr, u"Down Arrow"_ustr },
384 { u"up-arrow"_ustr, u"Up Arrow"_ustr },
385 { u"left-right-arrow"_ustr, u"Left and Right Arrow"_ustr },
386 { u"up-down-arrow"_ustr, u"Up and Down Arrow"_ustr },
387 //{ u"mso-spt71", mso_sptIrregularSeal1 },
388 { u"bang"_ustr, u"Explosion"_ustr },
389 { u"lightning"_ustr, u"Lighting Bolt"_ustr },
390 { u"heart"_ustr, u"Heart"_ustr },
391 //{ u"mso-spt75", mso_sptPictureFrame },
392 { u"quad-arrow"_ustr, u"4-Way Arrow"_ustr },
393 { u"left-arrow-callout"_ustr, u"Left Arrow Callout"_ustr },
394 { u"right-arrow-callout"_ustr, u"Right Arrow Callout"_ustr },
395 { u"up-arrow-callout"_ustr, u"Up Arrow Callout"_ustr },
396 { u"down-arrow-callout"_ustr, u"Down Arrow Callout"_ustr },
397 { u"left-right-arrow-callout"_ustr, u"Left and Right Arrow Callout"_ustr },
398 { u"up-down-arrow-callout"_ustr, u"Up and Down Arrow Callout"_ustr },
399 { u"quad-arrow-callout"_ustr, u"4-Way Arrow Callout"_ustr },
400 { u"quad-bevel"_ustr, u"Square Bevel"_ustr },
401 { u"left-bracket"_ustr, u"Left Bracket"_ustr },
402 { u"right-bracket"_ustr, u"Right Bracket"_ustr },
403 { u"left-brace"_ustr, u"Left Brace"_ustr },
404 { u"right-brace"_ustr, u"Right Brace"_ustr },
405 { u"mso-spt89"_ustr, u"Up and Left Arrow"_ustr },
406 //{ u"mso-spt90", mso_sptBentUpArrow },
407 //{ u"mso-spt91", mso_sptBentArrow },
408 { u"star24"_ustr, u"24-Point Star"_ustr },
409 { u"striped-right-arrow"_ustr, u"Striped Right Arrow"_ustr },
410 { u"notched-right-arrow"_ustr, u"Notched Right Arrow"_ustr },
411 { u"block-arc"_ustr, u"Block Arc"_ustr },
412 { u"smiley"_ustr, u"Smile Face"_ustr },
413 { u"vertical-scroll"_ustr, u"Vertical Scroll"_ustr },
414 { u"horizontal-scroll"_ustr, u"Horizontal Scroll"_ustr },
415 { u"circular-arrow"_ustr, u"Circular Arrow"_ustr },
416 { u"mso-spt100"_ustr, u"Notched Circular Arrow"_ustr },
418 { u"mso-spt101", mso_sptUturnArrow },
419 { u"mso-spt102", mso_sptCurvedRightArrow },
420 { u"mso-spt103", mso_sptCurvedLeftArrow },
421 { u"mso-spt104", mso_sptCurvedUpArrow },
422 { u"mso-spt105", mso_sptCurvedDownArrow },*/
423 { u"cloud-callout"_ustr, u"Cloud Callout"_ustr },
424 /*{ u"mso-spt107", mso_sptEllipseRibbon },
425 { u"mso-spt108", mso_sptEllipseRibbon2 },*/
426 { u"flowchart-process"_ustr, u"Flowchart:Process"_ustr },
427 { u"flowchart-decision"_ustr, u"Flowchart:Decision"_ustr },
428 { u"flowchart-data"_ustr, u"Flowchart:Data"_ustr },
429 { u"flowchart-predefined-process"_ustr, u"Flowchart:Predefined Process"_ustr },
430 { u"flowchart-internal-storage"_ustr, u"Flowchart:Internal Storage"_ustr },
431 { u"flowchart-document"_ustr, u"Flowchart:Document"_ustr },
432 { u"flowchart-multidocument"_ustr, u"Flowchart:Multidocument"_ustr },
433 { u"flowchart-terminator"_ustr, u"Flowchart:Terminator"_ustr },
434 { u"flowchart-preparation"_ustr, u"Flowchart:Preparation"_ustr },
435 { u"flowchart-manual-input"_ustr, u"Flowchart:Manual Input"_ustr },
436 { u"flowchart-manual-operation"_ustr, u"Flowchart:Manual Operation"_ustr },
437 { u"flowchart-connector"_ustr, u"Flowchart:Connector"_ustr },
438 { u"flowchart-card"_ustr, u"Flowchart:Card"_ustr },
439 { u"flowchart-punched-tape"_ustr, u"Flowchart:Punched Tape"_ustr },
440 { u"flowchart-summing-junction"_ustr, u"Flowchart:Summing Junction"_ustr },
441 { u"flowchart-or"_ustr, u"Flowchart:Or"_ustr },
442 { u"flowchart-collate"_ustr, u"Flowchart:Collate"_ustr },
443 { u"flowchart-sort"_ustr, u"Flowchart:Sort"_ustr },
444 { u"flowchart-extract"_ustr, u"Flowchart:Extract"_ustr },
445 { u"flowchart-merge"_ustr, u"Flowchart:Merge"_ustr },
446 //{ u"mso-spt129", mso_sptFlowChartOfflineStorage },
447 { u"flowchart-stored-data"_ustr, u"Flowchart:Stored Data"_ustr },
448 { u"flowchart-sequential-access"_ustr, u"drawingbar.fc.25=Flowchart:Sequential Access"_ustr },
449 { u"flowchart-magnetic-disk"_ustr, u"Flowchart:Magnetic Disk"_ustr },
450 { u"flowchart-direct-access-storage"_ustr, u"Flowchart:Direct Access Storage"_ustr },
451 { u"flowchart-display"_ustr, u"Flowchart:Display"_ustr },
452 { u"flowchart-delay"_ustr, u"Flowchart:Delay"_ustr },
453 /*{ u"fontwork-plain-text", mso_sptTextPlainText },
454 { u"fontwork-stop", mso_sptTextStop },
455 { u"fontwork-triangle-up", mso_sptTextTriangle },
456 { u"fontwork-triangle-down", mso_sptTextTriangleInverted },
457 { u"fontwork-chevron-up", mso_sptTextChevron },
458 { u"fontwork-chevron-down", mso_sptTextChevronInverted },
459 { u"mso-spt142", mso_sptTextRingInside },
460 { u"mso-spt143", mso_sptTextRingOutside },
461 { u"fontwork-arch-up-curve", mso_sptTextArchUpCurve },
462 { u"fontwork-arch-down-curve", mso_sptTextArchDownCurve },
463 { u"fontwork-circle-curve", mso_sptTextCircleCurve },
464 { u"fontwork-open-circle-curve", mso_sptTextButtonCurve },
465 { u"fontwork-arch-up-pour", mso_sptTextArchUpPour },
466 { u"fontwork-arch-down-pour", mso_sptTextArchDownPour },
467 { u"fontwork-circle-pour", mso_sptTextCirclePour },
468 { u"fontwork-open-circle-pour", mso_sptTextButtonPour },
469 { u"fontwork-curve-up", mso_sptTextCurveUp },
470 { u"fontwork-curve-down", mso_sptTextCurveDown },
471 { u"fontwork-fade-up-and-right", mso_sptTextCascadeUp },
472 { u"fontwork-fade-up-and-left", mso_sptTextCascadeDown },
473 { u"fontwork-wave", mso_sptTextWave1 },
474 { u"mso-spt157", mso_sptTextWave2 },
475 { u"mso-spt158", mso_sptTextWave3 },
476 { u"mso-spt159", mso_sptTextWave4 },
477 { u"fontwork-inflate", mso_sptTextInflate },
478 { u"mso-spt161", mso_sptTextDeflate },
479 { u"mso-spt162", mso_sptTextInflateBottom },
480 { u"mso-spt163", mso_sptTextDeflateBottom },
481 { u"mso-spt164", mso_sptTextInflateTop },
482 { u"mso-spt165", mso_sptTextDeflateTop },
483 { u"mso-spt166", mso_sptTextDeflateInflate },
484 { u"mso-spt167", mso_sptTextDeflateInflateDeflate },
485 { u"fontwork-fade-right", mso_sptTextFadeRight },
486 { u"fontwork-fade-left", mso_sptTextFadeLeft },
487 { u"fontwork-fade-up", mso_sptTextFadeUp },
488 { u"fontwork-fade-down", mso_sptTextFadeDown },
489 { u"fontwork-slant-up", mso_sptTextSlantUp },
490 { u"fontwork-slant-down", mso_sptTextSlantDown },
491 { u"mso-spt174", mso_sptTextCanUp },
492 { u"mso-spt175", mso_sptTextCanDown },*/
493 { u"flowchart-alternate-process"_ustr, u"Flowchart:Alternate Process "_ustr },
494 { u"flowchart-off-page-connector"_ustr, u"Flowchart:Off-page Connector"_ustr },
495 /*{ u"mso-spt178", mso_sptCallout90 },
496 { u"mso-spt179", mso_sptAccentCallout90 },
497 { u"mso-spt180", mso_sptBorderCallout90 },*/
498 { u"line-callout-3"_ustr, u"Line Callout 3"_ustr },
499 //{ u"mso-spt182", mso_sptLeftRightUpArrow },
500 { u"sun"_ustr, u"Sun"_ustr },
501 { u"moon"_ustr, u"Moon"_ustr },
502 { u"bracket-pair"_ustr, u"Double Bracket"_ustr },
503 { u"brace-pair"_ustr, u"Double Brace"_ustr },
504 { u"star4"_ustr, u"4-Point Star"_ustr },
505 /*{ u"mso-spt188", mso_sptDoubleWave },
506 { u"mso-spt189", mso_sptActionButtonBlank },
507 { u"mso-spt190", mso_sptActionButtonHome },
508 { u"mso-spt191", mso_sptActionButtonHelp },
509 { u"mso-spt192", mso_sptActionButtonInformation },
510 { u"mso-spt193", mso_sptActionButtonForwardNext },
511 { u"mso-spt194", mso_sptActionButtonBackPrevious },
512 { u"mso-spt195", mso_sptActionButtonEnd },
513 { u"mso-spt196", mso_sptActionButtonBeginning },
514 { u"mso-spt197", mso_sptActionButtonReturn },
515 { u"mso-spt198", mso_sptActionButtonDocument },
516 { u"mso-spt199", mso_sptActionButtonSound },
517 { u"mso-spt200", mso_sptActionButtonMovie },
518 { u"mso-spt201", mso_sptHostControl },
519 { u"mso-spt202", mso_sptTextBox },*/
520 { u"frame"_ustr, u"Frame"_ustr },
521 { u"col-60da8460"_ustr, u"Octagon Bevel"_ustr },
522 { u"col-502ad400"_ustr, u"Diamond Bevel"_ustr },
523 { u"sinusoid"_ustr, u"Sinusoid"_ustr }
526 typedef std::unordered_map<OUString, OUString> TypeACCNameHashMap;
528 static const TypeACCNameHashMap& GetACCHashMap()
530 static TypeACCNameHashMap aMap = []()
532 TypeACCNameHashMap map;
533 for (auto const & i : pACCNameTypeTableArray)
534 map[i.pS] = i.pE;
535 return map;
536 }();
537 return aMap;
540 const OUString & EnhancedCustomShapeTypeNames::GetAccName( const OUString& rShapeType )
542 const TypeACCNameHashMap& rACCMap = GetACCHashMap();
543 auto aHashIter = rACCMap.find( rShapeType );
544 if ( aHashIter != rACCMap.end() )
545 return aHashIter->second;
546 return EMPTY_OUSTRING;
549 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */