diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-04-18 21:12:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-19 12:11:43 +0200 |
commit | c7428c607c021f361973f0b1fd9e0dcaf45fa932 (patch) | |
tree | 790100c5dddb7aeb8c75b49c2eee0f2c31329a8d /l10ntools/source | |
parent | a11y tests show we should use GetOutputDevice for pixel/logic conversions (diff) | |
download | core-c7428c607c021f361973f0b1fd9e0dcaf45fa932.tar.gz core-c7428c607c021f361973f0b1fd9e0dcaf45fa932.zip |
use more string_view in OString API
some parts of the OString seem to have fallen behind
its more popular sibling OUString.
Change-Id: Ie6d64c3005b2df5da49ba79d0c38282dd5057a23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114252
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/helper.cxx | 2 | ||||
-rw-r--r-- | l10ntools/source/localize.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/l10ntools/source/helper.cxx b/l10ntools/source/helper.cxx index 2dce070b90fc..767c04eb5152 100644 --- a/l10ntools/source/helper.cxx +++ b/l10ntools/source/helper.cxx @@ -44,7 +44,7 @@ OString unEscapeAll( { if( rText[nIndex] == '\\' && nIndex+1 < nLength ) { - sal_Int32 nEscapedOne = rEscaped.indexOf(rText.copy(nIndex,2)); + sal_Int32 nEscapedOne = rEscaped.indexOf(rText.subView(nIndex,2)); if( nEscapedOne != -1 ) { sReturn.append(rUnEscaped[nEscapedOne/2]); diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 47cc132fd8c3..38e9c21f3cac 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -118,7 +118,7 @@ void handleCommand( } void InitPoFile( - const OString& rProject, const OString& rInPath, + std::string_view rProject, const OString& rInPath, const OString& rPotDir, const OString& rOutPath ) { //Create directory for po file @@ -176,7 +176,7 @@ bool fileExists(const OString& fileName) OString gDestRoot; -bool handleFile(const OString& rProject, const OUString& rUrl, const OString& rPotDir) +bool handleFile(std::string_view rProject, const OUString& rUrl, const OString& rPotDir) { struct Command { std::u16string_view extension; @@ -281,7 +281,7 @@ bool handleFile(const OString& rProject, const OUString& rUrl, const OString& rP } void handleFilesOfDir( - std::vector<OUString>& aFiles, const OString& rProject, + std::vector<OUString>& aFiles, std::string_view rProject, const OString& rPotDir ) { ///Handle files in lexical order |