r14428 by jghali - #8648: Bug 7854 was fixed although it was invalid Revert changes made for #7854, the bug was indeed invalid per newDocument() documentation

scribus-commit scribus-commit at lists.scribus.net
Fri Dec 18 01:10:18 CET 2009


Revision: 14428
Author: jghali
Date: 2009-12-17T12:41:13.177115Z
Commit message: #8648: Bug 7854 was fixed although it was invalid
Revert changes made for #7854, the bug was indeed invalid per newDocument() documentation

Changeset: 
M  /branches/Version133x/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp

Diffs:
Index: scribus/plugins/scriptplugin/cmddoc.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmddoc.cpp	(revision 14427)
+++ scribus/plugins/scriptplugin/cmddoc.cpp	(revision 14428)
@@ -45,20 +45,18 @@
 		return NULL;
 	}
 
-	// fixed #7854: Problem with page size with newDocument
-// 	pageWidth = value2pts(pageWidth, unit);
-// 	pageHeight = value2pts(pageHeight, unit);
+	pageWidth = value2pts(pageWidth, unit);
+	pageHeight = value2pts(pageHeight, unit);
 	if (orientation == 1)
 	{
 		double x = pageWidth;
 		pageWidth = pageHeight;
 		pageHeight = x;
 	}
-	// fixed #7854: Problem with page size with newDocument
-// 	leftMargin = value2pts(leftMargin, unit);
-// 	rightMargin = value2pts(rightMargin, unit);
-// 	topMargin = value2pts(topMargin, unit);
-// 	bottomMargin = value2pts(bottomMargin, unit);
+	leftMargin   = value2pts(leftMargin, unit);
+	rightMargin  = value2pts(rightMargin, unit);
+	topMargin    = value2pts(topMargin, unit);
+	bottomMargin = value2pts(bottomMargin, unit);
 
 	bool ret = ScMW->doFileNew(pageWidth, pageHeight,
 								topMargin, leftMargin, rightMargin, bottomMargin,
@@ -82,9 +80,8 @@
 	        (!PyArg_ParseTuple(p, "dd", &b, &h)) ||
 	        (!PyArg_ParseTuple(m, "dddd", &lr, &rr, &tpr, &btr)))
 		return NULL;
-	// fixed #7854: Problem with page size with newDocument
-// 	b = value2pts(b, unit);
-// 	h = value2pts(h, unit);
+	b = value2pts(b, unit);
+	h = value2pts(h, unit);
 	if (ori == 1)
 	{
 		ebr = b;
@@ -99,11 +96,10 @@
 		fsl = 0;
 	// end of hack
 
-	// fixed #7854: Problem with page size with newDocument
-// 	tpr = value2pts(tpr, unit);
-// 	lr = value2pts(lr, unit);
-// 	rr = value2pts(rr, unit);
-// 	btr = value2pts(btr, unit);
+	tpr = value2pts(tpr, unit);
+	lr  = value2pts(lr, unit);
+	rr  = value2pts(rr, unit);
+	btr = value2pts(btr, unit);
 	bool ret = ScMW->doFileNew(b, h, tpr, lr, rr, btr, 0, 1, false, ds, unit, fsl, ori, fNr, "Custom");
 	//	qApp->processEvents();
 	return PyInt_FromLong(static_cast<long>(ret));




More information about the scribus-commit mailing list