From bf059e3d267c2dbbb11c0735794198ad72ce5dfa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 May 2024 10:00:44 +0200 Subject: createFromAscii -> OUString literals in XMLIndexTOCContext Change-Id: I93aaf16d75a883b733ebedecfe5625e10bbdc753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167560 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/text/XMLIndexTOCContext.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'xmloff') 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 xIfc = - xFactory->createInstance( - OUString::createFromAscii(aIndexServiceMap[eIndexType])); + Reference xIfc = xFactory->createInstance(aIndexServiceMap[eIndexType]); if( xIfc.is() ) { // get Property set -- cgit