LibreOffice Module svx (master) 1
EnhancedCustomShapeTypeNames.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
21#include <unordered_map>
22
23namespace {
24
25struct NameTypeTable
26{
27 const char* pS;
28 MSO_SPT pE;
29};
30
31}
32
33const NameTypeTable pNameTypeTableArray[] =
34{
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 }
240};
241
242 // gallery: quadrat
243 // gallery: round-quadrat
244 // gallery: circle
245 // gallery: circle-pie
246 // gallery: frame
247 // gallery: flower
248 // gallery: cloud
249 // gallery: puzzle
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
259 // Gallery: star6
260 // Gallery: star12
261 // Gallery: concave-star6
262 // Gallery: signet
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
268
269
270typedef std::unordered_map< OUString, MSO_SPT> TypeNameHashMap;
271
273{
274 static TypeNameHashMap aMap = []()
275 {
277 for (auto const & i : pNameTypeTableArray)
278 map[OUString::createFromAscii(i.pS)] = i.pE;
279 return map;
280 }();
281 return aMap;
282}
283
284
285MSO_SPT EnhancedCustomShapeTypeNames::Get( const OUString& rShapeType )
286{
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;
292 return eRetValue;
293}
294
295OUString EnhancedCustomShapeTypeNames::Get( const MSO_SPT eShapeType )
296{
297 return (eShapeType <= mso_sptTextBox && eShapeType >= mso_sptMin)
298 ? OUString::createFromAscii( pNameTypeTableArray[ eShapeType ].pS )
299 : OUString();
300}
301
302namespace {
303
304struct ACCNameTypeTable
305{
306 const char* pS;
307 const char* pE;
308};
309
310}
311
312const ACCNameTypeTable pACCNameTypeTableArray[] =
313{
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" },
330 { "cube", "Cube" },
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 },*/
338 { "ring", "Ring" },
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" },
416 /*
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 },
499 { "sun", "Sun" },
500 { "moon", "Moon" },
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" }
522};
523
524typedef std::unordered_map<OUString, OUString> TypeACCNameHashMap;
525
527{
528 static TypeACCNameHashMap aMap = []()
529 {
531 for (auto const & i : pACCNameTypeTableArray)
532 map[OUString::createFromAscii(i.pS)] = OUString::createFromAscii(i.pE);
533 return map;
534 }();
535 return aMap;
536}
537
538const OUString & EnhancedCustomShapeTypeNames::GetAccName( const OUString& rShapeType )
539{
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;
545 return EMPTY;
546}
547
548/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const NameTypeTable pNameTypeTableArray[]
std::unordered_map< OUString, OUString > TypeACCNameHashMap
std::unordered_map< OUString, MSO_SPT > TypeNameHashMap
const ACCNameTypeTable pACCNameTypeTableArray[]
static const TypeACCNameHashMap & GetACCHashMap()
static const TypeNameHashMap & GetTypeNameHashMap()
const char * pS
FormulaCommand pE
MSO_SPT
Definition: msdffdef.hxx:274
@ mso_sptSun
Definition: msdffdef.hxx:459
@ mso_sptAccentCallout90
Definition: msdffdef.hxx:455
@ mso_sptFlowChartConnector
Definition: msdffdef.hxx:396
@ mso_sptFlowChartMagneticDisk
Definition: msdffdef.hxx:408
@ mso_sptCircularArrow
Definition: msdffdef.hxx:375
@ mso_sptNotchedRightArrow
Definition: msdffdef.hxx:370
@ mso_sptTextChevronInverted
Definition: msdffdef.hxx:417
@ mso_sptTextFadeDown
Definition: msdffdef.hxx:447
@ mso_sptCurvedUpArrow
Definition: msdffdef.hxx:380
@ mso_sptNotchedCircularArrow
Definition: msdffdef.hxx:376
@ mso_sptTextRingOutside
Definition: msdffdef.hxx:419
@ mso_sptFlowChartDisplay
Definition: msdffdef.hxx:410
@ mso_sptFlowChartManualOperation
Definition: msdffdef.hxx:395
@ mso_sptBalloon
Definition: msdffdef.hxx:293
@ mso_sptTextCascadeDown
Definition: msdffdef.hxx:431
@ mso_sptCallout3
Definition: msdffdef.hxx:319
@ mso_sptSeal4
Definition: msdffdef.hxx:463
@ mso_sptTextFadeRight
Definition: msdffdef.hxx:444
@ mso_sptUpDownArrow
Definition: msdffdef.hxx:346
@ mso_sptRightBracket
Definition: msdffdef.hxx:362
@ mso_sptTextDeflateInflate
Definition: msdffdef.hxx:442
@ mso_sptTextCurveUp
Definition: msdffdef.hxx:428
@ mso_sptPlus
Definition: msdffdef.hxx:287
@ mso_sptActionButtonBlank
Definition: msdffdef.hxx:465
@ mso_sptBorderCallout2
Definition: msdffdef.hxx:324
@ mso_sptRoundRectangle
Definition: msdffdef.hxx:278
@ mso_sptFlowChartOnlineStorage
Definition: msdffdef.hxx:406
@ mso_sptTextArchUpPour
Definition: msdffdef.hxx:424
@ mso_sptTextArchDownPour
Definition: msdffdef.hxx:425
@ mso_sptTextWave
Definition: msdffdef.hxx:304
@ mso_sptAccentBorderCallout2
Definition: msdffdef.hxx:327
@ mso_sptTextSlantUp
Definition: msdffdef.hxx:448
@ mso_sptLeftRightArrow
Definition: msdffdef.hxx:345
@ mso_sptMoon
Definition: msdffdef.hxx:460
@ mso_sptTextChevron
Definition: msdffdef.hxx:416
@ mso_sptTextWave3
Definition: msdffdef.hxx:434
@ mso_sptAccentBorderCallout1
Definition: msdffdef.hxx:326
@ mso_sptActionButtonMovie
Definition: msdffdef.hxx:476
@ mso_sptThickArrow
Definition: msdffdef.hxx:290
@ mso_sptDoubleWave
Definition: msdffdef.hxx:464
@ mso_sptFlowChartPredefinedProcess
Definition: msdffdef.hxx:388
@ mso_sptTearDrop
Definition: msdffdef.hxx:480
@ mso_sptDiamond
Definition: msdffdef.hxx:280
@ mso_sptWedgeRectCallout
Definition: msdffdef.hxx:337
@ mso_sptLeftUpArrow
Definition: msdffdef.hxx:365
@ mso_sptEllipseRibbon2
Definition: msdffdef.hxx:384
@ mso_sptTrapezoid
Definition: msdffdef.hxx:284
@ mso_sptFlowChartInternalStorage
Definition: msdffdef.hxx:389
@ mso_sptWave
Definition: msdffdef.hxx:340
@ mso_sptFlowChartSort
Definition: msdffdef.hxx:402
@ mso_sptLeftBrace
Definition: msdffdef.hxx:363
@ mso_sptCallout1
Definition: msdffdef.hxx:317
@ mso_sptCloudCallout
Definition: msdffdef.hxx:382
@ mso_sptFlowChartOffpageConnector
Definition: msdffdef.hxx:453
@ mso_sptTextArchUpCurve
Definition: msdffdef.hxx:420
@ mso_sptUturnArrow
Definition: msdffdef.hxx:377
@ mso_sptFlowChartMagneticDrum
Definition: msdffdef.hxx:409
@ mso_sptFlowChartManualInput
Definition: msdffdef.hxx:394
@ mso_sptQuadArrow
Definition: msdffdef.hxx:352
@ mso_sptActionButtonSound
Definition: msdffdef.hxx:475
@ mso_sptUpDownArrowCallout
Definition: msdffdef.hxx:358
@ mso_sptDonut
Definition: msdffdef.hxx:299
@ mso_sptRightBrace
Definition: msdffdef.hxx:364
@ mso_sptBorderCallout3
Definition: msdffdef.hxx:325
@ mso_sptIrregularSeal2
Definition: msdffdef.hxx:348
@ mso_sptTextButtonPour
Definition: msdffdef.hxx:427
@ mso_sptStripedRightArrow
Definition: msdffdef.hxx:369
@ mso_sptCallout2
Definition: msdffdef.hxx:318
@ mso_sptTextSlantDown
Definition: msdffdef.hxx:449
@ mso_sptBracePair
Definition: msdffdef.hxx:462
@ mso_sptTextWave1
Definition: msdffdef.hxx:432
@ mso_sptTextDeflateInflateDeflate
Definition: msdffdef.hxx:443
@ mso_sptFlowChartExtract
Definition: msdffdef.hxx:403
@ mso_sptLeftArrow
Definition: msdffdef.hxx:342
@ mso_sptLine
Definition: msdffdef.hxx:296
@ mso_sptPentagon
Definition: msdffdef.hxx:332
@ mso_sptTextCascadeUp
Definition: msdffdef.hxx:430
@ mso_sptFlowChartTerminator
Definition: msdffdef.hxx:392
@ mso_sptFlowChartMagneticTape
Definition: msdffdef.hxx:407
@ mso_sptRibbon2
Definition: msdffdef.hxx:330
@ mso_sptPictureFrame
Definition: msdffdef.hxx:351
@ mso_sptEllipse
Definition: msdffdef.hxx:279
@ mso_sptTextCirclePour
Definition: msdffdef.hxx:426
@ mso_sptTextDeflate
Definition: msdffdef.hxx:437
@ mso_sptSmileyFace
Definition: msdffdef.hxx:372
@ mso_sptNoSmoking
Definition: msdffdef.hxx:333
@ mso_sptDownArrowCallout
Definition: msdffdef.hxx:356
@ mso_sptAccentCallout1
Definition: msdffdef.hxx:320
@ mso_sptStraightConnector1
Definition: msdffdef.hxx:308
@ mso_sptMin
Definition: msdffdef.hxx:275
@ mso_sptTextArchDownCurve
Definition: msdffdef.hxx:421
@ mso_sptFlowChartOr
Definition: msdffdef.hxx:400
@ mso_sptRightArrowCallout
Definition: msdffdef.hxx:354
@ mso_sptTextPlainText
Definition: msdffdef.hxx:412
@ mso_sptFlowChartPreparation
Definition: msdffdef.hxx:393
@ mso_sptTextOnCurve
Definition: msdffdef.hxx:306
@ mso_sptFlowChartPunchedCard
Definition: msdffdef.hxx:397
@ mso_sptLeftBracket
Definition: msdffdef.hxx:361
@ mso_sptBevel
Definition: msdffdef.hxx:360
@ mso_sptHeart
Definition: msdffdef.hxx:350
@ mso_sptHostControl
Definition: msdffdef.hxx:477
@ mso_sptCurvedConnector5
Definition: msdffdef.hxx:316
@ mso_sptPlaque
Definition: msdffdef.hxx:297
@ mso_sptQuadArrowCallout
Definition: msdffdef.hxx:359
@ mso_sptDownArrow
Definition: msdffdef.hxx:343
@ mso_sptLeftRightUpArrow
Definition: msdffdef.hxx:458
@ mso_sptActionButtonReturn
Definition: msdffdef.hxx:473
@ mso_sptFlowChartMerge
Definition: msdffdef.hxx:404
@ mso_sptArrow
Definition: msdffdef.hxx:289
@ mso_sptTextHexagon
Definition: msdffdef.hxx:302
@ mso_sptAccentBorderCallout90
Definition: msdffdef.hxx:457
@ mso_sptTextWave2
Definition: msdffdef.hxx:433
@ mso_sptTextInflate
Definition: msdffdef.hxx:436
@ mso_sptHorizontalScroll
Definition: msdffdef.hxx:374
@ mso_sptUpArrow
Definition: msdffdef.hxx:344
@ mso_sptRightTriangle
Definition: msdffdef.hxx:282
@ mso_sptWedgeEllipseCallout
Definition: msdffdef.hxx:339
@ mso_sptTextCanDown
Definition: msdffdef.hxx:451
@ mso_sptBentArrow
Definition: msdffdef.hxx:367
@ mso_sptFlowChartOfflineStorage
Definition: msdffdef.hxx:405
@ mso_sptSeal8
Definition: msdffdef.hxx:334
@ mso_sptBentUpArrow
Definition: msdffdef.hxx:366
@ mso_sptCurvedConnector3
Definition: msdffdef.hxx:314
@ mso_sptCurvedConnector4
Definition: msdffdef.hxx:315
@ mso_sptBentConnector4
Definition: msdffdef.hxx:311
@ mso_sptAccentBorderCallout3
Definition: msdffdef.hxx:328
@ mso_sptTextBox
Definition: msdffdef.hxx:478
@ mso_sptBentConnector3
Definition: msdffdef.hxx:310
@ mso_sptSeal32
Definition: msdffdef.hxx:336
@ mso_sptActionButtonHome
Definition: msdffdef.hxx:466
@ mso_sptTextCurveDown
Definition: msdffdef.hxx:429
@ mso_sptFlowChartCollate
Definition: msdffdef.hxx:401
@ mso_sptFlowChartInputOutput
Definition: msdffdef.hxx:387
@ mso_sptCurvedRightArrow
Definition: msdffdef.hxx:378
@ mso_sptTextCircleCurve
Definition: msdffdef.hxx:422
@ mso_sptFlowChartDecision
Definition: msdffdef.hxx:386
@ mso_sptTextFadeLeft
Definition: msdffdef.hxx:445
@ mso_sptBentConnector5
Definition: msdffdef.hxx:312
@ mso_sptFlowChartDelay
Definition: msdffdef.hxx:411
@ mso_sptChevron
Definition: msdffdef.hxx:331
@ mso_sptFlowChartDocument
Definition: msdffdef.hxx:390
@ mso_sptFoldedCorner
Definition: msdffdef.hxx:341
@ mso_sptFlowChartProcess
Definition: msdffdef.hxx:385
@ mso_sptIrregularSeal1
Definition: msdffdef.hxx:347
@ mso_sptCallout90
Definition: msdffdef.hxx:454
@ mso_sptCurvedLeftArrow
Definition: msdffdef.hxx:379
@ mso_sptSeal16
Definition: msdffdef.hxx:335
@ mso_sptActionButtonDocument
Definition: msdffdef.hxx:474
@ mso_sptCan
Definition: msdffdef.hxx:298
@ mso_sptOctagon
Definition: msdffdef.hxx:286
@ mso_sptWedgeRRectCallout
Definition: msdffdef.hxx:338
@ mso_sptEllipseRibbon
Definition: msdffdef.hxx:383
@ mso_sptTextRingInside
Definition: msdffdef.hxx:418
@ mso_sptTextRing
Definition: msdffdef.hxx:305
@ mso_sptBorderCallout90
Definition: msdffdef.hxx:456
@ mso_sptCube
Definition: msdffdef.hxx:292
@ mso_sptRectangle
Definition: msdffdef.hxx:277
@ mso_sptTextDeflateTop
Definition: msdffdef.hxx:441
@ mso_sptFlowChartAlternateProcess
Definition: msdffdef.hxx:452
@ mso_sptTextOnRing
Definition: msdffdef.hxx:307
@ mso_sptTextSimple
Definition: msdffdef.hxx:300
@ mso_sptBlockArc
Definition: msdffdef.hxx:371
@ mso_sptActionButtonForwardNext
Definition: msdffdef.hxx:469
@ mso_sptActionButtonBeginning
Definition: msdffdef.hxx:472
@ mso_sptActionButtonInformation
Definition: msdffdef.hxx:468
@ mso_sptNil
Definition: msdffdef.hxx:482
@ mso_sptSeal24
Definition: msdffdef.hxx:368
@ mso_sptArc
Definition: msdffdef.hxx:295
@ mso_sptActionButtonEnd
Definition: msdffdef.hxx:471
@ mso_sptFlowChartSummingJunction
Definition: msdffdef.hxx:399
@ mso_sptTextButtonCurve
Definition: msdffdef.hxx:423
@ mso_sptTextOctagon
Definition: msdffdef.hxx:301
@ mso_sptIsocelesTriangle
Definition: msdffdef.hxx:281
@ mso_sptTextFadeUp
Definition: msdffdef.hxx:446
@ mso_sptParallelogram
Definition: msdffdef.hxx:283
@ mso_sptTextCanUp
Definition: msdffdef.hxx:450
@ mso_sptTextInflateTop
Definition: msdffdef.hxx:440
@ mso_sptUpArrowCallout
Definition: msdffdef.hxx:355
@ mso_sptLightningBolt
Definition: msdffdef.hxx:349
@ mso_sptTextDeflateBottom
Definition: msdffdef.hxx:439
@ mso_sptTextWave4
Definition: msdffdef.hxx:435
@ mso_sptActionButtonHelp
Definition: msdffdef.hxx:467
@ mso_sptBracketPair
Definition: msdffdef.hxx:461
@ mso_sptCurvedDownArrow
Definition: msdffdef.hxx:381
@ mso_sptVerticalScroll
Definition: msdffdef.hxx:373
@ mso_sptCurvedConnector2
Definition: msdffdef.hxx:313
@ mso_sptFlowChartPunchedTape
Definition: msdffdef.hxx:398
@ mso_sptTextTriangle
Definition: msdffdef.hxx:414
@ mso_sptTextInflateBottom
Definition: msdffdef.hxx:438
@ mso_sptTextCurve
Definition: msdffdef.hxx:303
@ mso_sptFlowChartMultidocument
Definition: msdffdef.hxx:391
@ mso_sptHomePlate
Definition: msdffdef.hxx:291
@ mso_sptAccentCallout2
Definition: msdffdef.hxx:321
@ mso_sptHexagon
Definition: msdffdef.hxx:285
@ mso_sptTextTriangleInverted
Definition: msdffdef.hxx:415
@ mso_sptLeftRightArrowCallout
Definition: msdffdef.hxx:357
@ mso_sptActionButtonBackPrevious
Definition: msdffdef.hxx:470
@ mso_sptStar
Definition: msdffdef.hxx:288
@ mso_sptBorderCallout1
Definition: msdffdef.hxx:323
@ mso_sptTextStop
Definition: msdffdef.hxx:413
@ mso_sptLeftArrowCallout
Definition: msdffdef.hxx:353
@ mso_sptRibbon
Definition: msdffdef.hxx:329
@ mso_sptAccentCallout3
Definition: msdffdef.hxx:322
@ mso_sptSeal
Definition: msdffdef.hxx:294
@ mso_sptBentConnector2
Definition: msdffdef.hxx:309
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
SVXCORE_DLLPUBLIC const OUString & GetAccName(const OUString &)
int i
constexpr OUStringLiteral EMPTY
HashMap_OWString_Interface aMap
std::unordered_map< const char *, PPPOptimizerTokenEnum, rtl::CStringHash, rtl::CStringEqual > TypeNameHashMap
std::map< OUString, rtl::Reference< Entity > > map