[Libreoffice-commits] core.git: desktop/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 2 07:50:55 UTC 2021
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 6 +++---
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 4 ++--
desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 4 ++--
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 2 +-
desktop/source/deployment/manager/dp_properties.cxx | 4 ++--
desktop/source/deployment/misc/dp_platform.cxx | 2 +-
desktop/source/deployment/registry/component/dp_compbackenddb.cxx | 8 ++++----
desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx | 8 ++++----
desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx | 8 ++++----
desktop/source/deployment/registry/help/dp_helpbackenddb.cxx | 8 ++++----
desktop/source/deployment/registry/package/dp_extbackenddb.cxx | 8 ++++----
desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx | 8 ++++----
12 files changed, 35 insertions(+), 35 deletions(-)
New commits:
commit 47b16450f85ebe327e925682ed60bf811534eab7
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 2 08:45:40 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 2 09:50:21 2021 +0200
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: I6f1c2ebafa056b3159315e75cf3682c8d889123c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119843
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 2941d42668ac..191bed09f6bb 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -75,9 +75,9 @@ using namespace ::com::sun::star::system;
namespace dp_gui {
-#define USER_PACKAGE_MANAGER "user"
-#define SHARED_PACKAGE_MANAGER "shared"
-#define BUNDLED_PACKAGE_MANAGER "bundled"
+constexpr OUStringLiteral USER_PACKAGE_MANAGER = u"user";
+constexpr OUStringLiteral SHARED_PACKAGE_MANAGER = u"shared";
+constexpr OUStringLiteral BUNDLED_PACKAGE_MANAGER = u"bundled";
// ExtBoxWithBtns_Impl
class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 0adcfa1bf9a1..dc5eafeefb5f 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -44,8 +44,8 @@
#include <vcl/weldutils.hxx>
#include <algorithm>
-#define USER_PACKAGE_MANAGER "user"
-#define SHARED_PACKAGE_MANAGER "shared"
+constexpr OUStringLiteral USER_PACKAGE_MANAGER = u"user";
+constexpr OUStringLiteral SHARED_PACKAGE_MANAGER = u"shared";
using namespace ::com::sun::star;
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 1f3d8d710b03..8e7efa8cc0d6 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -39,8 +39,8 @@
#include <dp_misc.h>
#include <dp_update.hxx>
-#define USER_PACKAGE_MANAGER "user"
-#define SHARED_PACKAGE_MANAGER "shared"
+constexpr OUStringLiteral USER_PACKAGE_MANAGER = u"user";
+constexpr OUStringLiteral SHARED_PACKAGE_MANAGER = u"shared";
using namespace ::com::sun::star;
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index ae47ec42b22f..719df5b0d9ba 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -87,7 +87,7 @@ sal_Unicode const LF = 0x000A;
sal_Unicode const CR = 0x000D;
constexpr OUStringLiteral IGNORED_UPDATES = u"/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates";
-#define PROPERTY_VERSION "Version"
+constexpr OUStringLiteral PROPERTY_VERSION = u"Version";
enum Kind { ENABLED_UPDATE, DISABLED_UPDATE, SPECIFIC_ERROR };
diff --git a/desktop/source/deployment/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index 75a499ffda9e..7d5e0edda975 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -34,8 +34,8 @@ namespace uno = com::sun::star::uno;
using ::com::sun::star::uno::Reference;
-#define PROP_SUPPRESS_LICENSE "SUPPRESS_LICENSE"
-#define PROP_EXTENSION_UPDATE "EXTENSION_UPDATE"
+constexpr OUStringLiteral PROP_SUPPRESS_LICENSE = u"SUPPRESS_LICENSE";
+constexpr OUStringLiteral PROP_EXTENSION_UPDATE = u"EXTENSION_UPDATE";
namespace dp_manager {
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index 964d75c7cd69..36c5486a7b40 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -25,7 +25,7 @@
#include <rtl/bootstrap.hxx>
#include <osl/diagnose.h>
-#define PLATFORM_ALL u"all"
+constexpr OUStringLiteral PLATFORM_ALL = u"all";
namespace dp_misc
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 37356fd78333..fd9bb2c61bdd 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
@@ -27,10 +27,10 @@
using namespace ::com::sun::star::uno;
-#define EXTENSION_REG_NS "http://openoffice.org/extensionmanager/component-registry/2010"
-#define NS_PREFIX "comp"
-#define ROOT_ELEMENT_NAME "component-backend-db"
-#define KEY_ELEMENT_NAME "component"
+constexpr OUStringLiteral EXTENSION_REG_NS = u"http://openoffice.org/extensionmanager/component-registry/2010";
+constexpr OUStringLiteral NS_PREFIX = u"comp";
+constexpr OUStringLiteral ROOT_ELEMENT_NAME = u"component-backend-db";
+constexpr OUStringLiteral KEY_ELEMENT_NAME = u"component";
namespace dp_registry::backend::component {
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index 0028f32ce352..afdc8112f239 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
@@ -28,10 +28,10 @@
using namespace ::com::sun::star::uno;
-#define EXTENSION_REG_NS "http://openoffice.org/extensionmanager/configuration-registry/2010"
-#define NS_PREFIX "conf"
-#define ROOT_ELEMENT_NAME "configuration-backend-db"
-#define KEY_ELEMENT_NAME "configuration"
+constexpr OUStringLiteral EXTENSION_REG_NS = u"http://openoffice.org/extensionmanager/configuration-registry/2010";
+constexpr OUStringLiteral NS_PREFIX = u"conf";
+constexpr OUStringLiteral ROOT_ELEMENT_NAME = u"configuration-backend-db";
+constexpr OUStringLiteral KEY_ELEMENT_NAME = u"configuration";
namespace dp_registry::backend::configuration {
diff --git a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
index 19790e9bc110..29cbf85b3397 100644
--- a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
@@ -24,10 +24,10 @@
using namespace ::com::sun::star::uno;
-#define EXTENSION_REG_NS "http://openoffice.org/extensionmanager/executable-registry/2010"
-#define NS_PREFIX "exe"
-#define ROOT_ELEMENT_NAME "executable-backend-db"
-#define ENTRY_NAME "executable"
+constexpr OUStringLiteral EXTENSION_REG_NS = u"http://openoffice.org/extensionmanager/executable-registry/2010";
+constexpr OUStringLiteral NS_PREFIX = u"exe";
+constexpr OUStringLiteral ROOT_ELEMENT_NAME = u"executable-backend-db";
+constexpr OUStringLiteral ENTRY_NAME = u"executable";
namespace dp_registry::backend::executable {
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 5d208d821e07..19bb3c3ce51c 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
@@ -27,10 +27,10 @@
using namespace ::com::sun::star::uno;
-#define EXTENSION_REG_NS "http://openoffice.org/extensionmanager/help-registry/2010"
-#define NS_PREFIX "help"
-#define ROOT_ELEMENT_NAME "help-backend-db"
-#define KEY_ELEMENT_NAME "help"
+constexpr OUStringLiteral EXTENSION_REG_NS = u"http://openoffice.org/extensionmanager/help-registry/2010";
+constexpr OUStringLiteral NS_PREFIX = u"help";
+constexpr OUStringLiteral ROOT_ELEMENT_NAME = u"help-backend-db";
+constexpr OUStringLiteral KEY_ELEMENT_NAME = u"help";
namespace dp_registry::backend::help {
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
index ac4180f87f70..8e656c5d7dc8 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
@@ -27,10 +27,10 @@
using namespace ::com::sun::star::uno;
-#define EXTENSION_REG_NS "http://openoffice.org/extensionmanager/extension-registry/2010"
-#define NS_PREFIX "ext"
-#define ROOT_ELEMENT_NAME "extension-backend-db"
-#define KEY_ELEMENT_NAME "extension"
+constexpr OUStringLiteral EXTENSION_REG_NS = u"http://openoffice.org/extensionmanager/extension-registry/2010";
+constexpr OUStringLiteral NS_PREFIX = u"ext";
+constexpr OUStringLiteral ROOT_ELEMENT_NAME = u"extension-backend-db";
+constexpr OUStringLiteral KEY_ELEMENT_NAME = u"extension";
namespace dp_registry::backend::bundle {
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
index a669f1b58b60..476f43953a91 100644
--- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
+++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
@@ -24,10 +24,10 @@
using namespace ::com::sun::star::uno;
-#define EXTENSION_REG_NS "http://openoffice.org/extensionmanager/script-registry/2010"
-#define NS_PREFIX "script"
-#define ROOT_ELEMENT_NAME "script-backend-db"
-#define KEY_ELEMENT_NAME "script"
+constexpr OUStringLiteral EXTENSION_REG_NS = u"http://openoffice.org/extensionmanager/script-registry/2010";
+constexpr OUStringLiteral NS_PREFIX = u"script";
+constexpr OUStringLiteral ROOT_ELEMENT_NAME = u"script-backend-db";
+constexpr OUStringLiteral KEY_ELEMENT_NAME = u"script";
namespace dp_registry::backend::script {
More information about the Libreoffice-commits
mailing list