summaryrefslogtreecommitdiff
path: root/helpcompiler/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-22 11:09:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-22 14:24:32 +0100
commitc5ecf24413625adf9234c67b5da431eb72b3612e (patch)
treefda0ed7e7b914e41a1c5dfabd99727a07dca253b /helpcompiler/inc
parentb587072aeae0670758b517d26fe0cb1fdda6a3b6 (diff)
fs::getThreadTextEncoding->osl_getThreadTextEncoding
Change-Id: I803f21dba239073cf07dc853f400adeac3256856 Reviewed-on: https://gerrit.libreoffice.org/83467 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'helpcompiler/inc')
-rw-r--r--helpcompiler/inc/HelpCompiler.hxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index 49a22205cae7..87390aeedc7e 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -34,6 +34,7 @@
#include <rtl/character.hxx>
#include <osl/process.h>
#include <osl/file.hxx>
+#include <osl/thread.h>
#include <o3tl/char16_t2wchar_t.hxx>
#include <helpcompiler/compilehelp.hxx>
@@ -47,8 +48,6 @@
namespace fs
{
- rtl_TextEncoding getThreadTextEncoding();
-
enum convert { native };
class path
{
@@ -61,20 +60,20 @@ namespace fs
OUString sWorkingDir;
osl_getProcessWorkingDir(&sWorkingDir.pData);
OString tmp(in.c_str());
- OUString ustrSystemPath(OStringToOUString(tmp, getThreadTextEncoding()));
+ OUString ustrSystemPath(OStringToOUString(tmp, osl_getThreadTextEncoding()));
osl::File::getFileURLFromSystemPath(ustrSystemPath, data);
(void)osl::File::getAbsoluteFileURL(sWorkingDir, data, data);
}
path(const std::string &FileURL)
{
OString tmp(FileURL.c_str());
- data = OStringToOUString(tmp, getThreadTextEncoding());
+ data = OStringToOUString(tmp, osl_getThreadTextEncoding());
}
std::string native_file_string() const
{
OUString ustrSystemPath;
osl::File::getSystemPathFromFileURL(data, ustrSystemPath);
- OString tmp(OUStringToOString(ustrSystemPath, getThreadTextEncoding()));
+ OString tmp(OUStringToOString(ustrSystemPath, osl_getThreadTextEncoding()));
HCDBG(std::cerr << "native_file_string is " << tmp.getStr() << std::endl);
return std::string(tmp.getStr());
}
@@ -98,7 +97,7 @@ namespace fs
HCDBG(std::cerr << "orig was " <<
OUStringToOString(ret.data, RTL_TEXTENCODING_UTF8).getStr() << std::endl);
OString tmp(in.c_str());
- OUString ustrSystemPath(OStringToOUString(tmp, getThreadTextEncoding()));
+ OUString ustrSystemPath(OStringToOUString(tmp, osl_getThreadTextEncoding()));
ret.data += "/" + ustrSystemPath;
HCDBG(std::cerr << "final is " <<
OUStringToOString(ret.data, RTL_TEXTENCODING_UTF8).getStr() << std::endl);
@@ -107,7 +106,7 @@ namespace fs
void append(const char *in)
{
OString tmp(in);
- OUString ustrSystemPath(OStringToOUString(tmp, getThreadTextEncoding()));
+ OUString ustrSystemPath(OStringToOUString(tmp, osl_getThreadTextEncoding()));
data += ustrSystemPath;
}
void append(const std::string &in) { append(in.c_str()); }