summaryrefslogtreecommitdiffstats
path: root/redhat/applications/koffice/koffice-3.5.13-fix_gcc47_compilation.patch
blob: d632a9d799f670d3bc520c7f9db408c04937e957 (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
--- koffice/chalk/plugins/viewplugins/scripting/chalkcore/krs_iterator.h.ORI	2012-04-26 20:22:29.322777779 +0200
+++ koffice/chalk/plugins/viewplugins/scripting/chalkcore/krs_iterator.h	2012-04-26 20:23:21.216311169 +0200
@@ -137,12 +137,12 @@
             }
             initiales = initiales.upper();
             // set/get general
-            addFunction("set" + initiales, &Iterator::setPixel);
-            addFunction("get" + initiales, &Iterator::getPixel);
+            this->addFunction("set" + initiales, &Iterator::setPixel);
+            this->addFunction("get" + initiales, &Iterator::getPixel);
             kdDebug(41011) << ( "get" + initiales ) << endl;
             // Various colorSpace
-            addFunction("invertColor", &Iterator::invertColor);
-            addFunction("darken", &Iterator::darken);
+            this->addFunction("invertColor", &Iterator::invertColor);
+            this->addFunction("darken", &Iterator::darken);
         }
     
         ~Iterator()
--- koffice/filters/chalk/png/kis_png_converter.cc.gcc47	2012-04-26 16:38:35.805156927 -0400
+++ koffice/filters/chalk/png/kis_png_converter.cc	2012-04-26 16:49:27.179323394 -0400
@@ -43,6 +43,8 @@
 #include <kis_paint_layer.h>
 #include <kis_group_layer.h>
 
+#include <zlib.h>
+
 namespace {
 
     const TQ_UINT8 PIXEL_BLUE = 0;
@@ -222,6 +224,7 @@
     
     // Read image profile
     png_charp profile_name, profile_data;
+    unsigned char* uprofile_data = reinterpret_cast<unsigned char*>(profile_data);
     int compression_type;
     png_uint_32 proflen;
     int number_of_passes = 1;
@@ -230,7 +233,7 @@
         number_of_passes = png_set_interlace_handling(png_ptr);
 
     KisProfile* profile = 0;
-    if(png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &proflen))
+    if(png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &uprofile_data, &proflen))
     {
         TQByteArray profile_rawdata;
         // XXX: Hardcoded for icc type -- is that correct for us?
@@ -627,7 +630,7 @@
         } else { // Profile
             char* name = new char[(*it)->type().length()+1];
             strcpy(name, (*it)->type().ascii());
-            png_set_iCCP(png_ptr, info_ptr, name, PNG_COMPRESSION_TYPE_BASE, (char*)(*it)->annotation().data(), (*it) -> annotation() . size());
+            png_set_iCCP(png_ptr, info_ptr, name, PNG_COMPRESSION_TYPE_BASE, (unsigned char*)(*it)->annotation().data(), (*it) -> annotation() . size());
         }
         ++it;
     }