summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-10 10:00:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-13 09:44:17 +0200
commitbf059e3d267c2dbbb11c0735794198ad72ce5dfa (patch)
tree3325ba6735c98a1621f32716097cc5bdd2cf6120 /xmloff/source
parent7a110585d9fd710ba9ca30256cbddb09c77aec96 (diff)
createFromAscii -> OUString literals in XMLIndexTOCContext
Change-Id: I93aaf16d75a883b733ebedecfe5625e10bbdc753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index b2dfe52e4803..fb0cccecdd3b 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -57,15 +57,15 @@ using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::lang::IllegalArgumentException;
-static const char* aIndexServiceMap[] =
+constexpr OUString aIndexServiceMap[]
{
- "com.sun.star.text.ContentIndex",
- "com.sun.star.text.DocumentIndex",
- "com.sun.star.text.TableIndex",
- "com.sun.star.text.ObjectIndex",
- "com.sun.star.text.Bibliography",
- "com.sun.star.text.UserIndex",
- "com.sun.star.text.IllustrationsIndex"
+ u"com.sun.star.text.ContentIndex"_ustr,
+ u"com.sun.star.text.DocumentIndex"_ustr,
+ u"com.sun.star.text.TableIndex"_ustr,
+ u"com.sun.star.text.ObjectIndex"_ustr,
+ u"com.sun.star.text.Bibliography"_ustr,
+ u"com.sun.star.text.UserIndex"_ustr,
+ u"com.sun.star.text.IllustrationsIndex"_ustr
};
const XMLTokenEnum aIndexSourceElementMap[] =
@@ -169,9 +169,7 @@ void XMLIndexTOCContext::startFastElement(
UNO_QUERY);
if( xFactory.is() )
{
- Reference<XInterface> xIfc =
- xFactory->createInstance(
- OUString::createFromAscii(aIndexServiceMap[eIndexType]));
+ Reference<XInterface> xIfc = xFactory->createInstance(aIndexServiceMap[eIndexType]);
if( xIfc.is() )
{
// get Property set