r22653 by jghali - code style fixes

scribus-commit scribus-commit at lists.scribus.net
Mon Aug 27 19:29:00 UTC 2018


Author: jghali
Date: Mon Aug 27 19:29:00 2018
New Revision: 22653

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22653
Log:
code style fixes

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtable.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp	Mon Aug 27 19:29:00 2018
@@ -19,7 +19,7 @@
 	char *text;
 	if (!PyArg_ParseTuple(args, "iies|es", &row, &column, "utf-8", &text, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -45,7 +45,7 @@
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -71,7 +71,7 @@
 	char *style;
 	if (!PyArg_ParseTuple(args, "iies|es", &row, &column, "utf-8", &style, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -97,7 +97,7 @@
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -117,7 +117,7 @@
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -137,7 +137,7 @@
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -163,7 +163,7 @@
 	char *color;
 	if (!PyArg_ParseTuple(args, "iies|es", &row, &column, "utf-8", &color, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -190,7 +190,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -224,7 +224,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -258,7 +258,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -292,7 +292,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -326,7 +326,7 @@
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -359,7 +359,7 @@
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -392,7 +392,7 @@
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -425,7 +425,7 @@
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp	Mon Aug 27 19:29:00 2018
@@ -584,7 +584,7 @@
 	//FIXME: this should definitely use keyword arguments
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Name, "utf-8", &Repl))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
@@ -611,7 +611,7 @@
 	
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
@@ -633,7 +633,7 @@
 
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &enable))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp	Mon Aug 27 19:29:00 2018
@@ -125,7 +125,7 @@
 
 PyObject *scribus_newstyledialog(PyObject*, PyObject* args)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 
 	ScribusDoc *d = ScCore->primaryMainWindow()->doc;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp	Mon Aug 27 19:29:00 2018
@@ -117,7 +117,7 @@
 	double lr, tpr, btr, rr;
 	if (!PyArg_ParseTuple(args, "dddd", &lr, &rr, &tpr, &btr))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	MarginStruct margins(ValueToPoint(tpr), ValueToPoint(lr), ValueToPoint(btr), ValueToPoint(rr));
 	ScCore->primaryMainWindow()->doc->resetPage(ScCore->primaryMainWindow()->doc->pagePositioning(), &margins);
@@ -135,7 +135,7 @@
 	double grid, offset;
 	if (!PyArg_ParseTuple(args, "dd", &grid, &offset))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->guidesPrefs().valueBaselineGrid = ValueToPoint(grid);
 	ScCore->primaryMainWindow()->doc->guidesPrefs().offsetBaselineGrid = ValueToPoint(offset);
@@ -151,7 +151,7 @@
 
 PyObject *scribus_closedoc(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->setModified(false);
 	bool ret = ScCore->primaryMainWindow()->slotFileClose();
@@ -183,7 +183,7 @@
 
 PyObject *scribus_savedoc(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->slotFileSave();
 //	Py_INCREF(Py_None);
@@ -193,7 +193,7 @@
 
 PyObject *scribus_getdocname(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (! ScCore->primaryMainWindow()->doc->hasName)
 	{
@@ -207,7 +207,7 @@
 	char *Name;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	bool ret = ScCore->primaryMainWindow()->DoFileSave(QString::fromUtf8(Name));
 	if (!ret)
@@ -230,7 +230,7 @@
 	// will correctly handle nullptr.
 	if (!PyArg_ParseTuple(args, "zzz", &Author, &Title, &Desc))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->documentInfo().setAuthor(QString::fromUtf8(Author));
 	ScCore->primaryMainWindow()->doc->documentInfo().setTitle(QString::fromUtf8(Title));
@@ -246,7 +246,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((e < UNITMIN) || (e > UNITMAX))
 	{
@@ -261,7 +261,7 @@
 
 PyObject *scribus_getunit(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	return PyInt_FromLong(static_cast<long>(ScCore->primaryMainWindow()->doc->unitIndex()));
 }
@@ -271,7 +271,7 @@
 	char *fileName;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &fileName))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->loadStylesFromFile(QString::fromUtf8(fileName));
 //	Py_INCREF(Py_None);
@@ -284,7 +284,7 @@
 	int fp, fsl;
 	if (!PyArg_ParseTuple(args, "ii", &fp, &fsl))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (ScCore->primaryMainWindow()->doc->pagePositioning() == fp)
 		ScCore->primaryMainWindow()->doc->setPageSetFirstPage(ScCore->primaryMainWindow()->doc->pagePositioning(), fsl);
@@ -300,7 +300,7 @@
 
 PyObject *scribus_closemasterpage(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->view->hideMasterPage();
 //	Py_INCREF(Py_None);
@@ -310,7 +310,7 @@
 
 PyObject *scribus_masterpagenames(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PyObject* names = PyList_New(ScCore->primaryMainWindow()->doc->MasterPages.count());
 	QMap<QString,int>::const_iterator it(ScCore->primaryMainWindow()->doc->MasterNames.constBegin());
@@ -328,7 +328,7 @@
 	char* name = nullptr;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const QString masterPageName(name);
 	const QMap<QString,int>& masterNames(ScCore->primaryMainWindow()->doc->MasterNames);
@@ -349,7 +349,7 @@
 	char* name = nullptr;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const QString masterPageName(name);
 	if (ScCore->primaryMainWindow()->doc->MasterNames.contains(masterPageName))
@@ -368,7 +368,7 @@
 	char* name = nullptr;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const QString masterPageName(name);
 	if (!ScCore->primaryMainWindow()->doc->MasterNames.contains(masterPageName))
@@ -395,7 +395,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
@@ -412,7 +412,7 @@
 	int page = 0;
 	if (!PyArg_ParseTuple(args, "esi", const_cast<char*>("utf-8"), &name, &page))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const QString masterPageName(name);
 	if (!ScCore->primaryMainWindow()->doc->MasterNames.contains(masterPageName))

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	Mon Aug 27 19:29:00 2018
@@ -19,7 +19,7 @@
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
 
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 
 	item = GetUniqueItem(QString::fromUtf8(Name));
@@ -52,7 +52,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyString_FromString(i->fillColor().toUtf8()) : nullptr;
@@ -63,7 +63,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(1.0 - i->fillTransparency())) : nullptr;
@@ -74,7 +74,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->fillBlendmode())) : nullptr;
@@ -85,7 +85,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it;
 	it = GetUniqueItem(QString::fromUtf8(Name));
@@ -100,7 +100,7 @@
 	PageItem *it;
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -124,7 +124,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(1.0 - i->lineTransparency())) : nullptr;
@@ -135,7 +135,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->lineBlendmode())) : nullptr;
@@ -146,7 +146,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(i->lineWidth())) : nullptr;
@@ -158,7 +158,7 @@
 	PageItem *it;
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -181,7 +181,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->PLineJoin)) : nullptr;
@@ -192,7 +192,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->PLineEnd)) : nullptr;
@@ -203,7 +203,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->PLineArt)) : nullptr;
@@ -214,7 +214,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->fillShade())) : nullptr;
@@ -225,7 +225,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->cornerRadius())) : nullptr;
@@ -236,7 +236,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? Py_BuildValue("(ff)", i->imageXScale() / 72.0 * i->pixm.imgInfo.xres, i->imageYScale() / 72.0 * i->pixm.imgInfo.yres) : nullptr;
@@ -247,7 +247,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyString_FromString(i->Pfile.toUtf8()) : nullptr;
@@ -258,7 +258,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (!i)
@@ -272,7 +272,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return (i != nullptr) ? Py_BuildValue("(ff)", PointToValue(i->width()), PointToValue(i->height())) : nullptr;
@@ -283,7 +283,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(i->rotation() * -1)) : nullptr;
@@ -303,13 +303,13 @@
 		return nullptr;
 
 	int numpages = ScCore->primaryMainWindow()->doc->Pages->count();
-	if(pageNr < 0 || pageNr >= numpages){
+	if (pageNr < 0 || pageNr >= numpages) {
 		PyErr_SetString(PyExc_RuntimeError, QObject::tr("page number is invalid.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
 	//if (!PyArg_ParseTuple(args, "|i", &typ))
 	//	return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	// have doc already
 	if (typ != -1)
@@ -354,7 +354,7 @@
 
 PyObject *scribus_getobjectattributes(PyObject* /* self */, PyObject* args)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	Mon Aug 27 19:29:00 2018
@@ -22,7 +22,7 @@
 	char *Image;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Image, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -44,7 +44,7 @@
 	double x, y;
 	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -86,7 +86,7 @@
 	double x, y;
 	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -129,7 +129,7 @@
 	double x, y;
 	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -173,7 +173,7 @@
 	double n;
 	if (!PyArg_ParseTuple(args, "d|es", &n, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -203,7 +203,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -232,7 +232,7 @@
 	double x, y;
 	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item==nullptr)
@@ -270,7 +270,7 @@
 	double x, y;
 	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -309,7 +309,7 @@
 	double x;
 	if (!PyArg_ParseTuple(args, "d|es", &x, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -326,7 +326,7 @@
 	double x;
 	if (!PyArg_ParseTuple(args, "d|es", &x, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -343,7 +343,7 @@
 	double x, y;
 	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)
@@ -414,7 +414,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -433,7 +433,7 @@
 	double sc;
 	if (!PyArg_ParseTuple(args, "d|es", &sc, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (sc == 0.0)
 	{
@@ -461,7 +461,7 @@
 	int i = 0;
 	if (!PyArg_ParseTuple(args, "|i", &i))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((i < static_cast<int>(ScCore->primaryMainWindow()->doc->m_Selection->count())) && (i > -1))
 		return PyString_FromString(ScCore->primaryMainWindow()->doc->m_Selection->itemAt(i)->itemName().toUtf8());
@@ -471,7 +471,7 @@
 
 PyObject *scribus_selcount(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	return PyInt_FromLong(static_cast<long>(ScCore->primaryMainWindow()->doc->m_Selection->count()));
 }
@@ -481,7 +481,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -494,7 +494,7 @@
 
 PyObject *scribus_deselect(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->view->Deselect();
 //	Py_INCREF(Py_None);
@@ -507,7 +507,7 @@
 	char *name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == nullptr)
@@ -525,7 +525,7 @@
 		return nullptr;
 	// FIXME: Rather than toggling the lock, we should probably let the user set the lock state
 	// and instead provide a different function like toggleLock()
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == nullptr)
@@ -537,7 +537,7 @@
 
 PyObject *scribus_setscaleframetoimage(PyObject* /* self */, PyObject* args)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
@@ -567,7 +567,7 @@
 		const_cast<char*>("proportional"), const_cast<char*>("name"), nullptr};
 	if (!PyArg_ParseTupleAndKeywords(args, kw, "i|ies", kwargs, &scaleToFrame, &proportional, "utf-8", &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == nullptr)
@@ -602,7 +602,7 @@
 	double h, v;
 	if (!PyArg_ParseTuple(args, "dd|es", &h, &v, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == nullptr)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	Mon Aug 27 19:29:00 2018
@@ -25,7 +25,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->DoDrawing = static_cast<bool>(e);
 //	Py_INCREF(Py_None);
@@ -150,7 +150,7 @@
 
 PyObject *scribus_getlayers(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PyObject *l;
 	l = PyList_New(ScCore->primaryMainWindow()->doc->Layers.count());
@@ -164,7 +164,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (Name == nullptr)
 	{
@@ -186,7 +186,7 @@
 
 PyObject *scribus_getactlayer(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	return PyString_FromString(ScCore->primaryMainWindow()->doc->activeLayerName().toUtf8());
 }
@@ -197,7 +197,7 @@
 	char *Layer = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Layer, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Layer) == 0)
 	{
@@ -241,7 +241,7 @@
 	int vis = 1;
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -274,7 +274,7 @@
 	int vis = 1;
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -307,7 +307,7 @@
 	int vis = 1;
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -340,7 +340,7 @@
 	int vis = 1;
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -373,7 +373,7 @@
 	int vis = 1;
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -406,7 +406,7 @@
 	int vis = 0;
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -439,7 +439,7 @@
 	double vis = 1.0;
 	if (!PyArg_ParseTuple(args, "esd", "utf-8", &Name, &vis))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -471,7 +471,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -502,7 +502,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -533,7 +533,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -564,7 +564,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -595,7 +595,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -626,7 +626,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -657,7 +657,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -689,7 +689,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -779,7 +779,7 @@
 PyObject *scribus_savepdfoptions(PyObject* /* self */, PyObject* args)
 {
 	char* file;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (!PyArg_ParseTuple(args, const_cast<char*>("es"), "utf-8", &file))
 		return nullptr;
@@ -796,7 +796,7 @@
 PyObject *scribus_readpdfoptions(PyObject* /* self */, PyObject* args)
 {
 	char* file;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (!PyArg_ParseTuple(args, const_cast<char*>("es"), "utf-8", &file))
 		return nullptr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp	Mon Aug 27 19:29:00 2018
@@ -16,14 +16,14 @@
 
 PyObject *scribus_actualpage(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	return PyInt_FromLong(static_cast<long>(ScCore->primaryMainWindow()->doc->currentPageNumber() + 1));
 }
 
 PyObject *scribus_redraw(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->view->DrawNew();
 	qApp->processEvents();
@@ -37,7 +37,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
@@ -53,7 +53,7 @@
 	char *Name;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	QString epsError;
 	bool ret = ScCore->primaryMainWindow()->DoSaveAsEps(QString::fromUtf8(Name), epsError);
@@ -76,7 +76,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
@@ -95,7 +95,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
@@ -116,7 +116,7 @@
 	QString qName(CommonStrings::trMasterPageNormal);
 	if (!PyArg_ParseTuple(args, "i|es", &e, "utf-8", &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 
 	int loc = (e > -1) ? e : ScCore->primaryMainWindow()->doc->Pages->count();
@@ -162,14 +162,14 @@
 
 PyObject *scribus_pagecount(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	return PyInt_FromLong(static_cast<long>(ScCore->primaryMainWindow()->doc->Pages->count()));
 }
 
 PyObject *scribus_pagedimension(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PyObject *t;
 	t = Py_BuildValue(
@@ -185,7 +185,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
@@ -207,7 +207,7 @@
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
@@ -225,7 +225,7 @@
 
 PyObject *scribus_getpageitems(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (ScCore->primaryMainWindow()->doc->Items->count() == 0)
 		return Py_BuildValue((char*)"[]");
@@ -257,7 +257,7 @@
 
 PyObject *scribus_getHguides(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	Guides g = ScCore->primaryMainWindow()->doc->currentPage()->guides.horizontals(GuideManagerCore::Standard);
 	int n = g.count();//ScCore->primaryMainWindow()->doc->currentPage->YGuides.count();
@@ -281,7 +281,7 @@
 	PyObject *l;
 	if (!PyArg_ParseTuple(args, "O", &l))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (!PyList_Check(l))
 	{
@@ -308,7 +308,7 @@
 
 PyObject *scribus_getVguides(PyObject* /* self */)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	Guides g = ScCore->primaryMainWindow()->doc->currentPage()->guides.verticals(GuideManagerCore::Standard);
 	int n = g.count();//ScCore->primaryMainWindow()->doc->currentPage->XGuides.count();
@@ -332,7 +332,7 @@
 	PyObject *l;
 	if (!PyArg_ParseTuple(args, "O", &l))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (!PyList_Check(l))
 	{
@@ -360,7 +360,7 @@
 PyObject *scribus_getpagemargins(PyObject* /* self */)
 {
 	PyObject *margins = nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	margins = Py_BuildValue("ffff", PointToValue(ScCore->primaryMainWindow()->doc->margins()->top()),
 									PointToValue(ScCore->primaryMainWindow()->doc->margins()->left()),
@@ -426,7 +426,7 @@
 
 	if (!PyArg_ParseTuple(args, "sO|iii", &doc, &pages, &createPageI, &importWhere, &importWherePage))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 
 	if (!PyTuple_Check(pages))

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp	Mon Aug 27 19:29:00 2018
@@ -17,7 +17,7 @@
 	int typ, shade1, shade2;
 	if (!PyArg_ParseTuple(args, "iesiesi|es", &typ, "utf-8", &Color1, &shade1, "utf-8", &Color2, &shade2, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((shade1 < 0) || (shade1 > 100) || (shade2 < 0) || (shade2 > 100))
 	{
@@ -94,7 +94,7 @@
 	double rampPoint, opacity;
 	if (!PyArg_ParseTuple(args, "esidd|es", "utf-8", &Color1, &shade1, &opacity, &rampPoint, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((shade1 < 0) || (shade1 > 100))
 	{
@@ -129,7 +129,7 @@
 	char *Color;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -144,7 +144,7 @@
 	double w;
 	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0.0) || (w > 1.0))
 	{
@@ -164,7 +164,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0) || (w > 15))
 	{
@@ -184,7 +184,7 @@
 	char *Style;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Style, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -206,7 +206,7 @@
 	char *Color;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -221,7 +221,7 @@
 	double w;
 	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0.0) || (w > 1.0))
 	{
@@ -241,7 +241,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0) || (w > 15))
 	{
@@ -261,7 +261,7 @@
 	double w;
 	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0.0) || (w > 300.0))
 	{
@@ -281,7 +281,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0) || (w > 100))
 	{
@@ -301,7 +301,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0) || (w > 100))
 	{
@@ -321,7 +321,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -336,7 +336,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -351,7 +351,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -366,7 +366,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (w < 0)
 	{
@@ -390,7 +390,7 @@
 	char *Style = nullptr;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Style, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *currItem = GetUniqueItem(QString::fromUtf8(Name));
 	if (currItem == nullptr)
@@ -410,7 +410,7 @@
 	char *newName = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &newName, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *currItem = GetUniqueItem(QString::fromUtf8(Name));
 	if (currItem == nullptr)
@@ -421,7 +421,7 @@
 
 PyObject *scribus_setobjectattributes(PyObject* /* self */, PyObject* args)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	char *Name = const_cast<char*>("");
 	PyObject *attr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp	Mon Aug 27 19:29:00 2018
@@ -47,7 +47,7 @@
 		&LeftMargin, &RightMargin, &GapBefore, &GapAfter, &FirstIndent,
 		&HasDropCap, &DropCapLines, &PEOffset, "utf-8", &CharStyle))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{
@@ -65,9 +65,9 @@
 	TmpParagraphStyle.setRightMargin(RightMargin);
 	TmpParagraphStyle.setGapBefore(GapBefore);
 	TmpParagraphStyle.setGapAfter(GapAfter);
-	if(HasDropCap == 0)
+	if (HasDropCap == 0)
 		TmpParagraphStyle.setHasDropCap(false);
-	else if(HasDropCap == 1)
+	else if (HasDropCap == 1)
 		TmpParagraphStyle.setHasDropCap(true);
 	else
 	{
@@ -125,7 +125,7 @@
 																									&ShadowYOffset, &OutlineWidth, &UnderlineOffset, &UnderlineWidth, &StrikethruOffset, &StrikethruWidth,
 																									&ScaleH, &ScaleV, &Tracking, "utf-8", &Language))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (strlen(Name) == 0)
 	{

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtable.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtable.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtable.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtable.cpp	Mon Aug 27 19:29:00 2018
@@ -16,7 +16,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -36,7 +36,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -57,7 +57,7 @@
 	int index, numRows;
 	if (!PyArg_ParseTuple(args, "ii|es", &index, &numRows, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -88,7 +88,7 @@
 	int index, numRows;
 	if (!PyArg_ParseTuple(args, "ii|es", &index, &numRows, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -124,7 +124,7 @@
 	int row;
 	if (!PyArg_ParseTuple(args, "i|es", &row, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -145,7 +145,7 @@
 	double height;
 	if (!PyArg_ParseTuple(args, "id|es", &row, &height, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -176,7 +176,7 @@
 	int index, numColumns;
 	if (!PyArg_ParseTuple(args, "ii|es", &index, &numColumns, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -207,7 +207,7 @@
 	int index, numColumns;
 	if (!PyArg_ParseTuple(args, "ii|es", &index, &numColumns, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -243,7 +243,7 @@
 	int column;
 	if (!PyArg_ParseTuple(args, "i|es", &column, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -264,7 +264,7 @@
 	double width;
 	if (!PyArg_ParseTuple(args, "id|es", &column, &width, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -295,7 +295,7 @@
 	int row, column, numRows, numColumns;
 	if (!PyArg_ParseTuple(args, "iiii|es", &row, &column, &numRows, &numColumns, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -327,7 +327,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -347,7 +347,7 @@
 	char *style;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &style, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -367,7 +367,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -387,7 +387,7 @@
 	char *color;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &color, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -408,7 +408,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "O|es", &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -436,7 +436,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "O|es", &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -464,7 +464,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "O|es", &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -492,7 +492,7 @@
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "O|es", &borderLines, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	Mon Aug 27 19:29:00 2018
@@ -51,7 +51,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -76,7 +76,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -101,7 +101,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -119,7 +119,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -137,7 +137,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -155,7 +155,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -180,7 +180,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -198,7 +198,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -220,7 +220,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -238,7 +238,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	QString text = "";
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
@@ -269,7 +269,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	QString text = "";
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
@@ -303,7 +303,7 @@
 	char *Text;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Text, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *currItem = GetUniqueItem(QString::fromUtf8(Name));
 	if (currItem == nullptr)
@@ -333,7 +333,7 @@
 	int pos;
 	if (!PyArg_ParseTuple(args, "esi|es", "utf-8", &Text, &pos, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -373,7 +373,7 @@
 		return nullptr;
 	}
 
-	if(!checkHaveDocument()) {
+	if (!checkHaveDocument()) {
 		return nullptr;
 	}
 
@@ -404,7 +404,7 @@
 	int alignment;
 	if (!PyArg_ParseTuple(args, "i|es", &alignment, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((alignment > 4) || (alignment < 0))
 	{
@@ -438,7 +438,7 @@
 	int direction;
 	if (!PyArg_ParseTuple(args, "i|es", &direction, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((direction > 1) || (direction < 0))
 	{
@@ -471,7 +471,7 @@
 	double size;
 	if (!PyArg_ParseTuple(args, "d|es", &size, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((size > 512) || (size < 1))
 	{
@@ -506,7 +506,7 @@
 	char *fontfeature = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &fontfeature, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
@@ -537,7 +537,7 @@
 	char *Font = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Font, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == nullptr)
@@ -574,7 +574,7 @@
 	double w;
 	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (w < 0.1)
 	{
@@ -611,7 +611,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (w < 0 || w > 3) // Use constants?
 	{
@@ -645,7 +645,7 @@
 	double l,r,t,b;
 	if (!PyArg_ParseTuple(args, "dddd|es", &l, &r, &t, &b, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (l < 0.0 || r < 0.0 || t < 0.0 || b < 0.0)
 	{
@@ -671,7 +671,7 @@
 	double w;
 	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (w < 0.0)
 	{
@@ -698,7 +698,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (w < 1)
 	{
@@ -725,7 +725,7 @@
 	int start, selcount;
 	if (!PyArg_ParseTuple(args, "ii|es", &start, &selcount, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -776,7 +776,7 @@
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -797,7 +797,7 @@
 	else
 	{
 		//Path text cannot have selected text, :( FIXME
-		if(it->isPathText())
+		if (it->isPathText())
 			it->itemText.clear();
 	}
 	Py_RETURN_NONE;
@@ -809,7 +809,7 @@
 	char *Color;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -843,7 +843,7 @@
 	char *Color;
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
@@ -878,7 +878,7 @@
 	double sc;
 	if (!PyArg_ParseTuple(args, "d|es", &sc, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (sc < 10)
 	{
@@ -913,7 +913,7 @@
 	double sc;
 	if (!PyArg_ParseTuple(args, "d|es", &sc, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (sc < 10)
 	{
@@ -948,7 +948,7 @@
 	int w;
 	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0) || (w > 100))
 	{
@@ -989,7 +989,7 @@
 
 	if (!PyArg_ParseTuple(args, "eses", "utf-8", &name1, "utf-8", &name2))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *fromitem = GetUniqueItem(QString::fromUtf8(name1));
 	if (fromitem == nullptr)
@@ -1037,7 +1037,7 @@
 	char *name;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == nullptr)
@@ -1092,7 +1092,7 @@
 	char *name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &name))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == nullptr)
@@ -1119,7 +1119,7 @@
 	char *kwargs[] = {const_cast<char*>("name"), const_cast<char*>("nolinks"), nullptr};
 	if (!PyArg_ParseTupleAndKeywords(args, kw, "|esi", kwargs, "utf-8", &name, &nolinks))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == nullptr)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp	Mon Aug 27 19:29:00 2018
@@ -38,7 +38,7 @@
 
 static PyObject * ImageExport_new(PyTypeObject *type, PyObject * /*args*/, PyObject * /*kwds*/)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 
 	ImageExport *self;
@@ -140,7 +140,7 @@
 
 static PyObject *ImageExport_save(ImageExport *self)
 {
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	ScribusDoc*  doc = ScCore->primaryMainWindow()->doc;
 	ScribusView*view = ScCore->primaryMainWindow()->view;
@@ -168,7 +168,7 @@
 static PyObject *ImageExport_saveAs(ImageExport *self, PyObject *args)
 {
 	char* value;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	if (!PyArg_ParseTuple(args, const_cast<char*>("es"), "utf-8", &value))
 		return nullptr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	Mon Aug 27 19:29:00 2018
@@ -540,7 +540,7 @@
 	QString html("<html><body>");
 	QFileInfo fi = QFileInfo(fname);
 	QFile input(fname);
-	if(!input.open(QIODevice::ReadOnly))
+	if (!input.open(QIODevice::ReadOnly))
 		return;
 	QTextStream intputstream(&input);
 	QString content = intputstream.readAll();

Modified: trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22653&path=/trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	Mon Aug 27 19:29:00 2018
@@ -29,7 +29,7 @@
 	double y = 0.0;
 	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	QStringList allFormatsV = LoadSavePlugin::getExtensionsForImport(FORMATID_FIRSTUSER);
 	QString fName = QString::fromUtf8(Image);
@@ -77,7 +77,7 @@
 	double y = 0.0;
 	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SVGIMPORT);
 	if (fmt)
@@ -110,7 +110,7 @@
 	double y = 0.0;
 	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_PSIMPORT);
 	if (fmt)
@@ -143,7 +143,7 @@
 	double y = 0.0;
 	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
 		return nullptr;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SXDIMPORT);
 	if (fmt)
@@ -176,7 +176,7 @@
 	double y = 0.0;
 	if (!nullptr(args, "es|dd", "utf-8", &Image, &x, &y))
 		return NULL;
-	if(!checkHaveDocument())
+	if (!checkHaveDocument())
 		return nullptr;
 	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_ODGIMPORT);
 	if (fmt)




More information about the scribus-commit mailing list