summaryrefslogtreecommitdiff
path: root/svl
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 /svl
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 'svl')
-rw-r--r--svl/source/items/srchitem.cxx28
-rw-r--r--svl/source/numbers/numfmuno.cxx70
2 files changed, 49 insertions, 49 deletions
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 4588d7a8bfc4..fb2c0e83047c 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -36,22 +36,22 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
using namespace com::sun::star::util;
-#define CFG_ROOT_NODE "Office.Common/SearchOptions"
+constexpr OUStringLiteral CFG_ROOT_NODE = u"Office.Common/SearchOptions";
#define SRCH_PARAMS 13
-#define SRCH_PARA_OPTIONS "Options"
-#define SRCH_PARA_FAMILY "Family"
-#define SRCH_PARA_COMMAND "Command"
-#define SRCH_PARA_CELLTYPE "CellType"
-#define SRCH_PARA_APPFLAG "AppFlag"
-#define SRCH_PARA_ROWDIR "RowDirection"
-#define SRCH_PARA_ALLTABLES "AllTables"
-#define SRCH_PARA_SEARCHFILTERED "SearchFiltered"
-#define SRCH_PARA_SEARCHFORMATTED "SearchFormatted"
-#define SRCH_PARA_BACKWARD "Backward"
-#define SRCH_PARA_PATTERN "Pattern"
-#define SRCH_PARA_CONTENT "Content"
-#define SRCH_PARA_ASIANOPT "AsianOptions"
+constexpr OUStringLiteral SRCH_PARA_OPTIONS = u"Options";
+constexpr OUStringLiteral SRCH_PARA_FAMILY = u"Family";
+constexpr OUStringLiteral SRCH_PARA_COMMAND = u"Command";
+constexpr OUStringLiteral SRCH_PARA_CELLTYPE = u"CellType";
+constexpr OUStringLiteral SRCH_PARA_APPFLAG = u"AppFlag";
+constexpr OUStringLiteral SRCH_PARA_ROWDIR = u"RowDirection";
+constexpr OUStringLiteral SRCH_PARA_ALLTABLES = u"AllTables";
+constexpr OUStringLiteral SRCH_PARA_SEARCHFILTERED = u"SearchFiltered";
+constexpr OUStringLiteral SRCH_PARA_SEARCHFORMATTED = u"SearchFormatted";
+constexpr OUStringLiteral SRCH_PARA_BACKWARD = u"Backward";
+constexpr OUStringLiteral SRCH_PARA_PATTERN = u"Pattern";
+constexpr OUStringLiteral SRCH_PARA_CONTENT = u"Content";
+constexpr OUStringLiteral SRCH_PARA_ASIANOPT = u"AsianOptions";
SfxPoolItem* SvxSearchItem::CreateDefault() { return new SvxSearchItem(0);}
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 45e12f8fab31..426663233b98 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -38,24 +38,24 @@
using namespace com::sun::star;
-#define PROPERTYNAME_FMTSTR "FormatString"
-#define PROPERTYNAME_LOCALE "Locale"
-#define PROPERTYNAME_TYPE "Type"
-#define PROPERTYNAME_COMMENT "Comment"
-#define PROPERTYNAME_CURREXT "CurrencyExtension"
-#define PROPERTYNAME_CURRSYM "CurrencySymbol"
-#define PROPERTYNAME_CURRABB "CurrencyAbbreviation"
-#define PROPERTYNAME_DECIMALS "Decimals"
-#define PROPERTYNAME_LEADING "LeadingZeros"
-#define PROPERTYNAME_NEGRED "NegativeRed"
-#define PROPERTYNAME_STDFORM "StandardFormat"
-#define PROPERTYNAME_THOUS "ThousandsSeparator"
-#define PROPERTYNAME_USERDEF "UserDefined"
-
-#define PROPERTYNAME_NOZERO "NoZero"
-#define PROPERTYNAME_NULLDATE "NullDate"
-#define PROPERTYNAME_STDDEC "StandardDecimals"
-#define PROPERTYNAME_TWODIGIT "TwoDigitDateStart"
+constexpr OUStringLiteral PROPERTYNAME_FMTSTR = u"FormatString";
+constexpr OUStringLiteral PROPERTYNAME_LOCALE = u"Locale";
+constexpr OUStringLiteral PROPERTYNAME_TYPE = u"Type";
+constexpr OUStringLiteral PROPERTYNAME_COMMENT = u"Comment";
+constexpr OUStringLiteral PROPERTYNAME_CURREXT = u"CurrencyExtension";
+constexpr OUStringLiteral PROPERTYNAME_CURRSYM = u"CurrencySymbol";
+constexpr OUStringLiteral PROPERTYNAME_CURRABB = u"CurrencyAbbreviation";
+constexpr OUStringLiteral PROPERTYNAME_DECIMALS = u"Decimals";
+constexpr OUStringLiteral PROPERTYNAME_LEADING = u"LeadingZeros";
+constexpr OUStringLiteral PROPERTYNAME_NEGRED = u"NegativeRed";
+constexpr OUStringLiteral PROPERTYNAME_STDFORM = u"StandardFormat";
+constexpr OUStringLiteral PROPERTYNAME_THOUS = u"ThousandsSeparator";
+constexpr OUStringLiteral PROPERTYNAME_USERDEF = u"UserDefined";
+
+constexpr OUStringLiteral PROPERTYNAME_NOZERO = u"NoZero";
+constexpr OUStringLiteral PROPERTYNAME_NULLDATE = u"NullDate";
+constexpr OUStringLiteral PROPERTYNAME_STDDEC = u"StandardDecimals";
+constexpr OUStringLiteral PROPERTYNAME_TWODIGIT = u"TwoDigitDateStart";
// All without a Which-ID, Map only for PropertySetInfo
@@ -63,19 +63,19 @@ static const SfxItemPropertyMapEntry* lcl_GetNumberFormatPropertyMap()
{
static const SfxItemPropertyMapEntry aNumberFormatPropertyMap_Impl[] =
{
- {u"" PROPERTYNAME_FMTSTR, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_LOCALE, 0, cppu::UnoType<lang::Locale>::get(),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_TYPE, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_COMMENT, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_CURREXT, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_CURRSYM, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_DECIMALS, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_LEADING, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_NEGRED, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_STDFORM, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_THOUS, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_USERDEF, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
- {u"" PROPERTYNAME_CURRABB, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_FMTSTR, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_LOCALE, 0, cppu::UnoType<lang::Locale>::get(),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_TYPE, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_COMMENT, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_CURREXT, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_CURRSYM, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_DECIMALS, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_LEADING, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_NEGRED, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_STDFORM, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_THOUS, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_USERDEF, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
+ {PROPERTYNAME_CURRABB, 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0},
{ u"", 0, css::uno::Type(), 0, 0 }
};
return aNumberFormatPropertyMap_Impl;
@@ -85,10 +85,10 @@ static const SfxItemPropertyMapEntry* lcl_GetNumberSettingsPropertyMap()
{
static const SfxItemPropertyMapEntry aNumberSettingsPropertyMap_Impl[] =
{
- {u"" PROPERTYNAME_NOZERO, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND, 0},
- {u"" PROPERTYNAME_NULLDATE, 0, cppu::UnoType<util::Date>::get(), beans::PropertyAttribute::BOUND, 0},
- {u"" PROPERTYNAME_STDDEC, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND, 0},
- {u"" PROPERTYNAME_TWODIGIT, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND, 0},
+ {PROPERTYNAME_NOZERO, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::BOUND, 0},
+ {PROPERTYNAME_NULLDATE, 0, cppu::UnoType<util::Date>::get(), beans::PropertyAttribute::BOUND, 0},
+ {PROPERTYNAME_STDDEC, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND, 0},
+ {PROPERTYNAME_TWODIGIT, 0, cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::BOUND, 0},
{ u"", 0, css::uno::Type(), 0, 0 }
};
return aNumberSettingsPropertyMap_Impl;