mshtml: Added PersistStreamInit_InitNew implementation

Jacek Caban jacek at codeweavers.com
Fri Dec 4 14:32:58 CST 2009


Hi Piotr,

Piotr Caban wrote:
> ---
>  dlls/mshtml/mshtml_private.h |    1 +
>  dlls/mshtml/nsevents.c       |   25 ++++++-----
>  dlls/mshtml/persist.c        |   84 +++++++++++++++++++++++++++++-------
>  dlls/mshtml/tests/htmldoc.c  |   95 
> ++++++++++++++++++++++++++++++++++++++++--
>  4 files changed, 173 insertions(+), 32 deletions(-)

     hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
     if(SUCCEEDED(hres)) {
-        VARIANT state, progress;
-
-        V_VT(&progress) = VT_I4;
-        V_I4(&progress) = 0;
-        IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER,
-                               &progress, NULL);
-
-        V_VT(&state) = VT_I4;
-        V_I4(&state) = 0;
-        IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE, OLECMDEXECOPT_DONTPROMPTUSER,
-                               &state, NULL);
+        if(doc->download_state) {
+            VARIANT state, progress;
+
+            V_VT(&progress) = VT_I4;
+            V_I4(&progress) = 0;
+            IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS,
+                    OLECMDEXECOPT_DONTPROMPTUSER, &progress, NULL);
+
+            V_VT(&state) = VT_I4;
+            V_I4(&state) = 0;
+            IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE,
+                    OLECMDEXECOPT_DONTPROMPTUSER, &state, NULL);
+        }
+        doc->download_state = 0;


You should clear download_state if client doesn't implement 
IOleCommandTarget interface too.


Thanks,
    Jacek



More information about the wine-devel mailing list