mirror of
https://github.com/reactos/wine.git
synced 2024-12-02 00:36:43 +00:00
oleaut32: Fix OLEFontImpl_SetRatio return when either cyLogical or cyHimetric are 0.
This commit is contained in:
parent
ba2ce9db49
commit
00aeadc6b6
@ -1083,7 +1083,7 @@ static HRESULT WINAPI OLEFontImpl_SetRatio(
|
||||
TRACE("(%p)->(%d, %d)\n", this, cyLogical, cyHimetric);
|
||||
|
||||
if(cyLogical == 0 || cyHimetric == 0)
|
||||
return E_INVALIDARG;
|
||||
return E_FAIL;
|
||||
|
||||
/* cyLogical and cyHimetric both set to 1 is a special case that
|
||||
does not change the scaling but also does not fail */
|
||||
|
@ -88,13 +88,10 @@ static void test_ifont_size(LONG lo_size, LONG hi_size,
|
||||
test_name, hres);
|
||||
ok(pvObj != NULL,"%s: OCFI returns NULL.\n", test_name);
|
||||
|
||||
/* If scaling ration specified, change ratio. */
|
||||
if(ratio_logical && ratio_himetric)
|
||||
{
|
||||
hres = IFont_SetRatio(ifnt, ratio_logical, ratio_himetric);
|
||||
ok(hres == S_OK,"%s: IFont_SetRatio returns 0x%08x instead of S_OK.\n",
|
||||
test_name, hres);
|
||||
}
|
||||
/* Change the scaling ratio */
|
||||
hres = IFont_SetRatio(ifnt, ratio_logical, ratio_himetric);
|
||||
ok((ratio_logical && ratio_himetric) ? hres == S_OK : hres == E_FAIL,
|
||||
"%s: IFont_SetRatio unexpectedly returned 0x%08x.\n", test_name, hres);
|
||||
|
||||
/* Read back size. */
|
||||
hres = IFont_get_Size(ifnt, &psize);
|
||||
|
Loading…
Reference in New Issue
Block a user