Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 417 → Rev 418

/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
278,3 → 278,27
}
return Py_None;
}
 
PyObject *scribus_getpagemargins(PyObject *self, PyObject* args)
{
PyObject *margins = NULL;
if (!PyArg_ParseTuple(args, ""))
{
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetPageMargins()"));
return NULL;
}
if (!Carrier->HaveDoc)
{
PyErr_SetString(PyExc_Exception, "No document open");
return NULL;
}
margins = Py_BuildValue("ffff", Carrier->doc->PageM.Top, Carrier->doc->PageM.Left,
Carrier->doc->PageM.Right, Carrier->doc->PageM.Bottom);
if (margins == NULL)
{
PyErr_SetString(PyExc_Exception, "Building margin tuple failed!");
return NULL;
}
Py_INCREF(margins);
return margins;
}