r22658 by jghali - cleanup some old comments in scripter code

scribus-commit scribus-commit at lists.scribus.net
Mon Aug 27 21:30:44 UTC 2018


Author: jghali
Date: Mon Aug 27 21:30:44 2018
New Revision: 22658

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22658
Log:
cleanup some old comments in scripter code

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/objprinter.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=22658&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp	Mon Aug 27 21:30:44 2018
@@ -199,8 +199,6 @@
 	a.setExtern(QString::fromUtf8(""));
 	a.setActionType(Annotation::Action_GoTo);
 
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -240,7 +238,6 @@
 		a.setActionType(Annotation::Action_GoToR_FileRel);
 
 	Py_RETURN_NONE;
-
 }
 
 PyObject *scribus_seturiannotation(PyObject * /*self*/, PyObject* args)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&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 21:30:44 2018
@@ -165,6 +165,7 @@
 		}
 		(*colorList)[col].setCmykColor(c, m, y, k);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -203,6 +204,7 @@
 		}
 		(*colorList)[col].setCmykColorF(c, m, y, k);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -237,6 +239,7 @@
 		}
 		(*colorList)[col].setRgbColor(r, g, b);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -274,6 +277,7 @@
 		}
 		(*colorList)[col].setRgbColorF(r, g, b);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -311,6 +315,7 @@
 		}
 		(*colorList)[col].setLabColor(L, a, b);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -350,6 +355,7 @@
 			// silently changing colours in newColour?
 			(*colorList)[col].setCmykColor(c, m, y, k);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -400,6 +406,7 @@
 			(*colorList)[col].setCmykColorF(c, m, y, k);
 		}
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -434,6 +441,7 @@
 			// silently changing colours in newColour?
 			(*colorList)[col].setRgbColor(r, g, b);
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -483,6 +491,7 @@
 			(*colorList)[col].setRgbColorF(r, g, b);
 		}
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -532,6 +541,7 @@
 			(*colorList)[col].setLabColor(L, a, b);
 		}
 	}
+
 	Py_RETURN_NONE;
 }
 
@@ -572,8 +582,7 @@
 			return nullptr;
 		}
 	}
-// 	Py_INCREF(Py_None);
-// 	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -600,8 +609,7 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-// 	Py_INCREF(Py_None);
-// 	return Py_None;
+
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&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 21:30:44 2018
@@ -125,8 +125,7 @@
 	ScCore->primaryMainWindow()->doc->setModified(true);
 	ScCore->primaryMainWindow()->view->GotoPage(ScCore->primaryMainWindow()->doc->currentPageNumber());
 	ScCore->primaryMainWindow()->view->DrawNew();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -143,8 +142,7 @@
 	ScCore->primaryMainWindow()->doc->setModified(true);
 	//ScCore->primaryMainWindow()->view->GotoPage(ScCore->primaryMainWindow()->doc->currentPageNumber());
 	ScCore->primaryMainWindow()->view->DrawNew();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -186,8 +184,6 @@
 	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->slotFileSave();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -236,8 +232,7 @@
 	ScCore->primaryMainWindow()->doc->documentInfo().setTitle(QString::fromUtf8(Title));
 	ScCore->primaryMainWindow()->doc->documentInfo().setComments(QString::fromUtf8(Desc));
 	ScCore->primaryMainWindow()->slotDocCh();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -254,8 +249,7 @@
 		return nullptr;
 	}
 	ScCore->primaryMainWindow()->slotChangeUnit(e);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -274,8 +268,7 @@
 	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->loadStylesFromFile(QString::fromUtf8(fileName));
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -293,8 +286,7 @@
 	ScCore->primaryMainWindow()->view->DrawNew();   // is this needed?
 	//CB TODO ScCore->primaryMainWindow()->pagePalette->RebuildPage(); // is this needed?
 	ScCore->primaryMainWindow()->slotDocCh();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -303,8 +295,7 @@
 	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->view->hideMasterPage();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -339,8 +330,7 @@
 		return nullptr;
 	}
 	ScCore->primaryMainWindow()->view->showMasterPage(*it);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -358,8 +348,7 @@
 		return nullptr;
 	}
 	ScCore->primaryMainWindow()->doc->addMasterPage(ScCore->primaryMainWindow()->doc->MasterPages.count(), masterPageName);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -385,8 +374,7 @@
 	ScCore->primaryMainWindow()->doc->setMasterPageMode(true);
 	ScCore->primaryMainWindow()->deletePage2(ScCore->primaryMainWindow()->doc->MasterNames[masterPageName]);
 	ScCore->primaryMainWindow()->doc->setMasterPageMode(oldMode);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -431,8 +419,6 @@
 		PyErr_SetString(ScribusException, QObject::tr("Failed to apply masterpage '%1' on page: %2","python error").arg(masterPageName).arg(page).toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp	Mon Aug 27 21:30:44 2018
@@ -477,8 +477,6 @@
 	}
 
 	Py_DECREF(objValue);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&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 21:30:44 2018
@@ -33,8 +33,6 @@
 		return nullptr;
 	}
 	ScCore->primaryMainWindow()->doc->loadPict(QString::fromUtf8(Image), item);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -75,8 +73,6 @@
 	if (hadOrigSelection)
 		*ScCore->primaryMainWindow()->doc->m_Selection=tempSelection;
 
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -119,8 +115,6 @@
 	if (hadOrigSelection)
 		*ScCore->primaryMainWindow()->doc->m_Selection=tempSelection;
 
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 PyObject *scribus_setimageoffset(PyObject* /* self */, PyObject* args)
@@ -162,8 +156,6 @@
 	if (hadOrigSelection)
 		*ScCore->primaryMainWindow()->doc->m_Selection=tempSelection;
 
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -193,8 +185,6 @@
 	item->pixm.applyEffect(item->effectsInUse, ScCore->primaryMainWindow()->doc->PageColors, false);
 	
 	ScCore->primaryMainWindow()->doc->updatePic();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -221,8 +211,6 @@
 	item->pixm.applyEffect(item->effectsInUse, ScCore->primaryMainWindow()->doc->PageColors, false);
 	
 	ScCore->primaryMainWindow()->doc->updatePic();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -315,8 +303,6 @@
 	if (item == nullptr)
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->rotateItem(item->rotation() - x, item);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -332,8 +318,6 @@
 	if (item == nullptr)
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->rotateItem(x * -1.0, item);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -349,8 +333,6 @@
 	if (item == nullptr)
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->sizeItem(ValueToPoint(x), ValueToPoint(y), item);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -422,8 +404,6 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	ScCore->primaryMainWindow()->view->SelectItem(i);
 	ScCore->primaryMainWindow()->UnGroupObj();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -451,8 +431,6 @@
 	ScCore->primaryMainWindow()->doc->scaleGroup(sc, sc);
 	ScCore->primaryMainWindow()->view->endGroupTransaction();
 //	ScCore->primaryMainWindow()->view->frameResizeHandle = h;
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -487,8 +465,6 @@
 	if (i == nullptr)
 		return nullptr;
 	ScCore->primaryMainWindow()->view->SelectItem(i);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -497,8 +473,6 @@
 	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->view->Deselect();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -592,8 +566,6 @@
 	//ScCore->primaryMainWindow()->view->AdjustPictScale(item);
 
 	item->update();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 PyObject *scribus_flipobject(PyObject* /* self */, PyObject* args)
@@ -631,8 +603,6 @@
 	if (hadOrigSelection)
 		*ScCore->primaryMainWindow()->doc->m_Selection=tempSelection;
 
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&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 21:30:44 2018
@@ -28,8 +28,6 @@
 	if (!checkHaveDocument())
 		return nullptr;
 	ScCore->primaryMainWindow()->doc->DoDrawing = static_cast<bool>(e);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -179,8 +177,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -230,8 +226,6 @@
 		item->LayerID = scLayer->ID;
 	}
 
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -263,8 +257,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -296,8 +288,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -329,8 +319,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -362,8 +350,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -395,8 +381,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -428,8 +412,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -461,8 +443,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -727,8 +707,6 @@
 		PyErr_SetString(NotFoundError, QObject::tr("Layer not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -746,8 +724,6 @@
 	}
 	ScCore->primaryMainWindow()->doc->addLayer(QString::fromUtf8(Name), true);
 	ScCore->primaryMainWindow()->changeLayer(ScCore->primaryMainWindow()->doc->activeLayer());
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp	Mon Aug 27 21:30:44 2018
@@ -525,8 +525,7 @@
 	ScCore->primaryMainWindow()->doc->m_Selection->clear();
 	ScCore->primaryMainWindow()->doc->m_Selection->addItem(i);
 	ScCore->primaryMainWindow()->doc->itemSelection_DeleteItem();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -562,8 +561,7 @@
 		i->setTextFlowMode(PageItem::TextFlowUsesContourLine);
 	ScCore->primaryMainWindow()->view->DrawNew();
 	ScCore->primaryMainWindow()->slotDocCh(true);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -699,8 +697,7 @@
 		currentDoc->itemSelection_SetNamedParagraphStyle(paraStyleName);
 		currentDoc->appMode = mode;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -783,8 +780,7 @@
 		currentDoc->itemSelection_SetNamedCharStyle(charStyleName);
 		currentDoc->appMode = mode;
 	}
-	//	Py_INCREF(Py_None);
-	//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -846,8 +842,7 @@
 	// do the duplicate
 	ScCore->primaryMainWindow()->slotEditCopy();
 	ScCore->primaryMainWindow()->slotEditPaste();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -870,8 +865,7 @@
 		return nullptr;
 	// do the copy
 	ScCore->primaryMainWindow()->slotEditCopy();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -887,8 +881,7 @@
 
 	// do the paste
 	ScCore->primaryMainWindow()->slotEditPaste();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&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 21:30:44 2018
@@ -321,8 +321,7 @@
 	currItem->itemText.insertChars(0, Daten);
 	currItem->invalidateLayout();
 	currItem->Dirty = false;
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -427,8 +426,7 @@
 	ScCore->primaryMainWindow()->setNewAlignment(alignment);
 	ScCore->primaryMainWindow()->doc->appMode = Apm;
 	ScCore->primaryMainWindow()->view->Deselect();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -495,8 +493,7 @@
 	ScCore->primaryMainWindow()->doc->itemSelection_SetFontSize(qRound(size * 10.0));
 	ScCore->primaryMainWindow()->doc->appMode = Apm;
 	ScCore->primaryMainWindow()->view->Deselect();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -526,8 +523,7 @@
 	ScCore->primaryMainWindow()->doc->itemSelection_SetFontFeatures(QString::fromUtf8(fontfeature));
 	ScCore->primaryMainWindow()->doc->appMode = Apm;
 	ScCore->primaryMainWindow()->view->Deselect();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -563,8 +559,6 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Font not found.","python error").toLocal8Bit().constData());
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -600,8 +594,6 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 		
 //	i->setLineSpacing(w);
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -661,8 +653,8 @@
 		return nullptr;
 	}
 	i->setTextToFrameDist(ValueToPoint(l), ValueToPoint(r), ValueToPoint(t), ValueToPoint(b));
-	Py_INCREF(Py_None);
-	return Py_None;
+
+	Py_RETURN_NONE;
 }
 
 PyObject *scribus_setcolumngap(PyObject* /* self */, PyObject* args)
@@ -687,8 +679,7 @@
 		return nullptr;
 	}
 	i->ColGap = ValueToPoint(w);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -714,8 +705,7 @@
 		return nullptr;
 	}
 	i->Cols = w;
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -766,8 +756,7 @@
 	}
 	it->itemText.select(start, selcount, true);
 	it->HasSel = true;
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -820,20 +809,18 @@
 		return nullptr;
 	}
 	ApplyCharstyleHelper<QString>(it, QString::fromUtf8(Color)).apply(&CharStyle::setFillColor, 0, it->itemText.length());
-//		for (int b = 0; b < it->itemText.length(); b++)
+//	for (int b = 0; b < it->itemText.length(); b++)
+//	{
+//		//FIXME: doc method
+//		if (it->HasSel)
 //		{
-//			//FIXME: doc method
-//			if (it->HasSel)
-//			{
-//				if (it->itemText.selected(b))
-//					it->itemText.item(b)->setFillColor(QString::fromUtf8(Color));
-//			}
-//			else
+//			if (it->itemText.selected(b))
 //				it->itemText.item(b)->setFillColor(QString::fromUtf8(Color));
 //		}
-//		it->TxtFill = QString::fromUtf8(Color);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+//		else
+//			it->itemText.item(b)->setFillColor(QString::fromUtf8(Color));
+//	}
+//	it->TxtFill = QString::fromUtf8(Color);
 	Py_RETURN_NONE;
 }
 
@@ -854,20 +841,18 @@
 		return nullptr;
 	}
 	ApplyCharstyleHelper<QString>(it, QString::fromUtf8(Color)).apply(&CharStyle::setStrokeColor, 0, it->itemText.length());
-//		for (int b = 0; b < it->itemText.length(); b++)
+//	for (int b = 0; b < it->itemText.length(); b++)
+//	{
+//		//FIXME:NLS use document method for this
+//		if (it->HasSel)
 //		{
-//			//FIXME:NLS use document method for this
-//			if (it->HasSel)
-//			{
-//				if (it->itemText.selected(b))
-//					it->itemText.item(b)->setStrokeColor(QString::fromUtf8(Color));
-//			}
-//			else
+//			if (it->itemText.selected(b))
 //				it->itemText.item(b)->setStrokeColor(QString::fromUtf8(Color));
 //		}
-//		it->TxtStroke = QString::fromUtf8(Color);
-//	Py_INCREF(Py_None);
-//	return Py_None;
+//		else
+//			it->itemText.item(b)->setStrokeColor(QString::fromUtf8(Color));
+//	}
+//	it->TxtStroke = QString::fromUtf8(Color);
 	Py_RETURN_NONE;
 }
 
@@ -951,11 +936,8 @@
 	if (!checkHaveDocument())
 		return nullptr;
 	if ((w < 0) || (w > 100))
-	{
-//		Py_INCREF(Py_None);
-//		return Py_None;
 		Py_RETURN_NONE;
-	}
+
 	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == nullptr)
 		return nullptr;
@@ -965,20 +947,18 @@
 		return nullptr;
 	}
 	ApplyCharstyleHelper<double>(it, w).apply(&CharStyle::setFillShade, 0, it->itemText.length());
-//		//FIXME:NLS use document method for that
-//		for (int b = 0; b < it->itemText.length(); ++b)
+//	//FIXME:NLS use document method for that
+//	for (int b = 0; b < it->itemText.length(); ++b)
+//	{
+//		if (it->HasSel)
 //		{
-//			if (it->HasSel)
-//			{
-//				if (it->itemText.selected(b))
-//					it->itemText.item(b)->setFillShade(w);
-//			}
-//			else
+//			if (it->itemText.selected(b))
 //				it->itemText.item(b)->setFillShade(w);
 //		}
+//		else
+//			it->itemText.item(b)->setFillShade(w);
+//	}
 //	it->ShTxtFill = w;
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -1027,8 +1007,7 @@
 	ScCore->primaryMainWindow()->view->DrawNew();
 	// enable 'save icon' stuff
 	ScCore->primaryMainWindow()->slotDocCh();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -1076,8 +1055,7 @@
 	// enable 'save icon' stuff
 	ScCore->primaryMainWindow()->slotDocCh();
 	ScCore->primaryMainWindow()->view->DrawNew();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -1107,8 +1085,7 @@
 	ScCore->primaryMainWindow()->view->Deselect(true);
 	ScCore->primaryMainWindow()->view->SelectItem(item);
 	ScCore->primaryMainWindow()->view->TextToPath();
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 
@@ -1222,11 +1199,7 @@
 		return nullptr;
 	}
 	if (i->isBookmark == toggle)
-	{
-//		Py_INCREF(Py_None);
-//		return Py_None;
 		Py_RETURN_NONE;
-	}
 	if (toggle)
 	{
 		i->setIsAnnotation(false);
@@ -1235,8 +1208,7 @@
 	else
 		ScCore->primaryMainWindow()->DelBookMark(i);
 	i->isBookmark = toggle;
-//	Py_INCREF(Py_None);
-//	return Py_None;
+
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&path=/trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp	Mon Aug 27 21:30:44 2018
@@ -20,8 +20,6 @@
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &aText))
 		return nullptr;
 	ScCore->primaryMainWindow()->setStatusBarInfoText(QString::fromUtf8(aText));
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -29,8 +27,6 @@
 {
 	ScCore->primaryMainWindow()->mainWindowProgressBar->reset();
 	qApp->processEvents();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -42,8 +38,6 @@
 	ScCore->primaryMainWindow()->mainWindowProgressBar->setMaximum(steps);
 	ScCore->primaryMainWindow()->mainWindowProgressBar->setValue(0);
 	qApp->processEvents();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -59,8 +53,6 @@
 	}
 	ScCore->primaryMainWindow()->mainWindowProgressBar->setValue(position);
 	qApp->processEvents();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -75,8 +67,6 @@
 		qApp->changeOverrideCursor(Qt::WaitCursor);
 //	else
 //		qApp->restoreOverrideCursor();
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -93,8 +83,6 @@
 		ScCore->primaryMainWindow()->slotDocCh(true);
 	else
 		ScCore->primaryMainWindow()->slotDocCh(false);*/
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -112,8 +100,6 @@
 		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 nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp	Mon Aug 27 21:30:44 2018
@@ -501,8 +501,6 @@
 		}
 		delete dd;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22658&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 21:30:44 2018
@@ -65,8 +65,6 @@
 		PyErr_SetString(PyExc_Exception, "Requested File cannot be imported");
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 #if 0
@@ -98,8 +96,6 @@
 		PyErr_SetString(PyExc_Exception, "SVG Import plugin not available");
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -131,8 +127,6 @@
 		PyErr_SetString(PyExc_Exception, "EPS Import plugin not available");
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -164,8 +158,6 @@
 		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 
@@ -197,8 +189,6 @@
 		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
 		return nullptr;
 	}
-//	Py_INCREF(Py_None);
-//	return Py_None;
 	Py_RETURN_NONE;
 }
 #endif




More information about the scribus-commit mailing list