r22534 by craig - More nullptr and other conversions

scribus-commit scribus-commit at lists.scribus.net
Wed May 9 22:51:51 UTC 2018


Author: craig
Date: Wed May  9 22:51:51 2018
New Revision: 22534

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

Modified:
    trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
    trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
    trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
    trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
    trunk/Scribus/scribus/plugins/imposition/impositionplugin.cpp
    trunk/Scribus/scribus/plugins/picbrowser/previewimage.cpp
    trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp
    trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
    trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp
    trunk/Scribus/scribus/scimage.cpp
    trunk/Scribus/scribus/scpainterex_ps2.h
    trunk/Scribus/scribus/scpaths.cpp
    trunk/Scribus/scribus/scprintengine_ps.cpp
    trunk/Scribus/scribus/styles/charstyle.h
    trunk/Scribus/scribus/ui/scdockpalette.cpp
    trunk/Scribus/scribus/ui/scrpalettebase.cpp
    trunk/Scribus/scribus/ui/smcellstyle.cpp
    trunk/Scribus/scribus/ui/smpstylewidget.h
    trunk/Scribus/scribus/ui/smtablestyle.cpp
    trunk/Scribus/scribus/ui/spalette.cpp
    trunk/Scribus/scribus/undogui.cpp
    trunk/Scribus/scribus/undoobject.cpp
    trunk/Scribus/scribus/util_debug.cpp
    trunk/Scribus/scribus/util_debug.h
    trunk/Scribus/scribus/vgradient.cpp

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	Wed May  9 22:51:51 2018
@@ -73,13 +73,13 @@
 CanvasMode_EditMeshGradient::~CanvasMode_EditMeshGradient()
 {
 	delete m_old_mesh;
-	m_old_mesh = NULL;
+	m_old_mesh = nullptr;
 }
 
 inline bool CanvasMode_EditMeshGradient::GetItem(PageItem** pi)
 { 
 	*pi = m_doc->m_Selection->itemAt(0);
-	return (*pi) != NULL;
+	return (*pi) != nullptr;
 }
 
 void CanvasMode_EditMeshGradient::drawControls(QPainter* p)
@@ -982,7 +982,7 @@
 		if((*m_old_mesh) == currItem->meshGradientArray[currItem->selectedMeshPointX][currItem->selectedMeshPointY])
 		{
 			delete ss;
-			ss=NULL;
+			ss=nullptr;
 		}
 		else
 			ss->setItem(qMakePair(*m_old_mesh,currItem->meshGradientArray[currItem->selectedMeshPointX][currItem->selectedMeshPointY]));

Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp	(original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp	Wed May  9 22:51:51 2018
@@ -31,7 +31,7 @@
 
 BarcodeGenerator::BarcodeGenerator(QWidget* parent, const char* name)
 	: QDialog(parent),
-	  paintBarcodeTimer(NULL)
+	  paintBarcodeTimer(nullptr)
 {
 	ui.setupUi(this);
 	setObjectName(name);
@@ -322,7 +322,7 @@
 	if (!paintBarcodeTimer)
 		return;
 	delete paintBarcodeTimer;
-	paintBarcodeTimer=NULL;
+	paintBarcodeTimer=nullptr;
 }
 
 void BarcodeGenerator::updateOptions()

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	Wed May  9 22:51:51 2018
@@ -201,7 +201,7 @@
 	double h = Buffer->Height;
 	double pw = Buffer->Pwidth;
 	int z = 0;
-	PageItem *currItem = NULL;
+	PageItem *currItem = nullptr;
 	switch (Buffer->PType)
 	{
 	// OBSOLETE CR 2005-02-06
@@ -912,7 +912,7 @@
 			if(pg.tagName()=="STYLE")
 			{
 				vg.erase();
-				GetStyle(&pg, &vg, NULL, m_Doc, true);
+				GetStyle(&pg, &vg, nullptr, m_Doc, true);
 				StyleSet<ParagraphStyle> temp;
 				temp.create(vg);
 				m_Doc->redefineStyles(temp, false);
@@ -1336,9 +1336,9 @@
 			if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 			{
 				if (gItem->isGroupChild())
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
 				else
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->DocItems);
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->DocItems);
 			}
 		}
 		allItems.clear();
@@ -1357,9 +1357,9 @@
 			if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 			{
 				if (gItem->isGroupChild())
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
 				else
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->MasterItems);
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->MasterItems);
 			}
 		}
 		allItems.clear();
@@ -1895,7 +1895,7 @@
 			}
 			if(pg.tagName()=="STYLE")
 			{
-				GetStyle(&pg, &vg, NULL, m_Doc, true);
+				GetStyle(&pg, &vg, nullptr, m_Doc, true);
 				VorLFound = true;
 			}
 			if(pg.tagName()=="JAVA")
@@ -2184,9 +2184,9 @@
 						if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 						{
 							if (gItem->isGroupChild())
-								convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
+								convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
 							else
-								convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->DocItems);
+								convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->DocItems);
 						}
 					}
 					allItems.clear();
@@ -2205,9 +2205,9 @@
 						if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 						{
 							if (gItem->isGroupChild())
-								convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
+								convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
 							else
-								convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->MasterItems);
+								convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->MasterItems);
 						}
 					}
 					allItems.clear();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	Wed May  9 22:51:51 2018
@@ -152,7 +152,7 @@
 QIODevice* Scribus134Format::slaReader(const QString & fileName)
 {
 	if (!fileSupported(0, fileName))
-		return NULL;
+		return nullptr;
 
 	QIODevice* ioDevice = 0;
 	if (fileName.right(2) == "gz")
@@ -163,7 +163,7 @@
 		if (!compressor->open(QIODevice::ReadOnly))
 		{
 			delete compressor;
-			return NULL;
+			return nullptr;
 		}
 		ioDevice = compressor;
 	}
@@ -173,7 +173,7 @@
 		if (!ioDevice->open(QIODevice::ReadOnly))
 		{
 			delete ioDevice;
-			return NULL;
+			return nullptr;
 		}
 	}
 	return ioDevice;
@@ -707,7 +707,7 @@
 		}
 		bool converted = false;
 		if (isTableIt)
-			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, nullptr);
 		if (!converted)
 			gItem->groupItemList = gpL;
 	}
@@ -1530,7 +1530,7 @@
 bool Scribus134Format::readBookMark(ScribusDoc::BookMa& bookmark, int& elem, ScXmlStreamAttributes& attrs)
 {
 	elem = attrs.valueAsInt("Element");
-	bookmark.PageObject = NULL;
+	bookmark.PageObject = nullptr;
 	bookmark.Title  = attrs.valueAsString("Title");
 	bookmark.Text   = attrs.valueAsString("Text");
 	bookmark.Aktion = attrs.valueAsString("Aktion");
@@ -2536,7 +2536,7 @@
 	if (Pcolor2.isEmpty())
 		Pcolor2 = CommonStrings::None;
 	QColor tmpc;
-	PageItem *currItem=NULL;
+	PageItem *currItem=nullptr;
 	QString tmp;
 	double xf, yf, xf2;
 	QString clPath;
@@ -3145,7 +3145,7 @@
 	struct ScribusDoc::BookMa bok;
 	QMap<int, ScribusDoc::BookMa> bookmarks;
 
-	ScPage* newPage = NULL;
+	ScPage* newPage = nullptr;
 	
 	QString tmp;
 	QMap<int,PageItem*> TableID;
@@ -3279,7 +3279,7 @@
 		}
 		if (tagName == "STYLE")
 		{
-			getStyle(vg, reader, NULL, m_Doc, true);
+			getStyle(vg, reader, nullptr, m_Doc, true);
 		}
 		if (((tagName == "PAGE") || (tagName == "MASTERPAGE")) && (attrs.valueAsInt("NUM") == pageNumber))
 		{

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h	Wed May  9 22:51:51 2018
@@ -70,7 +70,7 @@
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownNr = 0; item = NULL; isGroupFlag = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownNr = 0; item = nullptr; isGroupFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	Wed May  9 22:51:51 2018
@@ -1158,9 +1158,9 @@
 			if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 			{
 				if (gItem->isGroupChild())
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
-				else
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->DocItems);
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
+				else
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->DocItems);
 			}
 		}
 		allItems.clear();
@@ -1179,9 +1179,9 @@
 			if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 			{
 				if (gItem->isGroupChild())
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
-				else
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->MasterItems);
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
+				else
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->MasterItems);
 			}
 		}
 		allItems.clear();
@@ -1503,7 +1503,7 @@
 	handleOldColorShade(doc, Pcolor, Pshade);
 	handleOldColorShade(doc, Pcolor2, Pshade2);
 	QColor tmpc;
-	PageItem *currItem=NULL;
+	PageItem *currItem=nullptr;
 	QString tmp;
 	double xf, yf, xf2;
 	QString clPath;
@@ -2036,7 +2036,7 @@
 	ParagraphStyle vg;
 	struct ScribusDoc::BookMa bok;
 	PageItem *Neu;
-	ScPage* Apage = NULL;
+	ScPage* Apage = nullptr;
 	FrameItems.clear();
 	itemRemap.clear();
 	itemNext.clear();
@@ -2113,7 +2113,7 @@
 			}
 			if (pg.tagName()=="STYLE")
 			{
-				GetStyle(&pg, &vg, NULL, m_Doc, true);
+				GetStyle(&pg, &vg, nullptr, m_Doc, true);
 				VorLFound = true;
 			}
 			if (pg.tagName()=="JAVA")
@@ -2484,9 +2484,9 @@
 			if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 			{
 				if (gItem->isGroupChild())
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
-				else
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->DocItems);
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
+				else
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->DocItems);
 			}
 		}
 		allItems.clear();
@@ -2505,9 +2505,9 @@
 			if (gItem->isGroup() && gItem->groupItemList[0]->isTableItem)
 			{
 				if (gItem->isGroupChild())
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &(gItem->asGroupFrame()->groupItemList));
-				else
-					convertOldTable(m_Doc, gItem, gItem->groupItemList, NULL, &m_Doc->MasterItems);
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &(gItem->asGroupFrame()->groupItemList));
+				else
+					convertOldTable(m_Doc, gItem, gItem->groupItemList, nullptr, &m_Doc->MasterItems);
 			}
 		}
 		allItems.clear();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Wed May  9 22:51:51 2018
@@ -154,7 +154,7 @@
 QIODevice* Scribus150Format::slaReader(const QString & fileName)
 {
 	if (!fileSupported(0, fileName))
-		return NULL;
+		return nullptr;
 
 	QIODevice* ioDevice = 0;
 	if (fileName.right(2) == "gz")
@@ -165,7 +165,7 @@
 		if (!compressor->open(QIODevice::ReadOnly))
 		{
 			delete compressor;
-			return NULL;
+			return nullptr;
 		}
 		ioDevice = compressor;
 	}
@@ -175,7 +175,7 @@
 		if (!ioDevice->open(QIODevice::ReadOnly))
 		{
 			delete ioDevice;
-			return NULL;
+			return nullptr;
 		}
 	}
 	return ioDevice;
@@ -446,7 +446,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem   = LinkID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -550,7 +550,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -634,7 +634,7 @@
 		}
 		bool converted = false;
 		if (isTableIt)
-			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+			converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, nullptr);
 		if (!converted)
 			gItem->groupItemList = gpL;
 	}
@@ -945,7 +945,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -1049,7 +1049,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -1157,7 +1157,7 @@
 			}
 			bool converted = false;
 			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, nullptr);
 			if (!converted)
 				gItem->groupItemList = gpL;
 		}
@@ -1628,7 +1628,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -1732,7 +1732,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -1874,7 +1874,7 @@
 			}
 			bool converted = false;
 			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, nullptr);
 			if (!converted)
 				gItem->groupItemList = gpL;
 		}
@@ -3133,7 +3133,7 @@
 bool Scribus150Format::readBookMark(ScribusDoc::BookMa& bookmark, int& elem, ScXmlStreamAttributes& attrs)
 {
 	elem = attrs.valueAsInt("Element");
-	bookmark.PageObject = NULL;
+	bookmark.PageObject = nullptr;
 	bookmark.Title  = attrs.valueAsString("Title");
 	bookmark.Text   = attrs.valueAsString("Text");
 	bookmark.Aktion = attrs.valueAsString("Aktion");
@@ -3472,7 +3472,7 @@
 		if (reader.isStartElement() && reader.name() == "Note")
 		{
 			ScXmlStreamAttributes attrs = reader.scAttributes();
-			TextNote* note = m_Doc->newNote(NULL);
+			TextNote* note = m_Doc->newNote(nullptr);
 			note->setSaxedText(attrs.valueAsString("Text"));
 			//temporaly insert names of master mark and notes style into maps with note pointer
 			//will be resolved to pointers by updateNames2Ptr() after all will read
@@ -3520,7 +3520,7 @@
 					QString mark2Label = attrs.valueAsString("MARKlabel");
 					MarkType mark2Type = (MarkType) attrs.valueAsInt("MARKtype");
 					Mark* mark2 = doc->getMark(mark2Label, mark2Type);
-					if (mark2 != NULL) //mark is not defined yet, insert into temp list for update to pointers later
+					if (mark2 != nullptr) //mark is not defined yet, insert into temp list for update to pointers later
 						mark->setMark(mark2);
 					else
 					{
@@ -4087,7 +4087,7 @@
 			{
 				QString l = tAtt.valueAsString("label");
 				MarkType t = (MarkType) tAtt.valueAsInt("type");
-				Mark* mark = NULL;
+				Mark* mark = nullptr;
 				if (m_Doc->isLoading())
 				{
 					mark = m_Doc->getMark(l, t);
@@ -4100,7 +4100,7 @@
 					{
 						//create copy of mark
 						Mark* oldMark = m_Doc->getMark(l, t);
-						if (oldMark == NULL)
+						if (oldMark == nullptr)
 						{
 							qWarning() << "wrong copy of oldMark";
 							mark = m_Doc->newMark();
@@ -4123,7 +4123,7 @@
 						}
 					}
 				}
-				if (mark == NULL)
+				if (mark == nullptr)
 					qDebug() << "Undefinied mark label ["<< l << "] type " << t;
 				else
 				{
@@ -4138,7 +4138,7 @@
 		if (tName == "WeldEntry")
 		{
 			PageItem::WeldingInfo wInf;
-			wInf.weldItem = NULL;
+			wInf.weldItem = nullptr;
 			wInf.weldPoint = FPoint(tAtt.valueAsDouble("WX", 0.0), tAtt.valueAsDouble("WY", 0.0));
 			wInf.weldID = tAtt.valueAsInt("Target", 0);
 			newItem->weldList.append(wInf);
@@ -4356,7 +4356,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -4396,7 +4396,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -4583,7 +4583,7 @@
 		{
 			QString l = tAtt.valueAsString("label");
 			MarkType t = (MarkType) tAtt.valueAsInt("type");
-			Mark* mark = NULL;
+			Mark* mark = nullptr;
 			if (m_Doc->isLoading())
 			{
 				mark = m_Doc->getMark(l, t);
@@ -4596,7 +4596,7 @@
 				{
 					//create copy of mark
 					Mark* oldMark = m_Doc->getMark(l, t);
-					if (oldMark == NULL)
+					if (oldMark == nullptr)
 					{
 						qWarning() << "wrong copy of oldMark";
 						mark = m_Doc->newMark();
@@ -4619,7 +4619,7 @@
 					}
 				}
 			}
-			if (mark == NULL)
+			if (mark == nullptr)
 				qDebug() << "Undefinied mark label ["<< l << "] type " << t;
 			else
 			{
@@ -4808,7 +4808,7 @@
 	if (Pcolor2.isEmpty())
 		Pcolor2 = CommonStrings::None;
 	QColor tmpc;
-	PageItem *currItem=NULL;
+	PageItem *currItem=nullptr;
 	QString tmp, clPath;
 	switch (pt)
 	{
@@ -5975,7 +5975,7 @@
 	struct ScribusDoc::BookMa bok;
 	QMap<int, ScribusDoc::BookMa> bookmarks;
 
-	ScPage* newPage = NULL;
+	ScPage* newPage = nullptr;
 	
 	QMap<int,PageItem*> TableID;
 	QList<PageItem*> TableItems;
@@ -6127,7 +6127,7 @@
 		}
 		if (tagName == "STYLE")
 		{
-			getStyle(vg, reader, NULL, m_Doc, true);
+			getStyle(vg, reader, nullptr, m_Doc, true);
 		}
 		if (((tagName == "PAGE") || (tagName == "MASTERPAGE")) && (attrs.valueAsInt("NUM") == pageNumber))
 		{
@@ -6135,7 +6135,7 @@
 				continue;
 			a = m_Doc->currentPage()->pageNr();
 			newPage = m_Doc->Pages->at(a);
-			SimpleState *ss = NULL;
+			SimpleState *ss = nullptr;
 			if (UndoManager::undoEnabled())
 			{
 				ss = new SimpleState(Um::ChangePageAttrs, "", Um::ICreate);
@@ -6383,7 +6383,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -6441,7 +6441,7 @@
 				{
 					PageItem::WeldingInfo wInf = ta->weldList.at(i);
 					ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
-					if (ta->weldList[i].weldItem == NULL)
+					if (ta->weldList[i].weldItem == nullptr)
 						ta->weldList.removeAt(i--);
 				}
 			}
@@ -6549,7 +6549,7 @@
 			}
 			bool converted = false;
 			if (isTableIt)
-				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, NULL);
+				converted = convertOldTable(m_Doc, gItem, gpL, &groupStackF, nullptr);
 			if (!converted)
 				gItem->groupItemList = gpL;
 		}
@@ -6868,7 +6868,7 @@
 			QString label2 = mark2map.begin().key();
 			MarkType type2 = mark2map.begin().value();
 			Mark* mark2 = m_Doc->getMark(label2, type2);
-			if (mark2 != NULL)
+			if (mark2 != nullptr)
 			{
 				mark->setMark(mark2);
 			}
@@ -6891,16 +6891,16 @@
 		{
 			NoteFrameData eF = notesFramesData.at(i);
 			NotesStyle* NS = m_Doc->getNotesStyle(eF.NSname);
-			if (NS != NULL)
+			if (NS != nullptr)
 			{
 				PageItem* item = LinkID.value(eF.myID);
-				if ((item != NULL) && item->isNoteFrame())
+				if ((item != nullptr) && item->isNoteFrame())
 				{
 					item->asNoteFrame()->setNS(NS);
 					if (NS->isEndNotes())
 					{
 						if (eF.NSrange == NSRdocument)
-							m_Doc->setEndNoteFrame(item->asNoteFrame(), (void*) NULL);
+							m_Doc->setEndNoteFrame(item->asNoteFrame(), (void*) nullptr);
 						else if (eF.NSrange == NSRpage)
 							m_Doc->setEndNoteFrame(item->asNoteFrame(), (void*) m_Doc->DocPages.at(eF.index));
 						else if (eF.NSrange == NSRsection)
@@ -6911,7 +6911,7 @@
 					else
 					{
 						PageItem* master = LinkID.value(eF.itemID);
-						if (master != NULL)
+						if (master != nullptr)
 						{
 							item->asNoteFrame()->setMaster(master);
 							master->asTextFrame()->setNoteFrame(item->asNoteFrame());
@@ -6943,10 +6943,10 @@
 		for (it = notesMasterMarks.begin(); it != end; ++it)
 		{
 			TextNote* note = it.value();
-			assert(note != NULL);
+			assert(note != nullptr);
 			QString mrkLabel = it.key();
 			Mark* mrk = m_Doc->getMark(mrkLabel, MARKNoteMasterType);
-			if (mrk == NULL)
+			if (mrk == nullptr)
 			{
 				qWarning() << "Scribus150Format::updateNames2Ptr() : cannot find master mark ("<<mrkLabel <<") for note - note will be deleted";
 				m_Doc->deleteNote(note);
@@ -6964,12 +6964,12 @@
 		for (auto it = notesNSets.begin(); it != end; ++it)
 		{
 			TextNote* note = it.key();
-			assert(note != NULL);
+			assert(note != nullptr);
 			QString nsLabel = it.value();
 			NotesStyle* ns = m_Doc->getNotesStyle(nsLabel);
-			if (ns != NULL)
+			if (ns != nullptr)
 				note->setNotesStyle(ns);
-			if (note->notesStyle() == NULL)
+			if (note->notesStyle() == nullptr)
 			{
 				qWarning() << "Scribus150Format::updateNames2Ptr()  : cannot find notes style ("<<nsLabel <<") for note - note will be deleted";
 				m_Doc->deleteNote(note);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h	Wed May  9 22:51:51 2018
@@ -78,7 +78,7 @@
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownWeld = ownNr = itemID = 0; item = NULL; isGroupFlag = isWeldFlag = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownWeld = ownNr = itemID = 0; item = nullptr; isGroupFlag = isWeldFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h	Wed May  9 22:51:51 2018
@@ -63,7 +63,7 @@
 	// Destructor.
 	virtual ~LinkSubmitForm();
 	// Was the LinkImportData created successfully?
-	virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
+	virtual GBool isOk() POPPLER_CONST { return fileName != nullptr; }
 	// Accessors.
 	virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
 	GooString *getFileName() { return fileName; }
@@ -85,7 +85,7 @@
 	// Destructor.
 	virtual ~LinkImportData();
 	// Was the LinkImportData created successfully?
-	virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
+	virtual GBool isOk() POPPLER_CONST { return fileName != nullptr; }
 	// Accessors.
 	virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
 	GooString *getFileName() { return fileName; }

Modified: trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	Wed May  9 22:51:51 2018
@@ -58,7 +58,7 @@
 	m_Doc=doc;
 	importerFlags = flags;
 	interactive = (flags & LoadSavePlugin::lfInteractive);
-	progressDialog = NULL;
+	progressDialog = nullptr;
 }
 
 QImage ShapePlug::readThumbnail(QString fName)
@@ -73,7 +73,7 @@
 		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
 	docWidth = b;
 	docHeight = h;
-	progressDialog = NULL;
+	progressDialog = nullptr;
 	m_Doc = new ScribusDoc();
 	m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 	m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -160,7 +160,7 @@
 		qApp->processEvents();
 	}
 	else
-		progressDialog = NULL;
+		progressDialog = nullptr;
 /* Set default Page to size defined in Preferences */
 //	x = 0.0;
 //	y = 0.0;
@@ -214,12 +214,12 @@
 			m_Doc->setPageOrientation(0);
 		m_Doc->setPageSize("Custom");
 	}
-	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
 		m_Doc->view()->Deselect();
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
 		m_Doc->view()->updatesOn(false);
 	m_Doc->scMW()->setScriptRunning(true);
 	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -252,7 +252,7 @@
 					}
 					m_Doc->m_Selection->delaySignalsOff();
 					m_Doc->m_Selection->setGroupRect();
-					if (m_Doc->view() != NULL)
+					if (m_Doc->view() != nullptr)
 						m_Doc->view()->updatesOn(true);
 				}
 			}

Modified: trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshapeplugin.cpp	Wed May  9 22:51:51 2018
@@ -131,7 +131,7 @@
 	}
 	m_Doc=ScCore->primaryMainWindow()->doc;
 	UndoTransaction activeTransaction;
-	bool emptyDoc = (m_Doc == NULL);
+	bool emptyDoc = (m_Doc == nullptr);
 	bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
 	TransactionSettings trSettings;
 	trSettings.targetName   = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -159,7 +159,7 @@
 	if( fileName.isEmpty() )
 		return QImage();
 	UndoManager::instance()->setUndoEnabled(false);
-	m_Doc = NULL;
+	m_Doc = nullptr;
 	ShapePlug *dia = new ShapePlug(m_Doc, lfCreateThumbnail);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);

Modified: trunk/Scribus/scribus/plugins/imposition/impositionplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/imposition/impositionplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/imposition/impositionplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/imposition/impositionplugin.cpp	Wed May  9 22:51:51 2018
@@ -42,7 +42,7 @@
 
 bool ImpositionPlugin::run(QWidget* parent, ScribusDoc* doc, QString target)
 {
-	if (doc==NULL)
+	if (doc==nullptr)
 		return false;
 	Imposition *imp = new Imposition(parent,doc);
 	imp->exec();

Modified: trunk/Scribus/scribus/plugins/picbrowser/previewimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/picbrowser/previewimage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/previewimage.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/previewimage.cpp	Wed May  9 22:51:51 2018
@@ -49,7 +49,7 @@
 //enable caching
 	fileInformation.setCaching ( true );
 
-	imgInfo = NULL;
+	imgInfo = nullptr;
 	currentSize = 1;
 }
 

Modified: trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/shapes/shapeplugin.cpp	Wed May  9 22:51:51 2018
@@ -53,7 +53,7 @@
 
 ShapePlugin::ShapePlugin() : ScPersistentPlugin()
 {
-	sc_palette = NULL;
+	sc_palette = nullptr;
 }
 
 ShapePlugin::~ShapePlugin() {};
@@ -114,7 +114,7 @@
 	{
 		sc_palette->writeToPrefs();
 		delete sc_palette;
-		sc_palette = NULL;
+		sc_palette = nullptr;
 	}
 	return true;
 }

Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp	(original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp	Wed May  9 22:51:51 2018
@@ -51,7 +51,7 @@
 
 QStringList HunspellDict::suggest(QString word)
 {
-	char **sugglist = NULL;
+	char **sugglist = nullptr;
 	QStringList replacements;
 
 	int suggCount = m_hunspell->suggest(&sugglist, m_codec->fromUnicode(word).constData());

Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp	(original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp	Wed May  9 22:51:51 2018
@@ -34,9 +34,9 @@
 HunspellPluginImpl::HunspellPluginImpl() : QObject(0)
 {
 //	numDicts=0;
-	m_doc=NULL;
+	m_doc=nullptr;
 	m_runningForSE=false;
-	m_SE=NULL;
+	m_SE=nullptr;
 }
 
 HunspellPluginImpl::~HunspellPluginImpl()
@@ -44,7 +44,7 @@
 	foreach (HunspellDict* h, hspellerMap)
 	{
 		delete h;
-		h = NULL;
+		h = nullptr;
 	}
 	hspellerMap.clear();
 //	numDicts = 0;

Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp	(original)
+++ trunk/Scribus/scribus/scimage.cpp	Wed May  9 22:51:51 2018
@@ -369,11 +369,11 @@
 /*
 void ScImage::liberateMemory(void **memory)
 {
-	assert(memory != (void **)NULL);
-	if(*memory == (void *)NULL)
+	assert(memory != (void **)nullptr);
+	if(*memory == (void *)nullptr)
 		return;
 	free(*memory);
-	*memory=(void *) NULL;
+	*memory=(void *) nullptr;
 }
 */
 void ScImage::solarize(double factor, bool cmyk)
@@ -2122,7 +2122,7 @@
 	Q_ASSERT(profile);
 	Q_ASSERT(components);
 	ScColorProfile prof;
-	ScImgDataLoader* pDataLoader = NULL;
+	ScImgDataLoader* pDataLoader = nullptr;
 
 	profile->resize(0);
 	*components = 0;
@@ -2385,7 +2385,7 @@
 				}
 			}
 			else if (bilevel && (reqType == CMYKData))
-				inputProf = NULL; // Workaround to map directly gray to K channel
+				inputProf = nullptr; // Workaround to map directly gray to K channel
 			else if (ScCore->InputProfiles.contains(cmSettings.profileName()) && (cmSettings.profileName() != cmSettings.doc()->cmsSettings().DefaultImageRGBProfile))
 			{
 				imgInfo.profileName = cmSettings.profileName();
@@ -2409,7 +2409,7 @@
 	else if (cmSettings.colorManagementAllowed() && isCMYK)
 		inputProf = ScCore->defaultCMYKProfile;
 	else if (cmSettings.colorManagementAllowed() && bilevel && (reqType == CMYKData))
-		inputProf = NULL; // Workaround to map directly gray to K channel
+		inputProf = nullptr; // Workaround to map directly gray to K channel
 	else if (cmSettings.colorManagementAllowed())
 		inputProf = ScCore->defaultRGBProfile;
 	ScColorProfile screenProf  = cmSettings.monitorProfile() ? cmSettings.monitorProfile() : ScCore->defaultRGBProfile;
@@ -2526,11 +2526,11 @@
 				// JG : this line overwrite image profile info and should not be needed here!!!!
 				// imgInfo = pDataLoader->imageInfoRecord();
 			}
-			uchar* ptr2 = NULL;
+			uchar* ptr2 = nullptr;
 			for (int i = 0; i < height(); i++)
 			{
 				uchar* ptr = scanLine(i);
-				ptr2 = pDataLoader->useRawImage() ? pDataLoader->r_image.scanLine(i) : NULL;
+				ptr2 = pDataLoader->useRawImage() ? pDataLoader->r_image.scanLine(i) : nullptr;
 				if ( inputProfFormat == Format_GRAY_8 && (outputProfColorSpace != ColorSpace_Cmyk) )
 				{
 					unsigned char* ucs = ptr2 ? (ptr2 + 1) : (ptr + 1);

Modified: trunk/Scribus/scribus/scpainterex_ps2.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/scpainterex_ps2.h
==============================================================================
--- trunk/Scribus/scribus/scpainterex_ps2.h	(original)
+++ trunk/Scribus/scribus/scpainterex_ps2.h	Wed May  9 22:51:51 2018
@@ -52,7 +52,7 @@
 class ScPs2OutputParams
 {
 public:
-	ScPs2OutputParams(ScribusDoc* doc = NULL);
+	ScPs2OutputParams(ScribusDoc* doc = nullptr);
 	ScPainterExBase::ColorMode colorMode;
 	ScribusDoc* document;
 	bool reloadImages;

Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp	(original)
+++ trunk/Scribus/scribus/scpaths.cpp	Wed May  9 22:51:51 2018
@@ -34,8 +34,8 @@
 const char ScPaths::envPathSeparator = ':';
 #endif
 
-// Init the singleton's "self" address to NULL
-ScPaths* ScPaths::m_instance = NULL;
+// Init the singleton's "self" address to nullptr
+ScPaths* ScPaths::m_instance = nullptr;
 
 // Singleton's public constructor
 const ScPaths& ScPaths::instance()
@@ -136,7 +136,7 @@
 	CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
 	CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, kCFURLPOSIXPathStyle);
 	const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding());
-	if (pathPtr!=NULL && strlen(pathPtr)>0)
+	if (pathPtr!=nullptr && strlen(pathPtr)>0)
 	{
 		// make sure we get the Scribus.app directory, not some subdir
 		// strip trailing '/':
@@ -672,7 +672,7 @@
 	QString qstr;
 #ifdef Q_OS_WIN32
 	WCHAR dir[256];
-	if ( SHGetSpecialFolderPathW(NULL, dir, folder , false) )
+	if ( SHGetSpecialFolderPathW(nullptr, dir, folder , false) )
 	{
 		qstr = QString::fromUtf16((const unsigned short*) dir);
 		if( !qstr.endsWith("\\") )

Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp	Wed May  9 22:51:51 2018
@@ -24,69 +24,69 @@
 	doc.getUsedColors(usedColors);
 	PrefsManager *prefsManager = PrefsManager::instance();
 	PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, usedFonts, usedColors, options.includePDFMarks, options.useSpotColors);
-	if (dd != NULL)
+	if (dd == nullptr)
+		return false;
+
+	if (!options.toFile)
+		filename = prefsManager->preferencesLocation()+"/tmp.ps";
+	bool PSfile = dd->PS_set_file(filename);
+	filename = QDir::toNativeSeparators(filename);
+	if (PSfile)
 	{
+		// Write the PS to a file
+		int psCreationRetVal=dd->CreatePS(&doc, options);
+		if (psCreationRetVal!=0)
+		{
+			QFile::remove(filename);
+			if (psCreationRetVal==2)
+				return true;
+			else
+			{
+				m_errorMessage = dd->errorMessage();
+				return false;
+			}
+		}
+		if (options.prnEngine != PostScript3 && ScCore->haveGS())
+		{
+			// use gs to convert our PS to a lower version
+			QString tmp;
+			QStringList opts;
+			opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(doc.pageWidth())) );
+			opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(doc.pageHeight())) );
+			convertPS2PS(filename, filename + ".tmp", opts, options.prnEngine);
+			moveFile(filename + ".tmp", filename);
+		}
 		if (!options.toFile)
-			filename = prefsManager->preferencesLocation()+"/tmp.ps";
-		bool PSfile = dd->PS_set_file(filename);
-		filename = QDir::toNativeSeparators(filename);
-		if (PSfile)
 		{
-			// Write the PS to a file
-			int psCreationRetVal=dd->CreatePS(&doc, options);
-			if (psCreationRetVal!=0)
+			// print and delete the PS file
+			QByteArray cmd;
+			if (options.useAltPrintCommand)
 			{
-				QFile::remove(filename);
-				if (psCreationRetVal==2)
-					return true;
-				else
-				{
-					m_errorMessage = dd->errorMessage();
-					return false;
-				}
+				cmd += options.printerCommand;
+				cmd += " ";
+				cmd += filename;
+				system(cmd.data());
 			}
-			if (options.prnEngine != PostScript3 && ScCore->haveGS())
+			else
 			{
-				// use gs to convert our PS to a lower version
-				QString tmp;
-				QStringList opts;
-				opts.append( QString("-dDEVICEWIDTHPOINTS=%1").arg(tmp.setNum(doc.pageWidth())) );
-				opts.append( QString("-dDEVICEHEIGHTPOINTS=%1").arg(tmp.setNum(doc.pageHeight())) );
-				convertPS2PS(filename, filename + ".tmp", opts, options.prnEngine);
-				moveFile(filename + ".tmp", filename);
+				QByteArray cc;
+				cmd += "lpr -P '";
+				cmd += options.printer;
+				cmd += "'";
+				if (options.copies > 1)
+					cmd += " -#" + cc.setNum(options.copies);
+				cmd += options.printerOptions;
+				cmd += " "+filename;
+				system(cmd.data());
 			}
-			if (!options.toFile)
-			{
-				// print and delete the PS file
-				QByteArray cmd;
-				if (options.useAltPrintCommand)
-				{
-					cmd += options.printerCommand;
-					cmd += " ";
-					cmd += filename;
-					system(cmd.data());
-				}
-				else
-				{
-					QByteArray cc;
-					cmd += "lpr -P '";
-					cmd += options.printer;
-					cmd += "'";
-					if (options.copies > 1)
-						cmd += " -#" + cc.setNum(options.copies);
-					cmd += options.printerOptions;
-					cmd += " "+filename;
-					system(cmd.data());
-				}
 // Disabled that for now, as kprinter won't work otherwise
 // leaving that file around doesn't harm, as it will be overwritten the next time.
 //				unlink(filename);
-			}
-			retw = true;
 		}
-		else
-			retw = false;
-		delete dd;
+		retw = true;
 	}
+	else
+		retw = false;
+	delete dd;
 	return retw;
 }

Modified: trunk/Scribus/scribus/styles/charstyle.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/styles/charstyle.h
==============================================================================
--- trunk/Scribus/scribus/styles/charstyle.h	(original)
+++ trunk/Scribus/scribus/styles/charstyle.h	Wed May  9 22:51:51 2018
@@ -214,7 +214,6 @@
 #include "charstyle.attrdefs.cxx"
 #undef ATTRDEF
 	m_Effects = other.m_Effects;
-//	m_context = NULL;
 	m_contextversion = -1;
 	return *this;
 }
@@ -227,7 +226,6 @@
 #include "charstyle.attrdefs.cxx"
 #undef ATTRDEF
 	m_Effects = other.m_Effects;
-//	m_context = NULL;
 	m_contextversion = -1;
 }
 

Modified: trunk/Scribus/scribus/ui/scdockpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/ui/scdockpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scdockpalette.cpp	Wed May  9 22:51:51 2018
@@ -84,7 +84,7 @@
 				visibleOnStartup = palettePrefs->getBool("visible");
 		}
 		else
-			palettePrefs = NULL;
+			palettePrefs = nullptr;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/scrpalettebase.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/ui/scrpalettebase.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrpalettebase.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrpalettebase.cpp	Wed May  9 22:51:51 2018
@@ -80,7 +80,7 @@
 				visibleOnStartup = palettePrefs->getBool("visible");
 		}
 		else
-			palettePrefs = NULL;
+			palettePrefs = nullptr;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/smcellstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/ui/smcellstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcellstyle.cpp	Wed May  9 22:51:51 2018
@@ -497,7 +497,7 @@
 	Q_ASSERT(!parent.isNull());
 
 	bool  loop = false, parentLoop = false;
-	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_cachedStyles.resolve(parent) : NULL;
+	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_cachedStyles.resolve(parent) : nullptr;
 	QStringList  sel;
 
 	for (int i = 0; i < m_selection.count(); ++i)
@@ -512,7 +512,7 @@
 				loop = parentLoop = true;
 				break;
 			}
-			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : NULL;
+			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : nullptr;
 		}
 		if (!loop)
 		{

Modified: trunk/Scribus/scribus/ui/smpstylewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/ui/smpstylewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.h	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.h	Wed May  9 22:51:51 2018
@@ -63,7 +63,7 @@
 	void showTabs(QList<ParagraphStyle*> &pstyles, int unitIndex);
 	void showCStyle(QList<ParagraphStyle*> &pstyles, QList<CharStyle> &cstyles, const QString &defLang, int unitIndex);
 	void showParent(QList<ParagraphStyle*> &pstyles);
-	void setOpticalMargins(int o, bool inhO=false, const ParagraphStyle *parent=NULL);
+	void setOpticalMargins(int o, bool inhO=false, const ParagraphStyle *parent=nullptr);
 
 	void openEnhanced();
 	void closeEnhanced(bool show = false);

Modified: trunk/Scribus/scribus/ui/smtablestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/ui/smtablestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtablestyle.cpp	Wed May  9 22:51:51 2018
@@ -495,7 +495,7 @@
 	Q_ASSERT(!parent.isNull());
 
 	bool  loop = false, parentLoop = false;
-	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_cachedStyles.resolve(parent) : NULL;
+	const BaseStyle* parentStyle = (!parent.isEmpty()) ? m_cachedStyles.resolve(parent) : nullptr;
 	QStringList  sel;
 
 	for (int i = 0; i < m_selection.count(); ++i)
@@ -510,7 +510,7 @@
 				loop = parentLoop = true;
 				break;
 			}
-			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : NULL;
+			pStyle = pStyle->hasParent() ? pStyle->parentStyle() : nullptr;
 		}
 		if (!loop)
 		{

Modified: trunk/Scribus/scribus/ui/spalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/ui/spalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/spalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/spalette.cpp	Wed May  9 22:51:51 2018
@@ -33,7 +33,7 @@
 {
 	setEditable(false);
 	addItem( tr("No Style"));
-	currentDoc = NULL;
+	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
 
@@ -56,7 +56,7 @@
 
 	bool sigBlocked = this->blockSignals(true);
 	clear();
-	if (currentDoc != NULL)
+	if (currentDoc != nullptr)
 	{
 		QStringList st;
 		addItem( tr("No Style"));
@@ -97,7 +97,7 @@
 {
 	setEditable(false);
 	addItem( tr("No Style"));
-	currentDoc = NULL;
+	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
 
@@ -120,7 +120,7 @@
 
 	bool sigBlocked = this->blockSignals(true);
 	clear();
-	if (currentDoc != NULL)
+	if (currentDoc != nullptr)
 	{
 		QStringList st;
 		addItem( tr("No Style"));
@@ -161,7 +161,7 @@
 {
 	setEditable(false);
 	addItem( tr("No Style"));
-	currentDoc = NULL;
+	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
 
@@ -184,7 +184,7 @@
 
 	bool sigBlocked = this->blockSignals(true);
 	clear();
-	if (currentDoc != NULL)
+	if (currentDoc != nullptr)
 	{
 		QStringList st;
 		addItem( tr("No Style"));
@@ -226,7 +226,7 @@
 {
 	setEditable(false);
 	addItem( tr("No Style"));
-	currentDoc = NULL;
+	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
 
@@ -249,7 +249,7 @@
 
 	bool sigBlocked = this->blockSignals(true);
 	clear();
-	if (currentDoc != NULL)
+	if (currentDoc != nullptr)
 	{
 		QStringList st;
 		addItem( tr("No Style"));

Modified: trunk/Scribus/scribus/undogui.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/undogui.cpp
==============================================================================
--- trunk/Scribus/scribus/undogui.cpp	(original)
+++ trunk/Scribus/scribus/undogui.cpp	Wed May  9 22:51:51 2018
@@ -403,8 +403,8 @@
 
 UndoPalette::UndoItem::UndoItem() : QListWidgetItem()
 {
-	targetpixmap = NULL;
-	actionpixmap = NULL;
+	targetpixmap = nullptr;
+	actionpixmap = nullptr;
 	isUndoAction_ = true;
 }
 

Modified: trunk/Scribus/scribus/undoobject.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/undoobject.cpp
==============================================================================
--- trunk/Scribus/scribus/undoobject.cpp	(original)
+++ trunk/Scribus/scribus/undoobject.cpp	Wed May  9 22:51:51 2018
@@ -36,7 +36,7 @@
 	m_id = m_nextId;
 	++m_nextId;
 	m_uname = "";
-	m_upixmap = NULL;
+	m_upixmap = nullptr;
 }
 
 UndoObject::UndoObject(const UndoObject& other)

Modified: trunk/Scribus/scribus/util_debug.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/util_debug.cpp
==============================================================================
--- trunk/Scribus/scribus/util_debug.cpp	(original)
+++ trunk/Scribus/scribus/util_debug.cpp	Wed May  9 22:51:51 2018
@@ -21,6 +21,9 @@
  *                                                                         *
  ***************************************************************************/
 
+#include <QDateTime>
+#include <QtGlobal>
+
 #if !defined(_WIN32) && !defined(Q_OS_MAC)
 #include <execinfo.h>
 #include <cxxabi.h>
@@ -28,16 +31,16 @@
 #if defined(_WIN32)
 #include <windows.h>
 #endif
-#include <QDateTime>
+
 #include "util_debug.h"
 
-void sDebug(QString message)
+void sDebug(const QString& message)
 {
 	qDebug("%s", message.toLatin1().constData());
 }
 
 
-void tDebug(QString message)
+void tDebug(const QString& message)
 {
 	QDateTime debugTime;
 	qDebug("%s", QString("%1\t%2").arg(debugTime.currentDateTime().toString("hh:mm:ss:zzz"), message).toLatin1().constData());
@@ -53,7 +56,7 @@
 {
 #if !defined(_WIN32) && !defined(Q_OS_MAC) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD)
 	void ** trace = new void*[nFrames + 1];
-	char **messages = ( char ** ) NULL;
+	char **messages = ( char ** ) nullptr;
 	int i, trace_size = 0;
 
 	trace_size = backtrace ( trace, nFrames + 1 );

Modified: trunk/Scribus/scribus/util_debug.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/util_debug.h
==============================================================================
--- trunk/Scribus/scribus/util_debug.h	(original)
+++ trunk/Scribus/scribus/util_debug.h	Wed May  9 22:51:51 2018
@@ -11,13 +11,13 @@
 
 #include "scribusapi.h"
 
-void SCRIBUS_API sDebug(QString message);
+void SCRIBUS_API sDebug(const QString& message);
 
 /*! \brief performance measurements.
 It prints given message with it current timestamp.
 Useful for duration holes finding.
 \author Petr Vanek */
-void tDebug(QString message);
+void tDebug(const QString& message);
 
 void SCRIBUS_API printBacktrace(int nFrames);
 #endif

Modified: trunk/Scribus/scribus/vgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22534&path=/trunk/Scribus/scribus/vgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/vgradient.cpp	(original)
+++ trunk/Scribus/scribus/vgradient.cpp	Wed May  9 22:51:51 2018
@@ -201,7 +201,7 @@
 
 void VGradient::filterStops(void)
 {
-	VColorStop* colorStop = NULL;
+	VColorStop* colorStop = nullptr;
 	bool zeroFound = false;
 	QMutableListIterator<VColorStop*> i(m_colorStops);
 	i.toBack();




More information about the scribus-commit mailing list