On 2/6/10 10:11 PM, lementec fabien wrote:
Hi,

I have mostly managed to make solidworks2010 work
under the latest version of wine. The following function
has a missing feature when called with the variant set to
3:
dlls/mshtml.c::HTMLStyle_put_width

You may try the attached patch (compile tested only).

I dont know anything related to mshtml,

Then please file a bug instead of writing to wine-devel.

  so it would be
great if anyone is interested in implementing it... would
make this great software works with wine.

I'd be skeptical about this, it's probably more work.


Jacek
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 04ba1d6..3022e2b 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -345,10 +345,12 @@ HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration 
*nsstyle, styleid_t sid,
 
     case VT_I4: {
         WCHAR str[14];
+
         static const WCHAR format[] = {'%','d',0};
+        static const WCHAR px_format[] = {'%','d','p','x',0};
 
-        wsprintfW(str, format, V_I4(value));
-        return set_nsstyle_attr(nsstyle, sid, str, flags);
+        wsprintfW(str, flags&ATTR_FIX_PX ? px_format : format, V_I4(value));
+        return set_nsstyle_attr(nsstyle, sid, str, flags & ~ATTR_FIX_PX);
     }
     default:
         FIXME("not implemented vt %d\n", V_VT(value));
@@ -1779,15 +1781,7 @@ static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle 
*iface, VARIANT v)
 
     TRACE("(%p)->(v%d)\n", This, V_VT(&v));
 
-    switch(V_VT(&v)) {
-    case VT_BSTR:
-        TRACE("%s\n", debugstr_w(V_BSTR(&v)));
-        return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
-    default:
-        FIXME("unsupported vt %d\n", V_VT(&v));
-    }
-
-    return E_NOTIMPL;
+    return set_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, &v, ATTR_FIX_PX);
 }
 
 static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)


Reply via email to