Jacek Caban : mshtml: Added IHTMLOptionElement::get_text implementation.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 11:27:57 CDT 2007


Module: wine
Branch: master
Commit: 0466542a7e76053ae99969aa30ecd7d89eed74ef
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0466542a7e76053ae99969aa30ecd7d89eed74ef

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Oct 14 00:11:06 2007 +0200

mshtml: Added IHTMLOptionElement::get_text implementation.

---

 dlls/mshtml/htmloption.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c
index 5c48c23..22c6023 100644
--- a/dlls/mshtml/htmloption.c
+++ b/dlls/mshtml/htmloption.c
@@ -241,8 +241,24 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
 static HRESULT WINAPI HTMLOptionElement_get_text(IHTMLOptionElement *iface, BSTR *p)
 {
     HTMLOptionElement *This = HTMLOPTION_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    nsAString text_str;
+    const PRUnichar *text;
+    nsresult nsres;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    nsAString_Init(&text_str, NULL);
+    nsres = nsIDOMHTMLOptionElement_GetText(This->nsoption, &text_str);
+    if(NS_SUCCEEDED(nsres)) {
+        nsAString_GetData(&text_str, &text, NULL);
+        *p = SysAllocString(text);
+    }else {
+        ERR("GetText failed: %08x\n", nsres);
+        *p = NULL;
+    }
+    nsAString_Finish(&text_str);
+
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLOptionElement_get_form(IHTMLOptionElement *iface, IHTMLFormElement **p)




More information about the wine-cvs mailing list