summaryrefslogtreecommitdiffstats
path: root/main/abiword/abiword-png15.patch
blob: b17bb85bff570e473a6825352cbdfc664dfed040 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
diff -Naur abiword-vanilla//src/af/util/xp/ut_png.cpp abiword-2.8.6//src/af/util/xp/ut_png.cpp
--- abiword-vanilla//src/af/util/xp/ut_png.cpp	2008-02-24 04:33:07.000000000 +0100
+++ abiword-2.8.6//src/af/util/xp/ut_png.cpp	2011-02-24 11:53:18.954524499 +0100
@@ -71,7 +71,7 @@
 	 * the normal method of doing things with libpng).  REQUIRED unless you
 	 * set up your own error handlers in the png_create_read_struct() earlier.
 	 */
-	if (setjmp(png_ptr->jmpbuf))
+	if (setjmp(png_jmpbuf(png_ptr)))
 	{
 		/* Free all of the memory associated with the png_ptr and info_ptr */
 		png_destroy_read_struct(&png_ptr, &info_ptr, static_cast<png_infopp>(NULL));
diff -Naur abiword-vanilla//src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp abiword-2.8.6//src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp
--- abiword-vanilla//src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp	2009-07-01 06:02:04.000000000 +0200
+++ abiword-2.8.6//src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp	2011-02-24 11:53:19.039523946 +0100
@@ -185,7 +185,7 @@
 /** needed for the stejmp context */
 UT_Error IE_ImpGraphic_GdkPixbuf::_png_write(GdkPixbuf * pixbuf)
 {
-	if (setjmp(m_pPNG->jmpbuf))
+	if (setjmp(png_jmpbuf(m_pPNG)))
 	{
 		DELETEP(m_pPngBB);
 		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
@@ -446,7 +446,7 @@
 	 * the normal method of doing things with libpng).  REQUIRED unless you
 	 * set up your own error handlers in the png_create_read_struct() earlier.
 	 */
-	if (setjmp(m_pPNG->jmpbuf))
+	if (setjmp(png_jmpbuf(m_pPNG)))
 	{
 		/* Free all of the memory associated with the png_ptr and info_ptr */
 		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
--- abiword-vanilla/plugins/garble/xp/abiword-garble-png.cpp
+++ abiword-2.8.6/plugins/garble/xp/abiword-garble-png.cpp
@@ -79,7 +79,7 @@
 		png_set_strip_alpha( png_ptr );
 		png_set_interlace_handling( png_ptr );
 		png_set_bgr( png_ptr );
-		rowbytes = info_ptr->rowbytes;
+		rowbytes = png_get_rowbytes( png_ptr, info_ptr );
 		png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
 	}
 
--- abiword-vanilla/plugins/bmp/xp/ie_impGraphic_BMP.cpp
+++ abiword-2.8.6/plugins/bmp/xp/ie_impGraphic_BMP.cpp
@@ -191,7 +191,6 @@
 
 	/* Clean Up Memory Used */
 		
-	FREEP(m_pPNGInfo->palette);
 	DELETEP(pBB);
 	png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
    
@@ -313,7 +312,7 @@
 	 * the normal method of doing things with libpng).  REQUIRED unless you
 	 * set up your own error handlers in the png_create_read_struct() earlier.
 	 */
-	if (setjmp(m_pPNG->jmpbuf))
+	if (setjmp(png_jmpbuf(m_pPNG)))
 	{
 		/* Free all of the memory associated with the png_ptr and info_ptr */
 		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
@@ -332,7 +331,7 @@
 	UT_Error IE_ImpGraphic_BMP::Convert_BMP_Pallet(UT_ByteBuf* pBB)
 	{
 		/* Reset error handling for libpng */
-		if (setjmp(m_pPNG->jmpbuf))
+		if (setjmp(png_jmpbuf(m_pPNG)))
 		{
 			png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
 			return UT_ERROR;
@@ -372,7 +371,7 @@
 UT_Error IE_ImpGraphic_BMP::Convert_BMP(UT_ByteBuf* pBB)
 {
 	/* Reset error handling for libpng */
-	if (setjmp(m_pPNG->jmpbuf))
+	if (setjmp(png_jmpbuf(m_pPNG)))
 	{
 		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
 		return UT_ERROR;