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