Commit dd4dd261 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Respect the presence or absence of the SSA_BREAK flag.

parent 702941ea
...@@ -324,6 +324,7 @@ typedef struct { ...@@ -324,6 +324,7 @@ typedef struct {
typedef struct { typedef struct {
HDC hdc; HDC hdc;
DWORD dwFlags;
BOOL invalid; BOOL invalid;
int clip_len; int clip_len;
ScriptCache *sc; ScriptCache *sc;
...@@ -931,6 +932,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, ...@@ -931,6 +932,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
/* FIXME: handle clipping */ /* FIXME: handle clipping */
analysis->clip_len = cString; analysis->clip_len = cString;
analysis->hdc = hdc; analysis->hdc = hdc;
analysis->dwFlags = dwFlags;
if (psState) if (psState)
sState = *psState; sState = *psState;
...@@ -959,10 +961,16 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, ...@@ -959,10 +961,16 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
} }
if (hr != S_OK) goto error; if (hr != S_OK) goto error;
if (dwFlags & SSA_BREAK)
{
if ((analysis->logattrs = heap_alloc(sizeof(SCRIPT_LOGATTR) * cString))) if ((analysis->logattrs = heap_alloc(sizeof(SCRIPT_LOGATTR) * cString)))
ScriptBreak(pString, cString, (SCRIPT_STRING_ANALYSIS)analysis, analysis->logattrs); {
for (i = 0; i < analysis->numItems; i++)
ScriptBreak(&((LPWSTR)pString)[analysis->pItem[i].iCharPos], analysis->pItem[i+1].iCharPos - analysis->pItem[i].iCharPos, &analysis->pItem[i].a, &analysis->logattrs[analysis->pItem[i].iCharPos]);
}
else else
goto error; goto error;
}
if (!(analysis->glyphs = heap_alloc_zero(sizeof(StringGlyphs) * analysis->numItems))) if (!(analysis->glyphs = heap_alloc_zero(sizeof(StringGlyphs) * analysis->numItems)))
goto error; goto error;
...@@ -2351,6 +2359,7 @@ const SCRIPT_LOGATTR * WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS ssa) ...@@ -2351,6 +2359,7 @@ const SCRIPT_LOGATTR * WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS ssa)
TRACE("(%p)\n", ssa); TRACE("(%p)\n", ssa);
if (!analysis) return NULL; if (!analysis) return NULL;
if (!(analysis->dwFlags & SSA_BREAK)) return NULL;
return analysis->logattrs; return analysis->logattrs;
} }
......
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