Commit 90a4eb7d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use nscolor_to_str in IHTMLBodyElement::get_text implementation.

parent 0f0cb605
......@@ -448,22 +448,21 @@ static HRESULT WINAPI HTMLBodyElement_get_text(IHTMLBodyElement *iface, VARIANT
HTMLBodyElement *This = HTMLBODY_THIS(iface);
nsAString text;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&text, NULL);
V_VT(p) = VT_BSTR;
V_BSTR(p) = NULL;
nsres = nsIDOMHTMLBodyElement_GetText(This->nsbody, &text);
if(NS_SUCCEEDED(nsres))
{
const PRUnichar *sText;
nsAString_GetData(&text, &sText);
if(NS_SUCCEEDED(nsres)) {
const PRUnichar *color;
nsAString_GetData(&text, &color);
V_VT(p) = VT_BSTR;
V_BSTR(p) = SysAllocString(sText);
hres = nscolor_to_str(color, &V_BSTR(p));
}else {
ERR("GetText failed: %08x\n", nsres);
hres = E_FAIL;
}
nsAString_Finish(&text);
......
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