From 749fc944fc86d606076f7c9c9ad139618c46a8de Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 1 Nov 2014 23:11:57 +0100 Subject: [PATCH] Added patch to silence a few FIXMEs and for ITextSelection_fnGetDuplicate implementation. --- README.md | 3 +- debian/changelog | 1 + patches/Makefile | 4 + ...-repeated-FIXMEs-triggered-by-Adobe-.patch | 186 ++++++++++++++++++ ...lement-ITextSelection_fnGetDuplicate.patch | 37 ++++ patches/riched20-IText_Interface/definition | 5 + 6 files changed, 235 insertions(+), 1 deletion(-) create mode 100644 patches/riched20-IText_Interface/0011-riched20-Silence-repeated-FIXMEs-triggered-by-Adobe-.patch create mode 100644 patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection_fnGetDuplicate.patch diff --git a/README.md b/README.md index 1e729f87..beca8e53 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,9 @@ Wine. All those differences are also documented on the Included bugfixes and improvements ================================== -**Bugfixes and features included in the next upcoming release [10]:** +**Bugfixes and features included in the next upcoming release [11]:** +* Adobe Reader needs ITextSelection_fnGetDuplicate implementation * Cinema 4D needs NotifyIpInterfaceChange ([Wine Bug #34573](https://bugs.winehq.org/show_bug.cgi?id=34573)) * D3DCompileShader should filter specific warning messages ([Wine Bug #33770](https://bugs.winehq.org/show_bug.cgi?id=33770)) * Emulate write to CR4 register ([Wine Bug #30220](https://bugs.winehq.org/show_bug.cgi?id=30220)) diff --git a/debian/changelog b/debian/changelog index e043d8b2..a4f053fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ wine-compholio (1.7.30) UNRELEASED; urgency=low * Added patch for implementation of D3DXCreatePolygon. * Added patch for TLB dependencies lookup in resources. * Added patch to update ProductVersion when applying MSI transforms. + * Added patch for ITextSelection_fnGetDuplicate implementation. * Removed patch to avoid Clang compiler warning because of unused Vtable (accepted upstream). * Removed patch for additional ATL thunks (accepted upstream). * Removed patch to ímplement IRichEditOle and ITextDocument support for ITextServices (accepted upstream). diff --git a/patches/Makefile b/patches/Makefile index 931b3c28..0e75fdfb 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -1109,6 +1109,7 @@ quartz-MediaSeeking_Positions.ok: # | * Implement Stubs for ITextPara interface. [rev 2, by Jactry Zeng] # | * Implement ITextRange/Selection::{GetChar,GetStart,GetEnd,GetDuplicate,Collapse,SetStart,SetEnd}. [by Jactry Zeng] # | * Implement ITextRange/Selection::{GetText,SetRange,IsEqual,GetStoryLength}. [by Jactry Zeng] +# | * Implement ITextSelection_fnGetDuplicate. [by Sebastian Lackner] # | # | This patchset fixes the following Wine bugs: # | * [#12458] Support for ITextDocument_fnRange function @@ -1129,12 +1130,15 @@ riched20-IText_Interface.ok: $(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) + $(call APPLY_FILE,riched20-IText_Interface/0011-riched20-Silence-repeated-FIXMEs-triggered-by-Adobe-.patch) + $(call APPLY_FILE,riched20-IText_Interface/0012-riched20-Implement-ITextSelection_fnGetDuplicate.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]" },'; \ echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement Stubs for ITextPara interface. [rev 2]" },'; \ echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement ITextRange/Selection::{GetChar,GetStart,GetEnd,GetDuplicate,Collapse,SetStart,SetEnd}." },'; \ echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement ITextRange/Selection::{GetText,SetRange,IsEqual,GetStoryLength}." },'; \ + echo '+ { "riched20-IText_Interface", "Sebastian Lackner", "Implement ITextSelection_fnGetDuplicate." },'; \ ) > riched20-IText_Interface.ok # Patchset server-ACL_Compat diff --git a/patches/riched20-IText_Interface/0011-riched20-Silence-repeated-FIXMEs-triggered-by-Adobe-.patch b/patches/riched20-IText_Interface/0011-riched20-Silence-repeated-FIXMEs-triggered-by-Adobe-.patch new file mode 100644 index 00000000..78c7f96b --- /dev/null +++ b/patches/riched20-IText_Interface/0011-riched20-Silence-repeated-FIXMEs-triggered-by-Adobe-.patch @@ -0,0 +1,186 @@ +From 6bb871e513368168c7fd275e0d4fc38ef82a51c1 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sat, 1 Nov 2014 22:51:34 +0100 +Subject: riched20: Silence repeated FIXMEs triggered by Adobe Reader. + +Adobe Reader calls these functions very often while scrolling through a document. +--- + dlls/riched20/richole.c | 38 ++++++++++++++++++++++++++++---------- + 1 file changed, 28 insertions(+), 10 deletions(-) + +diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c +index fe9af6a..9de460f 100644 +--- a/dlls/riched20/richole.c ++++ b/dlls/riched20/richole.c +@@ -146,6 +146,14 @@ static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, R + IUnknown_AddRef((IUnknown *)*ppvObj); + return S_OK; + } ++ ++ if (IsEqualGUID(riid, &IID_ITextServices)) ++ { ++ static int once; ++ if (!once++) FIXME("%p: unhandled interface IID_ITextServices\n", This); ++ return E_NOINTERFACE; ++ } ++ + FIXME("%p: unhandled interface %s\n", This, debugstr_guid(riid)); + + return E_NOINTERFACE; +@@ -676,11 +684,12 @@ static HRESULT WINAPI ITextPara_fnSetStyle(ITextPara *me, LONG Value) + + static HRESULT WINAPI ITextPara_fnGetAlignment(ITextPara *me, LONG *pValue) + { ++ static int once; + ITextParaImpl *This = impl_from_ITextPara(me); + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("not implemented: %p\n", This); ++ if (!once++) FIXME("not implemented: %p\n", This); + return E_NOTIMPL; + } + +@@ -1374,13 +1383,14 @@ static HRESULT WINAPI ITextFont_fnSetBackColor(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetBold(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = tomFalse; + return S_OK; + } +@@ -1417,13 +1427,14 @@ static HRESULT WINAPI ITextFont_fnSetEmboss(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetForeColor(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = tomAutoColor; + return S_OK; + } +@@ -1480,13 +1491,14 @@ static HRESULT WINAPI ITextFont_fnSetEngrave(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetItalic(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = tomFalse; + return S_OK; + } +@@ -1523,11 +1535,12 @@ static HRESULT WINAPI ITextFont_fnSetKerning(ITextFont *me, float Value) + + static HRESULT WINAPI ITextFont_fnGetLanguageID(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("not implemented: %p\n", This); ++ if (!once++) FIXME("not implemented: %p\n", This); + return E_NOTIMPL; + } + +@@ -1647,13 +1660,14 @@ static HRESULT WINAPI ITextFont_fnSetShadow(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetSize(ITextFont *me, float *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = 12.0; + return S_OK; + } +@@ -1710,13 +1724,14 @@ static HRESULT WINAPI ITextFont_fnSetSpacing(ITextFont *me, float Value) + + static HRESULT WINAPI ITextFont_fnGetStrikeThrough(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = tomFalse; + return S_OK; + } +@@ -1733,13 +1748,14 @@ static HRESULT WINAPI ITextFont_fnSetStrikeThrough(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetSubscript(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = tomFalse; + return S_OK; + } +@@ -1779,13 +1795,14 @@ static HRESULT WINAPI ITextFont_fnSetSuperscript(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetUnderline(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!pValue) + return E_INVALIDARG; + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("Stub\n"); ++ if (!once++) FIXME("Stub\n"); + *pValue = tomNone; + return S_OK; + } +@@ -1802,11 +1819,12 @@ static HRESULT WINAPI ITextFont_fnSetUnderline(ITextFont *me, LONG Value) + + static HRESULT WINAPI ITextFont_fnGetWeight(ITextFont *me, LONG *pValue) + { ++ static int once; + ITextFontImpl *This = impl_from_ITextFont(me); + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("not implemented: %p\n", This); ++ if (!once++) FIXME("not implemented: %p\n", This); + return E_NOTIMPL; + } + +-- +2.1.2 + diff --git a/patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection_fnGetDuplicate.patch b/patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection_fnGetDuplicate.patch new file mode 100644 index 00000000..41f62604 --- /dev/null +++ b/patches/riched20-IText_Interface/0012-riched20-Implement-ITextSelection_fnGetDuplicate.patch @@ -0,0 +1,37 @@ +From f5476c2bce17468ae3ca3e24248e76c8ca7a4fb9 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sat, 1 Nov 2014 23:07:09 +0100 +Subject: riched20: Implement ITextSelection_fnGetDuplicate. + +Fixes a crash with Adobe Reader when entering a page number. +--- + dlls/riched20/richole.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c +index 9de460f..84c8be4 100644 +--- a/dlls/riched20/richole.c ++++ b/dlls/riched20/richole.c +@@ -3178,11 +3178,17 @@ static HRESULT WINAPI ITextSelection_fnSetChar(ITextSelection *me, LONG ch) + static HRESULT WINAPI ITextSelection_fnGetDuplicate(ITextSelection *me, ITextRange **ppRange) + { + ITextSelectionImpl *This = impl_from_ITextSelection(me); ++ int start, end; ++ + if (!This->reOle) + return CO_E_RELEASED; + +- FIXME("not implemented\n"); +- return E_NOTIMPL; ++ TRACE("%p %p\n", This, ppRange); ++ if (!ppRange) ++ return E_INVALIDARG; ++ ++ ME_GetSelectionOfs(This->reOle->editor, &start, &end); ++ return CreateITextRange(This->reOle, start, end, ppRange); + } + + static HRESULT WINAPI ITextSelection_fnGetFormattedText(ITextSelection *me, ITextRange **ppRange) +-- +2.1.2 + diff --git a/patches/riched20-IText_Interface/definition b/patches/riched20-IText_Interface/definition index 356e7dab..b8de8ad1 100644 --- a/patches/riched20-IText_Interface/definition +++ b/patches/riched20-IText_Interface/definition @@ -18,5 +18,10 @@ Author: Jactry Zeng Subject: Implement ITextRange/Selection::{GetText,SetRange,IsEqual,GetStoryLength}. Revision: 1 +Author: Sebastian Lackner +Subject: Implement ITextSelection_fnGetDuplicate. +Revision: 1 + Fixes: [12458] Support for ITextDocument_fnRange function Fixes: [18303] Support for ITextRange, ITextFont and ITextPara +Fixes: Adobe Reader needs ITextSelection_fnGetDuplicate implementation