From 425255567eafffba3a5817fb96050663d1db8e2f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 14 Oct 2022 14:29:51 +0200 Subject: use more string_view Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369 Tested-by: Jenkins Reviewed-by: Noel Grandin --- lingucomponent/source/lingutil/lingutil.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lingucomponent') 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; -- cgit