summaryrefslogtreecommitdiff
path: root/graphics/kipi-plugins/patches/patch-aa
blob: 97c487345df3e5063745b8dda0971ff7837c126a (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
$NetBSD: patch-aa,v 1.7 2007/04/03 09:32:09 drochner Exp $

--- kipi-plugins/common/exiv2iface/exiv2iface.cpp.orig	2007-01-24 22:04:18.000000000 +0100
+++ kipi-plugins/common/exiv2iface/exiv2iface.cpp
@@ -61,6 +61,20 @@
 
 #include "exiv2iface.h"
 
+#if defined(__NetBSD__)
+#include <sys/param.h>
+#endif
+
+#if defined(__DragonFly__) || (defined(__NetBSD__) && __NetBSD_Version__ <= 399001700)
+static double trunc(double val)
+{
+	if (val > 0)
+		return floor(val);
+	else
+		return ceil(val);
+}
+#endif
+
 namespace KIPIPlugins
 {
 
@@ -97,7 +111,7 @@ bool Exiv2Iface::clearExif()
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot clear Exif data using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }    
 
@@ -114,7 +128,7 @@ bool Exiv2Iface::clearIptc()
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot clear Iptc data using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }    
 
@@ -153,7 +167,7 @@ QByteArray Exiv2Iface::getExif() const
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get Exif data using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }       
     
@@ -192,7 +206,7 @@ QByteArray Exiv2Iface::getIptc(bool addI
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get Iptc data using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }       
     
@@ -214,7 +228,7 @@ bool Exiv2Iface::setExif(const QByteArra
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif data using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
 
@@ -236,7 +250,7 @@ bool Exiv2Iface::setIptc(const QByteArra
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Iptc data using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }    
 
@@ -271,7 +285,7 @@ bool Exiv2Iface::load(const QString& fil
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot load metadata using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
         return false;
     }
@@ -329,7 +343,7 @@ bool Exiv2Iface::save(const QString& fil
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot save metadata using Exiv2 ("
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
         return false;
     }
@@ -362,7 +376,7 @@ bool Exiv2Iface::setImageProgramId(const
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Program identity into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -382,7 +396,7 @@ bool Exiv2Iface::setImageDimensions(cons
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set image dimensions using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -404,7 +418,7 @@ bool Exiv2Iface::setExifThumbnail(const 
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif Thumbnail using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -434,7 +448,7 @@ QString Exiv2Iface::getExifTagString(con
     {
         kdDebug() << "Cannot find Exif key '"
                   << exifTagName << "' into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -451,7 +465,7 @@ bool Exiv2Iface::setExifTagString(const 
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif tag string into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -481,7 +495,7 @@ QString Exiv2Iface::getIptcTagString(con
     {
         kdDebug() << "Cannot find Iptc key '"
                   << iptcTagName << "' into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -498,7 +512,7 @@ bool Exiv2Iface::setIptcTagString(const 
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Iptc tag string into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -522,7 +536,7 @@ bool Exiv2Iface::getExifTagLong(const ch
     {
         kdDebug() << "Cannot find Exif key '"
                   << exifTagName << "' into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -547,7 +561,7 @@ QByteArray Exiv2Iface::getExifTagData(co
     {
         kdDebug() << "Cannot find Exif key '"
                   << exifTagName << "' into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -572,7 +586,7 @@ QByteArray Exiv2Iface::getIptcTagData(co
     {
         kdDebug() << "Cannot find Iptc key '"
                   << iptcTagName << "' into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -597,7 +611,7 @@ bool Exiv2Iface::getExifTagRational(cons
     {
         kdDebug() << "Cannot find Exif Rational value from key '"
                   << exifTagName << "' into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -614,7 +628,7 @@ bool Exiv2Iface::setExifTagLong(const ch
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif tag long value into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -631,7 +645,7 @@ bool Exiv2Iface::setExifTagRational(cons
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif tag rational value into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -653,7 +667,7 @@ bool Exiv2Iface::removeExifTag(const cha
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot remove Exif tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -675,7 +689,7 @@ bool Exiv2Iface::removeIptcTag(const cha
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot remove Iptc tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -717,7 +731,7 @@ bool Exiv2Iface::setImagePreview(const Q
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get image preview using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -847,7 +861,7 @@ QDateTime Exiv2Iface::getImageDateTime()
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot parse Exif date & time tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -940,7 +954,7 @@ Exiv2Iface::ImageOrientation Exiv2Iface:
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot parse Exif Orientation tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -1007,7 +1021,7 @@ bool Exiv2Iface::setImageOrientation(Ima
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif Orientation tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1107,7 +1121,7 @@ bool Exiv2Iface::getGPSInfo(double& alti
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get Exif GPS tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1229,7 +1243,7 @@ bool Exiv2Iface::setGPSInfo(double altit
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif GPS tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1264,7 +1278,7 @@ bool Exiv2Iface::removeGPSInfo()
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot remove Exif GPS tag using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1357,7 +1371,7 @@ QStringList Exiv2Iface::getImageKeywords
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get IPTC Keywords from image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1407,7 +1421,7 @@ bool Exiv2Iface::setImageKeywords(const 
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set IPTC Keywords into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1440,7 +1454,7 @@ QStringList Exiv2Iface::getImageSubjects
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get IPTC Subjects from image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1490,7 +1504,7 @@ bool Exiv2Iface::setImageSubjects(const 
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set IPTC Subjects into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1523,7 +1537,7 @@ QStringList Exiv2Iface::getImageSubCateg
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot get IPTC Sub Categories from image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1573,7 +1587,7 @@ bool Exiv2Iface::setImageSubCategories(c
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set IPTC Sub Categories into image using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }        
     
@@ -1603,7 +1617,7 @@ QString Exiv2Iface::getExifComment() con
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot find Exif User Comment using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -1645,7 +1659,7 @@ bool Exiv2Iface::setExifComment(const QS
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot set Exif Comment using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }
 
@@ -1718,7 +1732,7 @@ QString Exiv2Iface::convertCommentValue(
     catch( Exiv2::Error &e )
     {
         kdDebug() << "Cannot convert Comment using Exiv2 (" 
-                  << QString::fromLocal8Bit(e.what().c_str())
+                  << QString::fromLocal8Bit(e.what())
                   << ")" << endl;
     }