Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: svl

Change-Id: I31d46c2b75888474136ecd630fd3f817db189fb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158223
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2023-10-19 10:30:30 +02:00
parent 498515b01a
commit 74a6ce486b
4 changed files with 35 additions and 35 deletions

View file

@ -146,7 +146,7 @@ void IndexedStyleSheetsTest::StyleSheetsCanBeRetrievedByTheirName()
void IndexedStyleSheetsTest::KnowsThatItStoresAStyleSheet()
{
static constexpr OUStringLiteral name1(u"name1");
static constexpr OUString name1(u"name1"_ustr);
rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1));
rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name1));
rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet("name2"));

View file

@ -39,22 +39,22 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
using namespace com::sun::star::util;
constexpr OUStringLiteral CFG_ROOT_NODE = u"Office.Common/SearchOptions";
constexpr OUString CFG_ROOT_NODE = u"Office.Common/SearchOptions"_ustr;
#define SRCH_PARAMS 13
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";
constexpr OUString SRCH_PARA_OPTIONS = u"Options"_ustr;
constexpr OUString SRCH_PARA_FAMILY = u"Family"_ustr;
constexpr OUString SRCH_PARA_COMMAND = u"Command"_ustr;
constexpr OUString SRCH_PARA_CELLTYPE = u"CellType"_ustr;
constexpr OUString SRCH_PARA_APPFLAG = u"AppFlag"_ustr;
constexpr OUString SRCH_PARA_ROWDIR = u"RowDirection"_ustr;
constexpr OUString SRCH_PARA_ALLTABLES = u"AllTables"_ustr;
constexpr OUString SRCH_PARA_SEARCHFILTERED = u"SearchFiltered"_ustr;
constexpr OUString SRCH_PARA_SEARCHFORMATTED = u"SearchFormatted"_ustr;
constexpr OUString SRCH_PARA_BACKWARD = u"Backward"_ustr;
constexpr OUString SRCH_PARA_PATTERN = u"Pattern"_ustr;
constexpr OUString SRCH_PARA_CONTENT = u"Content"_ustr;
constexpr OUString SRCH_PARA_ASIANOPT = u"AsianOptions"_ustr;
SfxPoolItem* SvxSearchItem::CreateDefault() { return new SvxSearchItem(0);}

View file

@ -41,24 +41,24 @@
using namespace com::sun::star;
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 OUString PROPERTYNAME_FMTSTR = u"FormatString"_ustr;
constexpr OUString PROPERTYNAME_LOCALE = u"Locale"_ustr;
constexpr OUString PROPERTYNAME_TYPE = u"Type"_ustr;
constexpr OUString PROPERTYNAME_COMMENT = u"Comment"_ustr;
constexpr OUString PROPERTYNAME_CURREXT = u"CurrencyExtension"_ustr;
constexpr OUString PROPERTYNAME_CURRSYM = u"CurrencySymbol"_ustr;
constexpr OUString PROPERTYNAME_CURRABB = u"CurrencyAbbreviation"_ustr;
constexpr OUString PROPERTYNAME_DECIMALS = u"Decimals"_ustr;
constexpr OUString PROPERTYNAME_LEADING = u"LeadingZeros"_ustr;
constexpr OUString PROPERTYNAME_NEGRED = u"NegativeRed"_ustr;
constexpr OUString PROPERTYNAME_STDFORM = u"StandardFormat"_ustr;
constexpr OUString PROPERTYNAME_THOUS = u"ThousandsSeparator"_ustr;
constexpr OUString PROPERTYNAME_USERDEF = u"UserDefined"_ustr;
constexpr OUStringLiteral PROPERTYNAME_NOZERO = u"NoZero";
constexpr OUStringLiteral PROPERTYNAME_NULLDATE = u"NullDate";
constexpr OUStringLiteral PROPERTYNAME_STDDEC = u"StandardDecimals";
constexpr OUStringLiteral PROPERTYNAME_TWODIGIT = u"TwoDigitDateStart";
constexpr OUString PROPERTYNAME_NOZERO = u"NoZero"_ustr;
constexpr OUString PROPERTYNAME_NULLDATE = u"NullDate"_ustr;
constexpr OUString PROPERTYNAME_STDDEC = u"StandardDecimals"_ustr;
constexpr OUString PROPERTYNAME_TWODIGIT = u"TwoDigitDateStart"_ustr;
// All without a Which-ID, Map only for PropertySetInfo

View file

@ -52,7 +52,7 @@ using namespace svt;
namespace {
constexpr OUStringLiteral GREGORIAN = u"gregorian";
constexpr OUString GREGORIAN = u"gregorian"_ustr;
const sal_uInt16 UPPER_PRECISION = 300; // entirely arbitrary...
const double EXP_LOWER_BOUND = 1.0E-4; // prefer scientific notation below this value.
@ -1759,8 +1759,8 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
break;
default:
{
static constexpr OUStringLiteral aNatNum(u"NATNUM");
static constexpr OUStringLiteral aDBNum(u"DBNUM");
static constexpr OUString aNatNum(u"NATNUM"_ustr);
static constexpr OUString aDBNum(u"DBNUM"_ustr);
const OUString aBufStr( rString.toString());
sal_Int32 nNatNumNum;
sal_Int32 nDBNum;