r14430 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:15:40 CET 2009


Revision: 14430
Author: jghali
Date: 2009-12-17T12:41:52.455670Z
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  /trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp

Diffs:
Index: scribus/plugins/scriptplugin/cmddoc.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmddoc.cpp	(revision 14429)
+++ scribus/plugins/scriptplugin/cmddoc.cpp	(revision 14430)
@@ -47,20 +47,19 @@
 		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 = ScCore->primaryMainWindow()->doFileNew(pageWidth, pageHeight,
 								topMargin, leftMargin, rightMargin, bottomMargin,
@@ -84,9 +83,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;
@@ -100,11 +98,11 @@
 	if (ds!=1 && fsl>0)
 		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 = ScCore->primaryMainWindow()->doFileNew(b, h, tpr, lr, rr, btr, 0, 1, false, ds, unit, fsl, ori, fNr, "Custom", true);
 	//	qApp->processEvents();
 	return PyInt_FromLong(static_cast<long>(ret));




More information about the scribus-commit mailing list