diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-05-13 11:57:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-05-14 13:11:50 +0200 |
commit | af16aa625682b649e8843237652b9246d519cbae (patch) | |
tree | 2ea597c328318d6b75761b71af313bef02b5ad77 /editeng | |
parent | f40cbba63f13e7081fc5901769651fd4d43ea34d (diff) |
Improve loplugin:stringview
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for
operator call arguments. (The "rather than copy, pass subView()" diagnostic is
already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly
for operator call arguments.)
(And many call sites don't even require an explicit [u16]string_view, esp. with
the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator
+= overloads". Just some test code in sal/qa/ that explicitly tests the
O[U]String functionality had to be excluded.)
Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 13f70dabf6a5..d8e82beb40b9 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -522,7 +522,7 @@ bool SvxLRSpaceItem::GetPresentation else rText = GetMetricText( nLeftMargin, eCoreUnit, ePresUnit, &rIntl ); - rText += OUString(cpDelim); + rText += cpDelim; if ( 100 != nPropFirstLineOffset ) { rText += unicode::formatPercent(nPropFirstLineOffset, @@ -531,7 +531,7 @@ bool SvxLRSpaceItem::GetPresentation else rText += GetMetricText( static_cast<tools::Long>(nFirstLineOffset), eCoreUnit, ePresUnit, &rIntl ); - rText += OUString(cpDelim); + rText += cpDelim; if ( 100 != nRightMargin ) { rText += unicode::formatPercent(nRightMargin, @@ -553,7 +553,7 @@ bool SvxLRSpaceItem::GetPresentation rText += GetMetricText( nLeftMargin, eCoreUnit, ePresUnit, &rIntl ) + " " + EditResId(GetMetricId(ePresUnit)); } - rText += OUString(cpDelim); + rText += cpDelim; if ( 100 != nPropFirstLineOffset || nFirstLineOffset ) { rText += EditResId(RID_SVXITEMS_LRSPACE_FLINE); @@ -566,7 +566,7 @@ bool SvxLRSpaceItem::GetPresentation eCoreUnit, ePresUnit, &rIntl ) + " " + EditResId(GetMetricId(ePresUnit)); } - rText += OUString(cpDelim); + rText += cpDelim; } rText += EditResId(RID_SVXITEMS_LRSPACE_RIGHT); if ( 100 != nPropRightMargin ) @@ -800,7 +800,7 @@ bool SvxULSpaceItem::GetPresentation } else rText = GetMetricText( static_cast<tools::Long>(nUpper), eCoreUnit, ePresUnit, &rIntl ); - rText += OUString(cpDelim); + rText += cpDelim; if ( 100 != nPropLower ) { rText += unicode::formatPercent(nPropLower, |