Module: wine Branch: master Commit: 72ef367992e4c9c39bdd9b13fb019a2ad9ec544c URL: http://source.winehq.org/git/wine.git/?a=commit;h=72ef367992e4c9c39bdd9b13fb...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed May 20 11:18:52 2015 +0300
riched20: Implement GetLanguageID().
---
dlls/riched20/richole.c | 9 +++++++-- dlls/riched20/tests/richole.c | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index e4136b0..1fbbc0a 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -221,6 +221,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te case FONT_BOLD: case FONT_FORECOLOR: case FONT_ITALIC: + case FONT_LANGID: case FONT_STRIKETHROUGH: case FONT_SUBSCRIPT: case FONT_SUPERSCRIPT: @@ -241,6 +242,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo case FONT_BOLD: case FONT_FORECOLOR: case FONT_ITALIC: + case FONT_LANGID: case FONT_STRIKETHROUGH: case FONT_SUBSCRIPT: case FONT_SUPERSCRIPT: @@ -283,6 +285,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, case FONT_ITALIC: value->l = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse; break; + case FONT_LANGID: + value->l = fmt.lcid; + break; case FONT_SIZE: value->f = fmt.yHeight; break; @@ -1958,8 +1963,8 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value) static HRESULT WINAPI TextFont_GetLanguageID(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_LANGID, value); }
static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index a85f485..6ff2fe3 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -1272,6 +1272,13 @@ static void test_GetFont(void) ok(hr == S_OK, "got 0x%08x\n", hr); ok(size > 0.0, "size %.2f\n", size);
+ value = 0; + hr = ITextFont_GetLanguageID(font, &value); + ok(hr == S_OK, "got 0x%08x\n", hr); +todo_wine + ok(value == GetUserDefaultLCID(), "got lcid %x, user lcid %x\n", value, + GetUserDefaultLCID()); + /* range is non-italic */ value = tomTrue; hr = ITextFont_GetItalic(font, &value);