filter/source/msfilter/util.cxx            | 1244 ++++++++++++++---------------
 include/filter/msfilter/util.hxx           |    4 
 include/oox/export/drawingml.hxx           |    6 
 oox/source/export/DMLPresetShapeExport.cxx |    4 
 oox/source/export/drawingml.cxx            |   12 
 oox/source/export/shapes.cxx               |    4 
 6 files changed, 620 insertions(+), 654 deletions(-)

New commits:
commit d65c8b37595a4775fd766b2b7becbc01fe21a04e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Mar 14 18:27:43 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Mar 15 06:19:53 2022 +0100

    Simplify GetOOXMLPresetGeometry and GETVMLShapeType
    
    Let them use types that know string lengths, don't require conversion,
    and are convenient at call sites.
    
    Also inline the maps initialization, instead of having separate arrays
    and initialization loops.
    
    Change-Id: Id4469f3f99f3f0eb2cd83f0671cf892df4e420a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131550
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index d0e4b24fe08c..51e2d3de5a80 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -601,650 +601,616 @@ EquationResult ParseCombinedChars(const OUString& rStr)
     return aResult;
 }
 
-namespace {
-
-struct CustomShapeTypeTranslationTable
-{
-    const char* sOOo;
-    const char* sMSO;
-};
-
-}
-
-const CustomShapeTypeTranslationTable pCustomShapeTypeTranslationTable[] =
+OString GetOOXMLPresetGeometry( std::u16string_view rShapeType )
 {
-    // { "non-primitive", mso_sptMin },
-    { "frame", "frame" },
-    { "rectangle", "rect" },
-    { "round-rectangle", "roundRect" },
-    { "ellipse", "ellipse" },
-    { "diamond", "diamond" },
-    { "isosceles-triangle", "triangle" },
-    { "right-triangle", "rtTriangle" },
-    { "parallelogram", "parallelogram" },
-    { "trapezoid", "trapezoid" },
-    { "hexagon", "hexagon" },
-    { "octagon", "octagon" },
-    { "cross", "plus" },
-    { "star5", "star5" },
-    { "right-arrow", "rightArrow" },
-    // { "mso-spt14", mso_sptThickArrow },
-    { "pentagon-right", "homePlate" },
-    { "cube", "cube" },
-    // { "mso-spt17", mso_sptBalloon },
-    // { "mso-spt18", mso_sptSeal },
-    { "mso-spt19", "arc" },
-    { "mso-spt20", "line" },
-    { "mso-spt21", "plaque" },
-    { "can", "can" },
-    { "ring", "donut" },
-    { "mso-spt24", "textPlain" },
-    { "mso-spt25", "textStop" },
-    { "mso-spt26", "textTriangle" },
-    { "mso-spt27", "textCanDown" },
-    { "mso-spt28", "textWave1" },
-    { "mso-spt29", "textArchUpPour" },
-    { "mso-spt30", "textCanDown" },
-    { "mso-spt31", "textArchUp" },
-    { "mso-spt32", "straightConnector1" },
-    { "mso-spt33", "bentConnector2" },
-    { "mso-spt34", "bentConnector3" },
-    { "mso-spt35", "bentConnector4" },
-    { "mso-spt36", "bentConnector5" },
-    { "mso-spt37", "curvedConnector2" },
-    { "mso-spt38", "curvedConnector3" },
-    { "mso-spt39", "curvedConnector4" },
-    { "mso-spt40", "curvedConnector5" },
-    { "mso-spt41", "callout1" },
-    { "mso-spt42", "callout2" },
-    { "mso-spt43", "callout3" },
-    { "mso-spt44", "accentCallout1" },
-    { "mso-spt45", "accentCallout2" },
-    { "mso-spt46", "accentCallout3" },
-    { "line-callout-1", "borderCallout1" },
-    { "line-callout-2", "borderCallout2" },
-    { "line-callout-3", "borderCallout3" },
-    { "mso-spt49", "borderCallout3" },
-    { "mso-spt50", "accentBorderCallout1" },
-    { "mso-spt51", "accentBorderCallout2" },
-    { "mso-spt52", "accentBorderCallout3" },
-    { "mso-spt53", "ribbon" },
-    { "mso-spt54", "ribbon2" },
-    { "chevron", "chevron" },
-    { "pentagon", "pentagon" },
-    { "forbidden", "noSmoking" },
-    { "star8", "star8" },
-    { "mso-spt59", "star16" },
-    { "mso-spt60", "star32" },
-    { "rectangular-callout", "wedgeRectCallout" },
-    { "round-rectangular-callout", "wedgeRoundRectCallout" },
-    { "round-callout", "wedgeEllipseCallout" },
-    { "mso-spt64", "wave" },
-    { "paper", "foldedCorner" },
-    { "left-arrow", "leftArrow" },
-    { "down-arrow", "downArrow" },
-    { "up-arrow", "upArrow" },
-    { "left-right-arrow", "leftRightArrow" },
-    { "up-down-arrow", "upDownArrow" },
-    { "mso-spt71", "irregularSeal1" },
-    { "bang", "irregularSeal2" },
-    { "lightning", "lightningBolt" },
-    { "heart", "heart" },
-    { "quad-arrow", "quadArrow" },
-    { "left-arrow-callout", "leftArrowCallout" },
-    { "right-arrow-callout", "rightArrowCallout" },
-    { "up-arrow-callout", "upArrowCallout" },
-    { "down-arrow-callout", "downArrowCallout" },
-    { "left-right-arrow-callout", "leftRightArrowCallout" },
-    { "up-down-arrow-callout", "upDownArrowCallout" },
-    { "quad-arrow-callout", "quadArrowCallout" },
-    { "quad-bevel", "bevel" },
-    { "left-bracket", "leftBracket" },
-    { "right-bracket", "rightBracket" },
-    { "left-brace", "leftBrace" },
-    { "right-brace", "rightBrace" },
-    { "mso-spt89", "leftUpArrow" },
-    { "mso-spt90", "bentUpArrow" },
-    { "mso-spt91", "bentArrow" },
-    { "star24", "star24" },
-    { "striped-right-arrow", "stripedRightArrow" },
-    { "notched-right-arrow", "notchedRightArrow" },
-    { "block-arc", "blockArc" },
-    { "smiley", "smileyFace" },
-    { "vertical-scroll", "verticalScroll" },
-    { "horizontal-scroll", "horizontalScroll" },
-    { "circular-arrow", "circularArrow" },
-    { "mso-spt100", "pie" }, // looks like MSO_SPT is wrong here
-    { "mso-spt101", "uturnArrow" },
-    { "mso-spt102", "curvedRightArrow" },
-    { "mso-spt103", "curvedLeftArrow" },
-    { "mso-spt104", "curvedUpArrow" },
-    { "mso-spt105", "curvedDownArrow" },
-    { "cloud-callout", "cloudCallout" },
-    { "mso-spt107", "ellipseRibbon" },
-    { "mso-spt108", "ellipseRibbon2" },
-    { "flowchart-process", "flowChartProcess" },
-    { "flowchart-decision", "flowChartDecision" },
-    { "flowchart-data", "flowChartInputOutput" },
-    { "flowchart-predefined-process", "flowChartPredefinedProcess" },
-    { "flowchart-internal-storage", "flowChartInternalStorage" },
-    { "flowchart-document", "flowChartDocument" },
-    { "flowchart-multidocument", "flowChartMultidocument" },
-    { "flowchart-terminator", "flowChartTerminator" },
-    { "flowchart-preparation", "flowChartPreparation" },
-    { "flowchart-manual-input", "flowChartManualInput" },
-    { "flowchart-manual-operation", "flowChartManualOperation" },
-    { "flowchart-connector", "flowChartConnector" },
-    { "flowchart-card", "flowChartPunchedCard" },
-    { "flowchart-punched-tape", "flowChartPunchedTape" },
-    { "flowchart-summing-junction", "flowChartSummingJunction" },
-    { "flowchart-or", "flowChartOr" },
-    { "flowchart-collate", "flowChartCollate" },
-    { "flowchart-sort", "flowChartSort" },
-    { "flowchart-extract", "flowChartExtract" },
-    { "flowchart-merge", "flowChartMerge" },
-    { "mso-spt129", "flowChartOfflineStorage" },
-    { "flowchart-stored-data", "flowChartOnlineStorage" },
-    { "flowchart-sequential-access", "flowChartMagneticTape" },
-    { "flowchart-magnetic-disk", "flowChartMagneticDisk" },
-    { "flowchart-direct-access-storage", "flowChartMagneticDrum" },
-    { "flowchart-display", "flowChartDisplay" },
-    { "flowchart-delay", "flowChartDelay" },
-    // { "fontwork-plain-text", "textPlainText" },
-    // { "fontwork-stop", "textStop" },
-    // { "fontwork-triangle-up", "textTriangle" },
-    // { "fontwork-triangle-down", "textTriangleInverted" },
-    // { "fontwork-chevron-up", "textChevron" },
-    // { "fontwork-chevron-down", "textChevronInverted" },
-    // { "mso-spt142", "textRingInside" },
-    // { "mso-spt143", "textRingOutside" },
-    // { "fontwork-arch-up-curve", "textArchUpCurve" },
-    // { "fontwork-arch-down-curve", "textArchDownCurve" },
-    // { "fontwork-circle-curve", "textCircleCurve" },
-    // { "fontwork-open-circle-curve", "textButtonCurve" },
-    // { "fontwork-arch-up-pour", "textArchUpPour" },
-    // { "fontwork-arch-down-pour", "textArchDownPour" },
-    // { "fontwork-circle-pour", "textCirclePour" },
-    // { "fontwork-open-circle-pour", "textButtonPour" },
-    // { "fontwork-curve-up", "textCurveUp" },
-    // { "fontwork-curve-down", "textCurveDown" },
-    // { "fontwork-fade-up-and-right", "textCascadeUp" },
-    // { "fontwork-fade-up-and-left", "textCascadeDown" },
-    // { "fontwork-wave", "textWave1" },
-    // { "mso-spt157", "textWave2" },
-    // { "mso-spt158", "textWave3" },
-    // { "mso-spt159", "textWave4" },
-    // { "fontwork-inflate", "textInflate" },
-    // { "mso-spt161", "textDeflate" },
-    // { "mso-spt162", "textInflateBottom" },
-    // { "mso-spt163", "textDeflateBottom" },
-    // { "mso-spt164", "textInflateTop" },
-    // { "mso-spt165", "textDeflateTop" },
-    // { "mso-spt166", "textDeflateInflate" },
-    // { "mso-spt167", "textDeflateInflateDeflate" },
-    // { "fontwork-fade-right", "textFadeRight" },
-    // { "fontwork-fade-left", "textFadeLeft" },
-    // { "fontwork-fade-up", "textFadeUp" },
-    // { "fontwork-fade-down", "textFadeDown" },
-    // { "fontwork-slant-up", "textSlantUp" },
-    // { "fontwork-slant-down", "textSlantDown" },
-    // { "mso-spt174", "textCanUp" },
-    // { "mso-spt175", "textCanDown" },
-    { "flowchart-alternate-process", "flowChartAlternateProcess" },
-    { "flowchart-off-page-connector", "flowChartOffpageConnector" },
-    { "mso-spt178", "callout1" },
-    { "mso-spt179", "accentCallout1" },
-    { "mso-spt180", "borderCallout1" },
-    { "mso-spt182", "leftRightUpArrow" },
-    { "sun", "sun" },
-    { "moon", "moon" },
-    { "bracket-pair", "bracketPair" },
-    { "brace-pair", "bracePair" },
-    { "star4", "star4" },
-    { "mso-spt188", "doubleWave" },
-    { "mso-spt189", "actionButtonBlank" },
-    { "mso-spt190", "actionButtonHome" },
-    { "mso-spt191", "actionButtonHelp" },
-    { "mso-spt192", "actionButtonInformation" },
-    { "mso-spt193", "actionButtonForwardNext" },
-    { "mso-spt194", "actionButtonBackPrevious" },
-    { "mso-spt195", "actionButtonEnd" },
-    { "mso-spt196", "actionButtonBeginning" },
-    { "mso-spt197", "actionButtonReturn" },
-    { "mso-spt198", "actionButtonDocument" },
-    { "mso-spt199", "actionButtonSound" },
-    { "mso-spt200", "actionButtonMovie" },
-    // { "mso-spt201", "hostControl" },
-    { "mso-spt202", "rect" },
-    { "ooxml-actionButtonSound", "actionButtonSound" },
-    { "ooxml-borderCallout1", "borderCallout1" },
-    { "ooxml-plaqueTabs", "plaqueTabs" },
-    { "ooxml-curvedLeftArrow", "curvedLeftArrow" },
-    { "ooxml-octagon", "octagon" },
-    { "ooxml-leftRightRibbon", "leftRightRibbon" },
-    { "ooxml-actionButtonInformation", "actionButtonInformation" },
-    { "ooxml-bentConnector5", "bentConnector5" },
-    { "ooxml-circularArrow", "circularArrow" },
-    { "ooxml-downArrowCallout", "downArrowCallout" },
-    { "ooxml-mathMinus", "mathMinus" },
-    { "ooxml-gear9", "gear9" },
-    { "ooxml-round1Rect", "round1Rect" },
-    { "ooxml-sun", "sun" },
-    { "ooxml-plaque", "plaque" },
-    { "ooxml-chevron", "chevron" },
-    { "ooxml-flowChartPreparation", "flowChartPreparation" },
-    { "ooxml-diagStripe", "diagStripe" },
-    { "ooxml-pentagon", "pentagon" },
-    { "ooxml-funnel", "funnel" },
-    { "ooxml-chartStar", "chartStar" },
-    { "ooxml-accentBorderCallout1", "accentBorderCallout1" },
-    { "ooxml-notchedRightArrow", "notchedRightArrow" },
-    { "ooxml-rightBracket", "rightBracket" },
-    { "ooxml-flowChartOffpageConnector", "flowChartOffpageConnector" },
-    { "ooxml-leftRightArrow", "leftRightArrow" },
-    { "ooxml-decagon", "decagon" },
-    { "ooxml-actionButtonHelp", "actionButtonHelp" },
-    { "ooxml-star24", "star24" },
-    { "ooxml-mathDivide", "mathDivide" },
-    { "ooxml-curvedConnector4", "curvedConnector4" },
-    { "ooxml-flowChartOr", "flowChartOr" },
-    { "ooxml-borderCallout3", "borderCallout3" },
-    { "ooxml-upDownArrowCallout", "upDownArrowCallout" },
-    { "ooxml-flowChartDecision", "flowChartDecision" },
-    { "ooxml-leftRightArrowCallout", "leftRightArrowCallout" },
-    { "ooxml-flowChartManualOperation", "flowChartManualOperation" },
-    { "ooxml-snipRoundRect", "snipRoundRect" },
-    { "ooxml-mathPlus", "mathPlus" },
-    { "ooxml-actionButtonForwardNext", "actionButtonForwardNext" },
-    { "ooxml-can", "can" },
-    { "ooxml-foldedCorner", "foldedCorner" },
-    { "ooxml-star32", "star32" },
-    { "ooxml-flowChartInternalStorage", "flowChartInternalStorage" },
-    { "ooxml-upDownArrow", "upDownArrow" },
-    { "ooxml-irregularSeal2", "irregularSeal2" },
-    { "ooxml-mathEqual", "mathEqual" },
-    { "ooxml-star12", "star12" },
-    { "ooxml-uturnArrow", "uturnArrow" },
-    { "ooxml-squareTabs", "squareTabs" },
-    { "ooxml-leftRightUpArrow", "leftRightUpArrow" },
-    { "ooxml-homePlate", "homePlate" },
-    { "ooxml-dodecagon", "dodecagon" },
-    { "ooxml-leftArrowCallout", "leftArrowCallout" },
-    { "ooxml-chord", "chord" },
-    { "ooxml-quadArrowCallout", "quadArrowCallout" },
-    { "ooxml-actionButtonBeginning", "actionButtonBeginning" },
-    { "ooxml-ellipse", "ellipse" },
-    { "ooxml-actionButtonEnd", "actionButtonEnd" },
-    { "ooxml-arc", "arc" },
-    { "ooxml-star16", "star16" },
-    { "ooxml-parallelogram", "parallelogram" },
-    { "ooxml-bevel", "bevel" },
-    { "ooxml-roundRect", "roundRect" },
-    { "ooxml-accentCallout1", "accentCallout1" },
-    { "ooxml-flowChartSort", "flowChartSort" },
-    { "ooxml-star8", "star8" },
-    { "ooxml-flowChartAlternateProcess", "flowChartAlternateProcess" },
-    { "ooxml-moon", "moon" },
-    { "ooxml-star6", "star6" },
-    { "ooxml-round2SameRect", "round2SameRect" },
-    { "ooxml-nonIsoscelesTrapezoid", "nonIsoscelesTrapezoid" },
-    { "ooxml-diamond", "diamond" },
-    { "ooxml-ellipseRibbon", "ellipseRibbon" },
-    { "ooxml-callout2", "callout2" },
-    { "ooxml-pie", "pie" },
-    { "ooxml-star4", "star4" },
-    { "ooxml-flowChartPredefinedProcess", "flowChartPredefinedProcess" },
-    { "ooxml-flowChartPunchedTape", "flowChartPunchedTape" },
-    { "ooxml-curvedConnector2", "curvedConnector2" },
-    { "ooxml-bentConnector3", "bentConnector3" },
-    { "ooxml-cornerTabs", "cornerTabs" },
-    { "ooxml-hexagon", "hexagon" },
-    { "ooxml-flowChartConnector", "flowChartConnector" },
-    { "ooxml-flowChartMagneticDisk", "flowChartMagneticDisk" },
-    { "ooxml-heart", "heart" },
-    { "ooxml-ribbon2", "ribbon2" },
-    { "ooxml-bracePair", "bracePair" },
-    { "ooxml-flowChartExtract", "flowChartExtract" },
-    { "ooxml-actionButtonHome", "actionButtonHome" },
-    { "ooxml-accentBorderCallout3", "accentBorderCallout3" },
-    { "ooxml-flowChartOfflineStorage", "flowChartOfflineStorage" },
-    { "ooxml-irregularSeal1", "irregularSeal1" },
-    { "ooxml-quadArrow", "quadArrow" },
-    { "ooxml-leftBrace", "leftBrace" },
-    { "ooxml-leftBracket", "leftBracket" },
-    { "ooxml-blockArc", "blockArc" },
-    { "ooxml-curvedConnector3", "curvedConnector3" },
-    { "ooxml-wedgeRoundRectCallout", "wedgeRoundRectCallout" },
-    { "ooxml-actionButtonMovie", "actionButtonMovie" },
-    { "ooxml-flowChartOnlineStorage", "flowChartOnlineStorage" },
-    { "ooxml-gear6", "gear6" },
-    { "ooxml-halfFrame", "halfFrame" },
-    { "ooxml-snip2SameRect", "snip2SameRect" },
-    { "ooxml-triangle", "triangle" },
-    { "ooxml-teardrop", "teardrop" },
-    { "ooxml-flowChartDocument", "flowChartDocument" },
-    { "ooxml-rightArrowCallout", "rightArrowCallout" },
-    { "ooxml-rightBrace", "rightBrace" },
-    { "ooxml-chartPlus", "chartPlus" },
-    { "ooxml-flowChartManualInput", "flowChartManualInput" },
-    { "ooxml-flowChartMerge", "flowChartMerge" },
-    { "ooxml-line", "line" },
-    { "ooxml-downArrow", "downArrow" },
-    { "ooxml-upArrow", "upArrow" },
-    { "ooxml-curvedDownArrow", "curvedDownArrow" },
-    { "ooxml-actionButtonReturn", "actionButtonReturn" },
-    { "ooxml-flowChartInputOutput", "flowChartInputOutput" },
-    { "ooxml-bracketPair", "bracketPair" },
-    { "ooxml-smileyFace", "smileyFace" },
-    { "ooxml-actionButtonBlank", "actionButtonBlank" },
-    { "ooxml-wave", "wave" },
-    { "ooxml-swooshArrow", "swooshArrow" },
-    { "ooxml-flowChartSummingJunction", "flowChartSummingJunction" },
-    { "ooxml-lightningBolt", "lightningBolt" },
-    { "ooxml-flowChartDisplay", "flowChartDisplay" },
-    { "ooxml-actionButtonBackPrevious", "actionButtonBackPrevious" },
-    { "ooxml-frame", "frame" },
-    { "ooxml-rtTriangle", "rtTriangle" },
-    { "ooxml-flowChartMagneticTape", "flowChartMagneticTape" },
-    { "ooxml-curvedRightArrow", "curvedRightArrow" },
-    { "ooxml-leftUpArrow", "leftUpArrow" },
-    { "ooxml-wedgeEllipseCallout", "wedgeEllipseCallout" },
-    { "ooxml-doubleWave", "doubleWave" },
-    { "ooxml-bentArrow", "bentArrow" },
-    { "ooxml-star10", "star10" },
-    { "ooxml-leftArrow", "leftArrow" },
-    { "ooxml-curvedUpArrow", "curvedUpArrow" },
-    { "ooxml-snip1Rect", "snip1Rect" },
-    { "ooxml-ellipseRibbon2", "ellipseRibbon2" },
-    { "ooxml-plus", "plus" },
-    { "ooxml-accentCallout3", "accentCallout3" },
-    { "ooxml-leftCircularArrow", "leftCircularArrow" },
-    { "ooxml-rightArrow", "rightArrow" },
-    { "ooxml-flowChartPunchedCard", "flowChartPunchedCard" },
-    { "ooxml-snip2DiagRect", "snip2DiagRect" },
-    { "ooxml-verticalScroll", "verticalScroll" },
-    { "ooxml-star7", "star7" },
-    { "ooxml-chartX", "chartX" },
-    { "ooxml-cloud", "cloud" },
-    { "ooxml-cube", "cube" },
-    { "ooxml-round2DiagRect", "round2DiagRect" },
-    { "ooxml-flowChartMultidocument", "flowChartMultidocument" },
-    { "ooxml-actionButtonDocument", "actionButtonDocument" },
-    { "ooxml-flowChartTerminator", "flowChartTerminator" },
-    { "ooxml-flowChartDelay", "flowChartDelay" },
-    { "ooxml-curvedConnector5", "curvedConnector5" },
-    { "ooxml-horizontalScroll", "horizontalScroll" },
-    { "ooxml-bentConnector4", "bentConnector4" },
-    { "ooxml-leftRightCircularArrow", "leftRightCircularArrow" },
-    { "ooxml-wedgeRectCallout", "wedgeRectCallout" },
-    { "ooxml-accentCallout2", "accentCallout2" },
-    { "ooxml-flowChartMagneticDrum", "flowChartMagneticDrum" },
-    { "ooxml-corner", "corner" },
-    { "ooxml-borderCallout2", "borderCallout2" },
-    { "ooxml-donut", "donut" },
-    { "ooxml-flowChartCollate", "flowChartCollate" },
-    { "ooxml-mathNotEqual", "mathNotEqual" },
-    { "ooxml-bentConnector2", "bentConnector2" },
-    { "ooxml-mathMultiply", "mathMultiply" },
-    { "ooxml-heptagon", "heptagon" },
-    { "ooxml-rect", "rect" },
-    { "ooxml-accentBorderCallout2", "accentBorderCallout2" },
-    { "ooxml-pieWedge", "pieWedge" },
-    { "ooxml-upArrowCallout", "upArrowCallout" },
-    { "ooxml-flowChartProcess", "flowChartProcess" },
-    { "ooxml-star5", "star5" },
-    { "ooxml-lineInv", "lineInv" },
-    { "ooxml-straightConnector1", "straightConnector1" },
-    { "ooxml-stripedRightArrow", "stripedRightArrow" },
-    { "ooxml-callout3", "callout3" },
-    { "ooxml-bentUpArrow", "bentUpArrow" },
-    { "ooxml-noSmoking", "noSmoking" },
-    { "ooxml-trapezoid", "trapezoid" },
-    { "ooxml-cloudCallout", "cloudCallout" },
-    { "ooxml-callout1", "callout1" },
-    { "ooxml-ribbon", "ribbon" },
-    { "ooxml-rect", "rect" },
-};
-
-struct {
-    const char* sDML;
-    MSO_SPT nVML;
-} const pDMLToVMLTable[] = {
-    {"notPrimitive", mso_sptNotPrimitive},
-    {"rectangle", mso_sptRectangle},
-    {"roundRectangle", mso_sptRoundRectangle},
-    {"ellipse", mso_sptEllipse},
-    {"diamond", mso_sptDiamond},
-    {"triangle", mso_sptIsocelesTriangle},
-    {"rtTriangle", mso_sptRightTriangle},
-    {"parallelogram", mso_sptParallelogram},
-    {"trapezoid", mso_sptTrapezoid},
-    {"hexagon", mso_sptHexagon},
-    {"octagon", mso_sptOctagon},
-    {"plus", mso_sptPlus},
-    {"star5", mso_sptStar},
-    {"rightArrow", mso_sptArrow},
-    {"thickArrow", mso_sptThickArrow},
-    {"homePlate", mso_sptHomePlate},
-    {"cube", mso_sptCube},
-    {"wedgeRoundRectCallout", mso_sptBalloon},
-    {"star16", mso_sptSeal},
-    {"arc", mso_sptArc},
-    {"line", mso_sptLine},
-    {"plaque", mso_sptPlaque},
-    {"can", mso_sptCan},
-    {"donut", mso_sptDonut},
-    {"textPlain", mso_sptTextSimple},
-    {"textStop", mso_sptTextOctagon},
-    {"textTriangle", mso_sptTextHexagon},
-    {"textCanDown", mso_sptTextCurve},
-    {"textWave1", mso_sptTextWave},
-    {"textArchUpPour", mso_sptTextRing},
-    {"textCanDown", mso_sptTextOnCurve},
-    {"textArchUp", mso_sptTextOnRing},
-    {"straightConnector1", mso_sptStraightConnector1},
-    {"bentConnector2", mso_sptBentConnector2},
-    {"bentConnector3", mso_sptBentConnector3},
-    {"bentConnector4", mso_sptBentConnector4},
-    {"bentConnector5", mso_sptBentConnector5},
-    {"curvedConnector2", mso_sptCurvedConnector2},
-    {"curvedConnector3", mso_sptCurvedConnector3},
-    {"curvedConnector4", mso_sptCurvedConnector4},
-    {"curvedConnector5", mso_sptCurvedConnector5},
-    {"callout1", mso_sptCallout1},
-    {"callout2", mso_sptCallout2},
-    {"callout3", mso_sptCallout3},
-    {"accentCallout1", mso_sptAccentCallout1},
-    {"accentCallout2", mso_sptAccentCallout2},
-    {"accentCallout3", mso_sptAccentCallout3},
-    {"borderCallout1", mso_sptBorderCallout1},
-    {"borderCallout2", mso_sptBorderCallout2},
-    {"borderCallout3", mso_sptBorderCallout3},
-    {"accentBorderCallout1", mso_sptAccentBorderCallout1},
-    {"accentBorderCallout2", mso_sptAccentBorderCallout2},
-    {"accentBorderCallout3", mso_sptAccentBorderCallout3},
-    {"ribbon", mso_sptRibbon},
-    {"ribbon2", mso_sptRibbon2},
-    {"chevron", mso_sptChevron},
-    {"pentagon", mso_sptPentagon},
-    {"noSmoking", mso_sptNoSmoking},
-    {"star8", mso_sptSeal8},
-    {"star16", mso_sptSeal16},
-    {"star32", mso_sptSeal32},
-    {"wedgeRectCallout", mso_sptWedgeRectCallout},
-    {"wedgeRoundRectCallout", mso_sptWedgeRRectCallout},
-    {"wedgeEllipseCallout", mso_sptWedgeEllipseCallout},
-    {"wave", mso_sptWave},
-    {"foldedCorner", mso_sptFoldedCorner},
-    {"leftArrow", mso_sptLeftArrow},
-    {"downArrow", mso_sptDownArrow},
-    {"upArrow", mso_sptUpArrow},
-    {"leftRightArrow", mso_sptLeftRightArrow},
-    {"upDownArrow", mso_sptUpDownArrow},
-    {"irregularSeal1", mso_sptIrregularSeal1},
-    {"irregularSeal2", mso_sptIrregularSeal2},
-    {"lightningBolt", mso_sptLightningBolt},
-    {"heart", mso_sptHeart},
-    {"pictureFrame", mso_sptPictureFrame},
-    {"quadArrow", mso_sptQuadArrow},
-    {"leftArrowCallout", mso_sptLeftArrowCallout},
-    {"rightArrowCallout", mso_sptRightArrowCallout},
-    {"upArrowCallout", mso_sptUpArrowCallout},
-    {"downArrowCallout", mso_sptDownArrowCallout},
-    {"leftRightArrowCallout", mso_sptLeftRightArrowCallout},
-    {"upDownArrowCallout", mso_sptUpDownArrowCallout},
-    {"quadArrowCallout", mso_sptQuadArrowCallout},
-    {"bevel", mso_sptBevel},
-    {"leftBracket", mso_sptLeftBracket},
-    {"rightBracket", mso_sptRightBracket},
-    {"leftBrace", mso_sptLeftBrace},
-    {"rightBrace", mso_sptRightBrace},
-    {"leftUpArrow", mso_sptLeftUpArrow},
-    {"bentUpArrow", mso_sptBentUpArrow},
-    {"bentArrow", mso_sptBentArrow},
-    {"star24", mso_sptSeal24},
-    {"stripedRightArrow", mso_sptStripedRightArrow},
-    {"notchedRightArrow", mso_sptNotchedRightArrow},
-    {"blockArc", mso_sptBlockArc},
-    {"smileyFace", mso_sptSmileyFace},
-    {"verticalScroll", mso_sptVerticalScroll},
-    {"horizontalScroll", mso_sptHorizontalScroll},
-    {"circularArrow", mso_sptCircularArrow},
-    {"notchedCircularArrow", mso_sptNotchedCircularArrow},
-    {"uturnArrow", mso_sptUturnArrow},
-    {"curvedRightArrow", mso_sptCurvedRightArrow},
-    {"curvedLeftArrow", mso_sptCurvedLeftArrow},
-    {"curvedUpArrow", mso_sptCurvedUpArrow},
-    {"curvedDownArrow", mso_sptCurvedDownArrow},
-    {"cloudCallout", mso_sptCloudCallout},
-    {"ellipseRibbon", mso_sptEllipseRibbon},
-    {"ellipseRibbon2", mso_sptEllipseRibbon2},
-    {"flowChartProcess", mso_sptFlowChartProcess},
-    {"flowChartDecision", mso_sptFlowChartDecision},
-    {"flowChartInputOutput", mso_sptFlowChartInputOutput},
-    {"flowChartPredefinedProcess", mso_sptFlowChartPredefinedProcess},
-    {"flowChartInternalStorage", mso_sptFlowChartInternalStorage},
-    {"flowChartDocument", mso_sptFlowChartDocument},
-    {"flowChartMultidocument", mso_sptFlowChartMultidocument},
-    {"flowChartTerminator", mso_sptFlowChartTerminator},
-    {"flowChartPreparation", mso_sptFlowChartPreparation},
-    {"flowChartManualInput", mso_sptFlowChartManualInput},
-    {"flowChartManualOperation", mso_sptFlowChartManualOperation},
-    {"flowChartConnector", mso_sptFlowChartConnector},
-    {"flowChartPunchedCard", mso_sptFlowChartPunchedCard},
-    {"flowChartPunchedTape", mso_sptFlowChartPunchedTape},
-    {"flowChartSummingJunction", mso_sptFlowChartSummingJunction},
-    {"flowChartOr", mso_sptFlowChartOr},
-    {"flowChartCollate", mso_sptFlowChartCollate},
-    {"flowChartSort", mso_sptFlowChartSort},
-    {"flowChartExtract", mso_sptFlowChartExtract},
-    {"flowChartMerge", mso_sptFlowChartMerge},
-    {"flowChartOfflineStorage", mso_sptFlowChartOfflineStorage},
-    {"flowChartOnlineStorage", mso_sptFlowChartOnlineStorage},
-    {"flowChartMagneticTape", mso_sptFlowChartMagneticTape},
-    {"flowChartMagneticDisk", mso_sptFlowChartMagneticDisk},
-    {"flowChartMagneticDrum", mso_sptFlowChartMagneticDrum},
-    {"flowChartDisplay", mso_sptFlowChartDisplay},
-    {"flowChartDelay", mso_sptFlowChartDelay},
-    {"textPlain", mso_sptTextPlainText},
-    {"textStop", mso_sptTextStop},
-    {"textTriangle", mso_sptTextTriangle},
-    {"textTriangleInverted", mso_sptTextTriangleInverted},
-    {"textChevron", mso_sptTextChevron},
-    {"textChevronInverted", mso_sptTextChevronInverted},
-    {"textRingInside", mso_sptTextRingInside},
-    {"textRingOutside", mso_sptTextRingOutside},
-    {"textArchUp", mso_sptTextArchUpCurve},
-    {"textArchDown", mso_sptTextArchDownCurve},
-    {"textCircle", mso_sptTextCircleCurve},
-    {"textButton", mso_sptTextButtonCurve},
-    {"textArchUpPour", mso_sptTextArchUpPour},
-    {"textArchDownPour", mso_sptTextArchDownPour},
-    {"textCirclePour", mso_sptTextCirclePour},
-    {"textButtonPour", mso_sptTextButtonPour},
-    {"textCurveUp", mso_sptTextCurveUp},
-    {"textCurveDown", mso_sptTextCurveDown},
-    {"textCascadeUp", mso_sptTextCascadeUp},
-    {"textCascadeDown", mso_sptTextCascadeDown},
-    {"textWave1", mso_sptTextWave1},
-    {"textWave2", mso_sptTextWave2},
-    {"textWave3", mso_sptTextWave3},
-    {"textWave4", mso_sptTextWave4},
-    {"textInflate", mso_sptTextInflate},
-    {"textDeflate", mso_sptTextDeflate},
-    {"textInflateBottom", mso_sptTextInflateBottom},
-    {"textDeflateBottom", mso_sptTextDeflateBottom},
-    {"textInflateTop", mso_sptTextInflateTop},
-    {"textDeflateTop", mso_sptTextDeflateTop},
-    {"textDeflateInflate", mso_sptTextDeflateInflate},
-    {"textDeflateInflateDeflate", mso_sptTextDeflateInflateDeflate},
-    {"textFadeRight", mso_sptTextFadeRight},
-    {"textFadeLeft", mso_sptTextFadeLeft},
-    {"textFadeUp", mso_sptTextFadeUp},
-    {"textFadeDown", mso_sptTextFadeDown},
-    {"textSlantUp", mso_sptTextSlantUp},
-    {"textSlantDown", mso_sptTextSlantDown},
-    {"textCanUp", mso_sptTextCanUp},
-    {"textCanDown", mso_sptTextCanDown},
-    {"flowChartAlternateProcess", mso_sptFlowChartAlternateProcess},
-    {"flowChartOffpageConnector", mso_sptFlowChartOffpageConnector},
-    {"callout1", mso_sptCallout90},
-    {"accentCallout1", mso_sptAccentCallout90},
-    {"borderCallout1", mso_sptBorderCallout90},
-    {"accentBorderCallout1", mso_sptAccentBorderCallout90},
-    {"leftRightUpArrow", mso_sptLeftRightUpArrow},
-    {"sun", mso_sptSun},
-    {"moon", mso_sptMoon},
-    {"bracketPair", mso_sptBracketPair},
-    {"bracePair", mso_sptBracePair},
-    {"star4", mso_sptSeal4},
-    {"doubleWave", mso_sptDoubleWave},
-    {"actionButtonBlank", mso_sptActionButtonBlank},
-    {"actionButtonHome", mso_sptActionButtonHome},
-    {"actionButtonHelp", mso_sptActionButtonHelp},
-    {"actionButtonInformation", mso_sptActionButtonInformation},
-    {"actionButtonForwardNext", mso_sptActionButtonForwardNext},
-    {"actionButtonBackPrevious", mso_sptActionButtonBackPrevious},
-    {"actionButtonEnd", mso_sptActionButtonEnd},
-    {"actionButtonBeginning", mso_sptActionButtonBeginning},
-    {"actionButtonReturn", mso_sptActionButtonReturn},
-    {"actionButtonDocument", mso_sptActionButtonDocument},
-    {"actionButtonSound", mso_sptActionButtonSound},
-    {"actionButtonMovie", mso_sptActionButtonMovie},
-    {"hostControl", mso_sptHostControl},
-    {"textBox", mso_sptTextBox},
-};
-
-const char* GetOOXMLPresetGeometry( const OUString& rShapeType )
-{
-    typedef std::unordered_map< const char*, const char*, rtl::CStringHash, 
rtl::CStringEqual> CustomShapeTypeTranslationHashMap;
-    static CustomShapeTypeTranslationHashMap 
aCustomShapeTypeTranslationHashMap = []()
-    {
-        CustomShapeTypeTranslationHashMap tmp;
-        for(const msfilter::util::CustomShapeTypeTranslationTable& i : 
pCustomShapeTypeTranslationTable)
-        {
-            tmp[ i.sOOo ] = i.sMSO;
-        }
-        return tmp;
-    }();
-    CustomShapeTypeTranslationHashMap::iterator i(
-        aCustomShapeTypeTranslationHashMap.find(rShapeType.toUtf8().getStr()));
+    typedef std::unordered_map<std::u16string_view, OString> 
CustomShapeTypeTranslationHashMap;
+    static const CustomShapeTypeTranslationHashMap 
aCustomShapeTypeTranslationHashMap{
+        // { "non-primitive", mso_sptMin },
+        { u"frame", "frame" },
+        { u"rectangle", "rect" },
+        { u"round-rectangle", "roundRect" },
+        { u"ellipse", "ellipse" },
+        { u"diamond", "diamond" },
+        { u"isosceles-triangle", "triangle" },
+        { u"right-triangle", "rtTriangle" },
+        { u"parallelogram", "parallelogram" },
+        { u"trapezoid", "trapezoid" },
+        { u"hexagon", "hexagon" },
+        { u"octagon", "octagon" },
+        { u"cross", "plus" },
+        { u"star5", "star5" },
+        { u"right-arrow", "rightArrow" },
+        // { u"mso-spt14", mso_sptThickArrow },
+        { u"pentagon-right", "homePlate" },
+        { u"cube", "cube" },
+        // { u"mso-spt17", mso_sptBalloon },
+        // { u"mso-spt18", mso_sptSeal },
+        { u"mso-spt19", "arc" },
+        { u"mso-spt20", "line" },
+        { u"mso-spt21", "plaque" },
+        { u"can", "can" },
+        { u"ring", "donut" },
+        { u"mso-spt24", "textPlain" },
+        { u"mso-spt25", "textStop" },
+        { u"mso-spt26", "textTriangle" },
+        { u"mso-spt27", "textCanDown" },
+        { u"mso-spt28", "textWave1" },
+        { u"mso-spt29", "textArchUpPour" },
+        { u"mso-spt30", "textCanDown" },
+        { u"mso-spt31", "textArchUp" },
+        { u"mso-spt32", "straightConnector1" },
+        { u"mso-spt33", "bentConnector2" },
+        { u"mso-spt34", "bentConnector3" },
+        { u"mso-spt35", "bentConnector4" },
+        { u"mso-spt36", "bentConnector5" },
+        { u"mso-spt37", "curvedConnector2" },
+        { u"mso-spt38", "curvedConnector3" },
+        { u"mso-spt39", "curvedConnector4" },
+        { u"mso-spt40", "curvedConnector5" },
+        { u"mso-spt41", "callout1" },
+        { u"mso-spt42", "callout2" },
+        { u"mso-spt43", "callout3" },
+        { u"mso-spt44", "accentCallout1" },
+        { u"mso-spt45", "accentCallout2" },
+        { u"mso-spt46", "accentCallout3" },
+        { u"line-callout-1", "borderCallout1" },
+        { u"line-callout-2", "borderCallout2" },
+        { u"line-callout-3", "borderCallout3" },
+        { u"mso-spt49", "borderCallout3" },
+        { u"mso-spt50", "accentBorderCallout1" },
+        { u"mso-spt51", "accentBorderCallout2" },
+        { u"mso-spt52", "accentBorderCallout3" },
+        { u"mso-spt53", "ribbon" },
+        { u"mso-spt54", "ribbon2" },
+        { u"chevron", "chevron" },
+        { u"pentagon", "pentagon" },
+        { u"forbidden", "noSmoking" },
+        { u"star8", "star8" },
+        { u"mso-spt59", "star16" },
+        { u"mso-spt60", "star32" },
+        { u"rectangular-callout", "wedgeRectCallout" },
+        { u"round-rectangular-callout", "wedgeRoundRectCallout" },
+        { u"round-callout", "wedgeEllipseCallout" },
+        { u"mso-spt64", "wave" },
+        { u"paper", "foldedCorner" },
+        { u"left-arrow", "leftArrow" },
+        { u"down-arrow", "downArrow" },
+        { u"up-arrow", "upArrow" },
+        { u"left-right-arrow", "leftRightArrow" },
+        { u"up-down-arrow", "upDownArrow" },
+        { u"mso-spt71", "irregularSeal1" },
+        { u"bang", "irregularSeal2" },
+        { u"lightning", "lightningBolt" },
+        { u"heart", "heart" },
+        { u"quad-arrow", "quadArrow" },
+        { u"left-arrow-callout", "leftArrowCallout" },
+        { u"right-arrow-callout", "rightArrowCallout" },
+        { u"up-arrow-callout", "upArrowCallout" },
+        { u"down-arrow-callout", "downArrowCallout" },
+        { u"left-right-arrow-callout", "leftRightArrowCallout" },
+        { u"up-down-arrow-callout", "upDownArrowCallout" },
+        { u"quad-arrow-callout", "quadArrowCallout" },
+        { u"quad-bevel", "bevel" },
+        { u"left-bracket", "leftBracket" },
+        { u"right-bracket", "rightBracket" },
+        { u"left-brace", "leftBrace" },
+        { u"right-brace", "rightBrace" },
+        { u"mso-spt89", "leftUpArrow" },
+        { u"mso-spt90", "bentUpArrow" },
+        { u"mso-spt91", "bentArrow" },
+        { u"star24", "star24" },
+        { u"striped-right-arrow", "stripedRightArrow" },
+        { u"notched-right-arrow", "notchedRightArrow" },
+        { u"block-arc", "blockArc" },
+        { u"smiley", "smileyFace" },
+        { u"vertical-scroll", "verticalScroll" },
+        { u"horizontal-scroll", "horizontalScroll" },
+        { u"circular-arrow", "circularArrow" },
+        { u"mso-spt100", "pie" }, // looks like MSO_SPT is wrong here
+        { u"mso-spt101", "uturnArrow" },
+        { u"mso-spt102", "curvedRightArrow" },
+        { u"mso-spt103", "curvedLeftArrow" },
+        { u"mso-spt104", "curvedUpArrow" },
+        { u"mso-spt105", "curvedDownArrow" },
+        { u"cloud-callout", "cloudCallout" },
+        { u"mso-spt107", "ellipseRibbon" },
+        { u"mso-spt108", "ellipseRibbon2" },
+        { u"flowchart-process", "flowChartProcess" },
+        { u"flowchart-decision", "flowChartDecision" },
+        { u"flowchart-data", "flowChartInputOutput" },
+        { u"flowchart-predefined-process", "flowChartPredefinedProcess" },
+        { u"flowchart-internal-storage", "flowChartInternalStorage" },
+        { u"flowchart-document", "flowChartDocument" },
+        { u"flowchart-multidocument", "flowChartMultidocument" },
+        { u"flowchart-terminator", "flowChartTerminator" },
+        { u"flowchart-preparation", "flowChartPreparation" },
+        { u"flowchart-manual-input", "flowChartManualInput" },
+        { u"flowchart-manual-operation", "flowChartManualOperation" },
+        { u"flowchart-connector", "flowChartConnector" },
+        { u"flowchart-card", "flowChartPunchedCard" },
+        { u"flowchart-punched-tape", "flowChartPunchedTape" },
+        { u"flowchart-summing-junction", "flowChartSummingJunction" },
+        { u"flowchart-or", "flowChartOr" },
+        { u"flowchart-collate", "flowChartCollate" },
+        { u"flowchart-sort", "flowChartSort" },
+        { u"flowchart-extract", "flowChartExtract" },
+        { u"flowchart-merge", "flowChartMerge" },
+        { u"mso-spt129", "flowChartOfflineStorage" },
+        { u"flowchart-stored-data", "flowChartOnlineStorage" },
+        { u"flowchart-sequential-access", "flowChartMagneticTape" },
+        { u"flowchart-magnetic-disk", "flowChartMagneticDisk" },
+        { u"flowchart-direct-access-storage", "flowChartMagneticDrum" },
+        { u"flowchart-display", "flowChartDisplay" },
+        { u"flowchart-delay", "flowChartDelay" },
+        // { u"fontwork-plain-text", "textPlainText" },
+        // { u"fontwork-stop", "textStop" },
+        // { u"fontwork-triangle-up", "textTriangle" },
+        // { u"fontwork-triangle-down", "textTriangleInverted" },
+        // { u"fontwork-chevron-up", "textChevron" },
+        // { u"fontwork-chevron-down", "textChevronInverted" },
+        // { u"mso-spt142", "textRingInside" },
+        // { u"mso-spt143", "textRingOutside" },
+        // { u"fontwork-arch-up-curve", "textArchUpCurve" },
+        // { u"fontwork-arch-down-curve", "textArchDownCurve" },
+        // { u"fontwork-circle-curve", "textCircleCurve" },
+        // { u"fontwork-open-circle-curve", "textButtonCurve" },
+        // { u"fontwork-arch-up-pour", "textArchUpPour" },
+        // { u"fontwork-arch-down-pour", "textArchDownPour" },
+        // { u"fontwork-circle-pour", "textCirclePour" },
+        // { u"fontwork-open-circle-pour", "textButtonPour" },
+        // { u"fontwork-curve-up", "textCurveUp" },
+        // { u"fontwork-curve-down", "textCurveDown" },
+        // { u"fontwork-fade-up-and-right", "textCascadeUp" },
+        // { u"fontwork-fade-up-and-left", "textCascadeDown" },
+        // { u"fontwork-wave", "textWave1" },
+        // { u"mso-spt157", "textWave2" },
+        // { u"mso-spt158", "textWave3" },
+        // { u"mso-spt159", "textWave4" },
+        // { u"fontwork-inflate", "textInflate" },
+        // { u"mso-spt161", "textDeflate" },
+        // { u"mso-spt162", "textInflateBottom" },
+        // { u"mso-spt163", "textDeflateBottom" },
+        // { u"mso-spt164", "textInflateTop" },
+        // { u"mso-spt165", "textDeflateTop" },
+        // { u"mso-spt166", "textDeflateInflate" },
+        // { u"mso-spt167", "textDeflateInflateDeflate" },
+        // { u"fontwork-fade-right", "textFadeRight" },
+        // { u"fontwork-fade-left", "textFadeLeft" },
+        // { u"fontwork-fade-up", "textFadeUp" },
+        // { u"fontwork-fade-down", "textFadeDown" },
+        // { u"fontwork-slant-up", "textSlantUp" },
+        // { u"fontwork-slant-down", "textSlantDown" },
+        // { u"mso-spt174", "textCanUp" },
+        // { u"mso-spt175", "textCanDown" },
+        { u"flowchart-alternate-process", "flowChartAlternateProcess" },
+        { u"flowchart-off-page-connector", "flowChartOffpageConnector" },
+        { u"mso-spt178", "callout1" },
+        { u"mso-spt179", "accentCallout1" },
+        { u"mso-spt180", "borderCallout1" },
+        { u"mso-spt182", "leftRightUpArrow" },
+        { u"sun", "sun" },
+        { u"moon", "moon" },
+        { u"bracket-pair", "bracketPair" },
+        { u"brace-pair", "bracePair" },
+        { u"star4", "star4" },
+        { u"mso-spt188", "doubleWave" },
+        { u"mso-spt189", "actionButtonBlank" },
+        { u"mso-spt190", "actionButtonHome" },
+        { u"mso-spt191", "actionButtonHelp" },
+        { u"mso-spt192", "actionButtonInformation" },
+        { u"mso-spt193", "actionButtonForwardNext" },
+        { u"mso-spt194", "actionButtonBackPrevious" },
+        { u"mso-spt195", "actionButtonEnd" },
+        { u"mso-spt196", "actionButtonBeginning" },
+        { u"mso-spt197", "actionButtonReturn" },
+        { u"mso-spt198", "actionButtonDocument" },
+        { u"mso-spt199", "actionButtonSound" },
+        { u"mso-spt200", "actionButtonMovie" },
+        // { u"mso-spt201", "hostControl" },
+        { u"mso-spt202", "rect" },
+        { u"ooxml-actionButtonSound", "actionButtonSound" },
+        { u"ooxml-borderCallout1", "borderCallout1" },
+        { u"ooxml-plaqueTabs", "plaqueTabs" },
+        { u"ooxml-curvedLeftArrow", "curvedLeftArrow" },
+        { u"ooxml-octagon", "octagon" },
+        { u"ooxml-leftRightRibbon", "leftRightRibbon" },
+        { u"ooxml-actionButtonInformation", "actionButtonInformation" },
+        { u"ooxml-bentConnector5", "bentConnector5" },
+        { u"ooxml-circularArrow", "circularArrow" },
+        { u"ooxml-downArrowCallout", "downArrowCallout" },
+        { u"ooxml-mathMinus", "mathMinus" },
+        { u"ooxml-gear9", "gear9" },
+        { u"ooxml-round1Rect", "round1Rect" },
+        { u"ooxml-sun", "sun" },
+        { u"ooxml-plaque", "plaque" },
+        { u"ooxml-chevron", "chevron" },
+        { u"ooxml-flowChartPreparation", "flowChartPreparation" },
+        { u"ooxml-diagStripe", "diagStripe" },
+        { u"ooxml-pentagon", "pentagon" },
+        { u"ooxml-funnel", "funnel" },
+        { u"ooxml-chartStar", "chartStar" },
+        { u"ooxml-accentBorderCallout1", "accentBorderCallout1" },
+        { u"ooxml-notchedRightArrow", "notchedRightArrow" },
+        { u"ooxml-rightBracket", "rightBracket" },
+        { u"ooxml-flowChartOffpageConnector", "flowChartOffpageConnector" },
+        { u"ooxml-leftRightArrow", "leftRightArrow" },
+        { u"ooxml-decagon", "decagon" },
+        { u"ooxml-actionButtonHelp", "actionButtonHelp" },
+        { u"ooxml-star24", "star24" },
+        { u"ooxml-mathDivide", "mathDivide" },
+        { u"ooxml-curvedConnector4", "curvedConnector4" },
+        { u"ooxml-flowChartOr", "flowChartOr" },
+        { u"ooxml-borderCallout3", "borderCallout3" },
+        { u"ooxml-upDownArrowCallout", "upDownArrowCallout" },
+        { u"ooxml-flowChartDecision", "flowChartDecision" },
+        { u"ooxml-leftRightArrowCallout", "leftRightArrowCallout" },
+        { u"ooxml-flowChartManualOperation", "flowChartManualOperation" },
+        { u"ooxml-snipRoundRect", "snipRoundRect" },
+        { u"ooxml-mathPlus", "mathPlus" },
+        { u"ooxml-actionButtonForwardNext", "actionButtonForwardNext" },
+        { u"ooxml-can", "can" },
+        { u"ooxml-foldedCorner", "foldedCorner" },
+        { u"ooxml-star32", "star32" },
+        { u"ooxml-flowChartInternalStorage", "flowChartInternalStorage" },
+        { u"ooxml-upDownArrow", "upDownArrow" },
+        { u"ooxml-irregularSeal2", "irregularSeal2" },
+        { u"ooxml-mathEqual", "mathEqual" },
+        { u"ooxml-star12", "star12" },
+        { u"ooxml-uturnArrow", "uturnArrow" },
+        { u"ooxml-squareTabs", "squareTabs" },
+        { u"ooxml-leftRightUpArrow", "leftRightUpArrow" },
+        { u"ooxml-homePlate", "homePlate" },
+        { u"ooxml-dodecagon", "dodecagon" },
+        { u"ooxml-leftArrowCallout", "leftArrowCallout" },
+        { u"ooxml-chord", "chord" },
+        { u"ooxml-quadArrowCallout", "quadArrowCallout" },
+        { u"ooxml-actionButtonBeginning", "actionButtonBeginning" },
+        { u"ooxml-ellipse", "ellipse" },
+        { u"ooxml-actionButtonEnd", "actionButtonEnd" },
+        { u"ooxml-arc", "arc" },
+        { u"ooxml-star16", "star16" },
+        { u"ooxml-parallelogram", "parallelogram" },
+        { u"ooxml-bevel", "bevel" },
+        { u"ooxml-roundRect", "roundRect" },
+        { u"ooxml-accentCallout1", "accentCallout1" },
+        { u"ooxml-flowChartSort", "flowChartSort" },
+        { u"ooxml-star8", "star8" },
+        { u"ooxml-flowChartAlternateProcess", "flowChartAlternateProcess" },
+        { u"ooxml-moon", "moon" },
+        { u"ooxml-star6", "star6" },
+        { u"ooxml-round2SameRect", "round2SameRect" },
+        { u"ooxml-nonIsoscelesTrapezoid", "nonIsoscelesTrapezoid" },
+        { u"ooxml-diamond", "diamond" },
+        { u"ooxml-ellipseRibbon", "ellipseRibbon" },
+        { u"ooxml-callout2", "callout2" },
+        { u"ooxml-pie", "pie" },
+        { u"ooxml-star4", "star4" },
+        { u"ooxml-flowChartPredefinedProcess", "flowChartPredefinedProcess" },
+        { u"ooxml-flowChartPunchedTape", "flowChartPunchedTape" },
+        { u"ooxml-curvedConnector2", "curvedConnector2" },
+        { u"ooxml-bentConnector3", "bentConnector3" },
+        { u"ooxml-cornerTabs", "cornerTabs" },
+        { u"ooxml-hexagon", "hexagon" },
+        { u"ooxml-flowChartConnector", "flowChartConnector" },
+        { u"ooxml-flowChartMagneticDisk", "flowChartMagneticDisk" },
+        { u"ooxml-heart", "heart" },
+        { u"ooxml-ribbon2", "ribbon2" },
+        { u"ooxml-bracePair", "bracePair" },
+        { u"ooxml-flowChartExtract", "flowChartExtract" },
+        { u"ooxml-actionButtonHome", "actionButtonHome" },
+        { u"ooxml-accentBorderCallout3", "accentBorderCallout3" },
+        { u"ooxml-flowChartOfflineStorage", "flowChartOfflineStorage" },
+        { u"ooxml-irregularSeal1", "irregularSeal1" },
+        { u"ooxml-quadArrow", "quadArrow" },
+        { u"ooxml-leftBrace", "leftBrace" },
+        { u"ooxml-leftBracket", "leftBracket" },
+        { u"ooxml-blockArc", "blockArc" },
+        { u"ooxml-curvedConnector3", "curvedConnector3" },
+        { u"ooxml-wedgeRoundRectCallout", "wedgeRoundRectCallout" },
+        { u"ooxml-actionButtonMovie", "actionButtonMovie" },
+        { u"ooxml-flowChartOnlineStorage", "flowChartOnlineStorage" },
+        { u"ooxml-gear6", "gear6" },
+        { u"ooxml-halfFrame", "halfFrame" },
+        { u"ooxml-snip2SameRect", "snip2SameRect" },
+        { u"ooxml-triangle", "triangle" },
+        { u"ooxml-teardrop", "teardrop" },
+        { u"ooxml-flowChartDocument", "flowChartDocument" },
+        { u"ooxml-rightArrowCallout", "rightArrowCallout" },
+        { u"ooxml-rightBrace", "rightBrace" },
+        { u"ooxml-chartPlus", "chartPlus" },
+        { u"ooxml-flowChartManualInput", "flowChartManualInput" },
+        { u"ooxml-flowChartMerge", "flowChartMerge" },
+        { u"ooxml-line", "line" },
+        { u"ooxml-downArrow", "downArrow" },
+        { u"ooxml-upArrow", "upArrow" },
+        { u"ooxml-curvedDownArrow", "curvedDownArrow" },
+        { u"ooxml-actionButtonReturn", "actionButtonReturn" },
+        { u"ooxml-flowChartInputOutput", "flowChartInputOutput" },
+        { u"ooxml-bracketPair", "bracketPair" },
+        { u"ooxml-smileyFace", "smileyFace" },
+        { u"ooxml-actionButtonBlank", "actionButtonBlank" },
+        { u"ooxml-wave", "wave" },
+        { u"ooxml-swooshArrow", "swooshArrow" },
+        { u"ooxml-flowChartSummingJunction", "flowChartSummingJunction" },
+        { u"ooxml-lightningBolt", "lightningBolt" },
+        { u"ooxml-flowChartDisplay", "flowChartDisplay" },
+        { u"ooxml-actionButtonBackPrevious", "actionButtonBackPrevious" },
+        { u"ooxml-frame", "frame" },
+        { u"ooxml-rtTriangle", "rtTriangle" },
+        { u"ooxml-flowChartMagneticTape", "flowChartMagneticTape" },
+        { u"ooxml-curvedRightArrow", "curvedRightArrow" },
+        { u"ooxml-leftUpArrow", "leftUpArrow" },
+        { u"ooxml-wedgeEllipseCallout", "wedgeEllipseCallout" },
+        { u"ooxml-doubleWave", "doubleWave" },
+        { u"ooxml-bentArrow", "bentArrow" },
+        { u"ooxml-star10", "star10" },
+        { u"ooxml-leftArrow", "leftArrow" },
+        { u"ooxml-curvedUpArrow", "curvedUpArrow" },
+        { u"ooxml-snip1Rect", "snip1Rect" },
+        { u"ooxml-ellipseRibbon2", "ellipseRibbon2" },
+        { u"ooxml-plus", "plus" },
+        { u"ooxml-accentCallout3", "accentCallout3" },
+        { u"ooxml-leftCircularArrow", "leftCircularArrow" },
+        { u"ooxml-rightArrow", "rightArrow" },
+        { u"ooxml-flowChartPunchedCard", "flowChartPunchedCard" },
+        { u"ooxml-snip2DiagRect", "snip2DiagRect" },
+        { u"ooxml-verticalScroll", "verticalScroll" },
+        { u"ooxml-star7", "star7" },
+        { u"ooxml-chartX", "chartX" },
+        { u"ooxml-cloud", "cloud" },
+        { u"ooxml-cube", "cube" },
+        { u"ooxml-round2DiagRect", "round2DiagRect" },
+        { u"ooxml-flowChartMultidocument", "flowChartMultidocument" },
+        { u"ooxml-actionButtonDocument", "actionButtonDocument" },
+        { u"ooxml-flowChartTerminator", "flowChartTerminator" },
+        { u"ooxml-flowChartDelay", "flowChartDelay" },
+        { u"ooxml-curvedConnector5", "curvedConnector5" },
+        { u"ooxml-horizontalScroll", "horizontalScroll" },
+        { u"ooxml-bentConnector4", "bentConnector4" },
+        { u"ooxml-leftRightCircularArrow", "leftRightCircularArrow" },
+        { u"ooxml-wedgeRectCallout", "wedgeRectCallout" },
+        { u"ooxml-accentCallout2", "accentCallout2" },
+        { u"ooxml-flowChartMagneticDrum", "flowChartMagneticDrum" },
+        { u"ooxml-corner", "corner" },
+        { u"ooxml-borderCallout2", "borderCallout2" },
+        { u"ooxml-donut", "donut" },
+        { u"ooxml-flowChartCollate", "flowChartCollate" },
+        { u"ooxml-mathNotEqual", "mathNotEqual" },
+        { u"ooxml-bentConnector2", "bentConnector2" },
+        { u"ooxml-mathMultiply", "mathMultiply" },
+        { u"ooxml-heptagon", "heptagon" },
+        { u"ooxml-rect", "rect" },
+        { u"ooxml-accentBorderCallout2", "accentBorderCallout2" },
+        { u"ooxml-pieWedge", "pieWedge" },
+        { u"ooxml-upArrowCallout", "upArrowCallout" },
+        { u"ooxml-flowChartProcess", "flowChartProcess" },
+        { u"ooxml-star5", "star5" },
+        { u"ooxml-lineInv", "lineInv" },
+        { u"ooxml-straightConnector1", "straightConnector1" },
+        { u"ooxml-stripedRightArrow", "stripedRightArrow" },
+        { u"ooxml-callout3", "callout3" },
+        { u"ooxml-bentUpArrow", "bentUpArrow" },
+        { u"ooxml-noSmoking", "noSmoking" },
+        { u"ooxml-trapezoid", "trapezoid" },
+        { u"ooxml-cloudCallout", "cloudCallout" },
+        { u"ooxml-callout1", "callout1" },
+        { u"ooxml-ribbon", "ribbon" },
+        { u"ooxml-rect", "rect" },
+    };
+    auto i(aCustomShapeTypeTranslationHashMap.find(rShapeType));
     return i == aCustomShapeTypeTranslationHashMap.end() ? "rect" : i->second;
 }
 
-MSO_SPT GETVMLShapeType(const OUString& aType)
+MSO_SPT GETVMLShapeType(std::u16string_view aType)
 {
-    typedef std::unordered_map< const char*, MSO_SPT, rtl::CStringHash, 
rtl::CStringEqual> DMLToVMLTranslationHashMap;
-    static DMLToVMLTranslationHashMap aDMLToVMLMap = []()
-    {
-        DMLToVMLTranslationHashMap tmp;
-        for (auto& i : pDMLToVMLTable)
-            tmp[i.sDML] = i.nVML;
-        return tmp;
-    }();
-
-    const char* pDML = GetOOXMLPresetGeometry(aType);
-    DMLToVMLTranslationHashMap::iterator i(aDMLToVMLMap.find(pDML));
+    typedef std::unordered_map<std::string_view, MSO_SPT> 
DMLToVMLTranslationHashMap;
+    static const DMLToVMLTranslationHashMap aDMLToVMLMap{
+        {"notPrimitive", mso_sptNotPrimitive},
+        {"rectangle", mso_sptRectangle},
+        {"roundRectangle", mso_sptRoundRectangle},
+        {"ellipse", mso_sptEllipse},
+        {"diamond", mso_sptDiamond},
+        {"triangle", mso_sptIsocelesTriangle},
+        {"rtTriangle", mso_sptRightTriangle},
+        {"parallelogram", mso_sptParallelogram},
+        {"trapezoid", mso_sptTrapezoid},
+        {"hexagon", mso_sptHexagon},
+        {"octagon", mso_sptOctagon},
+        {"plus", mso_sptPlus},
+        {"star5", mso_sptStar},
+        {"rightArrow", mso_sptArrow},
+        {"thickArrow", mso_sptThickArrow},
+        {"homePlate", mso_sptHomePlate},
+        {"cube", mso_sptCube},
+        {"wedgeRoundRectCallout", mso_sptBalloon},
+        {"star16", mso_sptSeal},
+        {"arc", mso_sptArc},
+        {"line", mso_sptLine},
+        {"plaque", mso_sptPlaque},
+        {"can", mso_sptCan},
+        {"donut", mso_sptDonut},
+        {"textPlain", mso_sptTextSimple},
+        {"textStop", mso_sptTextOctagon},
+        {"textTriangle", mso_sptTextHexagon},
+        {"textCanDown", mso_sptTextCurve},
+        {"textWave1", mso_sptTextWave},
+        {"textArchUpPour", mso_sptTextRing},
+        {"textCanDown", mso_sptTextOnCurve},
+        {"textArchUp", mso_sptTextOnRing},
+        {"straightConnector1", mso_sptStraightConnector1},
+        {"bentConnector2", mso_sptBentConnector2},
+        {"bentConnector3", mso_sptBentConnector3},
+        {"bentConnector4", mso_sptBentConnector4},
+        {"bentConnector5", mso_sptBentConnector5},
+        {"curvedConnector2", mso_sptCurvedConnector2},
+        {"curvedConnector3", mso_sptCurvedConnector3},
+        {"curvedConnector4", mso_sptCurvedConnector4},
+        {"curvedConnector5", mso_sptCurvedConnector5},
+        {"callout1", mso_sptCallout1},
+        {"callout2", mso_sptCallout2},
+        {"callout3", mso_sptCallout3},
+        {"accentCallout1", mso_sptAccentCallout1},
+        {"accentCallout2", mso_sptAccentCallout2},
+        {"accentCallout3", mso_sptAccentCallout3},
+        {"borderCallout1", mso_sptBorderCallout1},
+        {"borderCallout2", mso_sptBorderCallout2},
+        {"borderCallout3", mso_sptBorderCallout3},
+        {"accentBorderCallout1", mso_sptAccentBorderCallout1},
+        {"accentBorderCallout2", mso_sptAccentBorderCallout2},
+        {"accentBorderCallout3", mso_sptAccentBorderCallout3},
+        {"ribbon", mso_sptRibbon},
+        {"ribbon2", mso_sptRibbon2},
+        {"chevron", mso_sptChevron},
+        {"pentagon", mso_sptPentagon},
+        {"noSmoking", mso_sptNoSmoking},
+        {"star8", mso_sptSeal8},
+        {"star16", mso_sptSeal16},
+        {"star32", mso_sptSeal32},
+        {"wedgeRectCallout", mso_sptWedgeRectCallout},
+        {"wedgeRoundRectCallout", mso_sptWedgeRRectCallout},
+        {"wedgeEllipseCallout", mso_sptWedgeEllipseCallout},
+        {"wave", mso_sptWave},
+        {"foldedCorner", mso_sptFoldedCorner},
+        {"leftArrow", mso_sptLeftArrow},
+        {"downArrow", mso_sptDownArrow},
+        {"upArrow", mso_sptUpArrow},
+        {"leftRightArrow", mso_sptLeftRightArrow},
+        {"upDownArrow", mso_sptUpDownArrow},
+        {"irregularSeal1", mso_sptIrregularSeal1},
+        {"irregularSeal2", mso_sptIrregularSeal2},
+        {"lightningBolt", mso_sptLightningBolt},
+        {"heart", mso_sptHeart},
+        {"pictureFrame", mso_sptPictureFrame},
+        {"quadArrow", mso_sptQuadArrow},
+        {"leftArrowCallout", mso_sptLeftArrowCallout},
+        {"rightArrowCallout", mso_sptRightArrowCallout},
+        {"upArrowCallout", mso_sptUpArrowCallout},
+        {"downArrowCallout", mso_sptDownArrowCallout},
+        {"leftRightArrowCallout", mso_sptLeftRightArrowCallout},
+        {"upDownArrowCallout", mso_sptUpDownArrowCallout},
+        {"quadArrowCallout", mso_sptQuadArrowCallout},
+        {"bevel", mso_sptBevel},
+        {"leftBracket", mso_sptLeftBracket},
+        {"rightBracket", mso_sptRightBracket},
+        {"leftBrace", mso_sptLeftBrace},
+        {"rightBrace", mso_sptRightBrace},
+        {"leftUpArrow", mso_sptLeftUpArrow},
+        {"bentUpArrow", mso_sptBentUpArrow},
+        {"bentArrow", mso_sptBentArrow},
+        {"star24", mso_sptSeal24},
+        {"stripedRightArrow", mso_sptStripedRightArrow},
+        {"notchedRightArrow", mso_sptNotchedRightArrow},
+        {"blockArc", mso_sptBlockArc},
+        {"smileyFace", mso_sptSmileyFace},
+        {"verticalScroll", mso_sptVerticalScroll},
+        {"horizontalScroll", mso_sptHorizontalScroll},
+        {"circularArrow", mso_sptCircularArrow},
+        {"notchedCircularArrow", mso_sptNotchedCircularArrow},
+        {"uturnArrow", mso_sptUturnArrow},
+        {"curvedRightArrow", mso_sptCurvedRightArrow},
+        {"curvedLeftArrow", mso_sptCurvedLeftArrow},
+        {"curvedUpArrow", mso_sptCurvedUpArrow},
+        {"curvedDownArrow", mso_sptCurvedDownArrow},
+        {"cloudCallout", mso_sptCloudCallout},
+        {"ellipseRibbon", mso_sptEllipseRibbon},
+        {"ellipseRibbon2", mso_sptEllipseRibbon2},
+        {"flowChartProcess", mso_sptFlowChartProcess},
+        {"flowChartDecision", mso_sptFlowChartDecision},
+        {"flowChartInputOutput", mso_sptFlowChartInputOutput},
+        {"flowChartPredefinedProcess", mso_sptFlowChartPredefinedProcess},
+        {"flowChartInternalStorage", mso_sptFlowChartInternalStorage},
+        {"flowChartDocument", mso_sptFlowChartDocument},
+        {"flowChartMultidocument", mso_sptFlowChartMultidocument},
+        {"flowChartTerminator", mso_sptFlowChartTerminator},
+        {"flowChartPreparation", mso_sptFlowChartPreparation},
+        {"flowChartManualInput", mso_sptFlowChartManualInput},
+        {"flowChartManualOperation", mso_sptFlowChartManualOperation},
+        {"flowChartConnector", mso_sptFlowChartConnector},
+        {"flowChartPunchedCard", mso_sptFlowChartPunchedCard},
+        {"flowChartPunchedTape", mso_sptFlowChartPunchedTape},
+        {"flowChartSummingJunction", mso_sptFlowChartSummingJunction},
+        {"flowChartOr", mso_sptFlowChartOr},
+        {"flowChartCollate", mso_sptFlowChartCollate},
+        {"flowChartSort", mso_sptFlowChartSort},
+        {"flowChartExtract", mso_sptFlowChartExtract},
+        {"flowChartMerge", mso_sptFlowChartMerge},
+        {"flowChartOfflineStorage", mso_sptFlowChartOfflineStorage},
+        {"flowChartOnlineStorage", mso_sptFlowChartOnlineStorage},
+        {"flowChartMagneticTape", mso_sptFlowChartMagneticTape},
+        {"flowChartMagneticDisk", mso_sptFlowChartMagneticDisk},
+        {"flowChartMagneticDrum", mso_sptFlowChartMagneticDrum},
+        {"flowChartDisplay", mso_sptFlowChartDisplay},
+        {"flowChartDelay", mso_sptFlowChartDelay},
+        {"textPlain", mso_sptTextPlainText},
+        {"textStop", mso_sptTextStop},
+        {"textTriangle", mso_sptTextTriangle},
+        {"textTriangleInverted", mso_sptTextTriangleInverted},
+        {"textChevron", mso_sptTextChevron},
+        {"textChevronInverted", mso_sptTextChevronInverted},
+        {"textRingInside", mso_sptTextRingInside},
+        {"textRingOutside", mso_sptTextRingOutside},
+        {"textArchUp", mso_sptTextArchUpCurve},
+        {"textArchDown", mso_sptTextArchDownCurve},
+        {"textCircle", mso_sptTextCircleCurve},
+        {"textButton", mso_sptTextButtonCurve},
+        {"textArchUpPour", mso_sptTextArchUpPour},
+        {"textArchDownPour", mso_sptTextArchDownPour},
+        {"textCirclePour", mso_sptTextCirclePour},
+        {"textButtonPour", mso_sptTextButtonPour},
+        {"textCurveUp", mso_sptTextCurveUp},
+        {"textCurveDown", mso_sptTextCurveDown},
+        {"textCascadeUp", mso_sptTextCascadeUp},
+        {"textCascadeDown", mso_sptTextCascadeDown},
+        {"textWave1", mso_sptTextWave1},
+        {"textWave2", mso_sptTextWave2},
+        {"textWave3", mso_sptTextWave3},
+        {"textWave4", mso_sptTextWave4},
+        {"textInflate", mso_sptTextInflate},
+        {"textDeflate", mso_sptTextDeflate},
+        {"textInflateBottom", mso_sptTextInflateBottom},
+        {"textDeflateBottom", mso_sptTextDeflateBottom},
+        {"textInflateTop", mso_sptTextInflateTop},
+        {"textDeflateTop", mso_sptTextDeflateTop},
+        {"textDeflateInflate", mso_sptTextDeflateInflate},
+        {"textDeflateInflateDeflate", mso_sptTextDeflateInflateDeflate},
+        {"textFadeRight", mso_sptTextFadeRight},
+        {"textFadeLeft", mso_sptTextFadeLeft},
+        {"textFadeUp", mso_sptTextFadeUp},
+        {"textFadeDown", mso_sptTextFadeDown},
+        {"textSlantUp", mso_sptTextSlantUp},
+        {"textSlantDown", mso_sptTextSlantDown},
+        {"textCanUp", mso_sptTextCanUp},
+        {"textCanDown", mso_sptTextCanDown},
+        {"flowChartAlternateProcess", mso_sptFlowChartAlternateProcess},
+        {"flowChartOffpageConnector", mso_sptFlowChartOffpageConnector},
+        {"callout1", mso_sptCallout90},
+        {"accentCallout1", mso_sptAccentCallout90},
+        {"borderCallout1", mso_sptBorderCallout90},
+        {"accentBorderCallout1", mso_sptAccentBorderCallout90},
+        {"leftRightUpArrow", mso_sptLeftRightUpArrow},
+        {"sun", mso_sptSun},
+        {"moon", mso_sptMoon},
+        {"bracketPair", mso_sptBracketPair},
+        {"bracePair", mso_sptBracePair},
+        {"star4", mso_sptSeal4},
+        {"doubleWave", mso_sptDoubleWave},
+        {"actionButtonBlank", mso_sptActionButtonBlank},
+        {"actionButtonHome", mso_sptActionButtonHome},
+        {"actionButtonHelp", mso_sptActionButtonHelp},
+        {"actionButtonInformation", mso_sptActionButtonInformation},
+        {"actionButtonForwardNext", mso_sptActionButtonForwardNext},
+        {"actionButtonBackPrevious", mso_sptActionButtonBackPrevious},
+        {"actionButtonEnd", mso_sptActionButtonEnd},
+        {"actionButtonBeginning", mso_sptActionButtonBeginning},
+        {"actionButtonReturn", mso_sptActionButtonReturn},
+        {"actionButtonDocument", mso_sptActionButtonDocument},
+        {"actionButtonSound", mso_sptActionButtonSound},
+        {"actionButtonMovie", mso_sptActionButtonMovie},
+        {"hostControl", mso_sptHostControl},
+        {"textBox", mso_sptTextBox},
+    };
+
+    auto i(aDMLToVMLMap.find(GetOOXMLPresetGeometry(aType)));
     return i == aDMLToVMLMap.end() ? mso_sptNil : i->second;
 }
 
diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx
index 3e7610c28a4f..d540da35bae7 100644
--- a/include/filter/msfilter/util.hxx
+++ b/include/filter/msfilter/util.hxx
@@ -115,10 +115,10 @@ struct MSFILTER_DLLPUBLIC EquationResult
 MSFILTER_DLLPUBLIC EquationResult ParseCombinedChars(const OUString& rStr);
 
 /// Similar to EnhancedCustomShapeTypeNames::Get(), but it also supports OOXML 
types and returns a drawingML string.
-MSFILTER_DLLPUBLIC const char* GetOOXMLPresetGeometry( const OUString& 
rShapeType );
+MSFILTER_DLLPUBLIC OString GetOOXMLPresetGeometry( std::u16string_view 
rShapeType );
 
 /// Similar to EnhancedCustomShapeTypeNames::Get(), but returns an MSO_SPT 
(binary / VML type).
-MSFILTER_DLLPUBLIC MSO_SPT GETVMLShapeType(const OUString& aType);
+MSFILTER_DLLPUBLIC MSO_SPT GETVMLShapeType(std::u16string_view aType);
 
 /**
  * The following function checks if a MSO shapetype is allowed to have 
textboxcontent.
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 774881022901..e1aaca0c4386 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -303,9 +303,9 @@ public:
                              sal_Int16 nScriptType = 
css::i18n::ScriptType::LATIN,
                              const css::uno::Reference< 
css::beans::XPropertySet >& rXShapePropSet = {});
 
-    void WritePresetShape( const char* pShape , std::vector< 
std::pair<sal_Int32,sal_Int32>> & rAvList );
-    void WritePresetShape( const char* pShape );
-    void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool 
bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp );
+    void WritePresetShape( const OString& pShape , std::vector< 
std::pair<sal_Int32,sal_Int32>> & rAvList );
+    void WritePresetShape( const OString& pShape );
+    void WritePresetShape( const OString& pShape, MSO_SPT eShapeType, bool 
bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp );
     bool WriteCustomGeometry(
         const css::uno::Reference<css::drawing::XShape>& rXShape,
         const SdrObjCustomShape& rSdrObjCustomShape);
diff --git a/oox/source/export/DMLPresetShapeExport.cxx 
b/oox/source/export/DMLPresetShapeExport.cxx
index ad603bcd2bd2..a2d08ec3e2e2 100644
--- a/oox/source/export/DMLPresetShapeExport.cxx
+++ b/oox/source/export/DMLPresetShapeExport.cxx
@@ -223,7 +223,7 @@ bool DMLPresetShapeExporter::WriteShape()
         if (!m_bHasHandleValues)
         {
             OUString sShapeType = GetShapeType();
-            const char* sPresetShape = 
msfilter::util::GetOOXMLPresetGeometry(sShapeType);
+            const OString& sPresetShape = 
msfilter::util::GetOOXMLPresetGeometry(sShapeType);
             m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, 
IsXFlipped(), IsYFlipped(),
                                                      false, false);
             m_pDMLexporter->WritePresetShape(sPresetShape);
@@ -254,7 +254,7 @@ bool DMLPresetShapeExporter::StartAVListWriting()
 {
     try
     {
-        const char* pShape = 
msfilter::util::GetOOXMLPresetGeometry(GetShapeType());
+        const OString& pShape = 
msfilter::util::GetOOXMLPresetGeometry(GetShapeType());
         m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_prstGeom, XML_prst, 
pShape);
         m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_avLst);
         return true;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e723a27a3445..4615bbd39503 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3618,7 +3618,7 @@ void DrawingML::WriteText(const Reference<XInterface>& 
rXIface, bool bBodyPr, bo
     }
 }
 
-void DrawingML::WritePresetShape( const char* pShape , std::vector< 
std::pair<sal_Int32,sal_Int32>> & rAvList )
+void DrawingML::WritePresetShape( const OString& pShape , std::vector< 
std::pair<sal_Int32,sal_Int32>> & rAvList )
 {
     mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
     if ( !rAvList.empty() )
@@ -3640,7 +3640,7 @@ void DrawingML::WritePresetShape( const char* pShape , 
std::vector< std::pair<sa
     mpFS->endElementNS(  XML_a, XML_prstGeom );
 }
 
-void DrawingML::WritePresetShape( const char* pShape )
+void DrawingML::WritePresetShape( const OString& pShape )
 {
     mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
     mpFS->singleElementNS(XML_a, XML_avLst);
@@ -3670,13 +3670,13 @@ static std::map< OString, std::vector<OString> > 
lcl_getAdjNames()
     return aRet;
 }
 
-void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool 
bPredefinedHandlesUsed, const PropertyValue& rProp )
+void DrawingML::WritePresetShape( const OString& pShape, MSO_SPT eShapeType, 
bool bPredefinedHandlesUsed, const PropertyValue& rProp )
 {
     static std::map< OString, std::vector<OString> > aAdjMap = 
lcl_getAdjNames();
     // If there are predefined adj names for this shape type, look them up now.
     std::vector<OString> aAdjustments;
-    if (aAdjMap.find(OString(pShape)) != aAdjMap.end())
-        aAdjustments = aAdjMap[OString(pShape)];
+    if (aAdjMap.find(pShape) != aAdjMap.end())
+        aAdjustments = aAdjMap[pShape];
 
     mpFS->startElementNS(XML_a, XML_prstGeom, XML_prst, pShape);
     mpFS->startElementNS(XML_a, XML_avLst);
@@ -3685,7 +3685,7 @@ void DrawingML::WritePresetShape( const char* pShape, 
MSO_SPT eShapeType, bool b
     if ( ( rProp.Value >>= aAdjustmentSeq )
          && eShapeType != mso_sptActionButtonForwardNext  // we have 
adjustments values for these type of shape, but MSO doesn't like them
          && eShapeType != mso_sptActionButtonBackPrevious // so they are now 
disabled
-         && pShape != std::string_view("rect") //some shape types are 
commented out in pCustomShapeTypeTranslationTable[] & are being defaulted to 
rect & rect does not have adjustment values/name.
+         && pShape != "rect" //some shape types are commented out in 
pCustomShapeTypeTranslationTable[] & are being defaulted to rect & rect does 
not have adjustment values/name.
         )
     {
         SAL_INFO("oox.shape", "adj seq len: " << aAdjustmentSeq.getLength());
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 51bf3b528eaf..719836e77b70 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -768,7 +768,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const 
Reference< XShape >& xShape )
         EscherPropertyContainer::IsDefaultObject(
             rSdrObjCustomShape,
             eShapeType));
-    const char* sPresetShape = 
msfilter::util::GetOOXMLPresetGeometry(sShapeType);
+    OString sPresetShape = msfilter::util::GetOOXMLPresetGeometry(sShapeType);
     SAL_INFO("oox.shape", "custom shape type: " << sShapeType << " ==> " << 
sPresetShape);
 
     sal_Int32 nAdjustmentValuesIndex = -1;
@@ -1078,7 +1078,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const 
Reference< XShape >& xShape )
             // case mso_sptBorderCallout3:
             default:
             {
-                if (!strcmp( sPresetShape, "frame" ))
+                if ( sPresetShape == "frame" )
                 {
                     sal_Int32 adj1 =  double( nYPosition )/aViewBox.Height 
*100000 ;
                     lcl_AppendAdjustmentValue( aAvList, 1, adj1 );

Reply via email to