Rob Shearman : mshtml:
Implement PersistStreamInit_IsDirty when in edit mode.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 12 07:51:06 CDT 2007
Module: wine
Branch: master
Commit: 41a3b734f9468b4c3a3516eca9b8bc3d50db1d0b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=41a3b734f9468b4c3a3516eca9b8bc3d50db1d0b
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed Sep 12 10:42:01 2007 +0100
mshtml: Implement PersistStreamInit_IsDirty when in edit mode.
---
dlls/mshtml/editor.c | 12 ++++++++++++
dlls/mshtml/mshtml_private.h | 1 +
dlls/mshtml/persist.c | 2 +-
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 43c8b38..6f202e0 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -1163,3 +1163,15 @@ void init_editor(HTMLDocument *This)
set_ns_fontname(This->nscontainer, "Times New Roman");
}
+
+HRESULT editor_is_dirty(HTMLDocument *This)
+{
+ PRBool modified;
+
+ if(!This->nscontainer || !This->nscontainer->editor)
+ return S_FALSE;
+
+ nsIEditor_GetDocumentModified(This->nscontainer->editor, &modified);
+
+ return modified ? S_OK : S_FALSE;
+}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 1719714..79935a8 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -456,6 +456,7 @@ 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);
+HRESULT editor_is_dirty(HTMLDocument*);
extern DWORD mshtml_tls;
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index 3b606d6..9f74c91 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -600,7 +600,7 @@ static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
TRACE("(%p)\n", This);
if(This->usermode == EDITMODE)
- FIXME("Unimplemented in edit mode\n");
+ return editor_is_dirty(This);
return S_FALSE;
}
More information about the wine-cvs
mailing list