diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-07 17:53:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-09 16:28:13 +0200 |
commit | 3fbadf2801f4c13f086d76a3ed566180cc0693dc (patch) | |
tree | 6ec41f5a137122ce803bb4aa82d2548fe60e337b /connectivity | |
parent | f707834e8538c0a183716b26ebdf04381482ca6d (diff) |
use more OUStringToOString
which makes it easier to pass around string_view in a few places.
Change-Id: Icbbb7f56494986582f1c3272404775bd98031240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/dbcharset.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index 9e0b9ac2dd07..381afa606e08 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -93,15 +93,15 @@ namespace dbtools } - OCharsetMap::CharsetIterator OCharsetMap::findIanaName(const OUString& _rIanaName) const + OCharsetMap::CharsetIterator OCharsetMap::findIanaName(std::u16string_view _rIanaName) const { ensureConstructed( ); rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW; - if ( !_rIanaName.isEmpty() ) + if ( !_rIanaName.empty() ) { // byte string conversion - OString sMimeByteString( _rIanaName.getStr(), _rIanaName.getLength(), RTL_TEXTENCODING_ASCII_US ); + OString sMimeByteString = OUStringToOString( _rIanaName, RTL_TEXTENCODING_ASCII_US ); // look up eEncoding = rtl_getTextEncodingFromMimeCharset( sMimeByteString.getStr() ); |