summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-10 12:28:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-10 19:10:31 +0100
commit9444c925b254cca32c08c473cc294a5f0e90881a (patch)
treee98a5fdd4125ab931d9acf7bd17e2ba7732995c5 /svx
parent6610bfdd8c8923e85b30e364c6ea5c7abf218367 (diff)
new loplugin:stringliteraldefine
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/datanavi.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 4d5ac51af1d3..ea553e28810e 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -74,36 +74,36 @@ namespace svxform
{
// properties of instance
- #define PN_INSTANCE_MODEL "Instance"
- #define PN_INSTANCE_ID "ID"
- #define PN_INSTANCE_URL "URL"
+ constexpr OUStringLiteral PN_INSTANCE_MODEL = u"Instance";
+ constexpr OUStringLiteral PN_INSTANCE_ID = u"ID";
+ constexpr OUStringLiteral PN_INSTANCE_URL = u"URL";
// properties of binding
- #define PN_BINDING_ID "BindingID"
- #define PN_BINDING_EXPR "BindingExpression"
- #define PN_BINDING_MODEL "Model"
- #define PN_BINDING_NAMESPACES "ModelNamespaces"
- #define PN_READONLY_EXPR "ReadonlyExpression"
- #define PN_RELEVANT_EXPR "RelevantExpression"
- #define PN_REQUIRED_EXPR "RequiredExpression"
- #define PN_CONSTRAINT_EXPR "ConstraintExpression"
- #define PN_CALCULATE_EXPR "CalculateExpression"
- #define PN_BINDING_TYPE "Type"
+ constexpr OUStringLiteral PN_BINDING_ID = u"BindingID";
+ constexpr OUStringLiteral PN_BINDING_EXPR = u"BindingExpression";
+ constexpr OUStringLiteral PN_BINDING_MODEL = u"Model";
+ constexpr OUStringLiteral PN_BINDING_NAMESPACES = u"ModelNamespaces";
+ constexpr OUStringLiteral PN_READONLY_EXPR = u"ReadonlyExpression";
+ constexpr OUStringLiteral PN_RELEVANT_EXPR = u"RelevantExpression";
+ constexpr OUStringLiteral PN_REQUIRED_EXPR = u"RequiredExpression";
+ constexpr OUStringLiteral PN_CONSTRAINT_EXPR = u"ConstraintExpression";
+ constexpr OUStringLiteral PN_CALCULATE_EXPR = u"CalculateExpression";
+ constexpr OUStringLiteral PN_BINDING_TYPE = u"Type";
// properties of submission
- #define PN_SUBMISSION_ID "ID"
- #define PN_SUBMISSION_BIND "Bind"
- #define PN_SUBMISSION_REF "Ref"
- #define PN_SUBMISSION_ACTION "Action"
- #define PN_SUBMISSION_METHOD "Method"
- #define PN_SUBMISSION_REPLACE "Replace"
+ constexpr OUStringLiteral PN_SUBMISSION_ID = u"ID";
+ constexpr OUStringLiteral PN_SUBMISSION_BIND = u"Bind";
+ constexpr OUStringLiteral PN_SUBMISSION_REF = u"Ref";
+ constexpr OUStringLiteral PN_SUBMISSION_ACTION = u"Action";
+ constexpr OUStringLiteral PN_SUBMISSION_METHOD = u"Method";
+ constexpr OUStringLiteral PN_SUBMISSION_REPLACE = u"Replace";
// other const strings
- #define TRUE_VALUE "true()"
- #define NEW_ELEMENT "newElement"
- #define NEW_ATTRIBUTE "newAttribute"
- #define EVENTTYPE_CHARDATA "DOMCharacterDataModified"
- #define EVENTTYPE_ATTR "DOMAttrModified"
+ constexpr OUStringLiteral TRUE_VALUE = u"true()";
+ constexpr OUStringLiteral NEW_ELEMENT = u"newElement";
+ constexpr OUStringLiteral NEW_ATTRIBUTE = u"newAttribute";
+ constexpr OUStringLiteral EVENTTYPE_CHARDATA = u"DOMCharacterDataModified";
+ constexpr OUStringLiteral EVENTTYPE_ATTR = u"DOMAttrModified";
#define MIN_PAGE_COUNT 3 // at least one instance, one submission and one binding page