ReactOS.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
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
List overview
Download
Ros-diffs
August 2016
----- 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
ros-diffs@reactos.org
20 participants
462 discussions
Start a n
N
ew thread
[akhaldi] 72308: [SHLWAPI_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:44:39 2016 New Revision: 72308 URL:
http://svn.reactos.org/svn/reactos?rev=72308&view=rev
Log: [SHLWAPI_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/shlwapi/ordinal.c trunk/rostests/winetests/shlwapi/thread.c Modified: trunk/rostests/winetests/shlwapi/ordinal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/ordinal…
============================================================================== --- trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] Thu Aug 18 10:44:39 2016 @@ -1015,7 +1015,8 @@ EXCEPINFO *pExcepInfo, UINT *puArgErr) { - trace("%p %x %p %x %x %p %p %p %p\n",This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr); + trace("%p %x %s %x %x %p %p %p %p\n", This, dispIdMember, wine_dbgstr_guid(riid), lcid, wFlags, + pDispParams, pVarResult, pExcepInfo, puArgErr); ok(dispIdMember == 0xa0 || dispIdMember == 0xa1, "Unknown dispIdMember\n"); ok(pDispParams != NULL, "Invoked with NULL pDispParams\n"); @@ -3243,7 +3244,9 @@ HRESULT hr; if (0) /* crashes on native systems */ +{ hr = pIUnknown_GetClassID(NULL, NULL); +} memset(&clsid, 0xcc, sizeof(clsid)); memset(&clsid3, 0xcc, sizeof(clsid3)); Modified: trunk/rostests/winetests/shlwapi/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/thread.…
============================================================================== --- trunk/rostests/winetests/shlwapi/thread.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/thread.c [iso-8859-1] Thu Aug 18 10:44:39 2016 @@ -57,7 +57,7 @@ { threadref * This = impl_from_IUnknown(iface); - trace("unexpected QueryInterface(%p, %p, %p) called\n", This, riid, ppvObj); + trace("unexpected QueryInterface(%p, %s, %p) called\n", This, wine_dbgstr_guid(riid), ppvObj); *ppvObj = NULL; return E_NOINTERFACE; }
8 years, 4 months
1
0
0
0
[akhaldi] 72307: [SHLWAPI] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:43:47 2016 New Revision: 72307 URL:
http://svn.reactos.org/svn/reactos?rev=72307&view=rev
Log: [SHLWAPI] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/shlwapi/url.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/shlwapi/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?re…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] Thu Aug 18 10:43:47 2016 @@ -911,7 +911,7 @@ } if (ret == S_OK) { - /* Reuse mrelative as temp storage as its already allocated and not needed anymore */ + /* Reuse mrelative as temp storage as it's already allocated and not needed anymore */ if(*pcchCombined == 0) *pcchCombined = 1; ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, (dwFlags & ~URL_FILE_USE_PATHURL)); @@ -946,8 +946,10 @@ if(!RtlCreateUnicodeStringFromAsciiz(&urlW, pszUrl)) return E_INVALIDARG; - if(dwFlags & URL_ESCAPE_AS_UTF8) + if(dwFlags & URL_ESCAPE_AS_UTF8) { + RtlFreeUnicodeString(&urlW); return E_NOTIMPL; + } if((ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags)) == E_POINTER) { escapedW = HeapAlloc(GetProcessHeap(), 0, lenW * sizeof(WCHAR)); ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Aug 18 10:43:47 2016 @@ -177,7 +177,7 @@ reactos/dll/win32/shdocvw # Synced to WineStaging-1.9.11 reactos/dll/win32/shell32 # Forked at Wine-20071011 reactos/dll/win32/shfolder # Synced to WineStaging-1.9.11 -reactos/dll/win32/shlwapi # Synced to WineStaging-1.9.11 +reactos/dll/win32/shlwapi # Synced to WineStaging-1.9.16 reactos/dll/win32/slbcsp # Synced to WineStaging-1.9.11 reactos/dll/win32/snmpapi # Synced to WineStaging-1.9.11 reactos/dll/win32/softpub # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[akhaldi] 72306: [RICHED20_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:41:23 2016 New Revision: 72306 URL:
http://svn.reactos.org/svn/reactos?rev=72306&view=rev
Log: [RICHED20_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/riched20/editor.c Modified: trunk/rostests/winetests/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/editor…
============================================================================== --- trunk/rostests/winetests/riched20/editor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/editor.c [iso-8859-1] Thu Aug 18 10:41:23 2016 @@ -1781,6 +1781,7 @@ "This is some text with #X on it", "This is some text with @X on it", "This is some text with \\X on it", + "This is some text with _X on it", }; /* All of these cause the URL detection to be extended by one more byte, thus demonstrating that the tested character is considered as part @@ -1794,6 +1795,33 @@ "This is some text with X# on it", "This is some text with X@ on it", "This is some text with X\\ on it", + "This is some text with X_ on it", + }; + /* These delims act as neutral breaks. Whether the url is ended + or not depends on the next non-neutral character. We'll test + with Y unchanged, in which case the url should include the + deliminator and the Y. We'll also test with the Y changed + to a space, in which case the url stops before the + deliminator. */ + const char * templates_neutral_delim[] = { + "This is some text with X-Y on it", + "This is some text with X--Y on it", + "This is some text with X!Y on it", + "This is some text with X[Y on it", + "This is some text with X]Y on it", + "This is some text with X{Y on it", + "This is some text with X}Y on it", + "This is some text with X(Y on it", + "This is some text with X)Y on it", + "This is some text with X\"Y on it", + "This is some text with X;Y on it", + "This is some text with X:Y on it", + "This is some text with X'Y on it", + "This is some text with X?Y on it", + "This is some text with X<Y on it", + "This is some text with X>Y on it", + "This is some text with X.Y on it", + "This is some text with X,Y on it", }; char buffer[1024]; @@ -1972,6 +2000,55 @@ "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3, buffer); } } + } + + for (j = 0; j < sizeof(templates_neutral_delim) / sizeof(const char *); j++) { + char * at_pos, * end_pos; + int at_offset; + int end_offset; + + if (!urls[i].is_url) continue; + + at_pos = strchr(templates_neutral_delim[j], 'X'); + at_offset = at_pos - templates_neutral_delim[j]; + memcpy(buffer, templates_neutral_delim[j], at_offset); + buffer[at_offset] = '\0'; + strcat(buffer, urls[i].text); + strcat(buffer, templates_neutral_delim[j] + at_offset + 1); + + end_pos = strchr(buffer, 'Y'); + end_offset = end_pos - buffer; + + SendMessageA(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)buffer); + + /* This assumes no templates start with the URL itself, and that they + have at least two characters before the URL text */ + ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), + "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); + ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), + "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); + ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), + "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); + + ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), + "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); + ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), + "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); + ok(check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), + "CFE_LINK not set in (%d-%d), text: %s\n", end_offset, end_offset +1, buffer); + + *end_pos = ' '; + + SendMessageA(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)buffer); + + ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), + "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); + ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), + "CFE_LINK set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); + ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), + "CFE_LINK set in (%d-%d), text: %s\n", end_offset, end_offset +1, buffer); } DestroyWindow(hwndRichEdit); @@ -6970,22 +7047,15 @@ GetClientRect(hwnd, &clientRect); expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); for (n = -3; n <= 3; n++) { rc = clientRect; - rc.top += n; - rc.left += n; - rc.bottom -= n; - rc.right -= n; + InflateRect(&rc, -n, -n); SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); expected = rc; @@ -6994,22 +7064,16 @@ expected.bottom = min(clientRect.bottom, rc.bottom); expected.right = min(clientRect.right, rc.right); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "[n=%d] rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - n, rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "[n=%d] rect %s != %s\n", n, wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); } rc = clientRect; SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); expected = clientRect; SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); /* Adding the selectionbar adds the selectionbar width to the left side. */ SendMessageA(hwnd, EM_SETOPTIONS, ECOOP_OR, ECO_SELECTIONBAR); @@ -7017,21 +7081,15 @@ ok(options & ECO_SELECTIONBAR, "EM_SETOPTIONS failed to add selectionbar.\n"); expected.left += 8; /* selection bar width */ SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); rc = clientRect; SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); expected = clientRect; SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); /* Removing the selectionbar subtracts the selectionbar width from the left side, * even if the left side is already 0. */ @@ -7040,22 +7098,16 @@ ok(!(options & ECO_SELECTIONBAR), "EM_SETOPTIONS failed to remove selectionbar.\n"); expected.left -= 8; /* selection bar width */ SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); /* Set the absolute value of the formatting rectangle. */ rc = clientRect; SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); expected = clientRect; SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "[n=%d] rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - n, rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "[n=%d] rect %s != %s\n", n, wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); /* MSDN documents the EM_SETRECT message as using the rectangle provided in * LPARAM as being a relative offset when the WPARAM value is 1, but these @@ -7067,11 +7119,8 @@ expected = rc; SendMessageA(hwnd, EM_SETRECT, 1, (LPARAM)&rc); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); /* For some reason it does not limit the values to the client rect with * a WPARAM value of 1. */ @@ -7082,11 +7131,8 @@ expected = rc; SendMessageA(hwnd, EM_SETRECT, 1, (LPARAM)&rc); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); /* Reset to default rect and check how the format rect adjusts to window * resize and how it copes with very small windows */ @@ -7096,40 +7142,28 @@ GetClientRect(hwnd, &clientRect); expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); MoveWindow(hwnd, 0, 0, 0, 30, FALSE); GetClientRect(hwnd, &clientRect); expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); MoveWindow(hwnd, 0, 0, 100, 0, FALSE); GetClientRect(hwnd, &clientRect); expected = clientRect; - expected.left += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); DestroyWindow(hwnd); @@ -7142,32 +7176,21 @@ GetClientRect(hwnd, &clientRect); expected = clientRect; - expected.left += 1; expected.top += 1; - expected.right -= 1; + InflateRect(&expected, -1, 0); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); rc = clientRect; - rc.top += 5; - rc.left += 5; - rc.bottom -= 5; - rc.right -= 5; + InflateRect(&rc, -5, -5); expected = rc; expected.top -= 1; - expected.left -= 1; - expected.right += 1; + InflateRect(&expected, 1, 0); SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); + ok(EqualRect(&rc, &expected), "rect %s != %s\n", wine_dbgstr_rect(&rc), + wine_dbgstr_rect(&expected)); DestroyWindow(hwnd); } @@ -8072,7 +8095,7 @@ SendMessageA( richedit, WM_CUT, 0, 0 ); SendMessageA( richedit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt ); - ok( fmt.wAlignment == def_align, "got %d exppect %d\n", fmt.wAlignment, def_align ); + ok( fmt.wAlignment == def_align, "got %d expect %d\n", fmt.wAlignment, def_align ); DestroyWindow( richedit ); } @@ -8239,7 +8262,7 @@ SendMessageW(richedit, WM_CUT, 0, 0); SendMessageW(richedit, EM_GETPARAFORMAT, 0, (LPARAM)&pf); - ok(pf.wAlignment == align_mask[i], "got %d exppect %d\n", pf.wAlignment, align_mask[i]); + ok(pf.wAlignment == align_mask[i], "got %d expect %d\n", pf.wAlignment, align_mask[i]); DestroyWindow(richedit); }
8 years, 4 months
1
0
0
0
[akhaldi] 72305: [RICHED20] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:40:37 2016 New Revision: 72305 URL:
http://svn.reactos.org/svn/reactos?rev=72305&view=rev
Log: [RICHED20] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/riched20/caret.c trunk/reactos/dll/win32/riched20/clipboard.c trunk/reactos/dll/win32/riched20/editor.c trunk/reactos/dll/win32/riched20/editor.h trunk/reactos/dll/win32/riched20/list.c trunk/reactos/dll/win32/riched20/paint.c trunk/reactos/dll/win32/riched20/para.c trunk/reactos/dll/win32/riched20/richole.c trunk/reactos/dll/win32/riched20/writer.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/riched20/caret.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/caret.c…
============================================================================== --- trunk/reactos/dll/win32/riched20/caret.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/caret.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -331,7 +331,7 @@ { /* We aren't deleting anything in this run, so we will go back to the * last run we are deleting text in. */ - ME_PrevRun(&c.pPara, &c.pRun); + ME_PrevRun(&c.pPara, &c.pRun, TRUE); c.nOffset = c.pRun->member.run.len; } run = &c.pRun->member.run; @@ -1245,7 +1245,7 @@ int x = ME_GetXForArrow(editor, pCursor); if (editor->bCaretAtEnd && !pCursor->nOffset) - if (!ME_PrevRun(&pOldPara, &pRun)) + if (!ME_PrevRun(&pOldPara, &pRun, TRUE)) return; if (nRelOfs == -1) Modified: trunk/reactos/dll/win32/riched20/clipboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/clipboa…
============================================================================== --- trunk/reactos/dll/win32/riched20/clipboard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/clipboard.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -157,7 +157,8 @@ EnumFormatImpl_Clone }; -static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, IEnumFORMATETC **lplpformatetc) +static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, + IEnumFORMATETC **formatetc) { EnumFormatImpl *ret; TRACE("\n"); @@ -169,7 +170,7 @@ ret->fmtetc_cnt = fmtetc_cnt; ret->fmtetc = GlobalAlloc(GMEM_ZEROINIT, fmtetc_cnt*sizeof(FORMATETC)); memcpy(ret->fmtetc, fmtetc, fmtetc_cnt*sizeof(FORMATETC)); - *lplpformatetc = (LPENUMFORMATETC)ret; + *formatetc = &ret->IEnumFORMATETC_iface; return S_OK; } @@ -399,8 +400,8 @@ return gds.hData; } -HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, - int nChars, LPDATAOBJECT *lplpdataobj) +HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, int nChars, + IDataObject **dataobj) { DataObjectImpl *obj; TRACE("(%p,%d,%d)\n", editor, ME_GetCursorOfs(start), nChars); @@ -424,6 +425,6 @@ InitFormatEtc(obj->fmtetc[1], cfRTF, TYMED_HGLOBAL); } - *lplpdataobj = (LPDATAOBJECT)obj; + *dataobj = &obj->IDataObject_iface; return S_OK; } Modified: trunk/reactos/dll/win32/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
============================================================================== --- trunk/reactos/dll/win32/riched20/editor.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/editor.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -1860,7 +1860,7 @@ cursor.nOffset++; if (cursor.nOffset == cursor.pRun->member.run.len) { - ME_NextRun(&cursor.pPara, &cursor.pRun); + ME_NextRun(&cursor.pPara, &cursor.pRun, TRUE); cursor.nOffset = 0; } } @@ -1886,7 +1886,7 @@ if (nCurEnd == 0) { - ME_PrevRun(&pCurPara, &pCurItem); + ME_PrevRun(&pCurPara, &pCurItem, TRUE); nCurEnd = pCurItem->member.run.len; } @@ -1935,7 +1935,7 @@ } if (nCurEnd - nMatched == 0) { - ME_PrevRun(&pCurPara, &pCurItem); + ME_PrevRun(&pCurPara, &pCurItem, TRUE); /* Don't care about pCurItem becoming NULL here; it's already taken * care of in the exterior loop condition */ nCurEnd = pCurItem->member.run.len + nMatched; @@ -1949,7 +1949,7 @@ cursor.nOffset--; if (cursor.nOffset < 0) { - ME_PrevRun(&cursor.pPara, &cursor.pRun); + ME_PrevRun(&cursor.pPara, &cursor.pRun, TRUE); cursor.nOffset = cursor.pRun->member.run.len; } } @@ -2624,6 +2624,11 @@ return clickNum; } +static BOOL is_link( ME_Run *run ) +{ + return (run->style->fmt.dwMask & CFM_LINK) && (run->style->fmt.dwEffects & CFE_LINK); +} + static BOOL ME_SetCursor(ME_TextEditor *editor) { ME_Cursor cursor; @@ -2689,8 +2694,7 @@ ME_Run *run; run = &cursor.pRun->member.run; - if (run->style->fmt.dwMask & CFM_LINK && - run->style->fmt.dwEffects & CFE_LINK) + if (is_link( run )) { ITextHost_TxSetCursor(editor->texthost, LoadCursorW(NULL, (WCHAR*)IDC_HAND), @@ -3125,8 +3129,7 @@ ME_CharFromPos(editor, x, y, &cursor, &isExact); if (!isExact) return; - if (cursor.pRun->member.run.style->fmt.dwMask & CFM_LINK && - cursor.pRun->member.run.style->fmt.dwEffects & CFE_LINK) + if (is_link( &cursor.pRun->member.run )) { /* The clicked run has CFE_LINK set */ ME_DisplayItem *di; @@ -3140,21 +3143,15 @@ /* find the first contiguous run with CFE_LINK set */ info.chrg.cpMin = ME_GetCursorOfs(&cursor); - for (di = cursor.pRun->prev; - di && di->type == diRun && (di->member.run.style->fmt.dwMask & CFM_LINK) && (di->member.run.style->fmt.dwEffects & CFE_LINK); - di = di->prev) - { - info.chrg.cpMin -= di->member.run.len; - } + di = cursor.pRun; + while (ME_PrevRun( NULL, &di, FALSE ) && is_link( &di->member.run )) + info.chrg.cpMin -= di->member.run.len; /* find the last contiguous run with CFE_LINK set */ info.chrg.cpMax = ME_GetCursorOfs(&cursor) + cursor.pRun->member.run.len; - for (di = cursor.pRun->next; - di && di->type == diRun && (di->member.run.style->fmt.dwMask & CFM_LINK) && (di->member.run.style->fmt.dwEffects & CFE_LINK); - di = di->next) - { - info.chrg.cpMax += di->member.run.len; - } + di = cursor.pRun; + while (ME_NextRun( NULL, &di, FALSE ) && is_link( &di->member.run )) + info.chrg.cpMax += di->member.run.len; ITextHost_TxNotify(editor->texthost, info.nmhdr.code, &info); } @@ -3453,14 +3450,15 @@ ME_RewrapRepaint(editor); } + if ((changedSettings & settings & ES_NOHIDESEL) && !editor->bHaveFocus) + ME_InvalidateSelection( editor ); + if (changedSettings & settings & ECO_VERTICAL) FIXME("ECO_VERTICAL not implemented yet!\n"); if (changedSettings & settings & ECO_AUTOHSCROLL) FIXME("ECO_AUTOHSCROLL not implemented yet!\n"); if (changedSettings & settings & ECO_AUTOVSCROLL) FIXME("ECO_AUTOVSCROLL not implemented yet!\n"); - if (changedSettings & settings & ECO_NOHIDESEL) - FIXME("ECO_NOHIDESEL not implemented yet!\n"); if (changedSettings & settings & ECO_WANTRETURN) FIXME("ECO_WANTRETURN not implemented yet!\n"); if (changedSettings & settings & ECO_AUTOWORDSELECTION) @@ -4257,6 +4255,8 @@ editor->bHaveFocus = TRUE; ME_ShowCaret(editor); ME_SendOldNotify(editor, EN_SETFOCUS); + if (!editor->bHideSelection && !(editor->styleFlags & ES_NOHIDESEL)) + ME_InvalidateSelection( editor ); return 0; case WM_KILLFOCUS: ME_CommitUndo(editor); /* End coalesced undos for typed characters */ @@ -4264,6 +4264,8 @@ editor->wheel_remain = 0; ME_HideCaret(editor); ME_SendOldNotify(editor, EN_KILLFOCUS); + if (!editor->bHideSelection && !(editor->styleFlags & ES_NOHIDESEL)) + ME_InvalidateSelection( editor ); return 0; case WM_COMMAND: TRACE("editor wnd command = %d\n", LOWORD(wParam)); @@ -5002,10 +5004,24 @@ return result; } -static BOOL isurlspecial(WCHAR c) -{ - static const WCHAR special_chars[] = {'.','/','%','@','*','|','\\','+','#',0}; - return strchrW( special_chars, c ) != NULL; +static int wchar_comp( const void *key, const void *elem ) +{ + return *(const WCHAR *)key - *(const WCHAR *)elem; +} + +/* neutral characters end the url if the next non-neutral character is a space character, + otherwise they are included in the url. */ +static BOOL isurlneutral( WCHAR c ) +{ + /* NB this list is sorted */ + static const WCHAR neutral_chars[] = {'!','\"','\'','(',')',',','-','.',':',';','<','>','?','[',']','{','}'}; + + /* Some shortcuts */ + if (isalnum( c )) return FALSE; + if (c > neutral_chars[sizeof(neutral_chars) / sizeof(neutral_chars[0]) - 1]) return FALSE; + + return !!bsearch( &c, neutral_chars, sizeof(neutral_chars) / sizeof(neutral_chars[0]), + sizeof(c), wchar_comp ); } /** @@ -5021,87 +5037,90 @@ ME_Cursor *candidate_min, ME_Cursor *candidate_max) { - ME_Cursor cursor = *start; - BOOL foundColon = FALSE; - BOOL candidateStarted = FALSE; - WCHAR lastAcceptedChar = '\0'; + ME_Cursor cursor = *start, neutral_end, space_end; + BOOL candidateStarted = FALSE, quoted = FALSE; + WCHAR c; while (nChars > 0) { - WCHAR *strStart = get_text( &cursor.pRun->member.run, 0 ); - WCHAR *str = strStart + cursor.nOffset; - int nLen = cursor.pRun->member.run.len - cursor.nOffset; - nChars -= nLen; - - if (~cursor.pRun->member.run.nFlags & MERF_ENDPARA) - { - /* Find start of candidate */ - if (!candidateStarted) + WCHAR *str = get_text( &cursor.pRun->member.run, 0 ); + int run_len = cursor.pRun->member.run.len; + + nChars -= run_len - cursor.nOffset; + + /* Find start of candidate */ + if (!candidateStarted) + { + while (cursor.nOffset < run_len) { - while (nLen) + c = str[cursor.nOffset]; + if (!isspaceW( c ) && !isurlneutral( c )) { - nLen--; - if (isalnumW(*str) || isurlspecial(*str)) + *candidate_min = cursor; + candidateStarted = TRUE; + neutral_end.pPara = NULL; + space_end.pPara = NULL; + cursor.nOffset++; + break; + } + quoted = (c == '<'); + cursor.nOffset++; + } + } + + /* Find end of candidate */ + if (candidateStarted) + { + while (cursor.nOffset < run_len) + { + c = str[cursor.nOffset]; + if (isspaceW( c )) + { + if (quoted && c != '\r') { - cursor.nOffset = str - strStart; - *candidate_min = cursor; - candidateStarted = TRUE; - lastAcceptedChar = *str++; - break; + if (!space_end.pPara) + { + if (neutral_end.pPara) + space_end = neutral_end; + else + space_end = cursor; + } } - str++; - } - } - - /* Find end of candidate */ - if (candidateStarted) { - while (nLen) + else + goto done; + } + else if (isurlneutral( c )) { - nLen--; - if (*str == ':' && !foundColon) { - foundColon = TRUE; - } else if (!isalnumW(*str) && !isurlspecial(*str)) { - cursor.nOffset = str - strStart; - if (lastAcceptedChar == ':') - ME_MoveCursorChars(editor, &cursor, -1); - *candidate_max = cursor; - return TRUE; + if (quoted && c == '>') + { + neutral_end.pPara = NULL; + space_end.pPara = NULL; + goto done; } - lastAcceptedChar = *str++; - } - } - } else { - /* End of paragraph: skip it if before candidate span, or terminates - current active span */ - if (candidateStarted) { - if (lastAcceptedChar == ':') - ME_MoveCursorChars(editor, &cursor, -1); - *candidate_max = cursor; - return TRUE; - } - } - - /* Reaching this point means no span was found, so get next span */ - if (!ME_NextRun(&cursor.pPara, &cursor.pRun)) { - if (candidateStarted) { - /* There are no further runs, so take end of text as end of candidate */ - cursor.nOffset = str - strStart; - if (lastAcceptedChar == ':') - ME_MoveCursorChars(editor, &cursor, -1); - *candidate_max = cursor; - return TRUE; - } - *candidate_max = *candidate_min = cursor; - return FALSE; - } + if (!neutral_end.pPara) + neutral_end = cursor; + } + else + neutral_end.pPara = NULL; + + cursor.nOffset++; + } + } + cursor.nOffset = 0; - } - - if (candidateStarted) { - /* There are no further runs, so take end of text as end of candidate */ - if (lastAcceptedChar == ':') - ME_MoveCursorChars(editor, &cursor, -1); - *candidate_max = cursor; + if (!ME_NextRun(&cursor.pPara, &cursor.pRun, TRUE)) + goto done; + } + +done: + if (candidateStarted) + { + if (space_end.pPara) + *candidate_max = space_end; + else if (neutral_end.pPara) + *candidate_max = neutral_end; + else + *candidate_max = cursor; return TRUE; } *candidate_max = *candidate_min = cursor; Modified: trunk/reactos/dll/win32/riched20/editor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
============================================================================== --- trunk/reactos/dll/win32/riched20/editor.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/editor.h [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -123,8 +123,8 @@ /* list.c */ void ME_InsertBefore(ME_DisplayItem *diWhere, ME_DisplayItem *diWhat) DECLSPEC_HIDDEN; void ME_Remove(ME_DisplayItem *diWhere) DECLSPEC_HIDDEN; -BOOL ME_NextRun(ME_DisplayItem **para, ME_DisplayItem **run) DECLSPEC_HIDDEN; -BOOL ME_PrevRun(ME_DisplayItem **para, ME_DisplayItem **run) DECLSPEC_HIDDEN; +BOOL ME_NextRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) DECLSPEC_HIDDEN; +BOOL ME_PrevRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) DECLSPEC_HIDDEN; ME_DisplayItem *ME_FindItemBack(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN; ME_DisplayItem *ME_FindItemFwd(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN; ME_DisplayItem *ME_FindItemBackOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/riched20/list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/list.c?…
============================================================================== --- trunk/reactos/dll/win32/riched20/list.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/list.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -63,16 +63,18 @@ } } -/* Modifies run pointer to point to the next run, and modify the - * paragraph pointer if moving into the next paragraph. +/* Modifies run pointer to point to the next run. + * If all_para is FALSE constrain the search to the current para, + * otherwise modify the paragraph pointer if moving into the next paragraph. * * Returns TRUE if next run is found, otherwise returns FALSE. */ -BOOL ME_NextRun(ME_DisplayItem **para, ME_DisplayItem **run) +BOOL ME_NextRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) { ME_DisplayItem *p = (*run)->next; while (p->type != diTextEnd) { if (p->type == diParagraph) { + if (!all_para) return FALSE; *para = p; } else if (p->type == diRun) { *run = p; @@ -83,16 +85,18 @@ return FALSE; } -/* Modifies run pointer to point to the previous run, and modify the - * paragraph pointer if moving into the previous paragraph. +/* Modifies run pointer to point to the previous run. + * If all_para is FALSE constrain the search to the current para, + * otherwise modify the paragraph pointer if moving into the previous paragraph. * * Returns TRUE if previous run is found, otherwise returns FALSE. */ -BOOL ME_PrevRun(ME_DisplayItem **para, ME_DisplayItem **run) +BOOL ME_PrevRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) { ME_DisplayItem *p = (*run)->prev; while (p->type != diTextStart) { if (p->type == diParagraph) { + if (!all_para) return FALSE; if (p->member.para.prev_para->type == diParagraph) *para = p->member.para.prev_para; } else if (p->type == diRun) { Modified: trunk/reactos/dll/win32/riched20/paint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/paint.c…
============================================================================== --- trunk/reactos/dll/win32/riched20/paint.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/paint.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -261,7 +261,8 @@ SetRect( &rect, x, ymin, x + run->nWidth, ymin + cy ); - if (c->editor->bHideSelection) selected = FALSE; + if (c->editor->bHideSelection || (!c->editor->bHaveFocus && + !(c->editor->styleFlags & ES_NOHIDESEL))) selected = FALSE; if (c->editor->bEmulateVersion10) { old_style_selected = selected; @@ -355,7 +356,8 @@ HGDIOBJ hOldFont; int yOffset = 0; BOOL selected = (nSelFrom < run->len && nSelTo >= 0 - && nSelFrom < nSelTo && !c->editor->bHideSelection); + && nSelFrom < nSelTo && !c->editor->bHideSelection && + (c->editor->bHaveFocus || (c->editor->styleFlags & ES_NOHIDESEL))); BOOL old_style_selected = FALSE; RECT sel_rect; HRGN clip = NULL, sel_rgn = NULL; Modified: trunk/reactos/dll/win32/riched20/para.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/para.c?…
============================================================================== --- trunk/reactos/dll/win32/riched20/para.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/para.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -364,7 +364,7 @@ endCur.pRun = ME_FindItemFwd(pNext, diRun); endCur.nOffset = 0; startCur = endCur; - ME_PrevRun(&startCur.pPara, &startCur.pRun); + ME_PrevRun(&startCur.pPara, &startCur.pRun, TRUE); ME_SetCharFormat(editor, &startCur, &endCur, &fmt); if (!editor->bEmulateVersion10) { /* v4.1 */ Modified: trunk/reactos/dll/win32/riched20/richole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/richole…
============================================================================== --- trunk/reactos/dll/win32/riched20/richole.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/richole.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -1597,7 +1597,7 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%p,%p,%u,%d,%p)\n", This, riid, rgszNames, cNames, lcid, + TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); hr = get_typeinfo(ITextRange_tid, &ti); @@ -1615,8 +1615,8 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%d,%p,%d,%u,%p,%p,%p,%p)\n", This, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + TRACE("(%p)->(%d, %s, %d, %u, %p, %p, %p, %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); hr = get_typeinfo(ITextRange_tid, &ti); if (SUCCEEDED(hr)) @@ -1970,7 +1970,7 @@ if (*end == *start) return S_FALSE; - if (bStart == tomEnd || bStart == tomFalse) + if (bStart == tomEnd) *start = *end; else *end = *start; @@ -2618,8 +2618,8 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%p,%p,%u,%d,%p)\n", This, riid, rgszNames, cNames, lcid, - rgDispId); + TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid), + rgszNames, cNames, lcid, rgDispId); hr = get_typeinfo(ITextFont_tid, &ti); if (SUCCEEDED(hr)) @@ -2642,8 +2642,8 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%d,%p,%d,%u,%p,%p,%p,%p)\n", This, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + TRACE("(%p)->(%d, %s, %d, %u, %p, %p, %p, %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); hr = get_typeinfo(ITextFont_tid, &ti); if (SUCCEEDED(hr)) @@ -3430,8 +3430,8 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%p,%p,%u,%d,%p)\n", This, riid, rgszNames, cNames, lcid, - rgDispId); + TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid), rgszNames, + cNames, lcid, rgDispId); hr = get_typeinfo(ITextPara_tid, &ti); if (SUCCEEDED(hr)) @@ -3454,8 +3454,9 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%d,%p,%d,%u,%p,%p,%p,%p)\n", This, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + TRACE("(%p)->(%d, %s, %d, %u, %p, %p, %p, %p)\n", This, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, + pExcepInfo, puArgErr); hr = get_typeinfo(ITextPara_tid, &ti); if (SUCCEEDED(hr)) @@ -4125,8 +4126,8 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%p,%p,%u,%d,%p)\n", This, riid, rgszNames, cNames, lcid, - rgDispId); + TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid), + rgszNames, cNames, lcid, rgDispId); hr = get_typeinfo(ITextDocument_tid, &ti); if (SUCCEEDED(hr)) @@ -4143,8 +4144,9 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%d,%p,%d,%u,%p,%p,%p,%p)\n", This, dispIdMember, riid, lcid, - wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + TRACE("(%p)->(%d, %s, %d, %u, %p, %p, %p, %p)\n", This, dispIdMember, + debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, + pExcepInfo, puArgErr); hr = get_typeinfo(ITextDocument_tid, &ti); if (SUCCEEDED(hr)) @@ -4445,7 +4447,7 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%p,%p,%u,%d,%p)\n", This, riid, rgszNames, cNames, lcid, + TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); hr = get_typeinfo(ITextSelection_tid, &ti); @@ -4469,7 +4471,7 @@ ITypeInfo *ti; HRESULT hr; - TRACE("(%p)->(%d,%p,%d,%u,%p,%p,%p,%p)\n", This, dispIdMember, riid, lcid, + TRACE("(%p)->(%d, %s, %d, %u, %p, %p, %p, %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); hr = get_typeinfo(ITextSelection_tid, &ti); Modified: trunk/reactos/dll/win32/riched20/writer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/writer.…
============================================================================== --- trunk/reactos/dll/win32/riched20/writer.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/riched20/writer.c [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -112,6 +112,32 @@ return ME_StreamOutMove(pStream, string, len); } +#define HEX_BYTES_PER_LINE 40 + +static BOOL +ME_StreamOutHexData(ME_OutStream *stream, const BYTE *data, UINT len) +{ + + char line[HEX_BYTES_PER_LINE * 2 + 1]; + UINT size, i; + static const char hex[] = "0123456789abcdef"; + + while (len) + { + size = min( len, HEX_BYTES_PER_LINE ); + for (i = 0; i < size; i++) + { + line[i * 2] = hex[(*data >> 4) & 0xf]; + line[i * 2 + 1] = hex[*data & 0xf]; + data++; + } + line[size * 2] = '\n'; + if (!ME_StreamOutMove( stream, line, size * 2 + 1 )) + return FALSE; + len -= size; + } + return TRUE; +} static BOOL ME_StreamOutRTFHeader(ME_OutStream *pStream, int dwFormat) @@ -780,6 +806,69 @@ return ME_StreamOutMove(pStream, buffer, pos); } +static BOOL stream_out_graphics( ME_TextEditor *editor, ME_OutStream *stream, + ME_Run *run ) +{ + IDataObject *data; + HRESULT hr; + FORMATETC fmt = { CF_ENHMETAFILE, NULL, DVASPECT_CONTENT, -1, TYMED_ENHMF }; + STGMEDIUM med = { TYMED_NULL }; + BOOL ret = FALSE; + ENHMETAHEADER *emf_bits = NULL; + UINT size; + SIZE goal, pic; + ME_Context c; + + hr = IOleObject_QueryInterface( run->ole_obj->poleobj, &IID_IDataObject, (void **)&data ); + if (FAILED(hr)) return FALSE; + + ME_InitContext( &c, editor, ITextHost_TxGetDC( editor->texthost ) ); + hr = IDataObject_QueryGetData( data, &fmt ); + if (hr != S_OK) goto done; + + hr = IDataObject_GetData( data, &fmt, &med ); + if (FAILED(hr)) goto done; + if (med.tymed != TYMED_ENHMF) goto done; + + size = GetEnhMetaFileBits( med.u.hEnhMetaFile, 0, NULL ); + if (size < FIELD_OFFSET(ENHMETAHEADER, cbPixelFormat)) goto done; + + emf_bits = HeapAlloc( GetProcessHeap(), 0, size ); + if (!emf_bits) goto done; + + size = GetEnhMetaFileBits( med.u.hEnhMetaFile, size, (BYTE *)emf_bits ); + if (size < FIELD_OFFSET(ENHMETAHEADER, cbPixelFormat)) goto done; + + /* size_in_pixels = (frame_size / 100) * szlDevice / szlMillimeters + pic = size_in_pixels * 2540 / dpi */ + pic.cx = MulDiv( emf_bits->rclFrame.right - emf_bits->rclFrame.left, emf_bits->szlDevice.cx * 254, + emf_bits->szlMillimeters.cx * c.dpi.cx * 10 ); + pic.cy = MulDiv( emf_bits->rclFrame.bottom - emf_bits->rclFrame.top, emf_bits->szlDevice.cy * 254, + emf_bits->szlMillimeters.cy * c.dpi.cy * 10 ); + + /* convert goal size to twips */ + goal.cx = MulDiv( run->ole_obj->sizel.cx, 144, 254 ); + goal.cy = MulDiv( run->ole_obj->sizel.cy, 144, 254 ); + + if (!ME_StreamOutPrint( stream, "{\\*\\shppict{\\pict\\emfblip\\picw%d\\pich%d\\picwgoal%d\\pichgoal%d\n", + pic.cx, pic.cy, goal.cx, goal.cy )) + goto done; + + if (!ME_StreamOutHexData( stream, (BYTE *)emf_bits, size )) + goto done; + + if (!ME_StreamOutPrint( stream, "}}\n" )) + goto done; + + ret = TRUE; + +done: + ME_DestroyContext( &c ); + HeapFree( GetProcessHeap(), 0, emf_bits ); + ReleaseStgMedium( &med ); + IDataObject_Release( data ); + return ret; +} static BOOL ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, const ME_Cursor *start, int nChars, int dwFormat) @@ -831,7 +920,8 @@ if (cursor.pPara->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND)) continue; if (cursor.pRun->member.run.nFlags & MERF_GRAPHICS) { - FIXME("embedded objects are not handled\n"); + if (!stream_out_graphics(editor, pStream, &cursor.pRun->member.run)) + return FALSE; } else if (cursor.pRun->member.run.nFlags & MERF_TAB) { if (editor->bEmulateVersion10 && /* v1.0 - 3.0 */ cursor.pPara->member.para.pFmt->dwMask & PFM_TABLE && @@ -886,7 +976,7 @@ if (!ME_StreamOutPrint(pStream, "}")) return FALSE; } - } while (cursor.pRun != endCur.pRun && ME_NextRun(&cursor.pPara, &cursor.pRun)); + } while (cursor.pRun != endCur.pRun && ME_NextRun(&cursor.pPara, &cursor.pRun, TRUE)); if (!ME_StreamOutMove(pStream, "}\0", 2)) return FALSE; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Aug 18 10:40:37 2016 @@ -161,7 +161,7 @@ reactos/dll/win32/query # Synced to WineStaging-1.9.11 reactos/dll/win32/rasapi32 # Synced to WineStaging-1.9.11 reactos/dll/win32/resutils # Synced to WineStaging-1.9.11 -reactos/dll/win32/riched20 # Synced to WineStaging-1.9.11 +reactos/dll/win32/riched20 # Synced to WineStaging-1.9.16 reactos/dll/win32/riched32 # Synced to WineStaging-1.9.11 reactos/dll/win32/rpcrt4 # Synced to WineStaging-1.9.11 reactos/dll/win32/rsabase # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[akhaldi] 72304: [PSTOREC] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:37:24 2016 New Revision: 72304 URL:
http://svn.reactos.org/svn/reactos?rev=72304&view=rev
Log: [PSTOREC] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/pstorec/pstorec.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/pstorec/pstorec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/pstorec/pstorec.…
============================================================================== --- trunk/reactos/dll/win32/pstorec/pstorec.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/pstorec/pstorec.c [iso-8859-1] Thu Aug 18 10:37:24 2016 @@ -298,10 +298,10 @@ */ static HRESULT WINAPI PStore_fnOpenItem( IPStore* This, PST_KEY Key, const GUID* pItemType, const GUID* pItemSubtype, LPCWSTR szItemName, - PST_ACCESSMODE ModeFlags, PPST_PROMPTINFO pProomptInfo, DWORD dwFlags ) + PST_ACCESSMODE ModeFlags, PPST_PROMPTINFO pPromptInfo, DWORD dwFlags ) { FIXME("(%p,%08x,%s,%s,%s,%08x,%p,%08x) stub\n", This, Key, debugstr_guid(pItemType), - debugstr_guid(pItemSubtype), debugstr_w(szItemName), ModeFlags, pProomptInfo, dwFlags); + debugstr_guid(pItemSubtype), debugstr_w(szItemName), ModeFlags, pPromptInfo, dwFlags); return E_NOTIMPL; } @@ -368,7 +368,7 @@ ips->IPStore_iface.lpVtbl = &pstores_vtbl; ips->ref = 1; - *ppProvider = (IPStore*) ips; + *ppProvider = &ips->IPStore_iface; return S_OK; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Aug 18 10:37:24 2016 @@ -155,7 +155,7 @@ reactos/dll/win32/powrprof # Forked at Wine-1.0rc5 reactos/dll/win32/printui # Synced to WineStaging-1.9.11 reactos/dll/win32/propsys # Synced to WineStaging-1.9.16 -reactos/dll/win32/pstorec # Synced to WineStaging-1.9.11 +reactos/dll/win32/pstorec # Synced to WineStaging-1.9.16 reactos/dll/win32/qmgr # Synced to WineStaging-1.9.11 reactos/dll/win32/qmgrprxy # Synced to WineStaging-1.9.11 reactos/dll/win32/query # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[akhaldi] 72303: [PROPSYS_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:35:58 2016 New Revision: 72303 URL:
http://svn.reactos.org/svn/reactos?rev=72303&view=rev
Log: [PROPSYS_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/propsys/propsys.c Modified: trunk/rostests/winetests/propsys/propsys.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/propsys/propsys…
============================================================================== --- trunk/rostests/winetests/propsys/propsys.c [iso-8859-1] (original) +++ trunk/rostests/winetests/propsys/propsys.c [iso-8859-1] Thu Aug 18 10:35:58 2016 @@ -46,6 +46,10 @@ DEFINE_GUID(expect_guid, 0x12345678, 0x1234, 0x1234, 0x12, 0x34, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12); #define GUID_MEMBERS(g) {(g).Data1, (g).Data2, (g).Data3, {(g).Data4[0], (g).Data4[1], (g).Data4[2], (g).Data4[3], (g).Data4[4], (g).Data4[5], (g).Data4[6], (g).Data4[7]}} + +static const char topic[] = "wine topic"; +static const WCHAR topicW[] = {'w','i','n','e',' ','t','o','p','i','c',0}; +static const WCHAR emptyW[] = {0}; static int strcmp_wa(LPCWSTR strw, const char *stra) { @@ -159,7 +163,6 @@ static void test_PSPropertyKeyFromString(void) { - static const WCHAR emptyW[] = {0}; static const WCHAR fmtid_clsidW[] = {'S','t','d','F','o','n','t',' ','1',0}; static const WCHAR fmtid_truncatedW[] = {'{','1','2','3','4','5','6','7','8','-','1','2','3','4','-', '1','2','3','4','-',0}; @@ -350,7 +353,7 @@ } testcases[] = { {NULL, NULL, E_POINTER}, - {NULL, &out, E_POINTER, {GUID_MEMBERS(dummy_guid), 0xdeadbeef}}, + {NULL, &out, E_POINTER, out_init}, {emptyW, NULL, E_POINTER}, {emptyW, &out, E_INVALIDARG, {GUID_MEMBERS(GUID_NULL), 0}}, {fmtid_clsidW, &out, E_INVALIDARG, {GUID_MEMBERS(GUID_NULL), 0}}, @@ -625,6 +628,28 @@ PropVariantClear(&propvar); } +static void test_PropVariantToStringAlloc(void) +{ + PROPVARIANT prop; + WCHAR *str; + HRESULT hres; + + prop.vt = VT_NULL; + hres = PropVariantToStringAlloc(&prop, &str); + ok(hres == S_OK, "returned %x\n", hres); + ok(!lstrcmpW(str, emptyW), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + prop.vt = VT_LPSTR; + prop.u.pszVal = CoTaskMemAlloc(strlen(topic)+1); + strcpy(prop.u.pszVal, topic); + hres = PropVariantToStringAlloc(&prop, &str); + ok(hres == S_OK, "returned %x\n", hres); + ok(!lstrcmpW(str, topicW), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + PropVariantClear(&prop); +} + static void test_PropVariantCompare(void) { PROPVARIANT empty, null, emptyarray, i2_0, i2_2, i4_large, i4_largeneg, i4_2, str_2, str_02, str_b; @@ -875,6 +900,42 @@ ok(llval == -7, "got wrong value %s\n", debugstr_longlong(llval)); } +static void test_PropVariantChangeType_LPWSTR(void) +{ + PROPVARIANT dest, src; + HRESULT hr; + + PropVariantInit(&dest); + + src.vt = VT_NULL; + hr = PropVariantChangeType(&dest, &src, 0, VT_LPWSTR); + ok(hr == S_OK, "hr=%x\n", hr); + ok(dest.vt == VT_LPWSTR, "got %d\n", dest.vt); + ok(!lstrcmpW(dest.u.pwszVal, emptyW), "got %s\n", wine_dbgstr_w(dest.u.pwszVal)); + PropVariantClear(&dest); + PropVariantClear(&src); + + src.vt = VT_LPSTR; + src.u.pszVal = CoTaskMemAlloc(strlen(topic)+1); + strcpy(src.u.pszVal, topic); + hr = PropVariantChangeType(&dest, &src, 0, VT_LPWSTR); + ok(hr == S_OK, "hr=%x\n", hr); + ok(dest.vt == VT_LPWSTR, "got %d\n", dest.vt); + ok(!lstrcmpW(dest.u.pwszVal, topicW), "got %s\n", wine_dbgstr_w(dest.u.pwszVal)); + PropVariantClear(&dest); + PropVariantClear(&src); + + src.vt = VT_LPWSTR; + src.u.pwszVal = CoTaskMemAlloc( (lstrlenW(topicW)+1) * sizeof(WCHAR)); + lstrcpyW(src.u.pwszVal, topicW); + hr = PropVariantChangeType(&dest, &src, 0, VT_LPWSTR); + ok(hr == S_OK, "hr=%x\n", hr); + ok(dest.vt == VT_LPWSTR, "got %d\n", dest.vt); + ok(!lstrcmpW(dest.u.pwszVal, topicW), "got %s\n", wine_dbgstr_w(dest.u.pwszVal)); + PropVariantClear(&dest); + PropVariantClear(&src); +} + START_TEST(propsys) { test_PSStringFromPropertyKey(); @@ -883,6 +944,8 @@ test_InitPropVariantFromGUIDAsString(); test_InitPropVariantFromBuffer(); test_PropVariantToGUID(); + test_PropVariantToStringAlloc(); test_PropVariantCompare(); test_intconversions(); -} + test_PropVariantChangeType_LPWSTR(); +}
8 years, 4 months
1
0
0
0
[akhaldi] 72302: [PROPSYS] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:35:19 2016 New Revision: 72302 URL:
http://svn.reactos.org/svn/reactos?rev=72302&view=rev
Log: [PROPSYS] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/propsys/propsys.spec trunk/reactos/dll/win32/propsys/propvar.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/propsys/propsys.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/propsys/propsys.…
============================================================================== --- trunk/reactos/dll/win32/propsys/propsys.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/propsys/propsys.spec [iso-8859-1] Thu Aug 18 10:35:19 2016 @@ -135,7 +135,7 @@ @ stub PropVariantToInt64WithDefault @ stub PropVariantToStrRet @ stub PropVariantToString -@ stub PropVariantToStringAlloc +@ stdcall PropVariantToStringAlloc(ptr ptr) @ stub PropVariantToStringVector @ stub PropVariantToStringVectorAlloc @ stub PropVariantToStringWithDefault Modified: trunk/reactos/dll/win32/propsys/propvar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/propsys/propvar.…
============================================================================== --- trunk/reactos/dll/win32/propsys/propvar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/propsys/propvar.c [iso-8859-1] Thu Aug 18 10:35:19 2016 @@ -198,6 +198,43 @@ return hr; } +HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret) +{ + WCHAR *res = NULL; + HRESULT hr = S_OK; + + TRACE("%p,%p semi-stub\n", propvarIn, ret); + + switch(propvarIn->vt) + { + case VT_NULL: + res = CoTaskMemAlloc(1*sizeof(WCHAR)); + res[0] = '\0'; + break; + case VT_LPSTR: + if(propvarIn->u.pszVal) + { + DWORD len; + + len = MultiByteToWideChar(CP_ACP, 0, propvarIn->u.pszVal, -1, NULL, 0); + res = CoTaskMemAlloc(len*sizeof(WCHAR)); + if(!res) + return E_OUTOFMEMORY; + + MultiByteToWideChar(CP_ACP, 0, propvarIn->u.pszVal, -1, res, len); + } + break; + default: + FIXME("Unsupported conversion (%d)\n", propvarIn->vt); + hr = E_FAIL; + break; + } + + *ret = res; + + return hr; +} + /****************************************************************** * PropVariantChangeType (PROPSYS.@) */ @@ -209,6 +246,9 @@ FIXME("(%p, %p, %d, %d, %d): semi-stub!\n", ppropvarDest, propvarSrc, propvarSrc->vt, flags, vt); + if(vt == propvarSrc->vt) + return PropVariantCopy(ppropvarDest, propvarSrc); + switch (vt) { case VT_I2: @@ -274,6 +314,17 @@ { ppropvarDest->vt = VT_UI8; ppropvarDest->u.uhVal.QuadPart = res; + } + return hr; + } + case VT_LPWSTR: + { + WCHAR *res; + hr = PropVariantToStringAlloc(propvarSrc, &res); + if (SUCCEEDED(hr)) + { + ppropvarDest->vt = VT_LPWSTR; + ppropvarDest->u.pwszVal = res; } return hr; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Aug 18 10:35:19 2016 @@ -154,7 +154,7 @@ reactos/dll/win32/pidgen # Synced to WineStaging-1.9.11 reactos/dll/win32/powrprof # Forked at Wine-1.0rc5 reactos/dll/win32/printui # Synced to WineStaging-1.9.11 -reactos/dll/win32/propsys # Synced to WineStaging-1.9.11 +reactos/dll/win32/propsys # Synced to WineStaging-1.9.16 reactos/dll/win32/pstorec # Synced to WineStaging-1.9.11 reactos/dll/win32/qmgr # Synced to WineStaging-1.9.11 reactos/dll/win32/qmgrprxy # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[dchapyshev] 72301: [INPUT] - Use _wcsdup instead internal DuplicateString - Check of the returned value of the wcsstr function is added
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Aug 18 10:31:42 2016 New Revision: 72301 URL:
http://svn.reactos.org/svn/reactos?rev=72301&view=rev
Log: [INPUT] - Use _wcsdup instead internal DuplicateString - Check of the returned value of the wcsstr function is added Modified: trunk/reactos/dll/cpl/input/input.h trunk/reactos/dll/cpl/input/input_list.c trunk/reactos/dll/cpl/input/layout_list.c trunk/reactos/dll/cpl/input/locale_list.c Modified: trunk/reactos/dll/cpl/input/input.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/input.h?rev=…
============================================================================== --- trunk/reactos/dll/cpl/input/input.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/input.h [iso-8859-1] Thu Aug 18 10:31:42 2016 @@ -75,23 +75,6 @@ ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -static inline WCHAR* -DuplicateString(const WCHAR *pszString) -{ - WCHAR *pszDuplicate; - size_t size; - - size = (wcslen(pszString) + 1) * sizeof(WCHAR); - - pszDuplicate = (WCHAR*) malloc(size); - if (pszDuplicate != NULL) - { - StringCbCopyW(pszDuplicate, size, pszString); - } - - return pszDuplicate; -} - static inline DWORD DWORDfromString(const WCHAR *pszString) { Modified: trunk/reactos/dll/cpl/input/input_list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/input_list.c…
============================================================================== --- trunk/reactos/dll/cpl/input/input_list.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/input_list.c [iso-8859-1] Thu Aug 18 10:31:42 2016 @@ -318,7 +318,7 @@ if (len > 0) { szIndicator[len - 1] = 0; - pInput->pszIndicator = DuplicateString(szIndicator); + pInput->pszIndicator = _wcsdup(szIndicator); } } @@ -447,7 +447,7 @@ if (len > 0) { szIndicator[len - 1] = 0; - pInput->pszIndicator = DuplicateString(szIndicator); + pInput->pszIndicator = _wcsdup(szIndicator); } } } Modified: trunk/reactos/dll/cpl/input/layout_list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/layout_list.…
============================================================================== --- trunk/reactos/dll/cpl/input/layout_list.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/layout_list.c [iso-8859-1] Thu Aug 18 10:31:42 2016 @@ -28,7 +28,7 @@ ZeroMemory(pNew, sizeof(LAYOUT_LIST_NODE)); - pNew->pszName = DuplicateString(pszName); + pNew->pszName = _wcsdup(pszName); if (pNew->pszName == NULL) { free(pNew); @@ -153,10 +153,8 @@ (LPBYTE)szBuffer, &dwSize) == ERROR_SUCCESS && szBuffer[0] == L'@') { - WCHAR szPath[MAX_PATH]; WCHAR *pBuffer; WCHAR *pIndex; - INT iIndex; /* Move to the position after the character "@" */ pBuffer = szBuffer + 1; @@ -164,27 +162,37 @@ /* Get a pointer to the beginning ",-" */ pIndex = wcsstr(pBuffer, L",-"); - /* Convert the number in the string after the ",-" */ - iIndex = _wtoi(pIndex + 2); - - pIndex[0] = 0; - - if (ExpandEnvironmentStringsW(pBuffer, szPath, ARRAYSIZE(szPath)) != 0) + if (pIndex != NULL) { - HANDLE hHandle; - - hHandle = LoadLibraryW(szPath); - if (hHandle != NULL) + WCHAR szPath[MAX_PATH]; + INT iIndex; + + /* Convert the number in the string after the ",-" */ + iIndex = _wtoi(pIndex + 2); + + pIndex[0] = 0; + + if (ExpandEnvironmentStringsW(pBuffer, szPath, ARRAYSIZE(szPath)) != 0) { - INT iLength = LoadStringW(hHandle, iIndex, szBuffer, ARRAYSIZE(szBuffer)); - - FreeLibrary(hHandle); - - if (iLength != 0) + HANDLE hHandle; + + hHandle = LoadLibraryW(szPath); + if (hHandle != NULL) { - DWORD dwLayoutId = DWORDfromString(szLayoutId); - - LayoutList_AppendNode(dwLayoutId, dwSpecialId, szBuffer); + INT iLength = LoadStringW(hHandle, iIndex, szBuffer, ARRAYSIZE(szBuffer)); + + FreeLibrary(hHandle); + + if (iLength != 0) + { + DWORD dwLayoutId = DWORDfromString(szLayoutId); + + LayoutList_AppendNode(dwLayoutId, dwSpecialId, szBuffer); + } + else + { + goto NotTranslated; + } } else { Modified: trunk/reactos/dll/cpl/input/locale_list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/locale_list.…
============================================================================== --- trunk/reactos/dll/cpl/input/locale_list.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/locale_list.c [iso-8859-1] Thu Aug 18 10:31:42 2016 @@ -28,7 +28,7 @@ ZeroMemory(pNew, sizeof(LOCALE_LIST_NODE)); - pNew->pszName = DuplicateString(pszName); + pNew->pszName = _wcsdup(pszName); if (pNew->pszName == NULL) { free(pNew);
8 years, 4 months
1
0
0
0
[akhaldi] 72300: [PSDK] Update propvarutil.h. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:31:31 2016 New Revision: 72300 URL:
http://svn.reactos.org/svn/reactos?rev=72300&view=rev
Log: [PSDK] Update propvarutil.h. CORE-11866 Modified: trunk/reactos/sdk/include/psdk/propvarutil.h Modified: trunk/reactos/sdk/include/psdk/propvarutil.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/propvarut…
============================================================================== --- trunk/reactos/sdk/include/psdk/propvarutil.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/propvarutil.h [iso-8859-1] Thu Aug 18 10:31:31 2016 @@ -77,6 +77,8 @@ HRESULT WINAPI PropVariantToUInt32(REFPROPVARIANT propvarIn, ULONG *ret); HRESULT WINAPI PropVariantToUInt64(REFPROPVARIANT propvarIn, ULONGLONG *ret); +HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret); + #ifdef __cplusplus HRESULT InitPropVariantFromBoolean(BOOL fVal, PROPVARIANT *ppropvar);
8 years, 4 months
1
0
0
0
[akhaldi] 72299: [OLEAUT32_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Aug 18 10:30:35 2016 New Revision: 72299 URL:
http://svn.reactos.org/svn/reactos?rev=72299&view=rev
Log: [OLEAUT32_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/oleaut32/safearray.c trunk/rostests/winetests/oleaut32/test_tlb.idl trunk/rostests/winetests/oleaut32/typelib.c trunk/rostests/winetests/oleaut32/vartype.c Modified: trunk/rostests/winetests/oleaut32/safearray.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/safear…
============================================================================== --- trunk/rostests/winetests/oleaut32/safearray.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/safearray.c [iso-8859-1] Thu Aug 18 10:30:35 2016 @@ -710,7 +710,9 @@ } if (!pSafeArrayAllocDescriptorEx) + { return; + } for (i=0;i<sizeof(vttypes)/sizeof(vttypes[0]);i++) { a = NULL; Modified: trunk/rostests/winetests/oleaut32/test_tlb.idl URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/test_t…
============================================================================== --- trunk/rostests/winetests/oleaut32/test_tlb.idl [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/test_tlb.idl [iso-8859-1] Thu Aug 18 10:30:35 2016 @@ -23,6 +23,8 @@ #pragma makedep typelib import "oaidl.idl"; /* needed by widl */ + +midl_pragma warning ( disable : 2368 ) [uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784)] library Test Modified: trunk/rostests/winetests/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/typeli…
============================================================================== --- trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/typelib.c [iso-8859-1] Thu Aug 18 10:30:35 2016 @@ -2902,11 +2902,7 @@ ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(typeattr->cbSizeVft == 16 * sizeof(void*), "cbSizeVft = %d\n", typeattr->cbSizeVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(typeattr->cbSizeVft == 16 * sizeof(void*), "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == alignment, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags); @@ -2980,11 +2976,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 4 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 4 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3009,11 +3001,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 5 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 5 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3038,11 +3026,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 6 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 6 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3102,11 +3086,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 7 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 7 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3153,11 +3133,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 8 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 8 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3195,11 +3171,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 9 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 9 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VARIANT, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3237,11 +3209,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 10 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 10 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3282,11 +3250,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 11 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 11 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3322,11 +3286,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 12 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 12 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_BSTR, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3358,11 +3318,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 13 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 13 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3396,11 +3352,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 14 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 14 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3432,11 +3384,7 @@ ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(pfuncdesc->oVft == 15 * sizeof(void*), "got %d\n", pfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(pfuncdesc->oVft == 15 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); @@ -3664,11 +3612,7 @@ ok(bindptr.lpfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", bindptr.lpfuncdesc->callconv); ok(bindptr.lpfuncdesc->cParams == 8, "got %d\n", bindptr.lpfuncdesc->cParams); ok(bindptr.lpfuncdesc->cParamsOpt == 0, "got %d\n", bindptr.lpfuncdesc->cParamsOpt); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(bindptr.lpfuncdesc->oVft == 6 * sizeof(void*), "got %x\n", bindptr.lpfuncdesc->oVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(bindptr.lpfuncdesc->oVft == 6 * sizeof(void*), "got %x\n", bindptr.lpfuncdesc->oVft); ok(bindptr.lpfuncdesc->cScodes == 0, "got %d\n", bindptr.lpfuncdesc->cScodes); ok(bindptr.lpfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", bindptr.lpfuncdesc->elemdescFunc.tdesc.vt); @@ -3692,11 +3636,7 @@ ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); -#ifdef _WIN64 - if(sys == SYS_WIN32) - todo_wine ok(typeattr->cbSizeVft == 8 * sizeof(void*), "cbSizeVft = %d\n", typeattr->cbSizeVft); - else -#endif + todo_wine_if(is_win64 && sys == SYS_WIN32) ok(typeattr->cbSizeVft == 8 * sizeof(void*), "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == alignment, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE | TYPEFLAG_FDUAL), "wTypeFlags = 0x%x\n", typeattr->wTypeFlags); Modified: trunk/rostests/winetests/oleaut32/vartype.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/vartyp…
============================================================================== --- trunk/rostests/winetests/oleaut32/vartype.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/vartype.c [iso-8859-1] Thu Aug 18 10:30:35 2016 @@ -5894,6 +5894,16 @@ lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); + /* NULL IUnknown -> IDispatch */ + V_VT(&vSrc) = VT_UNKNOWN; + V_UNKNOWN(&vSrc) = NULL; + VariantInit(&vDst); + V_DISPATCH(&vDst) = (void*)0xdeadbeef; + hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_DISPATCH); + ok(hres == S_OK && V_VT(&vDst) == VT_DISPATCH && V_DISPATCH(&vDst) == NULL, + "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + S_OK, VT_DISPATCH, NULL, hres, V_VT(&vDst), V_DISPATCH(&vDst)); + V_VT(&vSrc) = VT_UNKNOWN; V_UNKNOWN(&vSrc) = pu; @@ -6037,6 +6047,16 @@ pd = &d.IDispatch_iface; lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); + + /* NULL IDispatch -> IUnknown */ + V_VT(&vSrc) = VT_DISPATCH; + V_DISPATCH(&vSrc) = NULL; + VariantInit(&vDst); + V_UNKNOWN(&vDst) = (void*)0xdeadbeef; + hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN); + ok(hres == S_OK && V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == NULL, + "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + S_OK, VT_UNKNOWN, NULL, hres, V_VT(&vDst), V_UNKNOWN(&vDst)); V_VT(&vSrc) = VT_DISPATCH; V_DISPATCH(&vSrc) = pd;
8 years, 4 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
47
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
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200