Rebase against 98b991fdcf3f2cdbdae7d61203367ce9728a5e6d.

This commit is contained in:
Sebastian Lackner 2015-05-25 18:59:24 +02:00
parent 83cbd1daaa
commit 2a1d1a0086
9 changed files with 340 additions and 461 deletions

View File

@ -55,7 +55,7 @@ version()
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
echo " commit 90ed96a766b4b627a5dd18d601b41257c4f8e390"
echo " commit 98b991fdcf3f2cdbdae7d61203367ce9728a5e6d"
echo ""
}

View File

@ -1,95 +1,18 @@
From 366724a8595982b9d1159509188899afb227ecf5 Mon Sep 17 00:00:00 2001
From cb74e4d8de36f0dfe8ab47f9a2a5394127142104 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}.
---
dlls/riched20/richole.c | 46 ++++++++++++--
dlls/riched20/tests/richole.c | 135 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 177 insertions(+), 4 deletions(-)
1 file changed, 135 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 3a4eb3b..f93f086 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -3270,14 +3270,33 @@ static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFir
return S_OK;
}
+static HRESULT range_SetStart(ME_TextEditor *editor, LONG cpFirst, LONG *start, LONG *end)
+{
+ int len = ME_GetTextLength(editor);
+
+ TRACE("%d\n", cpFirst);
+ if (cpFirst == *start)
+ return S_FALSE;
+ cpFirst = min(cpFirst, len);
+ cpFirst = max(cpFirst, 0);
+ *end = max(*end, cpFirst);
+ *start = cpFirst;
+ return S_OK;
+}
+
static HRESULT WINAPI ITextSelection_fnSetStart(ITextSelection *me, LONG cpFirst)
{
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_SetStart(This->reOle->editor, cpFirst, &start, &end);
+ if (!hres)
+ ME_SetSelection(This->reOle->editor, start, end);
+ return hres;
}
static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
@@ -3294,14 +3313,33 @@ static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
return S_OK;
}
+static HRESULT range_SetEnd(ME_TextEditor *editor, LONG cpLim, LONG *start, LONG *end)
+{
+ int len = ME_GetTextLength(editor) + 1;
+
+ TRACE("%d\n", cpLim);
+ if (cpLim == *end)
+ return S_FALSE;
+ cpLim = min(cpLim, len);
+ cpLim = max(cpLim, 0);
+ *start = min(*start, cpLim);
+ *end = cpLim;
+ return S_OK;
+}
+
static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
{
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_SetEnd(This->reOle->editor, cpLim, &start, &end);
+ if (!hres)
+ ME_SetSelection(This->reOle->editor, start, end);
+ return hres;
}
static HRESULT WINAPI ITextSelection_fnGetFont(ITextSelection *me, ITextFont **font)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 5472ce1..e654653 100644
index 18ee8e0..dbd8dd2 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1570,6 +1570,137 @@ static void test_ITextFont(void)
ITextFont_Release(font);
@@ -2034,6 +2034,137 @@ todo_wine
release_interfaces(&hwnd, &reOle, &doc, NULL);
}
+static void test_ITextRange_SetStart(void)
@ -226,8 +149,8 @@ index 5472ce1..e654653 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1582,12 +1713,16 @@ START_TEST(richole)
test_ITextSelection_GetText();
@@ -2046,12 +2177,16 @@ START_TEST(richole)
test_GetText();
test_ITextSelection_GetChar();
test_ITextSelection_GetStart_GetEnd();
+ test_ITextSelection_SetStart();

View File

@ -1,578 +1,496 @@
From 0d277bcbe13729530afaa53db2a5d0a55320011f Mon Sep 17 00:00:00 2001
From e230400e6ef35d424d13cbe9cc29e6cd1ffe6fad 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
ITextRange::GetFont and ITextSelection::GetFont.
---
dlls/riched20/richole.c | 207 ++++++++++++++++++++++++++++++++++++++++++
dlls/riched20/tests/richole.c | 93 +++++++++++++++++++
2 files changed, 300 insertions(+)
dlls/riched20/richole.c | 172 ++++++++++++++++++++++++++++++++++++++++++
dlls/riched20/tests/richole.c | 93 +++++++++++++++++++++++
2 files changed, 265 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 3706411..8d78df1 100644
index e09e771..de70bc3 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1761,9 +1761,21 @@ static ULONG WINAPI TextFont_Release(ITextFont *iface)
return ref;
}
+static IRichEditOleImpl *font_get_reole(ITextFontImpl *This)
+{
+ IRichEditOleImpl *reole;
+ ITextRange_QueryInterface(This->range, &IID_Igetrichole, (void**)&reole);
+ return reole;
+}
+
static HRESULT WINAPI TextFont_GetTypeInfoCount(ITextFont *iface, UINT *pctinfo)
{
+ ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("stub\n");
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
+
*pctinfo = 0;
return E_NOTIMPL;
}
@@ -1771,14 +1783,24 @@ static HRESULT WINAPI TextFont_GetTypeInfoCount(ITextFont *iface, UINT *pctinfo)
static HRESULT WINAPI TextFont_GetTypeInfo(ITextFont *iface, UINT iTInfo, LCID lcid,
ITypeInfo **ppTInfo)
{
+ ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("stub\n");
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
static HRESULT WINAPI TextFont_GetIDsOfNames(ITextFont *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
+ ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("stub\n");
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1793,7 +1815,12 @@ static HRESULT WINAPI TextFont_Invoke(
EXCEPINFO *pExcepInfo,
UINT *puArgErr)
{
+ ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("stub\n");
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1801,6 +1828,10 @@ static HRESULT WINAPI TextFont_GetDuplicate(ITextFont *iface, ITextFont **ret)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, ret);
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1808,6 +1839,10 @@ static HRESULT WINAPI TextFont_SetDuplicate(ITextFont *iface, ITextFont *pFont)
@@ -1960,6 +1960,10 @@ static HRESULT WINAPI TextFont_SetDuplicate(ITextFont *iface, ITextFont *pFont)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, pFont);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1815,6 +1850,10 @@ static HRESULT WINAPI TextFont_CanChange(ITextFont *iface, LONG *ret)
@@ -1967,6 +1971,10 @@ static HRESULT WINAPI TextFont_CanChange(ITextFont *iface, LONG *ret)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, ret);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1822,6 +1861,10 @@ static HRESULT WINAPI TextFont_IsEqual(ITextFont *iface, ITextFont *font, LONG *
@@ -1974,6 +1982,10 @@ static HRESULT WINAPI TextFont_IsEqual(ITextFont *iface, ITextFont *font, LONG *
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p %p): stub\n", This, font, ret);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1829,6 +1872,10 @@ static HRESULT WINAPI TextFont_Reset(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1836,6 +1883,10 @@ static HRESULT WINAPI TextFont_GetStyle(ITextFont *iface, LONG *value)
@@ -2001,6 +2013,10 @@ static HRESULT WINAPI TextFont_GetStyle(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1843,6 +1894,10 @@ static HRESULT WINAPI TextFont_SetStyle(ITextFont *iface, LONG value)
@@ -2008,6 +2024,10 @@ static HRESULT WINAPI TextFont_SetStyle(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1850,6 +1905,10 @@ static HRESULT WINAPI TextFont_GetAllCaps(ITextFont *iface, LONG *value)
@@ -2015,6 +2035,10 @@ static HRESULT WINAPI TextFont_GetAllCaps(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1857,6 +1916,10 @@ static HRESULT WINAPI TextFont_SetAllCaps(ITextFont *iface, LONG value)
@@ -2022,6 +2046,10 @@ static HRESULT WINAPI TextFont_SetAllCaps(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1864,6 +1927,10 @@ static HRESULT WINAPI TextFont_GetAnimation(ITextFont *iface, LONG *value)
@@ -2029,6 +2057,10 @@ static HRESULT WINAPI TextFont_GetAnimation(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1871,6 +1938,10 @@ static HRESULT WINAPI TextFont_SetAnimation(ITextFont *iface, LONG value)
@@ -2036,6 +2068,10 @@ static HRESULT WINAPI TextFont_SetAnimation(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1878,6 +1949,10 @@ static HRESULT WINAPI TextFont_GetBackColor(ITextFont *iface, LONG *value)
@@ -2043,6 +2079,10 @@ static HRESULT WINAPI TextFont_GetBackColor(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1885,6 +1960,10 @@ static HRESULT WINAPI TextFont_SetBackColor(ITextFont *iface, LONG value)
@@ -2050,6 +2090,10 @@ static HRESULT WINAPI TextFont_SetBackColor(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1899,6 +1978,10 @@ static HRESULT WINAPI TextFont_SetBold(ITextFont *iface, LONG value)
@@ -2064,6 +2108,10 @@ static HRESULT WINAPI TextFont_SetBold(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1906,6 +1989,10 @@ static HRESULT WINAPI TextFont_GetEmboss(ITextFont *iface, LONG *value)
@@ -2071,6 +2119,10 @@ static HRESULT WINAPI TextFont_GetEmboss(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1913,6 +2000,10 @@ static HRESULT WINAPI TextFont_SetEmboss(ITextFont *iface, LONG value)
@@ -2078,6 +2130,10 @@ static HRESULT WINAPI TextFont_SetEmboss(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1927,6 +2018,10 @@ static HRESULT WINAPI TextFont_SetForeColor(ITextFont *iface, LONG value)
@@ -2092,6 +2148,10 @@ static HRESULT WINAPI TextFont_SetForeColor(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1934,6 +2029,10 @@ static HRESULT WINAPI TextFont_GetHidden(ITextFont *iface, LONG *value)
@@ -2099,6 +2159,10 @@ static HRESULT WINAPI TextFont_GetHidden(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1941,6 +2040,10 @@ static HRESULT WINAPI TextFont_SetHidden(ITextFont *iface, LONG value)
@@ -2106,6 +2170,10 @@ static HRESULT WINAPI TextFont_SetHidden(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1948,6 +2051,10 @@ static HRESULT WINAPI TextFont_GetEngrave(ITextFont *iface, LONG *value)
@@ -2113,6 +2181,10 @@ static HRESULT WINAPI TextFont_GetEngrave(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1955,6 +2062,10 @@ static HRESULT WINAPI TextFont_SetEngrave(ITextFont *iface, LONG value)
@@ -2120,6 +2192,10 @@ static HRESULT WINAPI TextFont_SetEngrave(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1969,6 +2080,10 @@ static HRESULT WINAPI TextFont_SetItalic(ITextFont *iface, LONG value)
@@ -2134,6 +2210,10 @@ static HRESULT WINAPI TextFont_SetItalic(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1976,6 +2091,10 @@ static HRESULT WINAPI TextFont_GetKerning(ITextFont *iface, FLOAT *value)
@@ -2141,6 +2221,10 @@ static HRESULT WINAPI TextFont_GetKerning(ITextFont *iface, FLOAT *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1983,6 +2102,10 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value)
@@ -2148,6 +2232,10 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -1997,6 +2120,10 @@ static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value)
@@ -2162,6 +2250,10 @@ static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2034,6 +2161,10 @@ static HRESULT WINAPI TextFont_SetName(ITextFont *iface, BSTR value)
@@ -2198,6 +2290,10 @@ static HRESULT WINAPI TextFont_SetName(ITextFont *iface, BSTR value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%s): stub\n", This, debugstr_w(value));
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2041,6 +2172,10 @@ static HRESULT WINAPI TextFont_GetOutline(ITextFont *iface, LONG *value)
@@ -2205,6 +2301,10 @@ static HRESULT WINAPI TextFont_GetOutline(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2048,6 +2183,10 @@ static HRESULT WINAPI TextFont_SetOutline(ITextFont *iface, LONG value)
@@ -2212,6 +2312,10 @@ static HRESULT WINAPI TextFont_SetOutline(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2055,6 +2194,10 @@ static HRESULT WINAPI TextFont_GetPosition(ITextFont *iface, FLOAT *value)
@@ -2219,6 +2323,10 @@ static HRESULT WINAPI TextFont_GetPosition(ITextFont *iface, FLOAT *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2062,6 +2205,10 @@ static HRESULT WINAPI TextFont_SetPosition(ITextFont *iface, FLOAT value)
@@ -2226,6 +2334,10 @@ static HRESULT WINAPI TextFont_SetPosition(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2069,6 +2216,10 @@ static HRESULT WINAPI TextFont_GetProtected(ITextFont *iface, LONG *value)
@@ -2233,6 +2345,10 @@ static HRESULT WINAPI TextFont_GetProtected(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2076,6 +2227,10 @@ static HRESULT WINAPI TextFont_SetProtected(ITextFont *iface, LONG value)
@@ -2240,6 +2356,10 @@ static HRESULT WINAPI TextFont_SetProtected(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2083,6 +2238,10 @@ static HRESULT WINAPI TextFont_GetShadow(ITextFont *iface, LONG *value)
@@ -2247,6 +2367,10 @@ static HRESULT WINAPI TextFont_GetShadow(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2090,6 +2249,10 @@ static HRESULT WINAPI TextFont_SetShadow(ITextFont *iface, LONG value)
@@ -2254,6 +2378,10 @@ static HRESULT WINAPI TextFont_SetShadow(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2104,6 +2267,10 @@ static HRESULT WINAPI TextFont_SetSize(ITextFont *iface, FLOAT value)
@@ -2268,6 +2396,10 @@ static HRESULT WINAPI TextFont_SetSize(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2111,6 +2278,10 @@ static HRESULT WINAPI TextFont_GetSmallCaps(ITextFont *iface, LONG *value)
@@ -2275,6 +2407,10 @@ static HRESULT WINAPI TextFont_GetSmallCaps(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2118,6 +2289,10 @@ static HRESULT WINAPI TextFont_SetSmallCaps(ITextFont *iface, LONG value)
@@ -2282,6 +2418,10 @@ static HRESULT WINAPI TextFont_SetSmallCaps(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2125,6 +2300,10 @@ static HRESULT WINAPI TextFont_GetSpacing(ITextFont *iface, FLOAT *value)
@@ -2289,6 +2429,10 @@ static HRESULT WINAPI TextFont_GetSpacing(ITextFont *iface, FLOAT *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2132,6 +2311,10 @@ static HRESULT WINAPI TextFont_SetSpacing(ITextFont *iface, FLOAT value)
@@ -2296,6 +2440,10 @@ static HRESULT WINAPI TextFont_SetSpacing(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2146,6 +2329,10 @@ static HRESULT WINAPI TextFont_SetStrikeThrough(ITextFont *iface, LONG value)
@@ -2310,6 +2458,10 @@ static HRESULT WINAPI TextFont_SetStrikeThrough(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2160,6 +2347,10 @@ static HRESULT WINAPI TextFont_SetSubscript(ITextFont *iface, LONG value)
@@ -2324,6 +2476,10 @@ static HRESULT WINAPI TextFont_SetSubscript(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2174,6 +2365,10 @@ static HRESULT WINAPI TextFont_SetSuperscript(ITextFont *iface, LONG value)
@@ -2338,6 +2494,10 @@ static HRESULT WINAPI TextFont_SetSuperscript(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2188,6 +2383,10 @@ static HRESULT WINAPI TextFont_SetUnderline(ITextFont *iface, LONG value)
@@ -2352,6 +2512,10 @@ static HRESULT WINAPI TextFont_SetUnderline(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2195,6 +2394,10 @@ static HRESULT WINAPI TextFont_GetWeight(ITextFont *iface, LONG *value)
@@ -2359,6 +2523,10 @@ static HRESULT WINAPI TextFont_GetWeight(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2202,6 +2405,10 @@ static HRESULT WINAPI TextFont_SetWeight(ITextFont *iface, LONG value)
@@ -2366,6 +2534,10 @@ static HRESULT WINAPI TextFont_SetWeight(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 0d0bb41..26f97d1 100644
index dbd8dd2..8b72a1d 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1704,6 +1704,97 @@ static void test_ITextSelection_SetEnd(void)
@@ -2165,6 +2165,97 @@ static void test_ITextSelection_SetEnd(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
@ -670,7 +588,7 @@ index 0d0bb41..26f97d1 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1719,6 +1810,7 @@ START_TEST(richole)
@@ -2180,6 +2271,7 @@ START_TEST(richole)
test_ITextSelection_SetStart();
test_ITextSelection_SetEnd();
test_ITextSelection_Collapse();
@ -678,7 +596,7 @@ index 0d0bb41..26f97d1 100644
test_ITextDocument_Range();
test_ITextRange_GetChar();
test_ITextRange_GetStart_GetEnd();
@@ -1726,6 +1818,7 @@ START_TEST(richole)
@@ -2187,6 +2279,7 @@ START_TEST(richole)
test_ITextRange_Collapse();
test_ITextRange_SetStart();
test_ITextRange_SetEnd();

View File

@ -1,19 +1,19 @@
From 4fb5a547a488fe7e1e1acfc090ae0e919f7f0e65 Mon Sep 17 00:00:00 2001
From 39049f221562446f83685c72e72aaf002a6dbf70 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
ITextRange::GetPara.
---
dlls/riched20/richole.c | 222 ++++++++++++++++++++++++++++++++++++++++++
dlls/riched20/tests/richole.c | 47 +++++++++
2 files changed, 269 insertions(+)
dlls/riched20/richole.c | 202 ++++++++++++++++++++++++++++++++++++++++++
dlls/riched20/tests/richole.c | 47 ++++++++++
2 files changed, 249 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 71fb311..f664616 100644
index de70bc3..9605404 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -2515,9 +2515,24 @@ static ULONG WINAPI TextPara_Release(ITextPara *iface)
@@ -2668,6 +2668,16 @@ static ULONG WINAPI TextPara_Release(ITextPara *iface)
return ref;
}
@ -29,54 +29,8 @@ index 71fb311..f664616 100644
+
static HRESULT WINAPI TextPara_GetTypeInfoCount(ITextPara *iface, UINT *pctinfo)
{
+ ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("stub\n");
+
+ if (!para_get_reole(This))
+ return CO_E_RELEASED;
+
*pctinfo = 0;
return E_NOTIMPL;
}
@@ -2525,14 +2540,24 @@ static HRESULT WINAPI TextPara_GetTypeInfoCount(ITextPara *iface, UINT *pctinfo)
static HRESULT WINAPI TextPara_GetTypeInfo(ITextPara *iface, UINT iTInfo, LCID lcid,
ITypeInfo **ppTInfo)
{
+ ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("stub\n");
+
+ if (!para_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
static HRESULT WINAPI TextPara_GetIDsOfNames(ITextPara *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
+ ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("stub\n");
+
+ if (!para_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2547,7 +2572,12 @@ static HRESULT WINAPI TextPara_Invoke(
EXCEPINFO *pExcepInfo,
UINT *puArgErr)
{
+ ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("stub\n");
+
+ if (!para_get_reole(This))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2555,6 +2585,10 @@ static HRESULT WINAPI TextPara_GetDuplicate(ITextPara *iface, ITextPara **ret)
ITextParaImpl *This = impl_from_ITextPara(iface);
@@ -2734,6 +2744,10 @@ static HRESULT WINAPI TextPara_GetDuplicate(ITextPara *iface, ITextPara **ret)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, ret);
@ -87,7 +41,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2562,6 +2596,10 @@ static HRESULT WINAPI TextPara_SetDuplicate(ITextPara *iface, ITextPara *para)
@@ -2741,6 +2755,10 @@ static HRESULT WINAPI TextPara_SetDuplicate(ITextPara *iface, ITextPara *para)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, para);
@ -98,7 +52,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2569,6 +2607,10 @@ static HRESULT WINAPI TextPara_CanChange(ITextPara *iface, LONG *ret)
@@ -2748,6 +2766,10 @@ static HRESULT WINAPI TextPara_CanChange(ITextPara *iface, LONG *ret)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, ret);
@ -109,7 +63,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2576,6 +2618,10 @@ static HRESULT WINAPI TextPara_IsEqual(ITextPara *iface, ITextPara *para, LONG *
@@ -2755,6 +2777,10 @@ static HRESULT WINAPI TextPara_IsEqual(ITextPara *iface, ITextPara *para, LONG *
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p %p)\n", This, para, ret);
@ -120,7 +74,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2583,6 +2629,10 @@ static HRESULT WINAPI TextPara_Reset(ITextPara *iface, LONG value)
@@ -2762,6 +2788,10 @@ static HRESULT WINAPI TextPara_Reset(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -131,7 +85,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2590,6 +2640,10 @@ static HRESULT WINAPI TextPara_GetStyle(ITextPara *iface, LONG *value)
@@ -2769,6 +2799,10 @@ static HRESULT WINAPI TextPara_GetStyle(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -142,7 +96,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2597,6 +2651,10 @@ static HRESULT WINAPI TextPara_SetStyle(ITextPara *iface, LONG value)
@@ -2776,6 +2810,10 @@ static HRESULT WINAPI TextPara_SetStyle(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -153,7 +107,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2604,6 +2662,10 @@ static HRESULT WINAPI TextPara_GetAlignment(ITextPara *iface, LONG *value)
@@ -2783,6 +2821,10 @@ static HRESULT WINAPI TextPara_GetAlignment(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -164,7 +118,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2611,6 +2673,10 @@ static HRESULT WINAPI TextPara_SetAlignment(ITextPara *iface, LONG value)
@@ -2790,6 +2832,10 @@ static HRESULT WINAPI TextPara_SetAlignment(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -175,7 +129,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2618,6 +2684,10 @@ static HRESULT WINAPI TextPara_GetHyphenation(ITextPara *iface, LONG *value)
@@ -2797,6 +2843,10 @@ static HRESULT WINAPI TextPara_GetHyphenation(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -186,7 +140,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2625,6 +2695,10 @@ static HRESULT WINAPI TextPara_SetHyphenation(ITextPara *iface, LONG value)
@@ -2804,6 +2854,10 @@ static HRESULT WINAPI TextPara_SetHyphenation(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -197,7 +151,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2632,6 +2706,10 @@ static HRESULT WINAPI TextPara_GetFirstLineIndent(ITextPara *iface, FLOAT *value
@@ -2811,6 +2865,10 @@ static HRESULT WINAPI TextPara_GetFirstLineIndent(ITextPara *iface, FLOAT *value
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -208,7 +162,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2639,6 +2717,10 @@ static HRESULT WINAPI TextPara_GetKeepTogether(ITextPara *iface, LONG *value)
@@ -2818,6 +2876,10 @@ static HRESULT WINAPI TextPara_GetKeepTogether(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -219,7 +173,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2646,6 +2728,10 @@ static HRESULT WINAPI TextPara_SetKeepTogether(ITextPara *iface, LONG value)
@@ -2825,6 +2887,10 @@ static HRESULT WINAPI TextPara_SetKeepTogether(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -230,7 +184,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2653,6 +2739,10 @@ static HRESULT WINAPI TextPara_GetKeepWithNext(ITextPara *iface, LONG *value)
@@ -2832,6 +2898,10 @@ static HRESULT WINAPI TextPara_GetKeepWithNext(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -241,7 +195,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2660,6 +2750,10 @@ static HRESULT WINAPI TextPara_SetKeepWithNext(ITextPara *iface, LONG value)
@@ -2839,6 +2909,10 @@ static HRESULT WINAPI TextPara_SetKeepWithNext(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -252,7 +206,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2667,6 +2761,10 @@ static HRESULT WINAPI TextPara_GetLeftIndent(ITextPara *iface, FLOAT *value)
@@ -2846,6 +2920,10 @@ static HRESULT WINAPI TextPara_GetLeftIndent(ITextPara *iface, FLOAT *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -263,7 +217,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2674,6 +2772,10 @@ static HRESULT WINAPI TextPara_GetLineSpacing(ITextPara *iface, FLOAT *value)
@@ -2853,6 +2931,10 @@ static HRESULT WINAPI TextPara_GetLineSpacing(ITextPara *iface, FLOAT *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -274,7 +228,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2681,6 +2783,10 @@ static HRESULT WINAPI TextPara_GetLineSpacingRule(ITextPara *iface, LONG *value)
@@ -2860,6 +2942,10 @@ static HRESULT WINAPI TextPara_GetLineSpacingRule(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -285,7 +239,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2688,6 +2794,10 @@ static HRESULT WINAPI TextPara_GetListAlignment(ITextPara *iface, LONG *value)
@@ -2867,6 +2953,10 @@ static HRESULT WINAPI TextPara_GetListAlignment(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -296,7 +250,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2695,6 +2805,10 @@ static HRESULT WINAPI TextPara_SetListAlignment(ITextPara *iface, LONG value)
@@ -2874,6 +2964,10 @@ static HRESULT WINAPI TextPara_SetListAlignment(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -307,7 +261,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2702,6 +2816,10 @@ static HRESULT WINAPI TextPara_GetListLevelIndex(ITextPara *iface, LONG *value)
@@ -2881,6 +2975,10 @@ static HRESULT WINAPI TextPara_GetListLevelIndex(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -318,7 +272,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2709,6 +2827,10 @@ static HRESULT WINAPI TextPara_SetListLevelIndex(ITextPara *iface, LONG value)
@@ -2888,6 +2986,10 @@ static HRESULT WINAPI TextPara_SetListLevelIndex(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -329,7 +283,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2716,6 +2838,10 @@ static HRESULT WINAPI TextPara_GetListStart(ITextPara *iface, LONG *value)
@@ -2895,6 +2997,10 @@ static HRESULT WINAPI TextPara_GetListStart(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -340,7 +294,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2723,6 +2849,10 @@ static HRESULT WINAPI TextPara_SetListStart(ITextPara *iface, LONG value)
@@ -2902,6 +3008,10 @@ static HRESULT WINAPI TextPara_SetListStart(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -351,7 +305,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2730,6 +2860,10 @@ static HRESULT WINAPI TextPara_GetListTab(ITextPara *iface, FLOAT *value)
@@ -2909,6 +3019,10 @@ static HRESULT WINAPI TextPara_GetListTab(ITextPara *iface, FLOAT *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -362,7 +316,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2737,6 +2871,10 @@ static HRESULT WINAPI TextPara_SetListTab(ITextPara *iface, FLOAT value)
@@ -2916,6 +3030,10 @@ static HRESULT WINAPI TextPara_SetListTab(ITextPara *iface, FLOAT value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f)\n", This, value);
@ -373,7 +327,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2744,6 +2882,10 @@ static HRESULT WINAPI TextPara_GetListType(ITextPara *iface, LONG *value)
@@ -2923,6 +3041,10 @@ static HRESULT WINAPI TextPara_GetListType(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -384,7 +338,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2751,6 +2893,10 @@ static HRESULT WINAPI TextPara_SetListType(ITextPara *iface, LONG value)
@@ -2930,6 +3052,10 @@ static HRESULT WINAPI TextPara_SetListType(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -395,7 +349,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2758,6 +2904,10 @@ static HRESULT WINAPI TextPara_GetNoLineNumber(ITextPara *iface, LONG *value)
@@ -2937,6 +3063,10 @@ static HRESULT WINAPI TextPara_GetNoLineNumber(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -406,7 +360,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2765,6 +2915,10 @@ static HRESULT WINAPI TextPara_SetNoLineNumber(ITextPara *iface, LONG value)
@@ -2944,6 +3074,10 @@ static HRESULT WINAPI TextPara_SetNoLineNumber(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -417,7 +371,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2772,6 +2926,10 @@ static HRESULT WINAPI TextPara_GetPageBreakBefore(ITextPara *iface, LONG *value)
@@ -2951,6 +3085,10 @@ static HRESULT WINAPI TextPara_GetPageBreakBefore(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -428,7 +382,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2779,6 +2937,10 @@ static HRESULT WINAPI TextPara_SetPageBreakBefore(ITextPara *iface, LONG value)
@@ -2958,6 +3096,10 @@ static HRESULT WINAPI TextPara_SetPageBreakBefore(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -439,7 +393,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2786,6 +2948,10 @@ static HRESULT WINAPI TextPara_GetRightIndent(ITextPara *iface, FLOAT *value)
@@ -2965,6 +3107,10 @@ static HRESULT WINAPI TextPara_GetRightIndent(ITextPara *iface, FLOAT *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -450,7 +404,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2793,6 +2959,10 @@ static HRESULT WINAPI TextPara_SetRightIndent(ITextPara *iface, FLOAT value)
@@ -2972,6 +3118,10 @@ static HRESULT WINAPI TextPara_SetRightIndent(ITextPara *iface, FLOAT value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f)\n", This, value);
@ -461,7 +415,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2800,6 +2970,10 @@ static HRESULT WINAPI TextPara_SetIndents(ITextPara *iface, FLOAT StartIndent, F
@@ -2979,6 +3129,10 @@ static HRESULT WINAPI TextPara_SetIndents(ITextPara *iface, FLOAT StartIndent, F
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f %.2f %.2f)\n", This, StartIndent, LeftIndent, RightIndent);
@ -472,7 +426,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2807,6 +2981,10 @@ static HRESULT WINAPI TextPara_SetLineSpacing(ITextPara *iface, LONG LineSpacing
@@ -2986,6 +3140,10 @@ static HRESULT WINAPI TextPara_SetLineSpacing(ITextPara *iface, LONG LineSpacing
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d %.2f)\n", This, LineSpacingRule, LineSpacing);
@ -483,7 +437,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2814,6 +2992,10 @@ static HRESULT WINAPI TextPara_GetSpaceAfter(ITextPara *iface, FLOAT *value)
@@ -2993,6 +3151,10 @@ static HRESULT WINAPI TextPara_GetSpaceAfter(ITextPara *iface, FLOAT *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -494,7 +448,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2821,6 +3003,10 @@ static HRESULT WINAPI TextPara_SetSpaceAfter(ITextPara *iface, FLOAT value)
@@ -3000,6 +3162,10 @@ static HRESULT WINAPI TextPara_SetSpaceAfter(ITextPara *iface, FLOAT value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f)\n", This, value);
@ -505,7 +459,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2828,6 +3014,10 @@ static HRESULT WINAPI TextPara_GetSpaceBefore(ITextPara *iface, FLOAT *value)
@@ -3007,6 +3173,10 @@ static HRESULT WINAPI TextPara_GetSpaceBefore(ITextPara *iface, FLOAT *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -516,7 +470,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2835,6 +3025,10 @@ static HRESULT WINAPI TextPara_SetSpaceBefore(ITextPara *iface, FLOAT value)
@@ -3014,6 +3184,10 @@ static HRESULT WINAPI TextPara_SetSpaceBefore(ITextPara *iface, FLOAT value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f)\n", This, value);
@ -527,7 +481,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2842,6 +3036,10 @@ static HRESULT WINAPI TextPara_GetWidowControl(ITextPara *iface, LONG *value)
@@ -3021,6 +3195,10 @@ static HRESULT WINAPI TextPara_GetWidowControl(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -538,7 +492,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2849,6 +3047,10 @@ static HRESULT WINAPI TextPara_SetWidowControl(ITextPara *iface, LONG value)
@@ -3028,6 +3206,10 @@ static HRESULT WINAPI TextPara_SetWidowControl(ITextPara *iface, LONG value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d)\n", This, value);
@ -549,7 +503,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2856,6 +3058,10 @@ static HRESULT WINAPI TextPara_GetTabCount(ITextPara *iface, LONG *value)
@@ -3035,6 +3217,10 @@ static HRESULT WINAPI TextPara_GetTabCount(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%p)\n", This, value);
@ -560,7 +514,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2863,6 +3069,10 @@ static HRESULT WINAPI TextPara_AddTab(ITextPara *iface, FLOAT tbPos, LONG tbAlig
@@ -3042,6 +3228,10 @@ static HRESULT WINAPI TextPara_AddTab(ITextPara *iface, FLOAT tbPos, LONG tbAlig
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f %d %d)\n", This, tbPos, tbAlign, tbLeader);
@ -571,7 +525,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2870,6 +3080,10 @@ static HRESULT WINAPI TextPara_ClearAllTabs(ITextPara *iface)
@@ -3049,6 +3239,10 @@ static HRESULT WINAPI TextPara_ClearAllTabs(ITextPara *iface)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)\n", This);
@ -582,7 +536,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2877,6 +3091,10 @@ static HRESULT WINAPI TextPara_DeleteTab(ITextPara *iface, FLOAT pos)
@@ -3056,6 +3250,10 @@ static HRESULT WINAPI TextPara_DeleteTab(ITextPara *iface, FLOAT pos)
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%.2f)\n", This, pos);
@ -593,7 +547,7 @@ index 71fb311..f664616 100644
return E_NOTIMPL;
}
@@ -2884,6 +3102,10 @@ static HRESULT WINAPI TextPara_GetTab(ITextPara *iface, LONG iTab, FLOAT *ptbPos
@@ -3063,6 +3261,10 @@ static HRESULT WINAPI TextPara_GetTab(ITextPara *iface, LONG iTab, FLOAT *ptbPos
{
ITextParaImpl *This = impl_from_ITextPara(iface);
FIXME("(%p)->(%d %p %p %p)\n", This, iTab, ptbPos, ptbAlign, ptbLeader);
@ -605,10 +559,10 @@ index 71fb311..f664616 100644
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 40577b3..065c86c 100644
index 8b72a1d..ab94b58 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1637,6 +1637,52 @@ static void test_ITextSelection_GetFont(void)
@@ -2256,6 +2256,52 @@ static void test_ITextSelection_GetFont(void)
ITextFont_Release(txtFont);
}
@ -661,7 +615,7 @@ index 40577b3..065c86c 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1661,6 +1707,7 @@ START_TEST(richole)
@@ -2280,6 +2326,7 @@ START_TEST(richole)
test_ITextRange_SetStart();
test_ITextRange_SetEnd();
test_ITextRange_GetFont();

View File

@ -1,4 +1,4 @@
From 9e71184f8215f3693f9b1418225dfbc2c7b57d77 Mon Sep 17 00:00:00 2001
From 2a85e756deac893ec3b83a03c1fb4e0b85be829f 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,19 +1,19 @@
From 94fce2253318d11cb2cdc7681d639c795b816b27 Mon Sep 17 00:00:00 2001
From 842d74c575aa057b5c093bc8570568bb88e6216b 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.
---
dlls/riched20/richole.c | 50 +++++++++++++++++++++++++------------------
dlls/riched20/tests/richole.c | 38 ++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 21 deletions(-)
dlls/riched20/richole.c | 52 +++++++++++++++++++++++++------------------
dlls/riched20/tests/richole.c | 52 +++++++++++++++++++++++++++++++------------
2 files changed, 68 insertions(+), 36 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index ee9f75c..3813c4f 100644
index 9605404..da375e0 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1045,14 +1045,40 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
return E_NOTIMPL;
@@ -1145,11 +1145,36 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
return hr;
}
+static HRESULT range_GetText(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, BSTR *pbstr)
@ -44,10 +44,17 @@ index ee9f75c..3813c4f 100644
{
ITextRangeImpl *This = impl_from_ITextRange(me);
+ ME_Cursor start, end;
- FIXME("(%p)->(%p): stub\n", This, pbstr);
+ TRACE("(%p)->(%p)\n", This, pbstr);
if (!This->reOle)
return CO_E_RELEASED;
@@ -1157,8 +1182,9 @@ static HRESULT WINAPI ITextRange_fnGetText(ITextRange *me, BSTR *pbstr)
if (!pbstr)
return E_INVALIDARG;
- FIXME("not implemented %p\n", This);
- *pbstr = NULL;
- return E_NOTIMPL;
+ ME_CursorFromCharOfs(This->reOle->editor, This->start, &start);
+ ME_CursorFromCharOfs(This->reOle->editor, This->end, &end);
@ -55,7 +62,7 @@ index ee9f75c..3813c4f 100644
}
static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
@@ -3589,8 +3615,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
@@ -3762,8 +3788,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
ME_Cursor *start = NULL, *end = NULL;
@ -64,7 +71,7 @@ index ee9f75c..3813c4f 100644
TRACE("(%p)->(%p)\n", This, pbstr);
@@ -3601,23 +3625,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
@@ -3774,23 +3798,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
return E_INVALIDARG;
ME_GetSelection(This->reOle->editor, &start, &end);
@ -90,10 +97,87 @@ index ee9f75c..3813c4f 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 44e6051..583b195 100644
index ab94b58..aaeb0c9 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1838,6 +1838,43 @@ static void test_ITextRange_GetPara(void)
@@ -527,27 +527,22 @@ static void test_GetText(void)
hres = ITextDocument_Range(txtDoc, 0, 4, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine {
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!lstrcmpW(bstr, bufW1), "got wrong text: %s\n", wine_dbgstr_w(bstr));
-}
SysFreeString(bstr);
ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 4, 0, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine {
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!lstrcmpW(bstr, bufW1), "got wrong text: %s\n", wine_dbgstr_w(bstr));
-}
SysFreeString(bstr);
ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 1, 1, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!bstr, "got wrong text: %s\n", wine_dbgstr_w(bstr));
if (!is64bit)
@@ -560,37 +555,30 @@ todo_wine
hres = ITextDocument_Range(txtDoc, 8, 12, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine {
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!lstrcmpW(bstr, bufW3), "got wrong text: %s\n", wine_dbgstr_w(bstr));
-}
SysFreeString(bstr);
ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 8, 13, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine {
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!lstrcmpW(bstr, bufW2), "got wrong text: %s\n", wine_dbgstr_w(bstr));
-}
SysFreeString(bstr);
ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 12, 13, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine {
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!lstrcmpW(bstr, bufW5), "got wrong text: %s\n", wine_dbgstr_w(bstr));
-}
SysFreeString(bstr);
ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 0, -1, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!bstr, "got wrong text: %s\n", wine_dbgstr_w(bstr));
ITextRange_Release(range);
@@ -598,10 +586,8 @@ todo_wine
hres = ITextDocument_Range(txtDoc, -1, 9, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
-todo_wine {
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(!lstrcmpW(bstr, bufW6), "got wrong text: %s\n", wine_dbgstr_w(bstr));
-}
SysFreeString(bstr);
release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -2302,6 +2288,43 @@ static void test_ITextRange_GetPara(void)
ITextPara_Release(txtPara);
}
@ -137,7 +221,7 @@ index 44e6051..583b195 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1863,6 +1900,7 @@ START_TEST(richole)
@@ -2327,6 +2350,7 @@ START_TEST(richole)
test_ITextRange_SetEnd();
test_ITextRange_GetFont();
test_ITextRange_GetPara();

View File

@ -1,4 +1,4 @@
From 69ba6ab1953ff29538b3db3dcf87d02175c355ed Mon Sep 17 00:00:00 2001
From ec06a4056cf8d7559020027563ce34e0158cda8a 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.
@ -9,10 +9,10 @@ Adobe Reader calls these functions very often while scrolling through a document
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 5d017e9..b5c2b9b 100644
index 438de75..e722ef7 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -394,6 +394,14 @@ static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, R
@@ -495,6 +495,14 @@ static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, R
IUnknown_AddRef((IUnknown *)*ppvObj);
return S_OK;
}
@ -27,7 +27,7 @@ index 5d017e9..b5c2b9b 100644
FIXME("%p: unhandled interface %s\n", This, debugstr_guid(riid));
return E_NOINTERFACE;
@@ -2434,7 +2442,9 @@ static HRESULT WINAPI TextFont_SetUnderline(ITextFont *iface, LONG value)
@@ -2587,7 +2595,9 @@ static HRESULT WINAPI TextFont_SetUnderline(ITextFont *iface, LONG value)
static HRESULT WINAPI TextFont_GetWeight(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
@ -36,9 +36,9 @@ index 5d017e9..b5c2b9b 100644
+
+ if (!once++) FIXME("(%p)->(%p): stub\n", This, value);
if (!font_get_reole(This))
if (This->range && !get_range_reole(This->range))
return CO_E_RELEASED;
@@ -2726,7 +2736,9 @@ static HRESULT WINAPI TextPara_SetStyle(ITextPara *iface, LONG value)
@@ -2885,7 +2895,9 @@ static HRESULT WINAPI TextPara_SetStyle(ITextPara *iface, LONG value)
static HRESULT WINAPI TextPara_GetAlignment(ITextPara *iface, LONG *value)
{
ITextParaImpl *This = impl_from_ITextPara(iface);

View File

@ -1,4 +1,4 @@
From 0140f5051aba3492e958ed4baf075a328de03c5e Mon Sep 17 00:00:00 2001
From 6386c73e63e8227dda54e77f18fa68031c220710 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 20 Dec 2012 13:09:17 +0100
Subject: wined3d: Move the framebuffer into wined3d_state
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
13 files changed, 172 insertions(+), 127 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index f70562e..718ae0a 100644
index 83136bd..f21d672 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -684,7 +684,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
@ -32,7 +32,7 @@ index f70562e..718ae0a 100644
/* Load DirectX 9 float constants for pixel shader */
priv->highest_dirty_ps_const = shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
@@ -4652,7 +4652,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
@@ -4694,7 +4694,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
}
else
{
@ -42,10 +42,10 @@ index f70562e..718ae0a 100644
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 728a7cc..bf77b69 100644
index c492978..1c4f077 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1453,6 +1453,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1462,6 +1462,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
goto out;
}
@ -58,7 +58,7 @@ index 728a7cc..bf77b69 100644
/* Initialize the texture unit mapping to a 1:1 mapping */
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
{
@@ -1770,6 +1776,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1779,6 +1785,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
out:
device->shader_backend->shader_free_context_data(ret);
device->adapter->fragment_pipe->free_context_data(ret);
@ -66,7 +66,7 @@ index 728a7cc..bf77b69 100644
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
@@ -1804,6 +1811,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
@@ -1813,6 +1820,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
device->shader_backend->shader_free_context_data(context);
device->adapter->fragment_pipe->free_context_data(context);
@ -74,7 +74,7 @@ index 728a7cc..bf77b69 100644
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
HeapFree(GetProcessHeap(), 0, context->blit_targets);
device_context_remove(device, context);
@@ -2318,7 +2326,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2328,7 +2336,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
DWORD rt_mask = 0, *cur_mask;
UINT i;
@ -82,8 +82,8 @@ index 728a7cc..bf77b69 100644
+ if (isStateDirty(context, STATE_FRAMEBUFFER) || !wined3d_fb_equal(fb, &context->current_fb)
|| rt_count != context->gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
@@ -2361,6 +2369,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2373,6 +2381,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
rt_mask = context_generate_rt_mask_no_fbo(device,
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
}
@ -92,7 +92,7 @@ index 728a7cc..bf77b69 100644
}
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
@@ -2411,7 +2421,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2423,7 +2433,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device)
{
const struct wined3d_state *state = &device->state;
@ -101,7 +101,7 @@ index 728a7cc..bf77b69 100644
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
DWORD rt_mask, rt_mask_bits;
unsigned int i;
@@ -2441,7 +2451,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
@@ -2453,7 +2463,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
const struct wined3d_device *device = context->swapchain->device;
@ -110,7 +110,7 @@ index 728a7cc..bf77b69 100644
DWORD rt_mask = find_draw_buffers_mask(context, device);
DWORD *cur_mask;
@@ -2471,6 +2481,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
@@ -2485,6 +2495,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
context_apply_draw_buffers(context, rt_mask);
*cur_mask = rt_mask;
}
@ -119,7 +119,7 @@ index 728a7cc..bf77b69 100644
}
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
@@ -3059,7 +3071,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
@@ -3073,7 +3085,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
{
const struct wined3d_state *state = &device->state;
const struct StateEntry *state_table = context->state_table;
@ -205,7 +205,7 @@ index 874129a..22a2de8 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 596a8bd..f788cf2 100644
index 0c62b4e..9119420 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
@ -317,7 +317,7 @@ index 596a8bd..f788cf2 100644
device->d3d_initialized = FALSE;
return WINED3D_OK;
@@ -1932,7 +1910,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
@@ -1939,7 +1917,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
return;
surface = surface_from_resource(texture->sub_resources[0]);
@ -326,7 +326,7 @@ index 596a8bd..f788cf2 100644
return;
wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
@@ -3321,6 +3299,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
@@ -3328,6 +3306,8 @@ HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
{
@ -335,7 +335,7 @@ index 596a8bd..f788cf2 100644
TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n",
device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil);
@@ -3332,7 +3312,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3339,7 +3319,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
{
@ -344,7 +344,7 @@ index 596a8bd..f788cf2 100644
if (!ds)
{
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
@@ -3341,8 +3321,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
@@ -3348,8 +3328,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
else if (flags & WINED3DCLEAR_TARGET)
{
@ -355,7 +355,7 @@ index 596a8bd..f788cf2 100644
{
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
return WINED3D_OK;
@@ -3701,8 +3681,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
@@ -3725,8 +3705,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|| state->render_states[WINED3D_RS_STENCILENABLE])
{
@ -366,7 +366,7 @@ index 596a8bd..f788cf2 100644
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -3928,20 +3908,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
@@ -3952,20 +3932,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
return NULL;
}
@ -390,7 +390,7 @@ index 596a8bd..f788cf2 100644
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -3981,13 +3962,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4005,13 +3986,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
}
@ -406,7 +406,7 @@ index 596a8bd..f788cf2 100644
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
@@ -3999,18 +3980,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
@@ -4023,18 +4004,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -428,7 +428,7 @@ index 596a8bd..f788cf2 100644
wined3d_rendertarget_view_incref(view);
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
@@ -4367,10 +4349,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4391,10 +4373,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_texture_decref(device->cursor_texture);
device->cursor_texture = NULL;
}
@ -440,7 +440,7 @@ index 596a8bd..f788cf2 100644
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4379,6 +4360,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4403,6 +4384,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -452,7 +452,7 @@ index 596a8bd..f788cf2 100644
if (device->onscreen_depth_stencil)
{
wined3d_surface_decref(device->onscreen_depth_stencil);
@@ -4669,7 +4655,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4693,7 +4679,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
@ -461,7 +461,7 @@ index 596a8bd..f788cf2 100644
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
device->update_state = &device->state;
@@ -4678,22 +4664,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4702,22 +4688,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
else if (device->back_buffer_view)
{
@ -489,7 +489,7 @@ index 596a8bd..f788cf2 100644
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4784,17 +4769,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
@@ -4808,17 +4793,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -511,7 +511,7 @@ index 596a8bd..f788cf2 100644
}
}
break;
@@ -4957,7 +4942,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -4981,7 +4966,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@ -577,10 +577,10 @@ index f2c2f42..c6a72fc 100644
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 851fc28..c4f00cb 100644
index c85508c..ebd94fe 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1359,7 +1359,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
@@ -1465,7 +1465,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
const struct wined3d_state *state = &shader->device->state;
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -590,10 +590,10 @@ index 851fc28..c4f00cb 100644
const struct wined3d_shader_lconst *lconst;
const char *prefix;
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index d9ff768..9217225 100644
index 279ec42..18e3f0c 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -2392,7 +2392,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
@@ -2406,7 +2406,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
{
@ -603,7 +603,7 @@ index d9ff768..9217225 100644
{
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index c938771..3966130 100644
index 28e26ab..38277fb 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@ -662,7 +662,7 @@ index c938771..3966130 100644
float scale;
union
@@ -4658,7 +4658,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
@@ -4661,7 +4661,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -671,7 +671,7 @@ index c938771..3966130 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_viewport vp = state->viewport;
@@ -4836,7 +4836,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
@@ -4839,7 +4839,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
}
else
{
@ -680,7 +680,7 @@ index c938771..3966130 100644
UINT height;
UINT width;
@@ -4900,7 +4900,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
@@ -4903,7 +4903,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -790,7 +790,7 @@ index 62b1841..76a80e2 100644
if (FAILED(hr = stateblock_allocate_shader_constants(stateblock)))
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6f86bc4..ba6dfce 100644
index 0091052..dcfcb7f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3418,8 +3418,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@ -817,10 +817,10 @@ index 1ac5e7a..454cb21 100644
struct wined3d_context *context;
struct wined3d_surface *front;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 8a7075d..f9c7714 100644
index bd9b710..f486694 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3293,7 +3293,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@@ -3427,7 +3427,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
float y_offset = context->render_offscreen
? (center_offset - (2.0f * y) - h) / h
: (center_offset - (2.0f * y) - h) / -h;
@ -829,7 +829,7 @@ index 8a7075d..f9c7714 100644
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
float z_scale = zenable ? 2.0f : 0.0f;
float z_offset = zenable ? -1.0f : 0.0f;
@@ -3787,7 +3787,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
@@ -3921,7 +3921,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
unsigned int i;
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
@ -839,10 +839,10 @@ index 8a7075d..f9c7714 100644
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7308f6e..c440eda 100644
index 16d465f..c163ec2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1126,6 +1126,36 @@ struct wined3d_timestamp_query
@@ -1127,6 +1127,36 @@ struct wined3d_timestamp_query
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
@ -879,7 +879,7 @@ index 7308f6e..c440eda 100644
struct wined3d_context
{
const struct wined3d_gl_info *gl_info;
@@ -1140,6 +1170,7 @@ struct wined3d_context
@@ -1141,6 +1171,7 @@ struct wined3d_context
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
@ -887,7 +887,7 @@ index 7308f6e..c440eda 100644
struct wined3d_swapchain *swapchain;
struct wined3d_surface *current_rt;
@@ -1241,12 +1272,6 @@ struct wined3d_context
@@ -1242,12 +1273,6 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@ -900,7 +900,7 @@ index 7308f6e..c440eda 100644
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -1930,7 +1955,7 @@ struct wined3d_stream_state
@@ -1931,7 +1956,7 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@ -909,7 +909,7 @@ index 7308f6e..c440eda 100644
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2036,7 +2061,6 @@ struct wined3d_device
@@ -2037,7 +2062,6 @@ struct wined3d_device
struct wine_rb_tree samplers;
/* Render Target Support */
@ -917,7 +917,7 @@ index 7308f6e..c440eda 100644
struct wined3d_surface *onscreen_depth_stencil;
struct wined3d_rendertarget_view *auto_depth_stencil_view;
@@ -2542,9 +2566,8 @@ struct wined3d_stateblock
@@ -2543,9 +2567,8 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -929,7 +929,7 @@ index 7308f6e..c440eda 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_cs_ops
@@ -2557,7 +2580,6 @@ struct wined3d_cs
@@ -2558,7 +2581,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;
@ -938,5 +938,5 @@ index 7308f6e..c440eda 100644
size_t data_size;
--
2.3.5
2.4.0

View File

@ -1099,7 +1099,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3304,7 +3304,11 @@
@@ -3427,7 +3427,11 @@
float y_offset = context->render_offscreen
? (center_offset - (2.0f * y) - h) / h
: (center_offset - (2.0f * y) - h) / -h;
@ -1111,7 +1111,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
float z_scale = zenable ? 2.0f : 0.0f;
float z_offset = zenable ? -1.0f : 0.0f;
@@ -3427,6 +3431,7 @@
@@ -3550,6 +3554,7 @@
/* case WINED3D_TTFF_COUNT1: Won't ever get here. */
case WINED3D_TTFF_COUNT2:
mat._13 = mat._23 = mat._33 = mat._43 = 0.0f;
@ -1119,7 +1119,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
/* OpenGL divides the first 3 vertex coord by the 4th by default,
* which is essentially the same as D3DTTFF_PROJECTED. Make sure that
* the 4th coord evaluates to 1.0 to eliminate that.
@@ -3439,6 +3444,20 @@
@@ -3562,6 +3567,20 @@
* A more serious problem occurs if the app passes 4 coordinates in, and the
* 4th is != 1.0(opengl default). This would have to be fixed in draw_strided_slow
* or a replacement shader. */
@ -1140,7 +1140,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
default:
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
}
@@ -3798,7 +3817,11 @@
@@ -3921,7 +3940,11 @@
unsigned int i;
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
@ -1291,7 +1291,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1453,6 +1453,7 @@
@@ -1462,6 +1462,7 @@
goto out;
}
@ -1299,7 +1299,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
ret->current_fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(*ret->current_fb.render_targets) * gl_info->limits.buffers);
ret->current_fb.rt_size = gl_info->limits.buffers;
@@ -1461,6 +1462,7 @@
@@ -1470,6 +1471,7 @@
if (device->context_count)
ret->offscreenBuffer = device->contexts[0]->offscreenBuffer;
@ -1307,7 +1307,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
/* Initialize the texture unit mapping to a 1:1 mapping */
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
{
@@ -1778,7 +1780,9 @@
@@ -1787,7 +1789,9 @@
out:
device->shader_backend->shader_free_context_data(ret);
device->adapter->fragment_pipe->free_context_data(ret);
@ -1317,7 +1317,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
@@ -1813,7 +1817,9 @@
@@ -1822,7 +1826,9 @@
device->shader_backend->shader_free_context_data(context);
device->adapter->fragment_pipe->free_context_data(context);
@ -1327,7 +1327,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
HeapFree(GetProcessHeap(), 0, context->blit_targets);
device_context_remove(device, context);
@@ -2221,7 +2227,11 @@
@@ -2230,7 +2236,11 @@
return TRUE;
}
@ -1339,7 +1339,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
static void context_validate_onscreen_formats(struct wined3d_context *context,
const struct wined3d_rendertarget_view *depth_stencil)
{
@@ -2237,6 +2247,7 @@
@@ -2246,6 +2256,7 @@
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
@ -1347,7 +1347,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
wined3d_resource_load_location(&context->current_rt->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
swapchain->render_to_fbo = TRUE;
swapchain_update_draw_bindings(swapchain);
@@ -2251,6 +2262,22 @@
@@ -2260,6 +2271,22 @@
return context_generate_rt_mask_from_surface(rt);
else
return context_generate_rt_mask(context->offscreenBuffer);
@ -1370,7 +1370,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
}
/* Context activation is done by the caller. */
@@ -2282,7 +2309,11 @@
@@ -2291,7 +2318,11 @@
}
else
{
@ -1382,7 +1382,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
}
cur_mask = context->current_fbo ? &context->current_fbo->rt_mask : &context->draw_buffers_mask;
@@ -2328,7 +2359,11 @@
@@ -2338,7 +2369,11 @@
DWORD rt_mask = 0, *cur_mask;
UINT i;
@ -1393,8 +1393,8 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
+#endif /* STAGING_CSMT */
|| rt_count != context->gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil))
@@ -2368,11 +2403,17 @@
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2380,11 +2415,17 @@
}
else
{
@ -1412,7 +1412,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
}
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
@@ -2385,7 +2426,11 @@
@@ -2397,7 +2438,11 @@
}
else
{
@ -1424,7 +1424,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL);
}
@@ -2420,6 +2465,7 @@
@@ -2432,6 +2477,7 @@
return TRUE;
}
@ -1432,7 +1432,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
{
struct wined3d_rendertarget_view **rts = state->fb.render_targets;
@@ -2429,6 +2475,18 @@
@@ -2441,6 +2487,18 @@
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO)
return context_generate_rt_mask_no_fbo(context, wined3d_rendertarget_view_get_surface(rts[0]));
@ -1451,7 +1451,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
else if (!context->render_offscreen)
return context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0]));
@@ -2451,8 +2509,14 @@
@@ -2463,8 +2521,14 @@
/* Context activation is done by the caller. */
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -1466,7 +1466,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
DWORD *cur_mask;
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
@@ -2481,8 +2545,10 @@
@@ -2495,8 +2559,10 @@
context_apply_draw_buffers(context, rt_mask);
*cur_mask = rt_mask;
}
@ -1477,7 +1477,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
}
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
@@ -2720,12 +2786,22 @@
@@ -2734,12 +2800,22 @@
/* Context activation is done by the caller. */
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@ -1500,7 +1500,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
if (rt_mask != *cur_mask)
{
context_apply_draw_buffers(context, rt_mask);
@@ -2926,7 +3002,11 @@
@@ -2940,7 +3016,11 @@
{
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
{
@ -1512,7 +1512,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
context->use_immediate_mode_draw = TRUE;
}
else
@@ -3066,11 +3146,19 @@
@@ -3080,11 +3160,19 @@
}
/* Context activation is done by the caller. */
@ -1532,7 +1532,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
unsigned int i, j;
WORD map;
@@ -3102,12 +3190,17 @@
@@ -3116,12 +3204,17 @@
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
{
if (map & 1)
@ -1550,7 +1550,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
}
if (state->index_buffer)
{
@@ -3211,7 +3304,11 @@
@@ -3225,7 +3318,11 @@
if (texture->texture_srgb.name)
wined3d_texture_load(texture, context, TRUE);
wined3d_texture_load(texture, context, FALSE);