summaryrefslogtreecommitdiff
path: root/filter
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 /filter
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 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx2
-rw-r--r--filter/source/svg/svgexport.cxx12
-rw-r--r--filter/source/t602/t602filter.cxx14
-rw-r--r--filter/source/textfilterdetect/filterdetect.cxx14
4 files changed, 21 insertions, 21 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 783609c4ca24..5df5baacbdf9 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -167,7 +167,7 @@ using namespace container ;
// static counter for OLE-Objects
static sal_uInt32 nMSOleObjCntr = 0;
-#define MSO_OLE_Obj "MSO_OLE_Obj"
+constexpr OUStringLiteral MSO_OLE_Obj = u"MSO_OLE_Obj";
namespace {
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index b42cc1c23b5e..fdad0ba6dd37 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -78,12 +78,12 @@ using namespace ::xmloff::token;
#define NSPREFIX "ooo:"
-#define SVG_PROP_TINYPROFILE "TinyMode"
-#define SVG_PROP_DTDSTRING "DTDString"
-#define SVG_PROP_EMBEDFONTS "EmbedFonts"
-#define SVG_PROP_NATIVEDECORATION "UseNativeTextDecoration"
-#define SVG_PROP_OPACITY "Opacity"
-#define SVG_PROP_POSITIONED_CHARACTERS "UsePositionedCharacters"
+constexpr OUStringLiteral SVG_PROP_TINYPROFILE = u"TinyMode";
+constexpr OUStringLiteral SVG_PROP_DTDSTRING = u"DTDString";
+constexpr OUStringLiteral SVG_PROP_EMBEDFONTS = u"EmbedFonts";
+constexpr OUStringLiteral SVG_PROP_NATIVEDECORATION = u"UseNativeTextDecoration";
+constexpr OUStringLiteral SVG_PROP_OPACITY = u"Opacity";
+constexpr OUStringLiteral SVG_PROP_POSITIONED_CHARACTERS = u"UsePositionedCharacters";
// ooo xml elements
constexpr OUStringLiteral aOOOElemTextField = u"" NSPREFIX "text_field";
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index f71d1c681af6..8fd52e72fed5 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -922,13 +922,13 @@ bool T602ImportFilterDialog::OptionsDlg()
propInt_(xPSetDialog,"Height",90);
propStringFromResId_(xPSetDialog,"Title", T602FILTER_STR_IMPORT_DIALOG_TITLE);
-#define T602DLG_OK_BUTTON "ok_button"
-#define T602DLG_CANCEL_BUTTON "cancel_button"
-#define T602DLG_CODE_LB "code_lb"
-#define T602DLG_AZBUKA_CB "azbuka_cb"
-#define T602DLG_COMMENT_CB "comment_cb"
-#define T602DLG_REFORMAT_CB "reformat_cb"
-#define T602DLG_CODE_TXT "code_txt"
+ static constexpr OUStringLiteral T602DLG_OK_BUTTON = u"ok_button";
+ static constexpr OUStringLiteral T602DLG_CANCEL_BUTTON = u"cancel_button";
+ static constexpr OUStringLiteral T602DLG_CODE_LB = u"code_lb";
+ static constexpr OUStringLiteral T602DLG_AZBUKA_CB = u"azbuka_cb";
+ static constexpr OUStringLiteral T602DLG_COMMENT_CB = u"comment_cb";
+ static constexpr OUStringLiteral T602DLG_REFORMAT_CB = u"reformat_cb";
+ static constexpr OUStringLiteral T602DLG_CODE_TXT = u"code_txt";
Reference < XInterface > TextModel = Inst_("com.sun.star.awt.UnoControlFixedTextModel");
Reference < XPropertySet > xPSetText( TextModel, UNO_QUERY );
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 19696ec9fa17..5087066d552b 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -23,15 +23,15 @@
#include <sfx2/fcontnr.hxx>
#include <sfx2/docfilt.hxx>
-#define WRITER_TEXT_FILTER "Text"
-#define CALC_TEXT_FILTER "Text - txt - csv (StarCalc)"
+constexpr OUStringLiteral WRITER_TEXT_FILTER = u"Text";
+constexpr OUStringLiteral CALC_TEXT_FILTER = u"Text - txt - csv (StarCalc)";
-#define WEB_HTML_FILTER "HTML"
-#define WRITER_HTML_FILTER "HTML (StarWriter)"
-#define CALC_HTML_FILTER "calc_HTML_WebQuery"
+constexpr OUStringLiteral WEB_HTML_FILTER = u"HTML";
+constexpr OUStringLiteral WRITER_HTML_FILTER = u"HTML (StarWriter)";
+constexpr OUStringLiteral CALC_HTML_FILTER = u"calc_HTML_WebQuery";
-#define WRITER_DOCSERVICE "com.sun.star.text.TextDocument"
-#define CALC_DOCSERVICE "com.sun.star.sheet.SpreadsheetDocument"
+constexpr OUStringLiteral WRITER_DOCSERVICE = u"com.sun.star.text.TextDocument";
+constexpr OUStringLiteral CALC_DOCSERVICE = u"com.sun.star.sheet.SpreadsheetDocument";
using namespace ::com::sun::star;
using utl::MediaDescriptor;