From 0874c7be151a420226d7c3f06ebdad2f0c1b3513 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 15 Jan 2016 00:24:24 +0300 Subject: [PATCH] dwrite: Store locale name range attribute in lower case. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/dwrite/layout.c | 4 +++- dlls/dwrite/tests/layout.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 95568272a38..57c8ddc473e 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -2158,8 +2158,10 @@ static BOOL set_layout_range_attrval(struct layout_range_header *h, enum layout_ break; case LAYOUT_RANGE_ATTR_LOCALE: changed = strcmpiW(dest->locale, value->u.locale) != 0; - if (changed) + if (changed) { strcpyW(dest->locale, value->u.locale); + strlwrW(dest->locale); + } break; case LAYOUT_RANGE_ATTR_FONTFAMILY: changed = strcmpW(dest->fontfamily, value->u.fontfamily) != 0; diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index 919e6e9399a..c112ebdb565 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -2097,7 +2097,6 @@ if (0) /* crashes on native */ range.length = 0; hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, sizeof(buffW)/sizeof(WCHAR), &range); ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW)); ok((range.startPosition == 0 && range.length == ~0u) || broken(range.startPosition == 0 && range.length == 4) /* vista/win7 */, "got %u,%u\n", range.startPosition, range.length); @@ -2107,7 +2106,6 @@ todo_wine range.length = 0; hr = IDWriteTextLayout_GetLocaleName(layout, 100, buffW, sizeof(buffW)/sizeof(WCHAR), &range); ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW)); ok((range.startPosition == 0 && range.length == ~0u) || broken(range.startPosition == 4 && range.length == ~0u-4) /* vista/win7 */, "got %u,%u\n", range.startPosition, range.length); @@ -4418,7 +4416,7 @@ todo_wine flush_sequence(sequences, RENDERER_ID); hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0f, 0.0f); ok(hr == S_OK, "got 0x%08x\n", hr); - ok_sequence(sequences, RENDERER_ID, drawunderline3_seq, "draw underline test 2", TRUE); + ok_sequence(sequences, RENDERER_ID, drawunderline3_seq, "draw underline test 2", FALSE); IDWriteTextLayout_Release(layout);