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 --- scaddins/source/analysis/analysis.cxx | 6 +++--- scaddins/source/datefunc/datefunc.cxx | 6 +++--- scaddins/source/pricing/pricing.cxx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'scaddins') diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index 0e92095bb6b1..046580e14f7e 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -32,9 +32,9 @@ #include #include -#define ADDIN_SERVICE "com.sun.star.sheet.AddIn" -#define MY_SERVICE "com.sun.star.sheet.addin.Analysis" -#define MY_IMPLNAME "com.sun.star.sheet.addin.AnalysisImpl" +constexpr OUStringLiteral ADDIN_SERVICE = u"com.sun.star.sheet.AddIn"; +constexpr OUStringLiteral MY_SERVICE = u"com.sun.star.sheet.addin.Analysis"; +constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.AnalysisImpl"; using namespace ::com::sun::star; using namespace sca::analysis; diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index ba5f4f989627..0d1cff9e092e 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -32,9 +32,9 @@ using namespace ::com::sun::star; -#define ADDIN_SERVICE "com.sun.star.sheet.AddIn" -#define MY_SERVICE "com.sun.star.sheet.addin.DateFunctions" -#define MY_IMPLNAME "com.sun.star.sheet.addin.DateFunctionsImpl" +constexpr OUStringLiteral ADDIN_SERVICE = u"com.sun.star.sheet.AddIn"; +constexpr OUStringLiteral MY_SERVICE = u"com.sun.star.sheet.addin.DateFunctions"; +constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.DateFunctionsImpl"; #define UNIQUE false // function name does not exist in Calc diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx index 64b01938d0be..cc7c713fc7f0 100644 --- a/scaddins/source/pricing/pricing.cxx +++ b/scaddins/source/pricing/pricing.cxx @@ -39,9 +39,9 @@ using namespace ::com::sun::star; using namespace sca::pricing; -#define ADDIN_SERVICE "com.sun.star.sheet.AddIn" -#define MY_SERVICE "com.sun.star.sheet.addin.PricingFunctions" -#define MY_IMPLNAME "com.sun.star.sheet.addin.PricingFunctionsImpl" +constexpr OUStringLiteral ADDIN_SERVICE = u"com.sun.star.sheet.AddIn"; +constexpr OUStringLiteral MY_SERVICE = u"com.sun.star.sheet.addin.PricingFunctions"; +constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.PricingFunctionsImpl"; #define UNIQUE false // function name does not exist in Calc -- cgit