diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-14 14:29:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-17 10:39:11 +0200 |
commit | 425255567eafffba3a5817fb96050663d1db8e2f (patch) | |
tree | d4f78a9103c34367b2aa29feb31faf4e6871d01e /lingucomponent | |
parent | 6125be0aa10113d840a1fdbe33cf3174d5896fcb (diff) |
use more string_view
Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/lingutil/lingutil.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index f0ab84026174..5e931f894ad2 100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx @@ -63,7 +63,7 @@ OString Win_AddLongPathPrefix( const OString &rPathName ) // find old style dictionaries in system directories static void GetOldStyleDicsInDir( OUString const & aSystemDir, OUString const & aFormatName, - OUString const & aSystemSuffix, OUString const & aSystemPrefix, + std::u16string_view aSystemSuffix, std::u16string_view aSystemPrefix, std::set< OUString >& aDicLangInUse, std::vector< SvtLinguConfigDictionaryEntry >& aRes ) { @@ -82,9 +82,9 @@ static void GetOldStyleDicsInDir( sal_Int32 nStartIndex = sPath.lastIndexOf('/') + 1; if (!sPath.match(aSystemPrefix, nStartIndex)) continue; - OUString sChunk = sPath.copy(nStartIndex + aSystemPrefix.getLength(), - sPath.getLength() - aSystemSuffix.getLength() - - nStartIndex - aSystemPrefix.getLength()); + OUString sChunk = sPath.copy(nStartIndex + aSystemPrefix.size(), + sPath.getLength() - aSystemSuffix.size() - + nStartIndex - aSystemPrefix.size()); if (sChunk.isEmpty()) continue; |