Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2018
- 70 participants
- 1549 messages
[PATCH 5/8] wsdapi: Implement generation of ProbeMatches message.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/soap.c | 169 +++++++++++++++++++++++++++++++++-
dlls/wsdapi/tests/discovery.c | 2 +-
2 files changed, 169 insertions(+), 2 deletions(-)
Sept. 13, 2018
[PATCH 4/8] wsdapi: Implement matching of names in MatchProbeEx.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/discovery.c | 58 ++++++++++++++++++++++++++++++++---
dlls/wsdapi/soap.c | 9 ++++++
dlls/wsdapi/wsdapi_internal.h | 6 ++++
3 files changed, 69 insertions(+), 4 deletions(-)
Sept. 13, 2018
[PATCH 3/8] wsdapi: Ignore duplicate messages.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/discovery.c | 12 +++++++++
dlls/wsdapi/network.c | 2 +-
dlls/wsdapi/soap.c | 47 ++++++++++++++++++++++++++++++++++-
dlls/wsdapi/tests/discovery.c | 2 +-
dlls/wsdapi/wsdapi_internal.h | 11 +++++++-
5 files changed, 70 insertions(+), 4 deletions(-)
Sept. 13, 2018
[PATCH 2/8] wsdapi/tests: Add test for duplicate message filtering.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/tests/discovery.c | 134 ++++++++++++++++++++++++++++++++--
1 file changed, 129 insertions(+), 5 deletions(-)
Sept. 13, 2018
[PATCH 1/8] wsdapi: Use slim reader/writer lock instead of critical section.
by Owen Rudge
Signed-off-by: Owen Rudge <orudge(a)codeweavers.com>
---
dlls/wsdapi/discovery.c | 13 ++++++-------
dlls/wsdapi/network.c | 4 ++--
dlls/wsdapi/wsdapi_internal.h | 2 +-
3 files changed, 9 insertions(+), 10 deletions(-)
Sept. 13, 2018
Re: [PATCH 2/2] ntdll: Add stub for ApiSetQueryApiSetPresence.
by Alistair Leslie-Hughes
Hi,
On 13/09/18 01:06, Zebediah Figura wrote:
> For what it's worth, this was submitted by Michael back in October 2016,
> but a request for an affected application yielded no response:
>
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.wineh…
>
> The other patch is similarly vague; it was submitted to the Staging
> patch tracker in 2017 with the comment "I found an application which
> tries to enumerate the loaded apisets by using the PEB."
When I was writing tests for bug 30439 (support for unsecapp.exe). Using
native unsecapp.exe requires the stub ApiSetQueryApiSetPresence.
Alistair.
Sept. 13, 2018
[PATCH v4 4/4] msftedit: Add tests for interfaces.
by Jactry Zeng
Superseded patch 151078.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
configure | 1 +
configure.ac | 1 +
dlls/msftedit/tests/Makefile.in | 5 +
dlls/msftedit/tests/richole.c | 197 ++++++++++++++++++++++++++++++++
4 files changed, 204 insertions(+)
create mode 100644 dlls/msftedit/tests/Makefile.in
create mode 100644 dlls/msftedit/tests/richole.c
diff --git a/configure b/configure
index a3916ee233..818cb40fce 100755
--- a/configure
+++ b/configure
@@ -19595,6 +19595,7 @@ wine_fn_config_makefile dlls/msdmo enable_msdmo
wine_fn_config_makefile dlls/msdmo/tests enable_tests
wine_fn_config_makefile dlls/msdrm enable_msdrm
wine_fn_config_makefile dlls/msftedit enable_msftedit
+wine_fn_config_makefile dlls/msftedit/tests enable_tests
wine_fn_config_makefile dlls/msg711.acm enable_msg711_acm
wine_fn_config_makefile dlls/msgsm32.acm enable_msgsm32_acm
wine_fn_config_makefile dlls/mshtml.tlb enable_mshtml_tlb
diff --git a/configure.ac b/configure.ac
index 006f7d9fc2..605ad1690d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3451,6 +3451,7 @@ WINE_CONFIG_MAKEFILE(dlls/msdmo)
WINE_CONFIG_MAKEFILE(dlls/msdmo/tests)
WINE_CONFIG_MAKEFILE(dlls/msdrm)
WINE_CONFIG_MAKEFILE(dlls/msftedit)
+WINE_CONFIG_MAKEFILE(dlls/msftedit/tests)
WINE_CONFIG_MAKEFILE(dlls/msg711.acm)
WINE_CONFIG_MAKEFILE(dlls/msgsm32.acm)
WINE_CONFIG_MAKEFILE(dlls/mshtml.tlb)
diff --git a/dlls/msftedit/tests/Makefile.in b/dlls/msftedit/tests/Makefile.in
new file mode 100644
index 0000000000..99cc46a007
--- /dev/null
+++ b/dlls/msftedit/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = msftedit.dll
+IMPORTS = ole32 oleaut32 user32
+
+C_SRCS = \
+ richole.c
diff --git a/dlls/msftedit/tests/richole.c b/dlls/msftedit/tests/richole.c
new file mode 100644
index 0000000000..1d336f1099
--- /dev/null
+++ b/dlls/msftedit/tests/richole.c
@@ -0,0 +1,197 @@
+/*
+ * Tests for IRichEditOle and friends.
+ *
+ * Copyright 2008 Google (Dan Hipschman)
+ * Copyright 2018 Jactry Zeng for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define COBJMACROS
+
+#include <stdarg.h>
+
+#include <windef.h>
+#include <winbase.h>
+#include <initguid.h>
+#include <ole2.h>
+#include <richedit.h>
+#include <richole.h>
+#include <tom.h>
+#include <wine/test.h>
+
+static HMODULE msftedit_hmodule;
+
+#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
+static void _expect_ref(IUnknown* obj, ULONG ref, int line)
+{
+ ULONG rc;
+ IUnknown_AddRef(obj);
+ rc = IUnknown_Release(obj);
+ ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d.\n", ref, rc);
+}
+
+static HWND new_window(LPCWSTR classname, DWORD dwstyle, HWND parent)
+{
+ HWND hwnd = CreateWindowW(classname, NULL,
+ dwstyle | WS_POPUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE,
+ 0, 0, 200, 60, parent, NULL, msftedit_hmodule, NULL);
+ ok(hwnd != NULL, "class: %s, error: %d.\n", wine_dbgstr_w(classname), (int) GetLastError());
+ return hwnd;
+}
+
+static void test_Interfaces(void)
+{
+ IRichEditOle *reole = NULL, *reole1 = NULL;
+ ITextDocument *txtdoc = NULL;
+ ITextDocument2Old *txtdoc2old = NULL;
+ ITextDocument2 *txtdoc2 = NULL;
+ ITextSelection *txtsel = NULL, *txtsel2;
+ IUnknown *punk;
+ HRESULT hres;
+ LRESULT res;
+ HWND hwnd;
+ ULONG refcount;
+
+ hwnd = new_window(MSFTEDIT_CLASS, ES_MULTILINE, NULL);
+ if (!hwnd)
+ {
+ skip("Couldn't create window.\n");
+ return;
+ }
+
+ res = SendMessageA(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&reole);
+ ok(res, "SendMessage\n");
+ ok(reole != NULL, "EM_GETOLEINTERFACE\n");
+ EXPECT_REF(reole, 2);
+
+ res = SendMessageA(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&reole1);
+ ok(res == 1, "SendMessage\n");
+ ok(reole1 == reole, "Should not return a new IRichEditOle interface.\n");
+ EXPECT_REF(reole, 3);
+
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument, (void **)&txtdoc);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres);
+ ok(txtdoc != NULL, "IRichEditOle_QueryInterface\n");
+
+ hres = ITextDocument_GetSelection(txtdoc, NULL);
+ ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%08x.\n", hres);
+
+ EXPECT_REF(txtdoc, 4);
+
+ hres = ITextDocument_GetSelection(txtdoc, &txtsel);
+ ok(hres == S_OK, "ITextDocument_GetSelection failed 0x%08x.\n", hres);
+
+ EXPECT_REF(txtdoc, 4);
+ EXPECT_REF(txtsel, 2);
+
+ hres = ITextDocument_GetSelection(txtdoc, &txtsel2);
+ ok(hres == S_OK, "ITextDocument_GetSelection failed: 0x%08x.\n", hres);
+ ok(txtsel2 == txtsel, "got %p, %p\n", txtsel, txtsel2);
+
+ EXPECT_REF(txtdoc, 4);
+ EXPECT_REF(txtsel, 3);
+
+ ITextSelection_Release(txtsel2);
+
+ punk = NULL;
+ hres = ITextSelection_QueryInterface(txtsel, &IID_ITextSelection, (void **)&punk);
+ ok(hres == S_OK, "ITextSelection_QueryInterface failed: 0x%08x.\n", hres);
+ ok(punk != NULL, "ITextSelection_QueryInterface\n");
+ IUnknown_Release(punk);
+
+ punk = NULL;
+ hres = ITextSelection_QueryInterface(txtsel, &IID_ITextRange, (void **)&punk);
+ ok(hres == S_OK, "ITextSelection_QueryInterface failed: 0x%08x.\n", hres);
+ ok(punk != NULL, "ITextSelection_QueryInterface\n");
+ IUnknown_Release(punk);
+
+ punk = NULL;
+ hres = ITextSelection_QueryInterface(txtsel, &IID_IDispatch, (void **)&punk);
+ ok(hres == S_OK, "ITextSelection_QueryInterface failed: 0x%08x.\n", hres);
+ ok(punk != NULL, "ITextSelection_QueryInterface\n");
+ IUnknown_Release(punk);
+
+ punk = NULL;
+ hres = IRichEditOle_QueryInterface(reole, &IID_IOleClientSite, (void **)&punk);
+ ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+
+ punk = NULL;
+ hres = IRichEditOle_QueryInterface(reole, &IID_IOleWindow, (void **)&punk);
+ ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+
+ punk = NULL;
+ hres = IRichEditOle_QueryInterface(reole, &IID_IOleInPlaceSite, (void **)&punk);
+ ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+
+ /* ITextDocument2 is implemented on msftedit after win8 for superseding ITextDocument2Old */
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument2, (void **)&txtdoc2);
+ ok(hres == S_OK ||
+ hres == E_NOINTERFACE /* before win8 */, "IRichEditOle_QueryInterface: 0x%08x.\n", hres);
+ if (hres != E_NOINTERFACE)
+ {
+ ok(txtdoc2 != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtdoc2 == txtdoc, "Interface pointer isn't equal.\n");
+ EXPECT_REF(txtdoc2, 5);
+ EXPECT_REF(reole, 5);
+
+ hres = ITextDocument2_QueryInterface(txtdoc2, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "ITextDocument2_QueryInterface failed: 0x%08x.\n", hres);
+ EXPECT_REF(txtdoc2, 5);
+ EXPECT_REF(reole, 5);
+ EXPECT_REF(txtdoc2old, 1);
+ ITextDocument2Old_Release(txtdoc2old);
+ ITextDocument2_Release(txtdoc2);
+
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres);
+ ok(txtdoc2old != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtdoc2old != txtdoc, "Interface pointer is equal.\n");
+ EXPECT_REF(txtdoc2old, 1);
+ EXPECT_REF(reole, 4);
+ ITextDocument2Old_Release(txtdoc2old);
+ }
+ else
+ {
+ hres = IRichEditOle_QueryInterface(reole, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres);
+ ok(txtdoc2old != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtdoc2old == txtdoc, "Interface pointer is equal.\n");
+ EXPECT_REF(txtdoc2old, 5);
+ EXPECT_REF(reole, 5);
+ ITextDocument2Old_Release(txtdoc2old);
+ }
+
+ ITextDocument_Release(txtdoc);
+ IRichEditOle_Release(reole);
+ refcount = IRichEditOle_Release(reole);
+ ok(refcount == 1, "Got wrong ref count: %d.\n", refcount);
+ DestroyWindow(hwnd);
+
+ /* Methods should return CO_E_RELEASED if the backing document has
+ been released. One test should suffice. */
+ hres = ITextSelection_CanEdit(txtsel, NULL);
+ ok(hres == CO_E_RELEASED, "ITextSelection after ITextDocument destroyed\n");
+
+ ITextSelection_Release(txtsel);
+}
+
+START_TEST(richole)
+{
+ msftedit_hmodule = LoadLibraryA("msftedit.dll");
+ ok(msftedit_hmodule != NULL, "error: %d\n", (int) GetLastError());
+
+ test_Interfaces();
+}
--
2.18.0
Sept. 13, 2018
[PATCH v3 3/4] riched20: Add IID_ITextDocument2Old support for ITextServices_QueryInterface().
by Jactry Zeng
Superseded patch 151077.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20613
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/tests/txtsrv.c | 34 ++++++++++++++++++++++++++++++++++
dlls/riched20/txtsrv.c | 5 +++--
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index a8cf6ff1ad..1aa08f89a4 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -904,6 +904,7 @@ static void test_QueryInterface(void)
HRESULT hres;
IRichEditOle *reole, *txtsrv_reole;
ITextDocument *txtdoc, *txtsrv_txtdoc;
+ ITextDocument2Old *txtdoc2old, *txtsrv_txtdoc2old;
ULONG refcount;
if(!init_texthost(&txtserv, &host))
@@ -930,6 +931,17 @@ static void test_QueryInterface(void)
ITextDocument_Release(txtdoc);
refcount = get_refcount((IUnknown *)txtserv);
ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+
+ hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument2Old, (void **)&txtdoc2old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+ refcount = get_refcount((IUnknown *)txtsrv_reole);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+
+ ITextDocument2Old_Release(txtdoc2old);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
IRichEditOle_Release(txtsrv_reole);
refcount = get_refcount((IUnknown *)txtserv);
ok(refcount == 1, "got wrong ref count: %d\n", refcount);
@@ -956,6 +968,28 @@ static void test_QueryInterface(void)
refcount = get_refcount((IUnknown *)txtserv);
ok(refcount == 1, "got wrong ref count: %d\n", refcount);
+ /* ITextDocument2Old */
+ hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument2Old, (void **)&txtsrv_txtdoc2old);
+ ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08x\n", hres);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+ refcount = get_refcount((IUnknown *)txtsrv_txtdoc2old);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+
+ hres = ITextDocument2Old_QueryInterface(txtsrv_txtdoc2old, &IID_IRichEditOle, (void **)&reole);
+ ok(hres == S_OK, "ITextDocument2Old_QueryInterface: 0x%08x\n", hres);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+ refcount = get_refcount((IUnknown *)txtsrv_txtdoc2old);
+ ok(refcount == 3, "got wrong ref count: %d\n", refcount);
+
+ IRichEditOle_Release(reole);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 2, "got wrong ref count: %d\n", refcount);
+ ITextDocument2Old_Release(txtsrv_txtdoc2old);
+ refcount = get_refcount((IUnknown *)txtserv);
+ ok(refcount == 1, "got wrong ref count: %d\n", refcount);
+
ITextServices_Release(txtserv);
ITextHost_Release(host);
}
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index 5ab3322e6b..cf957cff89 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -78,11 +78,12 @@ static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID r
*ppv = &This->IUnknown_inner;
else if (IsEqualIID(riid, &IID_ITextServices))
*ppv = &This->ITextServices_iface;
- else if (IsEqualIID(riid, &IID_IRichEditOle) || IsEqualIID(riid, &IID_ITextDocument)) {
+ else if (IsEqualIID(riid, &IID_IRichEditOle) || IsEqualIID(riid, &IID_ITextDocument) ||
+ IsEqualIID(riid, &IID_ITextDocument2Old)) {
if (!This->editor->reOle)
if (!CreateIRichEditOle(This->outer_unk, This->editor, (void **)(&This->editor->reOle)))
return E_OUTOFMEMORY;
- if (IsEqualIID(riid, &IID_ITextDocument))
+ if (IsEqualIID(riid, &IID_ITextDocument) || IsEqualIID(riid, &IID_ITextDocument2Old))
ME_GetITextDocument2OldInterface(This->editor->reOle, ppv);
else
*ppv = This->editor->reOle;
--
2.18.0
Sept. 13, 2018
[PATCH v3 2/4] riched20: Add stub for ITextDocument2Old interface.
by Jactry Zeng
Superseded patch 151076.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
dlls/riched20/editor.h | 2 +-
dlls/riched20/richole.c | 445 ++++++++++++++++++++++++----------
dlls/riched20/tests/richole.c | 9 +
dlls/riched20/txtsrv.c | 2 +-
4 files changed, 325 insertions(+), 133 deletions(-)
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index 141c63aca9..eba6d35fc7 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -233,7 +233,7 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, BOOL selected) DECLSPE
void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN;
void ME_CopyReObject(REOBJECT *dst, const REOBJECT *src, DWORD flags) DECLSPEC_HIDDEN;
void ME_DeleteReObject(struct re_object *re_object) DECLSPEC_HIDDEN;
-void ME_GetITextDocumentInterface(IRichEditOle *iface, LPVOID *ppvObj) DECLSPEC_HIDDEN;
+void ME_GetITextDocument2OldInterface(IRichEditOle *iface, LPVOID *ppvObj) DECLSPEC_HIDDEN;
/* editor.c */
ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSPEC_HIDDEN;
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 11b9920b57..8d43ce6ce1 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -46,6 +46,7 @@ DEFINE_GUID(IID_ITextServices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xa
DEFINE_GUID(IID_ITextHost, 0x13e670f4,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
DEFINE_GUID(IID_ITextHost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1);
DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
+DEFINE_GUID(IID_ITextDocument2Old, 0x01c25500, 0x4268, 0x11d1, 0x88, 0x3a, 0x3c, 0x8b, 0x00, 0xc1, 0x00, 0x00);
DEFINE_GUID(IID_ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
DEFINE_GUID(IID_ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d);
@@ -55,7 +56,7 @@ static ITypeLib *typelib;
enum tid_t {
NULL_tid,
- ITextDocument_tid,
+ ITextDocument2Old_tid,
ITextRange_tid,
ITextSelection_tid,
ITextFont_tid,
@@ -66,7 +67,7 @@ enum tid_t {
static const IID * const tid_ids[] =
{
&IID_NULL,
- &IID_ITextDocument,
+ &IID_ITextDocument2Old,
&IID_ITextRange,
&IID_ITextSelection,
&IID_ITextFont,
@@ -208,7 +209,7 @@ enum range_update_op {
typedef struct IRichEditOleImpl {
IUnknown IUnknown_inner;
IRichEditOle IRichEditOle_iface;
- ITextDocument ITextDocument_iface;
+ ITextDocument2Old ITextDocument2Old_iface;
IUnknown *outer_unk;
LONG ref;
@@ -267,9 +268,9 @@ static inline IRichEditOleImpl *impl_from_IRichEditOle(IRichEditOle *iface)
return CONTAINING_RECORD(iface, IRichEditOleImpl, IRichEditOle_iface);
}
-static inline IRichEditOleImpl *impl_from_ITextDocument(ITextDocument *iface)
+static inline IRichEditOleImpl *impl_from_ITextDocument2Old(ITextDocument2Old *iface)
{
- return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument_iface);
+ return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument2Old_iface);
}
static inline IRichEditOleImpl *impl_from_IUnknown(IUnknown *iface)
@@ -943,8 +944,8 @@ static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, R
*ppvObj = &This->IUnknown_inner;
else if (IsEqualGUID(riid, &IID_IRichEditOle))
*ppvObj = &This->IRichEditOle_iface;
- else if (IsEqualGUID(riid, &IID_ITextDocument))
- *ppvObj = &This->ITextDocument_iface;
+ else if (IsEqualGUID(riid, &IID_ITextDocument) || IsEqualGUID(riid, &IID_ITextDocument2Old))
+ *ppvObj = &This->ITextDocument2Old_iface;
if (*ppvObj)
{
IUnknown_AddRef((IUnknown *)*ppvObj);
@@ -3859,76 +3860,71 @@ static HRESULT create_textpara(ITextRange *range, ITextPara **ret)
}
/* ITextDocument */
-static HRESULT WINAPI
-ITextDocument_fnQueryInterface(ITextDocument* me, REFIID riid,
- void** ppvObject)
+static HRESULT WINAPI ITextDocument2Old_fnQueryInterface(ITextDocument2Old* iface, REFIID riid,
+ void **ppvObject)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
return IRichEditOle_QueryInterface(&This->IRichEditOle_iface, riid, ppvObject);
}
-static ULONG WINAPI
-ITextDocument_fnAddRef(ITextDocument* me)
+static ULONG WINAPI ITextDocument2Old_fnAddRef(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
return IRichEditOle_AddRef(&This->IRichEditOle_iface);
}
-static ULONG WINAPI
-ITextDocument_fnRelease(ITextDocument* me)
+static ULONG WINAPI ITextDocument2Old_fnRelease(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
return IRichEditOle_Release(&This->IRichEditOle_iface);
}
-static HRESULT WINAPI
-ITextDocument_fnGetTypeInfoCount(ITextDocument* me,
- UINT* pctinfo)
+static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfoCount(ITextDocument2Old *iface,
+ UINT *pctinfo)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
TRACE("(%p)->(%p)\n", This, pctinfo);
*pctinfo = 1;
return S_OK;
}
-static HRESULT WINAPI
-ITextDocument_fnGetTypeInfo(ITextDocument* me, UINT iTInfo, LCID lcid,
- ITypeInfo** ppTInfo)
+static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfo(ITextDocument2Old *iface, UINT iTInfo, LCID lcid,
+ ITypeInfo **ppTInfo)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
HRESULT hr;
TRACE("(%p)->(%u,%d,%p)\n", This, iTInfo, lcid, ppTInfo);
- hr = get_typeinfo(ITextDocument_tid, ppTInfo);
+ hr = get_typeinfo(ITextDocument2Old_tid, ppTInfo);
if (SUCCEEDED(hr))
ITypeInfo_AddRef(*ppTInfo);
return hr;
}
-static HRESULT WINAPI
-ITextDocument_fnGetIDsOfNames(ITextDocument* me, REFIID riid,
- LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId)
+static HRESULT WINAPI ITextDocument2Old_fnGetIDsOfNames(ITextDocument2Old *iface, REFIID riid,
+ LPOLESTR *rgszNames, UINT cNames,
+ LCID lcid, DISPID *rgDispId)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
ITypeInfo *ti;
HRESULT hr;
TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid),
rgszNames, cNames, lcid, rgDispId);
- hr = get_typeinfo(ITextDocument_tid, &ti);
+ hr = get_typeinfo(ITextDocument2Old_tid, &ti);
if (SUCCEEDED(hr))
hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
return hr;
}
-static HRESULT WINAPI
-ITextDocument_fnInvoke(ITextDocument* me, DISPID dispIdMember,
- REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams,
- VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
+static HRESULT WINAPI ITextDocument2Old_fnInvoke(ITextDocument2Old *iface, DISPID dispIdMember,
+ REFIID riid, LCID lcid, WORD wFlags,
+ DISPPARAMS *pDispParams, VARIANT *pVarResult,
+ EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
ITypeInfo *ti;
HRESULT hr;
@@ -3936,26 +3932,24 @@ ITextDocument_fnInvoke(ITextDocument* me, DISPID dispIdMember,
debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult,
pExcepInfo, puArgErr);
- hr = get_typeinfo(ITextDocument_tid, &ti);
+ hr = get_typeinfo(ITextDocument2Old_tid, &ti);
if (SUCCEEDED(hr))
- hr = ITypeInfo_Invoke(ti, me, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(ti, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return hr;
}
-static HRESULT WINAPI
-ITextDocument_fnGetName(ITextDocument* me, BSTR* pName)
+static HRESULT WINAPI ITextDocument2Old_fnGetName(ITextDocument2Old *iface, BSTR *pName)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetSelection(ITextDocument *me, ITextSelection **selection)
+static HRESULT WINAPI ITextDocument2Old_fnGetSelection(ITextDocument2Old *iface, ITextSelection **selection)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
- TRACE("(%p)->(%p)\n", me, selection);
+ TRACE("(%p)->(%p)\n", iface, selection);
if (!selection)
return E_INVALIDARG;
@@ -3973,125 +3967,110 @@ ITextDocument_fnGetSelection(ITextDocument *me, ITextSelection **selection)
return S_OK;
}
-static HRESULT WINAPI
-ITextDocument_fnGetStoryCount(ITextDocument* me, LONG* pCount)
+static HRESULT WINAPI ITextDocument2Old_fnGetStoryCount(ITextDocument2Old *iface, LONG *pCount)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetStoryRanges(ITextDocument* me,
- ITextStoryRanges** ppStories)
+static HRESULT WINAPI ITextDocument2Old_fnGetStoryRanges(ITextDocument2Old *iface,
+ ITextStoryRanges **ppStories)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetSaved(ITextDocument* me, LONG* pValue)
+static HRESULT WINAPI ITextDocument2Old_fnGetSaved(ITextDocument2Old *iface, LONG *pValue)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnSetSaved(ITextDocument* me, LONG Value)
+static HRESULT WINAPI ITextDocument2Old_fnSetSaved(ITextDocument2Old *iface, LONG Value)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnGetDefaultTabStop(ITextDocument* me, float* pValue)
+static HRESULT WINAPI ITextDocument2Old_fnGetDefaultTabStop(ITextDocument2Old *iface, float *pValue)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnSetDefaultTabStop(ITextDocument* me, float Value)
+static HRESULT WINAPI ITextDocument2Old_fnSetDefaultTabStop(ITextDocument2Old *iface, float Value)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnNew(ITextDocument* me)
+static HRESULT WINAPI ITextDocument2Old_fnNew(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnOpen(ITextDocument* me, VARIANT* pVar, LONG Flags,
- LONG CodePage)
+static HRESULT WINAPI ITextDocument2Old_fnOpen(ITextDocument2Old *iface, VARIANT *pVar,
+ LONG Flags, LONG CodePage)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnSave(ITextDocument* me, VARIANT* pVar, LONG Flags,
- LONG CodePage)
+static HRESULT WINAPI ITextDocument2Old_fnSave(ITextDocument2Old *iface, VARIANT *pVar,
+ LONG Flags, LONG CodePage)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnFreeze(ITextDocument* me, LONG* pCount)
+static HRESULT WINAPI ITextDocument2Old_fnFreeze(ITextDocument2Old *iface, LONG *pCount)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnUnfreeze(ITextDocument* me, LONG* pCount)
+static HRESULT WINAPI ITextDocument2Old_fnUnfreeze(ITextDocument2Old *iface, LONG *pCount)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnBeginEditCollection(ITextDocument* me)
+static HRESULT WINAPI ITextDocument2Old_fnBeginEditCollection(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnEndEditCollection(ITextDocument* me)
+static HRESULT WINAPI ITextDocument2Old_fnEndEditCollection(ITextDocument2Old *iface)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnUndo(ITextDocument* me, LONG Count, LONG* prop)
+static HRESULT WINAPI ITextDocument2Old_fnUndo(ITextDocument2Old *iface, LONG Count, LONG *prop)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static HRESULT WINAPI
-ITextDocument_fnRedo(ITextDocument* me, LONG Count, LONG* prop)
+static HRESULT WINAPI ITextDocument2Old_fnRedo(ITextDocument2Old *iface, LONG Count, LONG *prop)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
@@ -4112,11 +4091,10 @@ static HRESULT CreateITextRange(IRichEditOleImpl *reOle, LONG start, LONG end, I
return S_OK;
}
-static HRESULT WINAPI
-ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
- ITextRange** ppRange)
+static HRESULT WINAPI ITextDocument2Old_fnRange(ITextDocument2Old *iface, LONG cp1, LONG cp2,
+ ITextRange **ppRange)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
const int len = ME_GetTextLength(This->editor) + 1;
TRACE("%p %p %d %d\n", This, ppRange, cp1, cp2);
@@ -4140,42 +4118,247 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
return CreateITextRange(This, cp1, cp2, ppRange);
}
-static HRESULT WINAPI
-ITextDocument_fnRangeFromPoint(ITextDocument* me, LONG x, LONG y,
- ITextRange** ppRange)
+static HRESULT WINAPI ITextDocument2Old_fnRangeFromPoint(ITextDocument2Old *iface, LONG x, LONG y,
+ ITextRange **ppRange)
{
- IRichEditOleImpl *This = impl_from_ITextDocument(me);
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
FIXME("stub %p\n",This);
return E_NOTIMPL;
}
-static const ITextDocumentVtbl tdvt = {
- ITextDocument_fnQueryInterface,
- ITextDocument_fnAddRef,
- ITextDocument_fnRelease,
- ITextDocument_fnGetTypeInfoCount,
- ITextDocument_fnGetTypeInfo,
- ITextDocument_fnGetIDsOfNames,
- ITextDocument_fnInvoke,
- ITextDocument_fnGetName,
- ITextDocument_fnGetSelection,
- ITextDocument_fnGetStoryCount,
- ITextDocument_fnGetStoryRanges,
- ITextDocument_fnGetSaved,
- ITextDocument_fnSetSaved,
- ITextDocument_fnGetDefaultTabStop,
- ITextDocument_fnSetDefaultTabStop,
- ITextDocument_fnNew,
- ITextDocument_fnOpen,
- ITextDocument_fnSave,
- ITextDocument_fnFreeze,
- ITextDocument_fnUnfreeze,
- ITextDocument_fnBeginEditCollection,
- ITextDocument_fnEndEditCollection,
- ITextDocument_fnUndo,
- ITextDocument_fnRedo,
- ITextDocument_fnRange,
- ITextDocument_fnRangeFromPoint
+/* ITextDocument2Old methods */
+static HRESULT WINAPI ITextDocument2Old_fnAttachMsgFilter(ITextDocument2Old *iface, IUnknown *filter)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, filter);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSetEffectColor(ITextDocument2Old *iface, LONG index, COLORREF cr)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, 0x%x): stub\n", This, index, cr);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetEffectColor(ITextDocument2Old *iface, LONG index, COLORREF *cr)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %p): stub\n", This, index, cr);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetCaretType(ITextDocument2Old *iface, LONG *type)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, type);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSetCaretType(ITextDocument2Old *iface, LONG type)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, type);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetImmContext(ITextDocument2Old *iface, LONG *context)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, context);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnReleaseImmContext(ITextDocument2Old *iface, LONG context)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, context);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetPreferredFont(ITextDocument2Old *iface, LONG cp, LONG charrep,
+ LONG options, LONG current_charrep, LONG current_fontsize,
+ BSTR *bstr, LONG *pitch_family, LONG *new_fontsize)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %d, %d, %d, %d, %p, %p, %p): stub\n", This, cp, charrep, options, current_charrep,
+ current_fontsize, bstr, pitch_family, new_fontsize);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetNotificationMode(ITextDocument2Old *iface, LONG *mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSetNotificationMode(ITextDocument2Old *iface, LONG mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(0x%x): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetClientRect(ITextDocument2Old *iface, LONG type, LONG *left, LONG *top,
+ LONG *right, LONG *bottom)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %p, %p, %p, %p): stub\n", This, type, left, top, right, bottom);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetSelectionEx(ITextDocument2Old *iface, ITextSelection **selection)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, selection);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetWindow(ITextDocument2Old *iface, LONG *hwnd)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, hwnd);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnGetFEFlags(ITextDocument2Old *iface, LONG *flags)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%p): stub\n", This, flags);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnUpdateWindow(ITextDocument2Old *iface)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p): stub\n", This);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnCheckTextLimit(ITextDocument2Old *iface, LONG cch, LONG *exceed)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d, %p): stub\n", This, cch, exceed);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnIMEInProgress(ITextDocument2Old *iface, LONG mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(0x%x): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnSysBeep(ITextDocument2Old *iface)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p): stub\n", This);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnUpdate(ITextDocument2Old *iface, LONG mode)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(0x%x): stub\n", This, mode);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ITextDocument2Old_fnNotify(ITextDocument2Old *iface, LONG notify)
+{
+ IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface);
+
+ FIXME("(%p)->(%d): stub\n", This, notify);
+
+ return E_NOTIMPL;
+}
+
+static const ITextDocument2OldVtbl tdvt = {
+ ITextDocument2Old_fnQueryInterface,
+ ITextDocument2Old_fnAddRef,
+ ITextDocument2Old_fnRelease,
+ ITextDocument2Old_fnGetTypeInfoCount,
+ ITextDocument2Old_fnGetTypeInfo,
+ ITextDocument2Old_fnGetIDsOfNames,
+ ITextDocument2Old_fnInvoke,
+ ITextDocument2Old_fnGetName,
+ ITextDocument2Old_fnGetSelection,
+ ITextDocument2Old_fnGetStoryCount,
+ ITextDocument2Old_fnGetStoryRanges,
+ ITextDocument2Old_fnGetSaved,
+ ITextDocument2Old_fnSetSaved,
+ ITextDocument2Old_fnGetDefaultTabStop,
+ ITextDocument2Old_fnSetDefaultTabStop,
+ ITextDocument2Old_fnNew,
+ ITextDocument2Old_fnOpen,
+ ITextDocument2Old_fnSave,
+ ITextDocument2Old_fnFreeze,
+ ITextDocument2Old_fnUnfreeze,
+ ITextDocument2Old_fnBeginEditCollection,
+ ITextDocument2Old_fnEndEditCollection,
+ ITextDocument2Old_fnUndo,
+ ITextDocument2Old_fnRedo,
+ ITextDocument2Old_fnRange,
+ ITextDocument2Old_fnRangeFromPoint,
+ /* ITextDocument2Old methods */
+ ITextDocument2Old_fnAttachMsgFilter,
+ ITextDocument2Old_fnSetEffectColor,
+ ITextDocument2Old_fnGetEffectColor,
+ ITextDocument2Old_fnGetCaretType,
+ ITextDocument2Old_fnSetCaretType,
+ ITextDocument2Old_fnGetImmContext,
+ ITextDocument2Old_fnReleaseImmContext,
+ ITextDocument2Old_fnGetPreferredFont,
+ ITextDocument2Old_fnGetNotificationMode,
+ ITextDocument2Old_fnSetNotificationMode,
+ ITextDocument2Old_fnGetClientRect,
+ ITextDocument2Old_fnGetSelectionEx,
+ ITextDocument2Old_fnGetWindow,
+ ITextDocument2Old_fnGetFEFlags,
+ ITextDocument2Old_fnUpdateWindow,
+ ITextDocument2Old_fnCheckTextLimit,
+ ITextDocument2Old_fnIMEInProgress,
+ ITextDocument2Old_fnSysBeep,
+ ITextDocument2Old_fnUpdate,
+ ITextDocument2Old_fnNotify
};
/* ITextSelection */
@@ -5276,7 +5459,7 @@ LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *p
reo->IUnknown_inner.lpVtbl = &reo_unk_vtbl;
reo->IRichEditOle_iface.lpVtbl = &revt;
- reo->ITextDocument_iface.lpVtbl = &tdvt;
+ reo->ITextDocument2Old_iface.lpVtbl = &tdvt;
reo->ref = 1;
reo->editor = editor;
reo->txtSel = NULL;
@@ -5509,8 +5692,8 @@ void ME_CopyReObject(REOBJECT *dst, const REOBJECT *src, DWORD flags)
}
}
-void ME_GetITextDocumentInterface(IRichEditOle *iface, LPVOID *ppvObj)
+void ME_GetITextDocument2OldInterface(IRichEditOle *iface, LPVOID *ppvObj)
{
IRichEditOleImpl *This = impl_from_IRichEditOle(iface);
- *ppvObj = &This->ITextDocument_iface;
+ *ppvObj = &This->ITextDocument2Old_iface;
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index aaf52bcfdd..3e42047a57 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -117,6 +117,7 @@ static void test_Interfaces(void)
{
IRichEditOle *reOle = NULL, *reOle1 = NULL;
ITextDocument *txtDoc = NULL;
+ ITextDocument2Old *txtDoc2Old = NULL;
ITextSelection *txtSel = NULL, *txtSel2;
IUnknown *punk;
HRESULT hres;
@@ -195,6 +196,14 @@ static void test_Interfaces(void)
hres = IRichEditOle_QueryInterface(reOle, &IID_IOleInPlaceSite, (void **) &punk);
ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n");
+ hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument2Old, (void **)&txtDoc2Old);
+ ok(hres == S_OK, "IRichEditOle_QueryInterface\n");
+ ok(txtDoc2Old != NULL, "IRichEditOle_QueryInterface\n");
+ ok((ITextDocument *)txtDoc2Old == txtDoc, "interface pointer isn't equal.\n");
+ EXPECT_REF(txtDoc2Old, 5);
+ EXPECT_REF(reOle, 5);
+ ITextDocument2Old_Release(txtDoc2Old);
+
ITextDocument_Release(txtDoc);
IRichEditOle_Release(reOle);
refcount = IRichEditOle_Release(reOle);
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index ee65621b1d..5ab3322e6b 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -83,7 +83,7 @@ static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID r
if (!CreateIRichEditOle(This->outer_unk, This->editor, (void **)(&This->editor->reOle)))
return E_OUTOFMEMORY;
if (IsEqualIID(riid, &IID_ITextDocument))
- ME_GetITextDocumentInterface(This->editor->reOle, ppv);
+ ME_GetITextDocument2OldInterface(This->editor->reOle, ppv);
else
*ppv = This->editor->reOle;
} else {
--
2.18.0
Sept. 13, 2018
[PATCH v3 1/4] include: Add ITextDocument2Old and ITextDocument2 interface.
by Jactry Zeng
Sorry for the spam. This fixed a test failure in [4/4].
Superseded patch 151075.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
---
include/tom.idl | 91 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/include/tom.idl b/include/tom.idl
index 357b0457a5..afc24ca5fb 100644
--- a/include/tom.idl
+++ b/include/tom.idl
@@ -237,6 +237,97 @@ interface ITextDocument : IDispatch
HRESULT RangeFromPoint([in]LONG x, [in]LONG y, [retval, out]ITextRange **ppRange);
}
+[
+ object,
+ uuid(01C25500-4268-11D1-883A-3C8B00C10000)
+]
+interface ITextDocument2Old : ITextDocument
+{
+ HRESULT AttachMsgFilter([in]IUnknown *filter);
+ HRESULT SetEffectColor([in]LONG index, [in]COLORREF cr);
+ HRESULT GetEffectColor([in]LONG index, [out]COLORREF *cr);
+ HRESULT GetCaretType([retval, out]LONG *type);
+ HRESULT SetCaretType([in]LONG type);
+ HRESULT GetImmContext([retval, out]LONG *context);
+ HRESULT ReleaseImmContext([in]LONG context);
+ HRESULT GetPreferredFont([in]LONG cp, [in]LONG codepage, [in]LONG option, [in]LONG current_codepage, [in]LONG current_fontsize,
+ [out]BSTR *bstr, [out]LONG *pitch_family, [out]LONG *new_fontsize);
+ HRESULT GetNotificationMode([retval, out]LONG *mode);
+ HRESULT SetNotificationMode([in]LONG mode);
+ HRESULT GetClientRect([in]LONG type, [out]LONG *left, [out]LONG *top, [out]LONG *right, [out]LONG *bottom);
+ HRESULT GetSelectionEx([retval, out]ITextSelection **selection);
+ HRESULT GetWindow([out]LONG *hwnd);
+ HRESULT GetFEFlags([out]LONG *flags);
+ HRESULT UpdateWindow();
+ HRESULT CheckTextLimit([in]LONG cch, [out]LONG *exceed);
+ HRESULT IMEInProgress([in]LONG mode);
+ HRESULT SysBeep();
+ HRESULT Update([in]LONG mode);
+ HRESULT Notify([in]LONG notify);
+}
+
+interface ITextDisplays;
+interface ITextFont2;
+interface ITextPara2;
+interface ITextRange2;
+interface ITextSelection2;
+interface ITextStory;
+interface ITextStoryRanges2;
+interface ITextStrings;
+
+[
+ object,
+ uuid(c241f5e0-7206-11d8-a2c7-00a0d1d6c6b3)
+]
+interface ITextDocument2 : ITextDocument
+{
+ HRESULT GetCaretType([retval, out]LONG *value);
+ HRESULT SetCaretType([in]LONG value);
+ HRESULT GetDisplays([retval, out]ITextDisplays **displays);
+ HRESULT GetDocumentFont([retval, out]ITextFont2 **font);
+ HRESULT SetDocumentFont([in]ITextFont2 *font);
+ HRESULT GetDocumentPara([retval, out]ITextPara2 **para);
+ HRESULT SetDocumentPara([in]ITextPara2 *para);
+ HRESULT GetEastAsianFlags([retval, out]LONG *flags);
+ HRESULT GetGenerator([retval, out]BSTR *bstr);
+ HRESULT SetIMEInProgress([in]LONG value);
+ HRESULT GetNotificationMode([retval, out]LONG *mode);
+ HRESULT SetNotificationMode([in]LONG mode);
+ HRESULT GetSelection2([retval, out]ITextSelection2 **selection);
+ HRESULT GetStoryRanges2([retval, out]ITextStoryRanges2 **stories);
+ HRESULT GetTypographyOptions([retval, out]LONG *options);
+ HRESULT GetVersion([retval, out]LONG *value);
+ HRESULT GetWindow([retval, out]LONG *hwnd);
+ HRESULT AttachMsgFilter([in]IUnknown *filter);
+ HRESULT CheckTextLimit([in]LONG cch, [out]LONG *exceed);
+ HRESULT GetCallManager([retval, out]IUnknown **manager);
+ HRESULT GetClientRect([in]LONG type, [out]LONG *left, [out]LONG *top, [out]LONG *right, [out]LONG *bottom);
+ HRESULT GetEffectColor([in]LONG index, [out]COLORREF *cr);
+ HRESULT GetImmContext([retval, out]LONG *context);
+ HRESULT GetPreferredFont([in]LONG cp, [in]LONG codepage, [in]LONG option, [in]LONG current_codepage, [in]LONG current_fontsize,
+ [out]BSTR *bstr, [out]LONG *pitch_family, [out]LONG *new_fontsize);
+ HRESULT GetProperty([in]LONG type, [out]LONG *value);
+ HRESULT GetStrings([out]ITextStrings **strings);
+ HRESULT Notify([in]LONG notify);
+ HRESULT Range2([in]LONG cp_active, [in]LONG cp_anchor, [retval, out]ITextRange2 **range);
+ HRESULT RangeFromPoint2([in]LONG x, [in]LONG y, [in]LONG type, [retval, out]ITextRange2 **range);
+ HRESULT ReleaseCallManager([in]IUnknown *manager);
+ HRESULT ReleaseImmContext([in]LONG context);
+ HRESULT SetEffectColor([in]LONG index, [in]LONG value);
+ HRESULT SetProperty([in]LONG type, [in]LONG value);
+ HRESULT SetTypographyOptions([in]LONG options, [in]LONG mask);
+ HRESULT SysBeep();
+ HRESULT Update([in]LONG value);
+ HRESULT UpdateWindow();
+ HRESULT GetMathProperties([out]LONG *options);
+ HRESULT SetMathProperties([in]LONG options, [in]LONG mask);
+ HRESULT GetActiveStory([retval, out]ITextStory **story);
+ HRESULT SetActiveStory([in]ITextStory *story);
+ HRESULT GetMainStory([retval, out]ITextStory **story);
+ HRESULT GetNewStory([retval, out]ITextStory **story);
+ HRESULT GetStory([in]LONG index, [retval, out]ITextStory **story);
+}
+
interface ITextFont;
interface ITextPara;
--
2.18.0
Sept. 13, 2018