Commit 72ef3679 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

riched20: Implement GetLanguageID().

parent 1e68433d
...@@ -221,6 +221,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te ...@@ -221,6 +221,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te
case FONT_BOLD: case FONT_BOLD:
case FONT_FORECOLOR: case FONT_FORECOLOR:
case FONT_ITALIC: case FONT_ITALIC:
case FONT_LANGID:
case FONT_STRIKETHROUGH: case FONT_STRIKETHROUGH:
case FONT_SUBSCRIPT: case FONT_SUBSCRIPT:
case FONT_SUPERSCRIPT: case FONT_SUPERSCRIPT:
...@@ -241,6 +242,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo ...@@ -241,6 +242,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo
case FONT_BOLD: case FONT_BOLD:
case FONT_FORECOLOR: case FONT_FORECOLOR:
case FONT_ITALIC: case FONT_ITALIC:
case FONT_LANGID:
case FONT_STRIKETHROUGH: case FONT_STRIKETHROUGH:
case FONT_SUBSCRIPT: case FONT_SUBSCRIPT:
case FONT_SUPERSCRIPT: case FONT_SUPERSCRIPT:
...@@ -283,6 +285,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, ...@@ -283,6 +285,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos,
case FONT_ITALIC: case FONT_ITALIC:
value->l = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse; value->l = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse;
break; break;
case FONT_LANGID:
value->l = fmt.lcid;
break;
case FONT_SIZE: case FONT_SIZE:
value->f = fmt.yHeight; value->f = fmt.yHeight;
break; break;
...@@ -1958,8 +1963,8 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value) ...@@ -1958,8 +1963,8 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value)
static HRESULT WINAPI TextFont_GetLanguageID(ITextFont *iface, LONG *value) static HRESULT WINAPI TextFont_GetLanguageID(ITextFont *iface, LONG *value)
{ {
ITextFontImpl *This = impl_from_ITextFont(iface); ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value); TRACE("(%p)->(%p)\n", This, value);
return E_NOTIMPL; return get_textfont_propl(This->range, FONT_LANGID, value);
} }
static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value) static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value)
......
...@@ -1272,6 +1272,13 @@ static void test_GetFont(void) ...@@ -1272,6 +1272,13 @@ static void test_GetFont(void)
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
ok(size > 0.0, "size %.2f\n", size); 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 */ /* range is non-italic */
value = tomTrue; value = tomTrue;
hr = ITextFont_GetItalic(font, &value); hr = ITextFont_GetItalic(font, &value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment