r22606 by craig - clazy and clang fixes, part 6

scribus-commit scribus-commit at lists.scribus.net
Sun Aug 5 10:47:50 UTC 2018


Author: craig
Date: Sun Aug  5 10:47:50 2018
New Revision: 22606

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22606
Log:
clazy and clang fixes, part 6

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp	Sun Aug  5 10:47:50 2018
@@ -488,7 +488,8 @@
 
 static void prepareannotation(PageItem *i)
 {
-	if (i->isBookmark == true){
+	if (i->isBookmark)
+	{
 	  i->isBookmark = false;
 	  ScCore->primaryMainWindow()->DelBookMark(i);
 	}

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp	Sun Aug  5 10:47:50 2018
@@ -78,7 +78,7 @@
 	uint result;
 	QMessageBox::Icon ico = QMessageBox::NoIcon;
 	int butt[3] = { QMessageBox::Ok|QMessageBox::Default, QMessageBox::NoButton, QMessageBox::NoButton };
-	QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons(0);
+	QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons(nullptr);
 	enum QMessageBox::StandardButton defaultButton = QMessageBox::NoButton;
 	char* kwargs[] = {const_cast<char*>("caption"), const_cast<char*>("message"),
 						const_cast<char*>("icon"), const_cast<char*>("button1"),
@@ -145,8 +145,7 @@
 		ScCore->primaryMainWindow()->styleMgr()->setDoc(d);
 		return PyString_FromString(s.toUtf8());
 	}
-	else
-		Py_RETURN_NONE;
+	Py_RETURN_NONE;
 }
 
 /*! HACK: this removes "warning: 'blash' defined but not used" compiler warnings

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp	Sun Aug  5 10:47:50 2018
@@ -325,7 +325,7 @@
 
 PyObject *scribus_editmasterpage(PyObject* /* self */, PyObject* args)
 {
-	char* name = 0;
+	char* name = nullptr;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
 		return nullptr;
 	if(!checkHaveDocument())
@@ -346,7 +346,7 @@
 
 PyObject* scribus_createmasterpage(PyObject* /* self */, PyObject* args)
 {
-	char* name = 0;
+	char* name = nullptr;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
 		return nullptr;
 	if(!checkHaveDocument())
@@ -365,7 +365,7 @@
 
 PyObject* scribus_deletemasterpage(PyObject* /* self */, PyObject* args)
 {
-	char* name = 0;
+	char* name = nullptr;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
 		return nullptr;
 	if(!checkHaveDocument())
@@ -408,7 +408,7 @@
 
 PyObject* scribus_applymasterpage(PyObject* /* self */, PyObject* args)
 {
-	char* name = 0;
+	char* name = nullptr;
 	int page = 0;
 	if (!PyArg_ParseTuple(args, "esi", const_cast<char*>("utf-8"), &name, &page))
 		return nullptr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	Sun Aug  5 10:47:50 2018
@@ -357,21 +357,21 @@
 PyObject *scribus_groupobj(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
-	PyObject *il = 0;
+	PyObject *il = nullptr;
 	if (!PyArg_ParseTuple(args, "|O", &il))
 		return nullptr;
 	if (!checkHaveDocument())
 		return nullptr;
-	if (il == 0 && ScCore->primaryMainWindow()->doc->m_Selection->count() < 2)
+	if (il == nullptr && ScCore->primaryMainWindow()->doc->m_Selection->count() < 2)
 	{
 		PyErr_SetString(PyExc_TypeError, QObject::tr("Need selection or argument list of items to group", "python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	Selection *tempSelection=0;
-	Selection *finalSelection=0;
+	Selection *tempSelection=nullptr;
+	Selection *finalSelection=nullptr;
 	//uint ap = ScCore->primaryMainWindow()->doc->currentPage()->pageNr();
 	// If we were passed a list of items to group...
-	if (il != 0)
+	if (il != nullptr)
 	{
 		int len = PyList_Size(il);
 		tempSelection = new Selection(ScCore->primaryMainWindow(), false);
@@ -397,13 +397,13 @@
 	{
 		// We can't very well group only one item
 		PyErr_SetString(NoValidObjectError, QObject::tr("Cannot group less than two items", "python error").toLocal8Bit().constData());
-		finalSelection=0;
+		finalSelection=nullptr;
 		delete tempSelection;
 		return nullptr;
 	}
 
 	const PageItem* group = ScCore->primaryMainWindow()->doc->itemSelection_GroupObjects(false, false, finalSelection);
-	finalSelection=0;
+	finalSelection=nullptr;
 	delete tempSelection;
 	
 	return (group ? PyString_FromString(group->itemName().toUtf8()) : nullptr);

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	Sun Aug  5 10:47:50 2018
@@ -168,7 +168,7 @@
 		return nullptr;
 	if(!checkHaveDocument())
 		return nullptr;
-	if (Name == 0)
+	if (Name == nullptr)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error").toLocal8Bit().constData());
 		return nullptr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp	Sun Aug  5 10:47:50 2018
@@ -37,7 +37,7 @@
 			const_cast<char*>("dropcaplines"),
 			const_cast<char*>("dropcapoffset"),
 			const_cast<char*>("charstyle"),
-			NULL};
+			nullptr};
 	char *Name = const_cast<char*>(""), *CharStyle = const_cast<char*>("");
 	int LineSpacingMode = 0, Alignment = 0, DropCapLines = 2, HasDropCap = 0;
 	double LineSpacing = 15.0, LeftMargin = 0.0, RightMargin = 0.0;
@@ -46,13 +46,13 @@
 		 keywordargs, "utf-8", &Name, &LineSpacingMode, &LineSpacing, &Alignment,
 		&LeftMargin, &RightMargin, &GapBefore, &GapAfter, &FirstIndent,
 		&HasDropCap, &DropCapLines, &PEOffset, "utf-8", &CharStyle))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (strlen(Name) == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty paragraph style name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 	ParagraphStyle TmpParagraphStyle;
@@ -72,7 +72,7 @@
 	else
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("hasdropcap has to be 0 or 1.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	TmpParagraphStyle.setDropCapLines(DropCapLines);
 	TmpParagraphStyle.setParEffectOffset(PEOffset);
@@ -116,7 +116,7 @@
 					  							const_cast<char*>("scalev"),
 					  							const_cast<char*>("tracking"),
 					  							const_cast<char*>("language"),
-					  						NULL};
+											nullptr};
 	char *Name = const_cast<char*>(""), *Font = const_cast<char*>("Times"), *Features = const_cast<char*>("inherit"), *FillColor = const_cast<char*>("Black"), *FontFeatures = const_cast<char*>(""), *StrokeColor = const_cast<char*>("Black"), *Language = const_cast<char*>("");
 	double FontSize = 200, FillShade = 1, StrokeShade = 1, ScaleH = 1, ScaleV = 1, BaselineOffset = 0, ShadowXOffset = 0, ShadowYOffset = 0, OutlineWidth = 0, UnderlineOffset = 0, UnderlineWidth = 0, StrikethruOffset = 0, StrikethruWidth = 0, Tracking = 0;
 	if (!PyArg_ParseTupleAndKeywords(args, keywords, "es|esdesesdesddddddddddddes", keywordargs,
@@ -124,13 +124,13 @@
 																									"utf-8", &FillColor, &FillShade, "utf-8", &StrokeColor, &StrokeShade, &BaselineOffset, &ShadowXOffset,
 																									&ShadowYOffset, &OutlineWidth, &UnderlineOffset, &UnderlineWidth, &StrikethruOffset, &StrikethruWidth,
 																									&ScaleH, &ScaleV, &Tracking, "utf-8", &Language))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (strlen(Name) == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty char style name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 	QStringList FeaturesList = QString(Features).split(QString(","));
@@ -176,11 +176,11 @@
 	PyObject *obj;
 
 	if (!PyArg_ParseTuple(args, "esO", "utf-8", &Name, &obj))
-		return NULL;
+		return nullptr;
 
 	if (!PyList_Check(obj)) {
 		PyErr_SetString(PyExc_TypeError, "'style' must be list.");
-		return NULL;
+		return nullptr;
 	}
 
 	multiLine ml;
@@ -188,7 +188,7 @@
 		PyObject *line = PyList_GetItem(obj, i);
 		if (!PyDict_Check(line)) {
 			PyErr_SetString(PyExc_TypeError, "elements of list must be Dictionary.");
-			return NULL;
+			return nullptr;
 		}
 		struct SingleLine sl;
 		PyObject *val;
@@ -230,7 +230,7 @@
 			ml.shortcut = "";
 		ml.push_back(sl);
 	}
-	if (ml.size() > 0)
+	if (!ml.empty())
 		ScCore->primaryMainWindow()->doc->MLineStyles[Name] = ml;
 	Py_RETURN_NONE;
 }

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	Sun Aug  5 10:47:50 2018
@@ -1019,12 +1019,12 @@
 		PyErr_SetString(ScribusException, QObject::tr("Target frame must be empty.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}*/
-	if (toitem->nextInChain() != 0)
+	if (toitem->nextInChain() != nullptr)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Target frame links to another frame.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-	if (toitem->prevInChain() != 0)
+	if (toitem->prevInChain() != nullptr)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Target frame is linked to by another frame.","python error").toLocal8Bit().constData());
 		return nullptr;
@@ -1060,7 +1060,7 @@
 		return nullptr;
 	}
 	// only linked
-	if (item->prevInChain() == 0)
+	if (item->prevInChain() == nullptr)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Object is not a linked text frame, can't unlink.","python error").toLocal8Bit().constData());
 		return nullptr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp	Sun Aug  5 10:47:50 2018
@@ -183,7 +183,7 @@
 	for (QStringList::Iterator it = itemNames.begin() ; it != itemNames.end() ; it++)
 	{
 		// Search for the named item
-		PageItem* item = 0;
+		PageItem* item = nullptr;
 		for (int j = 0; j < ScCore->primaryMainWindow()->doc->Items->count(); j++)
 			if (*it == ScCore->primaryMainWindow()->doc->Items->at(j)->itemName())
 				item = ScCore->primaryMainWindow()->doc->Items->at(j);

Modified: trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp	Sun Aug  5 10:47:50 2018
@@ -18,7 +18,7 @@
 {
 	char *aText;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &aText))
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->setStatusBarInfoText(QString::fromUtf8(aText));
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -38,7 +38,7 @@
 {
 	int steps;
 	if (!PyArg_ParseTuple(args, "i", &steps))
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->mainWindowProgressBar->setMaximum(steps);
 	ScCore->primaryMainWindow()->mainWindowProgressBar->setValue(0);
 	qApp->processEvents();
@@ -51,11 +51,11 @@
 {
 	int position;
 	if (!PyArg_ParseTuple(args, "i", &position))
-		return NULL;
+		return nullptr;
 	if (position > ScCore->primaryMainWindow()->mainWindowProgressBar->maximum())
 	{
 		PyErr_SetString(PyExc_ValueError, QString("Tried to set progress > maximum progress").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	ScCore->primaryMainWindow()->mainWindowProgressBar->setValue(position);
 	qApp->processEvents();
@@ -70,7 +70,7 @@
 	char *aCursor;
 	qDebug("WARNING! SetCursor() is not stable!");
 	if (!PyArg_ParseTuple(args, "es", "ascii", &aCursor))
-		return NULL;
+		return nullptr;
 	if (strcmp(aCursor, "wait") == 0)
 		qApp->changeOverrideCursor(Qt::WaitCursor);
 //	else
@@ -84,9 +84,9 @@
 {
 	int aValue;
 	if (!PyArg_ParseTuple(args, "i", &aValue))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->slotDocCh(static_cast<bool>(aValue));
 	/*
 	if (aValue>0)
@@ -102,15 +102,15 @@
 {
 	double zoomFactor;
 	if (!PyArg_ParseTuple(args, "d", &zoomFactor))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (zoomFactor > 0.0 || zoomFactor == -100.0)
 		ScCore->primaryMainWindow()->slotZoom(zoomFactor);
 	else
 	{
 		PyErr_SetString(PyExc_ValueError, QString("The zoom factor should be greater than 0.0 or equal to -100.0. See help(zoomFactor).").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -125,9 +125,9 @@
 {
 	int moveX = 0, moveY = 0;
 	if(!PyArg_ParseTuple(args, "ii", &moveX, &moveY))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->view->scrollBy(moveX,moveY);
 	Py_RETURN_NONE;
 }

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp	Sun Aug  5 10:47:50 2018
@@ -199,7 +199,7 @@
 static PyMethodDef ImageExport_methods[] = {
 	{const_cast<char*>("save"), (PyCFunction)ImageExport_save, METH_NOARGS, imgexp_save__doc__},
 	{const_cast<char*>("saveAs"), (PyCFunction)ImageExport_saveAs, METH_VARARGS, imgexp_saveas__doc__},
-	{nullptr, (PyCFunction)(0), 0, nullptr} // sentinel
+	{nullptr, (PyCFunction)(nullptr), 0, nullptr} // sentinel
 };
 
 PyTypeObject ImageExport_Type = {
@@ -209,47 +209,47 @@
 	sizeof(ImageExport),   // int tp_basicsize, /* For allocation */
 	0,  // int tp_itemsize; /* For allocation */
 	(destructor) ImageExport_dealloc, //	 destructor tp_dealloc;
-	0, //	 printfunc tp_print;
-	0, //	 getattrfunc tp_getattr;
-	0, //	 setattrfunc tp_setattr;
-	0, //	 cmpfunc tp_compare;
-	0, //	 reprfunc tp_repr;
-	0, //	 PyNumberMethods *tp_as_number;
-	0, //	 PySequenceMethods *tp_as_sequence;
-	0, //	 PyMappingMethods *tp_as_mapping;
-	0, //	 hashfunc tp_hash;
-	0, //	 ternaryfunc tp_call;
-	0, //	 reprfunc tp_str;
-	0, //	 getattrofunc tp_getattro;
-	0, //	 setattrofunc tp_setattro;
-	0, //	 PyBufferProcs *tp_as_buffer;
+	nullptr, //	 printfunc tp_print;
+	nullptr, //	 getattrfunc tp_getattr;
+	nullptr, //	 setattrfunc tp_setattr;
+	nullptr, //	 cmpfunc tp_compare;
+	nullptr, //	 reprfunc tp_repr;
+	nullptr, //	 PyNumberMethods *tp_as_number;
+	nullptr, //	 PySequenceMethods *tp_as_sequence;
+	nullptr, //	 PyMappingMethods *tp_as_mapping;
+	nullptr, //	 hashfunc tp_hash;
+	nullptr, //	 ternaryfunc tp_call;
+	nullptr, //	 reprfunc tp_str;
+	nullptr, //	 getattrofunc tp_getattro;
+	nullptr, //	 setattrofunc tp_setattro;
+	nullptr, //	 PyBufferProcs *tp_as_buffer;
 	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,	// long tp_flags;
 	imgexp__doc__, // char *tp_doc; /* Documentation string */
-	0, //	 traverseproc tp_traverse;
-	0, //	 inquiry tp_clear;
-	0, //	 richcmpfunc tp_richcompare;
+	nullptr, //	 traverseproc tp_traverse;
+	nullptr, //	 inquiry tp_clear;
+	nullptr, //	 richcmpfunc tp_richcompare;
 	0, //	 long tp_weaklistoffset;
-	0, //	 getiterfunc tp_iter;
-	0, //	 iternextfunc tp_iternext;
+	nullptr, //	 getiterfunc tp_iter;
+	nullptr, //	 iternextfunc tp_iternext;
 	ImageExport_methods, //	 struct PyMethodDef *tp_methods;
 	ImageExport_members, //	 struct PyMemberDef *tp_members;
 	ImageExport_getseters, //	 struct PyGetSetDef *tp_getset;
-	0, //	 struct _typeobject *tp_base;
-	0, //	 PyObject *tp_dict;
-	0, //	 descrgetfunc tp_descr_get;
-	0, //	 descrsetfunc tp_descr_set;
+	nullptr, //	 struct _typeobject *tp_base;
+	nullptr, //	 PyObject *tp_dict;
+	nullptr, //	 descrgetfunc tp_descr_get;
+	nullptr, //	 descrsetfunc tp_descr_set;
 	0, //	 long tp_dictoffset;
 	(initproc)ImageExport_init, //	 initproc tp_init;
-	0, //	 allocfunc tp_alloc;
+	nullptr, //	 allocfunc tp_alloc;
 	ImageExport_new, //	 newfunc tp_new;
-	0, //	 freefunc tp_free; /* Low-level free-memory routine */
-	0, //	 inquiry tp_is_gc; /* For PyObject_IS_GC */
-	0, //	 PyObject *tp_bases;
-	0, //	 PyObject *tp_mro; /* method resolution order */
-	0, //	 PyObject *tp_cache;
-	0, //	 PyObject *tp_subclasses;
-	0, //	 PyObject *tp_weaklist;
-	0, //	 destructor tp_del;
+	nullptr, //	 freefunc tp_free; /* Low-level free-memory routine */
+	nullptr, //	 inquiry tp_is_gc; /* For PyObject_IS_GC */
+	nullptr, //	 PyObject *tp_bases;
+	nullptr, //	 PyObject *tp_mro; /* method resolution order */
+	nullptr, //	 PyObject *tp_cache;
+	nullptr, //	 PyObject *tp_subclasses;
+	nullptr, //	 PyObject *tp_weaklist;
+	nullptr, //	 destructor tp_del;
 
 #ifdef COUNT_ALLOCS
 	/* these must be last and never explicitly initialized */

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp	Sun Aug  5 10:47:50 2018
@@ -1544,7 +1544,7 @@
 
 static PyMethodDef PDFfile_methods[] = {
 	{const_cast<char*>("save"), (PyCFunction)PDFfile_save, METH_NOARGS, const_cast<char*>("Save selected pages to pdf file")},
-	{nullptr, (PyCFunction)(0), 0, nullptr} // sentinel
+	{nullptr, (PyCFunction)(nullptr), 0, nullptr} // sentinel
 };
 
 PyTypeObject PDFfile_Type = {
@@ -1557,28 +1557,28 @@
 	/* Methods to implement standard operations */
 
 	(destructor) PDFfile_dealloc, //     destructor tp_dealloc;
-	0, //     printfunc tp_print;
-	0, //     getattrfunc tp_getattr;
-	0, //     setattrfunc tp_setattr;
-	0, //     cmpfunc tp_compare;
-	0, //     reprfunc tp_repr;
+	nullptr, //     printfunc tp_print;
+	nullptr, //     getattrfunc tp_getattr;
+	nullptr, //     setattrfunc tp_setattr;
+	nullptr, //     cmpfunc tp_compare;
+	nullptr, //     reprfunc tp_repr;
 
 	/* Method suites for standard classes */
 
-	0, //     PyNumberMethods *tp_as_number;
-	0, //     PySequenceMethods *tp_as_sequence;
-	0, //     PyMappingMethods *tp_as_mapping;
+	nullptr, //     PyNumberMethods *tp_as_number;
+	nullptr, //     PySequenceMethods *tp_as_sequence;
+	nullptr, //     PyMappingMethods *tp_as_mapping;
 
 	/* More standard operations (here for binary compatibility) */
 
-	0, //     hashfunc tp_hash;
-	0, //     ternaryfunc tp_call;
-	0, //     reprfunc tp_str;
-	0, //     getattrofunc tp_getattro;
-	0, //     setattrofunc tp_setattro;
+	nullptr, //     hashfunc tp_hash;
+	nullptr, //     ternaryfunc tp_call;
+	nullptr, //     reprfunc tp_str;
+	nullptr, //     getattrofunc tp_getattro;
+	nullptr, //     setattrofunc tp_setattro;
 
 	/* Functions to access object as input/output buffer */
-	0, //     PyBufferProcs *tp_as_buffer;
+	nullptr, //     PyBufferProcs *tp_as_buffer;
 
 	/* Flags to define presence of optional/expanded features */
 	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,    // long tp_flags;
@@ -1587,43 +1587,43 @@
 
 	/* Assigned meaning in release 2.0 */
 	/* call function for all accessible objects */
-	0, //     traverseproc tp_traverse;
+	nullptr, //     traverseproc tp_traverse;
 
 	/* delete references to contained objects */
-	0, //     inquiry tp_clear;
+	nullptr, //     inquiry tp_clear;
 
 	/* Assigned meaning in release 2.1 */
 	/* rich comparisons */
-	0, //     richcmpfunc tp_richcompare;
+	nullptr, //     richcmpfunc tp_richcompare;
 
 	/* weak reference enabler */
 	0, //     long tp_weaklistoffset;
 
 	/* Added in release 2.2 */
 	/* Iterators */
-	0, //     getiterfunc tp_iter;
-	0, //     iternextfunc tp_iternext;
+	nullptr, //     getiterfunc tp_iter;
+	nullptr, //     iternextfunc tp_iternext;
 
 	/* Attribute descriptor and subclassing stuff */
 	PDFfile_methods, //     struct PyMethodDef *tp_methods;
 	PDFfile_members, //     struct PyMemberDef *tp_members;
 	PDFfile_getseters, //     struct PyGetSetDef *tp_getset;
-	0, //     struct _typeobject *tp_base;
-	0, //     PyObject *tp_dict;
-	0, //     descrgetfunc tp_descr_get;
-	0, //     descrsetfunc tp_descr_set;
+	nullptr, //     struct _typeobject *tp_base;
+	nullptr, //     PyObject *tp_dict;
+	nullptr, //     descrgetfunc tp_descr_get;
+	nullptr, //     descrsetfunc tp_descr_set;
 	0, //     long tp_dictoffset;
 	(initproc)PDFfile_init, //     initproc tp_init;
-	0, //     allocfunc tp_alloc;
+	nullptr, //     allocfunc tp_alloc;
 	PDFfile_new, //     newfunc tp_new;
-	0, //     freefunc tp_free; /* Low-level free-memory routine */
-	0, //     inquiry tp_is_gc; /* For PyObject_IS_GC */
-	0, //     PyObject *tp_bases;
-	0, //     PyObject *tp_mro; /* method resolution order */
-	0, //     PyObject *tp_cache;
-	0, //     PyObject *tp_subclasses;
-	0, //     PyObject *tp_weaklist;
-	0, //     destructor tp_del;
+	nullptr, //     freefunc tp_free; /* Low-level free-memory routine */
+	nullptr, //     inquiry tp_is_gc; /* For PyObject_IS_GC */
+	nullptr, //     PyObject *tp_bases;
+	nullptr, //     PyObject *tp_mro; /* method resolution order */
+	nullptr, //     PyObject *tp_cache;
+	nullptr, //     PyObject *tp_subclasses;
+	nullptr, //     PyObject *tp_weaklist;
+	nullptr, //     destructor tp_del;
 
 #ifdef COUNT_ALLOCS
 	/* these must be last and never explicitly initialized */

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	Sun Aug  5 10:47:50 2018
@@ -508,7 +508,7 @@
 
 static PyMethodDef Printer_methods[] = {
 	{const_cast<char*>("printNow"), (PyCFunction)Printer_print, METH_NOARGS, const_cast<char*>("Prints selected pages.")},
-	{nullptr, (PyCFunction)(0), 0, nullptr} // sentinel
+	{nullptr, (PyCFunction)(nullptr), 0, nullptr} // sentinel
 };
 
 PyTypeObject Printer_Type = {
@@ -521,28 +521,28 @@
 	/* Methods to implement standard operations */
 
 	(destructor) Printer_dealloc, //     destructor tp_dealloc;
-	0, //     printfunc tp_print;
-	0, //     getattrfunc tp_getattr;
-	0, //     setattrfunc tp_setattr;
-	0, //     cmpfunc tp_compare;
-	0, //     reprfunc tp_repr;
+	nullptr, //     printfunc tp_print;
+	nullptr, //     getattrfunc tp_getattr;
+	nullptr, //     setattrfunc tp_setattr;
+	nullptr, //     cmpfunc tp_compare;
+	nullptr, //     reprfunc tp_repr;
 
 	/* Method suites for standard classes */
 
-	0, //     PyNumberMethods *tp_as_number;
-	0, //     PySequenceMethods *tp_as_sequence;
-	0, //     PyMappingMethods *tp_as_mapping;
+	nullptr, //     PyNumberMethods *tp_as_number;
+	nullptr, //     PySequenceMethods *tp_as_sequence;
+	nullptr, //     PyMappingMethods *tp_as_mapping;
 
 	/* More standard operations (here for binary compatibility) */
 
-	0, //     hashfunc tp_hash;
-	0, //     ternaryfunc tp_call;
-	0, //     reprfunc tp_str;
-	0, //     getattrofunc tp_getattro;
-	0, //     setattrofunc tp_setattro;
+	nullptr, //     hashfunc tp_hash;
+	nullptr, //     ternaryfunc tp_call;
+	nullptr, //     reprfunc tp_str;
+	nullptr, //     getattrofunc tp_getattro;
+	nullptr, //     setattrofunc tp_setattro;
 
 	/* Functions to access object as input/output buffer */
-	0, //     PyBufferProcs *tp_as_buffer;
+	nullptr, //     PyBufferProcs *tp_as_buffer;
 
 	/* Flags to define presence of optional/expanded features */
 	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,    // long tp_flags;
@@ -551,43 +551,43 @@
 
 	/* Assigned meaning in release 2.0 */
 	/* call function for all accessible objects */
-	0, //     traverseproc tp_traverse;
+	nullptr, //     traverseproc tp_traverse;
 
 	/* delete references to contained objects */
-	0, //     inquiry tp_clear;
+	nullptr, //     inquiry tp_clear;
 
 	/* Assigned meaning in release 2.1 */
 	/* rich comparisons */
-	0, //     richcmpfunc tp_richcompare;
+	nullptr, //     richcmpfunc tp_richcompare;
 
 	/* weak reference enabler */
 	0, //     long tp_weaklistoffset;
 
 	/* Added in release 2.2 */
 	/* Iterators */
-	0, //     getiterfunc tp_iter;
-	0, //     iternextfunc tp_iternext;
+	nullptr, //     getiterfunc tp_iter;
+	nullptr, //     iternextfunc tp_iternext;
 
 	/* Attribute descriptor and subclassing stuff */
 	Printer_methods, //     struct PyMethodDef *tp_methods;
 	Printer_members, //     struct PyMemberDef *tp_members;
 	Printer_getseters, //     struct PyGetSetDef *tp_getset;
-	0, //     struct _typeobject *tp_base;
-	0, //     PyObject *tp_dict;
-	0, //     descrgetfunc tp_descr_get;
-	0, //     descrsetfunc tp_descr_set;
+	nullptr, //     struct _typeobject *tp_base;
+	nullptr, //     PyObject *tp_dict;
+	nullptr, //     descrgetfunc tp_descr_get;
+	nullptr, //     descrsetfunc tp_descr_set;
 	0, //     long tp_dictoffset;
 	(initproc)Printer_init, //     initproc tp_init;
-	0, //     allocfunc tp_alloc;
+	nullptr, //     allocfunc tp_alloc;
 	Printer_new, //     newfunc tp_new;
-	0, //     freefunc tp_free; /* Low-level free-memory routine */
-	0, //     inquiry tp_is_gc; /* For PyObject_IS_GC */
-	0, //     PyObject *tp_bases;
-	0, //     PyObject *tp_mro; /* method resolution order */
-	0, //     PyObject *tp_cache;
-	0, //     PyObject *tp_subclasses;
-	0, //     PyObject *tp_weaklist;
-	0, //     destructor tp_del;
+	nullptr, //     freefunc tp_free; /* Low-level free-memory routine */
+	nullptr, //     inquiry tp_is_gc; /* For PyObject_IS_GC */
+	nullptr, //     PyObject *tp_bases;
+	nullptr, //     PyObject *tp_mro; /* method resolution order */
+	nullptr, //     PyObject *tp_cache;
+	nullptr, //     PyObject *tp_subclasses;
+	nullptr, //     PyObject *tp_weaklist;
+	nullptr, //     destructor tp_del;
 
 #ifdef COUNT_ALLOCS
 	/* these must be last and never explicitly initialized */

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	Sun Aug  5 10:47:50 2018
@@ -557,7 +557,7 @@
 	}
 	html += "</body></html>";
 	input.close();
-	HelpBrowser *dia = new HelpBrowser(0, QObject::tr("About Script") + " " + fi.fileName(), "en");
+	HelpBrowser *dia = new HelpBrowser(nullptr, QObject::tr("About Script") + " " + fi.fileName(), "en");
 	dia->setHtml(html);
 	dia->show();
 }

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	Sun Aug  5 10:47:50 2018
@@ -98,7 +98,7 @@
 
 ScPlugin* scriptplugin_getPlugin()
 {
-	scripterCore=0;
+	scripterCore=nullptr;
 	ScriptPlugin* plug = new ScriptPlugin();
 	Q_CHECK_PTR(plug);
 	return plug;
@@ -592,7 +592,7 @@
 	{const_cast<char*>("setTextAnnotation"), scribus_settextannotation, METH_VARARGS,tr(scribus_settextannotation__doc__)},
 	{const_cast<char*>("createPdfAnnotation"), scribus_createpdfannotation, METH_VARARGS,tr(scribus_createpdfannotation__doc__)},
 	{const_cast<char*>("isAnnotated"),(PyCFunction)scribus_isannotated, METH_VARARGS|METH_KEYWORDS,tr(scribus_isannotated__doc__)},
-	{nullptr, (PyCFunction)(0), 0, nullptr} /* sentinel */
+	{nullptr, (PyCFunction)(nullptr), 0, nullptr} /* sentinel */
 };
 
 void initscribus_failed(const char* fileName, int lineNo)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22606&path=/trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	Sun Aug  5 10:47:50 2018
@@ -28,9 +28,9 @@
 	double x = 0.0;
 	double y = 0.0;
 	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	QStringList allFormatsV = LoadSavePlugin::getExtensionsForImport(FORMATID_FIRSTUSER);
 	QString fName = QString::fromUtf8(Image);
 	QFileInfo fi = QFileInfo(fName);
@@ -38,7 +38,7 @@
 	if (!allFormatsV.contains(ext))
 	{
 		PyErr_SetString(PyExc_Exception, "Requested Import plugin not available");
-		return NULL;
+		return nullptr;
 	}
 	FileLoader *fileLoader = new FileLoader(fName);
 	int testResult = fileLoader->testFile();
@@ -63,7 +63,7 @@
 	else
 	{
 		PyErr_SetString(PyExc_Exception, "Requested File cannot be imported");
-		return NULL;
+		return nullptr;
 	}
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -76,76 +76,109 @@
 	double x = 0.0;
 	double y = 0.0;
 	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SVGIMPORT);
+	if (fmt)
+	{
+		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
+		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
+		{
+			double x2, y2, w, h;
+			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
+			ScCore->primaryMainWindow()->view->startGroupTransaction();
+			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
+			ScCore->primaryMainWindow()->view->endGroupTransaction();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
+		}
+	}
+	else
+	{
+		PyErr_SetString(PyExc_Exception, "SVG Import plugin not available");
+		return nullptr;
+	}
+//	Py_INCREF(Py_None);
+//	return Py_None;
+	Py_RETURN_NONE;
+}
+
+PyObject *scribus_placeeps(PyObject* /* self */, PyObject* args)
+{
+	char *Image;
+	double x = 0.0;
+	double y = 0.0;
+	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_PSIMPORT);
+	if (fmt)
+	{
+		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
+		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
+		{
+			double x2, y2, w, h;
+			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
+			ScCore->primaryMainWindow()->view->startGroupTransaction();
+			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
+			ScCore->primaryMainWindow()->view->endGroupTransaction();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
+		}
+	}
+	else
+	{
+		PyErr_SetString(PyExc_Exception, "EPS Import plugin not available");
+		return nullptr;
+	}
+//	Py_INCREF(Py_None);
+//	return Py_None;
+	Py_RETURN_NONE;
+}
+
+PyObject *scribus_placesxd(PyObject* /* self */, PyObject* args)
+{
+	char *Image;
+	double x = 0.0;
+	double y = 0.0;
+	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SXDIMPORT);
+	if (fmt)
+	{
+		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
+		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
+		{
+			double x2, y2, w, h;
+			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
+			ScCore->primaryMainWindow()->view->startGroupTransaction();
+			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
+			ScCore->primaryMainWindow()->view->endGroupTransaction();
+			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate)
+		}
+	}
+	else
+	{
+		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
+		return nullptr;
+	}
+//	Py_INCREF(Py_None);
+//	return Py_None;
+	Py_RETURN_NONE;
+}
+
+PyObject *scribus_placeodg(PyObject* /* self */, PyObject* args)
+{
+	char *Image;
+	double x = 0.0;
+	double y = 0.0;
+	if (!nullptr(args, "es|dd", "utf-8", &Image, &x, &y))
 		return NULL;
 	if(!checkHaveDocument())
-		return NULL;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SVGIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "SVG Import plugin not available");
-		return NULL;
-	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
-	Py_RETURN_NONE;
-}
-
-PyObject *scribus_placeeps(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_PSIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "EPS Import plugin not available");
-		return NULL;
-	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
-	Py_RETURN_NONE;
-}
-
-PyObject *scribus_placesxd(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SXDIMPORT);
+		return nullptr;
+	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_ODGIMPORT);
 	if (fmt)
 	{
 		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
@@ -162,40 +195,7 @@
 	else
 	{
 		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
-		return NULL;
-	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
-	Py_RETURN_NONE;
-}
-
-PyObject *scribus_placeodg(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_ODGIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate)
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
-		return NULL;
+		return nullptr;
 	}
 //	Py_INCREF(Py_None);
 //	return Py_None;




More information about the scribus-commit mailing list