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
May 2018
----- 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
23 participants
218 discussions
Start a n
N
ew thread
01/01: [WINETESTS] Fix build
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d65c0d5adad696fa1ab23…
commit d65c0d5adad696fa1ab23c4e0e8a56764e6b80b3 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun May 27 09:51:38 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun May 27 09:51:38 2018 +0200 [WINETESTS] Fix build CORE-14656 --- modules/rostests/winetests/user32/cursoricon.c | 2 ++ modules/rostests/winetests/xmllite/reader.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/rostests/winetests/user32/cursoricon.c b/modules/rostests/winetests/user32/cursoricon.c index 5099c08d70..e42875f925 100644 --- a/modules/rostests/winetests/user32/cursoricon.c +++ b/modules/rostests/winetests/user32/cursoricon.c @@ -1053,7 +1053,9 @@ static const DWORD biSize_tests[] = { 0xffffffff }; +#ifndef __REACTOS__ #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) +#endif static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm) { diff --git a/modules/rostests/winetests/xmllite/reader.c b/modules/rostests/winetests/xmllite/reader.c index 975724ab18..e8e504a0f5 100644 --- a/modules/rostests/winetests/xmllite/reader.c +++ b/modules/rostests/winetests/xmllite/reader.c @@ -32,7 +32,9 @@ #include "wine/test.h" #include "wine/heap.h" +#ifndef __REACTOS__ #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0])) +#endif DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
6 years, 7 months
1
0
0
0
01/01: [HNETCFG_WINETEST] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02c546ced9d74c31d8c3b…
commit 02c546ced9d74c31d8c3b4c7d0eeefb96e4ac05e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:13:26 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:13:26 2018 +0100 [HNETCFG_WINETEST] Sync with Wine Staging 3.9. CORE-14656 --- modules/rostests/winetests/hnetcfg/CMakeLists.txt | 2 +- modules/rostests/winetests/hnetcfg/policy.c | 49 ++++++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/hnetcfg/CMakeLists.txt b/modules/rostests/winetests/hnetcfg/CMakeLists.txt index 396c20e2b8..195bcbf981 100644 --- a/modules/rostests/winetests/hnetcfg/CMakeLists.txt +++ b/modules/rostests/winetests/hnetcfg/CMakeLists.txt @@ -3,5 +3,5 @@ add_definitions(-DUSE_WINE_TODOS) add_executable(hnetcfg_winetest policy.c testlist.c) target_link_libraries(hnetcfg_winetest uuid) set_module_type(hnetcfg_winetest win32cui) -add_importlibs(hnetcfg_winetest ole32 msvcrt kernel32) +add_importlibs(hnetcfg_winetest ole32 oleaut32 msvcrt kernel32) add_rostests_file(TARGET hnetcfg_winetest) diff --git a/modules/rostests/winetests/hnetcfg/policy.c b/modules/rostests/winetests/hnetcfg/policy.c index 7b5bef008c..4ee19d8db4 100644 --- a/modules/rostests/winetests/hnetcfg/policy.c +++ b/modules/rostests/winetests/hnetcfg/policy.c @@ -102,6 +102,53 @@ static void test_interfaces(void) INetFwMgr_Release(manager); } +static void test_NetFwAuthorizedApplication(void) +{ + INetFwAuthorizedApplication *app; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_INetFwAuthorizedApplication, (void**)&app); + ok(hr == S_OK, "got: %08x\n", hr); + if(hr == S_OK) + { + BSTR image = SysAllocStringLen( NULL, MAX_PATH ); + static WCHAR empty[] = {0}; + BSTR bstr; + + if (!GetModuleFileNameW( NULL, image, MAX_PATH )) + { + ok(0, "Failed to get filename\n"); + SysFreeString( image ); + return; + } + + hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, NULL); + ok(hr == E_POINTER, "got: %08x\n", hr); + + hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr); + ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY), "got: %08x\n", hr); + ok(!bstr, "got: %s\n", wine_dbgstr_w(bstr)); + + hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, NULL); + ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got: %08x\n", hr); + + hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, empty); + ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got: %08x\n", hr); + + hr = INetFwAuthorizedApplication_put_ProcessImageFileName(app, image); + ok(hr == S_OK, "got: %08x\n", hr); + + hr = INetFwAuthorizedApplication_get_ProcessImageFileName(app, &bstr); + ok(hr == S_OK, "got: %08x\n", hr); + ok(!lstrcmpiW(bstr,image), "got: %s\n", wine_dbgstr_w(bstr)); + SysFreeString( bstr ); + + SysFreeString( image ); + INetFwAuthorizedApplication_Release(app); + } +} + START_TEST(policy) { INetFwMgr *manager; @@ -121,7 +168,7 @@ START_TEST(policy) INetFwMgr_Release(manager); test_interfaces(); - + test_NetFwAuthorizedApplication(); CoUninitialize(); }
6 years, 7 months
1
0
0
0
01/01: [HNETCFG] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1d62a5beb50daccfe47c8…
commit 1d62a5beb50daccfe47c8105ef47cc9278ad1f42 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:12:51 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:12:51 2018 +0100 [HNETCFG] Sync with Wine Staging 3.9. CORE-14656 --- dll/win32/hnetcfg/apps.c | 20 ++++++-------------- media/doc/README.WINE | 2 +- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/dll/win32/hnetcfg/apps.c b/dll/win32/hnetcfg/apps.c index e63da7f56e..fda714e3bb 100644 --- a/dll/win32/hnetcfg/apps.c +++ b/dll/win32/hnetcfg/apps.c @@ -61,7 +61,7 @@ static ULONG WINAPI fw_app_Release( if (!refs) { TRACE("destroying %p\n", fw_app); - if (fw_app->filename) SysFreeString( fw_app->filename ); + SysFreeString( fw_app->filename ); HeapFree( GetProcessHeap(), 0, fw_app ); } return refs; @@ -256,16 +256,10 @@ static HRESULT WINAPI fw_app_get_ProcessImageFileName( FIXME("%p, %p\n", This, imageFileName); if (!imageFileName) - return E_INVALIDARG; - - if (!This->filename) - { - *imageFileName = NULL; - return S_OK; - } + return E_POINTER; *imageFileName = SysAllocString( This->filename ); - return *imageFileName ? S_OK : E_OUTOFMEMORY; + return *imageFileName || !This->filename ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI fw_app_put_ProcessImageFileName( @@ -276,12 +270,10 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName( FIXME("%p, %s\n", This, debugstr_w(imageFileName)); - if (!imageFileName) - { - This->filename = NULL; - return S_OK; - } + if (!imageFileName || !imageFileName[0]) + return E_INVALIDARG; + SysFreeString( This->filename ); This->filename = SysAllocString( imageFileName ); return This->filename ? S_OK : E_OUTOFMEMORY; } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e17deddf22..632e0ed069 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -71,7 +71,7 @@ reactos/dll/win32/fusion # Synced to WineStaging-3.3 reactos/dll/win32/gdiplus # Synced to WineStaging-3.9 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 reactos/dll/win32/hlink # Synced to WineStaging-3.3 -reactos/dll/win32/hnetcfg # Synced to WineStaging-3.3 +reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 reactos/dll/win32/iccvid # Synced to WineStaging-3.3 reactos/dll/win32/ieframe # Synced to WineStaging-3.3
6 years, 7 months
1
0
0
0
01/01: [HLINK_WINETEST] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f653a5538bfe2897a7e7…
commit 4f653a5538bfe2897a7e7521780a92606f143ea2 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:12:13 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:12:13 2018 +0100 [HLINK_WINETEST] Sync with Wine Staging 3.9. CORE-14656 --- modules/rostests/winetests/hlink/hlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/hlink/hlink.c b/modules/rostests/winetests/hlink/hlink.c index 3525c4478c..265dea3f45 100644 --- a/modules/rostests/winetests/hlink/hlink.c +++ b/modules/rostests/winetests/hlink/hlink.c @@ -417,7 +417,8 @@ static void test_persist_save_data(const char *testname, IHlink *lnk, (expected_data_alt == expected_hlink_data3_ie7 && i == 109) /* Win10 */ || (expected_data_alt == expected_hlink_data5_ie7 && i == 107) /* Win10 */) { - ok(data[i] == 0 || broken(data[i] == 1), "Expected 0 or 1, got %d\n", data[i]); + ok(data[i] == 0 || broken(data[i] == 1) || broken(data[i] == 3), + "Expected 0 or 1, got %d\n", data[i]); continue; } if ((expected_data_alt[i] != data[i]) &&
6 years, 7 months
1
0
0
0
01/01: [GDIPLUS_WINETEST] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ea2a3922c947f74321693…
commit ea2a3922c947f7432169372f6c83bb1a42ee90f7 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:11:35 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:11:35 2018 +0100 [GDIPLUS_WINETEST] Sync with Wine Staging 3.9. CORE-14656 --- modules/rostests/winetests/gdiplus/customlinecap.c | 76 ++++++++++++++++-- modules/rostests/winetests/gdiplus/graphics.c | 92 ++++++++++++++++++++++ modules/rostests/winetests/gdiplus/pen.c | 32 ++++++++ modules/rostests/winetests/gdiplus/region.c | 38 +++++++++ 4 files changed, 230 insertions(+), 8 deletions(-) diff --git a/modules/rostests/winetests/gdiplus/customlinecap.c b/modules/rostests/winetests/gdiplus/customlinecap.c index bac80adbdb..e4ec329b93 100644 --- a/modules/rostests/winetests/gdiplus/customlinecap.c +++ b/modules/rostests/winetests/gdiplus/customlinecap.c @@ -17,6 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <limits.h> #include "objbase.h" #include "gdiplus.h" @@ -25,6 +26,22 @@ #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got) +static BOOL compare_float(float f, float g, unsigned int ulps) +{ + int x = *(int *)&f; + int y = *(int *)&g; + + if (x < 0) + x = INT_MIN - x; + if (y < 0) + y = INT_MIN - y; + + if (abs(x - y) > ulps) + return FALSE; + + return TRUE; +} + static void test_constructor_destructor(void) { GpCustomLineCap *custom; @@ -219,21 +236,40 @@ static void test_scale(void) static void test_create_adjustable_cap(void) { + REAL inset, scale, height, width; GpAdjustableArrowCap *cap; - REAL inset, scale; GpLineJoin join; GpStatus stat; GpLineCap base; + BOOL ret; stat = GdipCreateAdjustableArrowCap(10.0, 10.0, TRUE, NULL); -todo_wine ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat); stat = GdipCreateAdjustableArrowCap(17.0, 15.0, TRUE, &cap); -todo_wine ok(stat == Ok, "Failed to create adjustable cap, %d\n", stat); - if (stat != Ok) - return; + + stat = GdipGetAdjustableArrowCapFillState(cap, NULL); + ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat); + + ret = FALSE; + stat = GdipGetAdjustableArrowCapFillState(cap, &ret); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + ok(ret, "Unexpected fill state %d\n", ret); + + stat = GdipGetAdjustableArrowCapHeight(cap, NULL); + ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat); + + stat = GdipGetAdjustableArrowCapHeight(cap, &height); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + ok(height == 17.0, "Unexpected cap height %f\n", height); + + stat = GdipGetAdjustableArrowCapWidth(cap, NULL); + ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat); + + stat = GdipGetAdjustableArrowCapWidth(cap, &width); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + ok(width == 15.0, "Unexpected cap width %f\n", width); stat = GdipGetAdjustableArrowCapMiddleInset(cap, NULL); ok(stat == InvalidParameter, "Unexpected return code, %d\n", stat); @@ -247,14 +283,41 @@ todo_wine ok(base == LineCapTriangle, "Unexpected base cap %d\n", base); stat = GdipSetCustomLineCapBaseCap((GpCustomLineCap*)cap, LineCapSquare); +todo_wine ok(stat == Ok, "Unexpected return code, %d\n", stat); stat = GdipGetCustomLineCapBaseCap((GpCustomLineCap*)cap, &base); ok(stat == Ok, "Unexpected return code, %d\n", stat); +todo_wine ok(base == LineCapSquare, "Unexpected base cap %d\n", base); + /* Base inset */ + stat = GdipGetAdjustableArrowCapWidth(cap, &width); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + + stat = GdipGetAdjustableArrowCapHeight(cap, &height); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + + inset = 0.0; + stat = GdipGetCustomLineCapBaseInset((GpCustomLineCap*)cap, &inset); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + ok(compare_float(inset, height / width, 1), "Unexpected inset %f\n", inset); + + stat = GdipSetAdjustableArrowCapMiddleInset(cap, 1.0); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + + inset = 0.0; stat = GdipGetCustomLineCapBaseInset((GpCustomLineCap*)cap, &inset); ok(stat == Ok, "Unexpected return code, %d\n", stat); + ok(compare_float(inset, height / width, 1), "Unexpected inset %f\n", inset); + + stat = GdipSetAdjustableArrowCapHeight(cap, 2.0 * height); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + + inset = 0.0; + stat = GdipGetCustomLineCapBaseInset((GpCustomLineCap*)cap, &inset); + ok(stat == Ok, "Unexpected return code, %d\n", stat); + ok(compare_float(inset, 2.0 * height / width, 1), "Unexpected inset %f\n", inset); stat = GdipGetCustomLineCapWidthScale((GpCustomLineCap*)cap, &scale); ok(stat == Ok, "Unexpected return code, %d\n", stat); @@ -299,10 +362,7 @@ static void test_captype(void) /* arrow cap */ stat = GdipCreateAdjustableArrowCap(17.0, 15.0, TRUE, &arrowcap); -todo_wine ok(stat == Ok, "Failed to create adjustable cap, %d\n", stat); - if (stat != Ok) - return; stat = GdipGetCustomLineCapType((GpCustomLineCap*)arrowcap, &type); ok(stat == Ok, "Failed to get cap type, %d\n", stat); diff --git a/modules/rostests/winetests/gdiplus/graphics.c b/modules/rostests/winetests/gdiplus/graphics.c index 96df1a2743..6acc656c8f 100644 --- a/modules/rostests/winetests/gdiplus/graphics.c +++ b/modules/rostests/winetests/gdiplus/graphics.c @@ -2060,6 +2060,97 @@ static void test_get_set_clip(void) ReleaseDC(hwnd, hdc); } +static void test_clip_xform(void) +{ + GpStatus status; + GpGraphics *graphics = NULL; + HDC hdc = GetDC( hwnd ); + GpRegion *clip; + COLORREF color; + UINT region_data_size; + struct { + DWORD size; + DWORD checksum; + DWORD magic; + DWORD num_children; + DWORD element_type; + REAL x; + REAL y; + REAL width; + REAL height; + } region_data; + + status = GdipCreateFromHDC(hdc, &graphics); + expect(Ok, status); + status = GdipCreateRegion(&clip); + expect(Ok, status); + + status = GdipGraphicsClear(graphics, 0xff000000); + expect(Ok, status); + + status = GdipSetClipRect(graphics, 10, 10, -10, -10, CombineModeReplace); + expect(Ok, status); + status = GdipGetClip(graphics, clip); + expect(Ok, status); + status = GdipGetRegionData(clip, (BYTE*)®ion_data, sizeof(region_data), ®ion_data_size); + expect(Ok, status); + expect(36, region_data_size); + expect(28, region_data.size); + expect(0, region_data.num_children); + expect(0x10000000 /* RegionDataRect */, region_data.element_type); + expectf(0.0, region_data.x); + expectf(0.0, region_data.y); + expectf(10.0, region_data.width); + expectf(10.0, region_data.height); + + /* No effect with negative width/height */ + status = GdipGraphicsClear(graphics, 0xffff0000); + expect(Ok, status); + color = GetPixel(hdc, 5, 5); + expect(0, color); + + status = GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderAppend); + expect(Ok, status); + + status = GdipGraphicsClear(graphics, 0xffff0000); + expect(Ok, status); + color = GetPixel(hdc, 5, 5); + expect(0, color); + + status = GdipResetClip(graphics); + expect(Ok, status); + status = GdipResetWorldTransform(graphics); + expect(Ok, status); + status = GdipGraphicsClear(graphics, 0xff000000); + expect(Ok, status); + + status = GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderAppend); + expect(Ok, status); + + status = GdipSetClipRect(graphics, 5, 5, -5, -5, CombineModeReplace); + expect(Ok, status); + status = GdipGetClip(graphics, clip); + expect(Ok, status); + status = GdipGetRegionData(clip, (BYTE*)®ion_data, sizeof(region_data), ®ion_data_size); + expect(Ok, status); + expect(36, region_data_size); + expect(28, region_data.size); + expect(0, region_data.num_children); + expect(0x10000000 /* RegionDataRect */, region_data.element_type); + expectf(0.0, region_data.x); + expectf(0.0, region_data.y); + expectf(5.0, region_data.width); + expectf(5.0, region_data.height); + + status = GdipGraphicsClear(graphics, 0xffff0000); + expect(Ok, status); + color = GetPixel(hdc, 5, 5); + expect(0xff, color); + + GdipDeleteGraphics(graphics); + ReleaseDC(hwnd, hdc); +} + static void test_isempty(void) { GpStatus status; @@ -6713,6 +6804,7 @@ START_TEST(graphics) test_BeginContainer2(); test_transformpoints(); test_get_set_clip(); + test_clip_xform(); test_isempty(); test_clear(); test_textcontrast(); diff --git a/modules/rostests/winetests/gdiplus/pen.c b/modules/rostests/winetests/gdiplus/pen.c index ded6e642eb..be3d76d655 100644 --- a/modules/rostests/winetests/gdiplus/pen.c +++ b/modules/rostests/winetests/gdiplus/pen.c @@ -431,6 +431,38 @@ static void test_transform(void) expectf(6.0, values[4]); expectf(3.0, values[5]); + /* Translate */ + status = GdipTranslatePenTransform(NULL, 1.0, -2.0, MatrixOrderAppend); + expect(InvalidParameter, status); + + status = GdipTranslatePenTransform(pen, 1.0, -2.0, MatrixOrderAppend); + expect(Ok, status); + + status = GdipGetPenTransform(pen, matrix); + expect(Ok, status); + status = GdipGetMatrixElements(matrix, values); + expect(Ok, status); + expectf(3.0, values[0]); + expectf(-2.0, values[1]); + expectf(5.0, values[2]); + expectf(2.0, values[3]); + expectf(7.0, values[4]); + expectf(1.0, values[5]); + + status = GdipTranslatePenTransform(pen, -3.0, 5.0, MatrixOrderPrepend); + expect(Ok, status); + + status = GdipGetPenTransform(pen, matrix); + expect(Ok, status); + status = GdipGetMatrixElements(matrix, values); + expect(Ok, status); + expectf(3.0, values[0]); + expectf(-2.0, values[1]); + expectf(5.0, values[2]); + expectf(2.0, values[3]); + expectf(23.0, values[4]); + expectf(17.0, values[5]); + status = GdipResetPenTransform(pen); expect(Ok, status); diff --git a/modules/rostests/winetests/gdiplus/region.c b/modules/rostests/winetests/gdiplus/region.c index 86a2e40fa2..c2cbff01f6 100644 --- a/modules/rostests/winetests/gdiplus/region.c +++ b/modules/rostests/winetests/gdiplus/region.c @@ -1441,6 +1441,22 @@ static void test_translate(void) ReleaseDC(0, hdc); } +static DWORD get_region_type(GpRegion *region) +{ + DWORD *data; + DWORD size; + DWORD result; + DWORD status; + status = GdipGetRegionDataSize(region, &size); + expect(Ok, status); + data = GdipAlloc(size); + status = GdipGetRegionData(region, (BYTE*)data, size, NULL); + ok(status == Ok || status == InsufficientBuffer, "unexpected status 0x%x\n", status); + result = data[4]; + GdipFree(data); + return result; +} + static void test_transform(void) { GpRegion *region, *region2; @@ -1451,6 +1467,7 @@ static void test_transform(void) GpStatus status; HDC hdc = GetDC(0); BOOL res; + DWORD type; status = GdipCreateFromHDC(hdc, &graphics); expect(Ok, status); @@ -1483,6 +1500,8 @@ static void test_transform(void) status = GdipIsEqualRegion(region, region2, graphics, &res); expect(Ok, status); ok(res, "Expected to be equal.\n"); + type = get_region_type(region); + expect(0x10000003 /* RegionDataInfiniteRect */, type); /* empty */ status = GdipSetEmpty(region); @@ -1497,6 +1516,8 @@ static void test_transform(void) status = GdipIsEqualRegion(region, region2, graphics, &res); expect(Ok, status); ok(res, "Expected to be equal.\n"); + type = get_region_type(region); + expect(0x10000002 /* RegionDataEmptyRect */, type); /* rect */ rectf.X = 10.0; @@ -1516,6 +1537,8 @@ static void test_transform(void) status = GdipIsEqualRegion(region, region2, graphics, &res); expect(Ok, status); ok(res, "Expected to be equal.\n"); + type = get_region_type(region); + expect(0x10000000 /* RegionDataRect */, type); /* path */ status = GdipAddPathEllipse(path, 0.0, 10.0, 100.0, 150.0); @@ -1534,6 +1557,21 @@ static void test_transform(void) status = GdipIsEqualRegion(region, region2, graphics, &res); expect(Ok, status); ok(res, "Expected to be equal.\n"); + type = get_region_type(region); + expect(0x10000001 /* RegionDataPath */, type); + + /* rotated rect -> path */ + rectf.X = 10.0; + rectf.Y = 0.0; + rectf.Width = rectf.Height = 100.0; + status = GdipCombineRegionRect(region, &rectf, CombineModeReplace); + expect(Ok, status); + status = GdipRotateMatrix(matrix, 45.0, MatrixOrderAppend); + expect(Ok, status); + status = GdipTransformRegion(region, matrix); + expect(Ok, status); + type = get_region_type(region); + expect(0x10000001 /* RegionDataPath */, type); status = GdipDeleteRegion(region); expect(Ok, status);
6 years, 7 months
1
0
0
0
01/01: [GDIPLUS] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6619d0261f266a3e7cec7…
commit 6619d0261f266a3e7cec775a6b227daf3a352540 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:10:39 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:10:39 2018 +0100 [GDIPLUS] Sync with Wine Staging 3.9. CORE-14656 --- dll/win32/gdiplus/brush.c | 14 ++- dll/win32/gdiplus/customlinecap.c | 231 +++++++++++++++++++++++++----------- dll/win32/gdiplus/font.c | 4 +- dll/win32/gdiplus/gdiplus.spec | 2 +- dll/win32/gdiplus/gdiplus_private.h | 5 + dll/win32/gdiplus/graphics.c | 40 +++++-- dll/win32/gdiplus/image.c | 8 +- dll/win32/gdiplus/metafile.c | 2 +- dll/win32/gdiplus/pen.c | 7 +- dll/win32/gdiplus/region.c | 38 +++++- media/doc/README.WINE | 2 +- 11 files changed, 253 insertions(+), 100 deletions(-) diff --git a/dll/win32/gdiplus/brush.c b/dll/win32/gdiplus/brush.c index 51264212ae..d06832045a 100644 --- a/dll/win32/gdiplus/brush.c +++ b/dll/win32/gdiplus/brush.c @@ -261,7 +261,7 @@ static const char HatchBrushes[][8] = { GpStatus get_hatch_data(GpHatchStyle hatchstyle, const char **result) { - if (hatchstyle < sizeof(HatchBrushes) / sizeof(HatchBrushes[0])) + if (hatchstyle < ARRAY_SIZE(HatchBrushes)) { *result = HatchBrushes[hatchstyle]; return Ok; @@ -1715,6 +1715,18 @@ GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient *grad, return Ok; } +GpStatus WINGDIPAPI GdipSetPathGradientPath(GpPathGradient *grad, GDIPCONST GpPath *path) +{ + static int calls; + + TRACE("(%p, %p)\n", grad, path); + + if (!(calls++)) + FIXME("not implemented\n"); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient *grad, REAL focus, REAL scale) { diff --git a/dll/win32/gdiplus/customlinecap.c b/dll/win32/gdiplus/customlinecap.c index ca81bee217..c74928eeda 100644 --- a/dll/win32/gdiplus/customlinecap.c +++ b/dll/win32/gdiplus/customlinecap.c @@ -17,6 +17,7 @@ */ #include <stdarg.h> +#include <assert.h> #include "windef.h" #include "winbase.h" @@ -38,11 +39,20 @@ GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap* from, if(!from || !to) return InvalidParameter; - *to = heap_alloc_zero(sizeof(GpCustomLineCap)); - if(!*to) return OutOfMemory; + if (from->type == CustomLineCapTypeDefault) + *to = heap_alloc_zero(sizeof(GpCustomLineCap)); + else + *to = heap_alloc_zero(sizeof(GpAdjustableArrowCap)); - memcpy(*to, from, sizeof(GpCustomLineCap)); + if (!*to) + return OutOfMemory; + + if (from->type == CustomLineCapTypeDefault) + **to = *from; + else + *(GpAdjustableArrowCap *)*to = *(GpAdjustableArrowCap *)from; + /* Duplicate path data */ (*to)->pathdata.Points = heap_alloc_zero(from->pathdata.Count * sizeof(PointF)); (*to)->pathdata.Types = heap_alloc_zero(from->pathdata.Count); @@ -62,12 +72,44 @@ GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap* from, return Ok; } +static GpStatus init_custom_linecap(GpCustomLineCap *cap, GpPathData *pathdata, BOOL fill, GpLineCap basecap, + REAL base_inset) +{ + cap->fill = fill; + + cap->pathdata.Points = heap_alloc_zero(pathdata->Count * sizeof(PointF)); + cap->pathdata.Types = heap_alloc_zero(pathdata->Count); + + if ((!cap->pathdata.Types || !cap->pathdata.Points) && pathdata->Count) + { + heap_free(cap->pathdata.Points); + heap_free(cap->pathdata.Types); + cap->pathdata.Points = NULL; + cap->pathdata.Types = NULL; + return OutOfMemory; + } + + if (pathdata->Points) + memcpy(cap->pathdata.Points, pathdata->Points, pathdata->Count * sizeof(PointF)); + if (pathdata->Types) + memcpy(cap->pathdata.Types, pathdata->Types, pathdata->Count); + cap->pathdata.Count = pathdata->Count; + + cap->inset = base_inset; + cap->cap = basecap; + cap->join = LineJoinMiter; + cap->scale = 1.0; + + return Ok; +} + /* FIXME: Sometimes when fillPath is non-null and stroke path is null, the native * version of this function returns NotImplemented. I cannot figure out why. */ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath, GpLineCap baseCap, REAL baseInset, GpCustomLineCap **customCap) { GpPathData *pathdata; + GpStatus stat; TRACE("%p %p %d %f %p\n", fillPath, strokePath, baseCap, baseInset, customCap); @@ -77,37 +119,18 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath *customCap = heap_alloc_zero(sizeof(GpCustomLineCap)); if(!*customCap) return OutOfMemory; - (*customCap)->type = CustomLineCapTypeDefault; - if(strokePath){ - (*customCap)->fill = FALSE; + if (strokePath) pathdata = &strokePath->pathdata; - } - else{ - (*customCap)->fill = TRUE; + else pathdata = &fillPath->pathdata; - } - (*customCap)->pathdata.Points = heap_alloc_zero(pathdata->Count * sizeof(PointF)); - (*customCap)->pathdata.Types = heap_alloc_zero(pathdata->Count); - - if((!(*customCap)->pathdata.Types || !(*customCap)->pathdata.Points) && - pathdata->Count){ - heap_free((*customCap)->pathdata.Points); - heap_free((*customCap)->pathdata.Types); + stat = init_custom_linecap(*customCap, pathdata, fillPath != NULL, baseCap, baseInset); + if (stat != Ok) + { heap_free(*customCap); - return OutOfMemory; + return stat; } - memcpy((*customCap)->pathdata.Points, pathdata->Points, pathdata->Count - * sizeof(PointF)); - memcpy((*customCap)->pathdata.Types, pathdata->Types, pathdata->Count); - (*customCap)->pathdata.Count = pathdata->Count; - - (*customCap)->inset = baseInset; - (*customCap)->cap = baseCap; - (*customCap)->join = LineJoinMiter; - (*customCap)->scale = 1.0; - TRACE("<-- %p\n", *customCap); return Ok; @@ -257,111 +280,175 @@ GpStatus WINGDIPAPI GdipGetCustomLineCapType(GpCustomLineCap *customCap, CustomL return Ok; } +static void arrowcap_update_path(GpAdjustableArrowCap *cap) +{ + static const BYTE types_filled[] = + { + PathPointTypeStart, PathPointTypeLine, PathPointTypeLine, PathPointTypeLine | PathPointTypeCloseSubpath + }; + static const BYTE types_unfilled[] = + { + PathPointTypeStart, PathPointTypeLine, PathPointTypeLine + }; + GpPointF *points; + + assert(cap->cap.pathdata.Count == 3 || cap->cap.pathdata.Count == 4); + + points = cap->cap.pathdata.Points; + if (cap->cap.fill) + { + memcpy(cap->cap.pathdata.Types, types_filled, sizeof(types_filled)); + cap->cap.pathdata.Count = 4; + points[0].X = -cap->width / 2.0; + points[0].Y = -cap->height; + points[1].X = 0.0; + points[1].Y = 0.0; + points[2].X = cap->width / 2.0; + points[2].Y = -cap->height; + points[3].X = 0.0; + points[3].Y = -cap->height - cap->middle_inset; + } + else + { + memcpy(cap->cap.pathdata.Types, types_unfilled, sizeof(types_unfilled)); + cap->cap.pathdata.Count = 3; + points[0].X = -cap->width / 4.0; + points[0].Y = -cap->height / 2.0; + points[1].X = 0.0; + points[1].Y = 0.0; + points[2].X = cap->width / 4.0; + points[2].Y = -cap->height / 2.0; + } + + if (cap->width == 0.0) + cap->cap.inset = 0.0; + else + cap->cap.inset = cap->height / cap->width; +} + GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL fill, GpAdjustableArrowCap **cap) { - static int calls; + GpPathData pathdata; + GpStatus stat; TRACE("(%0.2f,%0.2f,%i,%p)\n", height, width, fill, cap); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap) + return InvalidParameter; - return NotImplemented; + *cap = heap_alloc_zero(sizeof(**cap)); + if (!*cap) + return OutOfMemory; + + /* We'll need 4 points at most. */ + pathdata.Count = 4; + pathdata.Points = NULL; + pathdata.Types = NULL; + stat = init_custom_linecap(&(*cap)->cap, &pathdata, fill, LineCapTriangle, width != 0.0 ? height / width : 0.0); + if (stat != Ok) + { + heap_free(*cap); + return stat; + } + + (*cap)->cap.type = CustomLineCapTypeAdjustableArrow; + (*cap)->height = height; + (*cap)->width = width; + (*cap)->middle_inset = 0.0; + arrowcap_update_path(*cap); + + return Ok; } GpStatus WINGDIPAPI GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL* fill) { - static int calls; - TRACE("(%p,%p)\n", cap, fill); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap || !fill) + return InvalidParameter; - return NotImplemented; + *fill = cap->cap.fill; + return Ok; } GpStatus WINGDIPAPI GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL* height) { - static int calls; - TRACE("(%p,%p)\n", cap, height); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap || !height) + return InvalidParameter; - return NotImplemented; + *height = cap->height; + return Ok; } GpStatus WINGDIPAPI GdipGetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, REAL* middle) { - static int calls; - TRACE("(%p,%p)\n", cap, middle); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap || !middle) + return InvalidParameter; - return NotImplemented; + *middle = cap->middle_inset; + return Ok; } GpStatus WINGDIPAPI GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL* width) { - static int calls; - TRACE("(%p,%p)\n", cap, width); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap || !width) + return InvalidParameter; - return NotImplemented; + *width = cap->width; + return Ok; } GpStatus WINGDIPAPI GdipSetAdjustableArrowCapFillState(GpAdjustableArrowCap* cap, BOOL fill) { - static int calls; - TRACE("(%p,%i)\n", cap, fill); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap) + return InvalidParameter; - return NotImplemented; + cap->cap.fill = fill; + arrowcap_update_path(cap); + return Ok; } GpStatus WINGDIPAPI GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap* cap, REAL height) { - static int calls; - TRACE("(%p,%0.2f)\n", cap, height); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap) + return InvalidParameter; - return NotImplemented; + cap->height = height; + arrowcap_update_path(cap); + return Ok; } GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap* cap, REAL middle) { - static int calls; - TRACE("(%p,%0.2f)\n", cap, middle); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap) + return InvalidParameter; - return NotImplemented; + cap->middle_inset = middle; + arrowcap_update_path(cap); + return Ok; } GpStatus WINGDIPAPI GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap* cap, REAL width) { - static int calls; - TRACE("(%p,%0.2f)\n", cap, width); - if(!(calls++)) - FIXME("not implemented\n"); + if (!cap) + return InvalidParameter; - return NotImplemented; + cap->width = width; + arrowcap_update_path(cap); + return Ok; } diff --git a/dll/win32/gdiplus/font.c b/dll/win32/gdiplus/font.c index f99b026b25..64778bb226 100644 --- a/dll/win32/gdiplus/font.c +++ b/dll/win32/gdiplus/font.c @@ -1367,7 +1367,7 @@ static int match_name_table_language( const tt_name_record *name, LANGID lang ) case TT_PLATFORM_MACINTOSH: if (!IsValidCodePage( get_mac_code_page( name ))) return 0; name_lang = GET_BE_WORD(name->language_id); - if (name_lang >= sizeof(mac_langid_table)/sizeof(mac_langid_table[0])) return 0; + if (name_lang >= ARRAY_SIZE(mac_langid_table)) return 0; name_lang = mac_langid_table[name_lang]; break; case TT_PLATFORM_APPLE_UNICODE: @@ -1377,7 +1377,7 @@ static int match_name_table_language( const tt_name_record *name, LANGID lang ) case TT_APPLE_ID_ISO_10646: case TT_APPLE_ID_UNICODE_2_0: name_lang = GET_BE_WORD(name->language_id); - if (name_lang >= sizeof(mac_langid_table)/sizeof(mac_langid_table[0])) return 0; + if (name_lang >= ARRAY_SIZE(mac_langid_table)) return 0; name_lang = mac_langid_table[name_lang]; break; default: diff --git a/dll/win32/gdiplus/gdiplus.spec b/dll/win32/gdiplus/gdiplus.spec index b29e41ebfa..ed9d50c058 100644 --- a/dll/win32/gdiplus/gdiplus.spec +++ b/dll/win32/gdiplus/gdiplus.spec @@ -534,7 +534,7 @@ 534 stdcall GdipSetPathGradientFocusScales(ptr float float) 535 stdcall GdipSetPathGradientGammaCorrection(ptr long) 536 stdcall GdipSetPathGradientLinearBlend(ptr float float) -537 stub GdipSetPathGradientPath +537 stdcall GdipSetPathGradientPath(ptr ptr) 538 stdcall GdipSetPathGradientPresetBlend(ptr ptr ptr long) 539 stdcall GdipSetPathGradientSigmaBlend(ptr float float) 540 stdcall GdipSetPathGradientSurroundColorsWithCount(ptr ptr ptr) diff --git a/dll/win32/gdiplus/gdiplus_private.h b/dll/win32/gdiplus/gdiplus_private.h index ea79f1183c..25b269ba35 100644 --- a/dll/win32/gdiplus/gdiplus_private.h +++ b/dll/win32/gdiplus/gdiplus_private.h @@ -35,6 +35,8 @@ #include "gdiplus.h" +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + #define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_MITER) #define MAX_ARC_PTS (13) #define MAX_DASHLEN (16) /* this is a limitation of gdi */ @@ -341,6 +343,9 @@ struct GpCustomLineCap{ struct GpAdjustableArrowCap{ GpCustomLineCap cap; + REAL middle_inset; + REAL height; + REAL width; }; struct GpImage{ diff --git a/dll/win32/gdiplus/graphics.c b/dll/win32/gdiplus/graphics.c index f42fca643d..1e2aff14f4 100644 --- a/dll/win32/gdiplus/graphics.c +++ b/dll/win32/gdiplus/graphics.c @@ -353,15 +353,20 @@ static GpStatus get_clip_hrgn(GpGraphics *graphics, HRGN *hrgn) GpRegion *rgn; GpMatrix transform; GpStatus stat; + BOOL identity; stat = get_graphics_transform(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceDevice, &transform); + if (stat == Ok) + stat = GdipIsMatrixIdentity(&transform, &identity); + if (stat == Ok) stat = GdipCloneRegion(graphics->clip, &rgn); if (stat == Ok) { - stat = GdipTransformRegion(rgn, &transform); + if (!identity) + stat = GdipTransformRegion(rgn, &transform); if (stat == Ok) stat = GdipGetRegionHRgn(rgn, NULL, hrgn); @@ -1695,9 +1700,9 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s ptf[3].X = x2 - dbig; ptf[2].X = x2 + dsmall; - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 3); + gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 4); - round_points(pt, ptf, 3); + round_points(pt, ptf, 4); Polygon(graphics->hdc, pt, 4); @@ -1735,9 +1740,9 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s ptf[1].X = x2 + dx; ptf[1].Y = y2 + dy; - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 3); + gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 2); - round_points(pt, ptf, 3); + round_points(pt, ptf, 2); Ellipse(graphics->hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y); @@ -1781,9 +1786,9 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s ptf[3].X = x2 + dx; ptf[3].Y = y2 + dy; - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 3); + gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 4); - round_points(pt, ptf, 3); + round_points(pt, ptf, 4); Pie(graphics->hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y, pt[2].x, pt[2].y, pt[3].x, pt[3].y); @@ -1793,6 +1798,13 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s if(!custom) break; + if (custom->type == CustomLineCapTypeAdjustableArrow) + { + GpAdjustableArrowCap *arrow = (GpAdjustableArrowCap *)custom; + if (arrow->cap.fill && arrow->height <= 0.0) + break; + } + count = custom->pathdata.Count; custptf = heap_alloc_zero(count * sizeof(PointF)); custpt = heap_alloc_zero(count * sizeof(POINT)); @@ -1810,9 +1822,9 @@ static void draw_cap(GpGraphics *graphics, COLORREF color, GpLineCap cap, REAL s GdipTranslateMatrix(&matrix, x2, y2, MatrixOrderAppend); GdipTransformMatrixPoints(&matrix, custptf, count); - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, ptf, 3); + gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, custptf, count); - round_points(pt, ptf, 3); + round_points(custpt, custptf, count); for(i = 0; i < count; i++) tp[i] = convert_path_point_type(custom->pathdata.Types[i]); @@ -6469,9 +6481,12 @@ GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, if (status == Ok) { GpMatrix world_to_device; + BOOL identity; get_graphics_transform(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, &world_to_device); - status = GdipTransformRegion(region, &world_to_device); + status = GdipIsMatrixIdentity(&world_to_device, &identity); + if (status == Ok && !identity) + status = GdipTransformRegion(region, &world_to_device); if (status == Ok) status = GdipCombineRegionRegion(graphics->clip, region, mode); @@ -6520,9 +6535,12 @@ GpStatus WINGDIPAPI GdipSetClipRegion(GpGraphics *graphics, GpRegion *region, if (status == Ok) { GpMatrix world_to_device; + BOOL identity; get_graphics_transform(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, &world_to_device); - status = GdipTransformRegion(clip, &world_to_device); + status = GdipIsMatrixIdentity(&world_to_device, &identity); + if (status == Ok && !identity) + status = GdipTransformRegion(clip, &world_to_device); if (status == Ok) status = GdipCombineRegionRegion(graphics->clip, clip, mode); diff --git a/dll/win32/gdiplus/image.c b/dll/win32/gdiplus/image.c index ff9bd9be7f..afa2afeac7 100644 --- a/dll/win32/gdiplus/image.c +++ b/dll/win32/gdiplus/image.c @@ -2560,7 +2560,7 @@ static UINT vt_to_itemtype(UINT vt) { VT_BLOB, PropertyTagTypeUndefined } }; UINT i; - for (i = 0; i < sizeof(vt2type)/sizeof(vt2type[0]); i++) + for (i = 0; i < ARRAY_SIZE(vt2type); i++) { if (vt2type[i].vt == vt) return vt2type[i].type; } @@ -3460,10 +3460,10 @@ static void png_metadata_reader(GpBitmap *bitmap, IWICBitmapDecoder *decoder, UI { if (name.vt == VT_LPSTR) { - for (j=0; j<sizeof(keywords)/sizeof(keywords[0]); j++) + for (j = 0; j < ARRAY_SIZE(keywords); j++) if (!strcmp(keywords[j].name, name.u.pszVal)) break; - if (j < sizeof(keywords)/sizeof(keywords[0]) && !keywords[j].seen) + if (j < ARRAY_SIZE(keywords) && !keywords[j].seen) { keywords[j].seen = TRUE; item = create_prop(keywords[j].propid, &value); @@ -4586,7 +4586,7 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream, encode_image_func encode_image; int i; - TRACE("%p %p %s %p\n", image, stream, wine_dbgstr_guid(clsid), params); + TRACE("%p, %p, %s, %p\n", image, stream, wine_dbgstr_guid(clsid), params); if(!image || !stream) return InvalidParameter; diff --git a/dll/win32/gdiplus/metafile.c b/dll/win32/gdiplus/metafile.c index 77673a7ea3..08dde2fec6 100644 --- a/dll/win32/gdiplus/metafile.c +++ b/dll/win32/gdiplus/metafile.c @@ -606,7 +606,7 @@ void METAFILE_Free(GpMetafile *metafile) if (metafile->record_stream) IStream_Release(metafile->record_stream); - for (i = 0; i < sizeof(metafile->objtable)/sizeof(metafile->objtable[0]); i++) + for (i = 0; i < ARRAY_SIZE(metafile->objtable); i++) metafile_free_object_table_entry(metafile, i); } diff --git a/dll/win32/gdiplus/pen.c b/dll/win32/gdiplus/pen.c index 2c49371bd5..b86808b87e 100644 --- a/dll/win32/gdiplus/pen.c +++ b/dll/win32/gdiplus/pen.c @@ -460,17 +460,12 @@ GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *pen, GpMatrix *matrix) GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy, GpMatrixOrder order) { - static int calls; - TRACE("(%p,%0.2f,%0.2f,%u)\n", pen, dx, dy, order); if(!pen) return InvalidParameter; - if(!(calls++)) - FIXME("not implemented\n"); - - return NotImplemented; + return GdipTranslateMatrix(&pen->transform, dx, dy, order); } GpStatus WINGDIPAPI GdipScalePenTransform(GpPen *pen, REAL sx, REAL sy, GpMatrixOrder order) diff --git a/dll/win32/gdiplus/region.c b/dll/win32/gdiplus/region.c index 8eb3ff3535..470bcd20ce 100644 --- a/dll/win32/gdiplus/region.c +++ b/dll/win32/gdiplus/region.c @@ -1398,10 +1398,46 @@ static GpStatus transform_region_element(region_element* element, GpMatrix *matr return Ok; case RegionDataRect: { - /* We can't transform a rectangle, so convert it to a path. */ GpRegion *new_region; GpPath *path; + if (matrix->matrix[1] == 0.0 && matrix->matrix[2] == 0.0) + { + GpPointF points[2]; + + points[0].X = element->elementdata.rect.X; + points[0].Y = element->elementdata.rect.Y; + points[1].X = element->elementdata.rect.X + element->elementdata.rect.Width; + points[1].Y = element->elementdata.rect.Y + element->elementdata.rect.Height; + + stat = GdipTransformMatrixPoints(matrix, points, 2); + if (stat != Ok) + return stat; + + if (points[0].X > points[1].X) + { + REAL temp; + temp = points[0].X; + points[0].X = points[1].X; + points[1].X = temp; + } + + if (points[0].Y > points[1].Y) + { + REAL temp; + temp = points[0].Y; + points[0].Y = points[1].Y; + points[1].Y = temp; + } + + element->elementdata.rect.X = points[0].X; + element->elementdata.rect.Y = points[0].Y; + element->elementdata.rect.Width = points[1].X - points[0].X; + element->elementdata.rect.Height = points[1].Y - points[0].Y; + return Ok; + } + + /* We can't rotate/shear a rectangle, so convert it to a path. */ stat = GdipCreatePath(FillModeAlternate, &path); if (stat == Ok) { diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 08dcf59cac..e17deddf22 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -68,7 +68,7 @@ reactos/dll/win32/dciman32 # Synced to WineStaging-3.3 reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.3 -reactos/dll/win32/gdiplus # Synced to WineStaging-3.3 +reactos/dll/win32/gdiplus # Synced to WineStaging-3.9 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.3
6 years, 7 months
1
0
0
0
01/01: [PSDK] Add missing GdipSetPathGradientPath() and GdipTranslatePenTransform(). CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b8fbca3f73a6ee9c4e59…
commit 4b8fbca3f73a6ee9c4e596385091299a1bef41b0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:09:49 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:09:49 2018 +0100 [PSDK] Add missing GdipSetPathGradientPath() and GdipTranslatePenTransform(). CORE-14656 --- sdk/include/psdk/gdiplusflat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/include/psdk/gdiplusflat.h b/sdk/include/psdk/gdiplusflat.h index 54d3ea94b5..af8033e3b3 100644 --- a/sdk/include/psdk/gdiplusflat.h +++ b/sdk/include/psdk/gdiplusflat.h @@ -590,6 +590,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient*,GpPointF*); GpStatus WINGDIPAPI GdipSetPathGradientCenterPointI(GpPathGradient*,GpPoint*); GpStatus WINGDIPAPI GdipSetPathGradientFocusScales(GpPathGradient*,REAL,REAL); GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient*,BOOL); +GpStatus WINGDIPAPI GdipSetPathGradientPath(GpPathGradient*,GDIPCONST GpPath*); GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient*,REAL,REAL); GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*, GDIPCONST ARGB*,INT*); @@ -656,6 +657,7 @@ GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen*,REAL*); GpStatus WINGDIPAPI GdipGetPenStartCap(GpPen*,GpLineCap*); GpStatus WINGDIPAPI GdipGetPenUnit(GpPen*,GpUnit*); GpStatus WINGDIPAPI GdipGetPenWidth(GpPen*,REAL*); +GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); /* Region */ GpStatus WINGDIPAPI GdipCloneRegion(GpRegion *, GpRegion **);
6 years, 7 months
1
0
0
0
01/01: [DBGHELP] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2fb248c7998b94fe088f2…
commit 2fb248c7998b94fe088f25a2c3ee37db696ae329 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:08:32 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:08:32 2018 +0100 [DBGHELP] Sync with Wine Staging 3.9. CORE-14656 --- dll/win32/dbghelp/cpu_arm64.c | 14 +++++++------- media/doc/README.WINE | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dll/win32/dbghelp/cpu_arm64.c b/dll/win32/dbghelp/cpu_arm64.c index dd2ccfb883..dea19f83ba 100644 --- a/dll/win32/dbghelp/cpu_arm64.c +++ b/dll/win32/dbghelp/cpu_arm64.c @@ -41,7 +41,7 @@ static BOOL arm64_get_addr(HANDLE hThread, const CONTEXT* ctx, #ifdef __aarch64__ case cpu_addr_pc: addr->Offset = ctx->Pc; return TRUE; case cpu_addr_stack: addr->Offset = ctx->Sp; return TRUE; - case cpu_addr_frame: addr->Offset = ctx->Fp; return TRUE; + case cpu_addr_frame: addr->Offset = ctx->u.s.Fp; return TRUE; #endif default: addr->Mode = -1; return FALSE; @@ -69,7 +69,7 @@ static BOOL fetch_next_frame(struct cpu_stack_walk* csw, CONTEXT* context, DWORD_PTR curr_pc) { DWORD_PTR xframe; - DWORD_PTR oldReturn = context->Lr; + DWORD_PTR oldReturn = context->u.s.Lr; if (dwarf2_virtual_unwind(csw, curr_pc, context, &xframe)) { @@ -78,7 +78,7 @@ static BOOL fetch_next_frame(struct cpu_stack_walk* csw, return TRUE; } - if (context->Pc == context->Lr) return FALSE; + if (context->Pc == context->u.s.Lr) return FALSE; context->Pc = oldReturn; return TRUE; @@ -123,8 +123,8 @@ static BOOL arm64_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, C /* set frame information */ frame->AddrStack.Offset = context->Sp; - frame->AddrReturn.Offset = context->Lr; - frame->AddrFrame.Offset = context->Fp; + frame->AddrReturn.Offset = context->u.s.Lr; + frame->AddrFrame.Offset = context->u.s.Fp; frame->AddrPC.Offset = context->Pc; frame->Far = TRUE; @@ -198,8 +198,8 @@ static void* arm64_fetch_context_reg(CONTEXT* ctx, unsigned regno, unsigned* siz case CV_ARM64_X0 + 27: case CV_ARM64_X0 + 28: *size = sizeof(ctx->u.X[0]); return &ctx->u.X[regno - CV_ARM64_X0]; case CV_ARM64_PSTATE: *size = sizeof(ctx->Cpsr); return &ctx->Cpsr; - case CV_ARM64_FP: *size = sizeof(ctx->Fp); return &ctx->Fp; - case CV_ARM64_LR: *size = sizeof(ctx->Lr); return &ctx->Lr; + case CV_ARM64_FP: *size = sizeof(ctx->u.s.Fp); return &ctx->u.s.Fp; + case CV_ARM64_LR: *size = sizeof(ctx->u.s.Lr); return &ctx->u.s.Lr; case CV_ARM64_SP: *size = sizeof(ctx->Sp); return &ctx->Sp; case CV_ARM64_PC: *size = sizeof(ctx->Pc); return &ctx->Pc; } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 8a7b608627..08dcf59cac 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -63,7 +63,7 @@ reactos/dll/win32/cryptdlg # Synced to WineStaging-3.3 reactos/dll/win32/cryptdll # Synced to WineStaging-3.3 reactos/dll/win32/cryptnet # Synced to WineStaging-3.3 reactos/dll/win32/cryptui # Synced to WineStaging-3.3 -reactos/dll/win32/dbghelp # Synced to WineStaging-3.3 +reactos/dll/win32/dbghelp # Synced to WineStaging-3.9 reactos/dll/win32/dciman32 # Synced to WineStaging-3.3 reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9
6 years, 7 months
1
0
0
0
01/01: [CRYPT32] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=102f53e05c34f0071ebbf…
commit 102f53e05c34f0071ebbfed0a1e2d8afe5ca1489 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:07:57 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:07:57 2018 +0100 [CRYPT32] Sync with Wine Staging 3.9. CORE-14656 --- dll/win32/crypt32/crypt32.spec | 1 + dll/win32/crypt32/regstore.c | 13 +++++++++---- dll/win32/crypt32/sip.c | 10 ++++++++++ media/doc/README.WINE | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/dll/win32/crypt32/crypt32.spec b/dll/win32/crypt32/crypt32.spec index fc0955e009..0bc78a158d 100644 --- a/dll/win32/crypt32/crypt32.spec +++ b/dll/win32/crypt32/crypt32.spec @@ -177,6 +177,7 @@ @ stdcall CryptSIPRemoveProvider(ptr) @ stdcall CryptSIPRemoveSignedDataMsg(ptr long) @ stdcall CryptSIPRetrieveSubjectGuid(wstr long ptr) +@ stdcall CryptSIPRetrieveSubjectGuidForCatalogFile(wstr long ptr) @ stdcall CryptSIPVerifyIndirectData(ptr ptr) @ stub CryptSetAsyncParam @ stdcall CryptSetOIDFunctionValue(long str str wstr long ptr long) diff --git a/dll/win32/crypt32/regstore.c b/dll/win32/crypt32/regstore.c index 5a39a2684d..7678bab6aa 100644 --- a/dll/win32/crypt32/regstore.c +++ b/dll/win32/crypt32/regstore.c @@ -309,7 +309,11 @@ static BOOL CRYPT_RegFlushStore(WINE_REGSTOREINFO *store, BOOL force) TRACE("(%p, %d)\n", store, force); if (store->dirty || force) + { ret = CRYPT_RegWriteToReg(store); + if (ret) + store->dirty = FALSE; + } else ret = TRUE; return ret; @@ -453,7 +457,7 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags, DWORD dwCtrlType, void const *pvCtrlPara) { WINE_REGSTOREINFO *store = hCertStore; - BOOL ret; + BOOL ret = TRUE; TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType, pvCtrlPara); @@ -469,7 +473,6 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags, CRYPT_RegReadFromReg(store->key, memStore); I_CertUpdateStore(store->memStore, memStore, 0, 0); CertCloseStore(memStore, 0); - ret = TRUE; break; } case CERT_STORE_CTRL_COMMIT: @@ -478,10 +481,12 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags, break; case CERT_STORE_CTRL_AUTO_RESYNC: FIXME("CERT_STORE_CTRL_AUTO_RESYNC: stub\n"); - ret = TRUE; + break; + case CERT_STORE_CTRL_NOTIFY_CHANGE: + FIXME("CERT_STORE_CTRL_NOTIFY_CHANGE: stub\n"); break; default: - FIXME("%d: stub\n", dwCtrlType); + FIXME("%u: stub\n", dwCtrlType); ret = FALSE; } return ret; diff --git a/dll/win32/crypt32/sip.c b/dll/win32/crypt32/sip.c index 8b561fdc2c..b0c4692c1f 100644 --- a/dll/win32/crypt32/sip.c +++ b/dll/win32/crypt32/sip.c @@ -801,3 +801,13 @@ BOOL WINAPI CryptSIPVerifyIndirectData(SIP_SUBJECTINFO* pSubjectInfo, TRACE("returning %d\n", ret); return ret; } + +/*********************************************************************** + * CryptSIPRetrieveSubjectGuidForCatalogFile (CRYPT32.@) + */ +BOOL WINAPI CryptSIPRetrieveSubjectGuidForCatalogFile(LPCWSTR filename, HANDLE handle, GUID *subject) +{ + FIXME("(%s %p %p)\n", debugstr_w(filename), handle, subject); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; +} diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 44573b5156..8a7b608627 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -58,7 +58,7 @@ reactos/dll/win32/comctl32 # Synced to Wine-3.0 reactos/dll/win32/comdlg32 # Synced to WineStaging-3.9 reactos/dll/win32/compstui # Synced to WineStaging-3.3 reactos/dll/win32/credui # Synced to WineStaging-3.3 -reactos/dll/win32/crypt32 # Synced to WineStaging-3.3 +reactos/dll/win32/crypt32 # Synced to WineStaging-3.9 reactos/dll/win32/cryptdlg # Synced to WineStaging-3.3 reactos/dll/win32/cryptdll # Synced to WineStaging-3.3 reactos/dll/win32/cryptnet # Synced to WineStaging-3.3
6 years, 7 months
1
0
0
0
01/01: [COMDLG32_WINETEST] Sync with Wine Staging 3.9. CORE-14656
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=234f89c07b0cde29f7751…
commit 234f89c07b0cde29f775101750f15da6ae20cf2c Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun May 27 04:07:12 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun May 27 04:07:12 2018 +0100 [COMDLG32_WINETEST] Sync with Wine Staging 3.9. CORE-14656 --- modules/rostests/winetests/comdlg32/filedlg.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/rostests/winetests/comdlg32/filedlg.c b/modules/rostests/winetests/comdlg32/filedlg.c index 4d940555a0..4cad889050 100644 --- a/modules/rostests/winetests/comdlg32/filedlg.c +++ b/modules/rostests/winetests/comdlg32/filedlg.c @@ -943,29 +943,27 @@ static void test_resizable2(void) ofn.hInstance = GetModuleHandleA(NULL); ofn.lpTemplateName = "template1"; ofn.Flags = OFN_EXPLORER; -#define ISSIZABLE TRUE ret = GetOpenFileNameA(&ofn); - ok( ret == ISSIZABLE, "File Dialog should have been sizable\n"); + ok( ret == TRUE, "File Dialog should have been sizable\n"); ret = CommDlgExtendedError(); ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATE; ret = GetOpenFileNameA(&ofn); - ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); + ok( !ret, "File Dialog should NOT have been sizable\n"); ret = CommDlgExtendedError(); ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATEHANDLE; ofn.hInstance = LoadResource( GetModuleHandleA(NULL), FindResourceA( GetModuleHandleA(NULL), "template1", (LPSTR)RT_DIALOG)); ofn.lpTemplateName = NULL; ret = GetOpenFileNameA(&ofn); - ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); + ok( !ret, "File Dialog should NOT have been sizable\n"); ret = CommDlgExtendedError(); ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ofn.Flags = OFN_EXPLORER | OFN_ENABLEHOOK; ret = GetOpenFileNameA(&ofn); - ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); + ok( !ret, "File Dialog should NOT have been sizable\n"); ret = CommDlgExtendedError(); ok(!ret, "CommDlgExtendedError returned %#x\n", ret); -#undef ISSIZABLE } static void test_mru(void) @@ -1032,8 +1030,6 @@ static UINT_PTR WINAPI test_extension_wndproc(HWND dlg, UINT msg, WPARAM wParam, return FALSE; } -#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) - static void test_extension_helper(OPENFILENAMEA* ofn, const char *filter, const char *expected_filename) {
6 years, 7 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
22
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
Results per page:
10
25
50
100
200