summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-24 11:37:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-24 18:04:50 +0200
commit5c1561561a859c561fb2321420f1abb7f1cedde3 (patch)
tree7a96cf8b32bd4c088298df3c4067f0d81f549057 /lingucomponent
parent5e6d8efbf3fb456ca370df04b21d2e340d9831ad (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')
-rw-r--r--lingucomponent/source/lingutil/lingutil.hxx2
-rw-r--r--lingucomponent/source/numbertext/numbertext.cxx6
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx6
3 files changed, 7 insertions, 7 deletions
diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx
index 4c4fe15ec47f..687c41482780 100644
--- a/lingucomponent/source/lingutil/lingutil.hxx
+++ b/lingucomponent/source/lingutil/lingutil.hxx
@@ -26,7 +26,7 @@
#define OU2ENC(rtlOUString, rtlEncoding) \
OString((rtlOUString).getStr(), (rtlOUString).getLength(), \
- rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr()
+ rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK)
struct SvtLinguConfigDictionaryEntry;
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));
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 506d2c9dd014..193ddb2c32cb 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -332,7 +332,7 @@ sal_Int16 SpellChecker::GetSpellFailure(const OUString &rWord, const Locale &rLo
OString aWrd(OU2ENC(nWord,eEnc));
#if defined(H_DEPRECATED)
- bool bVal = pMS->spell(std::string(aWrd.getStr()), &rInfo);
+ bool bVal = pMS->spell(std::string(aWrd), &rInfo);
#else
bool bVal = pMS->spell(aWrd.getStr(), &rInfo) != 0;
#endif
@@ -355,7 +355,7 @@ sal_Int16 SpellChecker::GetSpellFailure(const OUString &rWord, const Locale &rLo
OUString aWord(aBuf.makeStringAndClear());
OString bWrd(OU2ENC(aWord, eEnc));
#if defined(H_DEPRECATED)
- bVal = pMS->spell(std::string(bWrd.getStr()), &rInfo);
+ bVal = pMS->spell(std::string(bWrd), &rInfo);
#else
bVal = pMS->spell(bWrd.getStr(), &rInfo) != 0;
#endif
@@ -472,7 +472,7 @@ Reference< XSpellAlternatives >
{
OString aWrd(OU2ENC(nWord,eEnc));
#if defined(H_DEPRECATED)
- std::vector<std::string> suglst = pMS->suggest(std::string(aWrd.getStr()));
+ std::vector<std::string> suglst = pMS->suggest(std::string(aWrd));
if (!suglst.empty())
{
aStr.realloc(numsug + suglst.size());