[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - external/hunspell external/hyphen external/mythes
László Németh
nemeth at numbertext.org
Mon Aug 4 04:38:31 PDT 2014
external/hunspell/hunspell-fdo48017-wfopen.patch | 9 +++++++--
external/hyphen/hyphen-fdo48017-wfopen.patch | 12 ++++++++----
external/mythes/mythes-fdo48017-wfopen.patch | 9 +++++++--
3 files changed, 22 insertions(+), 8 deletions(-)
New commits:
commit 9548c4ab5db6889ee91f01a8207bf4009d623f9f
Author: László Németh <nemeth at numbertext.org>
Date: Sat Jul 19 03:44:07 2014 +0200
fdo#80363 add _wfullpath to expand ".." in dictionary paths
Change-Id: I6c9edd0b4d2c63f7735d090e5d2d72d5fb81b921
Reviewed-on: https://gerrit.libreoffice.org/10400
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit 7efd83bb29ef8be8c78c4da5452fe3293ed15ea4)
Reviewed-on: https://gerrit.libreoffice.org/10405
(cherry picked from commit 24e9950f68ca57c454dbb35cf8562d82e76a42e7)
combined with
fdo#80363 _wfullpath in MyThes and Hyphen
(cherry picked from commit 0ad283adb51b3a1bb777e6341e61541d4bffaa44)
(cherry picked from commit 45e4cdcc66d01a987c4edc715cb4cf083868b5ff)
diff --git a/external/hunspell/hunspell-fdo48017-wfopen.patch b/external/hunspell/hunspell-fdo48017-wfopen.patch
index 47b803b..37203be 100644
--- a/external/hunspell/hunspell-fdo48017-wfopen.patch
+++ b/external/hunspell/hunspell-fdo48017-wfopen.patch
@@ -13,7 +13,7 @@ diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
#ifdef OPENOFFICEORG
# include <unicode/uchar.h>
#else
-@@ -46,6 +50,21 @@
+@@ -51,6 +51,26 @@
static struct unicode_info2 * utf_tbl = NULL;
static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances
@@ -23,9 +23,14 @@ diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
+ if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
+ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
+ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
++ wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
++ FILE * f = NULL;
+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
-+ FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ if (_wfullpath( buff2, buff, len ) != NULL) {
++ f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ }
+ free(buff);
++ free(buff2);
+ return f;
+ }
+#endif
diff --git a/external/hyphen/hyphen-fdo48017-wfopen.patch b/external/hyphen/hyphen-fdo48017-wfopen.patch
index 27cffa0..e99a891 100644
--- a/external/hyphen/hyphen-fdo48017-wfopen.patch
+++ b/external/hyphen/hyphen-fdo48017-wfopen.patch
@@ -13,7 +13,7 @@ diff -u hyphen/hyphen.c build/hyphen/hyphen.c
#define noVERBOSE
/* calculate hyphenmin values with long ligature length (2 or 3 characters
-@@ -371,6 +376,22 @@
+@@ -371,6 +376,26 @@
}
}
@@ -23,10 +23,14 @@ diff -u hyphen/hyphen.c build/hyphen/hyphen.c
+ if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
+ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
+ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
-+ FILE * f;
++ wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
++ FILE * f = NULL;
+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
-+ f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ if (_wfullpath( buff2, buff, len ) != NULL) {
++ f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ }
+ free(buff);
++ free(buff2);
+ return f;
+ }
+#endif
@@ -36,7 +40,7 @@ diff -u hyphen/hyphen.c build/hyphen/hyphen.c
HyphenDict *
hnj_hyphen_load (const char *fn)
{
-@@ -383,7 +404,7 @@
+@@ -383,7 +408,7 @@
HashEntry *e;
int state_num = 0;
diff --git a/external/mythes/mythes-fdo48017-wfopen.patch b/external/mythes/mythes-fdo48017-wfopen.patch
index 1621b1d..82d69ad 100644
--- a/external/mythes/mythes-fdo48017-wfopen.patch
+++ b/external/mythes/mythes-fdo48017-wfopen.patch
@@ -31,7 +31,7 @@ diff -u mythes/mythes.cxx build/mythes/mythes.cxx
if (!pdfile) {
return 0;
}
-@@ -370,3 +375,17 @@
+@@ -373,3 +378,22 @@
return -1;
}
@@ -41,9 +41,14 @@ diff -u mythes/mythes.cxx build/mythes/mythes.cxx
+ if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
+ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
+ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
++ wchar_t *buff2 = (wchar_t *) malloc(len * sizeof(wchar_t));
++ FILE * f = NULL;
+ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
-+ FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ if (_wfullpath( buff2, buff, len ) != NULL) {
++ f = _wfopen(buff2, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ }
+ free(buff);
++ free(buff2);
+ return f;
+ }
+#endif
More information about the Libreoffice-commits
mailing list