1diff --git a/3rdparty/liborigin/CMakeLists.txt b/3rdparty/liborigin/CMakeLists.txt
2index b5598c0..46a6802 100644
3--- a/3rdparty/liborigin/CMakeLists.txt
4+++ b/3rdparty/liborigin/CMakeLists.txt
5@@ -5,6 +5,9 @@ cmake_minimum_required(VERSION 2.8)
6 find_package(Boost REQUIRED)
7 include_directories(${Boost_INCLUDE_DIRS})
8
9+# disable logging
10+add_definitions( -DNO_CODE_GENERATION_FOR_LOG )
11+
12 # library version
13 set(LIBORIGIN_VERSION_MAJOR 2)
14 set(LIBORIGIN_VERSION_MINOR 0)
15diff --git a/3rdparty/liborigin/Origin610Parser.cpp b/3rdparty/liborigin/Origin610Parser.cpp
16index eb24861..3b34ead 100644
17--- a/3rdparty/liborigin/Origin610Parser.cpp
18+++ b/3rdparty/liborigin/Origin610Parser.cpp
19@@ -532,7 +532,7 @@ void Origin610Parser::readNotes()
20 		if(state == 0x04)
21 			notes.back().state = Window::Minimized;
22
23-		notes.back().hidden = (state & 0x40);
24+		notes.back().hidden = ((state & 0x40)!=0);
25
26 		file.seekg(1, ios_base::cur);
27 		file >> size;
28@@ -1354,7 +1354,7 @@ bool Origin610Parser::readGraphInfo()
29 				unsigned char h;
30 				file.seekg(24, ios_base::cur);
31 				file >> h;
32-				layer.colorScale.reverseOrder = h;
33+				layer.colorScale.reverseOrder = (h!=0);
34 				file.seekg(7, ios_base::cur);
35 				file >> layer.colorScale.colorBarThickness;
36 				file >> layer.colorScale.labelGap;
37@@ -1575,10 +1575,10 @@ bool Origin610Parser::readGraphInfo()
38 					}
39
40 					file >> h;
41-					curve.text.fontUnderline = (h & 0x1);
42-					curve.text.fontItalic = (h & 0x2);
43-					curve.text.fontBold = (h & 0x8);
44-					curve.text.whiteOut = (h & 0x20);
45+					curve.text.fontUnderline = ((h & 0x1)!=0);
46+					curve.text.fontItalic = ((h & 0x2)!=0);
47+					curve.text.fontBold = ((h & 0x8)!=0);
48+					curve.text.whiteOut = ((h & 0x20)!=0);
49
50 					char offset;
51 					file.seekg(LAYER + 0x37, ios_base::beg);
52@@ -1656,11 +1656,11 @@ bool Origin610Parser::readGraphInfo()
53 					file.seekg(LAYER + 0x92, ios_base::beg);
54 					file >> h;
55
56-					curve.pie.formatPercentages = (h & 0x01);
57-					curve.pie.formatValues		= (h & 0x02);
58-					curve.pie.positionAssociate = (h & 0x08);
59-					curve.pie.clockwiseRotation = (h & 0x20);
60-					curve.pie.formatCategories	= (h & 0x80);
61+					curve.pie.formatPercentages = ((h & 0x01)!=0);
62+					curve.pie.formatValues		= ((h & 0x02)!=0);
63+					curve.pie.positionAssociate = ((h & 0x08)!=0);
64+					curve.pie.clockwiseRotation = ((h & 0x20)!=0);
65+					curve.pie.formatCategories	= ((h & 0x80)!=0);
66
67 					file >> curve.pie.formatAutomatic;
68 					file >> curve.pie.distance;
69@@ -1697,7 +1697,7 @@ bool Origin610Parser::readGraphInfo()
70 					else
71 						curve.surface.grids = SurfaceProperties::XY;
72
73-					curve.surface.sideWallEnabled = (h & 0x10);
74+					curve.surface.sideWallEnabled = ((h & 0x10)!=0);
75 					file >> curve.surface.frontColor;
76
77 					file.seekg(LAYER + 0x14C, ios_base::beg);
78@@ -1707,28 +1707,28 @@ bool Origin610Parser::readGraphInfo()
79
80 					file.seekg(LAYER + 0x13, ios_base::beg);
81 					file >> h;
82-					curve.surface.backColorEnabled = (h & 0x08);
83+					curve.surface.backColorEnabled = ((h & 0x08)!=0);
84 					file.seekg(LAYER + 0x15A, ios_base::beg);
85 					file >> curve.surface.backColor;
86 					file >> curve.surface.xSideWallColor;
87 					file >> curve.surface.ySideWallColor;
88
89-					curve.surface.surface.fill = (h & 0x10);
90-					curve.surface.surface.contour = (h & 0x40);
91+					curve.surface.surface.fill = ((h & 0x10)!=0);
92+					curve.surface.surface.contour = ((h & 0x40)!=0);
93 					file.seekg(LAYER + 0x94, ios_base::beg);
94 					file >> w;
95 					curve.surface.surface.lineWidth = (double)w/500.0;
96 					file >> curve.surface.surface.lineColor;
97
98-					curve.surface.topContour.fill = (h & 0x02);
99-					curve.surface.topContour.contour = (h & 0x04);
100+					curve.surface.topContour.fill = ((h & 0x02)!=0);
101+					curve.surface.topContour.contour = ((h & 0x04)!=0);
102 					file.seekg(LAYER + 0xB4, ios_base::beg);
103 					file >> w;
104 					curve.surface.topContour.lineWidth = (double)w/500.0;
105 					file >> curve.surface.topContour.lineColor;
106
107-					curve.surface.bottomContour.fill = (h & 0x80);
108-					curve.surface.bottomContour.contour = (h & 0x01);
109+					curve.surface.bottomContour.fill = ((h & 0x80)!=0);
110+					curve.surface.bottomContour.contour = ((h & 0x01)!=0);
111 					file.seekg(LAYER + 0xA4, ios_base::beg);
112 					file >> w;
113 					curve.surface.bottomContour.lineWidth = (double)w/500.0;
114@@ -1739,7 +1739,7 @@ bool Origin610Parser::readGraphInfo()
115 					ColorMap& colorMap = (curve.type == GraphCurve::Mesh3D ? curve.surface.colorMap : curve.colorMap);
116 					file.seekg(LAYER + 0x13, ios_base::beg);
117 					file >> h;
118-					colorMap.fillEnabled = (h & 0x82);
119+					colorMap.fillEnabled = ((h & 0x82)!=0);
120
121 					if (curve.type == GraphCurve::Contour){
122 						file.seekg(102, ios_base::cur);
123@@ -1747,10 +1747,10 @@ bool Origin610Parser::readGraphInfo()
124
125 						file.seekg(7, ios_base::cur);
126 						file >> h;
127-						curve.text.fontUnderline = (h & 0x1);
128-						curve.text.fontItalic = (h & 0x2);
129-						curve.text.fontBold = (h & 0x8);
130-						curve.text.whiteOut = (h & 0x20);
131+						curve.text.fontUnderline = ((h & 0x1)!=0);
132+						curve.text.fontItalic = ((h & 0x2)!=0);
133+						curve.text.fontBold = ((h & 0x8)!=0);
134+						curve.text.whiteOut = ((h & 0x20)!=0);
135
136 						file.seekg(2, ios_base::cur);
137 						file >> curve.text.color;
138@@ -1793,7 +1793,7 @@ bool Origin610Parser::readGraphInfo()
139
140 				file.seekg(LAYER + 0x143, ios_base::beg);
141 				file >> h;
142-				curve.connectSymbols = (h&0x8);
143+				curve.connectSymbols = ((h&0x8)!=0);
144
145 				LAYER += size + 0x1;
146
147diff --git a/3rdparty/liborigin/Origin700Parser.cpp b/3rdparty/liborigin/Origin700Parser.cpp
148index 33627be..bb028d4 100644
149--- a/3rdparty/liborigin/Origin700Parser.cpp
150+++ b/3rdparty/liborigin/Origin700Parser.cpp
151@@ -777,7 +777,7 @@ void Origin700Parser::readGraphInfo()
152 			unsigned char h;
153 			file.seekg(LAYER + 0x57, ios_base::beg);
154 			file >> h;
155-			figure.useBorderColor = (h == 0x10);
156+			figure.useBorderColor = ((h == 0x10)!=0);
157
158 			//section_body_2_size
159 			LAYER += size + 0x1;
160@@ -940,7 +940,7 @@ void Origin700Parser::readGraphInfo()
161 				unsigned char h;
162 				file.seekg(24, ios_base::cur);
163 				file >> h;
164-				layer.colorScale.reverseOrder = h;
165+				layer.colorScale.reverseOrder = (h!=0);
166 				file.seekg(7, ios_base::cur);
167 				file >> layer.colorScale.colorBarThickness;
168 				file >> layer.colorScale.labelGap;
169@@ -1153,10 +1153,10 @@ void Origin700Parser::readGraphInfo()
170 					}
171
172 					file >> h;
173-					curve.text.fontUnderline = (h & 0x1);
174-					curve.text.fontItalic = (h & 0x2);
175-					curve.text.fontBold = (h & 0x8);
176-					curve.text.whiteOut = (h & 0x20);
177+					curve.text.fontUnderline = ((h & 0x1)!=0);
178+					curve.text.fontItalic = ((h & 0x2)!=0);
179+					curve.text.fontBold = ((h & 0x8)!=0);
180+					curve.text.whiteOut = ((h & 0x20)!=0);
181
182 					char offset;
183 					file.seekg(LAYER + 0x37, ios_base::beg);
184@@ -1234,11 +1234,11 @@ void Origin700Parser::readGraphInfo()
185 					file.seekg(LAYER + 0x92, ios_base::beg);
186 					file >> h;
187
188-					curve.pie.formatPercentages = (h & 0x01);
189-					curve.pie.formatValues		= (h & 0x02);
190-					curve.pie.positionAssociate = (h & 0x08);
191-					curve.pie.clockwiseRotation = (h & 0x20);
192-					curve.pie.formatCategories	= (h & 0x80);
193+					curve.pie.formatPercentages = ((h & 0x01)!=0);
194+					curve.pie.formatValues		= ((h & 0x02)!=0);
195+					curve.pie.positionAssociate = ((h & 0x08)!=0);
196+					curve.pie.clockwiseRotation = ((h & 0x20)!=0);
197+					curve.pie.formatCategories	= ((h & 0x80)!=0);
198
199 					file >> curve.pie.formatAutomatic;
200 					file >> curve.pie.distance;
201@@ -1275,7 +1275,7 @@ void Origin700Parser::readGraphInfo()
202 					else
203 						curve.surface.grids = SurfaceProperties::XY;
204
205-					curve.surface.sideWallEnabled = (h & 0x10);
206+					curve.surface.sideWallEnabled = ((h & 0x10)!=0);
207 					file >> curve.surface.frontColor;
208
209 					file.seekg(LAYER + 0x14C, ios_base::beg);
210@@ -1285,28 +1285,28 @@ void Origin700Parser::readGraphInfo()
211
212 					file.seekg(LAYER + 0x13, ios_base::beg);
213 					file >> h;
214-					curve.surface.backColorEnabled = (h & 0x08);
215+					curve.surface.backColorEnabled = ((h & 0x08)!=0);
216 					file.seekg(LAYER + 0x15A, ios_base::beg);
217 					file >> curve.surface.backColor;
218 					file >> curve.surface.xSideWallColor;
219 					file >> curve.surface.ySideWallColor;
220
221-					curve.surface.surface.fill = (h & 0x10);
222-					curve.surface.surface.contour = (h & 0x40);
223+					curve.surface.surface.fill = ((h & 0x10)!=0);
224+					curve.surface.surface.contour = ((h & 0x40)!=0);
225 					file.seekg(LAYER + 0x94, ios_base::beg);
226 					file >> w;
227 					curve.surface.surface.lineWidth = (double)w/500.0;
228 					file >> curve.surface.surface.lineColor;
229
230-					curve.surface.topContour.fill = (h & 0x02);
231-					curve.surface.topContour.contour = (h & 0x04);
232+					curve.surface.topContour.fill = ((h & 0x02)!=0);
233+					curve.surface.topContour.contour = ((h & 0x04)!=0);
234 					file.seekg(LAYER + 0xB4, ios_base::beg);
235 					file >> w;
236 					curve.surface.topContour.lineWidth = (double)w/500.0;
237 					file >> curve.surface.topContour.lineColor;
238
239-					curve.surface.bottomContour.fill = (h & 0x80);
240-					curve.surface.bottomContour.contour = (h & 0x01);
241+					curve.surface.bottomContour.fill = ((h & 0x80)!=0);
242+					curve.surface.bottomContour.contour = ((h & 0x01)!=0);
243 					file.seekg(LAYER + 0xA4, ios_base::beg);
244 					file >> w;
245 					curve.surface.bottomContour.lineWidth = (double)w/500.0;
246@@ -1317,7 +1317,7 @@ void Origin700Parser::readGraphInfo()
247 					ColorMap& colorMap = (curve.type == GraphCurve::Mesh3D ? curve.surface.colorMap : curve.colorMap);
248 					file.seekg(LAYER + 0x13, ios_base::beg);
249 					file >> h;
250-					colorMap.fillEnabled = (h & 0x82);
251+					colorMap.fillEnabled = ((h & 0x82)!=0);
252
253 					if (curve.type == GraphCurve::Contour){
254 						file.seekg(102, ios_base::cur);
255@@ -1325,10 +1325,10 @@ void Origin700Parser::readGraphInfo()
256
257 						file.seekg(7, ios_base::cur);
258 						file >> h;
259-						curve.text.fontUnderline = (h & 0x1);
260-						curve.text.fontItalic = (h & 0x2);
261-						curve.text.fontBold = (h & 0x8);
262-						curve.text.whiteOut = (h & 0x20);
263+						curve.text.fontUnderline = ((h & 0x1)!=0);
264+						curve.text.fontItalic = ((h & 0x2)!=0);
265+						curve.text.fontBold = ((h & 0x8)!=0);
266+						curve.text.whiteOut = ((h & 0x20)!=0);
267
268 						file.seekg(2, ios_base::cur);
269 						file >> curve.text.color;
270@@ -1371,7 +1371,7 @@ void Origin700Parser::readGraphInfo()
271
272 				file.seekg(LAYER + 0x143, ios_base::beg);
273 				file >> h;
274-				curve.connectSymbols = (h&0x8);
275+				curve.connectSymbols = ((h&0x8)!=0);
276
277 				LAYER += size + 0x1;
278
279diff --git a/3rdparty/liborigin/Origin750Parser.cpp b/3rdparty/liborigin/Origin750Parser.cpp
280index 8a2ae3b..2710d85 100644
281--- a/3rdparty/liborigin/Origin750Parser.cpp
282+++ b/3rdparty/liborigin/Origin750Parser.cpp
283@@ -533,7 +533,7 @@ bool Origin750Parser::parse()
284 			else
285 				notes.back().title = Window::Both;
286
287-			notes.back().hidden = (state & 0x40);
288+			notes.back().hidden = ((state & 0x40)!=0);
289
290 			++objectIndex;
291
292@@ -1370,7 +1370,7 @@ void Origin750Parser::readGraphInfo()
293 			unsigned char h;
294 			file.seekg(LAYER + 0x57, ios_base::beg);
295 			file >> h;
296-			figure.useBorderColor = (h == 0x10);
297+			figure.useBorderColor = ((h == 0x10)!=0);
298
299 			//section_body_2_size
300 			LAYER += size + 0x1;
301@@ -1535,7 +1535,7 @@ void Origin750Parser::readGraphInfo()
302 				unsigned char h;
303 				file.seekg(24, ios_base::cur);
304 				file >> h;
305-				layer.colorScale.reverseOrder = h;
306+				layer.colorScale.reverseOrder = (h!=0);
307 				file.seekg(7, ios_base::cur);
308 				file >> layer.colorScale.colorBarThickness;
309 				file >> layer.colorScale.labelGap;
310@@ -1747,10 +1747,10 @@ void Origin750Parser::readGraphInfo()
311 					}
312
313 					file >> h;
314-					curve.text.fontUnderline = (h & 0x1);
315-					curve.text.fontItalic = (h & 0x2);
316-					curve.text.fontBold = (h & 0x8);
317-					curve.text.whiteOut = (h & 0x20);
318+					curve.text.fontUnderline = ((h & 0x1)!=0);
319+					curve.text.fontItalic = ((h & 0x2)!=0);
320+					curve.text.fontBold = ((h & 0x8)!=0);
321+					curve.text.whiteOut = ((h & 0x20)!=0);
322
323 					char offset;
324 					file.seekg(LAYER + 0x37, ios_base::beg);
325@@ -1828,11 +1828,11 @@ void Origin750Parser::readGraphInfo()
326 					file.seekg(LAYER + 0x92, ios_base::beg);
327 					file >> h;
328
329-					curve.pie.formatPercentages = (h & 0x01);
330-					curve.pie.formatValues		= (h & 0x02);
331-					curve.pie.positionAssociate = (h & 0x08);
332-					curve.pie.clockwiseRotation = (h & 0x20);
333-					curve.pie.formatCategories	= (h & 0x80);
334+					curve.pie.formatPercentages = ((h & 0x01)!=0);
335+					curve.pie.formatValues		= ((h & 0x02)!=0);
336+					curve.pie.positionAssociate = ((h & 0x08)!=0);
337+					curve.pie.clockwiseRotation = ((h & 0x20)!=0);
338+					curve.pie.formatCategories	= ((h & 0x80)!=0);
339
340 					file >> curve.pie.formatAutomatic;
341 					file >> curve.pie.distance;
342@@ -1869,7 +1869,7 @@ void Origin750Parser::readGraphInfo()
343 					else
344 						curve.surface.grids = SurfaceProperties::XY;
345
346-					curve.surface.sideWallEnabled = (h & 0x10);
347+					curve.surface.sideWallEnabled = ((h & 0x10)!=0);
348 					file >> curve.surface.frontColor;
349
350 					file.seekg(LAYER + 0x14C, ios_base::beg);
351@@ -1879,28 +1879,28 @@ void Origin750Parser::readGraphInfo()
352
353 					file.seekg(LAYER + 0x13, ios_base::beg);
354 					file >> h;
355-					curve.surface.backColorEnabled = (h & 0x08);
356+					curve.surface.backColorEnabled = ((h & 0x08)!=0);
357 					file.seekg(LAYER + 0x15A, ios_base::beg);
358 					file >> curve.surface.backColor;
359 					file >> curve.surface.xSideWallColor;
360 					file >> curve.surface.ySideWallColor;
361
362-					curve.surface.surface.fill = (h & 0x10);
363-					curve.surface.surface.contour = (h & 0x40);
364+					curve.surface.surface.fill = ((h & 0x10)!=0);
365+					curve.surface.surface.contour = ((h & 0x40)!=0);
366 					file.seekg(LAYER + 0x94, ios_base::beg);
367 					file >> w;
368 					curve.surface.surface.lineWidth = (double)w/500.0;
369 					file >> curve.surface.surface.lineColor;
370
371-					curve.surface.topContour.fill = (h & 0x02);
372-					curve.surface.topContour.contour = (h & 0x04);
373+					curve.surface.topContour.fill = ((h & 0x02)!=0);
374+					curve.surface.topContour.contour = ((h & 0x04)!=0);
375 					file.seekg(LAYER + 0xB4, ios_base::beg);
376 					file >> w;
377 					curve.surface.topContour.lineWidth = (double)w/500.0;
378 					file >> curve.surface.topContour.lineColor;
379
380-					curve.surface.bottomContour.fill = (h & 0x80);
381-					curve.surface.bottomContour.contour = (h & 0x01);
382+					curve.surface.bottomContour.fill = ((h & 0x80)!=0);
383+					curve.surface.bottomContour.contour = ((h & 0x01)!=0);
384 					file.seekg(LAYER + 0xA4, ios_base::beg);
385 					file >> w;
386 					curve.surface.bottomContour.lineWidth = (double)w/500.0;
387@@ -1911,7 +1911,7 @@ void Origin750Parser::readGraphInfo()
388 					ColorMap& colorMap = (curve.type == GraphCurve::Mesh3D ? curve.surface.colorMap : curve.colorMap);
389 					file.seekg(LAYER + 0x13, ios_base::beg);
390 					file >> h;
391-					colorMap.fillEnabled = (h & 0x82);
392+					colorMap.fillEnabled = ((h & 0x82)!=0);
393
394 					if (curve.type == GraphCurve::Contour){
395 						file.seekg(102, ios_base::cur);
396@@ -1919,10 +1919,10 @@ void Origin750Parser::readGraphInfo()
397
398 						file.seekg(7, ios_base::cur);
399 						file >> h;
400-						curve.text.fontUnderline = (h & 0x1);
401-						curve.text.fontItalic = (h & 0x2);
402-						curve.text.fontBold = (h & 0x8);
403-						curve.text.whiteOut = (h & 0x20);
404+						curve.text.fontUnderline = ((h & 0x1)!=0);
405+						curve.text.fontItalic = ((h & 0x2)!=0);
406+						curve.text.fontBold = ((h & 0x8)!=0);
407+						curve.text.whiteOut = ((h & 0x20)!=0);
408
409 						file.seekg(2, ios_base::cur);
410 						file >> curve.text.color;
411@@ -1964,7 +1964,7 @@ void Origin750Parser::readGraphInfo()
412
413 				file.seekg(LAYER + 0x143, ios_base::beg);
414 				file >> h;
415-				curve.connectSymbols = (h&0x8);
416+				curve.connectSymbols = ((h&0x8)!=0);
417
418 				LAYER += 0x1E7 + 0x1;
419
420@@ -2110,7 +2110,7 @@ void Origin750Parser::readGraphAxisFormatInfo(GraphAxisFormat& format)
421
422 	format.minorTicksType = (h>>6);
423 	format.majorTicksType = ((h>>4) & 3);
424-	format.axisPosition = (h & 0x0F);
425+	format.axisPosition = ((h & 0x0F)!=0);
426 	switch(format.axisPosition) // need for testing
427 	{
428 	case 1:
429@@ -2148,7 +2148,7 @@ void Origin750Parser::readGraphAxisTickLabelsInfo(GraphAxisTick& tick)
430
431 	file.seekg(POS + 0x1A, ios_base::beg);
432 	file >> h;
433-	tick.fontBold = (h & 0x08);
434+	tick.fontBold = ((h & 0x08)!=0);
435
436 	file.seekg(POS + 0x23, ios_base::beg);
437 	file >> w;
438@@ -2366,7 +2366,7 @@ void Origin750Parser::readWindowProperties(Window& window, unsigned int size)
439 	else
440 		window.title = Window::Both;
441
442-	window.hidden = (c & 0x08);
443+	window.hidden = ((c & 0x08)!=0);
444 	if(window.hidden)
445 	{
446 		LOG_PRINT(logfile, "			WINDOW %d NAME : %s	is hidden\n", objectIndex, window.name.c_str())
447@@ -2433,7 +2433,7 @@ void Origin750Parser::readColorMap(ColorMap& colorMap)
448
449 		file.seekg(0x02, ios_base::cur);
450 		file >> h;
451-		level.labelVisible = (h & 0x1);
452+		level.labelVisible = ((h & 0x1)!=0);
453 		level.lineVisible = !(h & 0x2);
454
455 		file.seekg(0x0D, ios_base::cur);
456diff --git a/3rdparty/liborigin/Origin800Parser.cpp b/3rdparty/liborigin/Origin800Parser.cpp
457index c511638..b898ff9 100644
458--- a/3rdparty/liborigin/Origin800Parser.cpp
459+++ b/3rdparty/liborigin/Origin800Parser.cpp
460@@ -544,7 +544,7 @@ void Origin800Parser::readNotes()
461 		else if(state == 0x0b)
462 			notes.back().state = Window::Maximized;
463
464-		notes.back().hidden = (state & 0x40);
465+		notes.back().hidden = ((state & 0x40)!=0);
466
467 		file.seekg(1, ios_base::cur);
468 		file >> size;
469@@ -1452,7 +1452,7 @@ void Origin800Parser::readGraphInfo()
470 				unsigned char h;
471 				file.seekg(24, ios_base::cur);
472 				file >> h;
473-				layer.colorScale.reverseOrder = h;
474+				layer.colorScale.reverseOrder = (h!=0);
475 				file.seekg(7, ios_base::cur);
476 				file >> layer.colorScale.colorBarThickness;
477 				file >> layer.colorScale.labelGap;
478@@ -1663,10 +1663,10 @@ void Origin800Parser::readGraphInfo()
479 					}
480
481 					file >> h;
482-					curve.text.fontUnderline = (h & 0x1);
483-					curve.text.fontItalic = (h & 0x2);
484-					curve.text.fontBold = (h & 0x8);
485-					curve.text.whiteOut = (h & 0x20);
486+					curve.text.fontUnderline = ((h & 0x1)!=0);
487+					curve.text.fontItalic = ((h & 0x2)!=0);
488+					curve.text.fontBold = ((h & 0x8)!=0);
489+					curve.text.whiteOut = ((h & 0x20)!=0);
490
491 					char offset;
492 					file.seekg(LAYER + 0x37, ios_base::beg);
493@@ -1744,11 +1744,11 @@ void Origin800Parser::readGraphInfo()
494 					file.seekg(LAYER + 0x92, ios_base::beg);
495 					file >> h;
496
497-					curve.pie.formatPercentages = (h & 0x01);
498-					curve.pie.formatValues		= (h & 0x02);
499-					curve.pie.positionAssociate = (h & 0x08);
500-					curve.pie.clockwiseRotation = (h & 0x20);
501-					curve.pie.formatCategories	= (h & 0x80);
502+					curve.pie.formatPercentages = ((h & 0x01)!=0);
503+					curve.pie.formatValues		= ((h & 0x02)!=0);
504+					curve.pie.positionAssociate = ((h & 0x08)!=0);
505+					curve.pie.clockwiseRotation = ((h & 0x20)!=0);
506+					curve.pie.formatCategories	= ((h & 0x80)!=0);
507
508 					file >> curve.pie.formatAutomatic;
509 					file >> curve.pie.distance;
510@@ -1785,7 +1785,7 @@ void Origin800Parser::readGraphInfo()
511 					else
512 						curve.surface.grids = SurfaceProperties::XY;
513
514-					curve.surface.sideWallEnabled = (h & 0x10);
515+					curve.surface.sideWallEnabled = ((h & 0x10)!=0);
516 					file >> curve.surface.frontColor;
517
518 					file.seekg(LAYER + 0x14C, ios_base::beg);
519@@ -1795,28 +1795,28 @@ void Origin800Parser::readGraphInfo()
520
521 					file.seekg(LAYER + 0x13, ios_base::beg);
522 					file >> h;
523-					curve.surface.backColorEnabled = (h & 0x08);
524+					curve.surface.backColorEnabled = ((h & 0x08)!=0);
525 					file.seekg(LAYER + 0x15A, ios_base::beg);
526 					file >> curve.surface.backColor;
527 					file >> curve.surface.xSideWallColor;
528 					file >> curve.surface.ySideWallColor;
529
530-					curve.surface.surface.fill = (h & 0x10);
531-					curve.surface.surface.contour = (h & 0x40);
532+					curve.surface.surface.fill = ((h & 0x10)!=0);
533+					curve.surface.surface.contour = ((h & 0x40)!=0);
534 					file.seekg(LAYER + 0x94, ios_base::beg);
535 					file >> w;
536 					curve.surface.surface.lineWidth = (double)w/500.0;
537 					file >> curve.surface.surface.lineColor;
538
539-					curve.surface.topContour.fill = (h & 0x02);
540-					curve.surface.topContour.contour = (h & 0x04);
541+					curve.surface.topContour.fill = ((h & 0x02)!=0);
542+					curve.surface.topContour.contour = ((h & 0x04)!=0);
543 					file.seekg(LAYER + 0xB4, ios_base::beg);
544 					file >> w;
545 					curve.surface.topContour.lineWidth = (double)w/500.0;
546 					file >> curve.surface.topContour.lineColor;
547
548-					curve.surface.bottomContour.fill = (h & 0x80);
549-					curve.surface.bottomContour.contour = (h & 0x01);
550+					curve.surface.bottomContour.fill = ((h & 0x80)!=0);
551+					curve.surface.bottomContour.contour = ((h & 0x01)!=0);
552 					file.seekg(LAYER + 0xA4, ios_base::beg);
553 					file >> w;
554 					curve.surface.bottomContour.lineWidth = (double)w/500.0;
555@@ -1827,7 +1827,7 @@ void Origin800Parser::readGraphInfo()
556 					ColorMap& colorMap = (curve.type == GraphCurve::Mesh3D ? curve.surface.colorMap : curve.colorMap);
557 					file.seekg(LAYER + 0x13, ios_base::beg);
558 					file >> h;
559-					colorMap.fillEnabled = (h & 0x82);
560+					colorMap.fillEnabled = ((h & 0x82)!=0);
561
562 					if (curve.type == GraphCurve::Contour){
563 						file.seekg(102, ios_base::cur);
564@@ -1835,10 +1835,10 @@ void Origin800Parser::readGraphInfo()
565
566 						file.seekg(7, ios_base::cur);
567 						file >> h;
568-						curve.text.fontUnderline = (h & 0x1);
569-						curve.text.fontItalic = (h & 0x2);
570-						curve.text.fontBold = (h & 0x8);
571-						curve.text.whiteOut = (h & 0x20);
572+						curve.text.fontUnderline = ((h & 0x1)!=0);
573+						curve.text.fontItalic = ((h & 0x2)!=0);
574+						curve.text.fontBold = ((h & 0x8)!=0);
575+						curve.text.whiteOut = ((h & 0x20)!=0);
576
577 						file.seekg(2, ios_base::cur);
578 						file >> curve.text.color;
579@@ -1882,7 +1882,7 @@ void Origin800Parser::readGraphInfo()
580
581 				file.seekg(LAYER + 0x143, ios_base::beg);
582 				file >> h;
583-				curve.connectSymbols = (h&0x8);
584+				curve.connectSymbols = ((h&0x8)!=0);
585
586 				LAYER += size + 0x1;
587
588diff --git a/3rdparty/liborigin/OriginParser.h b/3rdparty/liborigin/OriginParser.h
589index dc129da..fbce6df 100644
590--- a/3rdparty/liborigin/OriginParser.h
591+++ b/3rdparty/liborigin/OriginParser.h
592@@ -32,6 +32,17 @@
593 #include "OriginObj.h"
594 #include "tree.hh"
595
596+#ifdef _MSC_VER
597+#ifndef NO_CODE_GENERATION_FOR_LOG
598+#define LOG_PRINT( logfile, ... ) \
599+{                                 \
600+    int ioret= fprintf(logfile, __VA_ARGS__); \
601+    assert(ioret>0);              \
602+}
603+#else // !NO_CODE_GENERATION_FOR_LOG
604+#define LOG_PRINT( logfile, ... ) {};
605+#endif // NO_CODE_GENERATION_FOR_LOG
606+#else // !_MSC_VER
607 #ifndef NO_CODE_GENERATION_FOR_LOG
608 #define LOG_PRINT( logfile, args... ) \
609 {                                     \
610@@ -41,6 +52,7 @@
611 #else // !NO_CODE_GENERATION_FOR_LOG
612 #define LOG_PRINT( logfile, args... ) {};
613 #endif // NO_CODE_GENERATION_FOR_LOG
614+#endif // _MSC_VER
615
616 class OriginParser
617 {
618diff --git a/3rdparty/liborigin/opj2dat.cpp b/3rdparty/liborigin/opj2dat.cpp
619index 1745624..63a17bc 100644
620--- a/3rdparty/liborigin/opj2dat.cpp
621+++ b/3rdparty/liborigin/opj2dat.cpp
622@@ -30,6 +30,7 @@
623 #include <cstdio>
624 #include <cmath>
625 #include <cstring>
626+#include <sstream>
627 #include <string.h>
628
629 int main(int argc, char *argv[]) {
630@@ -66,16 +67,12 @@ int main(int argc, char *argv[]) {
631 				j+1,column.name.c_str(),column.type,spread.maxRows);
632 		}
633 		FILE *out;
634-		char * filename;
635-		int ioret;
636-#ifndef WIN32
637-		ioret=asprintf(&filename,"%s.%d.dat",argv[1],s+1);
638-#else
639-		ioret=asprintf(&filename,"%s.%d.dat",basename(argv[1]),s+1);
640-#endif
641-		printf("saved to %s\n",filename);
642-		if((out=fopen(filename,"w")) == NULL ) {
643-			printf("Could not open %s",filename);
644+		std::ostringstream os;
645+		os << argv[1] << "_" << s+1 << ".dat" ;
646+		printf("saved to %s\n",os.str().c_str());
647+
648+		if((out=fopen(os.str().c_str(),"w")) == NULL ) {
649+			printf("Could not open %s",os.str().c_str());
650 			return -1;
651 		}
652 		// header
653diff --git a/config.pri b/config.pri
654index f8f90ba..f180c62 100644
655--- a/config.pri
656+++ b/config.pri
657@@ -141,7 +141,7 @@ unix {# Linux / MacOS X
658 }
659
660 win32 {# Windows
661-	isEmpty(INSTALLBASE): INSTALLBASE = .
662+	isEmpty(INSTALLBASE): INSTALLBASE = ../output
663
664 	target.path = "$$INSTALLBASE"
665 	documentation.path = "$$INSTALLBASE"
666@@ -197,10 +197,12 @@ DEFINES  += ORIGIN_IMPORT
667 ################################################################################
668
669 # code for maintained branch of liborigin.
670+unix{
671 contains(DEFINES, ORIGIN_IMPORT) {
672   LIBS += ../3rdparty/liborigin/liborigin.a
673   INCLUDEPATH += ../3rdparty/liborigin
674 	}
675+}
676
677 contains(PRESET, default_installation) {
678 	### Link statically against Qwt and Qwtplot3D (in order to make sure they
679@@ -298,28 +300,34 @@ contains(PRESET, self_contained) {
680
681 win32: {
682 !mxe {
683-	### Static linking mostly, except Qt, Python and QwtPlot3D.
684-	### The latter seems to be impossible to link statically on Windows.
685+	### Static linking mostly, except Qt and Python
686
687-	isEmpty(LIBPATH): LIBPATH = ../3rdparty
688+	isEmpty(QMAKE_LIBDIR): QMAKE_LIBDIR = ../3rdparty
689
690-	INCLUDEPATH  += "$${LIBPATH}/qwt/src"
691-	LIBS         += "$${LIBPATH}/qwt/lib/libqwt.a"
692+	INCLUDEPATH  += "$${QMAKE_LIBDIR}/qwt/src"
693+	LIBS         += "$${QMAKE_LIBDIR}/qwt/lib/qwt.lib"
694
695-	INCLUDEPATH  += "$${LIBPATH}/qwtplot3d/include"
696-	LIBS         += "$${LIBPATH}/qwtplot3d/lib/qwtplot3d.dll"
697+	INCLUDEPATH  += "$${QMAKE_LIBDIR}/qwtplot3d/include"
698+	LIBS         += "$${QMAKE_LIBDIR}/qwtplot3d/lib/qwtplot3d.lib"
699
700-	INCLUDEPATH  += "$${LIBPATH}/muparser/include"
701-	LIBS         += "$${LIBPATH}/muparser/lib/libmuparser.a"
702+	INCLUDEPATH  += "$${QMAKE_LIBDIR}/muparser/include"
703+	LIBS         += "$${QMAKE_LIBDIR}/muparser/lib/muparser.lib"
704
705-	INCLUDEPATH  += "$${LIBPATH}/gsl/include"
706-	LIBS         += "$${LIBPATH}/gsl/lib/libgsl.a"
707-	LIBS         += "$${LIBPATH}/gsl/lib/libgslcblas.a"
708+	INCLUDEPATH  += "$${QMAKE_LIBDIR}/gsl/include"
709+	LIBS         += "$${QMAKE_LIBDIR}/gsl/lib/gsl.lib"
710+	LIBS         += "$${QMAKE_LIBDIR}/gsl/lib/gslcblas.lib"
711
712-#	contains(DEFINES, ORIGIN_IMPORT) {
713-#		LIBS += "$${LIBPATH}/liborigin/build/liborigin.a"
714-#		INCLUDEPATH += "$${LIBPATH}/liborigin" "$${LIBPATH}/liborigin/build"
715-#	}
716+	DEFINES += NOASSISTANT
717+
718+	INCLUDEPATH  += "$${QMAKE_LIBDIR}/zlib"
719+	LIBS         += "$${QMAKE_LIBDIR}/zlib/zlibstatic.lib"
720+
721+	contains(DEFINES, ORIGIN_IMPORT) {
722+		LIBS += "$${QMAKE_LIBDIR}/liborigin/build/origin.lib"
723+		INCLUDEPATH += "$${QMAKE_LIBDIR}/liborigin" "$${QMAKE_LIBDIR}/liborigin/build"
724+		INCLUDEPATH += "$${BOOST_ROOT}"
725+		DEFINES += NO_CODE_GENERATION_FOR_LOG
726+	}
727   }
728 }
729
730diff --git a/fitPlugins/exp_saturation/exp_saturation.pro b/fitPlugins/exp_saturation/exp_saturation.pro
731index 3bc34ef..db23e01 100644
732--- a/fitPlugins/exp_saturation/exp_saturation.pro
733+++ b/fitPlugins/exp_saturation/exp_saturation.pro
734@@ -12,8 +12,9 @@ INSTALLS += target
735 unix:  target.path = /usr/lib$${libsuff}/scidavis/plugins
736 win32: target.path = ../../output/plugins
737
738-win32:INCLUDEPATH += ../../3rdparty/gsl-1.8/include
739-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgsl.a
740+win32:INCLUDEPATH       += ../../3rdparty/gsl/include
741+win32:LIBS        += ../../3rdparty/gsl/lib/gsl.lib
742+win32:LIBS        += ../../3rdparty/gsl/lib/gslcblas.lib
743
744 unix:LIBS += -L/usr/lib$${libsuff} -lgsl -lgslcblas
745 #unix:LIBS         += /usr/lib/libgsl.a /usr/lib/libgslcblas.a
746diff --git a/fitPlugins/explin/explin.pro b/fitPlugins/explin/explin.pro
747index 1e2644e..778530d 100644
748--- a/fitPlugins/explin/explin.pro
749+++ b/fitPlugins/explin/explin.pro
750@@ -12,8 +12,9 @@ INSTALLS += target
751 unix:  target.path = /usr/lib$${libsuff}/scidavis/plugins
752 win32: target.path = ../../output/plugins
753
754-win32:INCLUDEPATH += ../../3rdparty/gsl-1.8/include
755-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgsl.a
756+win32:INCLUDEPATH       += ../../3rdparty/gsl/include
757+win32:LIBS        += ../../3rdparty/gsl/lib/gsl.lib
758+win32:LIBS        += ../../3rdparty/gsl/lib/gslcblas.lib
759
760 unix:LIBS += -L/usr/lib$${libsuff} -lgsl -lgslcblas
761 #unix:LIBS         += /usr/lib/libgsl.a /usr/lib/libgslcblas.a
762diff --git a/fitPlugins/fitRational0/fitRational0.pro b/fitPlugins/fitRational0/fitRational0.pro
763index 64a7513..3a9c62d 100644
764--- a/fitPlugins/fitRational0/fitRational0.pro
765+++ b/fitPlugins/fitRational0/fitRational0.pro
766@@ -18,9 +18,9 @@ INSTALLS += target
767 # To use this on Linux or Mac OS X, remove
768 # the "win32" and prepend '#' to the "LIBS"
769 # line in the dynamic linking section.
770-win32:INCLUDEPATH       += ../../3rdparty/gsl-1.8/include
771-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgsl.a
772-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgslcblas.a
773+win32:INCLUDEPATH       += ../../3rdparty/gsl/include
774+win32:LIBS        += ../../3rdparty/gsl/lib/gsl.lib
775+win32:LIBS        += ../../3rdparty/gsl/lib/gslcblas.lib
776
777 # Dynamically link against GSL installed system-wide.
778 # This is used as default on unix systems such as
779diff --git a/fitPlugins/fitRational1/fitRational1.pro b/fitPlugins/fitRational1/fitRational1.pro
780index 5e89e9a..1902535 100644
781--- a/fitPlugins/fitRational1/fitRational1.pro
782+++ b/fitPlugins/fitRational1/fitRational1.pro
783@@ -18,9 +18,9 @@ INSTALLS += target
784 # To use this on Linux or Mac OS X, remove
785 # the "win32" and prepend '#' to the "LIBS"
786 # line in the dynamic linking section.
787-win32:INCLUDEPATH       += ../../3rdparty/gsl-1.8/include
788-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgsl.a
789-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgslcblas.a
790+win32:INCLUDEPATH       += ../../3rdparty/gsl/include
791+win32:LIBS        += ../../3rdparty/gsl/lib/gsl.lib
792+win32:LIBS        += ../../3rdparty/gsl/lib/gslcblas.lib
793
794 # Dynamically link against GSL installed system-wide.
795 # This is used as default on unix systems such as
796diff --git a/fitPlugins/planck_wavelength/planck_wavelength.pro b/fitPlugins/planck_wavelength/planck_wavelength.pro
797index a8d50f8..3606106 100644
798--- a/fitPlugins/planck_wavelength/planck_wavelength.pro
799+++ b/fitPlugins/planck_wavelength/planck_wavelength.pro
800@@ -12,9 +12,9 @@ INSTALLS += target
801 unix:  target.path = /usr/lib$${libsuff}/scidavis/plugins
802 win32: target.path = ../../output/plugins
803
804-win32:INCLUDEPATH       += ../../3rdparty/gsl-1.8/include
805-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgsl.a
806-win32:LIBS        += ../../3rdparty/gsl-1.8/lib/libgslcblas.a
807+win32:INCLUDEPATH       += ../../3rdparty/gsl/include
808+win32:LIBS        += ../../3rdparty/gsl/lib/gsl.lib
809+win32:LIBS        += ../../3rdparty/gsl/lib/gslcblas.lib
810
811 unix:LIBS += -L/usr/lib$${libsuff} -lgsl -lgslcblas
812 #unix:LIBS         += /usr/lib/libgsl.a /usr/lib/libgslcblas.a
813diff --git a/output/scidavisScriptInstall.nsi b/output/scidavisScriptInstall.nsi
814index 1ef1177..f9af9b0 100644
815--- a/output/scidavisScriptInstall.nsi
816+++ b/output/scidavisScriptInstall.nsi
817@@ -28,14 +28,14 @@
818
819 ; HM NIS Edit Wizard helper defines
820 !define PRODUCT_NAME "SciDAVis"
821-!define PRODUCT_VERSION "1.D5"
822+!define PRODUCT_VERSION "1.D8"
823 !define PRODUCT_WEB_SITE "http://scidavis.sourceforge.net/"
824 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\scidavis.exe"
825 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
826 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
827 !define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
828-!define PYTHON_INSTALLER "python-2.7.6.msi"
829-!define PYTHON_URL "http://www.python.org/ftp/python/2.7.6/${PYTHON_INSTALLER}"
830+!define PYTHON_INSTALLER "python-2.7.9.msi"
831+!define PYTHON_URL "https://www.python.org/ftp/python/2.7.9/${PYTHON_INSTALLER}"
832
833 SetCompressor /SOLID lzma
834
835@@ -99,10 +99,10 @@ Section "SciDAVis" SEC01
836
837   File "CHANGES.txt"
838   File "gpl.txt"
839-  File "mingwm10.dll"
840-  File "libgcc_s_dw2-1.dll"
841+  ; File "mingwm10.dll"
842+  ; File "libgcc_s_dw2-1.dll"
843   File "Qt3Support4.dll"
844-  File "QtAssistantClient4.dll"
845+  ; File "QtAssistantClient4.dll"
846   File "QtCore4.dll"
847   File "QtGui4.dll"
848   File "QtNetwork4.dll"
849@@ -110,23 +110,24 @@ Section "SciDAVis" SEC01
850   File "QtSql4.dll"
851   File "QtSvg4.dll"
852   File "QtXml4.dll"
853-  File "qwtplot3d.dll"
854+  ; File "qwtplot3d.dll"
855   File "README.txt"
856   File "scidavis.ico"
857   File "scidavis.exe"
858   File "scidavisrc.py"
859   File "scidavisrc.pyc"
860   File "scidavisUtil.py"
861-  ;File "scidavisUtil.pyc"
862+  ; File "scidavisUtil.pyc"
863   File "assistant.exe"
864   File "sip.pyd"
865   File "python27.dll"
866-  File "zlib1.dll"
867+  ; File "zlib1.dll"
868   SetOutPath "$INSTDIR\plugins"
869   File "plugins\fitRational0.dll"
870   File "plugins\fitRational1.dll"
871   File "plugins\exp_saturation.dll"
872   File "plugins\explin.dll"
873+  File "plugins\planck_wavelength.dll"
874   SetOutPath "$INSTDIR\translations"
875   File "translations\scidavis_de.qm"
876   File "translations\scidavis_es.qm"
877@@ -141,7 +142,7 @@ Section "SciDAVis" SEC01
878   File "PyQt4\__init__.py"
879   File "PyQt4\__init__.pyc"
880   File "PyQt4\Qt.pyd"
881-  File "PyQt4\QtAssistant.pyd"
882+  ; File "PyQt4\QtAssistant.pyd"
883   File "PyQt4\QtCore.pyd"
884   File "PyQt4\QtDesigner.pyd"
885   File "PyQt4\QtGui.pyd"
886@@ -215,7 +216,7 @@ Section Uninstall
887   Delete "$INSTDIR\scidavis.exe"
888   Delete "$INSTDIR\scidavis.ico"
889   Delete "$INSTDIR\README.txt"
890-  Delete "$INSTDIR\qwtplot3d.dll"
891+  ; Delete "$INSTDIR\qwtplot3d.dll"
892   Delete "$INSTDIR\QtXml4.dll"
893   Delete "$INSTDIR\QtSvg4.dll"
894   Delete "$INSTDIR\QtSql4.dll"
895@@ -223,20 +224,21 @@ Section Uninstall
896   Delete "$INSTDIR\QtNetwork4.dll"
897   Delete "$INSTDIR\QtGui4.dll"
898   Delete "$INSTDIR\QtCore4.dll"
899-  Delete "$INSTDIR\QtAssistantClient4.dll"
900+  ; Delete "$INSTDIR\QtAssistantClient4.dll"
901   Delete "$INSTDIR\Qt3Support4.dll"
902-  Delete "$INSTDIR\mingwm10.dll"
903-  Delete "$INSTDIR\libgcc_s_dw2-1.dll"
904+  ; Delete "$INSTDIR\mingwm10.dll"
905+  ; Delete "$INSTDIR\libgcc_s_dw2-1.dll"
906   Delete "$INSTDIR\gpl.txt"
907   Delete "$INSTDIR\CHANGES.txt"
908   Delete "$INSTDIR\assistant.exe"
909   Delete "$INSTDIR\sip.pyd"
910   Delete "$INSTDIR\python27.dll"
911-  Delete "$INSTDIR\zlib1.dll"
912+  ; Delete "$INSTDIR\zlib1.dll"
913   Delete "$INSTDIR\plugins\fitRational1.dll"
914   Delete "$INSTDIR\plugins\fitRational0.dll"
915   Delete "$INSTDIR\plugins\exp_saturation.dll"
916   Delete "$INSTDIR\plugins\explin.dll"
917+  Delete "$INSTDIR\plugins\planck_wavelength.dll"
918   Delete "$INSTDIR\translations\scidavis_de.qm"
919   Delete "$INSTDIR\translations\scidavis_es.qm"
920   Delete "$INSTDIR\translations\scidavis_fr.qm"
921@@ -249,7 +251,7 @@ Section Uninstall
922   Delete "$INSTDIR\PyQt4\__init__.py"
923   Delete "$INSTDIR\PyQt4\__init__.pyc"
924   Delete "$INSTDIR\PyQt4\Qt.pyd"
925-  Delete "$INSTDIR\PyQt4\QtAssistant.pyd"
926+  ; Delete "$INSTDIR\PyQt4\QtAssistant.pyd"
927   Delete "$INSTDIR\PyQt4\QtCore.pyd"
928   Delete "$INSTDIR\PyQt4\QtDesigner.pyd"
929   Delete "$INSTDIR\PyQt4\QtGui.pyd"
930diff --git a/scidavis.pro b/scidavis.pro
931index fddc9ce..e368aef 100644
932--- a/scidavis.pro
933+++ b/scidavis.pro
934@@ -7,11 +7,14 @@
935 #################################################
936 TEMPLATE = subdirs
937
938-SUBDIRS = 3rdparty/liborigin scidavis test
939+# SUBDIRS = 3rdparty/liborigin scidavis test
940+SUBDIRS = scidavis
941 CONFIG+=ordered
942
943 # Overwrite the qmake generated Makefile by the cmake one
944+!win32 {
945 system("cd 3rdparty/liborigin; rm CMakeCache.txt; cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_FLAGS:STRING=-DNO_CODE_GENERATION_FOR_LOG .")
946+}
947
948 !mxe {
949 # optional fit plugins
950diff --git a/scidavis/basic.pri b/scidavis/basic.pri
951index c08d44b..b7b5b48 100644
952--- a/scidavis/basic.pri
953+++ b/scidavis/basic.pri
954@@ -64,10 +64,11 @@ contains( INSTALLS, translationfiles ){
955                              translations/scidavis_cs-alt.qm \
956
957         unix: tstarget.target = translations/scidavis_de.qm
958-        win32: tstarget.target = translations\scidavis_de.qm
959+        win32: tstarget.target = translations/scidavis_de.qm
960 # note the translation files are not writable during AEGIS
961 # integration, so we don't want to perform an update then
962-        tstarget.commands = (! test -w translations/scidavis_de.ts || $$LUPDATE_BIN scidavis.pro) && $$LRELEASE_BIN scidavis.pro
963+        unix: tstarget.commands = (! test -w translations/scidavis_de.ts || $$LUPDATE_BIN scidavis.pro) && $$LRELEASE_BIN scidavis.pro
964+        win32: tstarget.commands = $$LUPDATE_BIN scidavis.pro && $$LRELEASE_BIN scidavis.pro
965
966         QMAKE_EXTRA_TARGETS += tstarget
967         PRE_TARGETDEPS += translations/scidavis_de.qm
968diff --git a/scidavis/python-includepath.py b/scidavis/python-includepath.py
969index c76fa61..02ba7c9 100644
970--- a/scidavis/python-includepath.py
971+++ b/scidavis/python-includepath.py
972@@ -28,6 +28,6 @@
973 ############################################################################
974
975 from distutils import sysconfig
976-from PyQt4 import pyqtconfig
977-config = pyqtconfig.Configuration()
978+import sipconfig
979+config = sipconfig.Configuration()
980 print " ".join([sysconfig.get_python_inc(), config.sip_inc_dir])
981diff --git a/scidavis/python-libs-win.py b/scidavis/python-libs-win.py
982index 4864b38..8b87a79 100644
983--- a/scidavis/python-libs-win.py
984+++ b/scidavis/python-libs-win.py
985@@ -27,7 +27,7 @@
986 #                                                                          #
987 ############################################################################
988
989-from PyQt4 import pyqtconfig
990-config = pyqtconfig.Configuration()
991+import sipconfig
992+config = sipconfig.Configuration()
993
994 print "-L%s -lpython%d%d" % (config.py_lib_dir, config.py_version >> 16, (config.py_version  >> 8) & 0xff)
995diff --git a/scidavis/python-sipcmd.py b/scidavis/python-sipcmd.py
996index f73ae8d..c746082 100644
997--- a/scidavis/python-sipcmd.py
998+++ b/scidavis/python-sipcmd.py
999@@ -27,10 +27,22 @@
1000 #                                                                          #
1001 ############################################################################
1002
1003-from PyQt4 import pyqtconfig
1004-config = pyqtconfig.Configuration()
1005+from __future__ import print_function
1006+
1007+import os
1008+import sipconfig
1009+import PyQt4.QtCore
1010+
1011+try:
1012+	# >= 4.10
1013+	SIP_FLAGS = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags']
1014+except:
1015+	import PyQt4.pyqtconfig
1016+	SIP_FLAGS = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags
1017+
1018 flags = ["-I ../scidavis"]
1019-if config.sip_version >= 0x040a00:
1020-	# make use of docstring generation feature in SIP >= 4.10
1021-	flags.append("-o")
1022-print " ".join([config.sip_bin, "-I", config.pyqt_sip_dir, config.pyqt_sip_flags] + flags)
1023+PYQT_SIP_DIR = os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt4')
1024+SIP_BIN = sipconfig.Configuration().sip_bin
1025+SIP_INC_DIR = sipconfig.Configuration().sip_inc_dir
1026+
1027+print(" ".join([SIP_BIN, "-I", PYQT_SIP_DIR, SIP_FLAGS] + flags))
1028diff --git a/scidavis/python.pri b/scidavis/python.pri
1029index 3427516..cadb42e 100644
1030--- a/scidavis/python.pri
1031+++ b/scidavis/python.pri
1032@@ -41,7 +41,10 @@
1033     INCLUDEPATH += $$system(call python-includepath.py)
1034     LIBS        += $$system(call python-libs-win.py)
1035     # TODO: fix the command below (only really necessary if SIP_DIR != MOC/OBJECTS_DIR)
1036-    #system(md $${SIP_DIR})
1037+    WIN_SIP_DIR = $$replace(SIP_DIR, / , \\\\)
1038+    !exists($$WIN_SIP_DIR) {
1039+		system(mkdir $$WIN_SIP_DIR)
1040+    }
1041     system($$system(call python-sipcmd.py) -c $${SIP_DIR} ../scidavis/src/scidavis.sip)
1042   }
1043 }
1044diff --git a/scidavis/src/ApplicationWindow.cpp b/scidavis/src/ApplicationWindow.cpp
1045index 18c0b9f..0abc8d7 100644
1046--- a/scidavis/src/ApplicationWindow.cpp
1047+++ b/scidavis/src/ApplicationWindow.cpp
1048@@ -35,6 +35,7 @@
1049 #define BUGREPORT_URI "http://sourceforge.net/tracker/?group_id=199120&atid=968214"
1050 #define DOWNLOAD_URI "http://sourceforge.net/projects/scidavis/files/SciDAVis/"
1051
1052+#define NOMINMAX
1053 #include "globals.h"
1054 #include "ApplicationWindow.h"
1055 #include "CurvesDialog.h"
1056diff --git a/scidavis/src/ColorMapEditor.cpp b/scidavis/src/ColorMapEditor.cpp
1057index 86ac04d..2304f32 100644
1058--- a/scidavis/src/ColorMapEditor.cpp
1059+++ b/scidavis/src/ColorMapEditor.cpp
1060@@ -124,7 +124,7 @@ for (int i = 0; i < rows; i++)
1061
1062 	QColor c = QColor(map.rgb(QwtDoubleInterval(0, 1), colors[i]));
1063 	it = new QTableWidgetItem(c.name());
1064-	it->setFlags(!Qt::ItemIsEditable);
1065+	it->setFlags(it->flags()&~Qt::ItemIsEditable);
1066 	it->setBackground(QBrush(c));
1067 	it->setForeground(QBrush(c));
1068     table->setItem(i, 1, it);
1069@@ -156,7 +156,7 @@ QTableWidgetItem *it = new QTableWidgetItem(QString::number(val));
1070 table->setItem(row, 0, it);
1071
1072 it = new QTableWidgetItem(c.name());
1073-it->setFlags(!Qt::ItemIsEditable);
1074+it->setFlags(it->flags()&~Qt::ItemIsEditable);
1075 it->setBackground(QBrush(c));
1076 it->setForeground(QBrush(c));
1077 table->setItem(row, 1, it);
1078diff --git a/scidavis/src/Convolution.cpp b/scidavis/src/Convolution.cpp
1079index 63c1471..41afb56 100644
1080--- a/scidavis/src/Convolution.cpp
1081+++ b/scidavis/src/Convolution.cpp
1082@@ -138,7 +138,7 @@ void Convolution::addResultCurve()
1083
1084 	d_table->addCol();
1085 	d_table->addCol();
1086-	double x_temp[d_n];
1087+	QVarLengthArray<double> x_temp(d_n);
1088 	for (int i = 0; i<d_n; i++)
1089 	{
1090 		double x = i+1;
1091@@ -161,7 +161,7 @@ void Convolution::addResultCurve()
1092         return;
1093
1094     DataCurve *c = new DataCurve(d_table, d_table->colName(cols), d_table->colName(cols2));
1095-	c->setData(x_temp, d_x, d_n);
1096+	c->setData(x_temp.data(), d_x, d_n);
1097     c->setPen(QPen(ColorBox::color(d_curveColorIndex), 1));
1098 	ml->activeGraph()->insertPlotItem(c, Graph::Line);
1099 	ml->activeGraph()->updatePlot();
1100diff --git a/scidavis/src/Correlation.cpp b/scidavis/src/Correlation.cpp
1101index bc6f16b..4206c0a 100644
1102--- a/scidavis/src/Correlation.cpp
1103+++ b/scidavis/src/Correlation.cpp
1104@@ -146,7 +146,7 @@ void Correlation::addResultCurve()
1105 	d_table->addCol();
1106 	int n = rows/2;
1107
1108-	double x_temp[rows], y_temp[rows];
1109+	QVarLengthArray<double> x_temp(rows), y_temp(rows);
1110 	for (int i = 0; i<rows; i++)
1111 	{
1112         x_temp[i] = i - n;
1113@@ -173,7 +173,7 @@ void Correlation::addResultCurve()
1114         return;
1115
1116     DataCurve *c = new DataCurve(d_table, d_table->colName(cols), d_table->colName(cols2));
1117-	c->setData(x_temp, y_temp, rows);
1118+	c->setData(x_temp.data(), y_temp.data(), rows);
1119     c->setPen(QPen(ColorBox::color(d_curveColorIndex), 1));
1120 	ml->activeGraph()->insertPlotItem(c, Graph::Line);
1121 	ml->activeGraph()->updatePlot();
1122diff --git a/scidavis/src/FitDialog.cpp b/scidavis/src/FitDialog.cpp
1123index b6112ed..ef00cda 100644
1124--- a/scidavis/src/FitDialog.cpp
1125+++ b/scidavis/src/FitDialog.cpp
1126@@ -655,7 +655,7 @@ void FitDialog::showFitPage()
1127     for (int i = param_table_rows; i<paramList.count(); i++)
1128 	{
1129         QTableWidgetItem *it = new QTableWidgetItem(paramList[i]);
1130-        it->setFlags(!Qt::ItemIsEditable);
1131+        it->setFlags(it->flags()&~Qt::ItemIsEditable);
1132         it->setBackground(QBrush(Qt::lightGray));
1133         it->setForeground(QBrush(Qt::darkRed));
1134         QFont font = it->font();
1135@@ -679,7 +679,7 @@ void FitDialog::showFitPage()
1136 		for (int i = 0; i<boxParams->rowCount(); i++ )
1137 		{
1138             QTableWidgetItem *it = new QTableWidgetItem();
1139-            it->setFlags(!Qt::ItemIsEditable);
1140+            it->setFlags(it->flags()&~Qt::ItemIsEditable);
1141             it->setBackground(QBrush(Qt::lightGray));
1142             boxParams->setItem(i, 2, it);
1143
1144diff --git a/scidavis/src/Graph3D.cpp b/scidavis/src/Graph3D.cpp
1145index 4b60dc4..86584de 100644
1146--- a/scidavis/src/Graph3D.cpp
1147+++ b/scidavis/src/Graph3D.cpp
1148@@ -2933,7 +2933,7 @@ void Graph3D::findBestLayout()
1149
1150   	double d = (sp->hull().maxVertex-sp->hull().minVertex).length();
1151   	sp->setScale(xScale, yScale, zScale);
1152-  	sp->setZoom(d/sqrt(3));
1153+	sp->setZoom(d/sqrt(3.));
1154
1155   	double majl = 0.1/yScale;
1156   	updateTickLength(0, majl, 0.6*majl);
1157diff --git a/scidavis/src/MuParserScripting.h b/scidavis/src/MuParserScripting.h
1158index 298a20f..94b24f1 100644
1159--- a/scidavis/src/MuParserScripting.h
1160+++ b/scidavis/src/MuParserScripting.h
1161@@ -33,6 +33,12 @@
1162 #ifndef MUPARSER_SCRIPTING_H
1163 #define MUPARSER_SCRIPTING_H
1164
1165+#ifdef _MSC_VER
1166+      #ifndef NAN
1167+              static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
1168+              #define NAN (*(const float *) __nan)
1169+      #endif
1170+#endif
1171 #include "ScriptingEnv.h"
1172 #include "Script.h"
1173 #include "MuParserScript.h"
1174diff --git a/scidavis/src/QwtHistogram.cpp b/scidavis/src/QwtHistogram.cpp
1175index af91d1f..286d064 100644
1176--- a/scidavis/src/QwtHistogram.cpp
1177+++ b/scidavis/src/QwtHistogram.cpp
1178@@ -169,7 +169,7 @@ bool QwtHistogram::loadData()
1179 	for (int i = 0; i<size; i++ )
1180 		gsl_histogram_increment (h, Y[i]);
1181
1182-	double X[n]; //stores ranges (x) and bins (y)
1183+	QVarLengthArray<double> X(n); //stores ranges (x) and bins (y)
1184 	Y.resize(n);
1185 	for (int i = 0; i<n; i++ ){
1186 		Y[i] = gsl_histogram_get (h, i);
1187@@ -177,7 +177,7 @@ bool QwtHistogram::loadData()
1188 		gsl_histogram_get_range (h, i, &lower, &upper);
1189 		X[i] = lower;
1190 	}
1191-	setData(X, Y.data(), n);
1192+	setData(X.data(), Y.data(), n);
1193
1194 	d_mean = gsl_histogram_mean(h);
1195 	d_standard_deviation = gsl_histogram_sigma(h);
1196@@ -203,7 +203,7 @@ void QwtHistogram::initData(const QVector<double>& Y, int size)
1197 	}
1198
1199 	int n = 10;//default value
1200-	double x[n], y[n]; //store ranges (x) and bins (y)
1201+	QVarLengthArray<double> x(n), y(n); //store ranges (x) and bins (y)
1202 	gsl_histogram * h = gsl_histogram_alloc (n);
1203 	if (!h)
1204 		return;
1205@@ -232,7 +232,7 @@ void QwtHistogram::initData(const QVector<double>& Y, int size)
1206 		x[i] = lower;
1207 	}
1208
1209-	setData(x, y, n);
1210+	setData(x.data(), y.data(), n);
1211
1212 	d_bin_size = (d_end - d_begin)/(double)n;
1213 	d_autoBin = true;
1214diff --git a/scidavis/src/Table.h b/scidavis/src/Table.h
1215index d484426..37097e7 100644
1216--- a/scidavis/src/Table.h
1217+++ b/scidavis/src/Table.h
1218@@ -31,6 +31,12 @@
1219 #ifndef TABLE_H
1220 #define TABLE_H
1221
1222+#ifdef _MSC_VER
1223+      #ifndef NAN
1224+              static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
1225+              #define NAN (*(const float *) __nan)
1226+      #endif
1227+#endif
1228 #include <QVarLengthArray>
1229 #include <QDateTime>
1230 #include <QHash>
1231diff --git a/scidavis/src/fit_gsl.cpp b/scidavis/src/fit_gsl.cpp
1232index 507309e..8f888f5 100644
1233--- a/scidavis/src/fit_gsl.cpp
1234+++ b/scidavis/src/fit_gsl.cpp
1235@@ -647,7 +647,7 @@ int lorentz_multi_peak_fdf (const gsl_vector * x, void *params, gsl_vector * f,
1236
1237 int user_f(const gsl_vector * x, void *params, gsl_vector * f)
1238 {
1239-        static_cast<struct FitData*>(params)->fit->evaluate_f(x, f);
1240+        return static_cast<struct FitData*>(params)->fit->evaluate_f(x, f);
1241 }
1242
1243 double user_d(const gsl_vector * x, void *params)
1244diff --git a/scidavis/src/future/core/AbstractColumn.h b/scidavis/src/future/core/AbstractColumn.h
1245index 0fabde9..8b8eb08 100644
1246--- a/scidavis/src/future/core/AbstractColumn.h
1247+++ b/scidavis/src/future/core/AbstractColumn.h
1248@@ -31,7 +31,9 @@
1249 #define ABSTRACTCOLUMN_H
1250
1251 #include <QList>
1252+#include <QVector>
1253 #include <QString>
1254+#include <QStringList>
1255 #include <QDateTime>
1256 #include <QDate>
1257 #include <QTime>
1258diff --git a/scidavis/src/future/lib/Interval.h b/scidavis/src/future/lib/Interval.h
1259index a872c30..37017a7 100644
1260--- a/scidavis/src/future/lib/Interval.h
1261+++ b/scidavis/src/future/lib/Interval.h
1262@@ -71,7 +71,7 @@ template<class T> class IntervalBase
1263 		Interval<T>& operator=(const Interval<T>& other) {
1264 			d_start = other.start();
1265 			d_end = other.end();
1266-			return *this;
1267+			return (Interval<T>&)*this;
1268 		}
1269 		//! Returns true if no gap is between two intervals.
1270 		virtual bool touches(const Interval<T>& other) const = 0;
1271diff --git a/scidavis/src/scidavis.sip b/scidavis/src/scidavis.sip
1272index 7bc24f7..66063d5 100644
1273--- a/scidavis/src/scidavis.sip
1274+++ b/scidavis/src/scidavis.sip
1275@@ -31,7 +31,7 @@
1276  *                                                                         *
1277  ***************************************************************************/
1278
1279-%Module scidavis 0
1280+%Module(name=scidavis, version=0)
1281 %Import QtCore/QtCoremod.sip
1282 %Import QtGui/QtGuimod.sip
1283
1284@@ -173,14 +173,14 @@ class Column: AbstractAspect
1285 		void setValueAt(int row, double new_value);
1286 		void replaceValues(int first, const QVector<double>& new_values);
1287
1288-  Column * x() const /NoDerived/;
1289+  Column * x() const;
1290 %MethodCode
1291     future::Table *t = qobject_cast<future::Table *>(sipCpp->parentAspect());
1292     if (t)
1293         sipRes = t->column(t->colX(t->indexOfChild(sipCpp)));
1294 %End
1295
1296-  Column * y() const /NoDerived/;
1297+  Column * y() const;
1298 %MethodCode
1299     future::Table *t = qobject_cast<future::Table *>(sipCpp->parentAspect());
1300     if (t)
1301@@ -229,7 +229,7 @@ public:
1302 	if (app) app->renameWindow(sipCpp, *a0);
1303 %End
1304
1305-	MyWidget *clone() /NoDerived/;
1306+	MyWidget *clone();
1307 %MethodCode
1308 	ApplicationWindow *app = sipscidavis_app();
1309 	if (app) sipRes = app->clone(sipCpp);
1310@@ -306,17 +306,17 @@ public:
1311   void setNumRows(int);
1312   void setNumCols(int);
1313   Column * column(int index) const;
1314-  Column * column(const QString & name) const /NoDerived/;
1315+  Column * column(const QString & name) const;
1316 %MethodCode
1317   sipRes = sipCpp->d_future_table->column(*a0, false);
1318 %End
1319
1320-  Column * __getitem__(int index) const /NoDerived/;
1321+  Column * __getitem__(int index) const;
1322 %MethodCode
1323   sipRes = sipCpp->column(a0);
1324 %End
1325
1326-  Column * __getitem__(const QString &name) const /NoDerived/;
1327+  Column * __getitem__(const QString &name) const;
1328 %MethodCode
1329   sipRes = sipCpp->column(*a0);
1330 %End
1331@@ -380,14 +380,14 @@ public:
1332
1333   void importASCII(const QString&, const QString&="\t", int=0, bool=false, bool=true, bool=false, bool=false);
1334   bool exportASCII(const QString&, const QString&="\t", bool=false, bool=false);
1335-  void normalize(SIP_PYOBJECT) /NoDerived/;
1336+  void normalize(SIP_PYOBJECT);
1337 %MethodCode
1338 	sipIsErr = 0;
1339 	CHECK_TABLE_COL(a0);
1340 	if (sipIsErr == 0)
1341 		sipCpp->d_future_table->normalizeColumns(QList< Column* >() << sipCpp->column(col));
1342 %End
1343-  void normalize() /NoDerived/;
1344+  void normalize();
1345 %MethodCode
1346 	QList< Column* > cols;
1347 	for (int i=0; i<sipCpp->numCols(); i++)
1348@@ -395,14 +395,14 @@ public:
1349 	sipCpp->d_future_table->normalizeColumns(cols);
1350 %End
1351
1352-  void sortColumn(SIP_PYOBJECT, int order = 0) /NoDerived/;
1353+  void sortColumn(SIP_PYOBJECT, int order = 0);
1354 %MethodCode
1355   	sipIsErr = 0;
1356   	CHECK_TABLE_COL(a0);
1357 	if (sipIsErr == 0)
1358 		sipCpp->d_future_table->sortColumns(0, QList<Column*>() << sipCpp->column(col), a1==0);
1359 %End
1360-  void sort(int type = 0, int order = 0, const QString& leadCol = QString()) /NoDerived/;
1361+  void sort(int type = 0, int order = 0, const QString& leadCol = QString());
1362 %MethodCode
1363 	Column * lead;
1364 	if (a0 == 0)
1365@@ -658,7 +658,7 @@ class QwtSymbol
1366
1367 	 // convenience methods for scripting
1368
1369-	 void setColor(const QColor& color) /NoDerived/;
1370+	 void setColor(const QColor& color);
1371 %MethodCode
1372 	QPen pen = sipCpp->pen();
1373 	pen.setColor(*a0);
1374@@ -667,7 +667,7 @@ class QwtSymbol
1375 	brush.setColor(*a0);
1376 	sipCpp->setBrush(brush);
1377 %End
1378-	 void setColor(int color) /NoDerived/;
1379+	 void setColor(int color);
1380 %MethodCode
1381 	QPen pen = sipCpp->pen();
1382 	pen.setColor(ColorBox::color(a0));
1383@@ -676,25 +676,25 @@ class QwtSymbol
1384 	brush.setColor(ColorBox::color(a0));
1385 	sipCpp->setBrush(brush);
1386 %End
1387-	 void setOutlineColor(const QColor& color) /NoDerived/;
1388+	 void setOutlineColor(const QColor& color);
1389 %MethodCode
1390 	QPen pen = sipCpp->pen();
1391 	pen.setColor(*a0);
1392 	sipCpp->setPen(pen);
1393 %End
1394-	 void setOutlineColor(int color) /NoDerived/;
1395+	 void setOutlineColor(int color);
1396 %MethodCode
1397 	QPen pen = sipCpp->pen();
1398 	pen.setColor(ColorBox::color(a0));
1399 	sipCpp->setPen(pen);
1400 %End
1401-	 void setFillColor(const QColor& color) /NoDerived/;
1402+	 void setFillColor(const QColor& color);
1403 %MethodCode
1404 	QBrush brush = sipCpp->brush();
1405 	brush.setColor(*a0);
1406 	sipCpp->setBrush(brush);
1407 %End
1408-	 void setFillColor(int color) /NoDerived/;
1409+	 void setFillColor(int color);
1410 %MethodCode
1411 	QBrush brush = sipCpp->brush();
1412 	brush.setColor(ColorBox::color(a0));
1413@@ -731,7 +731,7 @@ class QwtPlotCurve
1414
1415 	 // convenience methods for scripting
1416
1417-	 void setColor(const QColor& color) /NoDerived/;
1418+	 void setColor(const QColor& color);
1419 %MethodCode
1420 	QPen pen = sipCpp->pen();
1421 	pen.setColor(*a0);
1422@@ -740,7 +740,7 @@ class QwtPlotCurve
1423 	brush.setColor(*a0);
1424 	sipCpp->setBrush(brush);
1425 %End
1426-	 void setColor(int color) /NoDerived/;
1427+	 void setColor(int color);
1428 %MethodCode
1429 	QPen pen = sipCpp->pen();
1430 	pen.setColor(ColorBox::color(a0));
1431@@ -749,31 +749,31 @@ class QwtPlotCurve
1432 	brush.setColor(ColorBox::color(a0));
1433 	sipCpp->setBrush(brush);
1434 %End
1435-	 void setOutlineColor(const QColor& color) /NoDerived/;
1436+	 void setOutlineColor(const QColor& color);
1437 %MethodCode
1438 	QPen pen = sipCpp->pen();
1439 	pen.setColor(*a0);
1440 	sipCpp->setPen(pen);
1441 %End
1442-	 void setOutlineColor(int color) /NoDerived/;
1443+	 void setOutlineColor(int color);
1444 %MethodCode
1445 	QPen pen = sipCpp->pen();
1446 	pen.setColor(ColorBox::color(a0));
1447 	sipCpp->setPen(pen);
1448 %End
1449-	 void setFillColor(const QColor& color) /NoDerived/;
1450+	 void setFillColor(const QColor& color);
1451 %MethodCode
1452 	QBrush brush = sipCpp->brush();
1453 	brush.setColor(*a0);
1454 	sipCpp->setBrush(brush);
1455 %End
1456-	 void setFillColor(int color) /NoDerived/;
1457+	 void setFillColor(int color);
1458 %MethodCode
1459 	QBrush brush = sipCpp->brush();
1460 	brush.setColor(ColorBox::color(a0));
1461 	sipCpp->setBrush(brush);
1462 %End
1463-	 void setFillStyle(Qt::BrushStyle style) /NoDerived/;
1464+	 void setFillStyle(Qt::BrushStyle style);
1465 %MethodCode
1466 	QBrush brush = sipCpp->brush();
1467 	brush.setStyle(a0);
1468@@ -838,24 +838,24 @@ class Grid
1469 		void setMinPenY(const QPen &p) /PyName=setYMinorPen/;
1470 		const QPen& minPenY() const /PyName=yMinorPen/;
1471
1472-		void setMajor(bool) /NoDerived/;
1473+		void setMajor(bool);
1474 %MethodCode
1475 	sipCpp->enableX(a0);
1476 	sipCpp->enableY(a0);
1477 %End
1478
1479-		void setMinor(bool) /NoDerived/;
1480+		void setMinor(bool);
1481 %MethodCode
1482 	sipCpp->enableXMin(a0);
1483 	sipCpp->enableYMin(a0);
1484 %End
1485
1486-		void setMajorPen(const QPen &p) /NoDerived/;
1487+		void setMajorPen(const QPen &p);
1488 %MethodCode
1489 	sipCpp->setMajPenX(*a0);
1490 	sipCpp->setMajPenY(*a0);
1491 %End
1492-		void setMinorPen(const QPen &p) /NoDerived/;
1493+		void setMinorPen(const QPen &p);
1494 %MethodCode
1495 	sipCpp->setMinPenX(*a0);
1496 	sipCpp->setMinPenY(*a0);
1497@@ -881,7 +881,7 @@ public:
1498   sipRes = PyString_FromString(sipCpp->pieLegendText());
1499 %End
1500
1501-  bool insertCurve(Table*, const QString&, int=1, int color=-1) /NoDerived/;
1502+  bool insertCurve(Table*, const QString&, int=1, int color=-1);
1503 %MethodCode
1504 	if (sipCpp->insertCurve(a0, *a1, a2)) {
1505 		CurveLayout cl = sipCpp->initCurveLayout(a2, 1);
1506@@ -910,7 +910,7 @@ public:
1507 		sipRes = false;
1508 %End
1509 	bool insertFunctionCurve(const QString &formula, double from=0, double to=1, int points=100,
1510-			const QString &title = QString::null) /NoDerived/;
1511+			const QString &title = QString::null);
1512 %MethodCode
1513 	ApplicationWindow *app = sipscidavis_app();
1514 	if (app)
1515@@ -921,7 +921,7 @@ public:
1516 %End
1517 	bool insertPolarCurve(const QString &radial, const QString &angular,
1518 			double from=0, double to=2*M_PI, const QString &parameter="t", int points=100,
1519-			const QString &title = QString::null) /NoDerived/;
1520+			const QString &title = QString::null);
1521 %MethodCode
1522 	ApplicationWindow *app = sipscidavis_app();
1523 	if (app)
1524@@ -932,7 +932,7 @@ public:
1525 %End
1526 	bool insertParametricCurve(const QString &x, const QString &y,
1527 			double from=0, double to=1, const QString &parameter="t", int points=100,
1528-			const QString &title =QString::null) /NoDerived/;
1529+			const QString &title =QString::null);
1530 %MethodCode
1531 	ApplicationWindow *app = sipscidavis_app();
1532 	if (app)
1533@@ -946,7 +946,7 @@ public:
1534   void removeCurve(const QString&);
1535   void deleteFitCurves();
1536   int curves() /PyName=numCurves/;
1537-  QList<QwtPlotCurve*> curves() const /NoDerived/;
1538+  QList<QwtPlotCurve*> curves() const;
1539 %MethodCode
1540 	sipRes = new QList<QwtPlotCurve*>();
1541 	for (int i = 0; i<sipCpp->curves(); i++)
1542@@ -969,7 +969,7 @@ public:
1543   void setTitle(const QString& t);
1544   Legend* newLegend();
1545   Legend* newLegend(const QString&);
1546-  void setLegend(const QString&) /NoDerived/;
1547+  void setLegend(const QString&);
1548 %MethodCode
1549   sipCpp->legend()->setText(*a0);
1550 %End
1551@@ -1010,12 +1010,12 @@ public:
1552   void setAutoscaleFonts(bool = true);
1553   void setAntialiasing(bool on = true, bool update = true);
1554
1555-  QWidget * canvas() const /NoDerived/;
1556+  QWidget * canvas() const;
1557 %MethodCode
1558 	sipRes = sipCpp->d_plot->canvas();
1559 %End
1560
1561-	QPointF pickPoint() const /NoDerived/;
1562+	QPointF pickPoint() const;
1563 %MethodCode
1564 	ApplicationWindow *app = sipscidavis_app();
1565 	sipRes = new QPointF();
1566@@ -1057,7 +1057,7 @@ public:
1567 	// for backwards-compatibility
1568   void setAlignement (int, int);
1569   void setAlignement (int, int) /PyName=setAlignment/;
1570-  void arrangeLayers(bool fit = true) /NoDerived/;
1571+  void arrangeLayers(bool fit = true);
1572 %MethodCode
1573 	sipCpp->arrangeLayers(a0, false);
1574 %End
1575@@ -1166,7 +1166,7 @@ public:
1576 	// a bugfix release though, since an unexpected change in behaviour may be even
1577 	// more confusing than the inconsistency.
1578   Note* newNote(const QString& = QString::null);
1579-  MultiLayer *plot(Table*, SIP_PYTUPLE, int style=1, int color=-1) /NoDerived/;
1580+  MultiLayer *plot(Table*, SIP_PYTUPLE, int style=1, int color=-1);
1581 %MethodCode
1582   QStringList l;
1583   int n = PyTuple_Size(a1);
1584@@ -1203,7 +1203,7 @@ public:
1585     }
1586   }
1587 %End
1588-  MultiLayer *plot(Table*, const QString&, int style=1, int color=-1) /NoDerived/;
1589+  MultiLayer *plot(Table*, const QString&, int style=1, int color=-1);
1590 %MethodCode
1591   if (a0==0) {
1592 	  sipIsErr = 1;
1593@@ -1241,7 +1241,7 @@ public:
1594 //  QTextEdit *console;
1595
1596   // folders
1597-  Folder *activeFolder() /NoDerived/;
1598+  Folder *activeFolder();
1599 %MethodCode
1600   sipRes = sipCpp->current_folder;
1601 %End
1602@@ -1905,14 +1905,14 @@ public:
1603
1604   Folder* rootFolder();
1605
1606-  void save(const QString &filename) /NoDerived/;
1607+  void save(const QString &filename);
1608 %MethodCode
1609 	ApplicationWindow *app = sipscidavis_app();
1610 	if (app)
1611 		app->saveFolder(sipCpp, *a0);
1612 %End
1613
1614-	void addChild(Folder *f /Transfer/) /NoDerived/;
1615+	void addChild(Folder *f /Transfer/);
1616 %MethodCode
1617 	QString name = a0->objectName();
1618 	int i = 1;
1619