You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Added patch to silence a few FIXMEs and for ITextSelection_fnGetDuplicate implementation.
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
From 6bb871e513368168c7fd275e0d4fc38ef82a51c1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
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
|
||||
|
@@ -0,0 +1,37 @@
|
||||
From f5476c2bce17468ae3ca3e24248e76c8ca7a4fb9 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user