r14605 by jghali - #8758 : custom dotted lines don't export properly to pdf

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 1 19:55:04 CET 2010


Revision: 14605
Author: jghali
Date: 2010-01-31T15:55:06.465893Z
Commit message: #8758 : custom dotted lines don't export properly to pdf

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

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 14604)
+++ scribus/pdflib_core.cpp	(revision 14605)
@@ -1955,7 +1955,9 @@
 					for ( it = ite->DashValues.begin(); it != ite->DashValues.end(); ++it )
 					{
 						int da = static_cast<int>(*it);
-						if (da != 0)
+						// #8758: Custom dotted lines don't export properly to pdf
+						// Null values have to be exported if line end != flat
+						if ((da != 0) || (ite->lineEnd() != Qt::FlatCap))
 							PutPage(QString::number(da)+" ");
 					}
 					PutPage("] "+QString::number(static_cast<int>(ite->DashOffset))+" d\n");
@@ -3416,7 +3418,9 @@
 		for ( it = ite->DashValues.begin(); it != ite->DashValues.end(); ++it )
 		{
 			int da = static_cast<int>(*it);
-			if (da != 0)
+			// #8758: Custom dotted lines don't export properly to pdf
+			// Null values have to be exported if line end != flat
+			if ((da != 0) || (ite->lineEnd() != Qt::FlatCap))
 				tmp += QString::number(da)+" ";
 		}
 		tmp += "] "+QString::number(static_cast<int>(ite->DashOffset))+" d\n";
@@ -3552,7 +3556,9 @@
 		for ( it = ite->DashValues.begin(); it != ite->DashValues.end(); ++it )
 		{
 			int da = static_cast<int>(*it);
-			if (da != 0)
+			// #8758: Custom dotted lines don't export properly to pdf
+			// Null values have to be exported if line end != flat
+			if ((da != 0) || (ite->lineEnd() != Qt::FlatCap))
 				tmp += QString::number(da)+" ";
 		}
 		tmp += "] "+QString::number(static_cast<int>(ite->DashOffset))+" d\n";
@@ -5035,7 +5041,9 @@
 				for ( it = embedded->DashValues.begin(); it != embedded->DashValues.end(); ++it )
 				{
 					int da = static_cast<int>(*it);
-					if (da != 0)
+					// #8758: Custom dotted lines don't export properly to pdf
+					// Null values have to be exported if line end != flat
+					if ((da != 0) || (embedded->lineEnd() != Qt::FlatCap))
 						tmp2 += QString::number(da)+" ";
 				}
 				tmp2 += "] "+QString::number(static_cast<int>(embedded->DashOffset))+" d\n";
@@ -6090,7 +6098,9 @@
 			for ( it = item->DashValues.begin(); it != item->DashValues.end(); ++it )
 			{
 				int da = static_cast<int>(*it);
-				if (da != 0)
+				// #8758: Custom dotted lines don't export properly to pdf
+				// Null values have to be exported if line end != flat
+				if ((da != 0) || (item->lineEnd() != Qt::FlatCap))
 					tmp2 += QString::number(da)+" ";
 			}
 			tmp2 += "] "+QString::number(static_cast<int>(item->DashOffset))+" d\n";
@@ -6756,7 +6766,9 @@
 				for ( it = item->DashValues.begin(); it != item->DashValues.end(); ++it )
 				{
 					int da = static_cast<int>(*it);
-					if (da != 0)
+					// #8758: Custom dotted lines don't export properly to pdf
+					// Null values have to be exported if line end != flat
+					if ((da != 0) || (item->lineEnd() != Qt::FlatCap))
 						tmp2 += QString::number(da)+" ";
 				}
 				tmp2 += "] "+QString::number(static_cast<int>(item->DashOffset))+" d\n";




More information about the scribus-commit mailing list