summaryrefslogtreecommitdiff
path: root/lingucomponent/source/languageguessing/guesslang.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent/source/languageguessing/guesslang.cxx')
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index 560f883e1c55..f04e0b3956d5 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -18,6 +18,7 @@
*/
#include <iostream>
+#include <string_view>
#include <osl/file.hxx>
#include <tools/debug.hxx>
@@ -91,7 +92,7 @@ public:
// implementation specific
/// @throws RuntimeException
- void SetFingerPrintsDB( const OUString &fileName );
+ void SetFingerPrintsDB( std::u16string_view fileName );
};
}
@@ -165,7 +166,7 @@ Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
if (nStartPos < 0 || nLen < 0 || nStartPos + nLen > rText.getLength())
throw lang::IllegalArgumentException();
- OString o( OUStringToOString( rText.copy(nStartPos, nLen), RTL_TEXTENCODING_UTF8 ) );
+ OString o( OUStringToOString( rText.subView(nStartPos, nLen), RTL_TEXTENCODING_UTF8 ) );
Guess g = m_aGuesser.GuessPrimaryLanguage(o.getStr());
lang::Locale aRes;
aRes.Language = OUString::createFromAscii( g.GetLanguage().c_str() );
@@ -176,7 +177,7 @@ Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
#define DEFAULT_CONF_FILE_NAME "fpdb.conf"
void LangGuess_Impl::SetFingerPrintsDB(
- const OUString &filePath )
+ std::u16string_view filePath )
{
//! text encoding for file name / path needs to be in the same encoding the OS uses
OString path = OUStringToOString( filePath, osl_getThreadTextEncoding() );