[PATCH 5/6] riched20: Add tomPasteFile support for ITextDocument_fnOpen.

Jactry jactry92 at gmail.com
Thu Sep 26 08:52:47 CDT 2013


-------------- next part --------------
From 54a7391d91f5a55c17108b1e0484971f9ad41df0 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <jactry92 at gmail.com>
Date: Thu, 26 Sep 2013 21:22:39 +0800
Subject: [PATCH 5/6] riched20: Add tomPasteFile support for
 ITextDocument_fnOpen.
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>

---
 dlls/riched20/richole.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 4832597..5ada13d 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -636,6 +636,7 @@ ITextDocument_fnOpen(ITextDocument* me, VARIANT* pVar, LONG Flags,
     LPSTR chBuffer;
     static const char header[] = "{\\rtf";
     char beginHex[5];
+    LONG flags;
     DWORD readOut;
 
     TRACE("(%p %p 0x%x %d)\n", me, pVar, Flags, CodePage);
@@ -675,8 +676,11 @@ ITextDocument_fnOpen(ITextDocument* me, VARIANT* pVar, LONG Flags,
         return S_OK;
     }
 
+    if((Flags & 0xf000) == tomPasteFile) flags = ST_SELECTION|ST_DEFAULT;
+    else flags = ST_DEFAULT;
+
     settextex.codepage = CodePage;
-    settextex.flags = ST_DEFAULT;
+    settextex.flags = flags;
 
     size = GetFileSize(hFile, NULL);
     if(size == INVALID_FILE_SIZE)
-- 
1.8.3.4 (Apple Git-47)


More information about the wine-patches mailing list