summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2014-04-25 12:09:52 +0200
committerLászló Németh <nemeth@numbertext.org>2014-04-25 12:13:33 +0200
commit5e4b21e2d627de0c815370ed886ff95675bf28d1 (patch)
treef4f4bf91c93af4889c8a211441299ce670561cd6 /lingucomponent
parentfe075edc27a1fc301c31cfdff5ddbc83e52d929f (diff)
fdo#48017 fix WIN32 long path name support of spelling dictionaries
Change-Id: I1ccaae9dba4f82cd50531890e159519a765a0fff
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 1622e1d87da1..a58885b927b8 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -300,16 +300,17 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
OUString aff;
osl::FileBase::getSystemPathFromFileURL(dicpath,dict);
osl::FileBase::getSystemPathFromFileURL(affpath,aff);
- OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
- OString aTmpdict(OU2ENC(dict,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.
- aTmpaff = Win_GetShortPathName( aff );
- aTmpdict = Win_GetShortPathName( dict );
+ // using dictionaries as extensions. (Hunspell waits UTF-8 encoded
+ // path with \\?\ long path prefix.)
+ OString aTmpaff = OUStringToOString(aff, RTL_TEXTENCODING_UTF8));
+ OString aTmpdict = OUStringToOString(dict, RTL_TEXTENCODING_UTF8));
+#else
+ OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
+ OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
#endif
aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr());