diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-24 11:37:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-24 18:04:50 +0200 |
commit | 5c1561561a859c561fb2321420f1abb7f1cedde3 (patch) | |
tree | 7a96cf8b32bd4c088298df3c4067f0d81f549057 /lingucomponent/source/numbertext/numbertext.cxx | |
parent | 5e6d8efbf3fb456ca370df04b21d2e340d9831ad (diff) |
loplugin:unnecessarygetstr extend to more std::string checking
suggested by mike kaganski
Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent/source/numbertext/numbertext.cxx')
-rw-r--r-- | lingucomponent/source/numbertext/numbertext.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx index aec03e1f5e8e..b87b2cc5fc1e 100644 --- a/lingucomponent/source/numbertext/numbertext.cxx +++ b/lingucomponent/source/numbertext/numbertext.cxx @@ -102,7 +102,7 @@ void NumberText_Impl::EnsureInitialized() const rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); #endif OString path = OUStringToOString(aPhysPath, eEnc); - m_aNumberText.set_prefix(path.getStr()); + m_aNumberText.set_prefix(std::string(path)); } OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale& rLocale) @@ -123,9 +123,9 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo std::wstring sResult(o3tl::toW(rText.getStr())); #else OString aInput(OUStringToOString(rText, RTL_TEXTENCODING_UTF8)); - std::wstring sResult = Numbertext::string2wstring(aInput.getStr()); + std::wstring sResult = Numbertext::string2wstring(std::string(aInput)); #endif - bool result = m_aNumberText.numbertext(sResult, aLangCode.getStr()); + bool result = m_aNumberText.numbertext(sResult, std::string(aLangCode)); DBG_ASSERT(result, "numbertext: false"); #if defined(_WIN32) OUString aResult(o3tl::toU(sResult)); |