[PATCH] Implement IHTMLStyle get/put posLeft
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Tue Oct 14 04:11:25 CDT 2008
---
dlls/mshtml/htmlstyle.c | 43 ++++++++++++++++++++++++++++++++++++++-----
1 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 8d6564d..fcac1eb 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -1802,18 +1802,51 @@ static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
return E_NOTIMPL;
}
-static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
+static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float f)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->()\n", This);
- return E_NOTIMPL;
+ VARIANT v;
+
+ TRACE("(%p)->(%f)\n", This, f);
+
+ V_VT(&v) = VT_R4;
+ V_R4(&v) = f;
+
+ if(VariantChangeType(&v, &v, 0, VT_BSTR) == S_OK)
+ {
+ return set_style_attr(This, STYLEID_LEFT, V_BSTR(&v), 0);
+ }
+
+ return E_FAIL;
}
static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
- FIXME("(%p)->()\n", This);
- return E_NOTIMPL;
+ BSTR ret;
+ HRESULT hres;
+ VARIANT v;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ if(!p)
+ return E_POINTER;
+
+ hres = get_style_attr(This, STYLEID_LEFT, &ret);
+ if(FAILED(hres))
+ return hres;
+
+ V_VT(&v) = VT_BSTR;
+ V_BSTR(&v) = ret;
+
+ if(VariantChangeType(&v, &v, 0, VT_BSTR) == S_OK)
+ {
+ TRACE("ret %f\n", V_R4(&v));
+ *p = V_R4(&v);
+ return hres;
+ }
+
+ return E_FAIL;
}
static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
--
1.5.4.3
--------------030507040306060702040801--
More information about the wine-patches
mailing list