Rebase against 1d3b312f225f79bec74d3d265128ead455467e2a.

This commit is contained in:
Zebediah Figura 2024-02-29 18:06:56 -06:00
parent 34eb04e7cc
commit e768e46a86
5 changed files with 22 additions and 630 deletions

View File

@ -1,4 +1,4 @@
From a9c768a74e8ecbe857dfb851e35c62d5447f8d10 Mon Sep 17 00:00:00 2001
From 7b40ae4316f61b52e0ad740bb1ba0a32e6545a40 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 24 Nov 2015 17:22:02 +0800
Subject: [PATCH] oleaut32: Implement a better stub for IPicture::SaveAsFile.
@ -12,10 +12,10 @@ For bug 8532.
2 files changed, 79 insertions(+), 22 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index bbc5e2aa9c8..0410d2b3cad 100644
index 6e0db65a101..48d7ae13846 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -832,19 +832,6 @@ static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
@@ -819,19 +819,6 @@ static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
return S_OK;
}
@ -35,8 +35,8 @@ index bbc5e2aa9c8..0410d2b3cad 100644
/************************************************************************
* OLEPictureImpl_get_Attributes
*/
@@ -1887,6 +1874,85 @@ static HRESULT WINAPI OLEPictureImpl_GetSizeMax(
return E_NOTIMPL;
@@ -1891,6 +1878,85 @@ static HRESULT WINAPI OLEPictureImpl_GetSizeMax(IPersistStream *iface, ULARGE_IN
return hr;
}
+/************************************************************************
@ -122,10 +122,10 @@ index bbc5e2aa9c8..0410d2b3cad 100644
/************************************************************************
* IDispatch
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index beafb98b28f..e0fb3bb3cd8 100644
index a269491fd3f..97c80027b99 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -1178,18 +1178,14 @@ static void test_load_save_bmp(void)
@@ -1231,18 +1231,14 @@ static void test_load_save_bmp(void)
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr);
@ -144,7 +144,7 @@ index beafb98b28f..e0fb3bb3cd8 100644
ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0;
@@ -1256,15 +1252,12 @@ static void test_load_save_icon(void)
@@ -1317,15 +1313,12 @@ static void test_load_save_icon(void)
todo_wine
ok(size == 766, "expected 766, got %ld\n", size);
mem = GlobalLock(hmem);
@ -160,7 +160,7 @@ index beafb98b28f..e0fb3bb3cd8 100644
ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0;
@@ -1330,13 +1323,11 @@ static void test_load_save_empty_picture(void)
@@ -1399,13 +1392,11 @@ static void test_load_save_empty_picture(void)
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr);
@ -175,5 +175,5 @@ index beafb98b28f..e0fb3bb3cd8 100644
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream);
--
2.35.1
2.43.0

View File

@ -1,4 +1,4 @@
From e6f8042ee351aa6821639a1d99e003e8425c36e9 Mon Sep 17 00:00:00 2001
From 908557cc6bdd74e9e91cd984b82688e004dcda54 Mon Sep 17 00:00:00 2001
From: Damjan Jovanovic <damjan.jov@gmail.com>
Date: Sat, 29 Feb 2020 09:21:55 +0200
Subject: [PATCH] oleaut32: preferentially load icons having the desired size
@ -16,14 +16,14 @@ Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Updated to default 32 when x/y are LP_DEFAULT.
---
dlls/oleaut32/olepicture.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
dlls/oleaut32/olepicture.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 535a16146aa..05ad1137296 100644
index 6e0db65a101..32645f5d2d5 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -151,6 +151,8 @@ typedef struct OLEPictureImpl {
@@ -149,6 +149,8 @@ typedef struct OLEPictureImpl {
BOOL bIsDirty; /* Set to TRUE if picture has changed */
unsigned int loadtime_magic; /* If a length header was found, saves value */
unsigned int loadtime_format; /* for PICTYPE_BITMAP only, keeps track of image format (GIF/BMP/JPEG) */
@ -32,7 +32,7 @@ index 535a16146aa..05ad1137296 100644
} OLEPictureImpl;
static inline OLEPictureImpl *impl_from_IPicture(IPicture *iface)
@@ -1190,14 +1192,20 @@ static HRESULT OLEPictureImpl_LoadIcon(OLEPictureImpl *This, BYTE *xbuf, ULONG x
@@ -1222,14 +1224,20 @@ static HRESULT OLEPictureImpl_LoadIcon(OLEPictureImpl *This, BYTE *xbuf, ULONG x
return E_FAIL;
}
i=0;
@ -57,7 +57,7 @@ index 535a16146aa..05ad1137296 100644
if (i==cifd->idCount) i=0;
}
if (xread < cifd->idEntries[i].dwDIBOffset + cifd->idEntries[i].dwDIBSize)
@@ -2356,6 +2364,7 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
@@ -2313,14 +2321,21 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
{
LPPERSISTSTREAM ps;
IPicture *newpic;
@ -65,7 +65,9 @@ index 535a16146aa..05ad1137296 100644
HRESULT hr;
FIXME("%p, %ld, %d, %s, %lu, %lu, %#lx, %p, partially implemented.\n",
@@ -2364,6 +2373,11 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
lpstream, lSize, fRunmode, debugstr_guid(riid), xsiz, ysiz, flags, ppvObj);
+ /* hack to prevent this patch from applying in the wrong place */
hr = OleCreatePictureIndirect(NULL,riid,!fRunmode,(LPVOID*)&newpic);
if (hr != S_OK)
return hr;
@ -78,5 +80,5 @@ index 535a16146aa..05ad1137296 100644
if (hr != S_OK) {
ERR("Could not get IPersistStream iface from Ole Picture?\n");
--
2.40.1
2.43.0

View File

@ -1,3 +0,0 @@
Fixes: [24812] Implement shell32 NewMenu class with new folder item
# In the process of upstreaming.
Disabled: true

View File

@ -1 +1 @@
6cbe072c3799b27addb67014245ea7c59b1023dd
1d3b312f225f79bec74d3d265128ead455467e2a