diff options
author | László Németh <nemeth@numbertext.org> | 2014-05-22 12:27:44 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2014-05-23 01:06:50 +0200 |
commit | 6d06aa8ba83b7629603cd86cf14a63c432ce268f (patch) | |
tree | b5dee722f6f43f1acb20af35534b37d20df8fee7 /lingucomponent/source/thesaurus/libnth/nthesimp.cxx | |
parent | 7818974103fcdf16e03354f62a4165eedea4427c (diff) |
fdo#48017 WIN32 long path support in Hyphen and MyThes
Change-Id: Ifb068efb553ed24a7caf65dbab28726bdeced0e6
Diffstat (limited to 'lingucomponent/source/thesaurus/libnth/nthesimp.cxx')
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 679aba9a0a95..73d05426e8c3 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -328,16 +328,14 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes OUString nidx; osl::FileBase::getSystemPathFromFileURL(datpath,ndat); osl::FileBase::getSystemPathFromFileURL(idxpath,nidx); - OString aTmpidx(OU2ENC(nidx,osl_getThreadTextEncoding())); - OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding())); #if defined(WNT) - // workaround for Windows specific problem that the - // path length in calls to 'fopen' is limted to somewhat - // about 120+ characters which will usually be exceed when - // using dictionaries as extensions. - aTmpidx = Win_GetShortPathName( nidx ); - aTmpdat = Win_GetShortPathName( ndat ); + // MyThes waits UTF-8 encoded paths with \\?\ long path prefix. + OString aTmpidx = OUStringToOString(nidx, RTL_TEXTENCODING_UTF8); + OString aTmpdat = OUStringToOString(ndat, RTL_TEXTENCODING_UTF8); +#else + OString aTmpidx(OU2ENC(nidx,osl_getThreadTextEncoding())); + OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding())); #endif aThes[i] = new MyThes(aTmpidx.getStr(),aTmpdat.getStr()); |