sc/inc/colorscale.hxx                     |    4 -
 sc/source/core/data/colorscale.cxx        |   54 ++++++++--------
 sc/source/filter/excel/xecontent.cxx      |    4 -
 sc/source/filter/excel/xeextlst.cxx       |   10 +--
 sc/source/filter/inc/xeextlst.hxx         |    4 -
 sc/source/filter/oox/condformatbuffer.cxx |    4 -
 sc/source/filter/xml/editattributemap.cxx |   96 ++++++++++++++----------------
 sc/source/filter/xml/editattributemap.hxx |    4 -
 sc/source/filter/xml/xmlcondformat.cxx    |    5 -
 sc/source/filter/xml/xmlexprt.cxx         |    7 --
 10 files changed, 94 insertions(+), 98 deletions(-)

New commits:
commit ad40932a04fe0b71669651675417765c82ccbb79
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 8 11:47:21 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun May 12 09:23:47 2024 +0200

    replace createFromAscii with OUString literals in ScIconSetFormat
    
    Change-Id: I5af0128c55608bf6192af4dc46f9476393a15afa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167528
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 9e81360215e9..85b57bb6e7b9 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -216,7 +216,7 @@ enum ScIconSetType
 };
 
 struct ScIconSetMap {
-    const char* pName;
+    OUString aName;
     ScIconSetType eType;
     sal_Int32 nElements;
 };
@@ -384,7 +384,7 @@ public:
     virtual Type GetType() const override;
 
     SC_DLLPUBLIC static const ScIconSetMap g_IconSetMap[];
-    SC_DLLPUBLIC static const char* getIconSetName( ScIconSetType eType );
+    SC_DLLPUBLIC static OUString getIconSetName( ScIconSetType eType );
     static sal_Int32 getIconSetElements( ScIconSetType eType );
     static OUString getIconName(ScIconSetType eType, sal_Int32 nIndex);
     static BitmapEx& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType 
eType, sal_Int32 nIndex);
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 963ee78c05d3..4df58b5269a6 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -1331,30 +1331,30 @@ double ScIconSetFormat::CalcValue(double nMin, double 
nMax, const ScIconSetForma
     return (*itr)->GetValue();
 }
 
-const ScIconSetMap ScIconSetFormat::g_IconSetMap[] = {
-    { "3Arrows", IconSet_3Arrows, 3 },
-    { "3ArrowsGray", IconSet_3ArrowsGray, 3 },
-    { "3Flags", IconSet_3Flags, 3 },
-    { "3TrafficLights1", IconSet_3TrafficLights1, 3 },
-    { "3TrafficLights2", IconSet_3TrafficLights2, 3 },
-    { "3Signs", IconSet_3Signs, 3 },
-    { "3Symbols", IconSet_3Symbols, 3 },
-    { "3Symbols2", IconSet_3Symbols2, 3 },
-    { "3Smilies", IconSet_3Smilies, 3 },
-    { "3ColorSmilies", IconSet_3ColorSmilies, 3 },
-    { "3Stars", IconSet_3Stars, 3 },
-    { "3Triangles", IconSet_3Triangles, 3 },
-    { "4Arrows", IconSet_4Arrows, 4 },
-    { "4ArrowsGray", IconSet_4ArrowsGray, 4 },
-    { "4RedToBlack", IconSet_4RedToBlack, 4 },
-    { "4Rating", IconSet_4Rating, 4 },
-    { "4TrafficLights", IconSet_4TrafficLights, 4 },
-    { "5Arrows", IconSet_5Arrows, 5 },
-    { "5ArrowsGray", IconSet_5ArrowsGray, 5 },
-    { "5Rating", IconSet_5Ratings, 5 },
-    { "5Quarters", IconSet_5Quarters, 5 },
-    { "5Boxes", IconSet_5Boxes, 5 },
-    { nullptr, IconSet_3Arrows, 0 }
+constexpr ScIconSetMap ScIconSetFormat::g_IconSetMap[] = {
+    { u"3Arrows"_ustr, IconSet_3Arrows, 3 },
+    { u"3ArrowsGray"_ustr, IconSet_3ArrowsGray, 3 },
+    { u"3Flags"_ustr, IconSet_3Flags, 3 },
+    { u"3TrafficLights1"_ustr, IconSet_3TrafficLights1, 3 },
+    { u"3TrafficLights2"_ustr, IconSet_3TrafficLights2, 3 },
+    { u"3Signs"_ustr, IconSet_3Signs, 3 },
+    { u"3Symbols"_ustr, IconSet_3Symbols, 3 },
+    { u"3Symbols2"_ustr, IconSet_3Symbols2, 3 },
+    { u"3Smilies"_ustr, IconSet_3Smilies, 3 },
+    { u"3ColorSmilies"_ustr, IconSet_3ColorSmilies, 3 },
+    { u"3Stars"_ustr, IconSet_3Stars, 3 },
+    { u"3Triangles"_ustr, IconSet_3Triangles, 3 },
+    { u"4Arrows"_ustr, IconSet_4Arrows, 4 },
+    { u"4ArrowsGray"_ustr, IconSet_4ArrowsGray, 4 },
+    { u"4RedToBlack"_ustr, IconSet_4RedToBlack, 4 },
+    { u"4Rating"_ustr, IconSet_4Rating, 4 },
+    { u"4TrafficLights"_ustr, IconSet_4TrafficLights, 4 },
+    { u"5Arrows"_ustr, IconSet_5Arrows, 5 },
+    { u"5ArrowsGray"_ustr, IconSet_5ArrowsGray, 5 },
+    { u"5Rating"_ustr, IconSet_5Ratings, 5 },
+    { u"5Quarters"_ustr, IconSet_5Quarters, 5 },
+    { u"5Boxes"_ustr, IconSet_5Boxes, 5 },
+    { u""_ustr, IconSet_3Arrows, 0 }
 };
 
 size_t ScIconSetFormat::size() const
@@ -1491,7 +1491,7 @@ const ScIconSetBitmapMap aBitmapMap[] = {
 const ScIconSetMap* findIconSetType(ScIconSetType eType)
 {
     const ScIconSetMap* pMap = ScIconSetFormat::g_IconSetMap;
-    for (; pMap->pName; ++pMap)
+    for (; !pMap->aName.isEmpty(); ++pMap)
     {
         if (pMap->eType == eType)
             return pMap;
@@ -1502,11 +1502,11 @@ const ScIconSetMap* findIconSetType(ScIconSetType eType)
 
 }
 
-const char* ScIconSetFormat::getIconSetName( ScIconSetType eType )
+OUString ScIconSetFormat::getIconSetName( ScIconSetType eType )
 {
     const ScIconSetMap* pMap = findIconSetType(eType);
     if (pMap)
-        return pMap->pName;
+        return pMap->aName;
 
     return "";
 }
diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index 082845651d05..e31ba8b19bb6 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1567,9 +1567,9 @@ void XclExpIconSet::SaveXml( XclExpXmlStream& rStrm )
             XML_type, "iconSet",
             XML_priority, OString::number(mnPriority + 1) );
 
-    const char* pIconSetName = 
ScIconSetFormat::getIconSetName(mrFormat.GetIconSetData()->eIconSetType);
+    OUString aIconSetName = 
ScIconSetFormat::getIconSetName(mrFormat.GetIconSetData()->eIconSetType);
     rWorksheet->startElement( XML_iconSet,
-            XML_iconSet, pIconSetName,
+            XML_iconSet, aIconSetName,
             XML_showValue, sax_fastparser::UseIf("0", 
!mrFormat.GetIconSetData()->mbShowValue),
             XML_reverse, sax_fastparser::UseIf("1", 
mrFormat.GetIconSetData()->mbReverse));
 
diff --git a/sc/source/filter/excel/xeextlst.cxx 
b/sc/source/filter/excel/xeextlst.cxx
index daff4bd07e8e..d32caecaffc2 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -61,7 +61,7 @@ XclExpExtIcon::XclExpExtIcon(const XclExpRoot& rRoot, const 
std::pair<ScIconSetT
     XclExpRoot(rRoot),
     nIndex(rCustomEntry.second)
 {
-    pIconSetName = ScIconSetFormat::getIconSetName(rCustomEntry.first);
+    maIconSetName = ScIconSetFormat::getIconSetName(rCustomEntry.first);
 }
 
 void XclExpExtIcon::SaveXml(XclExpXmlStream& rStrm)
@@ -71,11 +71,11 @@ void XclExpExtIcon::SaveXml(XclExpXmlStream& rStrm)
     if (nIndex == -1)
     {
         nIndex = 0;
-        pIconSetName = "NoIcons";
+        maIconSetName = u"NoIcons"_ustr;
     }
 
     rWorksheet->singleElementNS(XML_x14, XML_cfIcon,
-            XML_iconSet, pIconSetName,
+            XML_iconSet, maIconSetName,
             XML_iconId, OString::number(nIndex));
 }
 
@@ -403,7 +403,7 @@ XclExpExtIconSet::XclExpExtIconSet(const XclExpRoot& rRoot, 
const ScIconSetForma
     mbCustom = rData.mbCustom;
     mbReverse = rData.mbReverse;
     mbShowValue = rData.mbShowValue;
-    mpIconSetName = ScIconSetFormat::getIconSetName(rData.eIconSetType);
+    maIconSetName = ScIconSetFormat::getIconSetName(rData.eIconSetType);
 
     if (mbCustom)
     {
@@ -419,7 +419,7 @@ void XclExpExtIconSet::SaveXml(XclExpXmlStream& rStrm)
     sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
 
     rWorksheet->startElementNS(XML_x14, XML_iconSet,
-            XML_iconSet, mpIconSetName,
+            XML_iconSet, maIconSetName,
             XML_custom, sax_fastparser::UseIf(ToPsz10(mbCustom), mbCustom),
             XML_reverse, ToPsz10(mbReverse),
             XML_showValue, ToPsz10(mbShowValue));
diff --git a/sc/source/filter/inc/xeextlst.hxx 
b/sc/source/filter/inc/xeextlst.hxx
index 1a33b5106e2c..180c1aef030e 100644
--- a/sc/source/filter/inc/xeextlst.hxx
+++ b/sc/source/filter/inc/xeextlst.hxx
@@ -83,7 +83,7 @@ public:
     virtual void SaveXml( XclExpXmlStream& rStrm ) override;
 
 private:
-    const char* pIconSetName;
+    OUString maIconSetName;
     sal_Int32 nIndex;
 };
 
@@ -129,7 +129,7 @@ private:
     bool mbCustom;
     bool mbReverse;
     bool mbShowValue;
-    const char* mpIconSetName;
+    OUString maIconSetName;
 };
 
 
diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 2b212352eaa7..2e57824d1287 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -430,9 +430,9 @@ ScIconSetType getType(std::u16string_view rName)
 {
     ScIconSetType eIconSetType = IconSet_3TrafficLights1;
     const ScIconSetMap* pIconSetMap = ScIconSetFormat::g_IconSetMap;
-    for(size_t i = 0; pIconSetMap[i].pName; ++i)
+    for(size_t i = 0; !pIconSetMap[i].aName.isEmpty(); ++i)
     {
-        if(OUString::createFromAscii(pIconSetMap[i].pName) == rName)
+        if(pIconSetMap[i].aName == rName)
         {
             eIconSetType = pIconSetMap[i].eType;
             break;
diff --git a/sc/source/filter/xml/xmlcondformat.cxx 
b/sc/source/filter/xml/xmlcondformat.cxx
index 8699f60d4556..d85740af707f 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -577,10 +577,9 @@ 
ScXMLIconSetFormatContext::ScXMLIconSetFormatContext(ScXMLImport& rImport,
 
     const ScIconSetMap* pMap = ScIconSetFormat::g_IconSetMap;
     ScIconSetType eType = IconSet_3Arrows;
-    for(; pMap->pName; ++pMap)
+    for(; !pMap->aName.isEmpty(); ++pMap)
     {
-        OUString aName = OUString::createFromAscii(pMap->pName);
-        if(aName ==aIconSetType)
+        if(pMap->aName == aIconSetType)
         {
             eType = pMap->eType;
             break;
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index aa14ff2da25f..7f6d9440929e 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4912,7 +4912,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
             else if(pFormatEntry->GetType() == ScFormatEntry::Type::Iconset)
             {
                 const ScIconSetFormat& rIconSet = static_cast<const 
ScIconSetFormat&>(*pFormatEntry);
-                OUString aIconSetName = 
OUString::createFromAscii(ScIconSetFormat::getIconSetName(rIconSet.GetIconSetData()->eIconSetType));
+                OUString aIconSetName = 
ScIconSetFormat::getIconSetName(rIconSet.GetIconSetData()->eIconSetType);
                 AddAttribute( XML_NAMESPACE_CALC_EXT, XML_ICON_SET_TYPE, 
aIconSetName );
                 if (rIconSet.GetIconSetData()->mbCustom)
                     AddAttribute(XML_NAMESPACE_CALC_EXT, XML_CUSTOM, 
OUString::boolean(true));
@@ -4923,7 +4923,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
                 {
                     for (const auto& [rType, rIndex] : 
rIconSet.GetIconSetData()->maCustomVector)
                     {
-                        AddAttribute(XML_NAMESPACE_CALC_EXT, 
XML_CUSTOM_ICONSET_NAME, 
OUString::createFromAscii(ScIconSetFormat::getIconSetName(rType)));
+                        AddAttribute(XML_NAMESPACE_CALC_EXT, 
XML_CUSTOM_ICONSET_NAME, ScIconSetFormat::getIconSetName(rType));
                         AddAttribute(XML_NAMESPACE_CALC_EXT, 
XML_CUSTOM_ICONSET_INDEX, OUString::number(rIndex));
                         SvXMLElementExport aCustomIcon(*this, 
XML_NAMESPACE_CALC_EXT, XML_CUSTOM_ICONSET, true, true);
                     }
commit 210aff2347afb95b683a591469db611dc263272a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 8 11:40:38 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun May 12 09:23:38 2024 +0200

    replace createFromAscii with OUString literals in ScXMLEditAttributeMap
    
    Change-Id: I7ab70713b2ee69eccedebeb09b8ea5879736a830
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167527
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sc/source/filter/xml/editattributemap.cxx 
b/sc/source/filter/xml/editattributemap.cxx
index 4b30edf1403d..93a341adaa7a 100644
--- a/sc/source/filter/xml/editattributemap.cxx
+++ b/sc/source/filter/xml/editattributemap.cxx
@@ -13,65 +13,63 @@
 #include <editeng/memberids.h>
 #include <xmloff/xmlnamespace.hxx>
 
-ScXMLEditAttributeMap::Entry const aEntries[] = {
+constexpr ScXMLEditAttributeMap::Entry aEntries[] {
 
-    { XML_NAMESPACE_FO, "color", "CharColor", EE_CHAR_COLOR, 0 },
-    { XML_NAMESPACE_STYLE, "font-charset", "CharFontCharSet", 
EE_CHAR_FONTINFO, MID_FONT_CHAR_SET },
-    { XML_NAMESPACE_STYLE, "font-charset-asian", "CharFontCharSetAsian", 
EE_CHAR_FONTINFO_CJK, MID_FONT_CHAR_SET },
-    { XML_NAMESPACE_STYLE, "font-charset-complex", "CharFontCharSetComplex", 
EE_CHAR_FONTINFO_CTL, MID_FONT_CHAR_SET },
-    { XML_NAMESPACE_FO, "font-family", "CharFontName", EE_CHAR_FONTINFO, 
MID_FONT_FAMILY_NAME },
-    { XML_NAMESPACE_STYLE, "font-family-asian", "CharFontNameAsian", 
EE_CHAR_FONTINFO_CJK, MID_FONT_FAMILY_NAME },
-    { XML_NAMESPACE_STYLE, "font-family-complex", "CharFontNameComplex", 
EE_CHAR_FONTINFO_CTL, MID_FONT_FAMILY_NAME },
-    { XML_NAMESPACE_STYLE, "font-family-generic", "CharFontFamily", 
EE_CHAR_FONTINFO, MID_FONT_FAMILY },
-    { XML_NAMESPACE_STYLE, "font-family-generic-asian", "CharFontFamilyAsian", 
EE_CHAR_FONTINFO_CJK, MID_FONT_FAMILY },
-    { XML_NAMESPACE_STYLE, "font-family-generic-complex", 
"CharFontFamilyComplex", EE_CHAR_FONTINFO_CTL, MID_FONT_FAMILY },
-    { XML_NAMESPACE_STYLE, "font-pitch", "CharFontPitch", EE_CHAR_FONTINFO, 
MID_FONT_PITCH },
-    { XML_NAMESPACE_STYLE, "font-pitch-asian", "CharFontPitchAsian", 
EE_CHAR_FONTINFO_CJK, MID_FONT_PITCH },
-    { XML_NAMESPACE_STYLE, "font-pitch-complex", "CharFontPitchComplex", 
EE_CHAR_FONTINFO_CTL, MID_FONT_PITCH },
-    { XML_NAMESPACE_FO, "font-size", "CharHeight", EE_CHAR_FONTHEIGHT, 
MID_FONTHEIGHT },
-    { XML_NAMESPACE_STYLE, "font-size-asian", "CharHeightAsian", 
EE_CHAR_FONTHEIGHT_CJK, MID_FONTHEIGHT },
-    { XML_NAMESPACE_STYLE, "font-size-complex", "CharHeightComplex", 
EE_CHAR_FONTHEIGHT_CTL, MID_FONTHEIGHT },
-    { XML_NAMESPACE_FO, "font-style", "CharPosture", EE_CHAR_ITALIC, 
MID_POSTURE },
-    { XML_NAMESPACE_STYLE, "font-style-asian", "CharPostureAsian", 
EE_CHAR_ITALIC_CJK, MID_POSTURE },
-    { XML_NAMESPACE_STYLE, "font-style-complex", "CharPostureComplex", 
EE_CHAR_ITALIC_CTL, MID_POSTURE },
-    { XML_NAMESPACE_STYLE, "font-style-name", "CharFontStyleName", 
EE_CHAR_FONTINFO, MID_FONT_STYLE_NAME },
-    { XML_NAMESPACE_STYLE, "font-style-name-asian", "CharFontStyleNameAsian", 
EE_CHAR_FONTINFO_CJK, MID_FONT_STYLE_NAME },
-    { XML_NAMESPACE_STYLE, "font-style-name-complex", 
"CharFontStyleNameComplex", EE_CHAR_FONTINFO_CTL, MID_FONT_STYLE_NAME },
-    { XML_NAMESPACE_FO, "font-weight", "CharWeight", EE_CHAR_WEIGHT, 
MID_WEIGHT },
-    { XML_NAMESPACE_STYLE, "font-weight-asian", "CharWeightAsian", 
EE_CHAR_WEIGHT_CJK, MID_WEIGHT },
-    { XML_NAMESPACE_STYLE, "font-weight-complex", "CharWeightComplex", 
EE_CHAR_WEIGHT_CTL, MID_WEIGHT },
-    { XML_NAMESPACE_STYLE, "text-overline-width", "CharOverline", 
EE_CHAR_OVERLINE, MID_TL_STYLE },
-    { XML_NAMESPACE_STYLE, "text-overline-color", "CharOverlineColor", 
EE_CHAR_OVERLINE, MID_TL_COLOR },
-    { XML_NAMESPACE_STYLE, "text-overline-color", "CharOverlineHasColor", 
EE_CHAR_OVERLINE, MID_TL_HASCOLOR },
-    { XML_NAMESPACE_STYLE, "text-underline-width", "CharUnderline", 
EE_CHAR_UNDERLINE, MID_TL_STYLE },
-    { XML_NAMESPACE_STYLE, "text-underline-color", "CharUnderlineColor", 
EE_CHAR_UNDERLINE, MID_TL_COLOR },
-    { XML_NAMESPACE_STYLE, "text-underline-color", "CharUnderlineHasColor", 
EE_CHAR_UNDERLINE, MID_TL_HASCOLOR },
-    { XML_NAMESPACE_STYLE, "text-line-through-mode", "CharWordMode", 
EE_CHAR_WLM, 0 },
-    { XML_NAMESPACE_STYLE, "text-line-through-type", "CharStrikeout", 
EE_CHAR_STRIKEOUT, MID_CROSS_OUT },
-    { XML_NAMESPACE_STYLE, "font-relief", "CharRelief", EE_CHAR_RELIEF, 
MID_RELIEF },
-    { XML_NAMESPACE_STYLE, "text-outline", "CharContoured", EE_CHAR_OUTLINE, 0 
},
-    { XML_NAMESPACE_FO, "text-shadow", "CharShadowed", EE_CHAR_SHADOW, 0 },
-    { XML_NAMESPACE_FO, "letter-spacing", "CharKerning", EE_CHAR_KERNING, 0 },
-    { XML_NAMESPACE_STYLE, "letter-kerning", "CharAutoKerning", 
EE_CHAR_PAIRKERNING, 0 },
-    { XML_NAMESPACE_STYLE, "text-scale", "CharScaleWidth", EE_CHAR_FONTWIDTH, 
0 },
-    { XML_NAMESPACE_STYLE, "text-position", "CharEscapement", 
EE_CHAR_ESCAPEMENT, MID_ESC },
-    { XML_NAMESPACE_STYLE, "text-position", "CharEscapementHeight", 
EE_CHAR_ESCAPEMENT, MID_ESC_HEIGHT },
-    { XML_NAMESPACE_STYLE, "text-emphasize", "CharEmphasis", 
EE_CHAR_EMPHASISMARK, MID_EMPHASIS },
+    { XML_NAMESPACE_FO, u"color"_ustr, u"CharColor"_ustr, EE_CHAR_COLOR, 0 },
+    { XML_NAMESPACE_STYLE, u"font-charset"_ustr, u"CharFontCharSet"_ustr, 
EE_CHAR_FONTINFO, MID_FONT_CHAR_SET },
+    { XML_NAMESPACE_STYLE, u"font-charset-asian"_ustr, 
u"CharFontCharSetAsian"_ustr, EE_CHAR_FONTINFO_CJK, MID_FONT_CHAR_SET },
+    { XML_NAMESPACE_STYLE, u"font-charset-complex"_ustr, 
u"CharFontCharSetComplex"_ustr, EE_CHAR_FONTINFO_CTL, MID_FONT_CHAR_SET },
+    { XML_NAMESPACE_FO, u"font-family"_ustr, u"CharFontName"_ustr, 
EE_CHAR_FONTINFO, MID_FONT_FAMILY_NAME },
+    { XML_NAMESPACE_STYLE, u"font-family-asian"_ustr, 
u"CharFontNameAsian"_ustr, EE_CHAR_FONTINFO_CJK, MID_FONT_FAMILY_NAME },
+    { XML_NAMESPACE_STYLE, u"font-family-complex"_ustr, 
u"CharFontNameComplex"_ustr, EE_CHAR_FONTINFO_CTL, MID_FONT_FAMILY_NAME },
+    { XML_NAMESPACE_STYLE, u"font-family-generic"_ustr, 
u"CharFontFamily"_ustr, EE_CHAR_FONTINFO, MID_FONT_FAMILY },
+    { XML_NAMESPACE_STYLE, u"font-family-generic-asian"_ustr, 
u"CharFontFamilyAsian"_ustr, EE_CHAR_FONTINFO_CJK, MID_FONT_FAMILY },
+    { XML_NAMESPACE_STYLE, u"font-family-generic-complex"_ustr, 
u"CharFontFamilyComplex"_ustr, EE_CHAR_FONTINFO_CTL, MID_FONT_FAMILY },
+    { XML_NAMESPACE_STYLE, u"font-pitch"_ustr, u"CharFontPitch"_ustr, 
EE_CHAR_FONTINFO, MID_FONT_PITCH },
+    { XML_NAMESPACE_STYLE, u"font-pitch-asian"_ustr, 
u"CharFontPitchAsian"_ustr, EE_CHAR_FONTINFO_CJK, MID_FONT_PITCH },
+    { XML_NAMESPACE_STYLE, u"font-pitch-complex"_ustr, 
u"CharFontPitchComplex"_ustr, EE_CHAR_FONTINFO_CTL, MID_FONT_PITCH },
+    { XML_NAMESPACE_FO, u"font-size"_ustr, u"CharHeight"_ustr, 
EE_CHAR_FONTHEIGHT, MID_FONTHEIGHT },
+    { XML_NAMESPACE_STYLE, u"font-size-asian"_ustr, u"CharHeightAsian"_ustr, 
EE_CHAR_FONTHEIGHT_CJK, MID_FONTHEIGHT },
+    { XML_NAMESPACE_STYLE, u"font-size-complex"_ustr, 
u"CharHeightComplex"_ustr, EE_CHAR_FONTHEIGHT_CTL, MID_FONTHEIGHT },
+    { XML_NAMESPACE_FO, u"font-style"_ustr, u"CharPosture"_ustr, 
EE_CHAR_ITALIC, MID_POSTURE },
+    { XML_NAMESPACE_STYLE, u"font-style-asian"_ustr, u"CharPostureAsian"_ustr, 
EE_CHAR_ITALIC_CJK, MID_POSTURE },
+    { XML_NAMESPACE_STYLE, u"font-style-complex"_ustr, 
u"CharPostureComplex"_ustr, EE_CHAR_ITALIC_CTL, MID_POSTURE },
+    { XML_NAMESPACE_STYLE, u"font-style-name"_ustr, u"CharFontStyleName"_ustr, 
EE_CHAR_FONTINFO, MID_FONT_STYLE_NAME },
+    { XML_NAMESPACE_STYLE, u"font-style-name-asian"_ustr, 
u"CharFontStyleNameAsian"_ustr, EE_CHAR_FONTINFO_CJK, MID_FONT_STYLE_NAME },
+    { XML_NAMESPACE_STYLE, u"font-style-name-complex"_ustr, 
u"CharFontStyleNameComplex"_ustr, EE_CHAR_FONTINFO_CTL, MID_FONT_STYLE_NAME },
+    { XML_NAMESPACE_FO, u"font-weight"_ustr, u"CharWeight"_ustr, 
EE_CHAR_WEIGHT, MID_WEIGHT },
+    { XML_NAMESPACE_STYLE, u"font-weight-asian"_ustr, u"CharWeightAsian"_ustr, 
EE_CHAR_WEIGHT_CJK, MID_WEIGHT },
+    { XML_NAMESPACE_STYLE, u"font-weight-complex"_ustr, 
u"CharWeightComplex"_ustr, EE_CHAR_WEIGHT_CTL, MID_WEIGHT },
+    { XML_NAMESPACE_STYLE, u"text-overline-width"_ustr, u"CharOverline"_ustr, 
EE_CHAR_OVERLINE, MID_TL_STYLE },
+    { XML_NAMESPACE_STYLE, u"text-overline-color"_ustr, 
u"CharOverlineColor"_ustr, EE_CHAR_OVERLINE, MID_TL_COLOR },
+    { XML_NAMESPACE_STYLE, u"text-overline-color"_ustr, 
u"CharOverlineHasColor"_ustr, EE_CHAR_OVERLINE, MID_TL_HASCOLOR },
+    { XML_NAMESPACE_STYLE, u"text-underline-width"_ustr, 
u"CharUnderline"_ustr, EE_CHAR_UNDERLINE, MID_TL_STYLE },
+    { XML_NAMESPACE_STYLE, u"text-underline-color"_ustr, 
u"CharUnderlineColor"_ustr, EE_CHAR_UNDERLINE, MID_TL_COLOR },
+    { XML_NAMESPACE_STYLE, u"text-underline-color"_ustr, 
u"CharUnderlineHasColor"_ustr, EE_CHAR_UNDERLINE, MID_TL_HASCOLOR },
+    { XML_NAMESPACE_STYLE, u"text-line-through-mode"_ustr, 
u"CharWordMode"_ustr, EE_CHAR_WLM, 0 },
+    { XML_NAMESPACE_STYLE, u"text-line-through-type"_ustr, 
u"CharStrikeout"_ustr, EE_CHAR_STRIKEOUT, MID_CROSS_OUT },
+    { XML_NAMESPACE_STYLE, u"font-relief"_ustr, u"CharRelief"_ustr, 
EE_CHAR_RELIEF, MID_RELIEF },
+    { XML_NAMESPACE_STYLE, u"text-outline"_ustr, u"CharContoured"_ustr, 
EE_CHAR_OUTLINE, 0 },
+    { XML_NAMESPACE_FO, u"text-shadow"_ustr, u"CharShadowed"_ustr, 
EE_CHAR_SHADOW, 0 },
+    { XML_NAMESPACE_FO, u"letter-spacing"_ustr, u"CharKerning"_ustr, 
EE_CHAR_KERNING, 0 },
+    { XML_NAMESPACE_STYLE, u"letter-kerning"_ustr, u"CharAutoKerning"_ustr, 
EE_CHAR_PAIRKERNING, 0 },
+    { XML_NAMESPACE_STYLE, u"text-scale"_ustr, u"CharScaleWidth"_ustr, 
EE_CHAR_FONTWIDTH, 0 },
+    { XML_NAMESPACE_STYLE, u"text-position"_ustr, u"CharEscapement"_ustr, 
EE_CHAR_ESCAPEMENT, MID_ESC },
+    { XML_NAMESPACE_STYLE, u"text-position"_ustr, 
u"CharEscapementHeight"_ustr, EE_CHAR_ESCAPEMENT, MID_ESC_HEIGHT },
+    { XML_NAMESPACE_STYLE, u"text-emphasize"_ustr, u"CharEmphasis"_ustr, 
EE_CHAR_EMPHASISMARK, MID_EMPHASIS },
     // The following 3 "country" entries are just placeholders for language,
     // country, script and rfc-language-tag, which all map to CharLocale,
     // EE_CHAR_LANGUAGE and MID_LANG_LOCALE and are handled individually.
-    { XML_NAMESPACE_FO, "country", "CharLocale", EE_CHAR_LANGUAGE, 
MID_LANG_LOCALE },
-    { XML_NAMESPACE_STYLE, "country-asian", "CharLocaleAsian", 
EE_CHAR_LANGUAGE_CJK, MID_LANG_LOCALE },
-    { XML_NAMESPACE_STYLE, "country-complex", "CharLocaleComplex", 
EE_CHAR_LANGUAGE_CTL, MID_LANG_LOCALE },
+    { XML_NAMESPACE_FO, u"country"_ustr, u"CharLocale"_ustr, EE_CHAR_LANGUAGE, 
MID_LANG_LOCALE },
+    { XML_NAMESPACE_STYLE, u"country-asian"_ustr, u"CharLocaleAsian"_ustr, 
EE_CHAR_LANGUAGE_CJK, MID_LANG_LOCALE },
+    { XML_NAMESPACE_STYLE, u"country-complex"_ustr, u"CharLocaleComplex"_ustr, 
EE_CHAR_LANGUAGE_CTL, MID_LANG_LOCALE },
 };
 
 ScXMLEditAttributeMap::ScXMLEditAttributeMap()
 {
     for (size_t i = 0; i < SAL_N_ELEMENTS(aEntries); ++i)
     {
-        maAPIEntries.emplace(
-                OUString::createFromAscii(aEntries[i].mpAPIName), 
&aEntries[i]);
-
+        maAPIEntries.emplace(aEntries[i].maAPIName, &aEntries[i]);
         maItemIDEntries.emplace(aEntries[i].mnItemID, &aEntries[i]);
     }
 }
diff --git a/sc/source/filter/xml/editattributemap.hxx 
b/sc/source/filter/xml/editattributemap.hxx
index 7139121910fb..a084e2ee2db3 100644
--- a/sc/source/filter/xml/editattributemap.hxx
+++ b/sc/source/filter/xml/editattributemap.hxx
@@ -23,8 +23,8 @@ public:
     struct Entry
     {
         sal_uInt16 nmXMLNS;
-        const char* mpXMLName;
-        const char* mpAPIName;
+        OUString maXMLName;
+        OUString maAPIName;
         sal_uInt16 mnItemID;
         sal_uInt8 mnFlag;
     };
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 8f6f18f29796..aa14ff2da25f 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -976,8 +976,7 @@ const SvxFieldData* toXMLPropertyStates(
         if (!pEntry)
             continue;
 
-        sal_Int32 nIndex = xMapper->GetEntryIndex(
-            pEntry->nmXMLNS, OUString::createFromAscii(pEntry->mpXMLName), 0);
+        sal_Int32 nIndex = xMapper->GetEntryIndex(pEntry->nmXMLNS, 
pEntry->maXMLName, 0);
 
         if (nIndex == -1 || nIndex >= nEntryCount)
             continue;

Reply via email to