From 7a36c29ef4ec2593613dcf6af3a955edc7d4bbdb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 1 Oct 2014 02:51:16 +0200 Subject: [PATCH] Rebase riched20-IText_Interface patches. --- ...nt-IText-Selection-Range-Set-Start-E.patch | 12 +++++----- ...r-ITextFont-interface-and-implement-.patch | 17 ++++++------- ...r-ITextPara-interface-and-implement-.patch | 14 +++++------ ...RunOfsFromCharOfs-when-nCharOfs-strl.patch | 2 +- ...iched20-Implement-ITextRange-GetText.patch | 10 ++++---- ...ched20-Implement-ITextRange-SetRange.patch | 8 +++---- ...iched20-Implement-ITextRange-IsEqual.patch | 6 ++--- ...-Implement-ITextRange-GetStoryLength.patch | 6 ++--- ...lement-ITextSelection-GetStoryLength.patch | 6 ++--- ...alid-memory-access-when-parent-objec.patch | 8 +++---- ...-aggregation-support-for-IRichEditOl.patch | 24 +++++++------------ ..._IRichEditOle-and-IID_ITextDocument-.patch | 2 +- 12 files changed, 54 insertions(+), 61 deletions(-) diff --git a/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Set-Start-E.patch b/patches/riched20-IText_Interface/0001-riched20-Implement-IText-Selection-Range-Set-Start-E.patch index 11fa9ae5..e37ac5b0 100644 --- a/patches/riched20-IText_Interface/0001-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 ead5fc245c8b1e731066056d8e758e4d7e476e5a Mon Sep 17 00:00:00 2001 +From 3978dfd4417127c13b28f2ecd45526e50cdc724a 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,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 f7e7870..a8d55cf 100644 +index 9e7c123..49f9af1 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -650,14 +650,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst) +@@ -651,14 +651,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst) return S_OK; } @@ -42,7 +42,7 @@ index f7e7870..a8d55cf 100644 } static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim) -@@ -673,14 +686,27 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim) +@@ -674,14 +687,27 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim) return S_OK; } @@ -72,7 +72,7 @@ index f7e7870..a8d55cf 100644 } static HRESULT WINAPI ITextRange_fnGetFont(ITextRange *me, ITextFont **pFont) -@@ -1660,11 +1686,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 f7e7870..a8d55cf 100644 } static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim) -@@ -1684,11 +1715,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); diff --git a/patches/riched20-IText_Interface/0002-riched20-Stub-for-ITextFont-interface-and-implement-.patch b/patches/riched20-IText_Interface/0002-riched20-Stub-for-ITextFont-interface-and-implement-.patch index b3e774fe..68d0c579 100644 --- a/patches/riched20-IText_Interface/0002-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 348a74688b600ebdae6dd87ad68d34540b0aab31 Mon Sep 17 00:00:00 2001 +From cefe1e9349a7eb453fcd01071411b861a50ab94f 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 a8d55cf..dcc7686 100644 +index 49f9af1..39d352f 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 @@ -46,14 +46,15 @@ index a8d55cf..dcc7686 100644 struct ITextRangeImpl { ITextRange ITextRange_iface; LONG ref; -@@ -140,12 +153,15 @@ IRichEditOle_fnRelease(IRichEditOle *me) +@@ -140,6 +153,7 @@ IRichEditOle_fnRelease(IRichEditOle *me) if (!ref) { ITextRangeImpl *txtRge; + ITextFontImpl *txtFont; TRACE ("Destroying %p\n", This); This->txtSel->reOle = NULL; - ITextSelection_Release(&This->txtSel->ITextSelection_iface); + This->editor->reOle = NULL; +@@ -147,6 +161,8 @@ IRichEditOle_fnRelease(IRichEditOle *me) IOleClientSite_Release(&This->clientSite->IOleClientSite_iface); LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry) txtRge->reOle = NULL; @@ -62,7 +63,7 @@ index a8d55cf..dcc7686 100644 heap_free(This); } return ref; -@@ -457,6 +473,744 @@ static const IRichEditOleVtbl revt = { +@@ -458,6 +474,744 @@ static const IRichEditOleVtbl revt = { IRichEditOle_fnImportDataObject }; @@ -807,7 +808,7 @@ index a8d55cf..dcc7686 100644 /* ITextRange interface */ static inline ITextRangeImpl *impl_from_ITextRange(ITextRange *iface) { -@@ -709,14 +1463,42 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim) +@@ -710,14 +1464,42 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim) return range_SetEnd(This->reOle->editor, cpLim, &This->start, &This->end); } @@ -852,7 +853,7 @@ index a8d55cf..dcc7686 100644 } static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont) -@@ -1730,11 +2512,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 +880,7 @@ index a8d55cf..dcc7686 100644 } static HRESULT WINAPI ITextSelection_fnSetFont(ITextSelection *me, ITextFont *pFont) -@@ -2368,6 +3163,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); diff --git a/patches/riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch b/patches/riched20-IText_Interface/0003-riched20-Stub-for-ITextPara-interface-and-implement-.patch index 76f1ac9d..c2001c04 100644 --- a/patches/riched20-IText_Interface/0003-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 fa8d998f8e114603e86f9be0eb9ff10e966a8a22 Mon Sep 17 00:00:00 2001 +From 4a54bc77b87e9b301e26b521e34bc1208a11a20c 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 dcc7686..ec70e72 100644 +index 39d352f..575f634 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 @@ -54,8 +54,8 @@ index dcc7686..ec70e72 100644 + ITextParaImpl *txtPara; TRACE ("Destroying %p\n", This); This->txtSel->reOle = NULL; - ITextSelection_Release(&This->txtSel->ITextSelection_iface); -@@ -162,6 +176,8 @@ IRichEditOle_fnRelease(IRichEditOle *me) + This->editor->reOle = NULL; +@@ -163,6 +177,8 @@ IRichEditOle_fnRelease(IRichEditOle *me) txtRge->reOle = NULL; LIST_FOR_EACH_ENTRY(txtFont, &This->fontlist, ITextFontImpl, entry) txtFont->reOle = NULL; @@ -64,7 +64,7 @@ index dcc7686..ec70e72 100644 heap_free(This); } return ref; -@@ -473,6 +489,641 @@ static const IRichEditOleVtbl revt = { +@@ -474,6 +490,641 @@ static const IRichEditOleVtbl revt = { IRichEditOle_fnImportDataObject }; @@ -706,7 +706,7 @@ index dcc7686..ec70e72 100644 /* ITextFont interface */ static inline ITextFontImpl *impl_from_ITextFont(ITextFont *iface) { -@@ -1511,14 +2162,42 @@ static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont) +@@ -1512,14 +2163,42 @@ static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont) return E_NOTIMPL; } @@ -751,7 +751,7 @@ index dcc7686..ec70e72 100644 } static HRESULT WINAPI ITextRange_fnSetPara(ITextRange *me, ITextPara *pPara) -@@ -3164,6 +3843,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); diff --git a/patches/riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch b/patches/riched20-IText_Interface/0004-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch index cf626fff..0869f68e 100644 --- a/patches/riched20-IText_Interface/0004-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 a940996f866525406a88de4c9bdc29dd8975b44f Mon Sep 17 00:00:00 2001 +From 4df3bc5e3f42cd7dc50c574baf544fc7bf95baff 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/0005-riched20-Implement-ITextRange-GetText.patch b/patches/riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch index cc18daf9..347ad73d 100644 --- a/patches/riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch +++ b/patches/riched20-IText_Interface/0005-riched20-Implement-ITextRange-GetText.patch @@ -1,4 +1,4 @@ -From 833c6b92679458852109cf79b5c2ef78690a9dfe Mon Sep 17 00:00:00 2001 +From 238e65a743387bbfce3c79ed8d00b757b51f6c48 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,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 ec70e72..b9babf5 100644 +index 575f634..344bca5 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 +@@ -1953,14 +1953,40 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R return E_NOTIMPL; } @@ -55,7 +55,7 @@ index ec70e72..b9babf5 100644 } static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr) -@@ -3036,8 +3062,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 ec70e72..b9babf5 100644 if (!This->reOle) return CO_E_RELEASED; -@@ -3046,23 +3070,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); diff --git a/patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch b/patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch index 2426e222..e302daf3 100644 --- a/patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch +++ b/patches/riched20-IText_Interface/0006-riched20-Implement-ITextRange-SetRange.patch @@ -1,4 +1,4 @@ -From ec444cc051ee078b44b33969ba5f87c166564a44 Mon Sep 17 00:00:00 2001 +From f966dc17572bb91ba94d3f898be8ccea7f1fd9e4 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 b9babf5..46d2d15 100644 +index 344bca5..b693445 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -2308,14 +2308,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 b9babf5..46d2d15 100644 } static HRESULT WINAPI ITextRange_fnInRange(ITextRange *me, ITextRange *pRange, LONG *pb) -@@ -2910,26 +2932,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); diff --git a/patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch b/patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch index 168b83de..884c6f7a 100644 --- a/patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch +++ b/patches/riched20-IText_Interface/0007-riched20-Implement-ITextRange-IsEqual.patch @@ -1,4 +1,4 @@ -From bb119bc50abcfb5e5fe2ee3281e37633b1cfd30f Mon Sep 17 00:00:00 2001 +From af9a503dc9c5bb5f15cfc5508521d8798fb7c924 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 46d2d15..1d44d63 100644 +index b693445..0174d8e 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -2360,14 +2360,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; } diff --git a/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch b/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch index a305d6c2..8de8c0f1 100644 --- a/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch +++ b/patches/riched20-IText_Interface/0008-riched20-Implement-ITextRange-GetStoryLength.patch @@ -1,4 +1,4 @@ -From 683cdc6fcf55fd27b1245ebc9d74f3dd7e3cfdb1 Mon Sep 17 00:00:00 2001 +From e604d5688ee6dee3737a1a6b9f94897b3e0e606a 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,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 1d44d63..2b1459a 100644 +index 0174d8e..60063ec 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -2242,8 +2242,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch) +@@ -2243,8 +2243,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch) if (!This->reOle) return CO_E_RELEASED; diff --git a/patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch b/patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch index 7d19e732..9994cee9 100644 --- a/patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch +++ b/patches/riched20-IText_Interface/0009-riched20-Implement-ITextSelection-GetStoryLength.patch @@ -1,4 +1,4 @@ -From 904c284e5d9914c798fdc891b391b225d7fdacda Mon Sep 17 00:00:00 2001 +From 72aec2670dc7071d0b03f65de3f0d7fb6525777f 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 2b1459a..f2b4348 100644 +index 60063ec..13e5ba2 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -3280,8 +3280,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; diff --git a/patches/riched20-IText_Interface/0010-riched20-Fix-invalid-memory-access-when-parent-objec.patch b/patches/riched20-IText_Interface/0010-riched20-Fix-invalid-memory-access-when-parent-objec.patch index d62f0a23..a8ffb36a 100644 --- a/patches/riched20-IText_Interface/0010-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 64a00c5a487e9366c4bfdbd5273bd10ec2a1bdcd Mon Sep 17 00:00:00 2001 +From 745a66e79c92ef7adc5debce9740e97c8e1866f9 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,10 +9,10 @@ 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 f2b4348..449b012 100644 +index 13e5ba2..a0ba2dc 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c -@@ -528,10 +528,13 @@ static ULONG WINAPI ITextPara_fnRelease(ITextPara *me) +@@ -529,10 +529,13 @@ static ULONG WINAPI ITextPara_fnRelease(ITextPara *me) ITextRange_Release(&This->txtRge->ITextRange_iface); else ITextSelection_Release(&This->txtSel->ITextSelection_iface); @@ -28,7 +28,7 @@ index f2b4348..449b012 100644 heap_free(This); } return ref; -@@ -1163,10 +1166,13 @@ static ULONG WINAPI ITextFont_fnRelease(ITextFont *me) +@@ -1164,10 +1167,13 @@ static ULONG WINAPI ITextFont_fnRelease(ITextFont *me) ITextRange_Release(&This->txtRge->ITextRange_iface); else ITextSelection_Release(&This->txtSel->ITextSelection_iface); diff --git a/patches/riched20-IText_Interface/0011-riched20-Add-COM-aggregation-support-for-IRichEditOl.patch b/patches/riched20-IText_Interface/0011-riched20-Add-COM-aggregation-support-for-IRichEditOl.patch index 9db4f0e4..ef9ffbea 100644 --- a/patches/riched20-IText_Interface/0011-riched20-Add-COM-aggregation-support-for-IRichEditOl.patch +++ b/patches/riched20-IText_Interface/0011-riched20-Add-COM-aggregation-support-for-IRichEditOl.patch @@ -1,4 +1,4 @@ -From a91a7228c9547ea780b63576b021fca65af418d4 Mon Sep 17 00:00:00 2001 +From cc2e88887b8a809a49d0712cf2423663510f9741 Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Sun, 28 Sep 2014 13:17:49 +0800 Subject: riched20: Add COM aggregation support for IRichEditOle. @@ -6,8 +6,8 @@ Subject: riched20: Add COM aggregation support for IRichEditOle. --- dlls/riched20/editor.c | 4 +- dlls/riched20/editor.h | 2 +- - dlls/riched20/richole.c | 99 ++++++++++++++++++++++++++++++++++--------------- - 3 files changed, 72 insertions(+), 33 deletions(-) + dlls/riched20/richole.c | 98 ++++++++++++++++++++++++++++++++++--------------- + 3 files changed, 71 insertions(+), 33 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 3c0d970..a331001 100644 @@ -45,7 +45,7 @@ index edbac8e..75a3894 100644 void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN; void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c -index 449b012..7e620ef 100644 +index a0ba2dc..7e620ef 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -56,8 +56,10 @@ typedef struct ITextFontImpl ITextFontImpl; @@ -133,15 +133,7 @@ index 449b012..7e620ef 100644 ULONG ref = InterlockedDecrement(&This->ref); TRACE ("%p ref=%u\n", This, ref); -@@ -170,6 +163,7 @@ IRichEditOle_fnRelease(IRichEditOle *me) - ITextParaImpl *txtPara; - TRACE ("Destroying %p\n", This); - This->txtSel->reOle = NULL; -+ This->editor->reOle = NULL; - ITextSelection_Release(&This->txtSel->ITextSelection_iface); - IOleClientSite_Release(&This->clientSite->IOleClientSite_iface); - LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry) -@@ -183,6 +177,44 @@ IRichEditOle_fnRelease(IRichEditOle *me) +@@ -184,6 +177,44 @@ IRichEditOle_fnRelease(IRichEditOle *me) return ref; } @@ -186,7 +178,7 @@ index 449b012..7e620ef 100644 static HRESULT WINAPI IRichEditOle_fnActivateAs(IRichEditOle *me, REFCLSID rclsid, REFCLSID rclsidAs) { -@@ -3855,7 +3887,7 @@ CreateTextSelection(IRichEditOleImpl *reOle) +@@ -3856,7 +3887,7 @@ CreateTextSelection(IRichEditOleImpl *reOle) return txtSel; } @@ -195,7 +187,7 @@ index 449b012..7e620ef 100644 { IRichEditOleImpl *reo; -@@ -3863,6 +3895,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) +@@ -3864,6 +3895,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) if (!reo) return 0; @@ -203,7 +195,7 @@ index 449b012..7e620ef 100644 reo->IRichEditOle_iface.lpVtbl = &revt; reo->ITextDocument_iface.lpVtbl = &tdvt; reo->ref = 1; -@@ -3881,11 +3914,17 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) +@@ -3882,11 +3914,17 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) return 0; } TRACE("Created %p\n",reo); diff --git a/patches/riched20-IText_Interface/0012-riched20-Add-IID_IRichEditOle-and-IID_ITextDocument-.patch b/patches/riched20-IText_Interface/0012-riched20-Add-IID_IRichEditOle-and-IID_ITextDocument-.patch index 42969e8e..7344a7a4 100644 --- a/patches/riched20-IText_Interface/0012-riched20-Add-IID_IRichEditOle-and-IID_ITextDocument-.patch +++ b/patches/riched20-IText_Interface/0012-riched20-Add-IID_IRichEditOle-and-IID_ITextDocument-.patch @@ -1,4 +1,4 @@ -From 84afbeb6db6e8c3025a48d880d960c79e040e287 Mon Sep 17 00:00:00 2001 +From b6666769086bb06cfeacfe81f733749a811ff0fa Mon Sep 17 00:00:00 2001 From: Jactry Zeng Date: Sun, 28 Sep 2014 14:03:15 +0800 Subject: riched20: Add IID_IRichEditOle and IID_ITextDocument support for