Kevin Koltzau : riched20: Store reference to editor in ole interface.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 23 05:55:24 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 58b299531130d6e3be8c8a7de162f985452ecd47
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=58b299531130d6e3be8c8a7de162f985452ecd47

Author: Kevin Koltzau <kevin at plop.org>
Date:   Wed Feb 22 23:05:11 2006 -0500

riched20: Store reference to editor in ole interface.

---

 dlls/riched20/editor.c  |    2 +-
 dlls/riched20/editor.h  |    2 +-
 dlls/riched20/richole.c |    6 +++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index b846568..705cae6 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2236,7 +2236,7 @@ LRESULT WINAPI RichEditANSIWndProc(HWND 
   {
     LPVOID *ppvObj = (LPVOID*) lParam;
     FIXME("EM_GETOLEINTERFACE %p: stub\n", ppvObj);
-    return CreateIRichEditOle(ppvObj);
+    return CreateIRichEditOle(editor, ppvObj);
   }
   case EM_SETOLECALLBACK:
     if(editor->lpOleCallback)
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index 9043f42..7376e28 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -233,7 +233,7 @@ void ME_QueueInvalidateFromCursor(ME_Tex
 BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator);
 
 /* richole.c */
-extern LRESULT CreateIRichEditOle(LPVOID *);
+extern LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *);
 
 /* wintest.c */
 
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index d457414..db294e0 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -31,6 +31,7 @@
 #include "winuser.h"
 #include "ole2.h"
 #include "richole.h"
+#include "editor.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(richedit);
@@ -38,6 +39,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit);
 typedef struct IRichEditOleImpl {
     const IRichEditOleVtbl *lpVtbl;
     LONG ref;
+
+    ME_TextEditor *editor;
 } IRichEditOleImpl;
 
 /* there is no way to be consistent across different sets of headers - mingw, Wine, Win32 SDK*/
@@ -250,7 +253,7 @@ static const IRichEditOleVtbl revt = {
     IRichEditOle_fnImportDataObject
 };
 
-LRESULT CreateIRichEditOle(LPVOID *ppObj)
+LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
 {
     IRichEditOleImpl *reo;
 
@@ -260,6 +263,7 @@ LRESULT CreateIRichEditOle(LPVOID *ppObj
 
     reo->lpVtbl = &revt;
     reo->ref = 1;
+    reo->editor = editor;
     TRACE("Created %p\n",reo);
     *ppObj = (LPVOID) reo;
 




More information about the wine-cvs mailing list