winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
October 2014
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
397 discussions
Start a n
N
ew thread
Alexandre Julliard : wininet/tests: Fix a test failure on Windows.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: d883281806e4e54bbd2c36326005d5e8d9a7953c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d883281806e4e54bbd2c36326…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 30 13:16:42 2014 +0900 wininet/tests: Fix a test failure on Windows. --- dlls/wininet/tests/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index ca5f4af..98c8d62 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -4223,7 +4223,7 @@ static void test_cert_struct(HINTERNET req, const cert_struct_test_t *test) ok(!info.lpszSignatureAlgName, "lpszSignatureAlgName = %s\n", info.lpszSignatureAlgName); ok(!info.lpszEncryptionAlgName, "lpszEncryptionAlgName = %s\n", info.lpszEncryptionAlgName); ok(!info.lpszProtocolName, "lpszProtocolName = %s\n", info.lpszProtocolName); - ok(info.dwKeySize == 128 || info.dwKeySize == 256, "dwKeySize = %u\n", info.dwKeySize); + ok(info.dwKeySize >= 128 && info.dwKeySize <= 256, "dwKeySize = %u\n", info.dwKeySize); release_cert_info(&info); }
1
0
0
0
Alexandre Julliard : cmd: Add a helper function to check if a path ends with a backslash.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: 3d3c5ab4006de7a80af421ddfeb2cad699fb03f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d3c5ab4006de7a80af421ddf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 30 13:11:27 2014 +0900 cmd: Add a helper function to check if a path ends with a backslash. --- programs/cmd/builtins.c | 6 +++--- programs/cmd/directory.c | 9 ++------- programs/cmd/wcmd.h | 5 +++++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index f7db4a9..6751d3e 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -798,12 +798,12 @@ void WCMD_copy(WCHAR * args) { /* If parameter is a directory, ensure it ends in \ */ attributes = GetFileAttributesW(destname); - if ((destname[strlenW(destname) - 1] == '\\') || + if (ends_with_backslash( destname ) || ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY))) { destisdirectory = TRUE; - if (!(destname[strlenW(destname) - 1] == '\\')) strcatW(destname, slashW); + if (!ends_with_backslash( destname )) strcatW(destname, slashW); WINE_TRACE("Directory, so full name is now '%s'\n", wine_dbgstr_w(destname)); } } @@ -880,7 +880,7 @@ void WCMD_copy(WCHAR * args) { /* If parameter is a directory, ensure it ends in \* */ attributes = GetFileAttributesW(srcpath); - if (srcpath[strlenW(srcpath) - 1] == '\\') { + if (ends_with_backslash( srcpath )) { /* We need to know where the filename part starts, so append * and recalculate the full resulting path */ diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index 678e2a1..91142be 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -833,13 +833,8 @@ void WCMD_directory (WCHAR *args) if ((strchrW(path, '*') == NULL) && (strchrW(path, '%') == NULL)) { status = GetFileAttributesW(path); if ((status != INVALID_FILE_ATTRIBUTES) && (status & FILE_ATTRIBUTE_DIRECTORY)) { - if (path[strlenW(path)-1] == '\\') { - strcatW (path, starW); - } - else { - static const WCHAR slashStarW[] = {'\\','*','\0'}; - strcatW (path, slashStarW); - } + if (!ends_with_backslash( path )) strcatW( path, slashW ); + strcatW (path, starW); } } else { /* Special case wildcard search with no extension (ie parameters ending in '.') as diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index e5a0138..c135621 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -148,6 +148,11 @@ static inline WCHAR *heap_strdupW(const WCHAR *str) return ret; } +static inline BOOL ends_with_backslash( const WCHAR *path ) +{ + return path[0] && path[strlenW(path) - 1] == '\\'; +} + /* Data structure to hold context when executing batch files */ typedef struct _BATCH_CONTEXT {
1
0
0
0
Austin English : ntoskrnl.exe: Add ObQueryNameString stub.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: 9c5f23121a4c93106142ec602da28698d128682e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c5f23121a4c93106142ec602…
Author: Austin English <austinenglish(a)gmail.com> Date: Wed Oct 29 12:32:36 2014 -0500 ntoskrnl.exe: Add ObQueryNameString stub. --- dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/ntifs.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 7bb96fb..23379b8 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1927,3 +1927,12 @@ VOID WINAPI IoStartNextPacket(PDEVICE_OBJECT deviceobject, BOOLEAN cancelable) { FIXME("(%p %d) stub\n", deviceobject, cancelable); } + +/***************************************************** + * ObQueryNameString (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI ObQueryNameString(PVOID object, POBJECT_NAME_INFORMATION name, ULONG maxlength, PULONG returnlength) +{ + FIXME("(%p %p %u %p) stub\n", object, name, maxlength, returnlength); + return STATUS_NOT_IMPLEMENTED; +} diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 11aaa2b..1512cf8 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -807,7 +807,7 @@ @ stub ObMakeTemporaryObject @ stub ObOpenObjectByName @ stub ObOpenObjectByPointer -@ stub ObQueryNameString +@ stdcall ObQueryNameString(ptr ptr long ptr) @ stub ObQueryObjectAuditingByHandle @ stdcall ObReferenceObjectByHandle(long long ptr long ptr ptr) @ stdcall ObReferenceObjectByName(ptr long ptr long ptr long ptr ptr) diff --git a/include/ddk/ntifs.h b/include/ddk/ntifs.h index 37ec637..a8d90a1 100644 --- a/include/ddk/ntifs.h +++ b/include/ddk/ntifs.h @@ -28,4 +28,6 @@ typedef struct _KQUEUE LIST_ENTRY ThreadListHead; } KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE; +NTSTATUS WINAPI ObQueryNameString(PVOID,POBJECT_NAME_INFORMATION,ULONG,PULONG); + #endif
1
0
0
0
Austin English : ndis.sys: Add a stub dll.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: 779f7e527d1fd844f1c471f0ef40da69bf479a34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=779f7e527d1fd844f1c471f0e…
Author: Austin English <austinenglish(a)gmail.com> Date: Wed Oct 29 12:30:39 2014 -0500 ndis.sys: Add a stub dll. --- configure | 2 + configure.ac | 1 + dlls/ndis.sys/Makefile.in | 4 + dlls/ndis.sys/main.c | 40 +++++++ dlls/ndis.sys/ndis.sys.spec | 276 ++++++++++++++++++++++++++++++++++++++++++++ loader/wine.inf.in | 2 + 6 files changed, 325 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=779f7e527d1fd844f1c47…
1
0
0
0
Jactry Zeng : riched20: Add IID_IRichEditOle and IID_ITextDocument support for ITextServices:: QueryInterface.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: a9491ec5d9f703e9a60e9effa4072d4d6908a2e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9491ec5d9f703e9a60e9effa…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Oct 28 20:10:46 2014 +0800 riched20: Add IID_IRichEditOle and IID_ITextDocument support for ITextServices::QueryInterface. --- dlls/riched20/editor.c | 2 +- dlls/riched20/editor.h | 2 ++ dlls/riched20/richole.c | 33 ++++++++++++++------- dlls/riched20/tests/txtsrv.c | 69 ++++++++++++++++++++++++++++++++++++++++++++ dlls/riched20/txtsrv.c | 11 ++++++- 5 files changed, 104 insertions(+), 13 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 375b162..1e62fc1 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2889,7 +2889,7 @@ void ME_DestroyEditor(ME_TextEditor *editor) ITextHost_Release(editor->texthost); if (editor->reOle) { - IRichEditOle_Release(editor->reOle); + DestroyIRichEditOle(editor->reOle); editor->reOle = NULL; } OleUninitialize(); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 255945e..d8abe4e 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -241,10 +241,12 @@ int ME_GetParaBorderWidth(const ME_Context *c, int flags) DECLSPEC_HIDDEN; /* richole.c */ LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *ppvObj) DECLSPEC_HIDDEN; +void DestroyIRichEditOle(IRichEditOle *iface) DECLSPEC_HIDDEN; void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, ME_Paragraph *para, BOOL selected) DECLSPEC_HIDDEN; void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN; void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) DECLSPEC_HIDDEN; void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN; +void ME_GetITextDocumentInterface(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 07ba279..0788125 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -143,17 +143,7 @@ static ULONG WINAPI IRichEditOleImpl_inner_fnRelease(IUnknown *iface) TRACE ("%p ref=%u\n", This, ref); if (!ref) - { - ITextRangeImpl *txtRge; - TRACE ("Destroying %p\n", This); - This->txtSel->reOle = NULL; - This->editor->reOle = NULL; - ITextSelection_Release(&This->txtSel->ITextSelection_iface); - IOleClientSite_Release(&This->clientSite->IOleClientSite_iface); - LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry) - txtRge->reOle = NULL; - heap_free(This); - } + DestroyIRichEditOle(&This->IRichEditOle_iface); return ref; } @@ -2375,6 +2365,21 @@ LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *p return 1; } +void DestroyIRichEditOle(IRichEditOle *iface) +{ + IRichEditOleImpl *This = impl_from_IRichEditOle(iface); + ITextRangeImpl *txtRge; + + TRACE("Destroying %p\n", This); + This->txtSel->reOle = NULL; + This->editor->reOle = NULL; + ITextSelection_Release(&This->txtSel->ITextSelection_iface); + IOleClientSite_Release(&This->clientSite->IOleClientSite_iface); + LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry) + txtRge->reOle = NULL; + heap_free(This); +} + static void convert_sizel(const ME_Context *c, const SIZEL* szl, SIZE* sz) { /* sizel is in .01 millimeters, sz in pixels */ @@ -2578,3 +2583,9 @@ void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) if (dst->pstg) IStorage_AddRef(dst->pstg); if (dst->polesite) IOleClientSite_AddRef(dst->polesite); } + +void ME_GetITextDocumentInterface(IRichEditOle *iface, LPVOID *ppvObj) +{ + IRichEditOleImpl *This = impl_from_IRichEditOle(iface); + *ppvObj = &This->ITextDocument_iface; +} diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c index 3401f8b..c154e2d 100644 --- a/dlls/riched20/tests/txtsrv.c +++ b/dlls/riched20/tests/txtsrv.c @@ -29,6 +29,8 @@ #include <winbase.h> #include <objbase.h> #include <richedit.h> +#include <tom.h> +#include <richole.h> #include <initguid.h> #include <imm.h> #include <textserv.h> @@ -862,6 +864,72 @@ static void test_COM(void) IUnknown_Release(unk_obj.inner_unk); } +static ULONG get_refcount(IUnknown *iface) +{ + IUnknown_AddRef(iface); + return IUnknown_Release(iface); +} + +static void test_QueryInterface(void) +{ + HRESULT hres; + IRichEditOle *reole, *txtsrv_reole; + ITextDocument *txtdoc, *txtsrv_txtdoc; + ULONG refcount; + + if(!init_texthost()) + return; + + refcount = get_refcount((IUnknown *)txtserv); + ok(refcount == 1, "got wrong ref count: %d\n", refcount); + + /* IID_IRichEditOle */ + hres = ITextServices_QueryInterface(txtserv, &IID_IRichEditOle, (void **)&txtsrv_reole); + 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_reole); + ok(refcount == 2, "got wrong ref count: %d\n", refcount); + + hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument, (void **)&txtdoc); + 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); + + ITextDocument_Release(txtdoc); + 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); + + /* IID_ITextDocument */ + hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument, (void **)&txtsrv_txtdoc); + 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_txtdoc); + ok(refcount == 2, "got wrong ref count: %d\n", refcount); + + hres = ITextDocument_QueryInterface(txtsrv_txtdoc, &IID_IRichEditOle, (void **)&reole); + ok(hres == S_OK, "ITextDocument_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_txtdoc); + 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); + ITextDocument_Release(txtsrv_txtdoc); + refcount = get_refcount((IUnknown *)txtserv); + ok(refcount == 1, "got wrong ref count: %d\n", refcount); + + free_texthost(); +} + START_TEST( txtsrv ) { setup_thiscall_wrappers(); @@ -887,6 +955,7 @@ START_TEST( txtsrv ) test_TxSetText(); test_TxGetNaturalSize(); test_TxDraw(); + test_QueryInterface(); } if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE); } diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 0ca1e1b..75bee6d 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -29,6 +29,7 @@ #include "ole2.h" #include "oleauto.h" #include "richole.h" +#include "tom.h" #include "imm.h" #include "textserv.h" #include "wine/debug.h" @@ -79,7 +80,15 @@ static HRESULT WINAPI ITextServicesImpl_QueryInterface(IUnknown *iface, REFIID r *ppv = &This->IUnknown_inner; else if (IsEqualIID(riid, &IID_ITextServices)) *ppv = &This->ITextServices_iface; - else { + else if (IsEqualIID(riid, &IID_IRichEditOle) || IsEqualIID(riid, &IID_ITextDocument)) { + if (!This->editor->reOle) + 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); + else + *ppv = This->editor->reOle; + } else { *ppv = NULL; FIXME("Unknown interface: %s\n", debugstr_guid(riid)); return E_NOINTERFACE;
1
0
0
0
Jactry Zeng : riched20: Add COM aggregation support for IRichEditOle.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: 234310e752620dbcc55b6ecd76b860bd8c97218f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=234310e752620dbcc55b6ecd7…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Oct 28 20:10:33 2014 +0800 riched20: Add COM aggregation support for IRichEditOle. --- dlls/riched20/editor.c | 4 +-- dlls/riched20/editor.h | 2 +- dlls/riched20/richole.c | 72 +++++++++++++++++++++++++++++++++++++------------ 3 files changed, 58 insertions(+), 20 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index a277510..375b162 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1194,7 +1194,7 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm if (!info->lpRichEditOle) { - CreateIRichEditOle(info->editor, (VOID**)&info->lpRichEditOle); + CreateIRichEditOle(NULL, info->editor, (VOID**)&info->lpRichEditOle); } if (OleCreateDefaultHandler(&CLSID_NULL, NULL, &IID_IOleObject, (void**)&lpObject) == S_OK && @@ -4474,7 +4474,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, case EM_GETOLEINTERFACE: { if (!editor->reOle) - if (!CreateIRichEditOle(editor, (LPVOID *)&editor->reOle)) + if (!CreateIRichEditOle(NULL, editor, (LPVOID *)&editor->reOle)) return 0; *(LPVOID *)lParam = editor->reOle; IRichEditOle_AddRef(editor->reOle); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 3987907..255945e 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -240,7 +240,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor) DECLSPEC_HIDDEN; int ME_GetParaBorderWidth(const ME_Context *c, int flags) DECLSPEC_HIDDEN; /* richole.c */ -LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *) DECLSPEC_HIDDEN; +LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *ppvObj) DECLSPEC_HIDDEN; void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, ME_Paragraph *para, BOOL selected) DECLSPEC_HIDDEN; void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN; void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 9e7c123..07ba279 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -52,8 +52,10 @@ typedef struct IOleClientSiteImpl IOleClientSiteImpl; typedef struct ITextRangeImpl ITextRangeImpl; typedef struct IRichEditOleImpl { + IUnknown IUnknown_inner; IRichEditOle IRichEditOle_iface; ITextDocument ITextDocument_iface; + IUnknown *outer_unk; LONG ref; ME_TextEditor *editor; @@ -95,44 +97,47 @@ static inline IRichEditOleImpl *impl_from_ITextDocument(ITextDocument *iface) return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument_iface); } -static HRESULT WINAPI -IRichEditOle_fnQueryInterface(IRichEditOle *me, REFIID riid, LPVOID *ppvObj) +static inline IRichEditOleImpl *impl_from_IUnknown(IUnknown *iface) { - IRichEditOleImpl *This = impl_from_IRichEditOle(me); + return CONTAINING_RECORD(iface, IRichEditOleImpl, IUnknown_inner); +} - TRACE("%p %s\n", This, debugstr_guid(riid) ); +static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppvObj) +{ + IRichEditOleImpl *This = impl_from_IUnknown(iface); + + TRACE("%p %s\n", This, debugstr_guid(riid)); *ppvObj = NULL; - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IRichEditOle)) + if (IsEqualGUID(riid, &IID_IUnknown)) + *ppvObj = &This->IUnknown_inner; + else if (IsEqualGUID(riid, &IID_IRichEditOle)) *ppvObj = &This->IRichEditOle_iface; else if (IsEqualGUID(riid, &IID_ITextDocument)) *ppvObj = &This->ITextDocument_iface; if (*ppvObj) { - IRichEditOle_AddRef(me); + IUnknown_AddRef((IUnknown *)*ppvObj); return S_OK; } - FIXME("%p: unhandled interface %s\n", This, debugstr_guid(riid) ); + FIXME("%p: unhandled interface %s\n", This, debugstr_guid(riid)); return E_NOINTERFACE; } -static ULONG WINAPI -IRichEditOle_fnAddRef(IRichEditOle *me) +static ULONG WINAPI IRichEditOleImpl_inner_fnAddRef(IUnknown *iface) { - IRichEditOleImpl *This = impl_from_IRichEditOle(me); - ULONG ref = InterlockedIncrement( &This->ref ); + IRichEditOleImpl *This = impl_from_IUnknown(iface); + ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p ref = %u\n", This, ref); return ref; } -static ULONG WINAPI -IRichEditOle_fnRelease(IRichEditOle *me) +static ULONG WINAPI IRichEditOleImpl_inner_fnRelease(IUnknown *iface) { - IRichEditOleImpl *This = impl_from_IRichEditOle(me); + IRichEditOleImpl *This = impl_from_IUnknown(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE ("%p ref=%u\n", This, ref); @@ -152,6 +157,34 @@ IRichEditOle_fnRelease(IRichEditOle *me) return ref; } +static const IUnknownVtbl reo_unk_vtbl = +{ + IRichEditOleImpl_inner_fnQueryInterface, + IRichEditOleImpl_inner_fnAddRef, + IRichEditOleImpl_inner_fnRelease +}; + +static HRESULT WINAPI +IRichEditOle_fnQueryInterface(IRichEditOle *me, REFIID riid, LPVOID *ppvObj) +{ + IRichEditOleImpl *This = impl_from_IRichEditOle(me); + return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj); +} + +static ULONG WINAPI +IRichEditOle_fnAddRef(IRichEditOle *me) +{ + IRichEditOleImpl *This = impl_from_IRichEditOle(me); + return IUnknown_AddRef(This->outer_unk); +} + +static ULONG WINAPI +IRichEditOle_fnRelease(IRichEditOle *me) +{ + IRichEditOleImpl *This = impl_from_IRichEditOle(me); + return IUnknown_Release(This->outer_unk); +} + static HRESULT WINAPI IRichEditOle_fnActivateAs(IRichEditOle *me, REFCLSID rclsid, REFCLSID rclsidAs) { @@ -2305,7 +2338,7 @@ CreateTextSelection(IRichEditOleImpl *reOle) return txtSel; } -LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) +LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *ppvObj) { IRichEditOleImpl *reo; @@ -2313,6 +2346,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) if (!reo) return 0; + reo->IUnknown_inner.lpVtbl = &reo_unk_vtbl; reo->IRichEditOle_iface.lpVtbl = &revt; reo->ITextDocument_iface.lpVtbl = &tdvt; reo->ref = 1; @@ -2331,8 +2365,12 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) return 0; } TRACE("Created %p\n",reo); - *ppObj = reo; list_init(&reo->rangelist); + if (outer_unk) + reo->outer_unk = outer_unk; + else + reo->outer_unk = &reo->IUnknown_inner; + *ppvObj = &reo->IRichEditOle_iface; return 1; }
1
0
0
0
Jactry Zeng : riched20: Fix a leak.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: ffb706ceb0ce59088f134012c185f6876436306b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffb706ceb0ce59088f134012c…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Oct 28 20:10:03 2014 +0800 riched20: Fix a leak. --- dlls/riched20/editor.c | 2 +- dlls/riched20/editor.h | 1 + dlls/riched20/txtsrv.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 3c0d970..a277510 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2863,7 +2863,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) return ed; } -static void ME_DestroyEditor(ME_TextEditor *editor) +void ME_DestroyEditor(ME_TextEditor *editor) { ME_DisplayItem *pFirst = editor->pBuffer->pFirst; ME_DisplayItem *p = pFirst, *pNext = NULL; diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index edbac8e..3987907 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -248,6 +248,7 @@ void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN; /* editor.c */ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSPEC_HIDDEN; +void ME_DestroyEditor(ME_TextEditor *editor) DECLSPEC_HIDDEN; LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode, HRESULT* phresult) DECLSPEC_HIDDEN; void ME_SendOldNotify(ME_TextEditor *editor, int nCode) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 636efff..0ca1e1b 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -108,7 +108,7 @@ static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface) if (!ref) { - ITextHost_Release(This->pMyHost); + ME_DestroyEditor(This->editor); This->csTxtSrv.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->csTxtSrv); CoTaskMemFree(This);
1
0
0
0
Bruno Jesus : regedit: Allow importing/exporting strings with '\r'.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: 84d72396401f845969d2b9b55506e606d2419d3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84d72396401f845969d2b9b55…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Oct 29 23:55:08 2014 -0200 regedit: Allow importing/exporting strings with '\r'. --- programs/regedit/regproc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 9d96287..1adeddf 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -267,6 +267,9 @@ static int REGPROC_unescape_string(WCHAR* str) case 'n': str[val_idx] = '\n'; break; + case 'r': + str[val_idx] = '\r'; + break; case '0': str[val_idx] = '\0'; break; @@ -963,6 +966,13 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD (*line_buf)[pos++] = 'n'; break; + case '\r': + extra++; + REGPROC_resize_char_buffer(line_buf, line_buf_size, *line_len + str_len + extra); + (*line_buf)[pos++] = '\\'; + (*line_buf)[pos++] = 'r'; + break; + case '\\': case '"': extra++;
1
0
0
0
Michael Stefaniuc : wined3d: Remove no-op min() with magic number ( PVS_Studio).
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: 00c25959d1fcd5718823620c5d742924cb56246e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00c25959d1fcd5718823620c5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Oct 30 00:36:21 2014 +0100 wined3d: Remove no-op min() with magic number (PVS_Studio). --- dlls/wined3d/arb_program_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index bfbe09c..a7bc23d 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -4257,7 +4257,7 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader, { int i; const char *one = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_ONE); - for(i = 0; i < min(8, MAX_REG_TEXCRD); i++) + for(i = 0; i < MAX_REG_TEXCRD; i++) { if (reg_maps->texcoord_mask[i] && reg_maps->texcoord_mask[i] != WINED3DSP_WRITEMASK_ALL) shader_addline(buffer, "MOV result.texcoord[%u].w, %s\n", i, one);
1
0
0
0
Nikolay Sivov : dwrite: Store pixels per dip value for a render target.
by Alexandre Julliard
30 Oct '14
30 Oct '14
Module: wine Branch: master Commit: afea35f56abe3a3830e3d622816d6431718ad1e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=afea35f56abe3a3830e3d6228…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 29 22:53:42 2014 +0300 dwrite: Store pixels per dip value for a render target. --- dlls/dwrite/gdiinterop.c | 16 ++++++++++++---- dlls/dwrite/tests/font.c | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index 0e2f902..b099e52 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -40,6 +40,7 @@ struct rendertarget { IDWriteBitmapRenderTarget IDWriteBitmapRenderTarget_iface; LONG ref; + FLOAT pixels_per_dip; DWRITE_MATRIX m; SIZE size; HDC hdc; @@ -140,15 +141,21 @@ static HDC WINAPI rendertarget_GetMemoryDC(IDWriteBitmapRenderTarget *iface) static FLOAT WINAPI rendertarget_GetPixelsPerDip(IDWriteBitmapRenderTarget *iface) { struct rendertarget *This = impl_from_IDWriteBitmapRenderTarget(iface); - FIXME("(%p): stub\n", This); - return 1.0; + TRACE("(%p)\n", This); + return This->pixels_per_dip; } static HRESULT WINAPI rendertarget_SetPixelsPerDip(IDWriteBitmapRenderTarget *iface, FLOAT pixels_per_dip) { struct rendertarget *This = impl_from_IDWriteBitmapRenderTarget(iface); - FIXME("(%p)->(%f): stub\n", This, pixels_per_dip); - return E_NOTIMPL; + + TRACE("(%p)->(%.2f)\n", This, pixels_per_dip); + + if (pixels_per_dip <= 0.0) + return E_INVALIDARG; + + This->pixels_per_dip = pixels_per_dip; + return S_OK; } static HRESULT WINAPI rendertarget_GetCurrentTransform(IDWriteBitmapRenderTarget *iface, DWRITE_MATRIX *transform) @@ -229,6 +236,7 @@ static HRESULT create_rendertarget(HDC hdc, UINT32 width, UINT32 height, IDWrite target->m.m11 = target->m.m22 = 1.0; target->m.m12 = target->m.m21 = 0.0; target->m.dx = target->m.dy = 0.0; + target->pixels_per_dip = 1.0; *ret = &target->IDWriteBitmapRenderTarget_iface; diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 29f3a39..e76dd6a 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -379,6 +379,7 @@ static void test_CreateBitmapRenderTarget(void) DWRITE_MATRIX m; DIBSECTION ds; HRESULT hr; + FLOAT pdip; SIZE size; HDC hdc; int ret; @@ -511,6 +512,22 @@ if (0) /* crashes on native */ ok(m.m11 == 1.0 && m.m22 == 1.0 && m.m12 == 0.0 && m.m21 == 0.0, "got %.1f,%.1f,%.1f,%.1f\n", m.m11, m.m22, m.m12, m.m21); ok(m.dx == 0.0 && m.dy == 0.0, "got %.1f,%.1f\n", m.dx, m.dy); + /* pixels per dip */ + pdip = IDWriteBitmapRenderTarget_GetPixelsPerDip(target); + ok(pdip == 1.0, "got %.2f\n", pdip); + + hr = IDWriteBitmapRenderTarget_SetPixelsPerDip(target, 2.0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteBitmapRenderTarget_SetPixelsPerDip(target, -1.0); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IDWriteBitmapRenderTarget_SetPixelsPerDip(target, 0.0); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + pdip = IDWriteBitmapRenderTarget_GetPixelsPerDip(target); + ok(pdip == 2.0, "got %.2f\n", pdip); + IDWriteBitmapRenderTarget_Release(target); IDWriteGdiInterop_Release(interop); IDWriteFactory_Release(factory);
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
40
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Results per page:
10
25
50
100
200