mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:46:18 +00:00
[T2EMBED] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73293
This commit is contained in:
parent
32cb9ee335
commit
129d8806b0
2 changed files with 17 additions and 8 deletions
|
@ -32,7 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(t2embed);
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_WINE_PREATTACH:
|
case DLL_WINE_PREATTACH:
|
||||||
|
@ -75,6 +74,7 @@ LONG WINAPI TTEmbedFont(HDC hDC, ULONG ulFlags, ULONG ulCharSet, ULONG *pulPrivS
|
||||||
LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *status)
|
LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *status)
|
||||||
{
|
{
|
||||||
OUTLINETEXTMETRICW otm;
|
OUTLINETEXTMETRICW otm;
|
||||||
|
WORD fsType;
|
||||||
|
|
||||||
TRACE("(%p %p)\n", hDC, status);
|
TRACE("(%p %p)\n", hDC, status);
|
||||||
|
|
||||||
|
@ -88,15 +88,22 @@ LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *status)
|
||||||
if (!status)
|
if (!status)
|
||||||
return E_PERMISSIONSINVALID;
|
return E_PERMISSIONSINVALID;
|
||||||
|
|
||||||
|
otm.otmfsType = (fsType = otm.otmfsType) & 0xf;
|
||||||
if (otm.otmfsType == LICENSE_INSTALLABLE)
|
if (otm.otmfsType == LICENSE_INSTALLABLE)
|
||||||
*status = EMBED_INSTALLABLE;
|
*status = EMBED_INSTALLABLE;
|
||||||
else if (otm.otmfsType & LICENSE_NOEMBEDDING)
|
|
||||||
*status = EMBED_NOEMBEDDING;
|
|
||||||
else if (otm.otmfsType & LICENSE_PREVIEWPRINT)
|
|
||||||
*status = EMBED_PREVIEWPRINT;
|
|
||||||
else if (otm.otmfsType & LICENSE_EDITABLE)
|
else if (otm.otmfsType & LICENSE_EDITABLE)
|
||||||
*status = EMBED_EDITABLE;
|
*status = EMBED_EDITABLE;
|
||||||
|
else if (otm.otmfsType & LICENSE_PREVIEWPRINT)
|
||||||
|
*status = EMBED_PREVIEWPRINT;
|
||||||
|
else if (otm.otmfsType & LICENSE_NOEMBEDDING)
|
||||||
|
*status = EMBED_NOEMBEDDING;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WARN("unrecognized flags, %#x\n", otm.otmfsType);
|
||||||
|
*status = EMBED_INSTALLABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRACE("fsType 0x%04x, status %u\n", fsType, *status);
|
||||||
return E_NONE;
|
return E_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +125,7 @@ LONG WINAPI TTIsEmbeddingEnabledForFacename(LPCSTR facename, BOOL *enabled)
|
||||||
|
|
||||||
*enabled = TRUE;
|
*enabled = TRUE;
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, exclusionlistW, 0, GENERIC_READ, &hkey))
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, exclusionlistW, 0, GENERIC_READ, &hkey))
|
||||||
return E_NONE;
|
goto out;
|
||||||
|
|
||||||
*enabled = TRUE;
|
*enabled = TRUE;
|
||||||
ret = ERROR_SUCCESS;
|
ret = ERROR_SUCCESS;
|
||||||
|
@ -142,6 +149,8 @@ LONG WINAPI TTIsEmbeddingEnabledForFacename(LPCSTR facename, BOOL *enabled)
|
||||||
}
|
}
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
|
out:
|
||||||
|
TRACE("embedding %s for %s\n", *enabled ? "enabled" : "disabled", debugstr_a(facename));
|
||||||
return E_NONE;
|
return E_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +174,7 @@ LONG WINAPI TTIsEmbeddingEnabled(HDC hDC, BOOL *enabled)
|
||||||
return E_NOFREEMEMORY;
|
return E_NOFREEMEMORY;
|
||||||
|
|
||||||
GetOutlineTextMetricsA(hDC, len, otm);
|
GetOutlineTextMetricsA(hDC, len, otm);
|
||||||
ret = TTIsEmbeddingEnabledForFacename(otm->otmpFaceName, enabled);
|
ret = TTIsEmbeddingEnabledForFacename((LPCSTR)otm + (ULONG_PTR)otm->otmpFaceName, enabled);
|
||||||
HeapFree(GetProcessHeap(), 0, otm);
|
HeapFree(GetProcessHeap(), 0, otm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ reactos/dll/win32/stdole2.tlb # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/stdole32.tlb # Synced to WineStaging-1.9.11
|
reactos/dll/win32/stdole32.tlb # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/sti # Synced to WineStaging-1.9.23
|
reactos/dll/win32/sti # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/sxs # Synced to WineStaging-1.9.11
|
reactos/dll/win32/sxs # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/t2embed # Synced to WineStaging-1.9.11
|
reactos/dll/win32/t2embed # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/tapi32 # Synced to WineStaging-1.9.11
|
reactos/dll/win32/tapi32 # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/traffic # Synced to WineStaging-1.9.11
|
reactos/dll/win32/traffic # Synced to WineStaging-1.9.11
|
||||||
reactos/dll/win32/twain_32 # Synced to WineStaging-1.9.11
|
reactos/dll/win32/twain_32 # Synced to WineStaging-1.9.11
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue