summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-16 12:29:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-17 11:52:43 +0100
commit05fd1abb06821be51a6a23a1c8953dfaf24e1187 (patch)
tree4f21ba651c714a537397a5b334e97b98108630ef
parent8405b8cde173d60c62faae728ec572c383f3af5b (diff)
loplugin:stringliteraldefine in avmedia
Change-Id: Ie34a45a745ac9546208444b2e499b581e18d449f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--avmedia/inc/bitmaps.hlst4
-rw-r--r--avmedia/inc/helpids.h22
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx1
-rw-r--r--avmedia/source/inc/mediamisc.hxx2
4 files changed, 14 insertions, 15 deletions
diff --git a/avmedia/inc/bitmaps.hlst b/avmedia/inc/bitmaps.hlst
index 0ce3ca1f77c0..758471fbdb3a 100644
--- a/avmedia/inc/bitmaps.hlst
+++ b/avmedia/inc/bitmaps.hlst
@@ -9,7 +9,7 @@
#pragma once
-#define AVMEDIA_BMP_AUDIOLOGO "avmedia/res/avaudiologo.png"
-#define AVMEDIA_BMP_EMPTYLOGO "avmedia/res/avemptylogo.png"
+inline constexpr OUStringLiteral AVMEDIA_BMP_AUDIOLOGO = u"avmedia/res/avaudiologo.png";
+inline constexpr OUStringLiteral AVMEDIA_BMP_EMPTYLOGO = u"avmedia/res/avemptylogo.png";
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/avmedia/inc/helpids.h b/avmedia/inc/helpids.h
index c21ba79c9016..1bdf9cc56614 100644
--- a/avmedia/inc/helpids.h
+++ b/avmedia/inc/helpids.h
@@ -19,16 +19,16 @@
#pragma once
-#define HID_AVMEDIA_TOOLBOXITEM_PLAY "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY"
-#define HID_AVMEDIA_TOOLBOXITEM_PAUSE "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PAUSE"
-#define HID_AVMEDIA_TOOLBOXITEM_STOP "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_STOP"
-#define HID_AVMEDIA_TOOLBOXITEM_MUTE "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_MUTE"
-#define HID_AVMEDIA_TOOLBOXITEM_LOOP "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_LOOP"
-#define HID_AVMEDIA_TOOLBOXITEM_OPEN "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_OPEN"
-#define HID_AVMEDIA_TOOLBOXITEM_INSERT "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_INSERT"
-#define HID_AVMEDIA_ZOOMLISTBOX "AVMEDIA_HID_AVMEDIA_ZOOMLISTBOX"
-#define HID_AVMEDIA_TIMEEDIT "AVMEDIA_HID_AVMEDIA_TIMEEDIT"
-#define HID_AVMEDIA_VOLUMESLIDER "AVMEDIA_HID_AVMEDIA_VOLUMESLIDER"
-#define HID_AVMEDIA_PLAYERWINDOW "AVMEDIA_HID_AVMEDIA_PLAYERWINDOW"
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_PLAY = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_PAUSE = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PAUSE";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_STOP = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_STOP";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_MUTE = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_MUTE";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_LOOP = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_LOOP";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_OPEN = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_OPEN";
+inline constexpr OStringLiteral HID_AVMEDIA_TOOLBOXITEM_INSERT = "AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_INSERT";
+inline constexpr OStringLiteral HID_AVMEDIA_ZOOMLISTBOX = "AVMEDIA_HID_AVMEDIA_ZOOMLISTBOX";
+inline constexpr OStringLiteral HID_AVMEDIA_TIMEEDIT = "AVMEDIA_HID_AVMEDIA_TIMEEDIT";
+inline constexpr OStringLiteral HID_AVMEDIA_VOLUMESLIDER = "AVMEDIA_HID_AVMEDIA_VOLUMESLIDER";
+inline constexpr OStringLiteral HID_AVMEDIA_PLAYERWINDOW = "AVMEDIA_HID_AVMEDIA_PLAYERWINDOW";
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 4f12f80f5ded..f25ec5c6bb0c 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -47,7 +47,6 @@
constexpr OUStringLiteral AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME = u"com.sun.star.comp.avmedia.Player_GStreamer";
constexpr OUStringLiteral AVMEDIA_GST_PLAYER_SERVICENAME = u"com.sun.star.media.Player_GStreamer";
-
#define AVVERSION "gst 1.0: "
using namespace ::com::sun::star;
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 542dbe5f1f74..b0f9964d18f9 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -33,7 +33,7 @@
#endif
// Mime types
-#define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media"
+inline constexpr OUStringLiteral AVMEDIA_MIMETYPE_COMMON = u"application/vnd.sun.star.media";
inline OUString AvmResId(TranslateId aId)
{