Removed several patches (accepted upstream).

This commit is contained in:
Sebastian Lackner 2014-09-15 21:08:12 +02:00
parent 773df03830
commit d874e1323d
21 changed files with 105 additions and 504 deletions

View File

@ -35,9 +35,8 @@ Wine. All those differences are also documented on the
Included bugfixes and improvements
==================================
**Bugfixes and features included in the next upcoming release [2]:**
**Bugfixes and features included in the next upcoming release [1]:**
* Fix deadlock caused by incorrect wrapper of glu polygon/contour function ([Wine Bug #37239](http://bugs.winehq.org/show_bug.cgi?id=37239 "Adobe Premiere Pro 2 deadlocks when importing video files"))
* Support for FIND_FIRST_EX_LARGE_FETCH flag in FindFirstFileExW ([Wine Bug #35121](http://bugs.winehq.org/show_bug.cgi?id=35121 "Multiple applications/games fail to start with WinVer set to 'Windows 7' (FindFirstFileExW needs FIND_FIRST_EX_LARGE_FETCH support)(FotoQuelle Fotosoftware v4.13, QT5)"))
@ -71,7 +70,7 @@ Included bugfixes and improvements
* SO_CONNECT_TIME returns the appropriate time
* Set ldr.EntryPoint for main executable ([Wine Bug #33034](http://bugs.winehq.org/show_bug.cgi?id=33034 "Many GFWL (Games For Windows Live) 1.x/2.x/3.x games crash or exit silently on startup (DiRT 2/3, GTA IV Steam)"))
* Support for AllocateAndGetTcpExTableFromStack ([Wine Bug #34372](http://bugs.winehq.org/show_bug.cgi?id=34372 "Add missing function AllocateAndGetTcpExTableFromStack() to iphlpapi.dll"))
* Support for BCryptGetFipsAlgorithmMode ([Wine Bug #32194](http://bugs.winehq.org/show_bug.cgi?id=32194 "Multiple games and applications need bcrypt.dll.BCryptGetFipsAlgorithmMode (Chess Position Trainer, Terraria, .NET System.Security.Cryptography)"))
* ~~Support for BCryptGetFipsAlgorithmMode~~ ([Wine Bug #32194](http://bugs.winehq.org/show_bug.cgi?id=32194 "Multiple games and applications need bcrypt.dll.BCryptGetFipsAlgorithmMode (Chess Position Trainer, Terraria, .NET System.Security.Cryptography)"))
* Support for DOS hidden/system file attributes ([Wine Bug #9158](http://bugs.winehq.org/show_bug.cgi?id=9158 "Multiple Microsoft development tools online/web installers fail to skip \"$shtdwn$.req\" with FILE_ATTRIBUTE_HIDDEN (Visual Studio Express Editions, .NET Framework 3.0)"))
* Support for Dynamic DST (daylight saving time) information in registry
* Support for GetFinalPathNameByHandle ([Wine Bug #36073](http://bugs.winehq.org/show_bug.cgi?id=36073 "OneDrive crashes on unimplemented function KERNEL32.dll.GetFinalPathNameByHandleW"))

5
debian/changelog vendored
View File

@ -3,7 +3,10 @@ wine-compholio (1.7.27) UNRELEASED; urgency=low
* Added patch to support FIND_FIRST_EX_LARGE_FETCH flag in FindFirstFileExW.
* Added patch to fix deadlock caused by incorrect wrapper of glu polygon/contour function.
* Removed patch to use assembly wrapper for TLS callbacks (accepted upstream).
* Removed patch to fix uninitialized cch struct member in GetMenuItemInfo.
* Removed patch to fix uninitialized cch struct member in GetMenuItemInfo (accepted upstream).
* Removed some patches for riched20/IText*-interface (accepted upstream).
* Removed patch to fix deadlock caused by incorrect wrapper of glu functions (accepted upstream).
* Removed patch for stub of BCryptGetFipsAlgorithmMode (accepted upstream).
-- Erich E. Hoover <erich.e.hoover@gmail.com> Mon, 08 Sep 2014 21:14:36 +0200
wine-compholio (1.7.26) unstable; urgency=low

View File

@ -22,14 +22,12 @@ PATCHLIST := \
Miscellaneous.ok \
Pipelight.ok \
atl-IOCS_Property.ok \
bcrypt-BCryptGetFipsAlgorithmMode.ok \
comctl32-ImageList.ok \
comctl32-LoadIconMetric.ok \
configure-Absolute_RPATH.ok \
configure-Detect_Gnutls.ok \
dsound-Fast_Mixer.ok \
fonts-Missing_Fonts.ok \
glu32-Polygon.ok \
iphlpapi-TCP_Table.ok \
kernel32-FindFirstFile-LargeFetch.ok \
kernel32-GetFinalPathNameByHandle.ok \
@ -198,24 +196,6 @@ atl-IOCS_Property.ok:
echo '+ { "atl-IOCS_Property", "Qian Hong", "Store IOCS data in a property instead of GWLP_USERDATA." },'; \
) > atl-IOCS_Property.ok
# Patchset bcrypt-BCryptGetFipsAlgorithmMode
# |
# | Included patches:
# | * Add semi-stub for BCryptGetFipsAlgorithmMode. [by Michael Müller]
# |
# | This patchset fixes the following Wine bugs:
# | * [#32194] Support for BCryptGetFipsAlgorithmMode
# |
# | Modified files:
# | * dlls/bcrypt/bcrypt.spec, dlls/bcrypt/bcrypt_main.c, dlls/bcrypt/tests/bcrypt.c
# |
.INTERMEDIATE: bcrypt-BCryptGetFipsAlgorithmMode.ok
bcrypt-BCryptGetFipsAlgorithmMode.ok:
$(call APPLY_FILE,bcrypt-BCryptGetFipsAlgorithmMode/0001-bcrypt-Add-semi-stub-for-BCryptGetFipsAlgorithmMode.patch)
@( \
echo '+ { "bcrypt-BCryptGetFipsAlgorithmMode", "Michael Müller", "Add semi-stub for BCryptGetFipsAlgorithmMode." },'; \
) > bcrypt-BCryptGetFipsAlgorithmMode.ok
# Patchset comctl32-ImageList
# |
# | Included patches:
@ -326,24 +306,6 @@ fonts-Missing_Fonts.ok:
echo '+ { "fonts-Missing_Fonts", "Torsten Kurbad / Erich E. Hoover", "Implement missing fonts expected by Silverlight. [rev 2]" },'; \
) > fonts-Missing_Fonts.ok
# Patchset glu32-Polygon
# |
# | Included patches:
# | * Fix wrapper function for glu[Begin|End]Polygon and gluNextContour. [by Sebastian Lackner]
# |
# | This patchset fixes the following Wine bugs:
# | * [#37239] Fix deadlock caused by incorrect wrapper of glu polygon/contour function
# |
# | Modified files:
# | * dlls/glu32/glu.c
# |
.INTERMEDIATE: glu32-Polygon.ok
glu32-Polygon.ok:
$(call APPLY_FILE,glu32-Polygon/0001-glu32-Fix-wrapper-function-for-glu-Begin-End-Polygon.patch)
@( \
echo '+ { "glu32-Polygon", "Sebastian Lackner", "Fix wrapper function for glu[Begin|End]Polygon and gluNextContour." },'; \
) > glu32-Polygon.ok
# Patchset iphlpapi-TCP_Table
# |
# | Included patches:
@ -746,20 +708,19 @@ quartz-MediaSeeking_Positions.ok:
# |
.INTERMEDIATE: riched20-IText_Interface.ok
riched20-IText_Interface.ok:
$(call APPLY_FILE,riched20-IText_Interface/0001-riched20-Implement-ITextSelection-GetChar-and-ITextR.patch)
$(call APPLY_FILE,riched20-IText_Interface/0002-riched20-Implement-IText-Selection-Range-Get-Start-E.patch)
$(call APPLY_FILE,riched20-IText_Interface/0003-riched20-Implement-ITextRange-GetDuplicate.patch)
$(call APPLY_FILE,riched20-IText_Interface/0004-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch)
$(call APPLY_FILE,riched20-IText_Interface/0005-riched20-Implement-IText-Selection-Range-Set-Start-E.patch)
$(call APPLY_FILE,riched20-IText_Interface/0006-riched20-Stub-for-ITextFont-interface-and-implement-.patch)
$(call APPLY_FILE,riched20-IText_Interface/0007-riched20-Stub-for-ITextPara-interface-and-implement-.patch)
$(call APPLY_FILE,riched20-IText_Interface/0008-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch)
$(call APPLY_FILE,riched20-IText_Interface/0009-riched20-Implement-ITextRange-GetText.patch)
$(call APPLY_FILE,riched20-IText_Interface/0010-riched20-Implement-ITextRange-SetRange.patch)
$(call APPLY_FILE,riched20-IText_Interface/0011-riched20-Implement-ITextRange-IsEqual.patch)
$(call APPLY_FILE,riched20-IText_Interface/0012-riched20-Implement-ITextRange-GetStoryLength.patch)
$(call APPLY_FILE,riched20-IText_Interface/0013-riched20-Implement-ITextSelection-GetStoryLength.patch)
$(call APPLY_FILE,riched20-IText_Interface/0014-riched20-Fix-invalid-memory-access-when-parent-objec.patch)
$(call APPLY_FILE,riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Get-Start-E.patch)
$(call APPLY_FILE,riched20-IText_Interface/0002-riched20-Implement-ITextRange-GetDuplicate.patch)
$(call APPLY_FILE,riched20-IText_Interface/0003-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch)
$(call APPLY_FILE,riched20-IText_Interface/0004-riched20-Implement-IText-Selection-Range-Set-Start-E.patch)
$(call APPLY_FILE,riched20-IText_Interface/0005-riched20-Stub-for-ITextFont-interface-and-implement-.patch)
$(call APPLY_FILE,riched20-IText_Interface/0006-riched20-Stub-for-ITextPara-interface-and-implement-.patch)
$(call APPLY_FILE,riched20-IText_Interface/0007-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch)
$(call APPLY_FILE,riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetText.patch)
$(call APPLY_FILE,riched20-IText_Interface/0009-riched20-Implement-ITextRange-SetRange.patch)
$(call APPLY_FILE,riched20-IText_Interface/0010-riched20-Implement-ITextRange-IsEqual.patch)
$(call APPLY_FILE,riched20-IText_Interface/0011-riched20-Implement-ITextRange-GetStoryLength.patch)
$(call APPLY_FILE,riched20-IText_Interface/0012-riched20-Implement-ITextSelection-GetStoryLength.patch)
$(call APPLY_FILE,riched20-IText_Interface/0013-riched20-Fix-invalid-memory-access-when-parent-objec.patch)
@( \
echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement Stubs for ITextRange interface. [rev 3]" },'; \
echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement Stubs for ITextFont interface. [rev 2]" },'; \

View File

@ -1,97 +0,0 @@
From 7610c5da1834b6294ef7a128690eb333344bb29c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 Aug 2014 00:18:06 +0200
Subject: bcrypt: Add semi-stub for BCryptGetFipsAlgorithmMode
---
dlls/bcrypt/bcrypt.spec | 2 +-
dlls/bcrypt/bcrypt_main.c | 11 +++++++++++
dlls/bcrypt/tests/bcrypt.c | 21 +++++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index 3b154f5..83cdbea 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -27,7 +27,7 @@
@ stdcall BCryptGenRandom(ptr ptr long long)
@ stub BCryptGenerateKeyPair
@ stub BCryptGenerateSymmetricKey
-@ stub BCryptGetFipsAlgorithmMode
+@ stdcall BCryptGetFipsAlgorithmMode(ptr)
@ stub BCryptGetProperty
@ stub BCryptHashData
@ stub BCryptImportKey
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 5ccb9f1..b4c6fad 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -97,3 +97,14 @@ NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE algorithm, DWORD
return STATUS_NOT_IMPLEMENTED;
}
+
+NTSTATUS WINAPI BCryptGetFipsAlgorithmMode(BOOLEAN *enabled)
+{
+ FIXME("%p - semi-stub\n", enabled);
+
+ if (!enabled)
+ return STATUS_INVALID_PARAMETER;
+
+ *enabled = FALSE;
+ return STATUS_SUCCESS;
+}
\ No newline at end of file
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 288e745..9e659d6 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -27,6 +27,7 @@
static NTSTATUS (WINAPI *pBCryptGenRandom)(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR pbBuffer,
ULONG cbBuffer, ULONG dwFlags);
+static NTSTATUS (WINAPI *pBCryptGetFipsAlgorithmMode)(BOOLEAN *enabled);
static BOOL Init(void)
{
@@ -38,6 +39,7 @@ static BOOL Init(void)
}
pBCryptGenRandom = (void *)GetProcAddress(hbcrypt, "BCryptGenRandom");
+ pBCryptGetFipsAlgorithmMode = (void *)GetProcAddress(hbcrypt, "BCryptGetFipsAlgorithmMode");
return TRUE;
}
@@ -78,10 +80,29 @@ static void test_BCryptGenRandom(void)
ok(memcmp(buffer, buffer + 8, 8), "Expected a random number, got 0\n");
}
+static void test_BCryptGetFipsAlgorithmMode(void)
+{
+ NTSTATUS ret;
+ BOOLEAN enabled;
+
+ if (!pBCryptGetFipsAlgorithmMode)
+ {
+ win_skip("BCryptGetFipsAlgorithmMode is not available\n");
+ return;
+ }
+
+ ret = pBCryptGetFipsAlgorithmMode(&enabled);
+ ok(ret == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%x\n", ret);
+
+ ret = pBCryptGetFipsAlgorithmMode(NULL);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got 0x%x\n", ret);
+}
+
START_TEST(bcrypt)
{
if (!Init())
return;
test_BCryptGenRandom();
+ test_BCryptGetFipsAlgorithmMode();
}
--
1.7.9.5

View File

@ -1,4 +0,0 @@
Author: Michael Müller
Subject: Add semi-stub for BCryptGetFipsAlgorithmMode.
Revision: 1
Fixes: [32194] Support for BCryptGetFipsAlgorithmMode

View File

@ -1,88 +0,0 @@
From e3ea811519e1c58b73d1208aaefd34f8069bbd90 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 14 Sep 2014 07:07:13 +0200
Subject: glu32: Fix wrapper function for glu[Begin|End]Polygon and gluNextContour.
---
dlls/glu32/glu.c | 61 ++++++++++++++++++++++++++++++++++----------------------
1 file changed, 37 insertions(+), 24 deletions(-)
diff --git a/dlls/glu32/glu.c b/dlls/glu32/glu.c
index 46a2336..16eb355 100644
--- a/dlls/glu32/glu.c
+++ b/dlls/glu32/glu.c
@@ -352,30 +352,6 @@ int WINAPI wine_gluNurbsCallback(void *arg0,int arg1,void *arg2) {
}
/***********************************************************************
- * gluBeginPolygon (GLU32.@)
- */
-extern int gluBeginPolygon(void *arg0);
-int WINAPI wine_gluBeginPolygon(void *arg0) {
- return gluBeginPolygon(arg0);
-}
-
-/***********************************************************************
- * gluEndPolygon (GLU32.@)
- */
-extern int gluEndPolygon(void *arg0);
-int WINAPI wine_gluEndPolygon(void *arg0) {
- return gluEndPolygon(arg0);
-}
-
-/***********************************************************************
- * gluNextContour (GLU32.@)
- */
-extern int gluNextContour(void *arg0,int arg1);
-int WINAPI wine_gluNextContour(void *arg0,int arg1) {
- return gluNextContour(arg0,arg1);
-}
-
-/***********************************************************************
* gluGetString (GLU32.@)
*/
extern int gluGetString(int arg0);
@@ -617,3 +593,40 @@ void WINAPI wine_gluTessNormal(void *tess, double arg1, double arg2, double arg3
wine_tess_t *wine_tess = tess;
gluTessNormal(wine_tess->tess, arg1, arg2, arg3);
}
+
+/***********************************************************************
+ * gluBeginPolygon (GLU32.@)
+ */
+int WINAPI wine_gluBeginPolygon(void *tess)
+{
+ wine_tess_t *wine_tess = tess;
+ wine_tess->polygon_data = NULL;
+
+ gluTessBeginPolygon(wine_tess->tess, wine_tess);
+ gluTessBeginContour(wine_tess->tess);
+ return 0;
+}
+
+/***********************************************************************
+ * gluEndPolygon (GLU32.@)
+ */
+int WINAPI wine_gluEndPolygon(void *tess)
+{
+ wine_tess_t *wine_tess = tess;
+
+ gluTessEndContour(wine_tess->tess);
+ gluTessEndPolygon(wine_tess->tess);
+ return 0;
+}
+
+/***********************************************************************
+ * gluNextContour (GLU32.@)
+ */
+int WINAPI wine_gluNextContour(void *tess, int arg1)
+{
+ wine_tess_t *wine_tess = tess;
+
+ gluTessEndContour(wine_tess->tess);
+ gluTessBeginContour(wine_tess->tess);
+ return 0;
+}
--
2.1.0

View File

@ -1,4 +0,0 @@
Author: Sebastian Lackner
Subject: Fix wrapper function for glu[Begin|End]Polygon and gluNextContour.
Revision: 1
Fixes: [37239] Fix deadlock caused by incorrect wrapper of glu polygon/contour function

View File

@ -1,4 +1,4 @@
From 0e8cefd6ed92eff52f8e76ed9838ceebb8540685 Mon Sep 17 00:00:00 2001
From 1df7e9d2ccba315a1cab22745e105d3a98445faa Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Mon, 11 Aug 2014 10:58:26 +0800
Subject: riched20: Implement IText{Selection, Range}::Get{Start, End}.
@ -9,10 +9,10 @@ Subject: riched20: Implement IText{Selection, Range}::Get{Start, End}.
2 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 1ff35cf..a88aff2 100644
index 963368f..2c75cc3 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -635,8 +635,11 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
@@ -638,8 +638,11 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
if (!This->reOle)
return CO_E_RELEASED;
@ -26,7 +26,7 @@ index 1ff35cf..a88aff2 100644
}
static HRESULT WINAPI ITextRange_fnSetStart(ITextRange *me, LONG cpFirst)
@@ -655,8 +658,11 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
@@ -658,8 +661,11 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
if (!This->reOle)
return CO_E_RELEASED;
@ -40,7 +40,7 @@ index 1ff35cf..a88aff2 100644
}
static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
@@ -1621,11 +1627,15 @@ static HRESULT WINAPI ITextSelection_fnSetFormattedText(ITextSelection *me, ITex
@@ -1624,11 +1630,15 @@ static HRESULT WINAPI ITextSelection_fnSetFormattedText(ITextSelection *me, ITex
static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFirst)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
@ -58,7 +58,7 @@ index 1ff35cf..a88aff2 100644
}
static HRESULT WINAPI ITextSelection_fnSetStart(ITextSelection *me, LONG cpFirst)
@@ -1641,11 +1651,15 @@ static HRESULT WINAPI ITextSelection_fnSetStart(ITextSelection *me, LONG cpFirst
@@ -1644,11 +1654,15 @@ static HRESULT WINAPI ITextSelection_fnSetStart(ITextSelection *me, LONG cpFirst
static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
@ -77,11 +77,11 @@ index 1ff35cf..a88aff2 100644
static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 152d144..e46e2af 100644
index 2e9b45a..a0273d1 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -586,6 +586,57 @@ static void test_ITextRange_GetChar(void)
release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -631,6 +631,57 @@ static void test_ITextSelection_GetChar(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
+static void test_GetStart_GetEnd(void)
@ -138,7 +138,7 @@ index 152d144..e46e2af 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -599,4 +650,5 @@ START_TEST(richole)
@@ -644,4 +695,5 @@ START_TEST(richole)
test_ITextSelection_GetChar();
test_ITextDocument_Range();
test_ITextRange_GetChar();

View File

@ -1,155 +0,0 @@
From b666d11bf12f72874ecce294cc66b783a78d6555 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Sun, 10 Aug 2014 21:55:44 +0800
Subject: riched20: Implement ITextSelection::GetChar and ITextRange::GetChar.
---
dlls/riched20/richole.c | 28 ++++++++++++++---
dlls/riched20/tests/richole.c | 70 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 826fa68..1ff35cf 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -564,14 +564,29 @@ static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
return E_NOTIMPL;
}
+static HRESULT range_GetChar(ME_TextEditor *editor, ME_Cursor *cursor, LONG *pch)
+{
+ WCHAR wch[2];
+
+ ME_GetTextW(editor, wch, 1, cursor, 1, FALSE, cursor->pRun->next->type == diTextEnd);
+ *pch = wch[0];
+
+ return S_OK;
+}
+
static HRESULT WINAPI ITextRange_fnGetChar(ITextRange *me, LONG *pch)
{
ITextRangeImpl *This = impl_from_ITextRange(me);
+ ME_Cursor cursor;
+
if (!This->reOle)
return CO_E_RELEASED;
+ TRACE("%p\n", pch);
+ if (!pch)
+ return E_INVALIDARG;
- FIXME("not implemented %p\n", This);
- return E_NOTIMPL;
+ ME_CursorFromCharOfs(This->reOle->editor, This->start, &cursor);
+ return range_GetChar(This->reOle->editor, &cursor, pch);
}
static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch)
@@ -1551,11 +1566,16 @@ static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR bstr)
static HRESULT WINAPI ITextSelection_fnGetChar(ITextSelection *me, LONG *pch)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
+ ME_Cursor *start = NULL, *end = NULL;
+
if (!This->reOle)
return CO_E_RELEASED;
+ TRACE("%p\n", pch);
+ if (!pch)
+ return E_INVALIDARG;
- FIXME("not implemented\n");
- return E_NOTIMPL;
+ ME_GetSelection(This->reOle->editor, &start, &end);
+ return range_GetChar(This->reOle->editor, start, pch);
}
static HRESULT WINAPI ITextSelection_fnSetChar(ITextSelection *me, LONG ch)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index f56a14a..152d144 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -518,6 +518,74 @@ static void test_ITextDocument_Range(void)
ITextRange_Release(txtRge);
}
+static void test_ITextSelection_GetChar(void)
+{
+ HWND w;
+ IRichEditOle *reOle = NULL;
+ ITextDocument *txtDoc = NULL;
+ ITextSelection *txtSel = NULL;
+ HRESULT hres;
+ LONG pch = 0xdeadbeef;
+ static const CHAR test_text1[] = "TestSomeText";
+
+ create_interfaces(&w, &reOle, &txtDoc, &txtSel);
+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1);
+
+#define TEST_TXTSEL_GETCHAR(first, lim, expected_char) \
+ SendMessageA(w, EM_SETSEL, first, lim); \
+ pch = 0xdeadbeef; \
+ hres = ITextSelection_GetChar(txtSel, &pch); \
+ ok(hres == S_OK, "ITextSelection_GetChar\n"); \
+ ok(pch == expected_char, "got wrong char: %c\n", pch);
+
+ TEST_TXTSEL_GETCHAR(0, 4, 'T')
+ TEST_TXTSEL_GETCHAR(0, 0, 'T')
+ TEST_TXTSEL_GETCHAR(12, 12, '\r')
+ TEST_TXTSEL_GETCHAR(13, 13, '\r')
+
+ hres = ITextSelection_GetChar(txtSel, NULL);
+ ok(hres == E_INVALIDARG, "ITextSelection_GetChar\n");
+
+ release_interfaces(&w, &reOle, &txtDoc, &txtSel);
+}
+
+static void test_ITextRange_GetChar(void)
+{
+ HWND w;
+ IRichEditOle *reOle = NULL;
+ ITextDocument *txtDoc = NULL;
+ ITextRange *txtRge = NULL;
+ HRESULT hres;
+ LONG pch = 0xdeadbeef;
+ int first, lim;
+ static const CHAR test_text1[] = "TestSomeText";
+
+#define TEST_TXTRGE_GETCHAR(first, lim, expected_char) \
+ create_interfaces(&w, &reOle, &txtDoc, NULL); \
+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); \
+ ITextDocument_Range(txtDoc, first, lim, &txtRge); \
+ pch = 0xdeadbeef; \
+ hres = ITextRange_GetChar(txtRge, &pch); \
+ ok(hres == S_OK, "ITextRange_GetChar\n"); \
+ ok(pch == expected_char, "got wrong char: %c\n", pch); \
+ ITextRange_Release(txtRge); \
+ release_interfaces(&w, &reOle, &txtDoc, NULL);
+
+ TEST_TXTRGE_GETCHAR(0, 4, 'T')
+ TEST_TXTRGE_GETCHAR(0, 0, 'T')
+ TEST_TXTRGE_GETCHAR(12, 12, '\r')
+ TEST_TXTRGE_GETCHAR(13, 13, '\r')
+
+ create_interfaces(&w, &reOle, &txtDoc, NULL);
+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1);
+ first = 12, lim = 12;
+ ITextDocument_Range(txtDoc, first, lim, &txtRge);
+ hres = ITextRange_GetChar(txtRge, NULL);
+ ok(hres == E_INVALIDARG, "ITextRange_GetChar\n");
+ ITextRange_Release(txtRge);
+ release_interfaces(&w, &reOle, &txtDoc, NULL);
+}
+
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -528,5 +596,7 @@ START_TEST(richole)
test_Interfaces();
test_ITextDocument_Open();
test_ITextSelection_GetText();
+ test_ITextSelection_GetChar();
test_ITextDocument_Range();
+ test_ITextRange_GetChar();
}
--
2.1.0

View File

@ -1,4 +1,4 @@
From ebde3fe20d6abe6643fdfbeb22adf6d5a8d12ea4 Mon Sep 17 00:00:00 2001
From 1fda858cb72f0f28b7672c16d7a88ef98e5898fc Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Sun, 10 Aug 2014 20:43:41 +0800
Subject: riched20: Implement ITextRange::GetDuplicate.
@ -9,10 +9,10 @@ Subject: riched20: Implement ITextRange::GetDuplicate.
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index a88aff2..869d65c 100644
index 2c75cc3..179bb1c 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -599,14 +599,19 @@ static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch)
@@ -602,14 +602,19 @@ static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch)
return E_NOTIMPL;
}
@ -35,10 +35,10 @@ index a88aff2..869d65c 100644
static HRESULT WINAPI ITextRange_fnGetFormattedText(ITextRange *me, ITextRange **ppRange)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index e46e2af..b90d6c5 100644
index a0273d1..225bd06 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -637,6 +637,40 @@ static void test_GetStart_GetEnd(void)
@@ -682,6 +682,40 @@ static void test_GetStart_GetEnd(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
@ -79,7 +79,7 @@ index e46e2af..b90d6c5 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -650,5 +684,6 @@ START_TEST(richole)
@@ -695,5 +729,6 @@ START_TEST(richole)
test_ITextSelection_GetChar();
test_ITextDocument_Range();
test_ITextRange_GetChar();

View File

@ -1,4 +1,4 @@
From ea59c742bd3b26df12576787aabf3fb92fa02ab7 Mon Sep 17 00:00:00 2001
From d24bd790ce1ae125dc8550c2dad7abbd39be4976 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Sun, 10 Aug 2014 06:02:02 +0800
Subject: riched20: Implement ITextRange::Collapse and
@ -10,10 +10,10 @@ Subject: riched20: Implement ITextRange::Collapse and
2 files changed, 102 insertions(+), 5 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 869d65c..0ce97ba 100644
index 179bb1c..0f80567 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -740,14 +740,26 @@ static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue)
@@ -743,14 +743,26 @@ static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue)
return E_NOTIMPL;
}
@ -43,7 +43,7 @@ index 869d65c..0ce97ba 100644
}
static HRESULT WINAPI ITextRange_fnExpand(ITextRange *me, LONG Unit, LONG *pDelta)
@@ -1740,11 +1752,16 @@ static HRESULT WINAPI ITextSelection_fnGetStoryType(ITextSelection *me, LONG *pV
@@ -1743,11 +1755,16 @@ static HRESULT WINAPI ITextSelection_fnGetStoryType(ITextSelection *me, LONG *pV
static HRESULT WINAPI ITextSelection_fnCollapse(ITextSelection *me, LONG bStart)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
@ -63,10 +63,10 @@ index 869d65c..0ce97ba 100644
static HRESULT WINAPI ITextSelection_fnExpand(ITextSelection *me, LONG Unit, LONG *pDelta)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index b90d6c5..ce14406 100644
index 225bd06..e5059fa 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -671,6 +671,84 @@ static void test_ITextRange_GetDuplicate(void)
@@ -716,6 +716,84 @@ static void test_ITextRange_GetDuplicate(void)
release_interfaces(&w, &reOle, &txtDoc, NULL);
}
@ -151,7 +151,7 @@ index b90d6c5..ce14406 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -682,8 +760,10 @@ START_TEST(richole)
@@ -727,8 +805,10 @@ START_TEST(richole)
test_ITextDocument_Open();
test_ITextSelection_GetText();
test_ITextSelection_GetChar();

View File

@ -1,4 +1,4 @@
From 16ec02f83420cc404575c2668ec0f2efcc647a30 Mon Sep 17 00:00:00 2001
From b9dc29525e4ad72bb7b4d3e90b0bf299b22fa1e9 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Fri, 8 Aug 2014 21:32:57 +0800
Subject: riched20: Implement IText{Selection, Range}::Set{Start, End}.
@ -9,10 +9,10 @@ Subject: riched20: Implement IText{Selection, Range}::Set{Start, End}.
2 files changed, 179 insertions(+), 8 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 0ce97ba..1a88d42 100644
index 0f80567..fd31811 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -647,14 +647,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
@@ -650,14 +650,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
return S_OK;
}
@ -42,7 +42,7 @@ index 0ce97ba..1a88d42 100644
}
static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
@@ -670,14 +683,27 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
@@ -673,14 +686,27 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
return S_OK;
}
@ -72,7 +72,7 @@ index 0ce97ba..1a88d42 100644
}
static HRESULT WINAPI ITextRange_fnGetFont(ITextRange *me, ITextFont **pFont)
@@ -1658,11 +1684,16 @@ static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFir
@@ -1661,11 +1687,16 @@ static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFir
static HRESULT WINAPI ITextSelection_fnSetStart(ITextSelection *me, LONG cpFirst)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
@ -91,7 +91,7 @@ index 0ce97ba..1a88d42 100644
}
static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
@@ -1682,11 +1713,16 @@ static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
@@ -1685,11 +1716,16 @@ static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
@ -111,10 +111,10 @@ index 0ce97ba..1a88d42 100644
static HRESULT WINAPI ITextSelection_fnGetFont(ITextSelection *me, ITextFont **pFont)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index ce14406..46cea63 100644
index e5059fa..a1197cf 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -749,6 +749,137 @@ static void test_ITextSelection_Collapse(void)
@@ -794,6 +794,137 @@ static void test_ITextSelection_Collapse(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
@ -252,7 +252,7 @@ index ce14406..46cea63 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -760,10 +891,14 @@ START_TEST(richole)
@@ -805,10 +936,14 @@ START_TEST(richole)
test_ITextDocument_Open();
test_ITextSelection_GetText();
test_ITextSelection_GetChar();

View File

@ -1,4 +1,4 @@
From 5ffad86e91e2af5a3ba5dd1537e4535d9c04d455 Mon Sep 17 00:00:00 2001
From 158215c2b371c0370cf488cf296abc033ffd3c6c Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Mon, 11 Aug 2014 13:51:55 +0800
Subject: riched20: Stub for ITextFont interface and implement
@ -10,7 +10,7 @@ Subject: riched20: Stub for ITextFont interface and implement
2 files changed, 893 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 1a88d42..06d1d58 100644
index fd31811..ea15640 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -46,10 +46,12 @@ DEFINE_GUID(IID_ITextHost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0x
@ -807,7 +807,7 @@ index 1a88d42..06d1d58 100644
/* ITextRange interface */
static inline ITextRangeImpl *impl_from_ITextRange(ITextRange *iface)
{
@@ -706,14 +1460,42 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
@@ -709,14 +1463,42 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
return range_SetEnd(This->reOle->editor, cpLim, &This->start, &This->end);
}
@ -852,7 +852,7 @@ index 1a88d42..06d1d58 100644
}
static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
@@ -1728,11 +2510,24 @@ static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
@@ -1731,11 +2513,24 @@ static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
static HRESULT WINAPI ITextSelection_fnGetFont(ITextSelection *me, ITextFont **pFont)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
@ -879,7 +879,7 @@ index 1a88d42..06d1d58 100644
}
static HRESULT WINAPI ITextSelection_fnSetFont(ITextSelection *me, ITextFont *pFont)
@@ -2366,6 +3161,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
@@ -2369,6 +3164,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
TRACE("Created %p\n",reo);
*ppObj = reo;
list_init(&reo->rangelist);
@ -888,10 +888,10 @@ index 1a88d42..06d1d58 100644
return 1;
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 46cea63..3d308c5 100644
index a1197cf..a0616ab 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -880,6 +880,97 @@ static void test_ITextSelection_SetEnd(void)
@@ -925,6 +925,97 @@ static void test_ITextSelection_SetEnd(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
@ -989,7 +989,7 @@ index 46cea63..3d308c5 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -894,6 +985,7 @@ START_TEST(richole)
@@ -939,6 +1030,7 @@ START_TEST(richole)
test_ITextSelection_SetStart();
test_ITextSelection_SetEnd();
test_ITextSelection_Collapse();
@ -997,7 +997,7 @@ index 46cea63..3d308c5 100644
test_ITextDocument_Range();
test_ITextRange_GetChar();
test_ITextRange_GetDuplicate();
@@ -901,4 +993,5 @@ START_TEST(richole)
@@ -946,4 +1038,5 @@ START_TEST(richole)
test_ITextRange_Collapse();
test_ITextRange_SetStart();
test_ITextRange_SetEnd();

View File

@ -1,4 +1,4 @@
From e0b71ae473c149f60fef0845320d846f66f5770d Mon Sep 17 00:00:00 2001
From ae1117c55936ce6aded53521fab5130c03c0eab3 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Sun, 10 Aug 2014 22:17:57 +0800
Subject: riched20: Stub for ITextPara interface and implement
@ -10,7 +10,7 @@ Subject: riched20: Stub for ITextPara interface and implement
2 files changed, 729 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 06d1d58..c53e2fe 100644
index ea15640..4e8e752 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -47,11 +47,13 @@ DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xa
@ -706,7 +706,7 @@ index 06d1d58..c53e2fe 100644
/* ITextFont interface */
static inline ITextFontImpl *impl_from_ITextFont(ITextFont *iface)
{
@@ -1508,14 +2159,42 @@ static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
@@ -1511,14 +2162,42 @@ static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
return E_NOTIMPL;
}
@ -751,7 +751,7 @@ index 06d1d58..c53e2fe 100644
}
static HRESULT WINAPI ITextRange_fnSetPara(ITextRange *me, ITextPara *pPara)
@@ -3162,6 +3841,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
@@ -3165,6 +3844,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
*ppObj = reo;
list_init(&reo->rangelist);
list_init(&reo->fontlist);
@ -760,10 +760,10 @@ index 06d1d58..c53e2fe 100644
return 1;
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 3d308c5..f7f27d1 100644
index a0616ab..1739e07 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -971,6 +971,52 @@ static void test_ITextSelection_GetFont(void)
@@ -1016,6 +1016,52 @@ static void test_ITextSelection_GetFont(void)
ITextFont_Release(txtFont);
}
@ -816,7 +816,7 @@ index 3d308c5..f7f27d1 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -994,4 +1040,5 @@ START_TEST(richole)
@@ -1039,4 +1085,5 @@ START_TEST(richole)
test_ITextRange_SetStart();
test_ITextRange_SetEnd();
test_ITextRange_GetFont();

View File

@ -1,4 +1,4 @@
From 19d065a80722df99e348c67251eb888ccd3a4a98 Mon Sep 17 00:00:00 2001
From 8c31194c090dfdc7ffb2ab609df16278276c35de Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Wed, 13 Aug 2014 14:57:52 +0800
Subject: riched20: Fix ME_RunOfsFromCharOfs() when nCharOfs > strlen().

View File

@ -1,4 +1,4 @@
From a6d1a620cbbc1483b2130e85fad2211e542a0b11 Mon Sep 17 00:00:00 2001
From eb198d540614780c1ef5e1fcc4084275e395c9d4 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Wed, 13 Aug 2014 15:40:11 +0800
Subject: riched20: Implement ITextRange::GetText.
@ -9,10 +9,10 @@ Subject: riched20: Implement ITextRange::GetText.
2 files changed, 67 insertions(+), 21 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index c53e2fe..0ba1a46 100644
index 4e8e752..b2222d8 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1949,14 +1949,40 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
@@ -1952,14 +1952,40 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
return E_NOTIMPL;
}
@ -55,7 +55,7 @@ index c53e2fe..0ba1a46 100644
}
static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
@@ -3034,8 +3060,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
@@ -3037,8 +3063,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
ME_Cursor *start = NULL, *end = NULL;
@ -64,7 +64,7 @@ index c53e2fe..0ba1a46 100644
if (!This->reOle)
return CO_E_RELEASED;
@@ -3044,23 +3068,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
@@ -3047,23 +3071,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
return E_INVALIDARG;
ME_GetSelection(This->reOle->editor, &start, &end);
@ -90,10 +90,10 @@ index c53e2fe..0ba1a46 100644
static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR bstr)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index f7f27d1..ae514ec 100644
index 1739e07..d5dd958 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1017,6 +1017,43 @@ static void test_ITextRange_GetPara(void)
@@ -1062,6 +1062,43 @@ static void test_ITextRange_GetPara(void)
ITextPara_Release(txtPara);
}
@ -137,7 +137,7 @@ index f7f27d1..ae514ec 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1041,4 +1078,5 @@ START_TEST(richole)
@@ -1086,4 +1123,5 @@ START_TEST(richole)
test_ITextRange_SetEnd();
test_ITextRange_GetFont();
test_ITextRange_GetPara();

View File

@ -1,4 +1,4 @@
From 5b91dcc229a35b8647200740b95df1a5ba8ff757 Mon Sep 17 00:00:00 2001
From 9711840efc29bf82727579943f0d25bc198e2df3 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Wed, 13 Aug 2014 17:17:14 +0800
Subject: riched20: Implement ITextRange::SetRange.
@ -9,10 +9,10 @@ Subject: riched20: Implement ITextRange::SetRange.
2 files changed, 60 insertions(+), 17 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 0ba1a46..0cdfa8a 100644
index b2222d8..bbfdd86 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -2306,14 +2306,36 @@ static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Inde
@@ -2309,14 +2309,36 @@ static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Inde
return E_NOTIMPL;
}
@ -51,7 +51,7 @@ index 0ba1a46..0cdfa8a 100644
}
static HRESULT WINAPI ITextRange_fnInRange(ITextRange *me, ITextRange *pRange, LONG *pb)
@@ -2908,26 +2930,12 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
@@ -2911,26 +2933,12 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
ITextRange** ppRange)
{
IRichEditOleImpl *This = impl_from_ITextDocument(me);
@ -80,10 +80,10 @@ index 0ba1a46..0cdfa8a 100644
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index ae514ec..6c7c15d 100644
index d5dd958..5f35e65 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1054,6 +1054,40 @@ static void test_ITextRange_GetText(void)
@@ -1099,6 +1099,40 @@ static void test_ITextRange_GetText(void)
TEST_TXTRGE_GETTEXT(1, 1, NULL)
}
@ -124,7 +124,7 @@ index ae514ec..6c7c15d 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1079,4 +1113,5 @@ START_TEST(richole)
@@ -1124,4 +1158,5 @@ START_TEST(richole)
test_ITextRange_GetFont();
test_ITextRange_GetPara();
test_ITextRange_GetText();

View File

@ -1,4 +1,4 @@
From 7649229a1c439ef7841ff50710520b87cc7fdaea Mon Sep 17 00:00:00 2001
From fd250a350cc77fe89484ac7c1d65042d01833cc0 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Fri, 15 Aug 2014 14:27:21 +0800
Subject: riched20: Implement ITextRange::IsEqual.
@ -9,10 +9,10 @@ Subject: riched20: Implement ITextRange::IsEqual.
2 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 0cdfa8a..f56926c 100644
index bbfdd86..e94aa30 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -2358,14 +2358,29 @@ static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, L
@@ -2361,14 +2361,29 @@ static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, L
return E_NOTIMPL;
}
@ -45,10 +45,10 @@ index 0cdfa8a..f56926c 100644
static HRESULT WINAPI ITextRange_fnSelect(ITextRange *me)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 6c7c15d..6642ca3 100644
index 5f35e65..d6808be 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1088,6 +1088,52 @@ static void test_ITextRange_SetRange(void)
@@ -1133,6 +1133,52 @@ static void test_ITextRange_SetRange(void)
release_interfaces(&w, &reOle, &txtDoc, NULL);
}
@ -101,7 +101,7 @@ index 6c7c15d..6642ca3 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1114,4 +1160,5 @@ START_TEST(richole)
@@ -1159,4 +1205,5 @@ START_TEST(richole)
test_ITextRange_GetPara();
test_ITextRange_GetText();
test_ITextRange_SetRange();

View File

@ -1,4 +1,4 @@
From b65c3bc3db95f9753ae10a3b1f6b999056bbb1eb Mon Sep 17 00:00:00 2001
From 788ee2ad1fc1ef43e9bc331bc2d234a88990bab7 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Mon, 18 Aug 2014 14:38:50 +0800
Subject: riched20: Implement ITextRange::GetStoryLength.
@ -9,10 +9,10 @@ Subject: riched20: Implement ITextRange::GetStoryLength.
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index f56926c..18e7045 100644
index e94aa30..317521a 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -2239,8 +2239,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch)
@@ -2242,8 +2242,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch)
if (!This->reOle)
return CO_E_RELEASED;
@ -26,10 +26,10 @@ index f56926c..18e7045 100644
static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 6642ca3..c4f58fd 100644
index d6808be..3addd1b 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1134,6 +1134,37 @@ static void test_ITextRange_IsEqual(void)
@@ -1179,6 +1179,37 @@ static void test_ITextRange_IsEqual(void)
release_interfaces(&w, &reOle, &txtDoc, NULL);
}
@ -67,7 +67,7 @@ index 6642ca3..c4f58fd 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1161,4 +1192,5 @@ START_TEST(richole)
@@ -1206,4 +1237,5 @@ START_TEST(richole)
test_ITextRange_GetText();
test_ITextRange_SetRange();
test_ITextRange_IsEqual();

View File

@ -1,4 +1,4 @@
From 143bfdb6909528b343fb554a0200415d40e3fca0 Mon Sep 17 00:00:00 2001
From e4f6ec6e412bfd86b658d8cb54b8052f49ca4373 Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Mon, 18 Aug 2014 14:47:14 +0800
Subject: riched20: Implement ITextSelection::GetStoryLength.
@ -9,10 +9,10 @@ Subject: riched20: Implement ITextSelection::GetStoryLength.
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 18e7045..8c64492 100644
index 317521a..7884df8 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -3278,8 +3278,10 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG *
@@ -3281,8 +3281,10 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG *
if (!This->reOle)
return CO_E_RELEASED;
@ -26,10 +26,10 @@ index 18e7045..8c64492 100644
static HRESULT WINAPI ITextSelection_fnGetStoryType(ITextSelection *me, LONG *pValue)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index c4f58fd..a14f88b 100644
index 3addd1b..85b1fb3 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1165,6 +1165,35 @@ static void test_ITextRange_GetStoryLength(void)
@@ -1210,6 +1210,35 @@ static void test_ITextRange_GetStoryLength(void)
release_interfaces(&w, &reOle, &txtDoc, NULL);
}
@ -65,7 +65,7 @@ index c4f58fd..a14f88b 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1180,6 +1209,7 @@ START_TEST(richole)
@@ -1225,6 +1254,7 @@ START_TEST(richole)
test_ITextSelection_SetEnd();
test_ITextSelection_Collapse();
test_ITextSelection_GetFont();

View File

@ -1,15 +1,15 @@
From ed3dbf533bbfdbb7bfb05135f60ea6ef214c7f3a Mon Sep 17 00:00:00 2001
From f7ee3804223e38a18bdf30cf36798b7f56839c58 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 13 Sep 2014 17:21:31 +0200
Subject: riched20: Fix invalid memory access when parent object was destroyed
earlier than child object.
---
dlls/riched20/richole.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
dlls/riched20/richole.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 8c64492..b9ff71f 100644
index 7884df8..b9ff71f 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -528,10 +528,13 @@ static ULONG WINAPI ITextPara_fnRelease(ITextPara *me)
@ -40,20 +40,6 @@ index 8c64492..b9ff71f 100644
+ {
+ list_remove(&This->entry);
+ This->reOle = NULL;
+ }
heap_free(This);
}
return ref;
@@ -1897,8 +1903,11 @@ static ULONG WINAPI ITextRange_fnRelease(ITextRange *me)
TRACE ("%p ref=%u\n", This, ref);
if (ref == 0)
{
- This->reOle = NULL;
- list_remove(&This->entry);
+ if (This->reOle)
+ {
+ list_remove(&This->entry);
+ This->reOle = NULL;
+ }
heap_free(This);
}