mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
mshtml: Handle fClearDirty flag in IPersistStreamInit::Save.
This commit is contained in:
parent
7de847c6ee
commit
c58ca1312c
3 changed files with 10 additions and 6 deletions
|
@ -99,11 +99,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
|||
static const WCHAR wszFont[] = {'f','o','n','t',0};
|
||||
static const WCHAR wszSize[] = {'s','i','z','e',0};
|
||||
|
||||
static void set_dirty(HTMLDocument *This, VARIANT_BOOL dirty)
|
||||
void set_dirty(HTMLDocument *This, VARIANT_BOOL dirty)
|
||||
{
|
||||
nsresult nsres;
|
||||
|
||||
if(!This->nscontainer || !This->nscontainer->editor)
|
||||
if(This->usermode != EDITMODE || !This->nscontainer || !This->nscontainer->editor)
|
||||
return;
|
||||
|
||||
if(dirty) {
|
||||
|
@ -976,7 +976,7 @@ static HRESULT exec_setdirty(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
|
|||
{
|
||||
TRACE("(%p)->(%08x %p %p)\n", This, cmdexecopt, in, out);
|
||||
|
||||
if(!in || This->usermode != EDITMODE)
|
||||
if(!in)
|
||||
return S_OK;
|
||||
|
||||
if(V_VT(in) == VT_BOOL)
|
||||
|
|
|
@ -490,8 +490,9 @@ void handle_edit_event(HTMLDocument*,nsIDOMEvent*);
|
|||
HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
||||
HRESULT editor_exec_cut(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
||||
HRESULT editor_exec_paste(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
||||
void handle_edit_load(HTMLDocument *This);
|
||||
void handle_edit_load(HTMLDocument*);
|
||||
HRESULT editor_is_dirty(HTMLDocument*);
|
||||
void set_dirty(HTMLDocument*,VARIANT_BOOL);
|
||||
|
||||
extern DWORD mshtml_tls;
|
||||
|
||||
|
|
|
@ -705,18 +705,21 @@ static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM
|
|||
DWORD len, written=0;
|
||||
HRESULT hres;
|
||||
|
||||
WARN("(%p)->(%p %x) needs more work\n", This, pStm, fClearDirty);
|
||||
TRACE("(%p)->(%p %x)\n", This, pStm, fClearDirty);
|
||||
|
||||
hres = get_doc_string(This, &str, &len);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
||||
hres = IStream_Write(pStm, str, len, &written);
|
||||
if(FAILED(hres))
|
||||
FIXME("Write failed: %08x\n", hres);
|
||||
|
||||
heap_free(str);
|
||||
|
||||
if(fClearDirty)
|
||||
set_dirty(This, VARIANT_FALSE);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue