summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-07 13:57:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 19:55:57 +0200
commit3563fca550f678a6797769cd3b5e529e95ca7e36 (patch)
tree6ac0d69c813524780f20446561ca56aa99a0032a /cui
parent40dde4385cd913ac08292ad3be28bf17de9d296c (diff)
replace createFromAscii with OUString literals in SvxPathTabPage
Change-Id: I831bc78f4934c7d1c137ad70c7bb189d75237e88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optpath.cxx35
1 files changed, 16 insertions, 19 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index e81d12043ed2..6357989e5fb9 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -92,42 +92,39 @@ struct PathUserData_Impl
struct Handle2CfgNameMapping_Impl
{
SvtPathOptions::Paths m_nHandle;
- const char* m_pCfgName;
+ OUString m_aCfgName;
};
}
-Handle2CfgNameMapping_Impl const Hdl2CfgMap_Impl[] =
+constexpr Handle2CfgNameMapping_Impl Hdl2CfgMap_Impl[]
{
- { SvtPathOptions::Paths::AutoCorrect, "AutoCorrect" },
- { SvtPathOptions::Paths::AutoText, "AutoText" },
- { SvtPathOptions::Paths::Backup, "Backup" },
- { SvtPathOptions::Paths::Gallery, "Gallery" },
- { SvtPathOptions::Paths::Graphic, "Graphic" },
- { SvtPathOptions::Paths::Temp, "Temp" },
- { SvtPathOptions::Paths::Template, "Template" },
- { SvtPathOptions::Paths::Work, "Work" },
- { SvtPathOptions::Paths::Dictionary, "Dictionary" },
- { SvtPathOptions::Paths::Classification, "Classification" },
+ { SvtPathOptions::Paths::AutoCorrect, u"AutoCorrect"_ustr },
+ { SvtPathOptions::Paths::AutoText, u"AutoText"_ustr },
+ { SvtPathOptions::Paths::Backup, u"Backup"_ustr },
+ { SvtPathOptions::Paths::Gallery, u"Gallery"_ustr },
+ { SvtPathOptions::Paths::Graphic, u"Graphic"_ustr },
+ { SvtPathOptions::Paths::Temp, u"Temp"_ustr },
+ { SvtPathOptions::Paths::Template, u"Template"_ustr },
+ { SvtPathOptions::Paths::Work, u"Work"_ustr },
+ { SvtPathOptions::Paths::Dictionary, u"Dictionary"_ustr },
+ { SvtPathOptions::Paths::Classification, u"Classification"_ustr },
#if OSL_DEBUG_LEVEL > 1
- { SvtPathOptions::Paths::Linguistic, "Linguistic" },
+ { SvtPathOptions::Paths::Linguistic, u"Linguistic"_ustr },
#endif
- { SvtPathOptions::Paths::LAST, nullptr }
};
static OUString getCfgName_Impl( SvtPathOptions::Paths _nHandle )
{
OUString sCfgName;
- sal_uInt16 nIndex = 0;
- while ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle != SvtPathOptions::Paths::LAST )
+ for (const auto & rMapping : Hdl2CfgMap_Impl)
{
- if ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle == _nHandle )
+ if ( rMapping.m_nHandle == _nHandle )
{
// config name found
- sCfgName = OUString::createFromAscii( Hdl2CfgMap_Impl[ nIndex ].m_pCfgName );
+ sCfgName = rMapping.m_aCfgName;
break;
}
- ++nIndex;
}
return sCfgName;