diff options
Diffstat (limited to 'libwps/libwps-0.2.1.patch')
-rw-r--r-- | libwps/libwps-0.2.1.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libwps/libwps-0.2.1.patch b/libwps/libwps-0.2.1.patch new file mode 100644 index 000000000000..a70812dd568a --- /dev/null +++ b/libwps/libwps-0.2.1.patch @@ -0,0 +1,28 @@ +--- misc/libwps-0.2.1/src/lib/libwps_internal.cpp 2011-04-04 21:53:42.000000000 +0200 ++++ misc/build/libwps-0.2.1/src/lib/libwps_internal.cpp 2011-05-03 14:50:56.146147538 +0200 +@@ -79,18 +79,15 @@ + {0x419,"ru-RU"} + }; + +-static int _ltcomp(const void *k1, const void *k2) +-{ +- int r = (int)((ssize_t)k1) - ((_lange*)k2)->id; +- return r; +-} +- + std::string getLangFromLCID(uint32_t lcid) + { +- _lange *c = (_lange*) bsearch((const void*)lcid,s_lang_table, +- sizeof(s_lang_table)/sizeof(_lange), +- sizeof(_lange),_ltcomp); +- if (c) return c->name; ++ unsigned i = 0; ++ ++ for (i=0; i < sizeof(s_lang_table)/sizeof(s_lang_table[0]); i++) ++ { ++ if (s_lang_table[i].id == lcid) ++ return s_lang_table[i].name; ++ } + return "-none-"; + } + |