summaryrefslogtreecommitdiff
path: root/extra/qtiplot/gentoo-fix-origin-build-failure.patch
blob: 931d870099489f4a85afde1cd8b0c85eb9fbeb91 (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
--- qtiplot/src/origin/importOPJ.cpp	2010-09-01 11:07:38 +0000
+++ qtiplot/src/origin/importOPJ.cpp	2010-09-07 10:12:30 +0000
@@ -473,6 +473,8 @@
 				}
 				table->setDayFormat(format, j);
 				break;
+			default:
+				break;
 			}
             table->freeMemory();
 		}
@@ -720,7 +722,6 @@
 				bkg.setAlpha(0);
 			graph->setCanvasBackground(bkg);
 
-			int auto_color = -1;
 			int style = 0;
 			bool matrixImage = false;
 			for(unsigned int c = 0; c < layer.curves.size(); ++c){
@@ -1461,7 +1462,7 @@
 
 			if (boxWhiskersPlot){
 				QStringList curveNames;
-				for (unsigned int i = 0; i < graph->curveCount(); i++){
+				for (int i = 0; i < graph->curveCount(); i++){
 					BoxCurve *box = (BoxCurve *)graph->curve(i);
 					if (!box || box->type() != Graph::Box)
 						continue;
@@ -1659,7 +1660,6 @@
 	for(unsigned int c = 0; c < layer.curves.size(); ++c){
 		Origin::GraphCurve& _curve = layer.curves[c];
 		QString data(_curve.dataName.c_str());
-		int color = 0;
 		double fFontScaleFactor = 2.0;
 		switch(_curve.type){
 			case Origin::GraphCurve::Line3D:
@@ -1809,7 +1809,6 @@
 		}
 
 		QStringList formulas;
-		double start, end;
 
 		plot->showColorLegend(false);
 		plot->setFramed();
@@ -1951,8 +1950,8 @@
 
 	QList <PieLabel *> pieTexts = p->labelsList();
 	QFont font(mw->plotLegendFont);
-	unsigned int lsize = layer.pieTexts.size();
-	for(unsigned int i = 0; i < lsize && i < pieTexts.size(); ++i){
+	int lsize = layer.pieTexts.size();
+	for(int i = 0; i < lsize && i < pieTexts.size(); ++i){
 		Origin::TextBox text = layer.pieTexts[lsize - i - 1];
 		font.setPointSizeF(text.fontSize*fFontScaleFactor);
 		QFontMetrics fm(font, graph);
@@ -2159,12 +2158,12 @@
 	line.replace("&lbracket;", "(");
 	line.replace("&rbracket;", ")");
 
-	QRegExp fontModifier("\p(\\d)+\\(.*\\)");//remove \p163(...) like tags
+	QRegExp fontModifier("\\\\p(\\d)+\\(.*\\)");//remove \p163(...) like tags
 	int index = line.indexOf(fontModifier);
 	while (index >= 0){
 		int pos1 = line.indexOf("(", index + 2) + 1;
 		int length = fontModifier.matchedLength();
-		line = line.mid(pos1, length - pos1);
+		line = line.mid(pos1, length - pos1 - 1);
 		index = line.indexOf(fontModifier, index + length);
 	}