summaryrefslogtreecommitdiff
path: root/extensions/source/update
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 15:08:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 14:43:58 +0200
commit1597cc5b3e07dd24cb4cb10b35b1e93545e4b929 (patch)
treef6ed37244e41d23e8a84327b1580e37f3dc18829 /extensions/source/update
parent0e883d6dbee8d72257f77605ae0c8a1d5bfbf044 (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 'extensions/source/update')
-rw-r--r--extensions/source/update/check/updatecheck.cxx10
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx34
-rw-r--r--extensions/source/update/check/updatehdl.cxx22
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx12
4 files changed, 39 insertions, 39 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 4a8017a2d805..99aa5f624889 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -61,11 +61,11 @@ namespace c3s = com::sun::star::system ;
namespace task = com::sun::star::task ;
namespace uno = com::sun::star::uno ;
-#define PROPERTY_TITLE "BubbleHeading"
-#define PROPERTY_TEXT "BubbleText"
-#define PROPERTY_SHOW_BUBBLE "BubbleVisible"
-#define PROPERTY_CLICK_HDL "MenuClickHDL"
-#define PROPERTY_SHOW_MENUICON "MenuIconVisible"
+constexpr OUStringLiteral PROPERTY_TITLE = u"BubbleHeading";
+constexpr OUStringLiteral PROPERTY_TEXT = u"BubbleText";
+constexpr OUStringLiteral PROPERTY_SHOW_BUBBLE = u"BubbleVisible";
+constexpr OUStringLiteral PROPERTY_CLICK_HDL = u"MenuClickHDL";
+constexpr OUStringLiteral PROPERTY_SHOW_MENUICON = u"MenuIconVisible";
// Returns the URL of the release note for the given position
OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 pos, bool autoDownloadEnabled)
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index 65c3e800702a..8e3c5b6dc9e9 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -41,23 +41,23 @@ namespace lang = com::sun::star::lang ;
namespace util = com::sun::star::util ;
namespace uno = com::sun::star::uno ;
-#define LAST_CHECK "LastCheck"
-#define UPDATE_VERSION "UpdateVersion"
-#define UPDATE_BUILDID "UpdateBuildId"
-#define UPDATE_DESCRIPTION "UpdateDescription"
-#define DOWNLOAD_URL "DownloadURL"
-#define IS_DIRECT_DOWNLOAD "IsDirectDownload"
-#define OLD_VERSION "UpdateFoundFor"
-#define AUTOCHECK_ENABLED "AutoCheckEnabled"
-#define AUTODOWNLOAD_ENABLED "AutoDownloadEnabled"
-#define CHECK_INTERVAL "CheckInterval"
-#define LOCAL_FILE "LocalFile"
-#define DOWNLOAD_SIZE "DownloadSize"
-#define DOWNLOAD_PAUSED "DownloadPaused"
-#define DOWNLOAD_DESTINATION "DownloadDestination"
-#define RELEASE_NOTE "ReleaseNote"
-
-#define PROPERTY_VERSION "Version"
+constexpr OUStringLiteral LAST_CHECK = u"LastCheck";
+constexpr OUStringLiteral UPDATE_VERSION = u"UpdateVersion";
+constexpr OUStringLiteral UPDATE_BUILDID = u"UpdateBuildId";
+constexpr OUStringLiteral UPDATE_DESCRIPTION = u"UpdateDescription";
+constexpr OUStringLiteral DOWNLOAD_URL = u"DownloadURL";
+constexpr OUStringLiteral IS_DIRECT_DOWNLOAD = u"IsDirectDownload";
+constexpr OUStringLiteral OLD_VERSION = u"UpdateFoundFor";
+constexpr OUStringLiteral AUTOCHECK_ENABLED = u"AutoCheckEnabled";
+constexpr OUStringLiteral AUTODOWNLOAD_ENABLED = u"AutoDownloadEnabled";
+constexpr OUStringLiteral CHECK_INTERVAL = u"CheckInterval";
+constexpr OUStringLiteral LOCAL_FILE = u"LocalFile";
+constexpr OUStringLiteral DOWNLOAD_SIZE = u"DownloadSize";
+constexpr OUStringLiteral DOWNLOAD_PAUSED = u"DownloadPaused";
+constexpr OUStringLiteral DOWNLOAD_DESTINATION = u"DownloadDestination";
+constexpr OUStringLiteral RELEASE_NOTE = u"ReleaseNote";
+
+constexpr OUStringLiteral PROPERTY_VERSION = u"Version";
const char * const aUpdateEntryProperties[] = {
UPDATE_VERSION,
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index e2d95bc8e84e..2f54e60dfd32 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -61,20 +61,20 @@
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
-#define COMMAND_CLOSE "close"
+constexpr OUStringLiteral COMMAND_CLOSE = u"close";
-#define CTRL_THROBBER "throbber"
-#define CTRL_PROGRESS "progress"
+constexpr OUStringLiteral CTRL_THROBBER = u"throbber";
+constexpr OUStringLiteral CTRL_PROGRESS = u"progress";
-#define TEXT_STATUS "text_status"
-#define TEXT_PERCENT "text_percent"
-#define TEXT_DESCRIPTION "text_description"
+constexpr OUStringLiteral TEXT_STATUS = u"text_status";
+constexpr OUStringLiteral TEXT_PERCENT = u"text_percent";
+constexpr OUStringLiteral TEXT_DESCRIPTION = u"text_description";
-#define FIXED_LINE_MODEL "com.sun.star.awt.UnoControlFixedLineModel"
-#define FIXED_TEXT_MODEL "com.sun.star.awt.UnoControlFixedTextModel"
-#define EDIT_FIELD_MODEL "com.sun.star.awt.UnoControlEditModel"
-#define BUTTON_MODEL "com.sun.star.awt.UnoControlButtonModel"
-#define GROUP_BOX_MODEL "com.sun.star.awt.UnoControlGroupBoxModel"
+constexpr OUStringLiteral FIXED_LINE_MODEL = u"com.sun.star.awt.UnoControlFixedLineModel";
+constexpr OUStringLiteral FIXED_TEXT_MODEL = u"com.sun.star.awt.UnoControlFixedTextModel";
+constexpr OUStringLiteral EDIT_FIELD_MODEL = u"com.sun.star.awt.UnoControlEditModel";
+constexpr OUStringLiteral BUTTON_MODEL = u"com.sun.star.awt.UnoControlButtonModel";
+constexpr OUStringLiteral GROUP_BOX_MODEL = u"com.sun.star.awt.UnoControlGroupBoxModel";
using namespace com::sun::star;
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index a39de0bbd3cb..fbed068c3b4d 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -40,12 +40,12 @@
#include <bitmaps.hlst>
-#define PROPERTY_TITLE "BubbleHeading"
-#define PROPERTY_TEXT "BubbleText"
-#define PROPERTY_IMAGE "BubbleImageURL"
-#define PROPERTY_SHOW_BUBBLE "BubbleVisible"
-#define PROPERTY_CLICK_HDL "MenuClickHDL"
-#define PROPERTY_SHOW_MENUICON "MenuIconVisible"
+constexpr OUStringLiteral PROPERTY_TITLE = u"BubbleHeading";
+constexpr OUStringLiteral PROPERTY_TEXT = u"BubbleText";
+constexpr OUStringLiteral PROPERTY_IMAGE = u"BubbleImageURL";
+constexpr OUStringLiteral PROPERTY_SHOW_BUBBLE = u"BubbleVisible";
+constexpr OUStringLiteral PROPERTY_CLICK_HDL = u"MenuClickHDL";
+constexpr OUStringLiteral PROPERTY_SHOW_MENUICON = u"MenuIconVisible";
using namespace ::com::sun::star;