Rebase against c1bc25dd38dab0504bd9eb45641a830ff08488b3.

[gdiplus-GdipCreateMetafileFromStream]
Removed patches to implement GdipCreateMetafileFromStream and
GdipGetMetafileHeaderFromMetafile (accepted upstream).
This commit is contained in:
Sebastian Lackner 2016-09-12 23:38:48 +02:00
parent 2ad4a084dd
commit 3bb2024464
8 changed files with 20 additions and 215 deletions

View File

@ -1,4 +1,4 @@
From e7dfb60036cd8a437bbe586507ea7f895c0da0e0 Mon Sep 17 00:00:00 2001
From 8f6353a291eaa4d1b61d2063c93a294b7deef7a7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 17 Jan 2016 20:17:46 +0100
Subject: shcore: Add dll.
@ -13,10 +13,10 @@ Subject: shcore: Add dll.
create mode 100644 dlls/shcore/shcore.spec
diff --git a/configure.ac b/configure.ac
index 7daf5a8..d5f8e7d 100644
index 04015a1..557f26b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3238,6 +3238,7 @@ WINE_CONFIG_TEST(dlls/setupapi/tests)
@@ -3289,6 +3289,7 @@ WINE_CONFIG_TEST(dlls/setupapi/tests)
WINE_CONFIG_DLL(setupx.dll16,enable_win16)
WINE_CONFIG_DLL(sfc,,[implib])
WINE_CONFIG_DLL(sfc_os,,[implib])
@ -121,10 +121,10 @@ index 0000000..12a4ef3
+@ stub SetProcessReference
+@ stub UnregisterScaleChangeEvent
diff --git a/tools/make_specfiles b/tools/make_specfiles
index ce6dc2f..cf8bc20 100755
index 2c64243..611aaca 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -261,6 +261,11 @@ my @dll_groups =
@@ -238,6 +238,11 @@ my @dll_groups =
"api-ms-win-core-url-l1-1-0",
],
[
@ -134,8 +134,8 @@ index ce6dc2f..cf8bc20 100755
+ ],
+ [
"user32",
"api-ms-win-core-stringansi-l1-1-0",
"api-ms-win-core-string-l2-1-0",
"api-ms-win-downlevel-user32-l1-1-0",
--
2.7.1
2.9.0

View File

@ -1,4 +1,4 @@
From bfbf931272f7ed81a9e04c55c47abbc70f0d2b0b Mon Sep 17 00:00:00 2001
From d89731065f3af3da465b805e8568c3a7ebac49f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 17:02:41 +0100
Subject: api-ms-win-shcore-obsolete-l1-1-0: Add dll.
@ -13,10 +13,10 @@ Subject: api-ms-win-shcore-obsolete-l1-1-0: Add dll.
create mode 100644 dlls/api-ms-win-shcore-obsolete-l1-1-0/api-ms-win-shcore-obsolete-l1-1-0.spec
diff --git a/configure.ac b/configure.ac
index c79dc8b..222c17f 100644
index 557f26b..561260f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2756,6 +2756,7 @@ WINE_CONFIG_DLL(api-ms-win-security-sddl-l1-1-0)
@@ -2777,6 +2777,7 @@ WINE_CONFIG_DLL(api-ms-win-security-sddl-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-service-core-l1-1-1)
WINE_CONFIG_DLL(api-ms-win-service-management-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-service-winsvc-l1-2-0)
@ -41,10 +41,10 @@ index 0000000..edb8143
+@ stdcall SHStrDupA(str ptr) shcore.SHStrDupA
+@ stdcall SHStrDupW(wstr ptr) shcore.SHStrDupW
diff --git a/tools/make_specfiles b/tools/make_specfiles
index aad0771..65b5757 100755
index 611aaca..56a4670 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -238,6 +238,10 @@ my @dll_groups =
@@ -243,6 +243,10 @@ my @dll_groups =
"shcore",
],
[
@ -53,8 +53,8 @@ index aad0771..65b5757 100755
+ ],
+ [
"user32",
"api-ms-win-core-stringansi-l1-1-0",
"api-ms-win-core-string-l2-1-0",
"api-ms-win-downlevel-user32-l1-1-0",
--
2.9.0

View File

@ -1,4 +1,4 @@
From 8f69de845627cae36a5831e684db1a649b94ebdd Mon Sep 17 00:00:00 2001
From 116f061509b35ca571b5a7b19477d82c94437502 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 21 Jan 2016 00:52:33 +0100
Subject: api-ms-win-core-shlwapi-obsolete-l1-2-0: Add dll.
@ -13,7 +13,7 @@ Subject: api-ms-win-core-shlwapi-obsolete-l1-2-0: Add dll.
create mode 100644 dlls/api-ms-win-core-shlwapi-obsolete-l1-2-0/api-ms-win-core-shlwapi-obsolete-l1-2-0.spec
diff --git a/configure.ac b/configure.ac
index fcffde7..a038474 100644
index b7361d1..1ceda28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2716,6 +2716,7 @@ WINE_CONFIG_DLL(api-ms-win-core-rtlsupport-l1-1-0)
@ -21,9 +21,9 @@ index fcffde7..a038474 100644
WINE_CONFIG_DLL(api-ms-win-core-shlwapi-legacy-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-shlwapi-obsolete-l1-1-0)
+WINE_CONFIG_DLL(api-ms-win-core-shlwapi-obsolete-l1-2-0)
WINE_CONFIG_DLL(api-ms-win-core-sidebyside-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-string-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-string-l2-1-0)
WINE_CONFIG_DLL(api-ms-win-core-string-obsolete-l1-1-0)
diff --git a/dlls/api-ms-win-core-shlwapi-obsolete-l1-2-0/Makefile.in b/dlls/api-ms-win-core-shlwapi-obsolete-l1-2-0/Makefile.in
new file mode 100644
index 0000000..3f39b0b
@ -97,10 +97,10 @@ index 0000000..8b8b520
+@ stdcall StrTrimA(str str) shlwapi.StrTrimA
+@ stdcall StrTrimW(wstr wstr) shlwapi.StrTrimW
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 3a5b0b4..60ee2d3 100755
index 8b202da..0f58756 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -234,6 +234,7 @@ my @dll_groups =
@@ -235,6 +235,7 @@ my @dll_groups =
"api-ms-win-core-registryuserspecific-l1-1-0",
"api-ms-win-core-shlwapi-legacy-l1-1-0",
"api-ms-win-core-shlwapi-obsolete-l1-1-0",

View File

@ -1,40 +0,0 @@
From df5c81e67b4f660770f98db3dab2d8cb62329975 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sat, 19 Mar 2016 15:47:10 +0800
Subject: gdiplus: Implement GdipCreateMetafileFromStream.
---
dlls/gdiplus/metafile.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index 922c101..ea9badc 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -1139,8 +1139,21 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR *file,
GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream,
GpMetafile **metafile)
{
- FIXME("(%p, %p): stub\n", stream, metafile);
- return NotImplemented;
+ GpStatus stat;
+
+ TRACE("%p %p\n", stream, metafile);
+
+ stat = GdipLoadImageFromStream(stream, (GpImage **)metafile);
+ if (stat != Ok) return stat;
+
+ if ((*metafile)->image.type != ImageTypeMetafile)
+ {
+ GdipDisposeImage(&(*metafile)->image);
+ *metafile = NULL;
+ return GenericError;
+ }
+
+ return Ok;
}
GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metafile,
--
2.7.1

View File

@ -1,102 +0,0 @@
From 38a7a77a067d4610666ca453f4ca68a69117e80e Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 10 May 2016 12:44:49 +0800
Subject: gdiplus: Implement GdipGetMetafileHeaderFromMetafile.
For bug #27415.
These patches depend on
"gdiplus: Reimplement metafile loading using gdi32 instead of IPicture. (v2)"
---
dlls/gdiplus/metafile.c | 15 +++++++++++----
dlls/gdiplus/tests/image.c | 24 ++++++++++++------------
2 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index 7af6c8c..30b2122 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -957,17 +957,24 @@ GpStatus WINGDIPAPI GdipEnumerateMetafileDestPointI(GpGraphics *graphics,
GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile * metafile,
MetafileHeader * header)
{
- static int calls;
+ GpStatus status;
TRACE("(%p, %p)\n", metafile, header);
if(!metafile || !header)
return InvalidParameter;
- if(!(calls++))
- FIXME("not implemented\n");
+ if (!metafile->hemf)
+ return InvalidParameter;
- memset(header, 0, sizeof(MetafileHeader));
+ status = GdipGetMetafileHeaderFromEmf(metafile->hemf, header);
+ if (status != Ok) return status;
+
+ header->Type = metafile->metafile_type;
+ header->DpiX = metafile->image.xres;
+ header->DpiY = metafile->image.yres;
+ header->Width = metafile->bounds.Width;
+ header->Height = metafile->bounds.Height;
return Ok;
}
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index e6de9db..a28ddb4 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -1465,17 +1465,17 @@ static void test_loadwmf(void)
expect(Ok, stat);
if (stat == Ok)
{
- todo_wine expect(MetafileTypeWmfPlaceable, header.Type);
+ expect(MetafileTypeWmfPlaceable, header.Type);
todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size);
todo_wine expect(0x300, header.Version);
expect(0, header.EmfPlusFlags);
- todo_wine expectf(1440.0, header.DpiX);
- todo_wine expectf(1440.0, header.DpiY);
+ expectf(1440.0, header.DpiX);
+ expectf(1440.0, header.DpiY);
expect(0, header.X);
expect(0, header.Y);
- todo_wine expect(320, header.Width);
- todo_wine expect(320, header.Height);
- todo_wine expect(1, U(header).WmfHeader.mtType);
+ expect(320, header.Width);
+ expect(320, header.Height);
+ expect(1, U(header).WmfHeader.mtType);
expect(0, header.EmfPlusHeaderSize);
expect(0, header.LogicalDpiX);
expect(0, header.LogicalDpiY);
@@ -1523,17 +1523,17 @@ static void test_createfromwmf(void)
expect(Ok, stat);
if (stat == Ok)
{
- todo_wine expect(MetafileTypeWmfPlaceable, header.Type);
+ expect(MetafileTypeWmfPlaceable, header.Type);
todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size);
todo_wine expect(0x300, header.Version);
expect(0, header.EmfPlusFlags);
- todo_wine expectf(1440.0, header.DpiX);
- todo_wine expectf(1440.0, header.DpiY);
+ expectf(1440.0, header.DpiX);
+ expectf(1440.0, header.DpiY);
expect(0, header.X);
expect(0, header.Y);
- todo_wine expect(320, header.Width);
- todo_wine expect(320, header.Height);
- todo_wine expect(1, U(header).WmfHeader.mtType);
+ expect(320, header.Width);
+ expect(320, header.Height);
+ expect(1, U(header).WmfHeader.mtType);
expect(0, header.EmfPlusHeaderSize);
expect(0, header.LogicalDpiX);
expect(0, header.LogicalDpiY);
--
2.8.0

View File

@ -1,41 +0,0 @@
From 0bfed12f7c720bc7a929bd8c8b249b47b949aeb3 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 22 Jun 2016 16:19:59 +0800
Subject: gdiplus: Implement GdipCreateMetafileFromFile.
---
dlls/gdiplus/metafile.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c
index 6b9ee73..a3933b0 100644
--- a/dlls/gdiplus/metafile.c
+++ b/dlls/gdiplus/metafile.c
@@ -1227,8 +1227,22 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR *file,
GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR *file,
GpMetafile **metafile)
{
- FIXME("(%p, %p): stub\n", file, metafile);
- return NotImplemented;
+ GpStatus status;
+ IStream *stream;
+
+ TRACE("(%p, %p)\n", file, metafile);
+
+ if (!file || !metafile) return InvalidParameter;
+
+ *metafile = NULL;
+
+ status = GdipCreateStreamOnFile(file, GENERIC_READ, &stream);
+ if (status == Ok)
+ {
+ status = GdipCreateMetafileFromStream(stream, metafile);
+ IStream_Release(stream);
+ }
+ return status;
}
GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream,
--
2.8.0

View File

@ -1,2 +0,0 @@
Fixes: [40325] Implement GdipCreateMetafileFromStream
Fixes: [27415] Implement GdipGetMetafileHeaderFromMetafile

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "4bfefc5c7132023ee40d70572b677ae0e441df38"
echo "c1bc25dd38dab0504bd9eb45641a830ff08488b3"
}
# Show version information
@ -3875,27 +3875,17 @@ fi
# Patchset gdiplus-GdipCreateMetafileFromStream
# |
# | This patchset fixes the following Wine bugs:
# | * [#40325] Implement GdipCreateMetafileFromStream
# | * [#27415] Implement GdipGetMetafileHeaderFromMetafile
# |
# | Modified files:
# | * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/metafile.c, dlls/gdiplus/tests/image.c
# | * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/metafile.c
# |
if test "$enable_gdiplus_GdipCreateMetafileFromStream" -eq 1; then
patch_apply gdiplus-GdipCreateMetafileFromStream/0001-gdiplus-Implement-GdipCreateMetafileFromStream.patch
patch_apply gdiplus-GdipCreateMetafileFromStream/0002-gdiplus-Implement-GdipGetMetafileHeaderFromMetafile.patch
patch_apply gdiplus-GdipCreateMetafileFromStream/0003-gdiplus-Implement-GdipGetMetafileHeaderFromWmf.patch
patch_apply gdiplus-GdipCreateMetafileFromStream/0004-gdiplus-Implement-GdipGetMetafileHeaderFromStream.patch
patch_apply gdiplus-GdipCreateMetafileFromStream/0005-gdiplus-Implement-GdipGetMetafileHeaderFromFile.patch
patch_apply gdiplus-GdipCreateMetafileFromStream/0006-gdiplus-Implement-GdipCreateMetafileFromFile.patch
(
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipCreateMetafileFromStream.", 1 },';
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipGetMetafileHeaderFromMetafile.", 1 },';
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipGetMetafileHeaderFromWmf.", 1 },';
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipGetMetafileHeaderFromStream.", 1 },';
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipGetMetafileHeaderFromFile.", 1 },';
echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipCreateMetafileFromFile.", 1 },';
) >> "$patchlist"
fi