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 --- svtools/source/config/miscopt.cxx | 6 +++--- svtools/source/config/slidesorterbaropt.cxx | 2 +- svtools/source/control/ctrlbox.cxx | 2 +- svtools/source/uno/addrtempuno.cxx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'svtools/source') diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 4d1f4575d885..46c0e75841c8 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -40,12 +40,12 @@ using namespace ::osl ; using namespace ::com::sun::star::uno ; using namespace ::com::sun::star; -#define ROOTNODE_MISC "Office.Common/Misc" +constexpr OUStringLiteral ROOTNODE_MISC = u"Office.Common/Misc"; // PROPERTYHANDLE defines must be sequential from zero for Commit/Load -#define PROPERTYNAME_SYMBOLSET "SymbolSet" +constexpr OUStringLiteral PROPERTYNAME_SYMBOLSET = u"SymbolSet"; #define PROPERTYHANDLE_SYMBOLSET 0 -#define PROPERTYNAME_ICONTHEME "SymbolStyle" +constexpr OUStringLiteral PROPERTYNAME_ICONTHEME = u"SymbolStyle"; #define PROPERTYHANDLE_SYMBOLSTYLE 1 class SvtMiscOptions_Impl : public ConfigItem diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx index a3e696ad6467..2e4a4a3da587 100644 --- a/svtools/source/config/slidesorterbaropt.cxx +++ b/svtools/source/config/slidesorterbaropt.cxx @@ -33,7 +33,7 @@ using namespace ::osl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -#define ROOTNODE_SLIDESORTERBAR "Office.Impress/MultiPaneGUI/SlideSorterBar/Visible" +constexpr OUStringLiteral ROOTNODE_SLIDESORTERBAR = u"Office.Impress/MultiPaneGUI/SlideSorterBar/Visible"; constexpr OUStringLiteral PROPERTYNAME_VISIBLE_IMPRESSVIEW = u"ImpressView"; #define PROPERTYHANDLE_VISIBLE_IMPRESSVIEW 0 diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index b20b3cfdf703..c482d8b4a8ec 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -62,7 +62,7 @@ #define GAPTOEXTRAPREVIEW 10 #define MINGAPWIDTH 2 -#define FONTNAMEBOXMRUENTRIESFILE "/user/config/fontnameboxmruentries" +constexpr OUStringLiteral FONTNAMEBOXMRUENTRIESFILE = u"/user/config/fontnameboxmruentries"; BorderWidthImpl::BorderWidthImpl( BorderWidthImplFlags nFlags, double nRate1, double nRate2, double nRateGap ): diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 3d3a8c4a11e6..54cb28afc07d 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -32,7 +32,7 @@ using namespace svt; namespace { #define UNODIALOG_PROPERTY_ID_ALIASES 100 -#define UNODIALOG_PROPERTY_ALIASES "FieldMapping" +constexpr OUStringLiteral UNODIALOG_PROPERTY_ALIASES = u"FieldMapping"; using namespace css::uno; using namespace css::lang; -- cgit