You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 670a1e81b465f67cb7e49fdb84c1fc96853fc9d7.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
From c5cb6a3fabbc59568fcd0794473b94ea61127a85 Mon Sep 17 00:00:00 2001
|
||||
From eb7f29d66825c454043b3f68594e5b50412300ed Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Sun, 27 Mar 2016 16:28:33 +0800
|
||||
Subject: oleaut32: Implement OleLoadPictureFile. (v2)
|
||||
Subject: [PATCH] oleaut32: Implement OleLoadPictureFile. (v2)
|
||||
|
||||
---
|
||||
dlls/oleaut32/olepicture.c | 36 ++++++++++++++++++++-------
|
||||
dlls/oleaut32/tests/olepicture.c | 53 ++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/oleaut32/olepicture.c | 36 ++++++++++++++++------
|
||||
dlls/oleaut32/tests/olepicture.c | 53 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 80 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
|
||||
index 765711d..29a091f 100644
|
||||
index 4a478217997..b5c9e8db271 100644
|
||||
--- a/dlls/oleaut32/olepicture.c
|
||||
+++ b/dlls/oleaut32/olepicture.c
|
||||
@@ -2315,15 +2315,6 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
|
||||
@@ -2387,15 +2387,6 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,11 @@ index 765711d..29a091f 100644
|
||||
static HRESULT create_stream(const WCHAR *filename, IStream **stream)
|
||||
{
|
||||
HANDLE hFile;
|
||||
@@ -2364,6 +2355,33 @@ static HRESULT create_stream(const WCHAR *filename, IStream **stream)
|
||||
@@ -2435,6 +2426,33 @@ static HRESULT create_stream(const WCHAR *filename, IStream **stream)
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+/***********************************************************************
|
||||
+ * OleLoadPictureFile (OLEAUT32.422)
|
||||
+ */
|
||||
+HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
|
||||
@@ -58,15 +59,14 @@ index 765711d..29a091f 100644
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
/***********************************************************************
|
||||
* OleSavePictureFile (OLEAUT32.423)
|
||||
*/
|
||||
HRESULT WINAPI OleSavePictureFile(IDispatch *picture, BSTR filename)
|
||||
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
|
||||
index 0903298..46cb185 100644
|
||||
index 747134e2458..78c2ed5294e 100644
|
||||
--- a/dlls/oleaut32/tests/olepicture.c
|
||||
+++ b/dlls/oleaut32/tests/olepicture.c
|
||||
@@ -850,6 +850,7 @@ static void test_OleLoadPicturePath(void)
|
||||
@@ -958,6 +958,7 @@ static void test_OleLoadPicturePath(void)
|
||||
HANDLE file;
|
||||
DWORD size;
|
||||
WCHAR *ptr;
|
||||
@@ -74,7 +74,7 @@ index 0903298..46cb185 100644
|
||||
|
||||
const struct
|
||||
{
|
||||
@@ -916,6 +917,14 @@ static void test_OleLoadPicturePath(void)
|
||||
@@ -1024,6 +1025,14 @@ static void test_OleLoadPicturePath(void)
|
||||
if (pic)
|
||||
IPicture_Release(pic);
|
||||
|
||||
@@ -89,7 +89,7 @@ index 0903298..46cb185 100644
|
||||
/* Try a DOS path with tacked on "file:". */
|
||||
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic);
|
||||
ok(hres == S_OK ||
|
||||
@@ -924,6 +933,13 @@ static void test_OleLoadPicturePath(void)
|
||||
@@ -1032,6 +1041,13 @@ static void test_OleLoadPicturePath(void)
|
||||
if (pic)
|
||||
IPicture_Release(pic);
|
||||
|
||||
@@ -103,9 +103,9 @@ index 0903298..46cb185 100644
|
||||
DeleteFileA(temp_file);
|
||||
|
||||
/* Try with a nonexistent file. */
|
||||
@@ -933,12 +949,26 @@ static void test_OleLoadPicturePath(void)
|
||||
@@ -1041,12 +1057,26 @@ static void test_OleLoadPicturePath(void)
|
||||
broken(hres == E_FAIL), /*Win2k */
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
|
||||
|
||||
+ VariantInit(&var);
|
||||
+ V_VT(&var) = VT_BSTR;
|
||||
@@ -118,7 +118,7 @@ index 0903298..46cb185 100644
|
||||
ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */
|
||||
broken(hres == E_UNEXPECTED) || /* NT4 */
|
||||
broken(hres == E_FAIL), /* Win2k */
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
|
||||
|
||||
+ VariantInit(&var);
|
||||
+ V_VT(&var) = VT_BSTR;
|
||||
@@ -130,7 +130,7 @@ index 0903298..46cb185 100644
|
||||
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL);
|
||||
@@ -960,6 +990,13 @@ static void test_OleLoadPicturePath(void)
|
||||
@@ -1068,6 +1098,13 @@ static void test_OleLoadPicturePath(void)
|
||||
if (pic)
|
||||
IPicture_Release(pic);
|
||||
|
||||
@@ -144,23 +144,23 @@ index 0903298..46cb185 100644
|
||||
DeleteFileA(temp_file);
|
||||
|
||||
/* Try with a nonexistent file. */
|
||||
@@ -968,6 +1005,22 @@ static void test_OleLoadPicturePath(void)
|
||||
@@ -1076,6 +1113,22 @@ static void test_OleLoadPicturePath(void)
|
||||
broken(hres == E_UNEXPECTED) || /* NT4 */
|
||||
broken(hres == E_FAIL), /* Win2k */
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
|
||||
+
|
||||
+ VariantInit(&var);
|
||||
+ V_VT(&var) = VT_BSTR;
|
||||
+ V_BSTR(&var) = SysAllocString(temp_fileW);
|
||||
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
|
||||
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#lx\n", hres);
|
||||
+ VariantClear(&var);
|
||||
+
|
||||
+ VariantInit(&var);
|
||||
+ V_VT(&var) = VT_INT;
|
||||
+ V_INT(&var) = 762;
|
||||
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
|
||||
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#lx\n", hres);
|
||||
+
|
||||
+if (0) /* crashes under Windows */
|
||||
+ hres = OleLoadPictureFile(var, NULL);
|
||||
@@ -168,5 +168,5 @@ index 0903298..46cb185 100644
|
||||
|
||||
static void test_himetric(void)
|
||||
--
|
||||
2.7.1
|
||||
2.35.1
|
||||
|
||||
|
Reference in New Issue
Block a user