Jacek Caban : mshtml: Use nscolor_to_str in IHTMLBodyElement:: get_text implementation.
Alexandre Julliard
julliard at winehq.org
Mon Dec 28 09:16:05 CST 2009
Module: wine
Branch: master
Commit: 90a4eb7d185e3e234b399d13e21222cf1ba822cf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=90a4eb7d185e3e234b399d13e21222cf1ba822cf
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Dec 27 00:50:04 2009 +0100
mshtml: Use nscolor_to_str in IHTMLBodyElement::get_text implementation.
---
dlls/mshtml/htmlbody.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index 8daace1..1aa7313 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -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);
More information about the wine-cvs
mailing list