diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-02-06 16:43:59 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-02-06 19:32:52 +0100 |
commit | 049bc1e7d7ca44767dc826fdda161e01306bf17b (patch) | |
tree | c5e7f7c7665a58122b56dc3071749904f6946afc /svl | |
parent | fdc7a587275adcf06866d954d4da4116c8717723 (diff) |
No need to call makeStringAndClear to pass a string view
Change-Id: Id9e18e66f3b3c583d7cb22ee0a5d6272ca2f7ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129556
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 330921242a01..438eacabc893 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -1432,11 +1432,10 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) // Expand again in case of pattern "M. D. " and // input "M. D. ", maybe fetched far, but... padToLength(aBuf, rPat.getLength() - nPat, ' '); - OUString aStr = aBuf.makeStringAndClear(); - bOk = (rPat.indexOf( aStr, nPat) == nPat); + bOk = (rPat.indexOf( aBuf, nPat) == nPat); if (bOk) { - nPat += aStr.getLength() - 1; + nPat += aBuf.getLength() - 1; } } } @@ -1551,7 +1550,7 @@ bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_I OUStringBuffer aBuf(sStrArray[nNext]); aBuf.stripEnd(); padToLength(aBuf, rPat.getLength() - nPat, ' '); - bOk = (rPat.indexOf( aBuf.makeStringAndClear(), nPat) == nPat); + bOk = (rPat.indexOf(aBuf, nPat) == nPat); } if (bOk) { |