Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 471 → Rev 470

/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
40,6 → 40,7
if (!Carrier->HaveDoc)
return PyInt_FromLong(0L);
bool ret = Carrier->DoSaveAsEps(QString(Name));
// qApp->processEvents();
return PyInt_FromLong(static_cast<long>(ret));
}
 
53,18 → 54,12
}
Py_INCREF(Py_None);
if (!Carrier->HaveDoc)
{
Py_INCREF(Py_None);
return Py_None;
}
e--;
if ((e < 0) || (e > static_cast<int>(Carrier->view->Pages.count())-1))
{
PyErr_SetString(PyExc_IndexError, "Page number out of range");
return NULL;
}
return Py_None;
Carrier->DeletePage2(e);
Py_INCREF(Py_None);
// qApp->processEvents();
return Py_None;
}
 
76,19 → 71,14
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("gotoPage(pagenumber)"));
return NULL;
}
Py_INCREF(Py_None);
if (!Carrier->HaveDoc)
{
Py_INCREF(Py_None);
return Py_None;
}
e--;
if ((e < 0) || (e > static_cast<int>(Carrier->view->Pages.count())-1))
{
PyErr_SetString(PyExc_IndexError, "Page number out of range");
return NULL;
}
return Py_None;
Carrier->view->GotoPage(e);
Py_INCREF(Py_None);
// qApp->processEvents();
return Py_None;
}
 
101,11 → 91,9
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("newPage(pagenumber [, pagename])"));
return NULL;
}
Py_INCREF(Py_None);
if (!Carrier->HaveDoc)
{
Py_INCREF(Py_None);
return Py_None;
}
if (e < 0)
Carrier->slotNewPageP(Carrier->view->Pages.count(), QString(name));
else
112,13 → 100,10
{
e--;
if ((e < 0) || (e > static_cast<int>(Carrier->view->Pages.count())-1))
{
PyErr_SetString(PyExc_IndexError, "Page number out of range");
return NULL;
}
return Py_None;
Carrier->slotNewPageP(e, QString(name));
}
Py_INCREF(Py_None);
// qApp->processEvents();
return Py_None;
}
 
148,10 → 133,10
}
PyObject *t;
t = Py_BuildValue(
"(dd)",
PointToValue(Carrier->doc->PageB), // it's just view scale... * Carrier->doc->Scale),
PointToValue(Carrier->doc->PageH) // * Carrier->doc->Scale)
);
"(dd)",
PointToValue(Carrier->doc->PageB), // it's just view scale... * Carrier->doc->Scale),
PointToValue(Carrier->doc->PageH) // * Carrier->doc->Scale)
);
return t;
}
 
217,11 → 202,9
PyErr_SetString(PyExc_TypeError, QString("argument is not list: must be list of float values"));
return NULL;
}
Py_INCREF(Py_None);
if (!Carrier->HaveDoc)
{
Py_INCREF(Py_None);
return Py_None;
}
int i, n;
n = PyList_Size(l);
double guide;
235,7 → 218,6
}
Carrier->doc->ActPage->YGuides += ValueToPoint(guide);
}
Py_INCREF(Py_None);
return Py_None;
}
 
278,11 → 260,9
PyErr_SetString(PyExc_TypeError, QString("argument is not list: must be list of float values"));
return NULL;
}
Py_INCREF(Py_None);
if (!Carrier->HaveDoc)
{
Py_INCREF(Py_None);
return Py_None;
}
int i, n;
n = PyList_Size(l);
double guide;
296,7 → 276,6
}
Carrier->doc->ActPage->XGuides += ValueToPoint(guide);
}
Py_INCREF(Py_None);
return Py_None;
}