From 1597cc5b3e07dd24cb4cb10b35b1e93545e4b929 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 29 Jul 2021 15:08:21 +0200 Subject: convert #defines to OUStringLiteral mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cppuhelper/source/component_context.cxx | 6 +++--- cppuhelper/source/macro_expander.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index c79bf6d12b2e..16264dae53c4 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -44,9 +44,9 @@ #include -#define SMGR_SINGLETON "/singletons/com.sun.star.lang.theServiceManager" -#define TDMGR_SINGLETON "/singletons/com.sun.star.reflection.theTypeDescriptionManager" -#define AC_SINGLETON "/singletons/com.sun.star.security.theAccessController" +constexpr OUStringLiteral SMGR_SINGLETON = u"/singletons/com.sun.star.lang.theServiceManager"; +constexpr OUStringLiteral TDMGR_SINGLETON = u"/singletons/com.sun.star.reflection.theTypeDescriptionManager"; +constexpr OUStringLiteral AC_SINGLETON = u"/singletons/com.sun.star.security.theAccessController"; using namespace ::osl; using namespace ::com::sun::star::uno; diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index e9a6cce3fd43..85c649dd437c 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -34,9 +34,9 @@ #include "macro_expander.hxx" #include "paths.hxx" -#define SERVICE_NAME_A "com.sun.star.lang.MacroExpander" -#define SERVICE_NAME_B "com.sun.star.lang.BootstrapMacroExpander" -#define IMPL_NAME "com.sun.star.lang.comp.cppuhelper.BootstrapMacroExpander" +constexpr OUStringLiteral SERVICE_NAME_A = u"com.sun.star.lang.MacroExpander"; +constexpr OUStringLiteral SERVICE_NAME_B = u"com.sun.star.lang.BootstrapMacroExpander"; +constexpr OUStringLiteral IMPL_NAME = u"com.sun.star.lang.comp.cppuhelper.BootstrapMacroExpander"; using namespace ::osl; using namespace ::com::sun::star; -- cgit