Rebase against 39d71c52ef7839fe7daad97b009d029b71f691ba.

This commit is contained in:
Sebastian Lackner
2015-05-27 22:10:54 +02:00
parent 763bb554cd
commit 79c69db369
8 changed files with 39 additions and 209 deletions

View File

@@ -1,4 +1,4 @@
From cb74e4d8de36f0dfe8ab47f9a2a5394127142104 Mon Sep 17 00:00:00 2001
From 2c3ed1eb642962a893824507dbe35aaef0dddf65 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}.
@@ -8,11 +8,11 @@ Subject: riched20: Implement IText{Selection, Range}::Set{Start, End}.
1 file changed, 135 insertions(+)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 18ee8e0..dbd8dd2 100644
index 7d90a98..45ec28a 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -2034,6 +2034,137 @@ todo_wine
release_interfaces(&hwnd, &reOle, &doc, NULL);
@@ -2487,6 +2487,137 @@ static void test_SetText(void)
ITextRange_Release(range);
}
+static void test_ITextRange_SetStart(void)
@@ -149,7 +149,7 @@ index 18ee8e0..dbd8dd2 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -2046,12 +2177,16 @@ START_TEST(richole)
@@ -2499,12 +2630,16 @@ START_TEST(richole)
test_GetText();
test_ITextSelection_GetChar();
test_ITextSelection_GetStart_GetEnd();
@@ -167,5 +167,5 @@ index 18ee8e0..dbd8dd2 100644
test_IOleWindow_GetWindow();
test_IOleInPlaceSite_GetWindow();
--
2.4.0
2.4.1

View File

@@ -1,19 +1,19 @@
From a8dab628933aafdbdd63758763de47955fd1171c Mon Sep 17 00:00:00 2001
From 6a9811fc03e0199c92abbd9e36a56000afdcc107 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 | 60 ++++++++++++++++++++++++++++
dlls/riched20/richole.c | 20 ++++++++++
dlls/riched20/tests/richole.c | 93 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 153 insertions(+)
2 files changed, 113 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index b6f047c..8713e28 100644
index 14c4c8e..b995608 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -2124,6 +2124,10 @@ static HRESULT WINAPI TextFont_SetDuplicate(ITextFont *iface, ITextFont *pFont)
@@ -2243,6 +2243,10 @@ static HRESULT WINAPI TextFont_SetDuplicate(ITextFont *iface, ITextFont *pFont)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, pFont);
@@ -24,7 +24,7 @@ index b6f047c..8713e28 100644
return E_NOTIMPL;
}
@@ -2131,6 +2135,10 @@ static HRESULT WINAPI TextFont_CanChange(ITextFont *iface, LONG *ret)
@@ -2250,6 +2254,10 @@ static HRESULT WINAPI TextFont_CanChange(ITextFont *iface, LONG *ret)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, ret);
@@ -35,7 +35,7 @@ index b6f047c..8713e28 100644
return E_NOTIMPL;
}
@@ -2138,6 +2146,10 @@ static HRESULT WINAPI TextFont_IsEqual(ITextFont *iface, ITextFont *font, LONG *
@@ -2257,6 +2265,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);
@@ -46,7 +46,7 @@ index b6f047c..8713e28 100644
return E_NOTIMPL;
}
@@ -2305,6 +2317,10 @@ static HRESULT WINAPI TextFont_GetStyle(ITextFont *iface, LONG *value)
@@ -2424,6 +2436,10 @@ static HRESULT WINAPI TextFont_GetStyle(ITextFont *iface, LONG *value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, value);
@@ -57,117 +57,7 @@ index b6f047c..8713e28 100644
return E_NOTIMPL;
}
@@ -2312,6 +2328,10 @@ static HRESULT WINAPI TextFont_SetStyle(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2340,6 +2360,10 @@ static HRESULT WINAPI TextFont_SetAnimation(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2354,6 +2378,10 @@ static HRESULT WINAPI TextFont_SetBackColor(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2396,6 +2424,10 @@ static HRESULT WINAPI TextFont_SetForeColor(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2452,6 +2484,10 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2466,6 +2502,10 @@ static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2495,6 +2535,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 (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2523,6 +2567,10 @@ static HRESULT WINAPI TextFont_SetPosition(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2565,6 +2613,10 @@ static HRESULT WINAPI TextFont_SetSize(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2593,6 +2645,10 @@ static HRESULT WINAPI TextFont_SetSpacing(ITextFont *iface, FLOAT value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%.2f): stub\n", This, value);
+
+ if (This->range && !get_range_reole(This->range))
+ return CO_E_RELEASED;
+
return E_NOTIMPL;
}
@@ -2663,6 +2719,10 @@ static HRESULT WINAPI TextFont_SetWeight(ITextFont *iface, LONG value)
@@ -2431,6 +2447,10 @@ static HRESULT WINAPI TextFont_SetStyle(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%d): stub\n", This, value);
@@ -179,10 +69,10 @@ index b6f047c..8713e28 100644
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index cd31241..7822c82 100644
index 45ec28a..77e8ea9 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -2532,6 +2532,97 @@ static void test_ITextSelection_SetEnd(void)
@@ -2618,6 +2618,97 @@ static void test_ITextSelection_SetEnd(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
@@ -280,7 +170,7 @@ index cd31241..7822c82 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -2547,6 +2638,7 @@ START_TEST(richole)
@@ -2633,6 +2724,7 @@ START_TEST(richole)
test_ITextSelection_SetStart();
test_ITextSelection_SetEnd();
test_ITextSelection_Collapse();
@@ -288,7 +178,7 @@ index cd31241..7822c82 100644
test_ITextDocument_Range();
test_ITextRange_GetChar();
test_ITextRange_GetStart_GetEnd();
@@ -2554,6 +2646,7 @@ START_TEST(richole)
@@ -2640,6 +2732,7 @@ START_TEST(richole)
test_ITextRange_Collapse();
test_ITextRange_SetStart();
test_ITextRange_SetEnd();

View File

@@ -1,4 +1,4 @@
From 842d74c575aa057b5c093bc8570568bb88e6216b Mon Sep 17 00:00:00 2001
From 74ef4d73346d9607112923c1e9598b3c4db19433 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.
@@ -9,10 +9,10 @@ Subject: riched20: Implement ITextRange::GetText.
2 files changed, 68 insertions(+), 36 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 9605404..da375e0 100644
index 155ebca..d0834da 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1145,11 +1145,36 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
@@ -1393,11 +1393,36 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
return hr;
}
@@ -50,7 +50,7 @@ index 9605404..da375e0 100644
if (!This->reOle)
return CO_E_RELEASED;
@@ -1157,8 +1182,9 @@ static HRESULT WINAPI ITextRange_fnGetText(ITextRange *me, BSTR *pbstr)
@@ -1405,8 +1430,9 @@ static HRESULT WINAPI ITextRange_fnGetText(ITextRange *me, BSTR *pbstr)
if (!pbstr)
return E_INVALIDARG;
@@ -61,8 +61,8 @@ index 9605404..da375e0 100644
+ return range_GetText(This->reOle->editor, &start, &end, pbstr);
}
static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
@@ -3762,8 +3788,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR str)
@@ -4051,8 +4077,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
{
ITextSelectionImpl *This = impl_from_ITextSelection(me);
ME_Cursor *start = NULL, *end = NULL;
@@ -71,7 +71,7 @@ index 9605404..da375e0 100644
TRACE("(%p)->(%p)\n", This, pbstr);
@@ -3774,23 +3798,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
@@ -4063,23 +4087,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
return E_INVALIDARG;
ME_GetSelection(This->reOle->editor, &start, &end);
@@ -95,12 +95,12 @@ index 9605404..da375e0 100644
+ return range_GetText(This->reOle->editor, start, end, pbstr);
}
static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR bstr)
static HRESULT WINAPI ITextSelection_fnSetText(ITextSelection *me, BSTR str)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index ab94b58..aaeb0c9 100644
index 0065196..d7642d4 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -527,27 +527,22 @@ static void test_GetText(void)
@@ -529,27 +529,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);
@@ -128,7 +128,7 @@ index ab94b58..aaeb0c9 100644
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
@@ -562,37 +557,30 @@ todo_wine
hres = ITextDocument_Range(txtDoc, 8, 12, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
@@ -166,7 +166,7 @@ index ab94b58..aaeb0c9 100644
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
@@ -600,10 +588,8 @@ todo_wine
hres = ITextDocument_Range(txtDoc, -1, 9, &range);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = ITextRange_GetText(range, &bstr);
@@ -177,7 +177,7 @@ index ab94b58..aaeb0c9 100644
SysFreeString(bstr);
release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -2302,6 +2288,43 @@ static void test_ITextRange_GetPara(void)
@@ -2755,6 +2741,43 @@ static void test_ITextRange_GetPara(void)
ITextPara_Release(txtPara);
}
@@ -221,7 +221,7 @@ index ab94b58..aaeb0c9 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -2327,6 +2350,7 @@ START_TEST(richole)
@@ -2780,6 +2803,7 @@ START_TEST(richole)
test_ITextRange_SetEnd();
test_ITextRange_GetFont();
test_ITextRange_GetPara();
@@ -230,5 +230,5 @@ index ab94b58..aaeb0c9 100644
test_IOleWindow_GetWindow();
test_IOleInPlaceSite_GetWindow();
--
2.4.0
2.4.1