diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-15 12:25:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-19 18:31:10 +0200 |
commit | ab699bfdb3375f7142a50cc35322e2924c9e5945 (patch) | |
tree | 8f935378a1ee272f4316a50f902e214d50ce8cc6 /sc | |
parent | f393785a146433cccd5bbecf1e49b5f1485ec5a7 (diff) |
new loplugin:stringviewvar looks for OUString vars that can be
... that can be string_view
Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/dbdata.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index f7e22dea2a03..e060fb25e422 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -1016,13 +1016,13 @@ OUString lcl_IncrementNumberInNamedRange(ScDBCollection::NamedDBs& namedDBs, sal_Int32 nOldNumber = 1; if (nLastIndex >= 0) { - OUString sLastPart(sOldName.subView(nLastIndex)); - nOldNumber = sLastPart.toInt32(); + std::u16string_view sLastPart(sOldName.subView(nLastIndex)); + nOldNumber = o3tl::toInt32(sLastPart); // When no number found, add number at the end. // When there is a literal "0" at the end, keep the "lastIndex" from above // (OUString::toInt32() also returns 0 on failure) - if (nOldNumber == 0 && sLastPart != "0") + if (nOldNumber == 0 && sLastPart != u"0") { nOldNumber = 1; nLastIndex = sOldName.getLength(); |