r15283 by fschmid - Don't allow numbers with exponential format in PDF.

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 27 13:50:24 CEST 2010


Revision: 15283
Author: fschmid
Date: 2010-06-27T11:48:06.997667Z
Commit message: Don't allow numbers with exponential format in PDF.

Changeset: 
M  /trunk/Scribus/scribus/pdflib_core.cpp
M  /trunk/Scribus/scribus/pageitem_osgframe.cpp

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 15282)
+++ scribus/pdflib_core.cpp	(revision 15283)
@@ -161,7 +161,10 @@
 
 static inline QString FToStr(double c)
 {
-	return QString::number(c, 'f', 5);
+	double v = c;
+	if (fabs(c) < 0.0000001)
+		v = 0.0;
+	return QString::number(v, 'f', 5);
 };
 
 bool PDFLibCore::doExport(const QString& fn, const QString& nam, int Components,
Index: scribus/pageitem_osgframe.cpp
===================================================================
--- scribus/pageitem_osgframe.cpp	(revision 15282)
+++ scribus/pageitem_osgframe.cpp	(revision 15283)
@@ -257,6 +257,24 @@
 	transx = trackerCenter[0] - roo*viewx;
 	transy = trackerCenter[1] - roo*viewy;
 	transz = trackerCenter[2] - roo*viewz;
+	if (fabs(leftx) < 0.0000001)
+		leftx = 0.0;
+	if (fabs(lefty) < 0.0000001)
+		lefty = 0.0;
+	if (fabs(leftz) < 0.0000001)
+		leftz = 0.0;
+	if (fabs(upx) < 0.0000001)
+		upx = 0.0;
+	if (fabs(upy) < 0.0000001)
+		upy = 0.0;
+	if (fabs(upz) < 0.0000001)
+		upz = 0.0;
+	if (fabs(transx) < 0.0000001)
+		transx = 0.0;
+	if (fabs(transy) < 0.0000001)
+		transy = 0.0;
+	if (fabs(transz) < 0.0000001)
+		transz = 0.0;
 	QString ret = "";
 	QString desc4 = "%1 %2 %3 ";
 	ret += desc4.arg(leftx).arg(lefty).arg(leftz);




More information about the scribus-commit mailing list