Module: wine Branch: master Commit: ed42bf08dbd5077adf0db2ea6468f7f27cd9c418 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ed42bf08dbd5077adf0db2ea64...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Sep 24 01:15:11 2012 +0400
mlang: Store source and destination codepage ids in IMLangConvertCharset_Initialize.
---
dlls/mlang/mlang.c | 15 +++++++++++++-- include/mlang.idl | 11 +++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index b5fd0eb..388b99c 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -3563,6 +3563,9 @@ static const IMLangLineBreakConsoleVtbl IMLangLineBreakConsole_vtbl = struct convert_charset { IMLangConvertCharset IMLangConvertCharset_iface; LONG ref; + + UINT src_cp; + UINT dst_cp; };
static inline struct convert_charset *impl_from_IMLangConvertCharset(IMLangConvertCharset *iface) @@ -3614,8 +3617,16 @@ static HRESULT WINAPI MLangConvertCharset_Initialize(IMLangConvertCharset *iface UINT src_cp, UINT dst_cp, DWORD prop) { struct convert_charset *This = impl_from_IMLangConvertCharset(iface); - FIXME("(%p)->(%u %u 0x%08x): stub\n", This, src_cp, dst_cp, prop); - return E_NOTIMPL; + + TRACE("(%p)->(%u %u 0x%08x)\n", This, src_cp, dst_cp, prop); + + if (prop) + FIXME("property 0x%08x not supported\n", prop); + + This->src_cp = src_cp; + This->dst_cp = dst_cp; + + return S_OK; }
static HRESULT WINAPI MLangConvertCharset_GetSourceCodePage(IMLangConvertCharset *iface, UINT *src_cp) diff --git a/include/mlang.idl b/include/mlang.idl index 7cdc970..e153565 100644 --- a/include/mlang.idl +++ b/include/mlang.idl @@ -375,6 +375,17 @@ interface IEnumCodePage : IUnknown ] interface IMLangConvertCharset : IUnknown { + typedef enum tagMLCONVCHARF + { + MLCONVCHARF_AUTODETECT = 1, + MLCONVCHARF_ENTITIZE = 2, + MLCONVCHARF_NCR_ENTITIZE = 2, + MLCONVCHARF_NAME_ENTITIZE = 4, + MLCONVCHARF_USEDEFCHAR = 8, + MLCONVCHARF_NOBESTFITCHARS = 16, + MLCONVCHARF_DETECTJPN = 32 + } MLCONVCHAR; + HRESULT Initialize( [in] UINT uiSrcCodePage, [in] UINT uiDstCodePage,