r22521 by craig - More nullptr and other conversions

scribus-commit scribus-commit at lists.scribus.net
Sat May 5 13:51:14 UTC 2018


Author: craig
Date: Sat May  5 13:51:14 2018
New Revision: 22521

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22521
Log:
More nullptr and other conversions

Modified:
    trunk/Scribus/scribus/canvasmode_copyproperties.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/pluginmanager.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
    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/sccolorengine.cpp
    trunk/Scribus/scribus/scstreamfilter_ascii85.cpp
    trunk/Scribus/scribus/scstreamfilter_ascii85.h
    trunk/Scribus/scribus/scstreamfilter_flate.cpp
    trunk/Scribus/scribus/scstreamfilter_flate.h
    trunk/Scribus/scribus/scstreamfilter_jpeg.cpp
    trunk/Scribus/scribus/scstreamfilter_jpeg.h
    trunk/Scribus/scribus/scstreamfilter_rc4.cpp
    trunk/Scribus/scribus/scstreamfilter_rc4.h
    trunk/Scribus/scribus/ui/aligndistribute.cpp
    trunk/Scribus/scribus/ui/autoform.cpp
    trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
    trunk/Scribus/scribus/ui/bookmwin.cpp
    trunk/Scribus/scribus/ui/colorlistbox.cpp
    trunk/Scribus/scribus/ui/colorsandfills.cpp
    trunk/Scribus/scribus/ui/contextmenu.cpp
    trunk/Scribus/scribus/ui/cupsoptions.cpp
    trunk/Scribus/scribus/ui/customfdialog.cpp
    trunk/Scribus/scribus/ui/extimageprops.cpp
    trunk/Scribus/scribus/ui/fontcombo.cpp
    trunk/Scribus/scribus/ui/gtdialogs.cpp
    trunk/Scribus/scribus/ui/helpbrowser.cpp
    trunk/Scribus/scribus/ui/hruler.cpp
    trunk/Scribus/scribus/ui/inlinepalette.cpp
    trunk/Scribus/scribus/ui/insertaframe.cpp
    trunk/Scribus/scribus/ui/layers.cpp
    trunk/Scribus/scribus/ui/loremipsum.cpp
    trunk/Scribus/scribus/ui/marginwidget.cpp
    trunk/Scribus/scribus/ui/markvariabletext.cpp
    trunk/Scribus/scribus/ui/mergedoc.cpp
    trunk/Scribus/scribus/ui/missing.cpp
    trunk/Scribus/scribus/ui/modetoolbar.cpp
    trunk/Scribus/scribus/ui/newfile.cpp
    trunk/Scribus/scribus/ui/osgeditor.cpp
    trunk/Scribus/scribus/ui/outlinepalette.cpp
    trunk/Scribus/scribus/ui/pageitemattributes.cpp
    trunk/Scribus/scribus/ui/pagepalette.cpp
    trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
    trunk/Scribus/scribus/ui/picsearch.cpp
    trunk/Scribus/scribus/ui/picstatus.cpp
    trunk/Scribus/scribus/ui/preferencesdialog.cpp
    trunk/Scribus/scribus/ui/prefs_display.cpp
    trunk/Scribus/scribus/ui/prefs_documentitemattributes.cpp
    trunk/Scribus/scribus/ui/prefs_documentsections.cpp
    trunk/Scribus/scribus/ui/prefs_itemtools.cpp
    trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
    trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette_group.cpp
    trunk/Scribus/scribus/ui/propertiespalette_image.cpp
    trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
    trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertiespalette_utils.cpp
    trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
    trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
    trunk/Scribus/scribus/ui/propertywidget_distance.cpp
    trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp
    trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
    trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
    trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
    trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
    trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
    trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
    trunk/Scribus/scribus/ui/propertywidgetbase.cpp
    trunk/Scribus/scribus/ui/scmessagebox.cpp
    trunk/Scribus/scribus/ui/scrspinbox.cpp
    trunk/Scribus/scribus/ui/sctreewidget.cpp
    trunk/Scribus/scribus/ui/search.cpp
    trunk/Scribus/scribus/ui/selfield.cpp
    trunk/Scribus/scribus/ui/smpstylewidget.cpp
    trunk/Scribus/scribus/ui/smtextstyles.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp
    trunk/Scribus/scribus/ui/storyeditor.h
    trunk/Scribus/scribus/ui/stylemanager.cpp
    trunk/Scribus/scribus/ui/styleselect.cpp
    trunk/Scribus/scribus/ui/symbolpalette.cpp
    trunk/Scribus/scribus/ui/textpalette.cpp
    trunk/Scribus/scribus/ui/transformdialog.cpp
    trunk/Scribus/scribus/ui/transparencypalette.cpp
    trunk/Scribus/scribus/undomanager.cpp

Modified: trunk/Scribus/scribus/canvasmode_copyproperties.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/canvasmode_copyproperties.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.cpp	Sat May  5 13:51:14 2018
@@ -47,7 +47,7 @@
 inline bool CanvasMode_CopyProperties::GetItem(PageItem** pi)
 { 
 	*pi = m_doc->m_Selection->itemAt(0); 
-	return (*pi) != NULL; 
+	return (*pi) != nullptr;
 }
 
 void CanvasMode_CopyProperties::drawControls(QPainter* p)
@@ -202,7 +202,7 @@
 	}
 	else
 	{
-		m_doc->ElemToLink = NULL;
+		m_doc->ElemToLink = nullptr;
 		m_view->requestMode(submodePaintingDone);
 	}
 }
@@ -287,7 +287,7 @@
 		}
 		m_view->setRulerPos(m_view->contentsX(), m_view->contentsY());
 	}
-	currItem = NULL;
+	currItem = nullptr;
 	if ((m->modifiers() & SELECT_BENEATH) != 0)
 	{
 		for (int i=0; i < m_doc->m_Selection->count(); ++i)
@@ -360,7 +360,7 @@
 
 void CanvasMode_CopyProperties::createContextMenu(PageItem* currItem, double mx, double my)
 {
-	ContextMenu* cmen=NULL;
+	ContextMenu* cmen=nullptr;
 	m_view->setCursor(QCursor(Qt::ArrowCursor));
 	m_view->setObjectUndoMode();
 	Mxp = mx;

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	Sat May  5 13:51:14 2018
@@ -70,19 +70,19 @@
 	m_keyRepeat = false;
 	m_click_count = 0;
 	m_old_mesh = new MeshPoint();
-	m_currItem = NULL;
+	m_currItem = nullptr;
 }
 
 CanvasMode_EditMeshPatch::~CanvasMode_EditMeshPatch()
 {
 	delete m_old_mesh;
-	m_old_mesh = NULL;
+	m_old_mesh = nullptr;
 }
 
 inline bool CanvasMode_EditMeshPatch::GetItem(PageItem** pi)
 {
 	*pi = m_doc->m_Selection->itemAt(0);
-	return (*pi) != NULL;
+	return (*pi) != nullptr;
 }
 
 void CanvasMode_EditMeshPatch::drawControls(QPainter* p)
@@ -985,7 +985,7 @@
 				if((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TL)
 				{
 					delete ss;
-					ss=NULL;
+					ss=nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TL));
@@ -994,7 +994,7 @@
 				if((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TR)
 				{
 					delete ss;
-					ss=NULL;
+					ss=nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TR));
@@ -1003,7 +1003,7 @@
 				if((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BR)
 				{
 					delete ss;
-					ss=NULL;
+					ss=nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BR));
@@ -1012,7 +1012,7 @@
 				if((*m_old_mesh) == m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BL)
 				{
 					delete ss;
-					ss=NULL;
+					ss=nullptr;
 				}
 				else
 					ss->setItem(qMakePair(*m_old_mesh,m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BL));

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Sat May  5 13:51:14 2018
@@ -79,22 +79,22 @@
 	m_dragConstrainInitPtY = 0;
 	m_lastPosWasOverGuide = false;
 	m_shiftSelItems = false;
-	m_resizeGesture = NULL;
-	m_lineMoveGesture  = NULL;
-	m_guideMoveGesture = NULL;
+	m_resizeGesture = nullptr;
+	m_lineMoveGesture  = nullptr;
+	m_guideMoveGesture = nullptr;
 	m_mousePressPoint.setXY(0, 0);
 	m_mouseCurrentPoint.setXY(0, 0);
 	m_mouseSavedPoint.setXY(0, 0);
 	m_objectDeltaPos.setXY(0,0 );
 	ySnap = 0;
 	xSnap = 0;
-	m_hoveredItem = NULL;
+	m_hoveredItem = nullptr;
 }
 
 inline bool CanvasMode_Normal::GetItem(PageItem** pi)
 { 
 	*pi = m_doc->m_Selection->itemAt(0); 
-	return (*pi) != NULL; 
+	return (*pi) != nullptr;
 }
 
 void CanvasMode_Normal::drawControls(QPainter* p)
@@ -135,7 +135,7 @@
 	m_objectDeltaPos.setXY(0,0 );
 	m_frameResizeHandle = -1;
 	m_shiftSelItems = false;
-	m_hoveredItem = NULL;
+	m_hoveredItem = nullptr;
 	setModeCursor();
 	if (fromGesture)
 	{
@@ -304,7 +304,7 @@
 	
 	m_lastPosWasOverGuide = false;
 	double newX, newY;
-	PageItem *currItem=NULL;
+	PageItem *currItem=nullptr;
 	bool erf = false;
 	m->accept();
 //	qDebug() << "legacy mode move:" << m->x() << m->y() << m_canvas->globalToCanvas(m->globalPos()).x() << m_canvas->globalToCanvas(m->globalPos()).y();
@@ -366,7 +366,7 @@
 	//<<#10116 Show overflow counter HUD
 	if (!movingOrResizing && mouseIsOnPage)
 	{
-		PageItem* hoveredItem = NULL;
+		PageItem* hoveredItem = nullptr;
 		hoveredItem = m_canvas->itemUnderCursor(m->globalPos(), hoveredItem, m->modifiers());
 		if (hoveredItem)
 		{
@@ -423,7 +423,7 @@
 				{
 					if (QToolTip::isVisible())
 						QToolTip::hideText();
-					m_hoveredItem = NULL;
+					m_hoveredItem = nullptr;
 				}
 			}
 			else
@@ -448,7 +448,7 @@
 			{
 				if (m_hoveredItem)
 					handleMouseLeave(m_hoveredItem);
-				m_hoveredItem = NULL;
+				m_hoveredItem = nullptr;
 			}
 		}
 	}
@@ -1010,7 +1010,7 @@
 	{
 		if ((!GetItem(&currItem)) && (!m_doc->drawAsPreview))
 		{
-			createContextMenu(NULL, mousePointDoc.x(), mousePointDoc.y());
+			createContextMenu(nullptr, mousePointDoc.x(), mousePointDoc.y());
 			return;
 		}
 		if ((GetItem(&currItem)) && (!(m_doc->drawAsPreview && !m_doc->editOnPreview)))
@@ -1020,7 +1020,7 @@
 		}
 	}
 	//<<#10116: Click on overflow icon to get into link frame mode
-	PageItem* clickedItem=NULL;
+	PageItem* clickedItem=nullptr;
 	clickedItem = m_canvas->itemUnderCursor(m->globalPos(), clickedItem, m->modifiers());
 	if (clickedItem && clickedItem->asTextFrame() && (!clickedItem->isAnnotation()) && (!m_doc->drawAsPreview))
 	{
@@ -1250,7 +1250,7 @@
 	//Commit drag created items to undo manager.
 	if (m_doc->m_Selection->count() > 0)
 	{
-		if (m_doc->m_Selection->itemAt(0)!=NULL)
+		if (m_doc->m_Selection->itemAt(0)!=nullptr)
 		{
 			m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0));
 		}
@@ -1565,7 +1565,7 @@
 //CB-->Doc/Fix
 bool CanvasMode_Normal::SeleItem(QMouseEvent *m)
 {
-	PageItem *previousSelectedItem = NULL;
+	PageItem *previousSelectedItem = nullptr;
 	if (m_doc->m_Selection->count() != 0)
 		previousSelectedItem = m_doc->m_Selection->itemAt(0);
 	m_canvas->m_viewMode.operItemSelecting = true;
@@ -1674,7 +1674,7 @@
 		m_view->setRulerPos(m_view->contentsX(), m_view->contentsY());
 	}
 	
-	currItem = NULL;
+	currItem = nullptr;
 	if ((m->modifiers() & SELECT_BENEATH) != 0)
 	{
 		for (int i=0; i < m_doc->m_Selection->count(); ++i)
@@ -1737,7 +1737,7 @@
 			m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
 			m_view->getGroupRectScreen(&x, &y, &w, &h);
 		}
-		if (previousSelectedItem != NULL)
+		if (previousSelectedItem != nullptr)
 		{
 			if (currItem != previousSelectedItem)
 			{
@@ -1782,7 +1782,7 @@
 		else
 			m_view->Deselect(true);
 	}
-	if (previousSelectedItem != NULL)
+	if (previousSelectedItem != nullptr)
 		handleFocusOut(previousSelectedItem);
 	return false;
 }
@@ -1889,11 +1889,11 @@
 
 void CanvasMode_Normal::createContextMenu(PageItem* currItem, double mx, double my)
 {
-	ContextMenu* cmen=NULL;
+	ContextMenu* cmen=nullptr;
 //	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	m_view->setObjectUndoMode();
 	m_mouseCurrentPoint.setXY(mx, my);
-	if (currItem!=NULL)
+	if (currItem!=nullptr)
 		cmen = new ContextMenu(*(m_doc->m_Selection), m_ScMW, m_doc);
 	else
 		cmen = new ContextMenu(m_ScMW, m_doc, mx, my);

Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp	(original)
+++ trunk/Scribus/scribus/pluginmanager.cpp	Sat May  5 13:51:14 2018
@@ -51,7 +51,7 @@
 
 void* PluginManager::loadDLL( QString plugin )
 {
-	void* lib = NULL;
+	void* lib = nullptr;
 #ifdef HAVE_DLFCN_H
 	QString libpath = QDir::toNativeSeparators( plugin );
 	lib = dlopen(libpath.toLocal8Bit().data(), RTLD_LAZY | RTLD_GLOBAL);
@@ -78,24 +78,24 @@
 
 void* PluginManager::resolveSym( void* plugin, const char* sym )
 {
-	void* symAddr = NULL;
+	void* symAddr = nullptr;
 #ifdef HAVE_DLFCN_H
 	const char* error;
 	dlerror();
 	symAddr = dlsym( plugin, sym );
-	if ((error = dlerror()) != NULL)
+	if ((error = dlerror()) != nullptr)
 	{
 		qDebug("%s", tr("Cannot find symbol (%1)", "plugin manager").arg(error).toLocal8Bit().data());
-		symAddr = NULL;
+		symAddr = nullptr;
 	}
 #elif defined(DLL_USE_NATIVE_API) && defined(_WIN32)
 	symAddr = (void* ) GetProcAddress( (HMODULE) plugin, sym);
-	if ( symAddr == NULL)
+	if ( symAddr == nullptr)
 		qDebug("%s", tr("Cannot find symbol (%1)", "plugin manager").arg(sym).toLocal8Bit().data());
 #else
 	QLibrary* qlib = (QLibrary*) plugin;
 	if( plugin ) symAddr = qlib->resolve(sym);
-	if ( symAddr == NULL)
+	if ( symAddr == nullptr)
 		qDebug("%s", tr("Cannot find symbol (%1)", "plugin manager").arg(sym).toLocal8Bit().data());
 #endif
 	return symAddr;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp	Sat May  5 13:51:14 2018
@@ -20,16 +20,16 @@
 {
 	char *name = const_cast<char*>("");  
 	PyObject *deannotate = Py_False;
-	char *kwlist[] = {const_cast<char*>(""),const_cast<char*>("deannotate"), NULL};
+	char *kwlist[] = {const_cast<char*>(""),const_cast<char*>("deannotate"), nullptr};
 
 	if (!PyArg_ParseTupleAndKeywords(args, keywds, "|esO", kwlist, "utf-8", &name, &deannotate))
-		return NULL;
+		return nullptr;
 	if (!checkHaveDocument())
-		return NULL;
+		return nullptr;
 
 	PageItem *i = GetUniqueItem(QString::fromUtf8(name));
-	if (i == NULL)
-		return NULL;
+	if (i == nullptr)
+		return nullptr;
 
 	if (i->isAnnotation())
 	{
@@ -134,7 +134,7 @@
 			  "Key", "Help", 
 			  "NewParagraph","Paragraph",
 			  "Insert","Cross",
-			  "Circle", NULL
+			  "Circle", nullptr
 			};
 			if (icon >= 0 && icon < 9)
 			{
@@ -177,20 +177,20 @@
 	int page, x, y;
 
 	if (!PyArg_ParseTuple(args, "iii|es", &page, &x, &y, "utf-8", &name))
-		return NULL;
+		return nullptr;
 	if (!checkHaveDocument())
-		return NULL;
+		return nullptr;
 
 	PageItem *i = GetUniqueItem(QString::fromUtf8(name));
 	if (!testPageItem(i))
-		return NULL;
+		return nullptr;
 
 	int numpages = ScCore->primaryMainWindow()->doc->Pages->count();
 	if (page <= 0 || page > numpages){
 		QString qnum = QString("%1").arg(numpages);
 		PyErr_SetString(PyExc_RuntimeError,
 			QObject::tr("which must be 1 to " + qnum.toUtf8(), "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 	prepareannotation(i);
@@ -217,18 +217,18 @@
 
 	char *kwlist[] = {const_cast<char*>("path"), const_cast<char*>("page"), 
 			  const_cast<char*>("x"), const_cast<char*>("y"), 
-			  const_cast<char*>("name"),const_cast<char*>("absolute"), NULL};
+			  const_cast<char*>("name"),const_cast<char*>("absolute"), nullptr};
 
 	if (!PyArg_ParseTupleAndKeywords(args, keywds, "esiii|esO", kwlist,
 					 "utf-8", &path, &page, &x, &y,
 					 "utf-8", &name, &absolute))
-		return NULL;
+		return nullptr;
 	if (!checkHaveDocument())
-		return NULL;
+		return nullptr;
 
 	PageItem *i = GetUniqueItem(QString::fromUtf8(name));
 	if (!testPageItem(i))
-		return NULL;
+		return nullptr;
 
 	prepareannotation(i);
 	Annotation &a = i->annotation();
@@ -252,13 +252,13 @@
 	char *name = const_cast<char*>("");
 
 	if (!PyArg_ParseTuple(args, "es|es","utf-8" ,&uri,"utf-8", &name))
-		return NULL;
+		return nullptr;
 	if (!checkHaveDocument())
-		return NULL;
+		return nullptr;
 
 	PageItem *i = GetUniqueItem(QString::fromUtf8(name));
 	if (!testPageItem(i))
-		return NULL;
+		return nullptr;
 		
 	prepareannotation(i);
 	Annotation &a = i->annotation();
@@ -287,19 +287,19 @@
 	*/ 
 
 	if (!PyArg_ParseTuple(args, "iO|es",&icon,&isopen,"utf-8", &name))
-		return NULL;
+		return nullptr;
 	if (!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (icon < 0 || icon > 8)
 	{
 		PyErr_SetString(PyExc_RuntimeError,
 			QObject::tr("Icon must be 0 to 8", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 	PageItem *i = GetUniqueItem(QString::fromUtf8(name));
 	if (!testPageItem(i))
-		return NULL;
+		return nullptr;
 	
 	prepareannotation(i);
 
@@ -326,14 +326,14 @@
 	char *name = const_cast<char*>("");
 
 	if (!PyArg_ParseTuple(args, "idddd|es", &which, &x, &y, &w, &h, "utf-8", &name))
-		return NULL;
+		return nullptr;
 	if (!checkHaveDocument())
-		return NULL;
+		return nullptr;
 
 	if (which < 0 || which > 8){
 		PyErr_SetString(PyExc_RuntimeError,
 			QObject::tr("which must be 0 to 8", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 	ScribusDoc *m_doc = ScCore->primaryMainWindow()->doc;
@@ -372,7 +372,7 @@
 		else{
 			PyErr_SetString(PyExc_RuntimeError,
 			QObject::tr("Doesn't have OSG can't create 3DAnnotation", "python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 	}
 
@@ -504,7 +504,7 @@
 
 static bool testPageItem(PageItem *i)
 {
-	if (i == NULL)
+	if (i == nullptr)
 		return false;
 	if (!i->asTextFrame())
 	{
@@ -540,7 +540,7 @@
 			            "Reset Form",  "Import Data", 
 			            "Unknown",  "Goto File Relative", 
 			            "URI",  "Goto File Relative" , 
-			            "Named", NULL };
+						"Named", nullptr };
 
 	const char action[] = "action";
 	PyObject *akey = PyString_FromString(action);

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp	Sat May  5 13:51:14 2018
@@ -18,22 +18,22 @@
 	int row, column;
 	char *text;
 	if (!PyArg_ParseTuple(args, "iies|es", &row, &column, "utf-8", &text, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell text on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	table->cellAt(row, column).setText(QString::fromUtf8(text));
 	Py_RETURN_NONE;
@@ -44,22 +44,22 @@
 	char *Name = const_cast<char*>("");
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot get cell style on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	return PyString_FromString(table->cellAt(row, column).styleName().toUtf8());
 }
@@ -70,22 +70,22 @@
 	int row, column;
 	char *style;
 	if (!PyArg_ParseTuple(args, "iies|es", &row, &column, "utf-8", &style, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell style on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	table->cellAt(row, column).setStyle(QString::fromUtf8(style));
 	Py_RETURN_NONE;
@@ -96,17 +96,17 @@
 	char *Name = const_cast<char*>("");
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot get cell row span from non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	return PyInt_FromLong(static_cast<long>(table->cellAt(row, column).rowSpan()));
 }
@@ -116,17 +116,17 @@
 	char *Name = const_cast<char*>("");
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot get cell column span from non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	return PyInt_FromLong(static_cast<long>(table->cellAt(row, column).columnSpan()));
 }
@@ -136,22 +136,22 @@
 	char *Name = const_cast<char*>("");
 	int row, column;
 	if (!PyArg_ParseTuple(args, "ii|es", &row, &column, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot get cell fill color on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	return PyString_FromString(table->cellAt(row, column).fillColor().toUtf8());
 }
@@ -162,22 +162,22 @@
 	int row, column;
 	char *color;
 	if (!PyArg_ParseTuple(args, "iies|es", &row, &column, "utf-8", &color, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell fill color on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	table->cellAt(row, column).setFillColor(QString::fromUtf8(color));
 	Py_RETURN_NONE;
@@ -189,22 +189,22 @@
 	int row, column;
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell left border on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 
 	bool ok = false;
@@ -212,7 +212,7 @@
 	if (ok)
 		table->cellAt(row, column).setLeftBorder(border);
 	else
-		return NULL;
+		return nullptr;
 
 	Py_RETURN_NONE;
 }
@@ -223,22 +223,22 @@
 	int row, column;
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell right border on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 
 	bool ok = false;
@@ -246,7 +246,7 @@
 	if (ok)
 		table->cellAt(row, column).setRightBorder(border);
 	else
-		return NULL;
+		return nullptr;
 
 	Py_RETURN_NONE;
 }
@@ -257,22 +257,22 @@
 	int row, column;
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell top border on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 
 	bool ok = false;
@@ -280,7 +280,7 @@
 	if (ok)
 		table->cellAt(row, column).setTopBorder(border);
 	else
-		return NULL;
+		return nullptr;
 
 	Py_RETURN_NONE;
 }
@@ -291,22 +291,22 @@
 	int row, column;
 	PyObject* borderLines;
 	if (!PyArg_ParseTuple(args, "iiO|es", &row, &column, &borderLines, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell bottom border on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 
 	bool ok = false;
@@ -314,7 +314,7 @@
 	if (ok)
 		table->cellAt(row, column).setBottomBorder(border);
 	else
-		return NULL;
+		return nullptr;
 
 	Py_RETURN_NONE;
 }
@@ -325,27 +325,27 @@
 	int row, column;
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell left padding on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	if (padding < 0.0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cell padding must be >= 0.0", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	table->cellAt(row, column).setLeftPadding(padding);
 
@@ -358,27 +358,27 @@
 	int row, column;
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell right padding on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	if (padding < 0.0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cell padding must be >= 0.0", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	table->cellAt(row, column).setRightPadding(padding);
 
@@ -391,27 +391,27 @@
 	int row, column;
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell top padding on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	if (padding < 0.0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cell padding must be >= 0.0", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	table->cellAt(row, column).setTopPadding(padding);
 
@@ -424,27 +424,27 @@
 	int row, column;
 	double padding;
 	if (!PyArg_ParseTuple(args, "iid|es", &row, &column, &padding, "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	if (i == NULL)
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	if (i == nullptr)
+		return nullptr;
 	PageItem_Table *table = i->asTable();
 	if (!table)
 	{
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set cell bottom padding on a non-table item.","python error").toLocal8Bit().constData());
-		return NULL;
-	}
-	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
-	{
-		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
+	}
+	if (column < 0 || column >= table->columns() || row < 0 || row >= table->rows())
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
+		return nullptr;
 	}
 	if (padding < 0.0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cell padding must be >= 0.0", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	table->cellAt(row, column).setBottomPadding(padding);
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp	Sat May  5 13:51:14 2018
@@ -34,19 +34,19 @@
 	char *Name = const_cast<char*>("");
 	int c, m, y, k;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
-	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : NULL;
+	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	CMYKColor cmykValues;
 	ScColorEngine::getCMYKValues(edc[col], currentDoc, cmykValues);
@@ -60,19 +60,19 @@
 	char *Name = const_cast<char*>("");
 	double c, m, y, k;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
-	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : NULL;
+	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	CMYKColorF cmykValues;
 	ScColorEngine::getCMYKValues(edc[col], currentDoc, cmykValues);
@@ -85,19 +85,19 @@
 	ColorList edc;
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
-	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : NULL;
+	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QColor rgb = ScColorEngine::getRGBColor(edc[col], currentDoc);
 	return Py_BuildValue("(iii)", static_cast<long>(rgb.red()), static_cast<long>(rgb.green()), static_cast<long>(rgb.blue()));
@@ -109,19 +109,19 @@
 	double r, g, b;
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot get a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
-	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : NULL;
+	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : nullptr;
 	QString col = QString::fromUtf8(Name);
 	if (!edc.contains(col))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	RGBColorF rgbValues;
 	ScColorEngine::getRGBValues(edc[col], currentDoc, rgbValues);
@@ -139,11 +139,11 @@
 	char *Name = const_cast<char*>("");
 	int c, m, y, k;
 	if (!PyArg_ParseTuple(args, "esiiii", "utf-8", &Name, &c, &m, &y, &k))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot change a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	if (ScCore->primaryMainWindow()->HaveDoc)
@@ -151,7 +151,7 @@
 		if (!ScCore->primaryMainWindow()->doc->PageColors.contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in document.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		ScCore->primaryMainWindow()->doc->PageColors[col].setCmykColor(c, m, y, k);
 	}
@@ -161,7 +161,7 @@
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		(*colorList)[col].setCmykColor(c, m, y, k);
 	}
@@ -173,11 +173,11 @@
 	char *Name = const_cast<char*>("");
 	double c, m, y, k;
 	if (!PyArg_ParseTuple(args, "esdddd", "utf-8", &Name, &c, &m, &y, &k))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot change a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	c = qMax(0.0, qMin(c , 100.0)) / 100.0;
@@ -189,7 +189,7 @@
 		if (!ScCore->primaryMainWindow()->doc->PageColors.contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in document.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		ScCore->primaryMainWindow()->doc->PageColors[col].setCmykColorF(c, m, y, k);
 	}
@@ -199,7 +199,7 @@
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		(*colorList)[col].setCmykColorF(c, m, y, k);
 	}
@@ -211,11 +211,11 @@
 	char *Name = const_cast<char*>("");
 	int r, g, b;
 	if (!PyArg_ParseTuple(args, "esiii", "utf-8", &Name, &r, &g, &b))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot change a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	if (ScCore->primaryMainWindow()->HaveDoc)
@@ -223,7 +223,7 @@
 		if (!ScCore->primaryMainWindow()->doc->PageColors.contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in document.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		ScCore->primaryMainWindow()->doc->PageColors[col].setRgbColor(r, g, b);
 	}
@@ -233,7 +233,7 @@
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		(*colorList)[col].setRgbColor(r, g, b);
 	}
@@ -245,11 +245,11 @@
 	char *Name = const_cast<char*>("");
 	double r, g, b;
 	if (!PyArg_ParseTuple(args, "esddd", "utf-8", &Name, &r, &g, &b))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot change a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	r = qMax(0.0, qMin(r, 255.0)) / 255.0;
@@ -260,7 +260,7 @@
 		if (!ScCore->primaryMainWindow()->doc->PageColors.contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in document.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		ScCore->primaryMainWindow()->doc->PageColors[col].setRgbColorF(r, g, b);
 	}
@@ -270,7 +270,7 @@
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		(*colorList)[col].setRgbColorF(r, g, b);
 	}
@@ -282,11 +282,11 @@
 	char *Name = const_cast<char*>("");
 	double L, a, b;
 	if (!PyArg_ParseTuple(args, "esddd", "utf-8", &Name, &L, &a, &b))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot change a color with an empty name.", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	L = qMax(0.0, qMin(L, 100.0));
@@ -297,7 +297,7 @@
 		if (!ScCore->primaryMainWindow()->doc->PageColors.contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in document.", "python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		ScCore->primaryMainWindow()->doc->PageColors[col].setLabColor(L, a, b);
 	}
@@ -307,7 +307,7 @@
 		if (!colorList->contains(col))
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.", "python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 		(*colorList)[col].setLabColor(L, a, b);
 	}
@@ -324,11 +324,11 @@
 	char *Name = const_cast<char*>("");
 	int c, m, y, k;
 	if (!PyArg_ParseTuple(args, "esiiii", "utf-8", &Name, &c, &m, &y, &k))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	if (ScCore->primaryMainWindow()->HaveDoc)
@@ -358,11 +358,11 @@
 	char *Name = const_cast<char*>("");
 	double c, m, y, k;
 	if (!PyArg_ParseTuple(args, "esdddd", "utf-8", &Name, &c, &m, &y, &k))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	c = qMax(0.0, qMin(c , 100.0)) / 100.0;
@@ -408,11 +408,11 @@
 	char *Name = const_cast<char*>("");
 	int r, g, b;
 	if (!PyArg_ParseTuple(args, "esiii", "utf-8", &Name, &r, &g, &b))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	if (ScCore->primaryMainWindow()->HaveDoc)
@@ -442,11 +442,11 @@
 	char *Name = const_cast<char*>("");
 	double r, g, b;
 	if (!PyArg_ParseTuple(args, "esddd", "utf-8", &Name, &r, &g, &b))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	r = qMax(0.0, qMin(r, 255.0)) / 255.0;
@@ -491,11 +491,11 @@
 	char *Name = const_cast<char*>("");
 	double L, a, b;
 	if (!PyArg_ParseTuple(args, "esddd", "utf-8", &Name, &L, &a, &b))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create a color with an empty name.", "python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	L = qMax(0.0, qMin(L, 100.0));
@@ -540,11 +540,11 @@
 	char *Name = const_cast<char*>("");
 	char *Repl = const_cast<char*>(CommonStrings::None.toLatin1().constData());
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Name, "utf-8", &Repl))
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot delete a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	QString rep = QString::fromUtf8(Repl);
@@ -558,7 +558,7 @@
 		else
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in document.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 	}
 	else
@@ -569,7 +569,7 @@
 		else
 		{
 			PyErr_SetString(NotFoundError, QObject::tr("Color not found in default colors.","python error").toLocal8Bit().constData());
-			return NULL;
+			return nullptr;
 		}
 	}
 // 	Py_INCREF(Py_None);
@@ -583,13 +583,13 @@
 	char *Repl = const_cast<char*>(CommonStrings::None.toLatin1().constData());
 	//FIXME: this should definitely use keyword arguments
 	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Name, "utf-8", &Repl))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot replace a color with an empty name.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	QString rep = QString::fromUtf8(Repl);
@@ -598,7 +598,7 @@
 	else
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 // 	Py_INCREF(Py_None);
 // 	return Py_None;
@@ -610,13 +610,13 @@
 	char *Name = const_cast<char*>("");
 	
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Color name cannot be an empty string.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	if (ScCore->primaryMainWindow()->doc->PageColors.contains(col))
@@ -626,7 +626,7 @@
 	else
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 // 	Py_RETURN_NONE;
 }
@@ -637,13 +637,13 @@
 	int enable;
 
 	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &enable))
-		return NULL;
+		return nullptr;
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (strcmp(Name, "") == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Color name cannot be an empty string.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	QString col = QString::fromUtf8(Name);
 	if (ScCore->primaryMainWindow()->doc->PageColors.contains(col))
@@ -653,7 +653,7 @@
 	else
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	Py_RETURN_NONE;
 }

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp	Sat May  5 13:51:14 2018
@@ -38,12 +38,12 @@
 	char* kwargs[] = {const_cast<char*>("caption"), const_cast<char*>("filter"),
 						const_cast<char*>("defaultname"), const_cast<char*>("haspreview"),
 						const_cast<char*>("issave"), const_cast<char*>("isdir"),
-						NULL};
+						nullptr};
 	if (!PyArg_ParseTupleAndKeywords(args, kw, "es|esesiii", kwargs,
 									 "utf-8", &caption, "utf-8", &filter, "utf-8", &defName,
 									 &haspreview, &issave, &isdir))
 	{
-		return NULL;
+		return nullptr;
 	}
 	QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	/* nobool = Nothing doing boolean for CFileDialog last attrs.
@@ -82,9 +82,9 @@
 	enum QMessageBox::StandardButton defaultButton = QMessageBox::NoButton;
 	char* kwargs[] = {const_cast<char*>("caption"), const_cast<char*>("message"),
 						const_cast<char*>("icon"), const_cast<char*>("button1"),
-						const_cast<char*>("button2"), const_cast<char*>("button3"), NULL};
+						const_cast<char*>("button2"), const_cast<char*>("button3"), nullptr};
 	if (!PyArg_ParseTupleAndKeywords(args, kw, "eses|iiii", kwargs, "utf-8", &caption, "utf-8", &message, &ico, &butt[0], &butt[1], &butt[2]))
-		return NULL;
+		return nullptr;
 	QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	// ScMessageBox mb(ico, butt1, butt2, butt3, ScCore->primaryMainWindow());
 	for (int bi = 0; bi < 3; bi++) {
@@ -112,7 +112,7 @@
 	char *message = const_cast<char*>("");
 	char *value = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "eses|es", "utf-8", &caption, "utf-8", &message, "utf-8", &value))
-		return NULL;
+		return nullptr;
 	QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	QString txt = QInputDialog::getText(ScCore->primaryMainWindow(),
 										QString::fromUtf8(caption),
@@ -126,7 +126,7 @@
 PyObject *scribus_newstyledialog(PyObject*, PyObject* args)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 
 	ScribusDoc *d = ScCore->primaryMainWindow()->doc;
 	bool ok;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp	Sat May  5 13:51:14 2018
@@ -34,7 +34,7 @@
 						(!PyArg_ParseTuple(p, "dd", &pageWidth, &pageHeight)) ||
 						(!PyArg_ParseTuple(m, "dddd", &leftMargin, &rightMargin,
 												&topMargin, &bottomMargin)))
-		return NULL;
+		return nullptr;
 	if (numPages <= 0)
 		numPages = 1;
 	if (pagesType == 0)
@@ -48,7 +48,7 @@
 	if (pagesType < firstPageOrder)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("firstPageOrder is bigger than allowed.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 
@@ -86,7 +86,7 @@
 	if ((!PyArg_ParseTuple(args, "OOiiiii", &p, &m, &ori, &fNr, &unit, &ds, &fsl)) ||
 	        (!PyArg_ParseTuple(p, "dd", &b, &h)) ||
 	        (!PyArg_ParseTuple(m, "dddd", &lr, &rr, &tpr, &btr)))
-		return NULL;
+		return nullptr;
 	b = value2pts(b, unit);
 	h = value2pts(h, unit);
 	if (ori == 1)
@@ -116,9 +116,9 @@
 {
 	double lr, tpr, btr, rr;
 	if (!PyArg_ParseTuple(args, "dddd", &lr, &rr, &tpr, &btr))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	MarginStruct margins(ValueToPoint(tpr), ValueToPoint(lr), ValueToPoint(btr), ValueToPoint(rr));
 	ScCore->primaryMainWindow()->doc->resetPage(ScCore->primaryMainWindow()->doc->pagePositioning(), &margins);
 	ScCore->primaryMainWindow()->view->reformPages();
@@ -134,9 +134,9 @@
 {
 	double grid, offset;
 	if (!PyArg_ParseTuple(args, "dd", &grid, &offset))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	ScCore->primaryMainWindow()->doc->guidesPrefs().valueBaselineGrid = ValueToPoint(grid);
 	ScCore->primaryMainWindow()->doc->guidesPrefs().offsetBaselineGrid = ValueToPoint(offset);
 	//ScCore->primaryMainWindow()->view->reformPages();
@@ -152,7 +152,7 @@
 PyObject *scribus_closedoc(PyObject* /* self */)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->doc->setModified(false);
 	bool ret = ScCore->primaryMainWindow()->slotFileClose();
 	qApp->processEvents();
@@ -168,12 +168,12 @@
 {
 	char *Name;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
 	bool ret = ScCore->primaryMainWindow()->loadDoc(QString::fromUtf8(Name));
 	if (!ret)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Failed to open document: %1","python error").arg(Name).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	return PyBool_FromLong(static_cast<long>(true));
 //	Py_INCREF(Py_True); // compatibility: return true, not none, on success
@@ -184,7 +184,7 @@
 PyObject *scribus_savedoc(PyObject* /* self */)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->slotFileSave();
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -194,7 +194,7 @@
 PyObject *scribus_getdocname(PyObject* /* self */)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	if (! ScCore->primaryMainWindow()->doc->hasName)
 	{
 		return PyString_FromString("");
@@ -206,14 +206,14 @@
 {
 	char *Name;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	bool ret = ScCore->primaryMainWindow()->DoFileSave(QString::fromUtf8(Name));
 	if (!ret)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Failed to save document.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	return PyBool_FromLong(static_cast<long>(true));
 //	Py_INCREF(Py_True); // compatibility: return true, not none, on success
@@ -226,12 +226,12 @@
 	char *Author;
 	char *Title;
 	char *Desc;
-	// z means string, but None becomes a NULL value. QString()
-	// will correctly handle NULL.
+	// z means string, but None becomes a nullptr value. QString()
+	// will correctly handle nullptr.
 	if (!PyArg_ParseTuple(args, "zzz", &Author, &Title, &Desc))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	ScCore->primaryMainWindow()->doc->documentInfo().setAuthor(QString::fromUtf8(Author));
 	ScCore->primaryMainWindow()->doc->documentInfo().setTitle(QString::fromUtf8(Title));
 	ScCore->primaryMainWindow()->doc->documentInfo().setComments(QString::fromUtf8(Desc));
@@ -245,13 +245,13 @@
 {
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	if ((e < UNITMIN) || (e > UNITMAX))
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Unit out of range. Use one of the scribus.UNIT_* constants.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	ScCore->primaryMainWindow()->slotChangeUnit(e);
 //	Py_INCREF(Py_None);
@@ -262,7 +262,7 @@
 PyObject *scribus_getunit(PyObject* /* self */)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	return PyInt_FromLong(static_cast<long>(ScCore->primaryMainWindow()->doc->unitIndex()));
 }
 
@@ -270,9 +270,9 @@
 {
 	char *fileName;
 	if (!PyArg_ParseTuple(args, "es", "utf-8", &fileName))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	ScCore->primaryMainWindow()->doc->loadStylesFromFile(QString::fromUtf8(fileName));
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -283,9 +283,9 @@
 {
 	int fp, fsl;
 	if (!PyArg_ParseTuple(args, "ii", &fp, &fsl))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	if (ScCore->primaryMainWindow()->doc->pagePositioning() == fp)
 		ScCore->primaryMainWindow()->doc->setPageSetFirstPage(ScCore->primaryMainWindow()->doc->pagePositioning(), fsl);
 	ScCore->primaryMainWindow()->view->reformPages();
@@ -301,7 +301,7 @@
 PyObject *scribus_closemasterpage(PyObject* /* self */)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	ScCore->primaryMainWindow()->view->hideMasterPage();
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -311,7 +311,7 @@
 PyObject *scribus_masterpagenames(PyObject* /* self */)
 {
 	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
 	PyObject* names = PyList_New(ScCore->primaryMainWindow()->doc->MasterPages.count());
 	QMap<QString,int>::const_iterator it(ScCore->primaryMainWindow()->doc->MasterNames.constBegin());
 	QMap<QString,int>::const_iterator itEnd(ScCore->primaryMainWindow()->doc->MasterNames.constEnd());
@@ -327,16 +327,16 @@
 {
 	char* name = 0;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	const QString masterPageName(name);
 	const QMap<QString,int>& masterNames(ScCore->primaryMainWindow()->doc->MasterNames);
 	const QMap<QString,int>::const_iterator it(masterNames.find(masterPageName));
 	if ( it == masterNames.constEnd() )
 	{
 		PyErr_SetString(PyExc_ValueError, "Master page not found");
-		return NULL;
+		return nullptr;
 	}
 	ScCore->primaryMainWindow()->view->showMasterPage(*it);
 //	Py_INCREF(Py_None);
@@ -348,14 +348,14 @@
 {
 	char* name = 0;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	const QString masterPageName(name);
 	if (ScCore->primaryMainWindow()->doc->MasterNames.contains(masterPageName))
 	{
 		PyErr_SetString(PyExc_ValueError, "Master page already exists");
-		return NULL;
+		return nullptr;
 	}
 	ScCore->primaryMainWindow()->doc->addMasterPage(ScCore->primaryMainWindow()->doc->MasterPages.count(), masterPageName);
 //	Py_INCREF(Py_None);
@@ -367,19 +367,19 @@
 {
 	char* name = 0;
 	if (!PyArg_ParseTuple(args, "es", const_cast<char*>("utf-8"), &name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	const QString masterPageName(name);
 	if (!ScCore->primaryMainWindow()->doc->MasterNames.contains(masterPageName))
 	{
 		PyErr_SetString(PyExc_ValueError, "Master page does not exist");
-		return NULL;
+		return nullptr;
 	}
 	if (masterPageName == "Normal")
 	{
 		PyErr_SetString(PyExc_ValueError, "Can not delete the Normal master page");
-		return NULL;
+		return nullptr;
 	}
 	bool oldMode = ScCore->primaryMainWindow()->doc->masterPageMode();
 	ScCore->primaryMainWindow()->doc->setMasterPageMode(true);
@@ -394,14 +394,14 @@
 {
 	int e;
 	if (!PyArg_ParseTuple(args, "i", &e))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	e--;
 	if ((e < 0) || (e > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())-1))
 	{
 		PyErr_SetString(PyExc_IndexError, QObject::tr("Page number out of range: '%1'.","python error").arg(e+1).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	return PyString_FromString(ScCore->primaryMainWindow()->doc->DocPages.at(e)->MPageNam.toUtf8());
 }
@@ -411,25 +411,25 @@
 	char* name = 0;
 	int page = 0;
 	if (!PyArg_ParseTuple(args, "esi", const_cast<char*>("utf-8"), &name, &page))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	const QString masterPageName(name);
 	if (!ScCore->primaryMainWindow()->doc->MasterNames.contains(masterPageName))
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Master page does not exist: '%1'","python error").arg(masterPageName).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	if ((page < 1) || (page > static_cast<int>(ScCore->primaryMainWindow()->doc->Pages->count())))
 	{
 		PyErr_SetString(PyExc_IndexError, QObject::tr("Page number out of range: %1.","python error").arg(page).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 
 	if (!ScCore->primaryMainWindow()->doc->applyMasterPage(masterPageName, page-1))
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Failed to apply masterpage '%1' on page: %2","python error").arg(masterPageName).arg(page).toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 //	Py_INCREF(Py_None);
 //	return Py_None;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	Sat May  5 13:51:14 2018
@@ -13,18 +13,18 @@
 PyObject *scribus_getobjecttype(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
-	PageItem *item = NULL;
+	PageItem *item = nullptr;
 	QString result = "";
 
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+
+	if(!checkHaveDocument())
+		return nullptr;
 
 	item = GetUniqueItem(QString::fromUtf8(Name));
-	if (item == NULL)
-		return NULL;
+	if (item == nullptr)
+		return nullptr;
 
 	if (item->itemType() == PageItem::TextFrame) {
 		result = "TextFrame";
@@ -51,46 +51,46 @@
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyString_FromString(i->fillColor().toUtf8()) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyString_FromString(i->fillColor().toUtf8()) : nullptr;
 }
 
 PyObject *scribus_getfilltrans(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyFloat_FromDouble(static_cast<double>(1.0 - i->fillTransparency())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(1.0 - i->fillTransparency())) : nullptr;
 }
 
 PyObject *scribus_getfillblend(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->fillBlendmode())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->fillBlendmode())) : nullptr;
 }
 
 PyObject *scribus_getcustomlinestyle(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	PageItem *it;
 	it = GetUniqueItem(QString::fromUtf8(Name));
-	if (it == NULL)
-		return NULL;
+	if (it == nullptr)
+		return nullptr;
 	return PyString_FromString(it->customLineStyle().toUtf8());
 }
 
@@ -99,12 +99,12 @@
 	char *Name = const_cast<char*>("");
 	PageItem *it;
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	it = GetUniqueItem(QString::fromUtf8(Name));
-	if (it == NULL)
-		return NULL;
+	if (it == nullptr)
+		return nullptr;
 	if ((it->HasSel) && ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText)))
 	{
 		for (int b = 0; b < it->itemText.length(); ++b)
@@ -116,40 +116,40 @@
 	else
 		return PyString_FromString(it->lineColor().toUtf8());
 	PyErr_SetString(NotFoundError, QObject::tr("Color not found - python error", "python error").toLocal8Bit().constData());
-	return NULL;
+	return nullptr;
 }
 
 PyObject *scribus_getlinetrans(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyFloat_FromDouble(static_cast<double>(1.0 - i->lineTransparency())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(1.0 - i->lineTransparency())) : nullptr;
 }
 
 PyObject *scribus_getlineblend(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->lineBlendmode())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->lineBlendmode())) : nullptr;
 }
 
 PyObject *scribus_getlinewidth(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->lineWidth())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(i->lineWidth())) : nullptr;
 }
 
 PyObject *scribus_getlineshade(PyObject* /* self */, PyObject* args)
@@ -157,12 +157,12 @@
 	char *Name = const_cast<char*>("");
 	PageItem *it;
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	it = GetUniqueItem(QString::fromUtf8(Name));
-	if (it == NULL)
-		return NULL;
+	if (it == nullptr)
+		return nullptr;
 	if ((it->HasSel) && ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText)))
 	{
 		for (int b = 0; b < it->itemText.length(); ++b)
@@ -180,89 +180,89 @@
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineJoin)) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->PLineJoin)) : nullptr;
 }
 
 PyObject *scribus_getlinecap(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineEnd)) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->PLineEnd)) : nullptr;
 }
 
 PyObject *scribus_getlinestyle(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineArt)) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->PLineArt)) : nullptr;
 }
 
 PyObject *scribus_getfillshade(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->fillShade())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->fillShade())) : nullptr;
 }
 
 PyObject *scribus_getcornerrad(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyInt_FromLong(static_cast<long>(i->cornerRadius())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyInt_FromLong(static_cast<long>(i->cornerRadius())) : nullptr;
 }
 
 PyObject *scribus_getimgscale(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? Py_BuildValue("(ff)", i->imageXScale() / 72.0 * i->pixm.imgInfo.xres, i->imageYScale() / 72.0 * i->pixm.imgInfo.yres) : NULL;
+		return nullptr;
+	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;
 }
 
 PyObject *scribus_getimagefile(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyString_FromString(i->Pfile.toUtf8()) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyString_FromString(i->Pfile.toUtf8()) : nullptr;
 }
 
 PyObject *scribus_getposi(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (!i)
-		return NULL;
+		return nullptr;
 	return Py_BuildValue("(ff)", docUnitXToPageX(i->xPos()),
 								 docUnitYToPageY(i->yPos()));
 }
@@ -271,22 +271,22 @@
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->width()), PointToValue(i->height())) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return (i != nullptr) ? Py_BuildValue("(ff)", PointToValue(i->width()), PointToValue(i->height())) : nullptr;
 }
 
 PyObject *scribus_getrotation(PyObject* /* self */, PyObject* args)
 {
 	char *Name = const_cast<char*>("");
 	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
-	if(!checkHaveDocument())
-		return NULL;
-	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
-	return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->rotation() * -1)) : NULL;
+		return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != nullptr ? PyFloat_FromDouble(static_cast<double>(i->rotation() * -1)) : nullptr;
 }
 
 PyObject *scribus_getallobj(PyObject* /* self */, PyObject* args, PyObject *keywds)
@@ -296,21 +296,21 @@
 	uint counter = 0;
 	uint counter2 = 0;
 	uint pageNr = ScCore->primaryMainWindow()->doc->currentPageNumber();
-	char *kwlist[] = {const_cast<char*>(""), const_cast<char*>("page"), NULL};
+	char *kwlist[] = {const_cast<char*>(""), const_cast<char*>("page"), nullptr};
 
 
 	if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ii", kwlist, &typ, &pageNr))
-		return NULL;
+		return nullptr;
 
 	uint numpages = ScCore->primaryMainWindow()->doc->Pages->count();
 	if(pageNr < 0 || pageNr >= numpages){
 		PyErr_SetString(PyExc_RuntimeError, QObject::tr("page number is invalid.","python error").toLocal8Bit().constData());
-		return NULL;
+		return nullptr;
 	}
 	//if (!PyArg_ParseTuple(args, "|i", &typ))
-	//	return NULL;
-	if(!checkHaveDocument())
-		return NULL;
+	//	return nullptr;
+	if(!checkHaveDocument())
+		return nullptr;
 	// have doc already
 	if (typ != -1)
 	{
@@ -355,19 +355,19 @@
 PyObject *scribus_getobjectattributes(PyObject* /* self */, PyObject* args)
 {
 	if(!checkHaveDocument())
-		return NULL;
-	char *Name = const_cast<char*>("");
-	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
-		return NULL;
+		return nullptr;
+	char *Name = const_cast<char*>("");
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
+		return nullptr;
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
-	if (item == NULL)
-		return NULL;
+	if (item == nullptr)
+		return nullptr;
 
 	ObjAttrVector *attributes=item->getObjectAttributes();
 	PyObject *lst;
 	lst = PyList_New(attributes->count());
 	if (!lst)
-		return NULL;
+		return nullptr;
 	int n = 0;
 	for (ObjAttrVector::Iterator objAttrIt = attributes->begin() ; objAttrIt != attributes->end(); ++objAttrIt)
 	{
@@ -385,7 +385,7 @@
 		else {
 			// Error string is already set by Py_BuildValue()
 			Py_DECREF(lst);
-			return NULL;
+			return nullptr;
 		}
 		n++;
 	}

Modified: trunk/Scribus/scribus/sccolorengine.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/sccolorengine.cpp
==============================================================================
--- trunk/Scribus/scribus/sccolorengine.cpp	(original)
+++ trunk/Scribus/scribus/sccolorengine.cpp	Sat May  5 13:51:14 2018
@@ -735,7 +735,7 @@
 	if (doSoftProofing && doGamutCheck)
 	{
 		bool outOfGamutFlag = isOutOfGamut(color, doc);
-		if (outOfG != NULL)
+		if (outOfG != nullptr)
 			*outOfG = outOfGamutFlag;
 		tmp = outOfGamutFlag ? QColor(0, 255, 0) : getDisplayColor(color, doc);
 	}

Modified: trunk/Scribus/scribus/scstreamfilter_ascii85.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_ascii85.cpp
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_ascii85.cpp	(original)
+++ trunk/Scribus/scribus/scstreamfilter_ascii85.cpp	Sat May  5 13:51:14 2018
@@ -22,7 +22,7 @@
 	m_four_tuple_pending = 0;
 }
 
-bool ScASCII85EncodeFilter::openFilter (void)
+bool ScASCII85EncodeFilter::openFilter ()
 {
 	m_buffer_pending     = 0;
 	m_four_tuple_pending = 0;
@@ -32,7 +32,7 @@
 	return ScStreamFilter::openFilter();
 }
 
-bool ScASCII85EncodeFilter::closeFilter(void)
+bool ScASCII85EncodeFilter::closeFilter()
 {
 	bool success = true;
 	if (m_buffer_pending)

Modified: trunk/Scribus/scribus/scstreamfilter_ascii85.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_ascii85.h
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_ascii85.h	(original)
+++ trunk/Scribus/scribus/scstreamfilter_ascii85.h	Sat May  5 13:51:14 2018
@@ -26,8 +26,8 @@
 	ScASCII85EncodeFilter(QDataStream* stream);
 	ScASCII85EncodeFilter(ScStreamFilter* filter);
 
-	virtual bool openFilter (void);
-	virtual bool closeFilter(void);
+	virtual bool openFilter ();
+	virtual bool closeFilter();
 
 	virtual bool writeData(const char* data, int dataLen);
 };

Modified: trunk/Scribus/scribus/scstreamfilter_flate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_flate.cpp
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_flate.cpp	(original)
+++ trunk/Scribus/scribus/scstreamfilter_flate.cpp	Sat May  5 13:51:14 2018
@@ -25,14 +25,14 @@
 ScFlateEncodeFilter::ScFlateEncodeFilter(QDataStream* stream)
 				   : ScStreamFilter(stream)
 {
-	m_filterData   = NULL;
+	m_filterData   = nullptr;
 	m_openedFilter = false;
 }
 
 ScFlateEncodeFilter::ScFlateEncodeFilter(ScStreamFilter* filter)
 				   : ScStreamFilter(filter)
 {
-	m_filterData   = NULL;
+	m_filterData   = nullptr;
 	m_openedFilter = false;
 }
 
@@ -43,19 +43,19 @@
 	freeData();
 }
 
-void ScFlateEncodeFilter::freeData(void)
+void ScFlateEncodeFilter::freeData()
 {
 	if (m_filterData)
 		free (m_filterData);
-	m_filterData = NULL;
+	m_filterData = nullptr;
 }
 
-bool ScFlateEncodeFilter::openFilter (void)
+bool ScFlateEncodeFilter::openFilter()
 {
 	freeData();
 
 	m_filterData = (ScFlateEncodeFilterData*) malloc(sizeof(ScFlateEncodeFilterData));
-	if (m_filterData == NULL)
+	if (m_filterData == nullptr)
 		return false;
 
 	m_filterData->zlib_stream.zalloc = Z_NULL;
@@ -76,7 +76,7 @@
 	m_openedFilter = ScStreamFilter::openFilter();
 	return m_openedFilter;
 }
-bool ScFlateEncodeFilter::closeFilter(void)
+bool ScFlateEncodeFilter::closeFilter()
 {
 	bool closeSucceed = writeDeflate(true);
     deflateEnd (&m_filterData->zlib_stream);

Modified: trunk/Scribus/scribus/scstreamfilter_flate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_flate.h
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_flate.h	(original)
+++ trunk/Scribus/scribus/scstreamfilter_flate.h	Sat May  5 13:51:14 2018
@@ -18,7 +18,7 @@
 
 	ScFlateEncodeFilterData* m_filterData;
 
-	void freeData(void);
+	void freeData();
 	bool m_openedFilter;
 
 	bool writeDeflate(bool flush);
@@ -28,8 +28,8 @@
 	ScFlateEncodeFilter(ScStreamFilter* filter);
 	~ScFlateEncodeFilter();
 
-	virtual bool openFilter (void);
-	virtual bool closeFilter(void);
+	virtual bool openFilter ();
+	virtual bool closeFilter();
 
 	virtual bool writeData(const char* data, int dataLen);
 };

Modified: trunk/Scribus/scribus/scstreamfilter_jpeg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_jpeg.cpp
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_jpeg.cpp	(original)
+++ trunk/Scribus/scribus/scstreamfilter_jpeg.cpp	Sat May  5 13:51:14 2018
@@ -141,14 +141,14 @@
 	freeData();
 }
 
-void ScJpegEncodeFilter::freeData(void)
+void ScJpegEncodeFilter::freeData()
 {
 	if (m_filterData)
 		delete m_filterData;
 	m_filterData = nullptr;
 }
 
-bool ScJpegEncodeFilter::openFilter (void)
+bool ScJpegEncodeFilter::openFilter ()
 {
 	freeData();
 
@@ -212,7 +212,7 @@
 	return true;
 }
 
-bool ScJpegEncodeFilter::closeFilter(void)
+bool ScJpegEncodeFilter::closeFilter()
 {
 	bool closeSucceed = true;
 

Modified: trunk/Scribus/scribus/scstreamfilter_jpeg.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_jpeg.h
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_jpeg.h	(original)
+++ trunk/Scribus/scribus/scstreamfilter_jpeg.h	Sat May  5 13:51:14 2018
@@ -29,8 +29,8 @@
 	ScJpegEncodeFilter(ScStreamFilter* filter, unsigned int imgWidth, unsigned int imgHeight, ScJpegEncodeFilter::Color color);
 	~ScJpegEncodeFilter();
 
-	virtual bool openFilter (void);
-	virtual bool closeFilter(void);
+	virtual bool openFilter ();
+	virtual bool closeFilter();
 
 	virtual bool writeData(const char* data, int dataLen);
 
@@ -40,7 +40,7 @@
 
 	ScJpegEncodeFilterData* m_filterData;
 
-	void  freeData(void);
+	void  freeData();
 	bool  m_openedFilter;
 
 	unsigned int m_width;

Modified: trunk/Scribus/scribus/scstreamfilter_rc4.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_rc4.cpp
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_rc4.cpp	(original)
+++ trunk/Scribus/scribus/scstreamfilter_rc4.cpp	Sat May  5 13:51:14 2018
@@ -22,14 +22,14 @@
 ScRC4EncodeFilter::ScRC4EncodeFilter(QDataStream* stream, const char* key, unsigned int keyLen)
 				 : ScStreamFilter(stream), m_key(key, keyLen)
 {
-	m_filterData = NULL;
+	m_filterData = nullptr;
 	m_openedFilter = false;
 }
 
 ScRC4EncodeFilter::ScRC4EncodeFilter(ScStreamFilter* filter, const char* key, unsigned int keyLen)
 				 : ScStreamFilter(filter), m_key(key, keyLen)
 {
-	m_filterData = NULL;
+	m_filterData = nullptr;
 	m_openedFilter = false;
 }
 
@@ -40,19 +40,19 @@
 	freeData();
 }
 
-void ScRC4EncodeFilter::freeData(void)
+void ScRC4EncodeFilter::freeData()
 {
 	if (m_filterData)
 		free (m_filterData);
-	m_filterData = NULL;
+	m_filterData = nullptr;
 }
 
-bool ScRC4EncodeFilter::openFilter (void)
+bool ScRC4EncodeFilter::openFilter ()
 {
 	freeData();
 
 	m_filterData = (ScRC4EncodeFilterData*) malloc(sizeof(ScRC4EncodeFilterData));
-	if (m_filterData == NULL)
+	if (m_filterData == nullptr)
 		return false;
 
 	rc4_init(&m_filterData->rc4_context, (uchar*) m_key.data(),m_key.length());
@@ -61,7 +61,7 @@
 	return true;
 }
 
-bool ScRC4EncodeFilter::closeFilter(void)
+bool ScRC4EncodeFilter::closeFilter()
 {
 	bool closeSucceed = true;
 	if (m_filterData->available_in > 0)

Modified: trunk/Scribus/scribus/scstreamfilter_rc4.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/scstreamfilter_rc4.h
==============================================================================
--- trunk/Scribus/scribus/scstreamfilter_rc4.h	(original)
+++ trunk/Scribus/scribus/scstreamfilter_rc4.h	Sat May  5 13:51:14 2018
@@ -29,8 +29,8 @@
 	ScRC4EncodeFilter(ScStreamFilter* filter, const char* key, unsigned int keyLen);
 	~ScRC4EncodeFilter();
 
-	virtual bool openFilter (void);
-	virtual bool closeFilter(void);
+	virtual bool openFilter ();
+	virtual bool closeFilter();
 
 	virtual bool writeData(const char* data, int dataLen);
 };

Modified: trunk/Scribus/scribus/ui/aligndistribute.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/aligndistribute.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/aligndistribute.cpp	(original)
+++ trunk/Scribus/scribus/ui/aligndistribute.cpp	Sat May  5 13:51:14 2018
@@ -51,7 +51,7 @@
 {
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
-	currDoc=NULL;
+	currDoc=nullptr;
 	guideDirection=-1;
 	setObjectName(name);
 	
@@ -70,7 +70,7 @@
 	resize( QSize(100, 100).expandedTo(minimumSizeHint()) );
 	languageChange();
 	init();
-	setDoc(NULL);
+	setDoc(nullptr);
 }
 
 AlignDistributePalette::~AlignDistributePalette()
@@ -291,7 +291,7 @@
 
 void AlignDistributePalette::unitChange()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 	{
 		unitRatio=unitGetRatioFromIndex(currDoc->unitIndex());
 		distributeDistSpinBox->setNewUnit(currDoc->unitIndex());
@@ -302,171 +302,171 @@
 void AlignDistributePalette::setDoc( ScribusDoc* newDoc )
 {
 	currDoc=newDoc;
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		alignObjects=&(currDoc->AObjects);
 	else
-		alignObjects=NULL;
+		alignObjects=nullptr;
 	unitChange();
 }
 
 void AlignDistributePalette::alignLeftOut()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignLeftOut(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignLeftIn()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignLeftIn(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignCenterHor()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignCenterHor(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignRightIn()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignRightIn(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignRightOut()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignRightOut(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignTopOut()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignTopOut(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignTopIn()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignTopIn(currAlignTo, currAlignMethod, guidePosition);
 }
 
 
 void AlignDistributePalette::alignCenterVer()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignCenterVer(currAlignTo, currAlignMethod, guidePosition);
 }
 
 
 void AlignDistributePalette::alignBottomIn()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignBottomIn(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::alignBottomOut()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_AlignBottomOut(currAlignTo, currAlignMethod, guidePosition);
 }
 
 void AlignDistributePalette::distributeLeft()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeLeft();
 }
 
 void AlignDistributePalette::distributeCenterH()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeCenterH();
 }
 
 void AlignDistributePalette::distributeRight()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeRight();
 }
 
 void AlignDistributePalette::distributeDistH(bool usingDistance)
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeDistH(usingDistance, distributeDistSpinBox->value(), reverseDistributionCheckBox->isChecked());
 }
 
 void AlignDistributePalette::distributeDistValH()
 {
 	distributeDistSpinBox->interpretText();
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		distributeDistH(true);
 }
 
 void AlignDistributePalette::distributeDistAcrossPage()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeAcrossPage();
 }
 
 void AlignDistributePalette::distributeDistDownPage()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeDownPage();
 }
 
 void AlignDistributePalette::distributeDistAcrossMargins()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeAcrossPage(true);
 }
 
 void AlignDistributePalette::distributeDistDownMargins()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeDownPage(true);
 }
 
 
 void AlignDistributePalette::distributeBottom()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeBottom();
 }
 
 void AlignDistributePalette::distributeCenterV()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeCenterV();
 }
 
 void AlignDistributePalette::distributeTop()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeTop();
 }
 
 void AlignDistributePalette::distributeDistV(bool usingDistance)
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_DistributeDistV(usingDistance, distributeDistSpinBox->value(), reverseDistributionCheckBox->isChecked());
 }
 
 void AlignDistributePalette::distributeDistValV()
 {
 	distributeDistSpinBox->interpretText();
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		distributeDistV(true);
 }
 
 void AlignDistributePalette::swapLeft()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_SwapLeft();
 }
 
 void AlignDistributePalette::swapRight()
 {
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 		currDoc->itemSelection_SwapRight();
 }
 
@@ -495,7 +495,7 @@
 	QString suffix;
 	double unitRatio=1.0;
 	int precision=1;
-	if (currDoc!=NULL)
+	if (currDoc!=nullptr)
 	{
 		suffix=unitGetSuffixFromIndex(currDoc->unitIndex());
 		unitRatio=unitGetRatioFromIndex(currDoc->unitIndex());

Modified: trunk/Scribus/scribus/ui/autoform.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/autoform.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/autoform.cpp	(original)
+++ trunk/Scribus/scribus/ui/autoform.cpp	Sat May  5 13:51:14 2018
@@ -10,7 +10,7 @@
 
 Autoforms::Autoforms( QWidget* parent ) : QToolButton( parent )
 {
-	buttonGroup1 = new AutoformButtonGroup( NULL );
+	buttonGroup1 = new AutoformButtonGroup( nullptr );
 	setMenu(buttonGroup1);
 	setPopupMode(QToolButton::InstantPopup);
 	setIcon(QIcon(buttonGroup1->getIconPixmap(0)));

Modified: trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/autoformbuttongroup.cpp	(original)
+++ trunk/Scribus/scribus/ui/autoformbuttongroup.cpp	Sat May  5 13:51:14 2018
@@ -86,7 +86,7 @@
 
 qreal* AutoformButtonGroup::getShapeData(int a, int *n)
 {
-	qreal *vals = NULL;
+	qreal *vals = nullptr;
 	static qreal AutoShapes0[] = {0.0, 0.0, 0.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
 									0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 0.0, 0.0, 0.0};
 	static qreal AutoShapes1[] = {100.0, 50.0, 100.0, 77.615235, 50.0, 100.0, 77.615235, 100.0, 50.0, 100.0, 22.385765, 100.0,

Modified: trunk/Scribus/scribus/ui/bookmwin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/bookmwin.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/bookmwin.cpp	(original)
+++ trunk/Scribus/scribus/ui/bookmwin.cpp	Sat May  5 13:51:14 2018
@@ -212,12 +212,12 @@
 		currItem->Pare = parent ? parent->ItemNr : 0;
 		if (currItem->Pare == 0) // top level item
 		{
-			BookMItem *prev   = NULL, *next = NULL;
+			BookMItem *prev   = nullptr, *next = nullptr;
 			int topLevelIndex = this->indexOfTopLevelItem(currItem);
 			if (topLevelIndex >= 0)
 			{
-				prev = (topLevelIndex > 0) ? (BookMItem *) this->topLevelItem(topLevelIndex - 1) : NULL;
-				next = (topLevelIndex < (topLevelCount - 1)) ? (BookMItem *) this->topLevelItem(topLevelIndex + 1) : NULL;
+				prev = (topLevelIndex > 0) ? (BookMItem *) this->topLevelItem(topLevelIndex - 1) : nullptr;
+				next = (topLevelIndex < (topLevelCount - 1)) ? (BookMItem *) this->topLevelItem(topLevelIndex + 1) : nullptr;
 			}
 			currItem->Prev = prev ? prev->ItemNr : 0;
 			currItem->Next = next ? next->ItemNr : 0;
@@ -229,7 +229,7 @@
 		int childCount  = currItem->childCount();
 		if (childCount > 0)
 		{
-			BookMItem * child = NULL, *prev = NULL, *next = NULL;
+			BookMItem * child = nullptr, *prev = nullptr, *next = nullptr;
 			BookMItem * firstChild = (BookMItem*) currItem->child(0);
 			BookMItem * lastChild  = (BookMItem*) currItem->child(childCount - 1);
 			currItem->First = firstChild->ItemNr;
@@ -237,7 +237,7 @@
 			for (int i = 0; i < childCount; ++i)
 			{
 				child = (BookMItem*) currItem->child(i);
-				next  = (i < (childCount - 1)) ? (BookMItem*) currItem->child(i + 1) : NULL;
+				next  = (i < (childCount - 1)) ? (BookMItem*) currItem->child(i + 1) : nullptr;
 				child->Prev = prev ? prev->ItemNr : 0;
 				child->Next = next ? next->ItemNr : 0;
 				prev = child;

Modified: trunk/Scribus/scribus/ui/colorlistbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/colorlistbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistbox.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorlistbox.cpp	Sat May  5 13:51:14 2018
@@ -28,7 +28,7 @@
 
 
 
-ColorPixmapValue::ColorPixmapValue() : m_color(), m_doc(NULL), m_name("invalid")
+ColorPixmapValue::ColorPixmapValue() : m_color(), m_doc(nullptr), m_name("invalid")
 {}
 
 ColorPixmapValue::ColorPixmapValue(const ColorPixmapValue& other) : m_color(other.m_color), m_doc(other.m_doc), m_name(other.m_name)
@@ -44,7 +44,7 @@
 
 ColorPixmapValue::ColorPixmapValue( const ScColor& col, ScribusDoc* doc, const QString colName ) 
 {
-	m_doc = (doc) ? doc->guardedPtr() : NULL;
+	m_doc = (doc) ? doc->guardedPtr() : nullptr;
 	m_color = col;
 	m_name = colName;
 }
@@ -203,7 +203,7 @@
 ColorListBox::ColorListBox(QWidget * parent)
 	: QListView(parent)
 {
-	cList = NULL;
+	cList = nullptr;
 	if (initialized != 12345)
 		sortRule = 0;
 	initialized = 12345;
@@ -222,7 +222,7 @@
 ColorListBox::ColorListBox(ColorListBox::PixmapType type, QWidget * parent)
 	: QListView(parent)
 {
-	cList = NULL;
+	cList = nullptr;
 	if (initialized != 12345)
 		sortRule = 0;
 	initialized = 12345;
@@ -520,7 +520,7 @@
 
 bool ColorListBox::viewportEvent(QEvent *event)
 {
-	if (event != NULL)
+	if (event != nullptr)
 	{
 		if (event->type() == QEvent::MouseButtonPress)
 		{

Modified: trunk/Scribus/scribus/ui/colorsandfills.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/colorsandfills.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorsandfills.cpp	Sat May  5 13:51:14 2018
@@ -1853,7 +1853,7 @@
 				else
 				{
 					const ScColor& col = m_colorList[name];
-					color = ScColorEngine::getShadeColorProof(col, NULL, shade);
+					color = ScColorEngine::getShadeColorProof(col, nullptr, shade);
 				}
 				gra.addStop(color, ramp, 0.5, opa, name, shade);
 				grad = grad.nextSibling();

Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp	(original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp	Sat May  5 13:51:14 2018
@@ -64,7 +64,7 @@
 	if (selectedItemCount == 0)
 		return;
 	
-	PageItem* currItem=NULL;
+	PageItem* currItem=nullptr;
 	for (int i = 0; i < selectedItemCount; ++i)
 	{
 		currItem = m_Sel.itemAt(i);

Modified: trunk/Scribus/scribus/ui/cupsoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/cupsoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cupsoptions.cpp	(original)
+++ trunk/Scribus/scribus/ui/cupsoptions.cpp	Sat May  5 13:51:14 2018
@@ -80,8 +80,8 @@
 	ppd_file_t	*ppd;				/* PPD data */
 	ppd_group_t	*group;			/* Current group */
 	num_dests = cupsGetDests(&dests);
-	dest = cupsGetDest(Geraet.toLocal8Bit().constData(), NULL, num_dests, dests);
-	if (!(dest == NULL || (filename = cupsGetPPD(dest->name)) == NULL || (ppd = ppdOpenFile(filename)) == NULL))
+	dest = cupsGetDest(Geraet.toLocal8Bit().constData(), nullptr, num_dests, dests);
+	if (!(dest == nullptr || (filename = cupsGetPPD(dest->name)) == nullptr || (ppd = ppdOpenFile(filename)) == nullptr))
 	{
 		ppdMarkDefaults(ppd);
 		cupsMarkOptions(ppd, dest->num_options, dest->options);

Modified: trunk/Scribus/scribus/ui/customfdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/customfdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/customfdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/customfdialog.cpp	Sat May  5 13:51:14 2018
@@ -342,13 +342,13 @@
 	hboxLayout1->addWidget( CancelB );
 	vboxLayout->addLayout(hboxLayout1);
 
-	SaveZip=NULL;
-	WithFonts=NULL;
-	WithProfiles=NULL;
-	TxCodeM = NULL;
-	TxCodeT = NULL;
-	Layout = LayoutC = NULL;
-	Layout1 = Layout1C = NULL;
+	SaveZip=nullptr;
+	WithFonts=nullptr;
+	WithProfiles=nullptr;
+	TxCodeM = nullptr;
+	TxCodeT = nullptr;
+	Layout = LayoutC = nullptr;
+	Layout1 = Layout1C = nullptr;
 	if (flags & fdDirectoriesOnly)
 	{
 		Layout = new QFrame(this);
@@ -401,11 +401,11 @@
 				vboxLayout->addWidget(Layout);
 		}
 		
-		if (SaveZip!=NULL)
+		if (SaveZip!=nullptr)
 			SaveZip->setToolTip( "<qt>" + tr( "Compress the Scribus document on save" ) + "</qt>");
-		if (WithFonts!=NULL)
+		if (WithFonts!=nullptr)
 			WithFonts->setToolTip( "<qt>" + tr( "Include fonts when collecting files for the document. Be sure to know and understand licensing information for any fonts you collect and possibly redistribute." ) + "</qt>");
-		if (WithProfiles!=NULL)
+		if (WithProfiles!=nullptr)
 			WithProfiles->setToolTip( "<qt>" + tr( "Include color profiles when collecting files for the document" ) + "</qt>");
 		
 		if (flags & fdShowCodecs)

Modified: trunk/Scribus/scribus/ui/extimageprops.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/extimageprops.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/extimageprops.cpp	(original)
+++ trunk/Scribus/scribus/ui/extimageprops.cpp	Sat May  5 13:51:14 2018
@@ -492,7 +492,7 @@
 
 void ExtImageProps::selPath(QListWidgetItem *c)
 {
-	if ((c != NULL) && (doPreview))
+	if ((c != nullptr) && (doPreview))
 	{
 		m_item->imageClip = m_item->pixm.imgInfo.PDSpathData[c->text()].copy();
 		m_item->pixm.imgInfo.usedPath = c->text();

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Sat May  5 13:51:14 2018
@@ -67,7 +67,7 @@
 	{
 		if (it.current().usable())
 		{
-			if (currentDoc != NULL)
+			if (currentDoc != nullptr)
 			{
 				if (currentDoc->DocName == it.current().localForDocument() || it.current().localForDocument().isEmpty())
 					rlist.insert(it.currentKey().toLower(), it.currentKey());
@@ -107,7 +107,7 @@
 		fontStyleLabel(0),
 		showLabels(labels)
 {
-	currDoc = NULL;
+	currDoc = nullptr;
 	prefsManager = PrefsManager::instance();
 	ttfFont = IconManager::instance()->loadPixmap("font_truetype16.png");
 	otfFont = IconManager::instance()->loadPixmap("font_otf16.png");
@@ -213,7 +213,7 @@
 	QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[family];
 	slist.sort();
 	QStringList ilist;
-	if (currDoc != NULL)
+	if (currDoc != nullptr)
 	{
 		for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
 		{
@@ -252,7 +252,7 @@
 	flist.clear();
 	for (QStringList::ConstIterator it2 = rlist.begin(); it2 != rlist.end(); ++it2)
 	{
-		if (currentDoc != NULL)
+		if (currentDoc != nullptr)
 		{
 			QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[*it2];
 			slist.sort();
@@ -309,7 +309,7 @@
 	QStringList slist = prefsManager->appPrefs.fontPrefs.AvailFonts.fontMap[family];
 	slist.sort();
 	QStringList ilist;
-	if (currentDoc != NULL)
+	if (currentDoc != nullptr)
 	{
 		for (QStringList::ConstIterator it = slist.begin(); it != slist.end(); ++it)
 		{
@@ -657,4 +657,4 @@
 	}
 
 	return QValidator::Invalid;
-}
+}

Modified: trunk/Scribus/scribus/ui/gtdialogs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/gtdialogs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gtdialogs.cpp	(original)
+++ trunk/Scribus/scribus/ui/gtdialogs.cpp	Sat May  5 13:51:14 2018
@@ -124,7 +124,7 @@
 
 gtDialogs::gtDialogs()
 {
-	m_fdia = NULL;
+	m_fdia = nullptr;
 	m_fileName = "";
 	m_encoding = "";
 	m_importer = -1;

Modified: trunk/Scribus/scribus/ui/helpbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/helpbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/helpbrowser.cpp	(original)
+++ trunk/Scribus/scribus/ui/helpbrowser.cpp	Sat May  5 13:51:14 2018
@@ -156,9 +156,9 @@
 	language = guiLanguage.isEmpty() ? QString("en") : guiLanguage.left(2);
 	finalBaseDir = ScPaths::instance().docDir() + "en/"; //Sane default for help location
 	textBrowser->setSearchPaths(QStringList(finalBaseDir));
-	menuModel=NULL;
+	menuModel=nullptr;
 	loadMenu();
-	if (menuModel!=NULL)
+	if (menuModel!=nullptr)
 	{
 		readBookmarks();
 		readHistory();
@@ -328,7 +328,7 @@
 		else
 			language=ScCore->getGuiLanguage();
 		loadMenu();
-		if (menuModel!=NULL)
+		if (menuModel!=nullptr)
 			loadHelp(finalBaseDir + "/" + filename);
 	}
 	else
@@ -448,7 +448,7 @@
 void HelpBrowser::deleteBookmarkButton_clicked()
 {
 	QTreeWidgetItem *twi=helpNav->bookmarksView->currentItem();
-	if (twi!=NULL)
+	if (twi!=nullptr)
 	{
 		if (bookmarkIndex.contains(twi->text(0)))
 			bookmarkIndex.remove(twi->text(0));
@@ -610,7 +610,7 @@
 	textBrowser->setSearchPaths(QStringList(finalBaseDir));
 	if (baseFi.exists())
 	{
-		if (menuModel!=NULL)
+		if (menuModel!=nullptr)
 			delete menuModel;
 		menuModel=new ScHelpTreeModel(toLoad, "Topic", "Location", &quickHelpIndex);
 	
@@ -623,7 +623,7 @@
 		helpNav->listView->setColumnHidden(1,true);
 	}
 	else
-		menuModel=NULL;
+		menuModel=nullptr;
 }
 
 void HelpBrowser::readBookmarks()

Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/hruler.cpp	Sat May  5 13:51:14 2018
@@ -79,7 +79,7 @@
 	First(0.0),
 	RMargin(0.0),
 	Revers(false),
-	currItem(NULL),
+	currItem(nullptr),
 	ItemPos(0.0),
 	ItemEndPos(0.0),
 	offs(0.0),

Modified: trunk/Scribus/scribus/ui/inlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/inlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/inlinepalette.cpp	Sat May  5 13:51:14 2018
@@ -111,7 +111,7 @@
 	setWidget( InlineViewWidget );
 
 	unsetDoc();
-	m_scMW  = NULL;
+	m_scMW  = nullptr;
 	currentEditedItem = -1;
 	languageChange();
 	connect(InlineViewWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
@@ -209,7 +209,7 @@
 void InlinePalette::setMainWindow(ScribusMainWindow *mw)
 {
 	m_scMW = mw;
-	if (m_scMW == NULL)
+	if (m_scMW == nullptr)
 	{
 		InlineViewWidget->clear();
 		disconnect(m_scMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
@@ -220,11 +220,11 @@
 
 void InlinePalette::setDoc(ScribusDoc *newDoc)
 {
-	if (m_scMW == NULL)
-		m_doc = NULL;
+	if (m_scMW == nullptr)
+		m_doc = nullptr;
 	else
 		m_doc = newDoc;
-	if (m_doc == NULL)
+	if (m_doc == nullptr)
 	{
 		InlineViewWidget->clear();
 		setEnabled(true);
@@ -238,7 +238,7 @@
 
 void InlinePalette::unsetDoc()
 {
-	m_doc = NULL;
+	m_doc = nullptr;
 	InlineViewWidget->clear();
 	setEnabled(true);
 }

Modified: trunk/Scribus/scribus/ui/insertaframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/insertaframe.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/insertaframe.cpp	(original)
+++ trunk/Scribus/scribus/ui/insertaframe.cpp	Sat May  5 13:51:14 2018
@@ -206,7 +206,7 @@
 	iafData.columnGap=textColumnGapScrSpinBox->value();
 	iafData.linkTextFrames=checkBoxLinkCreatedTextFrames->isChecked();
 	iafData.linkToExistingFrame=checkBoxLinkToExistingFrame->isChecked();
-	iafData.linkToExistingFramePtr=NULL;
+	iafData.linkToExistingFramePtr=nullptr;
 	if (comboBoxLinkToExistingFrameName->count()!=0)
 	{
 		QHashIterator<PageItem*, QString> i(pageItemMap);

Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp	(original)
+++ trunk/Scribus/scribus/ui/layers.cpp	Sat May  5 13:51:14 2018
@@ -167,7 +167,7 @@
 	disconnect(Table, SIGNAL(cellChanged(int, int)), this, SLOT(changeName(int, int)));
 	Table->clearContents();
 	Table->setRowCount(0);
-	m_Doc = NULL;
+	m_Doc = nullptr;
 	newLayerButton->setEnabled(false);
 	deleteLayerButton->setEnabled(false);
 	raiseLayerButton->setEnabled(false);

Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp	(original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp	Sat May  5 13:51:14 2018
@@ -286,7 +286,7 @@
 	for (int i = 0; i < m_Doc->m_Selection->count(); ++i)
 	{
 		PageItem* currItem = m_Doc->m_Selection->itemAt(i);
-		if (currItem == NULL)
+		if (currItem == nullptr)
 			continue;
 		//do not insert lorem ipsum text into notes frames
 		if (currItem->isNoteFrame())
@@ -316,9 +316,9 @@
 				continue;
 		}
 		LoremParser *lp = new LoremParser(name);
-		if (lp == NULL)
-		{
-			qDebug("LoremManager::okButton_clicked() *lp == NULL");
+		if (lp == nullptr)
+		{
+			qDebug("LoremManager::okButton_clicked() *lp == nullptr");
 			return;
 		}
 		

Modified: trunk/Scribus/scribus/ui/marginwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/marginwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marginwidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/marginwidget.cpp	Sat May  5 13:51:14 2018
@@ -94,13 +94,13 @@
 	}
 	else
 	{
-		marginsForPagesLayout=NULL;
-		marginsForPages=NULL;
-		marginsForAllPages=NULL;
-		marginsForAllMasterPages=NULL;
-	}
-
-	usePrinterMarginsButton=NULL;
+		marginsForPagesLayout=nullptr;
+		marginsForPages=nullptr;
+		marginsForAllPages=nullptr;
+		marginsForAllMasterPages=nullptr;
+	}
+
+	usePrinterMarginsButton=nullptr;
 	usePrinterMarginsButton = new QPushButton( tr("Printer Margins..."),marginPage );
 	GroupLayout->addWidget( usePrinterMarginsButton, 5, 1 );
 	usePrinterMarginsButton->setToolTip( "<qt>" + tr( "Import the margins for the selected page size from the available printers" ) + "</qt>");

Modified: trunk/Scribus/scribus/ui/markvariabletext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/markvariabletext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/markvariabletext.cpp	(original)
+++ trunk/Scribus/scribus/ui/markvariabletext.cpp	Sat May  5 13:51:14 2018
@@ -8,7 +8,7 @@
 	setupUi(this);
 
 	labelEditWidget = (QWidget*) new QComboBox(parent);
-	((QComboBox*) labelEditWidget)->addItem(tr("New Mark"), QVariant::fromValue((void*) NULL));
+	((QComboBox*) labelEditWidget)->addItem(tr("New Mark"), QVariant::fromValue((void*) nullptr));
 	for (int i = 0; i < marks.size(); ++i)
 	{
 		if (marks[i]->isType(MARKVariableTextType))

Modified: trunk/Scribus/scribus/ui/mergedoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/mergedoc.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/mergedoc.cpp	(original)
+++ trunk/Scribus/scribus/ui/mergedoc.cpp	Sat May  5 13:51:14 2018
@@ -57,11 +57,11 @@
 	importPageLabel = new QLabel( tr( "&Import Page(s):" ), this );
 	fromInfoLayout->addWidget( importPageLabel, 1, 0 );
 
-	fromLabel = NULL;
-	pageNumberData = NULL;
-	createPageData = NULL;
-	importWhereData = NULL;
-	importWherePageData = NULL;
+	fromLabel = nullptr;
+	pageNumberData = nullptr;
+	createPageData = nullptr;
+	importWhereData = nullptr;
+	importWherePageData = nullptr;
 	if (masterPages)
 	{
 		importPageLabel->setText( tr("&Import Master Page") );

Modified: trunk/Scribus/scribus/ui/missing.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/missing.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/missing.cpp	(original)
+++ trunk/Scribus/scribus/ui/missing.cpp	Sat May  5 13:51:14 2018
@@ -40,7 +40,7 @@
 	useLabel = new QLabel( tr( "Use" ), this );
 	missingFontGridLayout->addWidget( useLabel, 1, 1 );
 	replaceFontCombo = new FontComboH(this);
-	replaceFontCombo->setCurrentFont(doc == NULL ? PrefsManager::instance()->appPrefs.itemToolPrefs.textFont : doc->itemToolPrefs().textFont);
+	replaceFontCombo->setCurrentFont(doc == nullptr ? PrefsManager::instance()->appPrefs.itemToolPrefs.textFont : doc->itemToolPrefs().textFont);
 	replacementFont = replaceFontCombo->currentFont();
 	missingFontGridLayout->addWidget( replaceFontCombo, 1, 2 );
 	insteadLabel = new QLabel( tr( "instead" ), this );

Modified: trunk/Scribus/scribus/ui/modetoolbar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/modetoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/modetoolbar.cpp	(original)
+++ trunk/Scribus/scribus/ui/modetoolbar.cpp	Sat May  5 13:51:14 2018
@@ -52,7 +52,7 @@
 	this->addAction(m_ScMW->scrActions["toolsInsertTable"]);
 	
 	this->addAction(m_ScMW->scrActions["toolsInsertShape"]);
-	autoFormButtonGroup = new AutoformButtonGroup( NULL );
+	autoFormButtonGroup = new AutoformButtonGroup( nullptr );
 	m_ScMW->scrActions["toolsInsertShape"]->setMenu(autoFormButtonGroup);
 	QToolButton* tb = dynamic_cast<QToolButton*>(this->widgetForAction(m_ScMW->scrActions["toolsInsertShape"]));
 	tb->setPopupMode(QToolButton::DelayedPopup);

Modified: trunk/Scribus/scribus/ui/newfile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/newfile.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newfile.cpp	(original)
+++ trunk/Scribus/scribus/ui/newfile.cpp	Sat May  5 13:51:14 2018
@@ -562,7 +562,7 @@
 		}
 		else if (m_tabSelected == NewDoc::OpenRecentTab) // open recent doc
 		{
-			if (recentDocListBox->currentItem() != NULL)
+			if (recentDocListBox->currentItem() != nullptr)
 			{
 				QString fileName(recentDocListBox->currentItem()->text());
 				if (!fileName.isEmpty())

Modified: trunk/Scribus/scribus/ui/osgeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/osgeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/osgeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/osgeditor.cpp	Sat May  5 13:51:14 2018
@@ -297,10 +297,10 @@
 	if (theState)
 	{
 		pRAP = theState->getAttribute(osg::StateAttribute::MATERIAL);
-		if (pRAP != NULL)
+		if (pRAP != nullptr)
 		{
 			osg::Material *material = dynamic_cast<osg::Material*>(pRAP);
-			if (material != NULL)
+			if (material != nullptr)
 			{
 				material->setColorMode(osg::Material::OFF);
 				material->setAlpha(osg::Material::FRONT_AND_BACK, transparency);
@@ -319,10 +319,10 @@
 			if (theState)
 			{
 				pRAP = theState->getAttribute(osg::StateAttribute::MATERIAL);
-				if (pRAP != NULL)
+				if (pRAP != nullptr)
 				{
 					osg::Material *material = dynamic_cast<osg::Material*>(pRAP);
-					if (material != NULL)
+					if (material != nullptr)
 					{
 						material->setColorMode(osg::Material::OFF);
 						material->setAlpha(osg::Material::FRONT_AND_BACK, transparency);

Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp	Sat May  5 13:51:14 2018
@@ -47,18 +47,18 @@
 
 OutlineTreeItem::OutlineTreeItem(OutlineTreeItem* parent, OutlineTreeItem* after) : QTreeWidgetItem(parent, after)
 {
-	PageObject = NULL;
-	PageItemObject = NULL;
-	DocObject = NULL;
+	PageObject = nullptr;
+	PageItemObject = nullptr;
+	DocObject = nullptr;
 	type = -1;
 	LayerID = -1;
 }
 
 OutlineTreeItem::OutlineTreeItem(QTreeWidget* parent, OutlineTreeItem* after) : QTreeWidgetItem(parent, after)
 {
-	PageObject = NULL;
-	PageItemObject = NULL;
-	DocObject = NULL;
+	PageObject = nullptr;
+	PageItemObject = nullptr;
+	DocObject = nullptr;
 	type = -1;
 	LayerID = -1;
 }
@@ -110,7 +110,7 @@
 	for (int i = 0; i < its.count(); ++i)
 	{
 		QTreeWidgetItem* it = its.at(i);
-		if (it == NULL)
+		if (it == nullptr)
 			continue;
 		OutlineTreeItem *itemPar = itemPars.at(i);
 		OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(it);
@@ -314,7 +314,7 @@
  		if (it != 0)
  		{
 			OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(it);
- 			if (item != NULL)
+			if (item != nullptr)
  			{
  				QString tipText("");
 				if (item->type == 5)
@@ -504,10 +504,10 @@
 	annotLinkIcon = im->loadPixmap("goto.png");
 	annot3DIcon = im->loadPixmap("22/annot3d.png");
 	selectionTriggered = false;
-	m_MainWindow  = NULL;
-	freeObjects   = NULL;
-	rootObject    = NULL;
-	currentObject = NULL;
+	m_MainWindow  = nullptr;
+	freeObjects   = nullptr;
+	rootObject    = nullptr;
+	currentObject = nullptr;
 	languageChange();
 	// signals and slots connections
 	connect(reportDisplay, SIGNAL(customContextMenuRequested (const QPoint &)), this, SLOT(slotRightClick(QPoint)));
@@ -521,30 +521,30 @@
 void OutlinePalette::setMainWindow(ScribusMainWindow *mw)
 {
 	m_MainWindow=mw;
-	if (m_MainWindow==NULL)
+	if (m_MainWindow==nullptr)
 		clearPalette();
 }
 
 void OutlinePalette::setDoc(ScribusDoc *newDoc)
 {
-	if (m_MainWindow==NULL)
-		currDoc=NULL;
+	if (m_MainWindow==nullptr)
+		currDoc=nullptr;
 	else
 		currDoc=newDoc;
-	if (currDoc==NULL)
+	if (currDoc==nullptr)
 		clearPalette();
 }
 
 void OutlinePalette::unsetDoc()
 {
-	currDoc=NULL;
+	currDoc=nullptr;
 	clearPalette();
 }
 
 void OutlinePalette::setPaletteShown(bool visible)
 {
 	ScDockPalette::setPaletteShown(visible);
-	if ((visible) && (currDoc != NULL))
+	if ((visible) && (currDoc != nullptr))
 		BuildTree();
 }
 
@@ -553,7 +553,7 @@
 	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	QTreeWidgetItem *ite = reportDisplay->itemAt(point);
-	if (ite == NULL)
+	if (ite == nullptr)
 		return;
 	if (!ite->isSelected())
 		slotMultiSelect();
@@ -561,14 +561,14 @@
 		return;
 	OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(ite);
 	
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		if ((item->type == 0) || (item->type == 2))
-			createContextMenu(NULL, point.x(), point.y());
+			createContextMenu(nullptr, point.x(), point.y());
 		else if ((item->type == 1) || (item->type == 3) || (item->type == 4))
 		{
 			PageItem *currItem = item->PageItemObject;
-			if (currItem!=NULL)
+			if (currItem!=nullptr)
 			{
 				currentObject = ite;
 				createContextMenu(currItem, point.x(), point.y());
@@ -662,7 +662,7 @@
 		return;
 	disconnect(reportDisplay, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(slotDoRename(QTreeWidgetItem*, int)));
 	OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(ite);
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		if ((item->type == 1) || (item->type == 3) || (item->type == 4))
 		{
@@ -720,7 +720,7 @@
 	QTreeWidgetItem *retVal = 0;
 	if (currDoc->masterPageMode())
 	{
-		if (Nr == NULL)
+		if (Nr == nullptr)
 		{
 			QTreeWidgetItemIterator it( reportDisplay );
 			while ( (*it) )
@@ -751,7 +751,7 @@
 	}
 	else
 	{
-		if (Nr == NULL)
+		if (Nr == nullptr)
 		{
 			QTreeWidgetItemIterator it( reportDisplay );
 			while ( (*it) )
@@ -789,7 +789,7 @@
 {
 	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
-	if (currDoc==NULL)
+	if (currDoc==nullptr)
 		return;
 	if (currDoc->isLoading())
 		return;
@@ -961,7 +961,7 @@
 {
 	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
-	if (currDoc==NULL)
+	if (currDoc==nullptr)
 		return;
 	disconnect(reportDisplay, SIGNAL(itemSelectionChanged()), this, SLOT(slotMultiSelect()));
 	selectionTriggered = true;
@@ -980,7 +980,7 @@
 			OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(ite);
 			if (!item)
 				qFatal("OutlineWidget::slotMultiSelect !item");
-			PageItem *pgItem = NULL;
+			PageItem *pgItem = nullptr;
 			switch (item->type)
 			{
 				case 0:
@@ -1019,7 +1019,7 @@
 	OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(ite);
 	if (!item)
 		qFatal("OutlineWidget::slotSelect !item");
-	PageItem *pgItem = NULL;
+	PageItem *pgItem = nullptr;
 	switch (item->type)
 	{
 		case 0:
@@ -1078,7 +1078,7 @@
 	OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(ite);
 	if (!item)
 		qFatal("OutlinePalette::slotDoubleClick !item");
-	PageItem *pgItem = NULL;
+	PageItem *pgItem = nullptr;
 	switch (item->type)
 	{
 		case 1:
@@ -1104,7 +1104,7 @@
 {
 	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
-	if (currDoc==NULL)
+	if (currDoc==nullptr)
 		return;
 	if (selectionTriggered)
 		return;
@@ -1340,7 +1340,7 @@
 						{
 							OutlineTreeItem *object = new OutlineTreeItem( ObjLayer, 0 );
 							object->PageItemObject = pgItem;
-							object->PageObject = NULL;
+							object->PageObject = nullptr;
 							object->DocObject = currDoc;
 							object->type = 4;
 							object->setText(0, pgItem->itemName());
@@ -1351,13 +1351,13 @@
 						{
 							OutlineTreeItem *object = new OutlineTreeItem( ObjLayer, 0 );
 							object->PageItemObject = pgItem;
-							object->PageObject = NULL;
+							object->PageObject = nullptr;
 							object->DocObject = currDoc;
 							object->type = 4;
 							object->setText(0, pgItem->itemName());
 							object->setIcon( 0, groupIcon );
 							object->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
-							parseSubGroup(object, &pgItem->groupItemList, 4, NULL);
+							parseSubGroup(object, &pgItem->groupItemList, 4, nullptr);
 						}
 					}
 				}
@@ -1373,7 +1373,7 @@
 						{
 							OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
 							object->PageItemObject = pgItem;
-							object->PageObject = NULL;
+							object->PageObject = nullptr;
 							object->DocObject = currDoc;
 							object->type = 4;
 							object->setText(0, pgItem->itemName());
@@ -1384,13 +1384,13 @@
 						{
 							OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
 							object->PageItemObject = pgItem;
-							object->PageObject = NULL;
+							object->PageObject = nullptr;
 							object->DocObject = currDoc;
 							object->type = 4;
 							object->setText(0, pgItem->itemName());
 							object->setIcon( 0, groupIcon );
 							object->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
-							parseSubGroup(object, &pgItem->groupItemList, 4, NULL);
+							parseSubGroup(object, &pgItem->groupItemList, 4, nullptr);
 						}
 					}
 				}
@@ -1404,7 +1404,7 @@
 	setUpdatesEnabled(true);
 	filterTree();
 	if (currDoc->m_Selection->count() > 0)
-		slotShowSelect(0, NULL);
+		slotShowSelect(0, nullptr);
 	update();
 	connect(reportDisplay, SIGNAL(itemSelectionChanged()), this, SLOT(slotMultiSelect()));
 	connect(reportDisplay, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(slotDoRename(QTreeWidgetItem*, int)));
@@ -1412,12 +1412,12 @@
 
 void OutlinePalette::filterTree(const QString& keyword)
 {
-	OutlineTreeItem *item = NULL;
+	OutlineTreeItem *item = nullptr;
 	QTreeWidgetItemIterator it( reportDisplay );
 	while ( (*it) )
 	{
 		item = dynamic_cast<OutlineTreeItem*>(*it);
-		if (item != NULL)
+		if (item != nullptr)
 		{
 			if ((item->type == 1) || (item->type == 3) || (item->type == 4))
 			{
@@ -1499,11 +1499,11 @@
 
 void OutlinePalette::createContextMenu(PageItem * currItem, double /*mx*/, double /*my*/)
 {
-	if (m_MainWindow==NULL || currDoc==NULL)
-		return;
-	ContextMenu* cmen=NULL;
+	if (m_MainWindow==nullptr || currDoc==nullptr)
+		return;
+	ContextMenu* cmen=nullptr;
 //	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-	if(currItem!=NULL)
+	if(currItem!=nullptr)
 		cmen = new ContextMenu(*(currDoc->m_Selection), m_MainWindow, currDoc);
 	else
 		cmen = new ContextMenu(m_MainWindow, currDoc, currDoc->currentPage()->xOffset(), currDoc->currentPage()->yOffset());

Modified: trunk/Scribus/scribus/ui/pageitemattributes.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/pageitemattributes.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pageitemattributes.cpp	(original)
+++ trunk/Scribus/scribus/ui/pageitemattributes.cpp	Sat May  5 13:51:14 2018
@@ -62,14 +62,14 @@
 		case 0:
 			{
 				QComboBox* qcti=dynamic_cast<QComboBox*>(attributesTable->cellWidget(row,col));
-				if (qcti!=NULL)
+				if (qcti!=nullptr)
 					localAttributes[row].name=qcti->currentText();
 			}
 			break;
 		case 1:
 			{
 				QComboBox* qcti=dynamic_cast<QComboBox*>(attributesTable->cellWidget(row,col));
-				if (qcti != NULL)
+				if (qcti != nullptr)
 				{
 					int index = qcti->currentIndex();
 					if (index < typesData.count())
@@ -86,7 +86,7 @@
 		case 4:
 		{
 			QComboBox* qcti=dynamic_cast<QComboBox*>(attributesTable->cellWidget(row,col));
-			if (qcti!=NULL)
+			if (qcti!=nullptr)
 			{
 				int index=qcti->currentIndex();
 				if (index<relationshipsData.count())
@@ -102,7 +102,7 @@
 			/*
 			{
 				QComboTableItem* qcti=dynamic_cast<QComboTableItem*>(attributesTable->item(row,col));
-				if (qcti!=NULL)
+				if (qcti!=nullptr)
 				{
 					uint index=qcti->currentItem();
 					if (index<autoAddToData.count())
@@ -250,7 +250,7 @@
 		item7->setCurrentItem(index2);
 		*/
 		QTableWidgetItem *t=attributesTable->verticalHeaderItem(row);
- 		if (t != NULL)
+		if (t != nullptr)
 			t->setText(QString("%1").arg(row));
 	}
 	deleteButton->setEnabled(localAttributes.count()!=0);

Modified: trunk/Scribus/scribus/ui/pagepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/pagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette.cpp	Sat May  5 13:51:14 2018
@@ -157,7 +157,7 @@
 bool PagePalette::masterPageMode()
 {
 	PagePalette_MasterPages* mpWidget = dynamic_cast<PagePalette_MasterPages*>(this->currentWidget());
-	return (mpWidget != NULL);
+	return (mpWidget != nullptr);
 }
 
 void PagePalette::startMasterPageMode(QString masterPage)

Modified: trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp	Sat May  5 13:51:14 2018
@@ -339,7 +339,7 @@
 
 QString PagePropertiesDialog::masterPage()
 {
-	if (masterPageComboBox != NULL)
+	if (masterPageComboBox != nullptr)
 		return masterPageComboBox->currentText();
 	return "";
 }

Modified: trunk/Scribus/scribus/ui/picsearch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/picsearch.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picsearch.cpp	(original)
+++ trunk/Scribus/scribus/ui/picsearch.cpp	Sat May  5 13:51:14 2018
@@ -52,7 +52,7 @@
 
 void PicSearch::foundFilesBox_clicked(QListWidgetItem *c)
 {
-	if (c == NULL)
+	if (c == nullptr)
 		return;
 	currentImage = QDir::fromNativeSeparators(c->text());
 	if (previewCheckBox->isChecked())

Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp	(original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp	Sat May  5 13:51:14 2018
@@ -64,7 +64,7 @@
 	imageViewArea->setIconSize(QSize(128, 128));
 	imageViewArea->setContextMenuPolicy(Qt::CustomContextMenu);
 	m_Doc = docu;
-	currItem = NULL;
+	currItem = nullptr;
 	setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));
 	fillTable();
 	workTab->setCurrentIndex(0);
@@ -262,12 +262,12 @@
 void PicStatus::newImageSelected()
 {
 	QList<QListWidgetItem*> items = imageViewArea->selectedItems();
-	imageSelected((items.count() > 0) ? items.at(0) : NULL);
+	imageSelected((items.count() > 0) ? items.at(0) : nullptr);
 }
 
 void PicStatus::imageSelected(QListWidgetItem *ite)
 {
-	if (ite != NULL)
+	if (ite != nullptr)
 	{
 		PicItem *item = (PicItem*)ite;
 		currItem = item->PageItemObject;
@@ -373,20 +373,20 @@
 	}
 	else
 	{
-		currItem = NULL;
+		currItem = nullptr;
 		imageViewArea->clearSelection();
 	}
 }
 
 void PicStatus::PrintPic()
 {
-	if (currItem != NULL)
+	if (currItem != nullptr)
 		currItem->setPrintEnabled(isPrinting->isChecked());
 }
 
 void PicStatus::visiblePic()
 {
-	if (currItem != NULL)
+	if (currItem != nullptr)
 	{
 		currItem->setImageVisible(isVisibleCheck->isChecked());
 		emit refreshItem(currItem);
@@ -395,7 +395,7 @@
 
 void PicStatus::GotoPic()
 {
-	if (currItem == NULL)
+	if (currItem == nullptr)
 		return;
 
 	if (currItem->OnMasterPage.isEmpty() && m_Doc->masterPageMode())
@@ -410,7 +410,7 @@
 
 void PicStatus::SelectPic()
 {
-	if (currItem == NULL)
+	if (currItem == nullptr)
 		return;
 
 	if (currItem->OnMasterPage.isEmpty() && m_Doc->masterPageMode())
@@ -438,7 +438,7 @@
 void PicStatus::SearchPic()
 {
 	// no action where is no item selected. It should never happen.
-	if (currItem == NULL)
+	if (currItem == nullptr)
 		return;
 	static QString lastSearchPath;
 
@@ -475,7 +475,7 @@
 
 void PicStatus::doImageEffects()
 {
-	if (currItem == NULL)
+	if (currItem == nullptr)
 		return;
 
 	EffectsDialog* dia = new EffectsDialog(this, currItem, m_Doc);
@@ -491,7 +491,7 @@
 
 void PicStatus::doImageExtProp()
 {
-	if (currItem != NULL)
+	if (currItem != nullptr)
 	{
 		ExtImageProps dia(this, &currItem->pixm.imgInfo, currItem, m_Doc->view());
 		dia.exec();
@@ -503,7 +503,7 @@
 
 void PicStatus::doEditImage()
 {
-	if (currItem != NULL)
+	if (currItem != nullptr)
 	{
 		SelectPic();
 		ScCore->primaryMainWindow()->callImageEditor();

Modified: trunk/Scribus/scribus/ui/preferencesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/preferencesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.cpp	Sat May  5 13:51:14 2018
@@ -300,7 +300,7 @@
 void PreferencesDialog::newItemSelected()
 {
 	QList<QListWidgetItem*> items = preferencesTypeList->selectedItems();
-	itemSelected((items.count() > 0) ? items.at(0) : NULL);
+	itemSelected((items.count() > 0) ? items.at(0) : nullptr);
 }
 
 void PreferencesDialog::itemSelected(QListWidgetItem* ic)
@@ -324,7 +324,7 @@
 
 void PreferencesDialog::setNewItemSelected(const QString &s)
 {
-	if (s=="Prefs_PageSizes" && prefs_PageSizes!=NULL)
+	if (s=="Prefs_PageSizes" && prefs_PageSizes!=nullptr)
 	{
 		int i=prefsStackWidget->indexOf(prefs_PageSizes);
 		if (i!=-1)

Modified: trunk/Scribus/scribus/ui/prefs_display.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/prefs_display.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_display.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_display.cpp	Sat May  5 13:51:14 2018
@@ -27,7 +27,7 @@
 
 	connect(pageFillColorButton, SIGNAL(clicked()), this, SLOT(changePaperColor()));
 
-	if (m_doc == NULL && !ScCore->primaryMainWindow()->HaveDoc)
+	if (m_doc == nullptr && !ScCore->primaryMainWindow()->HaveDoc)
 	{
 		connect(scratchSpaceColorButton, SIGNAL(clicked()), this, SLOT(changeScratchColor()));
 		connect(frameSelectedColorButton, SIGNAL(clicked()), this, SLOT(changeFrameColor()));

Modified: trunk/Scribus/scribus/ui/prefs_documentitemattributes.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/prefs_documentitemattributes.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentitemattributes.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_documentitemattributes.cpp	Sat May  5 13:51:14 2018
@@ -61,7 +61,7 @@
 	case 1:
 		{
 			QComboBox* qcti=dynamic_cast<QComboBox*>(attributesTable->cellWidget(row,col));
-			if (qcti!=NULL)
+			if (qcti!=nullptr)
 			{
 				int index=qcti->currentIndex();
 				if (index<typesData.count())
@@ -78,7 +78,7 @@
 	case 4:
 		{
 			QComboBox* qcti=dynamic_cast<QComboBox*>(attributesTable->cellWidget(row,col));
-			if (qcti!=NULL)
+			if (qcti!=nullptr)
 			{
 				int index=qcti->currentIndex();
 				if (index<relationshipsData.count())
@@ -92,7 +92,7 @@
 	case 6:
 		{
 			QComboBox* qcti=dynamic_cast<QComboBox*>(attributesTable->cellWidget(row,col));
-			if (qcti!=NULL)
+			if (qcti!=nullptr)
 			{
 				int index=qcti->currentIndex();
 				if (index<autoAddToData.count())
@@ -176,7 +176,7 @@
 		item7->setCurrentIndex(index2);
 
 		QTableWidgetItem *t=attributesTable->verticalHeaderItem(row);
-		if (t!=NULL)
+		if (t!=nullptr)
 			t->setText(QString("%1").arg(row));
 	}
 	deleteButton->setEnabled(localAttributes.count()!=0);

Modified: trunk/Scribus/scribus/ui/prefs_documentsections.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/prefs_documentsections.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsections.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_documentsections.cpp	Sat May  5 13:51:14 2018
@@ -100,7 +100,7 @@
 		sectionsTable->setItem(row, i++, item8);
 		//
 		QTableWidgetItem *t=sectionsTable->verticalHeaderItem(row);
-		if (t!=NULL)
+		if (t!=nullptr)
 			t->setText(QString("%1").arg(row));
 		row++;
 	}
@@ -148,7 +148,7 @@
 	case 5:
 		{
 			QComboBox* qcti=dynamic_cast<QComboBox*>(sectionsTable->cellWidget(row,col));
-			if (qcti!=NULL)
+			if (qcti!=nullptr)
 			{
 				int index=qcti->currentIndex();
 				if (index<m_styles.count()-1)

Modified: trunk/Scribus/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.cpp	Sat May  5 13:51:14 2018
@@ -19,7 +19,7 @@
 
 Prefs_ItemTools::Prefs_ItemTools(QWidget* parent, ScribusDoc* doc)
 	: Prefs_Pane(parent),
-	m_doc(NULL),
+	m_doc(nullptr),
 	showFontPreview(false)
 {
 	setupUi(this);
@@ -78,7 +78,7 @@
 	unitChange(docUnitIndex);
 
 	PrefsManager* prefsManager=PrefsManager::instance();
-	ColorList* colorList = (m_doc != NULL) ? (&m_doc->PageColors) : prefsManager->colorSetPtr();
+	ColorList* colorList = (m_doc != nullptr) ? (&m_doc->PageColors) : prefsManager->colorSetPtr();
 
 	//Text Tool
 	for (int i=0; i<textFontComboBox->count(); ++i)

Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp	Sat May  5 13:51:14 2018
@@ -1262,7 +1262,7 @@
 
 void Prefs_PDFExport::SelEFont(QListWidgetItem *c)
 {
-	if (c != NULL)
+	if (c != nullptr)
 	{
 		if (c->flags() & Qt::ItemIsSelectable)
 			toSubsetButton->setEnabled(true);

Modified: trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp	Sat May  5 13:51:14 2018
@@ -104,7 +104,7 @@
 {
 	itemDestFrameComboBox->clear();
 	itemDestFrameComboBox->addItem(CommonStrings::tr_None);
-	if (m_Doc!=NULL)
+	if (m_Doc!=nullptr)
 	{
 		QList<PageItem*> allItems;
 		for (int a = 0; a < m_Doc->DocItems.count(); ++a)
@@ -172,7 +172,7 @@
 		setCurrentComboItem(itemNumberPlacementComboBox, trStrPNEnd);
 
 	itemListNonPrintingCheckBox->setChecked(localToCSetupVector[numSelected].listNonPrintingFrames);
-	if (m_Doc!=NULL)
+	if (m_Doc!=nullptr)
 	{
 		if (localToCSetupVector[numSelected].frameName==CommonStrings::None)
 			setCurrentComboItem(itemDestFrameComboBox, CommonStrings::tr_None);
@@ -245,7 +245,7 @@
 	paragraphStyleList.clear();
 	paragraphStyleList.append(CommonStrings::tr_None);
 
-	if(m_Doc!=NULL) // && m_Doc->docParagraphStyles.count()>5)
+	if(m_Doc!=nullptr) // && m_Doc->docParagraphStyles.count()>5)
 	{
 		for (int i = 0; i < m_Doc->paragraphStyles().count(); ++i)
 			paragraphStyleList.append(m_Doc->paragraphStyles()[i].name());
@@ -262,7 +262,7 @@
 	tocDeleteButton->setEnabled(enabled);
 	itemAttrComboBox->setEnabled(enabled);
 	itemNumberPlacementComboBox->setEnabled(enabled);
-	bool haveDoc=enabled && m_Doc!=NULL;
+	bool haveDoc=enabled && m_Doc!=nullptr;
 	itemDestFrameComboBox->setEnabled(haveDoc);
 	itemParagraphStyleComboBox->setEnabled(haveDoc);
 }

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp	Sat May  5 13:51:14 2018
@@ -216,12 +216,12 @@
 	}
 
 	m_doc = d;
-	m_item = NULL;
+	m_item = nullptr;
 	setEnabled(!m_doc->drawAsPreview);
 	Cpal->setDocument(m_doc);
-	Cpal->setCurrentItem(NULL);
+	Cpal->setCurrentItem(nullptr);
 	Tpal->setDocument(m_doc);
-	Tpal->setCurrentItem(NULL);
+	Tpal->setCurrentItem(nullptr);
 
 	m_unitRatio = m_doc->unitRatio();
 	m_unitIndex = m_doc->unitIndex();
@@ -255,8 +255,8 @@
 	setEnabled(true);
 	m_haveDoc = false;
 	m_haveItem = false;
-	m_doc=NULL;
-	m_item = NULL;
+	m_doc=nullptr;
+	m_item = nullptr;
 
 	imagePal->unsetItem();
 	xyzPal->unsetDoc();
@@ -273,10 +273,10 @@
 	tablePal->unsetItem();
 	tablePal->unsetDocument();
 
-	Cpal->setCurrentItem(NULL);
-	Cpal->setDocument(NULL);
-	Tpal->setCurrentItem(NULL);
-	Tpal->setDocument(NULL);
+	Cpal->setCurrentItem(nullptr);
+	Cpal->setDocument(nullptr);
+	Tpal->setCurrentItem(nullptr);
+	Tpal->setDocument(nullptr);
 
 	m_haveItem = false;
 	for (int ws = 1; ws < 10; ++ws)
@@ -288,9 +288,9 @@
 void PropertiesPalette::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
-	Cpal->setCurrentItem(NULL);
-	Tpal->setCurrentItem(NULL);
+	m_item     = nullptr;
+	Cpal->setCurrentItem(nullptr);
+	Tpal->setCurrentItem(nullptr);
 	imagePal->unsetItem();
 	tablePal->unsetItem();
 	shapePal->unsetItem();
@@ -311,7 +311,7 @@
 
 PageItem* PropertiesPalette::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -359,7 +359,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.cpp	Sat May  5 13:51:14 2018
@@ -115,7 +115,7 @@
 
 PageItem* PropertiesPalette_Group::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -158,12 +158,12 @@
 	disconnect(this->transPalWidget, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), 0, 0);
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 
 	transPalWidget->setDocument(m_doc);
-	transPalWidget->setCurrentItem(NULL);
+	transPalWidget->setCurrentItem(nullptr);
 
 	m_haveDoc  = true;
 	m_haveItem = false;
@@ -188,11 +188,11 @@
 
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc   = NULL;
-	m_item  = NULL;
-
-	transPalWidget->setDocument(NULL);
-	transPalWidget->setCurrentItem(NULL);
+	m_doc   = nullptr;
+	m_item  = nullptr;
+
+	transPalWidget->setDocument(nullptr);
+	transPalWidget->setCurrentItem(nullptr);
 
 	setEnabled(false);
 }
@@ -200,8 +200,8 @@
 void PropertiesPalette_Group::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
-	transPalWidget->setCurrentItem(NULL);
+	m_item     = nullptr;
+	transPalWidget->setCurrentItem(nullptr);
 	handleSelectionChanged();
 }
 
@@ -276,7 +276,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp	Sat May  5 13:51:14 2018
@@ -154,7 +154,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 	int precision = unitGetPrecisionFromIndex(m_unitIndex);
@@ -188,8 +188,8 @@
 
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc   = NULL;
-	m_item  = NULL;
+	m_doc   = nullptr;
+	m_item  = nullptr;
 
 	setEnabled(false);
 }
@@ -197,13 +197,13 @@
 void PropertiesPalette_Image::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	handleSelectionChanged();
 }
 
 PageItem* PropertiesPalette_Image::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -396,7 +396,7 @@
 		case PageItem::ImageFrame:
 		case PageItem::LatexFrame:
 		case PageItem::OSGFrame:
-			setEnabled(currItem->asOSGFrame() == NULL);
+			setEnabled(currItem->asOSGFrame() == nullptr);
 			break;
 		case PageItem::TextFrame:
 			setEnabled(false);
@@ -443,7 +443,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp	Sat May  5 13:51:14 2018
@@ -108,7 +108,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 	int precision = unitGetPrecisionFromIndex(m_unitIndex);
@@ -154,15 +154,15 @@
 	}
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc   = NULL;
-	m_item  = NULL;
+	m_doc   = nullptr;
+	m_item  = nullptr;
 	setEnabled(false);
 }
 
 void PropertiesPalette_Shadow::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	handleSelectionChanged();
 }
 
@@ -174,7 +174,7 @@
 
 PageItem* PropertiesPalette_Shadow::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 	if (m_doc)
 	{
 		if (m_doc->m_Selection->count() > 1)

Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp	Sat May  5 13:51:14 2018
@@ -42,8 +42,8 @@
 	  m_haveItem(false),
 	  m_unitRatio(1.0),
 	  m_unitIndex(SC_PT),
-	  m_item(NULL),
-	  m_doc(NULL)
+	  m_item(nullptr),
+	  m_doc(nullptr)
 {
 	m_tmpSelection = new Selection(this, false);
 	m_tmpSelection->clear();
@@ -100,7 +100,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 
@@ -123,8 +123,8 @@
 
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc   = NULL;
-	m_item  = NULL;
+	m_doc   = nullptr;
+	m_item  = nullptr;
 
 	editShape->setEnabled(false);
 	roundRect->setEnabled(false);
@@ -135,13 +135,13 @@
 void PropertiesPalette_Shape::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	handleSelectionChanged();
 }
 
 PageItem* PropertiesPalette_Shape::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc && m_doc->m_Selection->count()>0)
 		currentItem = m_doc->m_Selection->itemAt(0);
@@ -325,7 +325,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Sat May  5 13:51:14 2018
@@ -158,7 +158,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
@@ -198,8 +198,8 @@
 
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc      = NULL;
-	m_item     = NULL;
+	m_doc      = nullptr;
+	m_item     = nullptr;
 
 	paraStyleCombo->setDoc(0);
 	charStyleCombo->setDoc(0);
@@ -209,7 +209,7 @@
 	colorWidgets->setDoc(0);
 	distanceWidgets->setDoc(0);
 	flopBox->setDoc(0);
-	hyphenationWidget->setDoc(NULL);
+	hyphenationWidget->setDoc(nullptr);
 	optMargins->setDoc(0);
 	orphanBox->setDoc(0);
 	parEffectWidgets->setDoc(0);
@@ -223,14 +223,14 @@
 void PropertiesPalette_Text::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	colorWidgets->setCurrentItem(m_item);
 	handleSelectionChanged();
 }
 
 PageItem* PropertiesPalette_Text::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -318,7 +318,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 
@@ -427,7 +427,7 @@
 		return;
 	bool tmp = m_haveItem;
 	m_haveItem = false;
-	if (m_item != NULL)
+	if (m_item != nullptr)
 		fonts->RebuildList(m_doc, m_item->isAnnotation());
 	fonts->setCurrentFont(newFont);
 	m_haveItem = tmp;

Modified: trunk/Scribus/scribus/ui/propertiespalette_utils.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_utils.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_utils.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_utils.cpp	Sat May  5 13:51:14 2018
@@ -40,7 +40,7 @@
 //using namespace std;
 
 
-LineFormatValue::LineFormatValue() : m_Line(), m_doc(NULL), m_name() {};
+LineFormatValue::LineFormatValue() : m_Line(), m_doc(nullptr), m_name() {};
 
 LineFormatValue::LineFormatValue( const multiLine& line, ScribusDoc* doc, const QString name ) : m_Line(line), m_doc(doc), m_name(name) {};
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	Sat May  5 13:51:14 2018
@@ -200,13 +200,13 @@
 
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc   = NULL;
-	m_item  = NULL;
+	m_doc   = nullptr;
+	m_item  = nullptr;
 	nameEdit->clear();
-	xposSpin->setConstants(NULL);
-	yposSpin->setConstants(NULL);
-	widthSpin->setConstants(NULL);
-	heightSpin->setConstants(NULL);
+	xposSpin->setConstants(nullptr);
+	yposSpin->setConstants(nullptr);
+	widthSpin->setConstants(nullptr);
+	heightSpin->setConstants(nullptr);
 	doGroup->setEnabled(false);
 	doUnGroup->setEnabled(false);
 	flipH->setEnabled(false);
@@ -226,7 +226,7 @@
 void PropertiesPalette_XYZ::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	handleSelectionChanged();
 }
 
@@ -256,7 +256,7 @@
 
 PageItem* PropertiesPalette_XYZ::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -280,7 +280,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_advanced.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_advanced.cpp	Sat May  5 13:51:14 2018
@@ -17,8 +17,8 @@
 
 PropertyWidget_Advanced::PropertyWidget_Advanced(QWidget* parent) : QFrame(parent)
 {
-	m_item = NULL;
-	m_ScMW = NULL;
+	m_item = nullptr;
+	m_ScMW = nullptr;
 	m_unitIndex = 0;
 	m_unitRatio = 1.0;
 
@@ -65,7 +65,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{
@@ -93,7 +93,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 
@@ -204,7 +204,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -219,7 +219,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -236,7 +236,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -253,7 +253,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -270,7 +270,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -287,7 +287,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -302,7 +302,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -317,7 +317,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);

Modified: trunk/Scribus/scribus/ui/propertywidget_distance.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_distance.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_distance.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_distance.cpp	Sat May  5 13:51:14 2018
@@ -77,7 +77,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{
@@ -106,7 +106,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 
@@ -194,7 +194,7 @@
 		if (m_doc->appMode == modeEditTable)
 			textItem = m_item->asTable()->activeCell().textFrame();
 
-		enabled  = (textItem != NULL);
+		enabled  = (textItem != nullptr);
 		enabled &= (m_doc->m_Selection->count() == 1);
 
 		if (textItem)
@@ -345,7 +345,7 @@
 	PageItem *textItem = m_item;
 	if (m_doc->appMode == modeEditTable)
 		textItem = m_item->asTable()->activeCell().textFrame();
-	if (textItem != NULL)
+	if (textItem != nullptr)
 		showColumns(textItem->Cols, textItem->ColGap);
 
 	int index = columnGapLabel->currentIndex();
@@ -359,7 +359,7 @@
 	PageItem *textItem = m_item;
 	if (m_doc->appMode == modeEditTable)
 		textItem = m_item->asTable()->activeCell().textFrame();
-	if (textItem != NULL)
+	if (textItem != nullptr)
 	{
 		textItem->setVerticalAlignment(verticalAlign->currentIndex());
 		textItem->update();

Modified: trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp	Sat May  5 13:51:14 2018
@@ -199,7 +199,7 @@
 	PageItem *item = m_item;
 	if (m_doc->appMode == modeEditTable)
 		item = item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(item, true);
@@ -218,7 +218,7 @@
 	PageItem *item = m_doc->m_Selection->itemAt(0);
 	if (m_doc->appMode == modeEditTable)
 		item = item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(item, true);
@@ -236,7 +236,7 @@
 	PageItem *item = m_item;
 	if (m_doc->appMode == modeEditTable)
 		item = item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(item, true);
@@ -256,7 +256,7 @@
 	PageItem *item = m_item;
 	if (m_doc->appMode == modeEditTable)
 		item = item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(item, true);

Modified: trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp	Sat May  5 13:51:14 2018
@@ -16,8 +16,8 @@
 
 PropertyWidget_FontFeatures::PropertyWidget_FontFeatures(QWidget* parent) : QFrame(parent)
 {
-	m_item = NULL;
-	m_ScMW = NULL;
+	m_item = nullptr;
+	m_ScMW = nullptr;
 	setupUi(this);
 
 	setFrameStyle(QFrame::Box | QFrame::Plain);
@@ -257,7 +257,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{

Modified: trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp	Sat May  5 13:51:14 2018
@@ -19,8 +19,8 @@
 PropertyWidget_Hyphenation::PropertyWidget_Hyphenation(QWidget* parent)
 	: QFrame(parent)
 {
-	m_item = NULL;
-	m_ScMW = NULL;
+	m_item = nullptr;
+	m_ScMW = nullptr;
 
 	setupUi(this);
 
@@ -98,7 +98,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{

Modified: trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	Sat May  5 13:51:14 2018
@@ -49,7 +49,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{
@@ -68,7 +68,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 
@@ -121,7 +121,7 @@
 		if (m_doc->appMode == modeEditTable)
 			textItem = m_item->asTable()->activeCell().textFrame();
 
-		enabled  = (m_item->isPathText() || (textItem != NULL));
+		enabled  = (m_item->isPathText() || (textItem != nullptr));
 		enabled &= (m_doc->m_Selection->count() == 1);
 	}
 	setEnabled(enabled);
@@ -180,7 +180,7 @@
 	PageItem *item = m_item;
 	if (m_doc->appMode == modeEditTable)
 		item = m_item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(item, true);
@@ -195,7 +195,7 @@
 	PageItem *item = m_item;
 	if (m_doc->appMode == modeEditTable)
 		item = m_item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(item, true);

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	Sat May  5 13:51:14 2018
@@ -21,7 +21,7 @@
 #include "units.h"
 #include "util.h"
 
-PropertyWidget_ParEffect::PropertyWidget_ParEffect(QWidget *parent) : QFrame(parent), m_enhanced(NULL), m_item(NULL), m_ScMW(NULL)
+PropertyWidget_ParEffect::PropertyWidget_ParEffect(QWidget *parent) : QFrame(parent), m_enhanced(nullptr), m_item(nullptr), m_ScMW(nullptr)
 {
 	setupUi(this);
 	setFrameStyle(QFrame::Box | QFrame::Plain);
@@ -585,7 +585,7 @@
 {
 	if (m_doc->appMode == modeEditTable)
 		item = item->asTable()->activeCell().textFrame();
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
@@ -633,7 +633,7 @@
 	disconnect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
 	m_enhanced->close();
 	delete m_enhanced;
-	m_enhanced = NULL;
+	m_enhanced = nullptr;
 }
 
 void PropertyWidget_ParEffect::on_bulletCharTableButton_toggled(bool checked)

Modified: trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	Sat May  5 13:51:14 2018
@@ -56,7 +56,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{
@@ -85,7 +85,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp	Sat May  5 13:51:14 2018
@@ -15,8 +15,8 @@
 
 PropertyWidget_TextColor::PropertyWidget_TextColor(QWidget* parent) : QFrame(parent)
 {
-	m_item = NULL;
-	m_ScMW = NULL;
+	m_item = nullptr;
+	m_ScMW = nullptr;
 
 	setupUi(this);
 
@@ -71,7 +71,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 
 	if (m_doc.isNull())
 	{
@@ -92,7 +92,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 
@@ -104,7 +104,7 @@
 
 	configureWidgets();
 
-	if (m_item == NULL)
+	if (m_item == nullptr)
 		return;
 	if (!m_item->isTable() && !m_item->isTextFrame() && !m_item->asPathText())
 		return;
@@ -329,7 +329,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);
@@ -347,7 +347,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);
@@ -365,7 +365,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);
@@ -381,7 +381,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -396,7 +396,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -411,7 +411,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -429,7 +429,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);
@@ -442,7 +442,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);
@@ -455,7 +455,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);
@@ -471,7 +471,7 @@
 	PageItem *i2 = m_item;
 	if (m_doc->appMode == modeEditTable)
 		i2 = m_item->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -497,7 +497,7 @@
 		PageItem *i2 = m_item;
 		if (m_doc->appMode == modeEditTable)
 			i2 = m_item->asTable()->activeCell().textFrame();
-		if (i2 != NULL)
+		if (i2 != nullptr)
 		{
 			Selection tempSelection(this, false);
 			tempSelection.addItem(i2, true);

Modified: trunk/Scribus/scribus/ui/propertywidgetbase.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/propertywidgetbase.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidgetbase.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidgetbase.cpp	Sat May  5 13:51:14 2018
@@ -17,7 +17,7 @@
 
 PageItem* PropertyWidgetBase::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -39,4 +39,4 @@
 	}
 
 	return currentItem;
-}
+}

Modified: trunk/Scribus/scribus/ui/scmessagebox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/scmessagebox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scmessagebox.cpp	(original)
+++ trunk/Scribus/scribus/ui/scmessagebox.cpp	Sat May  5 13:51:14 2018
@@ -33,7 +33,7 @@
 void ScMessageBox::initScMessageBox(void)
 {
 	messageTitle = "";
-	defaultBatchPushButton = NULL;
+	defaultBatchPushButton = nullptr;
 	defaultBatchStandardButton = QMessageBox::NoButton;
 }
 

Modified: trunk/Scribus/scribus/ui/scrspinbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/scrspinbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrspinbox.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrspinbox.cpp	Sat May  5 13:51:14 2018
@@ -22,12 +22,12 @@
 #include "units.h"
 #include "third_party/fparser/fparser.hh"
 
-ScrSpinBox::ScrSpinBox(QWidget *parent, int unitIndex) : QDoubleSpinBox(parent), m_constants(NULL)
+ScrSpinBox::ScrSpinBox(QWidget *parent, int unitIndex) : QDoubleSpinBox(parent), m_constants(nullptr)
 {
 	init(unitIndex);
 }
 
-ScrSpinBox::ScrSpinBox(double minValue, double maxValue, QWidget *pa, int unitIndex) : QDoubleSpinBox(pa), m_constants(NULL)
+ScrSpinBox::ScrSpinBox(double minValue, double maxValue, QWidget *pa, int unitIndex) : QDoubleSpinBox(pa), m_constants(nullptr)
 {
 	init(unitIndex);
 	setMinimum(minValue);
@@ -257,7 +257,7 @@
 
 	int ret = fp.Parse(str, "", true);
 	if(ret < 0)
-		erg = fp.Eval(NULL);
+		erg = fp.Eval(nullptr);
 
 	//qDebug() << "fp value =" << erg ;
 	return erg;

Modified: trunk/Scribus/scribus/ui/sctreewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/sctreewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctreewidget.cpp	Sat May  5 13:51:14 2018
@@ -113,7 +113,7 @@
 	if (e->type() == QEvent::Shortcut)
 	{
 		QShortcutEvent *se = static_cast<QShortcutEvent *>(e);
-		if (se != NULL)
+		if (se != nullptr)
 		{
 			int k = se->shortcutId();
 			QTreeWidgetItem *item1 = keySList.value(k);
@@ -160,10 +160,10 @@
 QWidget* ScTreeWidget::widget(int index)
 {
 	if ((index < 0) || (index >= topLevelItemCount()))
-		return NULL;
+		return nullptr;
 	QTreeWidgetItem *top = topLevelItem(index);
 	if (top->childCount() == 0)
-		return NULL;
+		return nullptr;
 	QTreeWidgetItem *child = top->child(0);
 	return itemWidget(child, 0);
 }
@@ -177,7 +177,7 @@
 	else
 		topLevelItem(index)->setFlags(0);
 	QTreeWidgetItem *child = topLevelItem(index)->child(0);
-	if (child != NULL)
+	if (child != nullptr)
 		itemWidget(child, 0)->setEnabled(enable);
 }
 

Modified: trunk/Scribus/scribus/ui/search.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/search.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/search.cpp	(original)
+++ trunk/Scribus/scribus/ui/search.cpp	Sat May  5 13:51:14 2018
@@ -544,7 +544,7 @@
 			m_notFound = false;
 		}
 	}
-	else if (m_doc->scMW()->CurrStED != NULL)
+	else if (m_doc->scMW()->CurrStED != nullptr)
 	{
 		found = false;
 		SEditor* storyTextEdit = m_doc->scMW()->CurrStED->Editor;
@@ -780,7 +780,7 @@
 		}
 		m_item->itemText.deselectAll();
 	}
-	else if (m_doc->scMW()->CurrStED != NULL)
+	else if (m_doc->scMW()->CurrStED != nullptr)
 	{
 		StoryEditor* se = m_doc->scMW()->CurrStED;
 		if (RText->isChecked())
@@ -1059,7 +1059,7 @@
 	replaceEnabled |= RText->isChecked();
 	if (m_itemMode)
 		replaceEnabled &= (m_item->itemText.lengthOfSelection() > 0);
-	else if (m_doc->scMW()->CurrStED != NULL)
+	else if (m_doc->scMW()->CurrStED != nullptr)
 		replaceEnabled &= m_doc->scMW()->CurrStED->Editor->textCursor().hasSelection();
 	else
 		replaceEnabled = false;

Modified: trunk/Scribus/scribus/ui/selfield.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/selfield.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/selfield.cpp	(original)
+++ trunk/Scribus/scribus/ui/selfield.cpp	Sat May  5 13:51:14 2018
@@ -69,10 +69,10 @@
 	Layout1->addWidget( AvailFields );
 	Layout5->addLayout( Layout1 );
 
-	Layout2 = Layout3 = NULL;
-	SelFields = NULL;
-	ToSel = FromSel = NULL;
-	Text2 = NULL;
+	Layout2 = Layout3 = nullptr;
+	SelFields = nullptr;
+	ToSel = FromSel = nullptr;
+	Text2 = nullptr;
 	if (Art > 1)
 	{
 		Layout2 = new QVBoxLayout;
@@ -174,7 +174,7 @@
 
 void SelectFields::SelAField(QListWidgetItem *c)
 {
-	if ((c != NULL) && (FTyp > 1))
+	if ((c != nullptr) && (FTyp > 1))
 	{
 		FromSel->setEnabled(false);
 		ToSel->setEnabled(true);
@@ -184,7 +184,7 @@
 
 void SelectFields::SelEField(QListWidgetItem *c)
 {
-	if (c != NULL)
+	if (c != nullptr)
 	{
 		FromSel->setEnabled(true);
 		ToSel->setEnabled(false);

Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp	Sat May  5 13:51:14 2018
@@ -83,7 +83,7 @@
 	connect(optMarginDefaultButton, SIGNAL(clicked()), this, SLOT(slotDefaultOpticalMargins()));
 	if (m_Doc)
 		connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
-	m_enhanced = NULL;
+	m_enhanced = nullptr;
 }
 
 void SMPStyleWidget::slotLineSpacingModeChanged(int i)
@@ -233,7 +233,7 @@
 	double unitRatio = unitGetRatioFromIndex(unitIndex);
 	parentCombo->setEnabled(!pstyle->isDefaultStyle());
 	const ParagraphStyle *parent = dynamic_cast<const ParagraphStyle*>(pstyle->parentStyle());
-	m_hasParent = pstyle->hasParent() && parent != NULL && parent->hasName() && pstyle->parent() != "";
+	m_hasParent = pstyle->hasParent() && parent != nullptr && parent->hasName() && pstyle->parent() != "";
 
 	lineSpacingMode->clear();
 	lineSpacingMode->addItem( tr("Fixed Linespacing"));
@@ -1032,7 +1032,7 @@
 {
 	ParagraphStyle::OpticalMarginType om( static_cast<ParagraphStyle::OpticalMarginType>(o) );
 
-	if (parent==NULL)
+	if (parent==nullptr)
 	{
 		if(om == ParagraphStyle::OM_Default)
 			optMarginRadioBoth->setChecked(true);
@@ -1230,7 +1230,7 @@
 	disconnect(m_enhanced, SIGNAL(paletteShown(bool)), bulletCharTableButton, SLOT(setChecked(bool)));
 	m_enhanced->close();
 	delete m_enhanced;
-	m_enhanced = NULL;
+	m_enhanced = nullptr;
 }
 
 void SMPStyleWidget::connectPESignals()

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp	Sat May  5 13:51:14 2018
@@ -1954,7 +1954,7 @@
 	Q_ASSERT(!parent.isNull());
 
 	bool  loop = false, parentLoop = false;
-	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_tmpStyles.resolve(parent) : NULL;
+	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_tmpStyles.resolve(parent) : nullptr;
 	QStringList sel;
 
 	for (int i = 0; i < m_selection.count(); ++i)
@@ -1969,7 +1969,7 @@
 				loop = parentLoop = true;
 				break;
 			}
-			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : NULL;
+			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : nullptr;
 		}
 		if (!loop)
 		{
@@ -3039,7 +3039,7 @@
 	Q_ASSERT(!parent.isNull());
 
 	bool  loop = false, parentLoop = false;
-	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_tmpStyles.resolve(parent) : NULL;
+	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_tmpStyles.resolve(parent) : nullptr;
 	QStringList  sel;
 
 	for (int i = 0; i < m_selection.count(); ++i)
@@ -3054,7 +3054,7 @@
 				loop = parentLoop = true;
 				break;
 			}
-			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : NULL;
+			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : nullptr;
 		}
 		if (!loop)
 		{

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Sat May  5 13:51:14 2018
@@ -125,7 +125,7 @@
 	noUpdt = true;
 	inRep = false;
 	pmen = new QMenu(this);
-	paraStyleAct = NULL;
+	paraStyleAct = nullptr;
 	setMinimumWidth(fontMetrics().width( tr("No Style") )+30);
 }
 
@@ -174,7 +174,7 @@
 	QLabel::paintEvent(e);
 	QPair<int, int> paraInfo;
 	QList< QPair<int,int> > paraList;
-	if (editor != NULL)
+	if (editor != nullptr)
 	{
 		QRect  edRect = editor->viewport()->rect();
 		QPoint pt1 = edRect.topLeft(), pt2 = edRect.bottomRight();
@@ -202,7 +202,7 @@
 	}
 	QPainter p;
 	p.begin(this);
-	if ((editor != NULL) && (noUpdt))
+	if ((editor != nullptr) && (noUpdt))
 	{
 		QString trNoStyle = tr("No Style");
 		for (int pa = 0; pa < paraList.count(); ++pa)
@@ -1524,10 +1524,10 @@
 // {
 // 	prefsManager=PrefsManager::instance();
 // 	m_doc = docc;
-// 	seMenuMgr=NULL;
+// 	seMenuMgr=nullptr;
 // 	buildGUI();
 // 	currItem = ite;
-// // 	charSelect = NULL;
+// // 	charSelect = nullptr;
 // 	m_firstSet = false;
 // 	activFromApp = true;
 // 	Editor->loadItemText(ite);
@@ -1550,14 +1550,14 @@
 /* Main Story Editor Class, no current document */
 StoryEditor::StoryEditor(QWidget* parent) : QMainWindow(parent, Qt::Window), // WType_Dialog) //WShowModal |
 	activFromApp(true),
-	m_doc(NULL),
-	m_item(NULL),
+	m_doc(nullptr),
+	m_item(nullptr),
 	m_textChanged(false),
 	m_firstSet(false),
 	m_blockUpdate(false),
 //	m_currPara(0),
 //	m_currChar(0),
-	charSelect(NULL),
+	charSelect(nullptr),
 	charSelectUsed(false)
 {
 	m_spellActive=false;
@@ -1607,7 +1607,7 @@
 		disconnect(charSelect, SIGNAL(insertUserSpecialChar(QChar, QString)),
 					this, SLOT(slot_insertUserSpecialChar(QChar, QString)));
 		delete charSelect;
-		charSelect = NULL;
+		charSelect = nullptr;
 	}
 	savePrefs();
 }
@@ -1980,7 +1980,7 @@
 	setCentralWidget( EdSplit );
 	//Final setup
 	resize( QSize(660, 500).expandedTo(minimumSizeHint()) );
-	if (prefsManager==NULL)
+	if (prefsManager==nullptr)
 		sDebug(QString("%1").arg("prefsmgr null"));
 
 	EditorBar->editor = Editor;
@@ -2125,7 +2125,7 @@
 	Editor->setCurrentDocument(m_doc);
 	StyleTools->SetStyle(0);
 	m_item = item;
-	if (m_item != NULL)
+	if (m_item != nullptr)
 	{
 		setWindowTitle( tr("Story Editor - %1").arg(m_item->itemName()));
 		m_firstSet = false;
@@ -2210,9 +2210,9 @@
 	}
 	else
 		m_result = QDialog::Rejected;
-	setCurrentDocumentAndItem(NULL, NULL);
+	setCurrentDocumentAndItem(nullptr, nullptr);
 	savePrefs();
-// 	if (charSelect != NULL)
+// 	if (charSelect != nullptr)
 // 		charSelect->close();
 	hide();
 	m_blockUpdate = false;
@@ -2235,7 +2235,7 @@
 	{
 		if ( ev->type() == QEvent::WindowDeactivate )
 		{
-			if ((m_item != NULL) && (!m_blockUpdate))
+			if ((m_item != nullptr) && (!m_blockUpdate))
 				updateTextFrame();
 			activFromApp = false;
 	//		Editor->getCursorPosition(&m_currPara, &m_currChar);
@@ -2245,7 +2245,7 @@
 			if ((!activFromApp) && (!m_textChanged) && (!m_blockUpdate))
 			{
 				activFromApp = true;
-				if (m_item != NULL)
+				if (m_item != nullptr)
 				{
 					//set to false otherwise some dialog properties won't be set correctly
 					if (m_item->itemText.length() == 0)
@@ -2784,7 +2784,7 @@
 {
 	updateTextFrame();
 	m_result = QDialog::Accepted;
-	setCurrentDocumentAndItem(m_doc, NULL);
+	setCurrentDocumentAndItem(m_doc, nullptr);
 	hide();
 	m_blockUpdate = false;
 }
@@ -2807,7 +2807,7 @@
 		}
 	}
 	m_result = QDialog::Rejected;
-	setCurrentDocumentAndItem(m_doc, NULL);
+	setCurrentDocumentAndItem(m_doc, nullptr);
 	hide();
 	m_blockUpdate = false;
 }

Modified: trunk/Scribus/scribus/ui/storyeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/storyeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.h	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.h	Sat May  5 13:51:14 2018
@@ -399,7 +399,7 @@
 
 	virtual void changeEvent(QEvent *e);
 
-	void setCurrentDocumentAndItem(ScribusDoc *doc=NULL, PageItem *item=NULL);
+	void setCurrentDocumentAndItem(ScribusDoc *doc=nullptr, PageItem *item=nullptr);
 	void setSpellActive(bool ssa);
 
 	ScribusDoc* currentDocument() const;

Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp	Sat May  5 13:51:14 2018
@@ -212,7 +212,7 @@
 void StyleManager::setDoc(ScribusDoc *doc)
 {
 	ScribusDoc* oldDoc = m_doc;
-	bool hasDoc = (doc != NULL);
+	bool hasDoc = (doc != nullptr);
 	if (m_doc && (m_doc != doc))
 		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(slotDocSelectionChanged()));
 	m_doc = doc;

Modified: trunk/Scribus/scribus/ui/styleselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/styleselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/styleselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/styleselect.cpp	Sat May  5 13:51:14 2018
@@ -134,7 +134,7 @@
 	ssLayout->setSpacing( 0 );
 	ssLayout->setMargin( 0 );
 
-	UnderlineVal = new UnderlineValues( NULL );
+	UnderlineVal = new UnderlineValues( nullptr );
 	UnderlinePop = new QMenu();
 	UnderlineValAct = new QWidgetAction(this);
 	UnderlineValAct->setDefaultWidget(UnderlineVal);
@@ -177,7 +177,7 @@
 	smallcapsButton->setCheckable( true );
 	ssLayout->addWidget( smallcapsButton );
 
-	StrikeVal = new StrikeValues( NULL );
+	StrikeVal = new StrikeValues( nullptr );
 	StrikePop = new QMenu();
 	StrikeValAct = new QWidgetAction(this);
 	StrikeValAct->setDefaultWidget(StrikeVal);
@@ -190,7 +190,7 @@
 	strikeoutButton->setPopupMode(QToolButton::DelayedPopup);
 	ssLayout->addWidget( strikeoutButton );
 
-	OutlineVal = new OutlineValues( NULL );
+	OutlineVal = new OutlineValues( nullptr );
 	OutlinePop = new QMenu();
 	OutlineValAct = new QWidgetAction(this);
 	OutlineValAct->setDefaultWidget(OutlineVal);
@@ -203,7 +203,7 @@
 	outlineButton->setPopupMode(QToolButton::DelayedPopup);
 	ssLayout->addWidget( outlineButton );
 
-	ShadowVal = new ShadowValues( NULL );
+	ShadowVal = new ShadowValues( nullptr );
 	ShadowPop = new QMenu();
 	ShadowValAct = new QWidgetAction(this);
 	ShadowValAct->setDefaultWidget(ShadowVal);

Modified: trunk/Scribus/scribus/ui/symbolpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/symbolpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/symbolpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/symbolpalette.cpp	Sat May  5 13:51:14 2018
@@ -105,13 +105,13 @@
 
 bool SymbolView::viewportEvent(QEvent *event)
 {
-	if (event != NULL)
+	if (event != nullptr)
 	{
 		if (event->type() == QEvent::ToolTip)
 		{
 			QHelpEvent *helpEvent = static_cast<QHelpEvent *>(event);
 			QListWidgetItem* it = itemAt(helpEvent->pos());
-			if (it != NULL)
+			if (it != nullptr)
 			{
 				event->accept();
 				QString tipText = it->text();
@@ -160,10 +160,10 @@
 	setWidget( SymbolViewWidget );
 
 	unsetDoc();
-	m_scMW  = NULL;
+	m_scMW  = nullptr;
 	editItemNames.clear();
 	languageChange();
-	m_item = NULL;
+	m_item = nullptr;
 	connect(SymbolViewWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
 	connect(SymbolViewWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(handleContextMenue(QPoint)));
 	connect(SymbolViewWidget, SIGNAL(objectDropped()), this, SIGNAL(objectDropped()));
@@ -195,16 +195,16 @@
 
 void SymbolPalette::handleEditItem()
 {
-	if (m_item != NULL)
+	if (m_item != nullptr)
 	{
 		emit startEdit(m_item->text());
-		m_item = NULL;
+		m_item = nullptr;
 	}
 }
 
 void SymbolPalette::handleDeleteItem()
 {
-	if (m_item != NULL)
+	if (m_item != nullptr)
 	{
 		if (m_doc->docPatterns.contains(m_item->text()))
 		{
@@ -212,7 +212,7 @@
 			updateSymbolList();
 			m_doc->regionsChanged()->update(QRect());
 		}
-		m_item = NULL;
+		m_item = nullptr;
 	}
 }
 
@@ -236,7 +236,7 @@
 void SymbolPalette::setMainWindow(ScribusMainWindow *mw)
 {
 	m_scMW = mw;
-	if (m_scMW == NULL)
+	if (m_scMW == nullptr)
 	{
 		SymbolViewWidget->clear();
 		disconnect(m_scMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
@@ -247,11 +247,11 @@
 
 void SymbolPalette::setDoc(ScribusDoc *newDoc)
 {
-	if (m_scMW == NULL)
-		m_doc = NULL;
+	if (m_scMW == nullptr)
+		m_doc = nullptr;
 	else
 		m_doc = newDoc;
-	if (m_doc == NULL)
+	if (m_doc == nullptr)
 	{
 		SymbolViewWidget->clear();
 		setEnabled(true);
@@ -265,7 +265,7 @@
 
 void SymbolPalette::unsetDoc()
 {
-	m_doc = NULL;
+	m_doc = nullptr;
 	SymbolViewWidget->clear();
 	setEnabled(true);
 }
@@ -332,7 +332,7 @@
 		case Qt::Key_Delete:
 			{
 				QListWidgetItem* it = SymbolViewWidget->currentItem();
-				if (it != NULL)
+				if (it != nullptr)
 				{
 					if (m_doc->docPatterns.contains(it->text()))
 					{

Modified: trunk/Scribus/scribus/ui/textpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/textpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/textpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/textpalette.cpp	Sat May  5 13:51:14 2018
@@ -101,7 +101,7 @@
 	}
 
 	m_doc = d;
-	m_item = NULL;
+	m_item = nullptr;
 	setEnabled(!m_doc->drawAsPreview);
 
 	m_unitRatio = m_doc->unitRatio();
@@ -131,8 +131,8 @@
 	setEnabled(true);
 	m_haveDoc = false;
 	m_haveItem = false;
-	m_doc=NULL;
-	m_item = NULL;
+	m_doc=nullptr;
+	m_item = nullptr;
 
 	textPal->unsetItem();
 	textPal->unsetDoc();
@@ -143,14 +143,14 @@
 void TextPalette::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	textPal->unsetItem();
 	handleSelectionChanged();
 }
 
 PageItem* TextPalette::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -200,7 +200,7 @@
 	//CB We shouldn't really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
 	//set some status if so.
-	//FIXME: This won't work until when a canvas deselect happens, m_item must be NULL.
+	//FIXME: This won't work until when a canvas deselect happens, m_item must be nullptr.
 	//if (m_item == i)
 	//	return;
 

Modified: trunk/Scribus/scribus/ui/transformdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/transformdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/transformdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/transformdialog.cpp	Sat May  5 13:51:14 2018
@@ -126,7 +126,7 @@
 
 void TransformDialog::setCurrentTransform(QListWidgetItem* item)
 {
-	if (item != NULL)
+	if (item != nullptr)
 	{
 		TransformItem *ite = (TransformItem*)item;
 		switch (item->type())

Modified: trunk/Scribus/scribus/ui/transparencypalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/ui/transparencypalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/transparencypalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/transparencypalette.cpp	Sat May  5 13:51:14 2018
@@ -32,9 +32,9 @@
 
 Tpalette::Tpalette(QWidget* parent) : QWidget(parent)
 {
-	currentItem = NULL;
-	patternList = NULL;
-	TGradDia = NULL;
+	currentItem = nullptr;
+	patternList = nullptr;
+	TGradDia = nullptr;
 	TGradDia = new GradientVectorDialog(this->parentWidget());
 	TGradDia->hide();
 	setupUi(this);
@@ -158,7 +158,7 @@
 
 	currentDoc = doc;
 
-	if (doc != NULL)
+	if (doc != nullptr)
 	{
 		gradEdit->setColors(doc->PageColors);
 		currentUnit = doc->unitIndex();
@@ -479,7 +479,7 @@
 
 void Tpalette::selectPattern(QListWidgetItem *c)
 {
-	if (c == NULL)
+	if (c == nullptr)
 		return;
 	emit NewPattern(c->text());
 }

Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22521&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp	(original)
+++ trunk/Scribus/scribus/undomanager.cpp	Sat May  5 13:51:14 2018
@@ -41,13 +41,13 @@
 #include "undostack.h"
 #include "undotransaction.h"
 
-UndoManager* UndoManager::instance_          = 0;
+UndoManager* UndoManager::instance_          = nullptr;
 bool         UndoManager::undoEnabled_       = true;
 int          UndoManager::undoEnabledCounter_ = 0;
 
 UndoManager* UndoManager::instance()
 {
-	if (instance_ == 0)
+	if (instance_ == nullptr)
 		instance_ = new UndoManager();
 
 	return instance_;
@@ -98,7 +98,7 @@
 											  QPixmap *actionPixmap)
 {
 	if (!undoEnabled_)
-		return UndoTransaction(NULL);
+		return UndoTransaction(nullptr);
 	
 	/** @brief Dummy object for storing transaction target's name */
 	UndoObject* transactionTarget_ = new DummyUndoObject();
@@ -445,8 +445,8 @@
 
 UndoObject* UndoManager::replaceObject(ulong uid, UndoObject *newUndoObject)
 {
-	UndoObject *tmp = 0;
-	TransactionState* transaction_ = NULL;
+	UndoObject *tmp = nullptr;
+	TransactionState* transaction_ = nullptr;
 	if (transactions_.size() > 0)
 		transaction_ = transactions_.at(transactions_.size()-1)->transactionState;
 	for (uint i = 0; i < stacks_[currentDoc_].m_undoActions_.size(); ++i)
@@ -543,7 +543,7 @@
 {
 	if (instance_)
 		delete instance_;
-	instance_ = 0;
+	instance_ = nullptr;
 }
 
 UndoManager::~UndoManager()




More information about the scribus-commit mailing list