[1/4] mlang: Move CodePageToCodePages() to IMLangFontLink2 and forward to it
Nikolay Sivov
nsivov at codeweavers.com
Mon Oct 1 00:40:07 CDT 2012
Move CodePageToCodePages() to IMLangFontLink2 and forward to it
-------------- next part --------------
>From 2d9fce3b838f10b461f8771e2b2548ea123c47e1 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun, 30 Sep 2012 09:25:50 +0400
Subject: [PATCH 1/9] Move CodePageToCodePages() to IMLangFontLink2 and forward to it
---
dlls/mlang/mlang.c | 47 +++++++++++++++++++++++------------------------
1 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index 325828a..bcd3b11 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -1895,27 +1895,11 @@ static HRESULT WINAPI fnIMLangFontLink_GetStrCodePages(
static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages(
IMLangFontLink* iface,
- UINT uCodePage,
- DWORD* pdwCodePages)
+ UINT codepage,
+ DWORD* codepages)
{
MLang_impl *This = impl_from_IMLangFontLink( iface );
- CHARSETINFO cs;
- BOOL rc;
-
- TRACE("(%p) Seeking %u\n",This, uCodePage);
-
- rc = TranslateCharsetInfo((DWORD*)(DWORD_PTR)uCodePage, &cs, TCI_SRCCODEPAGE);
-
- if (rc)
- {
- *pdwCodePages = cs.fs.fsCsb[0];
- TRACE("resulting CodePages 0x%x\n",*pdwCodePages);
- return S_OK;
- }
-
- TRACE("CodePage Not Found\n");
- *pdwCodePages = 0;
- return E_FAIL;
+ return IMLangFontLink2_CodePageToCodePages(&This->IMLangFontLink2_iface, codepage, codepages);
}
static HRESULT WINAPI fnIMLangFontLink_CodePagesToCodePage(
@@ -3211,12 +3195,27 @@ static HRESULT WINAPI fnIMLangFontLink2_GetStrCodePages( IMLangFontLink2* This,
pszSrc, cchSrc, dwPriorityCodePages, pdwCodePages, pcchCodePages);
}
-static HRESULT WINAPI fnIMLangFontLink2_CodePageToCodePages(IMLangFontLink2* This,
- UINT uCodePage,
- DWORD *pdwCodePages)
+static HRESULT WINAPI fnIMLangFontLink2_CodePageToCodePages(IMLangFontLink2* iface,
+ UINT codepage,
+ DWORD *codepages)
{
- FIXME("(%p)->%i %p\n",This, uCodePage, pdwCodePages);
- return E_NOTIMPL;
+ MLang_impl *This = impl_from_IMLangFontLink2(iface);
+ CHARSETINFO cs;
+ BOOL rc;
+
+ TRACE("(%p)->(%u %p)\n", This, codepage, codepages);
+
+ rc = TranslateCharsetInfo((DWORD*)(DWORD_PTR)codepage, &cs, TCI_SRCCODEPAGE);
+ if (rc)
+ {
+ *codepages = cs.fs.fsCsb[0];
+ TRACE("resulting codepages 0x%x\n", *codepages);
+ return S_OK;
+ }
+
+ TRACE("codepage not found\n");
+ *codepages = 0;
+ return E_FAIL;
}
static HRESULT WINAPI fnIMLangFontLink2_CodePagesToCodePage(IMLangFontLink2* iface,
--
1.5.6.5
More information about the wine-patches
mailing list