Vitaly Perov : mlang: Add implementation of fnIMLangFontLink_GetCharCodePages.

Alexandre Julliard julliard at winehq.org
Fri Nov 28 07:16:40 CST 2008


Module: wine
Branch: master
Commit: 4398c51f1eca9055d6b88d35bdafcbe9d9a5c789
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4398c51f1eca9055d6b88d35bdafcbe9d9a5c789

Author: Vitaly Perov <vitperov at etersoft.ru>
Date:   Thu Nov 27 21:28:49 2008 +0300

mlang: Add implementation of fnIMLangFontLink_GetCharCodePages.

---

 dlls/mlang/mlang.c |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index 36ecea0..2365b09 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -1853,8 +1853,27 @@ static HRESULT WINAPI fnIMLangFontLink_GetCharCodePages(
         WCHAR chSrc,
         DWORD* pdwCodePages)
 {
-    FIXME("\n");
-    return E_NOTIMPL;
+    int i;
+    CHAR buf;
+    BOOL used_dc;
+    DWORD codePages;
+
+    *pdwCodePages = 0;
+
+    for (i = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++)
+    {
+        WideCharToMultiByte(mlang_data[i].family_codepage, WC_NO_BEST_FIT_CHARS,
+            &chSrc, 1, &buf, 1, NULL, &used_dc);
+
+        /* If default char is not used, current codepage include the given symbol */
+        if (!used_dc)
+        {
+            IMLangFontLink_CodePageToCodePages(iface,
+                mlang_data[i].family_codepage, &codePages);
+            *pdwCodePages |= codePages;
+        }
+    }
+    return S_OK;
 }
 
 static HRESULT WINAPI fnIMLangFontLink_GetStrCodePages(




More information about the wine-cvs mailing list