diff --git a/patches/Makefile b/patches/Makefile index 43698cc8..bec9e349 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -727,19 +727,16 @@ quartz-MediaSeeking_Positions.ok: # | .INTERMEDIATE: riched20-IText_Interface.ok riched20-IText_Interface.ok: - $(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) + $(call APPLY_FILE,riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Set-Start-E.patch) + $(call APPLY_FILE,riched20-IText_Interface/0002-riched20-Stub-for-ITextFont-interface-and-implement-.patch) + $(call APPLY_FILE,riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch) + $(call APPLY_FILE,riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch) + $(call APPLY_FILE,riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch) + $(call APPLY_FILE,riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch) + $(call APPLY_FILE,riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch) + $(call APPLY_FILE,riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch) + $(call APPLY_FILE,riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch) + $(call APPLY_FILE,riched20-IText_Interface/0010-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]" },'; \ diff --git a/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Get-Start-E.patch b/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Get-Start-E.patch deleted file mode 100644 index d53a97e5..00000000 --- a/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Get-Start-E.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 1df7e9d2ccba315a1cab22745e105d3a98445faa Mon Sep 17 00:00:00 2001 -From: Jactry Zeng -Date: Mon, 11 Aug 2014 10:58:26 +0800 -Subject: riched20: Implement IText{Selection, Range}::Get{Start, End}. - ---- - dlls/riched20/richole.c | 30 ++++++++++++++++++------- - dlls/riched20/tests/richole.c | 52 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 74 insertions(+), 8 deletions(-) - -diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c -index 963368f..2c75cc3 100644 ---- a/dlls/riched20/richole.c -+++ b/dlls/riched20/richole.c -@@ -638,8 +638,11 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst) - if (!This->reOle) - return CO_E_RELEASED; - -- FIXME("not implemented %p\n", This); -- return E_NOTIMPL; -+ if (!pcpFirst) -+ return E_INVALIDARG; -+ *pcpFirst = This->start; -+ TRACE("%d\n", *pcpFirst); -+ return S_OK; - } - - static HRESULT WINAPI ITextRange_fnSetStart(ITextRange *me, LONG cpFirst) -@@ -658,8 +661,11 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim) - if (!This->reOle) - return CO_E_RELEASED; - -- FIXME("not implemented %p\n", This); -- return E_NOTIMPL; -+ if (!pcpLim) -+ return E_INVALIDARG; -+ *pcpLim = This->end; -+ TRACE("%d\n", *pcpLim); -+ return S_OK; - } - - static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim) -@@ -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); -+ int lim; - if (!This->reOle) - return CO_E_RELEASED; - -- FIXME("not implemented\n"); -- return E_NOTIMPL; -+ if (!pcpFirst) -+ return E_INVALIDARG; -+ ME_GetSelectionOfs(This->reOle->editor, pcpFirst, &lim); -+ TRACE("%d\n", *pcpFirst); -+ return S_OK; - } - - 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); -+ int first; - if (!This->reOle) - return CO_E_RELEASED; - -- FIXME("not implemented\n"); -- return E_NOTIMPL; -+ if (!pcpLim) -+ return E_INVALIDARG; -+ ME_GetSelectionOfs(This->reOle->editor, &first, pcpLim); -+ TRACE("%d\n", *pcpLim); -+ return S_OK; - } - - static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim) -diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c -index 2e9b45a..a0273d1 100644 ---- a/dlls/riched20/tests/richole.c -+++ b/dlls/riched20/tests/richole.c -@@ -631,6 +631,57 @@ static void test_ITextSelection_GetChar(void) - release_interfaces(&w, &reOle, &txtDoc, &txtSel); - } - -+static void test_GetStart_GetEnd(void) -+{ -+ HWND w; -+ IRichEditOle *reOle = NULL; -+ ITextDocument *txtDoc = NULL; -+ ITextRange *txtRge = NULL; -+ ITextSelection *txtSel = NULL; -+ HRESULT hres; -+ int start, end; -+ static const CHAR test_text1[] = "TestSomeText"; -+ -+ create_interfaces(&w, &reOle, &txtDoc, &txtSel); -+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); -+ -+ /* tests for ITextRange::Get{Start, End} */ -+#define TEST_TXTRGE_GETSTARTEND(first, lim, expected_start, expected_end) \ -+ ITextDocument_Range(txtDoc, first, lim, &txtRge); \ -+ start = 0xdeadbeef; \ -+ hres = ITextRange_GetStart(txtRge, &start); \ -+ ok(hres == S_OK, "ITextRange_GetStart\n"); \ -+ ok(start == expected_start, "got wrong start value: %d\n", start); \ -+ end = 0xdeadbeef; \ -+ hres = ITextRange_GetEnd(txtRge, &end); \ -+ ok(hres == S_OK, "ITextRange_GetEnd\n"); \ -+ ok(end == expected_end, "got wrong end value: %d\n", end); \ -+ ITextRange_Release(txtRge); -+ -+ TEST_TXTRGE_GETSTARTEND(1, 6, 1, 6) -+ TEST_TXTRGE_GETSTARTEND(6, 1, 1, 6) -+ TEST_TXTRGE_GETSTARTEND(-1, 13, 0, 13) -+ TEST_TXTRGE_GETSTARTEND(13, 13, 12, 12) -+ -+ /* tests for ITextSelection::Get{Start, End} */ -+#define TEST_TXTSEL_GETSTARTEND(first, lim, expected_start, expected_end) \ -+ SendMessageA(w, EM_SETSEL, first, lim); \ -+ start = 0xdeadbeef; \ -+ hres = ITextSelection_GetStart(txtSel, &start); \ -+ ok(hres == S_OK, "ITextSelection_GetStart\n"); \ -+ ok(start == expected_start, "got wrong start value: %d\n", start); \ -+ end = 0xdeadbeef; \ -+ hres = ITextSelection_GetEnd(txtSel, &end); \ -+ ok(end == expected_end, "got wrong end value: %d\n", end); -+ -+ TEST_TXTSEL_GETSTARTEND(2, 5, 2, 5) -+ TEST_TXTSEL_GETSTARTEND(5, 2, 2, 5) -+ TEST_TXTSEL_GETSTARTEND(0, -1, 0, strlen(test_text1)+1) -+ TEST_TXTSEL_GETSTARTEND(13, 13, 12, 12) -+ -+ release_interfaces(&w, &reOle, &txtDoc, &txtSel); -+} -+ - START_TEST(richole) - { - /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -644,4 +695,5 @@ START_TEST(richole) - test_ITextSelection_GetChar(); - test_ITextDocument_Range(); - test_ITextRange_GetChar(); -+ test_GetStart_GetEnd(); - } --- -2.1.0 - diff --git a/patches/riched20-IText_Interface/0004-riched20-Implement-IText-Selection-Range-Set-Start-E.patch b/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Set-Start-E.patch similarity index 95% rename from patches/riched20-IText_Interface/0004-riched20-Implement-IText-Selection-Range-Set-Start-E.patch rename to patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Set-Start-E.patch index e5718054..be72c59a 100644 --- a/patches/riched20-IText_Interface/0004-riched20-Implement-IText-Selection-Range-Set-Start-E.patch +++ b/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Set-Start-E.patch @@ -1,4 +1,4 @@ -From b9dc29525e4ad72bb7b4d3e90b0bf299b22fa1e9 Mon Sep 17 00:00:00 2001 +From bca17fd4f0c51b2c803a824018f4242dcdc174b0 Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Fri, 8 Aug 2014 21:32:57 +0800 Subject: riched20: Implement IText{Selection, Range}::Set{Start, End}. @@ -9,7 +9,7 @@ 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 0f80567..fd31811 100644 +index f7e7870..a8d55cf 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -650,14 +650,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst) @@ -72,7 +72,7 @@ index 0f80567..fd31811 100644 } static HRESULT WINAPI ITextRange_fnGetFont(ITextRange *me, ITextFont **pFont) -@@ -1661,11 +1687,16 @@ static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFir +@@ -1660,11 +1686,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 0f80567..fd31811 100644 } static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim) -@@ -1685,11 +1716,16 @@ static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim) +@@ -1684,11 +1715,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 0f80567..fd31811 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 e5059fa..a1197cf 100644 +index eed335c..2268211 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -794,6 +794,137 @@ static void test_ITextSelection_Collapse(void) +@@ -941,6 +941,137 @@ static void test_ITextSelection_Collapse(void) release_interfaces(&w, &reOle, &txtDoc, &txtSel); } @@ -252,17 +252,17 @@ index e5059fa..a1197cf 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -805,10 +936,14 @@ START_TEST(richole) - test_ITextDocument_Open(); +@@ -953,10 +1084,14 @@ START_TEST(richole) test_ITextSelection_GetText(); test_ITextSelection_GetChar(); + test_ITextSelection_GetStart_GetEnd(); + test_ITextSelection_SetStart(); + test_ITextSelection_SetEnd(); test_ITextSelection_Collapse(); test_ITextDocument_Range(); test_ITextRange_GetChar(); + test_ITextRange_GetStart_GetEnd(); test_ITextRange_GetDuplicate(); - test_GetStart_GetEnd(); test_ITextRange_Collapse(); + test_ITextRange_SetStart(); + test_ITextRange_SetEnd(); diff --git a/patches/riched20-IText_Interface/0002-riched20-Implement-ITextRange-GetDuplicate.patch b/patches/riched20-IText_Interface/0002-riched20-Implement-ITextRange-GetDuplicate.patch deleted file mode 100644 index 69c87009..00000000 --- a/patches/riched20-IText_Interface/0002-riched20-Implement-ITextRange-GetDuplicate.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 1fda858cb72f0f28b7672c16d7a88ef98e5898fc Mon Sep 17 00:00:00 2001 -From: Jactry Zeng -Date: Sun, 10 Aug 2014 20:43:41 +0800 -Subject: riched20: Implement ITextRange::GetDuplicate. - ---- - dlls/riched20/richole.c | 9 +++++++-- - dlls/riched20/tests/richole.c | 35 +++++++++++++++++++++++++++++++++++ - 2 files changed, 42 insertions(+), 2 deletions(-) - -diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c -index 2c75cc3..179bb1c 100644 ---- a/dlls/riched20/richole.c -+++ b/dlls/riched20/richole.c -@@ -602,14 +602,19 @@ static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch) - return E_NOTIMPL; - } - -+static HRESULT CreateITextRange(IRichEditOleImpl *reOle, LONG start, LONG end, ITextRange** ppRange); -+ - static HRESULT WINAPI ITextRange_fnGetDuplicate(ITextRange *me, ITextRange **ppRange) - { - ITextRangeImpl *This = impl_from_ITextRange(me); - if (!This->reOle) - return CO_E_RELEASED; - -- FIXME("not implemented %p\n", This); -- return E_NOTIMPL; -+ TRACE("%p %p\n", This, ppRange); -+ if (!ppRange) -+ return E_INVALIDARG; -+ -+ return CreateITextRange(This->reOle, This->start, This->end, ppRange); - } - - static HRESULT WINAPI ITextRange_fnGetFormattedText(ITextRange *me, ITextRange **ppRange) -diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c -index a0273d1..225bd06 100644 ---- a/dlls/riched20/tests/richole.c -+++ b/dlls/riched20/tests/richole.c -@@ -682,6 +682,40 @@ static void test_GetStart_GetEnd(void) - release_interfaces(&w, &reOle, &txtDoc, &txtSel); - } - -+static void test_ITextRange_GetDuplicate(void) -+{ -+ HWND w; -+ IRichEditOle *reOle = NULL; -+ ITextDocument *txtDoc = NULL; -+ ITextRange *txtRge = NULL; -+ ITextRange *txtRgeDup = NULL; -+ HRESULT hres; -+ LONG first, lim, start, end; -+ static const CHAR test_text1[] = "TestSomeText"; -+ -+ create_interfaces(&w, &reOle, &txtDoc, NULL); -+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); -+ first = 0, lim = 4; -+ hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); -+ ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres); -+ -+ hres = ITextRange_GetDuplicate(txtRge, &txtRgeDup); -+ ok(hres == S_OK, "ITextRange_GetDuplicate\n"); -+ ok(txtRgeDup != txtRge, "A new pointer should be returned\n"); -+ ITextRange_GetStart(txtRgeDup, &start); -+ ok(start == first, "got wrong value: %d\n", start); -+ ITextRange_GetEnd(txtRgeDup, &end); -+ ok(end == lim, "got wrong value: %d\n", end); -+ -+ ITextRange_Release(txtRgeDup); -+ -+ hres = ITextRange_GetDuplicate(txtRge, NULL); -+ ok(hres == E_INVALIDARG, "ITextRange_GetDuplicate\n"); -+ -+ ITextRange_Release(txtRge); -+ release_interfaces(&w, &reOle, &txtDoc, NULL); -+} -+ - START_TEST(richole) - { - /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -695,5 +729,6 @@ START_TEST(richole) - test_ITextSelection_GetChar(); - test_ITextDocument_Range(); - test_ITextRange_GetChar(); -+ test_ITextRange_GetDuplicate(); - test_GetStart_GetEnd(); - } --- -2.1.0 - diff --git a/patches/riched20-IText_Interface/0005-riched20-Stub-for-ITextFont-interface-and-implement-.patch b/patches/riched20-IText_Interface/0002-riched20-Stub-for-ITextFont-interface-and-implement-.patch similarity index 98% rename from patches/riched20-IText_Interface/0005-riched20-Stub-for-ITextFont-interface-and-implement-.patch rename to patches/riched20-IText_Interface/0002-riched20-Stub-for-ITextFont-interface-and-implement-.patch index 0c65ab2a..eaec6f3c 100644 --- a/patches/riched20-IText_Interface/0005-riched20-Stub-for-ITextFont-interface-and-implement-.patch +++ b/patches/riched20-IText_Interface/0002-riched20-Stub-for-ITextFont-interface-and-implement-.patch @@ -1,4 +1,4 @@ -From 158215c2b371c0370cf488cf296abc033ffd3c6c Mon Sep 17 00:00:00 2001 +From 01ab296e4cdbe2ac1ee7123b5593b5b0806360ae Mon Sep 17 00:00:00 2001 From: Jactry Zeng 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 fd31811..ea15640 100644 +index a8d55cf..dcc7686 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 @@ -852,7 +852,7 @@ index fd31811..ea15640 100644 } static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont) -@@ -1731,11 +2513,24 @@ static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim) +@@ -1730,11 +2512,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 fd31811..ea15640 100644 } static HRESULT WINAPI ITextSelection_fnSetFont(ITextSelection *me, ITextFont *pFont) -@@ -2369,6 +3164,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) +@@ -2368,6 +3163,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) TRACE("Created %p\n",reo); *ppObj = reo; list_init(&reo->rangelist); @@ -888,10 +888,10 @@ index fd31811..ea15640 100644 return 1; } diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c -index a1197cf..a0616ab 100644 +index 2268211..e9618d8 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -925,6 +925,97 @@ static void test_ITextSelection_SetEnd(void) +@@ -1072,6 +1072,97 @@ static void test_ITextSelection_SetEnd(void) release_interfaces(&w, &reOle, &txtDoc, &txtSel); } @@ -989,15 +989,15 @@ index a1197cf..a0616ab 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -939,6 +1030,7 @@ START_TEST(richole) +@@ -1087,6 +1178,7 @@ START_TEST(richole) test_ITextSelection_SetStart(); test_ITextSelection_SetEnd(); test_ITextSelection_Collapse(); + test_ITextSelection_GetFont(); test_ITextDocument_Range(); test_ITextRange_GetChar(); - test_ITextRange_GetDuplicate(); -@@ -946,4 +1038,5 @@ START_TEST(richole) + test_ITextRange_GetStart_GetEnd(); +@@ -1094,4 +1186,5 @@ START_TEST(richole) test_ITextRange_Collapse(); test_ITextRange_SetStart(); test_ITextRange_SetEnd(); diff --git a/patches/riched20-IText_Interface/0003-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch b/patches/riched20-IText_Interface/0003-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch deleted file mode 100644 index 16b276e1..00000000 --- a/patches/riched20-IText_Interface/0003-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch +++ /dev/null @@ -1,167 +0,0 @@ -From d24bd790ce1ae125dc8550c2dad7abbd39be4976 Mon Sep 17 00:00:00 2001 -From: Jactry Zeng -Date: Sun, 10 Aug 2014 06:02:02 +0800 -Subject: riched20: Implement ITextRange::Collapse and - ITextSelection::Collapse. - ---- - dlls/riched20/richole.c | 27 ++++++++++++--- - dlls/riched20/tests/richole.c | 80 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 102 insertions(+), 5 deletions(-) - -diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c -index 179bb1c..0f80567 100644 ---- a/dlls/riched20/richole.c -+++ b/dlls/riched20/richole.c -@@ -743,14 +743,26 @@ static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue) - return E_NOTIMPL; - } - -+static HRESULT range_Collapse(LONG bStart, LONG *start, LONG *end) -+{ -+ BOOL isdege = !(*end - *start); -+ -+ if (isdege) -+ return S_FALSE; -+ -+ if (bStart == tomEnd || bStart == tomFalse) -+ *start = *end; -+ else -+ *end = *start; -+ return S_OK; -+} -+ - static HRESULT WINAPI ITextRange_fnCollapse(ITextRange *me, LONG bStart) - { - ITextRangeImpl *This = impl_from_ITextRange(me); - if (!This->reOle) - return CO_E_RELEASED; -- -- FIXME("not implemented %p\n", This); -- return E_NOTIMPL; -+ return range_Collapse(bStart, &This->start, &This->end); - } - - static HRESULT WINAPI ITextRange_fnExpand(ITextRange *me, LONG Unit, LONG *pDelta) -@@ -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); -+ int start, end; -+ HRESULT hres; - if (!This->reOle) - return CO_E_RELEASED; - -- FIXME("not implemented\n"); -- return E_NOTIMPL; -+ ME_GetSelectionOfs(This->reOle->editor, &start, &end); -+ hres = range_Collapse(bStart, &start, &end); -+ if (!hres) -+ ME_SetSelection(This->reOle->editor, start, end); -+ return hres; - } - - 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 225bd06..e5059fa 100644 ---- a/dlls/riched20/tests/richole.c -+++ b/dlls/riched20/tests/richole.c -@@ -716,6 +716,84 @@ static void test_ITextRange_GetDuplicate(void) - release_interfaces(&w, &reOle, &txtDoc, NULL); - } - -+static void test_ITextRange_Collapse(void) -+{ -+ HWND w; -+ IRichEditOle *reOle = NULL; -+ ITextDocument *txtDoc = NULL; -+ ITextRange *txtRge = NULL; -+ HRESULT hres; -+ LONG first, lim, start, end; -+ static const CHAR test_text1[] = "TestSomeText"; -+ -+ create_interfaces(&w, &reOle, &txtDoc, NULL); -+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); -+ -+#define TEST_TXTRGE_COLLAPSE(bStart, expected_start, expected_end, expected_return) \ -+ ITextDocument_Range(txtDoc, first, lim, &txtRge); \ -+ hres = ITextRange_Collapse(txtRge, bStart); \ -+ ok(hres == expected_return, "ITextRange_Collapse\n"); \ -+ ITextRange_GetStart(txtRge, &start); \ -+ ok(start == expected_start, "got wrong start value: %d\n", start); \ -+ ITextRange_GetEnd(txtRge, &end); \ -+ ok(end == expected_end, "got wrong end value: %d\n", end); \ -+ ITextRange_Release(txtRge); -+ -+ first = 4, lim = 8; -+ TEST_TXTRGE_COLLAPSE(tomTrue, 4, 4, S_OK) -+ TEST_TXTRGE_COLLAPSE(tomStart, 4, 4, S_OK) -+ TEST_TXTRGE_COLLAPSE(tomFalse, 8, 8, S_OK) -+ TEST_TXTRGE_COLLAPSE(tomEnd, 8, 8, S_OK) -+ /* tomStart is the default */ -+ TEST_TXTRGE_COLLAPSE(256, 4, 4, S_OK) -+ -+ first = 6, lim = 6; -+ TEST_TXTRGE_COLLAPSE(tomEnd, 6, 6, S_FALSE) -+ -+ first = 8, lim = 8; -+ TEST_TXTRGE_COLLAPSE(tomStart, 8, 8, S_FALSE) -+ -+ release_interfaces(&w, &reOle, &txtDoc, NULL); -+} -+ -+static void test_ITextSelection_Collapse(void) -+{ -+ HWND w; -+ IRichEditOle *reOle = NULL; -+ ITextDocument *txtDoc = NULL; -+ ITextSelection *txtSel = NULL; -+ HRESULT hres; -+ LONG first, lim, start, end; -+ static const CHAR test_text1[] = "TestSomeText"; -+ -+ create_interfaces(&w, &reOle, &txtDoc, &txtSel); -+ SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); -+ -+#define TEST_TXTSEL_COLLAPSE(bStart, expected_start, expected_end, expected_return) \ -+ SendMessageA(w, EM_SETSEL, first, lim); \ -+ hres = ITextSelection_Collapse(txtSel, bStart); \ -+ ok(hres == expected_return, "ITextSelection_Collapse\n"); \ -+ SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); \ -+ ok(start == expected_start, "got wrong start value: %d\n", start); \ -+ ok(end == expected_end, "got wrong end value: %d\n", end); -+ -+ first = 4, lim = 8; -+ TEST_TXTSEL_COLLAPSE(tomTrue, 4, 4, S_OK) -+ TEST_TXTSEL_COLLAPSE(tomStart, 4, 4, S_OK) -+ TEST_TXTSEL_COLLAPSE(tomFalse, 8, 8, S_OK) -+ TEST_TXTSEL_COLLAPSE(tomEnd, 8, 8, S_OK) -+ /* tomStart is the default */ -+ TEST_TXTSEL_COLLAPSE(256, 4, 4, S_OK) -+ -+ first = 6, lim = 6; -+ TEST_TXTSEL_COLLAPSE(tomEnd, 6, 6, S_FALSE) -+ -+ first = 8, lim = 8; -+ TEST_TXTSEL_COLLAPSE(tomStart, 8, 8, S_FALSE) -+ -+ release_interfaces(&w, &reOle, &txtDoc, &txtSel); -+} -+ - START_TEST(richole) - { - /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -727,8 +805,10 @@ START_TEST(richole) - test_ITextDocument_Open(); - test_ITextSelection_GetText(); - test_ITextSelection_GetChar(); -+ test_ITextSelection_Collapse(); - test_ITextDocument_Range(); - test_ITextRange_GetChar(); - test_ITextRange_GetDuplicate(); - test_GetStart_GetEnd(); -+ test_ITextRange_Collapse(); - } --- -2.1.0 - diff --git a/patches/riched20-IText_Interface/0006-riched20-Stub-for-ITextPara-interface-and-implement-.patch b/patches/riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch similarity index 98% rename from patches/riched20-IText_Interface/0006-riched20-Stub-for-ITextPara-interface-and-implement-.patch rename to patches/riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch index 413b74db..ce116964 100644 --- a/patches/riched20-IText_Interface/0006-riched20-Stub-for-ITextPara-interface-and-implement-.patch +++ b/patches/riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch @@ -1,4 +1,4 @@ -From ae1117c55936ce6aded53521fab5130c03c0eab3 Mon Sep 17 00:00:00 2001 +From 86972b35873c1a1b66178d19faaed03583f3004c Mon Sep 17 00:00:00 2001 From: Jactry Zeng 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 ea15640..4e8e752 100644 +index dcc7686..ec70e72 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 @@ -751,7 +751,7 @@ index ea15640..4e8e752 100644 } static HRESULT WINAPI ITextRange_fnSetPara(ITextRange *me, ITextPara *pPara) -@@ -3165,6 +3844,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) +@@ -3164,6 +3843,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) *ppObj = reo; list_init(&reo->rangelist); list_init(&reo->fontlist); @@ -760,10 +760,10 @@ index ea15640..4e8e752 100644 return 1; } diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c -index a0616ab..1739e07 100644 +index e9618d8..909d27e 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -1016,6 +1016,52 @@ static void test_ITextSelection_GetFont(void) +@@ -1163,6 +1163,52 @@ static void test_ITextSelection_GetFont(void) ITextFont_Release(txtFont); } @@ -816,7 +816,7 @@ index a0616ab..1739e07 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -1039,4 +1085,5 @@ START_TEST(richole) +@@ -1187,4 +1233,5 @@ START_TEST(richole) test_ITextRange_SetStart(); test_ITextRange_SetEnd(); test_ITextRange_GetFont(); diff --git a/patches/riched20-IText_Interface/0007-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch b/patches/riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch similarity index 95% rename from patches/riched20-IText_Interface/0007-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch rename to patches/riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch index d0d54074..9cca4bd3 100644 --- a/patches/riched20-IText_Interface/0007-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch +++ b/patches/riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch @@ -1,4 +1,4 @@ -From 8c31194c090dfdc7ffb2ab609df16278276c35de Mon Sep 17 00:00:00 2001 +From 6e017cb053086f1e59e162459d8c1039aaf406ba Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Wed, 13 Aug 2014 14:57:52 +0800 Subject: riched20: Fix ME_RunOfsFromCharOfs() when nCharOfs > strlen(). diff --git a/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetText.patch b/patches/riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch similarity index 93% rename from patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetText.patch rename to patches/riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch index 66ebb573..0a4d7df5 100644 --- a/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetText.patch +++ b/patches/riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch @@ -1,4 +1,4 @@ -From eb198d540614780c1ef5e1fcc4084275e395c9d4 Mon Sep 17 00:00:00 2001 +From 0ffb5cd3d2dab750400bb3cb3720988f44d89015 Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Wed, 13 Aug 2014 15:40:11 +0800 Subject: riched20: Implement ITextRange::GetText. @@ -9,7 +9,7 @@ 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 4e8e752..b2222d8 100644 +index ec70e72..b9babf5 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -1952,14 +1952,40 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R @@ -55,7 +55,7 @@ index 4e8e752..b2222d8 100644 } static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr) -@@ -3037,8 +3063,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr) +@@ -3036,8 +3062,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 4e8e752..b2222d8 100644 if (!This->reOle) return CO_E_RELEASED; -@@ -3047,23 +3071,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr) +@@ -3046,23 +3070,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 4e8e752..b2222d8 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 1739e07..d5dd958 100644 +index 909d27e..0079b39 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -1062,6 +1062,43 @@ static void test_ITextRange_GetPara(void) +@@ -1209,6 +1209,43 @@ static void test_ITextRange_GetPara(void) ITextPara_Release(txtPara); } @@ -137,7 +137,7 @@ index 1739e07..d5dd958 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -1086,4 +1123,5 @@ START_TEST(richole) +@@ -1234,4 +1271,5 @@ START_TEST(richole) test_ITextRange_SetEnd(); test_ITextRange_GetFont(); test_ITextRange_GetPara(); diff --git a/patches/riched20-IText_Interface/0009-riched20-Implement-ITextRange-SetRange.patch b/patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch similarity index 91% rename from patches/riched20-IText_Interface/0009-riched20-Implement-ITextRange-SetRange.patch rename to patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch index d04ca3d9..1890cd63 100644 --- a/patches/riched20-IText_Interface/0009-riched20-Implement-ITextRange-SetRange.patch +++ b/patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch @@ -1,4 +1,4 @@ -From 9711840efc29bf82727579943f0d25bc198e2df3 Mon Sep 17 00:00:00 2001 +From 22dd892538a54977796a10a7636e3ce3bd0d5b2c Mon Sep 17 00:00:00 2001 From: Jactry Zeng 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 b2222d8..bbfdd86 100644 +index b9babf5..46d2d15 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -2309,14 +2309,36 @@ static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Inde +@@ -2308,14 +2308,36 @@ static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Inde return E_NOTIMPL; } @@ -51,7 +51,7 @@ index b2222d8..bbfdd86 100644 } static HRESULT WINAPI ITextRange_fnInRange(ITextRange *me, ITextRange *pRange, LONG *pb) -@@ -2911,26 +2933,12 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2, +@@ -2910,26 +2932,12 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2, ITextRange** ppRange) { IRichEditOleImpl *This = impl_from_ITextDocument(me); @@ -80,10 +80,10 @@ index b2222d8..bbfdd86 100644 } diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c -index d5dd958..5f35e65 100644 +index 0079b39..e7618f9 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -1099,6 +1099,40 @@ static void test_ITextRange_GetText(void) +@@ -1246,6 +1246,40 @@ static void test_ITextRange_GetText(void) TEST_TXTRGE_GETTEXT(1, 1, NULL) } @@ -124,7 +124,7 @@ index d5dd958..5f35e65 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -1124,4 +1158,5 @@ START_TEST(richole) +@@ -1272,4 +1306,5 @@ START_TEST(richole) test_ITextRange_GetFont(); test_ITextRange_GetPara(); test_ITextRange_GetText(); diff --git a/patches/riched20-IText_Interface/0010-riched20-Implement-ITextRange-IsEqual.patch b/patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch similarity index 91% rename from patches/riched20-IText_Interface/0010-riched20-Implement-ITextRange-IsEqual.patch rename to patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch index d839ebe7..d34d554b 100644 --- a/patches/riched20-IText_Interface/0010-riched20-Implement-ITextRange-IsEqual.patch +++ b/patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch @@ -1,4 +1,4 @@ -From fd250a350cc77fe89484ac7c1d65042d01833cc0 Mon Sep 17 00:00:00 2001 +From 1f28067484ebf7e6f2cce716dccf5f91e3a99775 Mon Sep 17 00:00:00 2001 From: Jactry Zeng 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 bbfdd86..e94aa30 100644 +index 46d2d15..1d44d63 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -2361,14 +2361,29 @@ static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, L +@@ -2360,14 +2360,29 @@ static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, L return E_NOTIMPL; } @@ -45,10 +45,10 @@ index bbfdd86..e94aa30 100644 static HRESULT WINAPI ITextRange_fnSelect(ITextRange *me) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c -index 5f35e65..d6808be 100644 +index e7618f9..7a4c8b5 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -1133,6 +1133,52 @@ static void test_ITextRange_SetRange(void) +@@ -1280,6 +1280,52 @@ static void test_ITextRange_SetRange(void) release_interfaces(&w, &reOle, &txtDoc, NULL); } @@ -101,7 +101,7 @@ index 5f35e65..d6808be 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -1159,4 +1205,5 @@ START_TEST(richole) +@@ -1307,4 +1353,5 @@ START_TEST(richole) test_ITextRange_GetPara(); test_ITextRange_GetText(); test_ITextRange_SetRange(); diff --git a/patches/riched20-IText_Interface/0011-riched20-Implement-ITextRange-GetStoryLength.patch b/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch similarity index 90% rename from patches/riched20-IText_Interface/0011-riched20-Implement-ITextRange-GetStoryLength.patch rename to patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch index 89ccf8a2..8fcee120 100644 --- a/patches/riched20-IText_Interface/0011-riched20-Implement-ITextRange-GetStoryLength.patch +++ b/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch @@ -1,4 +1,4 @@ -From 788ee2ad1fc1ef43e9bc331bc2d234a88990bab7 Mon Sep 17 00:00:00 2001 +From ddc9f89d9bd685787ee9eb153d5c54c07edeea4d Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Mon, 18 Aug 2014 14:38:50 +0800 Subject: riched20: Implement ITextRange::GetStoryLength. @@ -9,7 +9,7 @@ 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 e94aa30..317521a 100644 +index 1d44d63..2b1459a 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -2242,8 +2242,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch) @@ -26,10 +26,10 @@ index e94aa30..317521a 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 d6808be..3addd1b 100644 +index 7a4c8b5..543f3ec 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -1179,6 +1179,37 @@ static void test_ITextRange_IsEqual(void) +@@ -1326,6 +1326,37 @@ static void test_ITextRange_IsEqual(void) release_interfaces(&w, &reOle, &txtDoc, NULL); } @@ -67,7 +67,7 @@ index d6808be..3addd1b 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -1206,4 +1237,5 @@ START_TEST(richole) +@@ -1354,4 +1385,5 @@ START_TEST(richole) test_ITextRange_GetText(); test_ITextRange_SetRange(); test_ITextRange_IsEqual(); diff --git a/patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection-GetStoryLength.patch b/patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch similarity index 87% rename from patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection-GetStoryLength.patch rename to patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch index 13b198f9..2e09f3fa 100644 --- a/patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection-GetStoryLength.patch +++ b/patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch @@ -1,4 +1,4 @@ -From e4f6ec6e412bfd86b658d8cb54b8052f49ca4373 Mon Sep 17 00:00:00 2001 +From 857fe4e24351a2487dde9de829e00f56850bfe85 Mon Sep 17 00:00:00 2001 From: Jactry Zeng 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 317521a..7884df8 100644 +index 2b1459a..f2b4348 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -3281,8 +3281,10 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG * +@@ -3280,8 +3280,10 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG * if (!This->reOle) return CO_E_RELEASED; @@ -26,10 +26,10 @@ index 317521a..7884df8 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 3addd1b..85b1fb3 100644 +index 543f3ec..baed1f7 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c -@@ -1210,6 +1210,35 @@ static void test_ITextRange_GetStoryLength(void) +@@ -1357,6 +1357,35 @@ static void test_ITextRange_GetStoryLength(void) release_interfaces(&w, &reOle, &txtDoc, NULL); } @@ -65,14 +65,14 @@ index 3addd1b..85b1fb3 100644 START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in -@@ -1225,6 +1254,7 @@ START_TEST(richole) +@@ -1373,6 +1402,7 @@ START_TEST(richole) test_ITextSelection_SetEnd(); test_ITextSelection_Collapse(); test_ITextSelection_GetFont(); + test_ITextSelection_GetStoryLength(); test_ITextDocument_Range(); test_ITextRange_GetChar(); - test_ITextRange_GetDuplicate(); + test_ITextRange_GetStart_GetEnd(); -- 2.1.0 diff --git a/patches/riched20-IText_Interface/0013-riched20-Fix-invalid-memory-access-when-parent-objec.patch b/patches/riched20-IText_Interface/0010-riched20-Fix-invalid-memory-access-when-parent-objec.patch similarity index 94% rename from patches/riched20-IText_Interface/0013-riched20-Fix-invalid-memory-access-when-parent-objec.patch rename to patches/riched20-IText_Interface/0010-riched20-Fix-invalid-memory-access-when-parent-objec.patch index b9c28123..7e8db966 100644 --- a/patches/riched20-IText_Interface/0013-riched20-Fix-invalid-memory-access-when-parent-objec.patch +++ b/patches/riched20-IText_Interface/0010-riched20-Fix-invalid-memory-access-when-parent-objec.patch @@ -1,4 +1,4 @@ -From f7ee3804223e38a18bdf30cf36798b7f56839c58 Mon Sep 17 00:00:00 2001 +From 4e012209e8fb3780e4b0c18657a35cb2e3f835dc Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 13 Sep 2014 17:21:31 +0200 Subject: riched20: Fix invalid memory access when parent object was destroyed @@ -9,7 +9,7 @@ Subject: riched20: Fix invalid memory access when parent object was destroyed 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c -index 7884df8..b9ff71f 100644 +index f2b4348..449b012 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -528,10 +528,13 @@ static ULONG WINAPI ITextPara_fnRelease(ITextPara *me)