diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-29 15:08:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-02 14:43:58 +0200 |
commit | 1597cc5b3e07dd24cb4cb10b35b1e93545e4b929 (patch) | |
tree | f6ed37244e41d23e8a84327b1580e37f3dc18829 /scripting | |
parent | 0e883d6dbee8d72257f77605ae0c8a1d5bfbf044 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basmethnode.cxx | 4 | ||||
-rw-r--r-- | scripting/source/basprov/basscript.cxx | 2 | ||||
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx index 9ac68be5faf8..d053fa11b809 100644 --- a/scripting/source/basprov/basmethnode.cxx +++ b/scripting/source/basprov/basmethnode.cxx @@ -41,8 +41,8 @@ using namespace ::sf_misc; #define BASPROV_PROPERTY_ID_URI 1 #define BASPROV_PROPERTY_ID_EDITABLE 2 -#define BASPROV_PROPERTY_URI "URI" -#define BASPROV_PROPERTY_EDITABLE "Editable" +constexpr OUStringLiteral BASPROV_PROPERTY_URI = u"URI"; +constexpr OUStringLiteral BASPROV_PROPERTY_EDITABLE = u"Editable"; #define BASPROV_DEFAULT_ATTRIBS() PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index a22cd82f343e..9054ee4bfc27 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -44,7 +44,7 @@ namespace basprov { #define BASSCRIPT_PROPERTY_ID_CALLER 1 -#define BASSCRIPT_PROPERTY_CALLER "Caller" +constexpr OUStringLiteral BASSCRIPT_PROPERTY_CALLER = u"Caller"; #define BASSCRIPT_DEFAULT_ATTRIBS() PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 079b0909ab3e..0726c9d02f43 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -534,7 +534,7 @@ private: typedef ::cppu::WeakImplHelper< XScriptListener, util::XCloseListener, lang::XInitialization, css::lang::XServiceInfo > EventListener_BASE; #define EVENTLSTNR_PROPERTY_ID_MODEL 1 -#define EVENTLSTNR_PROPERTY_MODEL "Model" +constexpr OUStringLiteral EVENTLSTNR_PROPERTY_MODEL = u"Model"; namespace { |