r22516 by craig - More nullptr and other conversions

scribus-commit scribus-commit at lists.scribus.net
Wed May 2 19:59:47 UTC 2018


Author: craig
Date: Wed May  2 19:59:47 2018
New Revision: 22516

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

Modified:
    trunk/Scribus/scribus/KarbonCurveFit.cpp
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvas.h
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp
    trunk/Scribus/scribus/gtaction.cpp
    trunk/Scribus/scribus/loadsaveplugin.cpp
    trunk/Scribus/scribus/main_win32.cpp
    trunk/Scribus/scribus/marks.cpp
    trunk/Scribus/scribus/menumanager.cpp
    trunk/Scribus/scribus/nftsettings.cpp
    trunk/Scribus/scribus/nodeeditcontext.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem_noteframe.cpp
    trunk/Scribus/scribus/pageitem_osgframe.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
    trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
    trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusapp.cpp
    trunk/Scribus/scribus/scribuscore.cpp
    trunk/Scribus/scribus/scribusstructs.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/scribusview.h
    trunk/Scribus/scribus/text/storytext.cpp
    trunk/Scribus/scribus/ui/checkDocument.cpp
    trunk/Scribus/scribus/ui/effectsdialog.cpp
    trunk/Scribus/scribus/ui/notesstyleseditor.cpp
    trunk/Scribus/scribus/ui/preview.cpp
    trunk/Scribus/scribus/ui/propertiespalette_line.cpp
    trunk/Scribus/scribus/ui/proptree.cpp
    trunk/Scribus/scribus/ui/rulermover.cpp
    trunk/Scribus/scribus/ui/scrapbookpalette.cpp
    trunk/Scribus/scribus/ui/swatchcombo.cpp
    trunk/Scribus/scribus/util_printer.cpp

Modified: trunk/Scribus/scribus/KarbonCurveFit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/KarbonCurveFit.cpp
==============================================================================
--- trunk/Scribus/scribus/KarbonCurveFit.cpp	(original)
+++ trunk/Scribus/scribus/KarbonCurveFit.cpp	Wed May  2 19:59:47 2018
@@ -38,7 +38,8 @@
 
 class FitVector {
 	public:
-	FitVector(const QPointF &p){
+	FitVector(const QPointF &p)
+	{
 		m_X=p.x();
 		m_Y=p.y();
 	}
@@ -516,17 +517,19 @@
 	tHatCenter = ComputeCenterTangent(points, splitPoint);
 
 	int w1,w2;
-	QPointF *cu1=NULL, *cu2=NULL;
+	QPointF *cu1=nullptr, *cu2=nullptr;
 	cu1 = FitCubic(points, first, splitPoint, tHat1, tHatCenter, error,w1);
 
 	tHatCenter.negate();
 	cu2 = FitCubic(points, splitPoint, last, tHatCenter, tHat2, error,w2);
 
 	QPointF *newcurve = new QPointF[w1+w2];
-	for(int i=0;i<w1;i++){
+	for(int i=0;i<w1;i++)
+	{
 		newcurve[i]=cu1[i];
 	}
-	for(int i=0;i<w2;i++){
+	for(int i=0;i<w2;i++)
+	{
 		newcurve[i+w1]=cu2[i];
 	}
 	

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Wed May  2 19:59:47 2018
@@ -438,7 +438,7 @@
 		// if itemAbove is given, we expect to find it among the masterpage items of this page
 		int currNr = itemAbove? m_doc->currentPage()->FromMaster.indexOf(itemAbove)-1 : m_doc->currentPage()->FromMaster.count()-1;
 		if (currNr < 0)
-			return NULL;
+			return nullptr;
 		while (currNr >= 0)
 		{
 			currItem = m_doc->currentPage()->FromMaster.at(currNr);
@@ -464,7 +464,7 @@
 					{
 						currItem->asGroupFrame()->adjustXYPosition();
 						PageItem* ret = itemInGroup(currItem, mouseArea);
-						if (ret != NULL)
+						if (ret != nullptr)
 							return ret;
 					}
 					return currItem;
@@ -475,7 +475,7 @@
 	}
 	// now look for normal items
 	if (m_doc->Items->count() == 0)
-		return NULL;
+		return nullptr;
 
 	int currNr = itemAbove? m_doc->Items->indexOf(itemAbove)-1 : m_doc->Items->count()-1;
 	while (currNr >= 0)
@@ -508,10 +508,10 @@
 				{
 					currItem->asGroupFrame()->adjustXYPosition();
 					PageItem* ret = itemInGroup(currItem, mouseArea);
-					if (ret != NULL)
+					if (ret != nullptr)
 					{
 						if ((m_doc->drawAsPreview && !m_doc->editOnPreview) && !ret->isAnnotation())
-							return NULL;
+							return nullptr;
 						else
 							return ret;
 					}
@@ -521,7 +521,7 @@
 		}
 		--currNr;
 	}
-	return NULL;
+	return nullptr;
 }
 
 bool Canvas::cursorOverTextFrameControl(QPoint globalPos, PageItem* frame)
@@ -565,7 +565,7 @@
 			if (embedded->isGroup())
 			{
 				PageItem* ret = itemInGroup(embedded, mouseArea);
-				if (ret != NULL)
+				if (ret != nullptr)
 					return ret;
 			}
 			else
@@ -573,20 +573,20 @@
 		}
 		--currNr;
 	}
-	return NULL;
+	return nullptr;
 }
 
 PageItem * Canvas::itemUnderItem(PageItem * item, int& index) const
 {
 	int indice = qMin(index, m_doc->Items->count());
 	if (index < 0 || indice < 0)
-		return NULL;
+		return nullptr;
 
 	int itemid = m_doc->Items->indexOf(item);
 	QRectF baseRect(item->getBoundingRect());
 	int itemLevel = m_doc->layerLevelFromID(item->LayerID);
 	if (itemLevel < 0)
-		return NULL;
+		return nullptr;
 
 	for(index = indice - 1; index >= 0; --index)
 	{
@@ -602,7 +602,7 @@
 				return item1;
 		}
 	}
-	return NULL;
+	return nullptr;
 }
 
 // __________________
@@ -1096,7 +1096,7 @@
 	painter->end();
 	psx->drawImage(clipx, clipy, img);
 	delete painter;
-	painter=NULL;
+	painter=nullptr;
 // 	qDebug( "Time elapsed: %d ms, setup=%d, outlines=%d, background=%d, contents=%d, rest=%d", tim.elapsed(), Tsetup,Toutlines -Tsetup, Tbackground-Toutlines, Tcontents-Tbackground, tim.elapsed() - Tcontents );
 }
 
@@ -1168,7 +1168,7 @@
 	if (m_doc->m_Selection->count() != 0)
 	{
 		int selectedItemCount = m_doc->m_Selection->count();
-		PageItem *currItem = NULL;
+		PageItem *currItem = nullptr;
 		if (selectedItemCount < moveWithBoxesOnlyThreshold)
 		{
 			for (int cu = 0; cu < selectedItemCount; cu++)
@@ -2181,7 +2181,7 @@
 				nextItem = m_viewMode.linkedFramesToShow.at(lks);
 				while (nextItem != 0)
 				{
-					if (nextItem->nextInChain() != NULL)
+					if (nextItem->nextInChain() != nullptr)
 					{
 						FPoint start, end;
 						calculateFrameLinkPoints(nextItem, nextItem->nextInChain(), start, end);
@@ -2202,7 +2202,7 @@
 			}
 			while (nextItem != 0)
 			{
-				if (nextItem->nextInChain() != NULL)
+				if (nextItem->nextInChain() != nullptr)
 				{
 					FPoint start, end;
 					calculateFrameLinkPoints(nextItem, nextItem->nextInChain(), start, end);
@@ -2224,7 +2224,7 @@
 void Canvas::drawLinkFrameLine(ScPainter* painter, FPoint &start, FPoint &end)
 {
 	//CB FIXME Add some checking that the painter is setup?
-	Q_ASSERT(painter!=NULL);
+	Q_ASSERT(painter!=nullptr);
 	painter->setPen(Qt::black, 1.0 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	painter->setPenOpacity(1.0);
 	painter->drawLine(start, end);

Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h	(original)
+++ trunk/Scribus/scribus/canvas.h	Wed May  2 19:59:47 2018
@@ -173,14 +173,14 @@
 	FrameHandle frameHitTest(QPointF canvasPoint, PageItem* frame) const;
 	FrameHandle frameHitTest(QPointF point, QRectF frame) const;
 	/**
-		Returns the item under the cursor or NULL if none found.
+		Returns the item under the cursor or nullptr if none found.
 	 Does *not* change the selection.
 	 If itemAbove is given, it will look for an item under itemAbove, allowing select under.
 	 The flag 'allowInGroup' controls if single items within a group or only whole groups are considered.
 	 The flag 'allowMasterItems' controls if items from a masterpage are considered.
 	 (this flag is ignored in masterpage mode, since all items are masterpage items then).
 	 */
-	PageItem* itemUnderCursor(QPoint globalPos, PageItem* itemAbove=NULL, bool allowInGroup=false, bool allowMasterItems=false) const;
+	PageItem* itemUnderCursor(QPoint globalPos, PageItem* itemAbove=nullptr, bool allowInGroup=false, bool allowMasterItems=false) const;
 	PageItem* itemInGroup(PageItem* group, QRectF mouseArea) const;
 	PageItem* itemUnderItem(PageItem* item, int& index) const;
 	

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp	Wed May  2 19:59:47 2018
@@ -38,7 +38,7 @@
 #include "undomanager.h"
 #include "util_math.h"
 
-CanvasMode_NodeEdit::CanvasMode_NodeEdit(ScribusView* view) : CanvasMode(view), m_rectangleSelect(NULL)
+CanvasMode_NodeEdit::CanvasMode_NodeEdit(ScribusView* view) : CanvasMode(view), m_rectangleSelect(nullptr)
 {
 	m_Mxp = -1;  // last mouse position
 	m_Myp = -1;
@@ -223,7 +223,7 @@
 		currItem->update();
 		m_doc->nodeEdit.finishTransaction(currItem);
 		delete m_rectangleSelect;
-		m_rectangleSelect = NULL;
+		m_rectangleSelect = nullptr;
 	}
 	else
 	{
@@ -244,7 +244,7 @@
 	{
 		m_rectangleSelect->clear();
 		delete m_rectangleSelect;
-		m_rectangleSelect = NULL;
+		m_rectangleSelect = nullptr;
 	}
 }
 
@@ -252,7 +252,7 @@
 inline bool CanvasMode_NodeEdit::GetItem(PageItem** pi)
 { 
 	*pi = m_doc->m_Selection->itemAt(0); 
-	return (*pi) != NULL; 
+	return (*pi) != nullptr;
 }
 
 
@@ -417,7 +417,7 @@
 		double xposOrig = currItem->xPos();
 		double yposOrig = currItem->yPos();
 
-		ScItemState<QPair<FPointArray, FPointArray> > *state = NULL;
+		ScItemState<QPair<FPointArray, FPointArray> > *state = nullptr;
 		state = m_doc->nodeEdit.finishTransaction1(currItem);
 		if (m_doc->nodeEdit.hasNodeSelected() && (m_doc->nodeEdit.selNode().count() == 1))
 		{
@@ -484,7 +484,7 @@
 		m_view->endGroupTransaction();
 	}
 	//Commit drag created items to undo manager.
-	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));
 	}

Modified: trunk/Scribus/scribus/gtaction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/gtaction.cpp
==============================================================================
--- trunk/Scribus/scribus/gtaction.cpp	(original)
+++ trunk/Scribus/scribus/gtaction.cpp	Wed May  2 19:59:47 2018
@@ -86,8 +86,8 @@
 	m_updateParagraphStyles = false;
 	m_overridePStyleFont = true;
 	m_undoManager = UndoManager::instance();
-	m_noteStory = NULL;
-	m_note = NULL;
+	m_noteStory = nullptr;
+	m_note = nullptr;
 }
 
 void gtAction::setProgressInfo()
@@ -148,10 +148,10 @@
 	textStr.replace(QString(0x2029),SpecialChars::PARSEP);
 	if (isNote)
 	{
-		if (m_note == NULL)
+		if (m_note == nullptr)
 		{
 			m_note = m_it->m_Doc->newNote(m_it->m_Doc->m_docNotesStylesList.at(0));
-			Q_ASSERT(m_noteStory == NULL);
+			Q_ASSERT(m_noteStory == nullptr);
 			m_noteStory = new StoryText(m_it->m_Doc);
 		}
 		if (textStr == SpecialChars::OBJECT)
@@ -166,7 +166,7 @@
 				label += " in " + m_it->firstInChain()->itemName();
 			else if (nStyle->range() == NSRframe)
 				label += " in frame" + m_it->itemName();
-			if (m_it->m_Doc->getMark(label + "_1", MARKNoteMasterType) != NULL)
+			if (m_it->m_Doc->getMark(label + "_1", MARKNoteMasterType) != nullptr)
 				getUniqueName(label,m_it->m_Doc->marksLabelsList(MARKNoteMasterType), "_"); //FIX ME here user should be warned that inserted mark`s label was changed
 			else
 				label = label + "_1";
@@ -194,7 +194,7 @@
 				is->insertItem("inItem", m_it);
 				m_undoManager->action(m_it->m_Doc, is);
 			}
-			m_note = NULL;
+			m_note = nullptr;
 			delete m_noteStory;
 		}
 		else
@@ -243,7 +243,7 @@
 	if (style->target() == "paragraph")
 	{
 		gtParagraphStyle* pstyle = dynamic_cast<gtParagraphStyle*>(style);
-		assert(pstyle != NULL);
+		assert(pstyle != nullptr);
 		paragraphStyle = applyParagraphStyle(pstyle);
 		if (m_isFirstWrite)
 			m_inPara = true;
@@ -251,7 +251,7 @@
 	else if (style->target() == "frame")
 	{
 		gtFrameStyle* fstyle = dynamic_cast<gtFrameStyle*>(style);
-		assert(fstyle != NULL);
+		assert(fstyle != nullptr);
 		applyFrameStyle(fstyle);
 	}
 
@@ -286,10 +286,10 @@
 
 	lastStyle = newStyle;
 	lastStyleStart = m_it->itemText.length();
-	StoryText* story = NULL;
+	StoryText* story = nullptr;
 	if (isNote)
 	{
-		if (m_noteStory == NULL)
+		if (m_noteStory == nullptr)
 		{
 			m_note = m_it->m_Doc->newNote(m_it->m_Doc->m_docNotesStylesList.at(0));
 			m_noteStory = new StoryText(m_it->m_Doc);
@@ -321,7 +321,7 @@
 				label += " in " + m_it->firstInChain()->itemName();
 			else if (nStyle->range() == NSRframe)
 				label += " in frame" + m_it->itemName();
-			if (m_it->m_Doc->getMark(label + "_1", MARKNoteMasterType) != NULL)
+			if (m_it->m_Doc->getMark(label + "_1", MARKNoteMasterType) != nullptr)
 				getUniqueName(label,m_it->m_Doc->marksLabelsList(MARKNoteMasterType), "_"); //FIX ME here user should be warned that inserted mark`s label was changed
 			else
 				label = label + "_1";
@@ -351,9 +351,9 @@
 			if (story->text(pos -1) == SpecialChars::PARSEP)
 				story->removeChars(pos-1, 1);
 			m_note->setSaxedText(saxedText(story));
-			m_note = NULL;
+			m_note = nullptr;
 			delete m_noteStory;
-			m_noteStory = NULL;
+			m_noteStory = nullptr;
 			return;
 		}
 		else

Modified: trunk/Scribus/scribus/loadsaveplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/loadsaveplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.cpp	(original)
+++ trunk/Scribus/scribus/loadsaveplugin.cpp	Wed May  2 19:59:47 2018
@@ -17,11 +17,11 @@
 
 LoadSavePlugin::LoadSavePlugin()
 	: ScPlugin(),
-	m_Doc(0),
-	m_View(0),
-	m_ScMW(0),
-	m_mwProgressBar(0),
-	m_AvailableFonts(0),
+	m_Doc(nullptr),
+	m_View(nullptr),
+	m_ScMW(nullptr),
+	m_mwProgressBar(nullptr),
+	m_AvailableFonts(nullptr),
 	undoManager(UndoManager::instance())
 {
 }
@@ -40,7 +40,7 @@
 {
 	QList<FileFormat>::iterator it(findFormat(id));
 	if (it == formats.end())
-		return 0;
+		return nullptr;
 	else
 		return &(*it);
 }
@@ -49,7 +49,7 @@
 {
 	QList<FileFormat>::iterator it(findFormat(id));
 	if (it == formats.end())
-		return 0;
+		return nullptr;
 	else
 		return &(*it);
 }
@@ -58,7 +58,7 @@
 {
 	QList<FileFormat>::iterator it(findFormat(ext));
 	if (it == formats.end())
-		return 0;
+		return nullptr;
 	else
 		return &(*it);
 }

Modified: trunk/Scribus/scribus/main_win32.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/main_win32.cpp
==============================================================================
--- trunk/Scribus/scribus/main_win32.cpp	(original)
+++ trunk/Scribus/scribus/main_win32.cpp	Wed May  2 19:59:47 2018
@@ -178,7 +178,7 @@
 	tmp += ";";
 	tmp += nativePath;
 	tmp += "\\python";
-	if (oldenv != NULL) {
+	if (oldenv != nullptr) {
 		tmp += ";";
 		tmp +=  QString::fromUtf16((const ushort*) oldenv);
 	}
@@ -389,7 +389,7 @@
 		if (hConHandle != -1)
 		{
 			_dup2(hConHandle, fileno(stdin));
-			setvbuf(stdin, NULL, _IONBF, 0);
+			setvbuf(stdin, nullptr, _IONBF, 0);
 			SetStdHandle(STD_INPUT_HANDLE, (HANDLE) _get_osfhandle(fileno(stdin)));
 			_close(hConHandle);
 		}
@@ -403,7 +403,7 @@
 		if (hConHandle != -1)
 		{
 			_dup2(hConHandle, fileno(stdout));
-			setvbuf(stdout, NULL, _IONBF, 0);
+			setvbuf(stdout, nullptr, _IONBF, 0);
 			SetStdHandle(STD_OUTPUT_HANDLE, (HANDLE) _get_osfhandle(fileno(stdout)));
 			_close(hConHandle);
 		}
@@ -417,7 +417,7 @@
 		if (hConHandle != -1)
 		{
 			_dup2(hConHandle, fileno(stderr));
-			setvbuf(stderr, NULL, _IONBF, 0);
+			setvbuf(stderr, nullptr, _IONBF, 0);
 			SetStdHandle(STD_ERROR_HANDLE, (HANDLE) _get_osfhandle(fileno(stderr)));
 			_close(hConHandle);
 		}

Modified: trunk/Scribus/scribus/marks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/marks.cpp
==============================================================================
--- trunk/Scribus/scribus/marks.cpp	(original)
+++ trunk/Scribus/scribus/marks.cpp	Wed May  2 19:59:47 2018
@@ -49,7 +49,7 @@
 
 bool Mark::hasItemPtr()
 {
-	return data.itemPtr != NULL;
+	return data.itemPtr != nullptr;
 }
 
 bool Mark::hasString()

Modified: trunk/Scribus/scribus/menumanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/menumanager.cpp
==============================================================================
--- trunk/Scribus/scribus/menumanager.cpp	(original)
+++ trunk/Scribus/scribus/menumanager.cpp	Wed May  2 19:59:47 2018
@@ -49,7 +49,7 @@
 	menuStringTexts.insert(menuName, menuText);
 	if (rememberMenu)
 	{
-		rememberedMenus.insert(menuName, NULL);
+		rememberedMenus.insert(menuName, nullptr);
 	}
 	return retVal;
 }
@@ -68,7 +68,7 @@
 	if (menuStringTexts.contains(menuName))
 		menuStringTexts.insert(menuName, menuText);
 	//TODO rebuild all menus
-//	if (menuList.contains(menuName) && menuList[menuName]!=NULL)
+//	if (menuList.contains(menuName) && menuList[menuName]!=nullptr)
 //	{
 //		menuList[menuName]->setText(menuText);
 //		QString parent=menuList[menuName]->getParentMenuName();
@@ -79,16 +79,16 @@
 
 QMenu *MenuManager::getLocalPopupMenu(const QString &menuName)
 {
-	if (menuBarMenus.contains(menuName) && menuBarMenus.value(menuName)!=NULL)
+	if (menuBarMenus.contains(menuName) && menuBarMenus.value(menuName)!=nullptr)
 		return menuBarMenus.value(menuName);
-	return NULL;
+	return nullptr;
 }
 
 void MenuManager::setMenuEnabled(const QString &menuName, const bool enabled)
 {
 	return;
 	// OSX UI rules don't allow this so let's not do it elsewhere.
-	//if (menuBarMenus.contains(menuName) && menuBarMenus.value(menuName)!=NULL)
+	//if (menuBarMenus.contains(menuName) && menuBarMenus.value(menuName)!=nullptr)
 	//	menuBarMenus.value(menuName)->setEnabled(enabled);
 }
 
@@ -114,7 +114,7 @@
 	if (menuStrings.contains(menuName))
 	{
 		QList<QAction*> mba=scribusMenuBar->actions();
-		QAction* beforeAct=NULL;
+		QAction* beforeAct=nullptr;
 		foreach (beforeAct, mba)
 		{
 			if (beforeMenuName==beforeAct->text().remove('&').remove("..."))
@@ -215,7 +215,7 @@
 void MenuManager::addMenuItemStringstoRememberedMenu(const QString &menuName, const QMap<QString, QPointer<ScrAction> > &menuActions)
 {
 	if (rememberedMenus.contains(menuName))
-		if (rememberedMenus.value(menuName)!=NULL)
+		if (rememberedMenus.value(menuName)!=nullptr)
 			addMenuItemStringstoMenu(menuName, rememberedMenus.value(menuName), menuActions);
 }
 
@@ -223,7 +223,7 @@
 {
 	if (rememberedMenus.contains(menuName))
 	{
-		if (rememberedMenus.value(menuName)!=NULL)
+		if (rememberedMenus.value(menuName)!=nullptr)
 		{
 			rememberedMenus.value(menuName)->clear();
 		}
@@ -235,7 +235,7 @@
 bool MenuManager::addMenuToWidgetOfAction(const QString &menuName, ScrAction *action)
 {
 	bool retVal=false;
-	/*if (menuList.contains(menuName) && menuList[menuName]!=NULL && action!=NULL)
+	/*if (menuList.contains(menuName) && menuList[menuName]!=nullptr && action!=nullptr)
 	{
 		 //qt4 cb replace with qwidgetaction or similar
 //		QWidget *w=action->getWidgetAddedTo();
@@ -245,7 +245,7 @@
 //			if (menuItemListClassName=="QToolButton")
 //			{
 //				QToolButton *toolButton=dynamic_cast<QToolButton *>(w);
-//				if (toolButton!=NULL)
+//				if (toolButton!=nullptr)
 //				{
 //					toolButton->setPopup(menuList[menuName]->getLocalPopupMenu());
 //					retVal=true;
@@ -290,7 +290,7 @@
 {
 	bool retVal=false;
 	/*
-	 if (menuList.contains(parent) && menuList[parent]!=NULL)
+	 if (menuList.contains(parent) && menuList[parent]!=nullptr)
 		retVal=menuList[parent]->removeMenuItem(menuAction);
 	*/
 	return retVal;
@@ -299,7 +299,7 @@
 void MenuManager::runMenuAtPos(const QString &menuName, const QPoint position)
 {
 	/*
-	if (menuList.contains(menuName) && menuList[menuName]!=NULL)
+	if (menuList.contains(menuName) && menuList[menuName]!=nullptr)
 	{	
 		QMenu *popupmenu=menuList[menuName]->getLocalPopupMenu();
 		if (popupmenu)

Modified: trunk/Scribus/scribus/nftsettings.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/nftsettings.cpp
==============================================================================
--- trunk/Scribus/scribus/nftsettings.cpp	(original)
+++ trunk/Scribus/scribus/nftsettings.cpp	Wed May  2 19:59:47 2018
@@ -75,7 +75,7 @@
 {
 	for (uint i = 0; i < templates.size(); ++i)
 	{
-		if (templates[i] != NULL)
+		if (templates[i] != nullptr)
 			delete templates[i];
 	}
 }

Modified: trunk/Scribus/scribus/nodeeditcontext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/nodeeditcontext.cpp
==============================================================================
--- trunk/Scribus/scribus/nodeeditcontext.cpp	(original)
+++ trunk/Scribus/scribus/nodeeditcontext.cpp	Wed May  2 19:59:47 2018
@@ -5,8 +5,8 @@
 #include "util_math.h"
 
 NodeEditContext::NodeEditContext() :
-	oldClip(NULL),
-	nodeTransaction(NULL),
+	oldClip(nullptr),
+	nodeTransaction(nullptr),
 	m_submode(MOVE_POINT),
 	m_isContourLine(false),
 	m_ClRe(-1),
@@ -43,7 +43,7 @@
 	m_SegP1 = -1;
 	m_SegP2 = -1;
 	delete oldClip;
-	oldClip = NULL;
+	oldClip = nullptr;
 	nodeTransaction.reset();
 	m_MoveSym = false;
 	m_SelNode.clear();
@@ -125,7 +125,7 @@
 {
 	ScribusDoc* Doc = currItem->doc();
 	UndoManager* undoManager = UndoManager::instance();
-	ScItemState<QPair<FPointArray, FPointArray> >* state = NULL;
+	ScItemState<QPair<FPointArray, FPointArray> >* state = nullptr;
 	
 	if (nodeTransaction) // is there the old clip stored for the undo action
 	{

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Wed May  2 19:59:47 2018
@@ -299,8 +299,8 @@
 	hatchForeground(other.hatchForeground),
 	// protected
 	undoManager(other.undoManager),
-	BackBox(NULL),  // otherwise other.BackBox->NextBox would be inconsistent
-	NextBox(NULL),  // otherwise other.NextBox->BackBox would be inconsistent
+	BackBox(nullptr),  // otherwise other.BackBox->NextBox would be inconsistent
+	NextBox(nullptr),  // otherwise other.NextBox->BackBox would be inconsistent
 	firstChar(0),   // since this box is unlinked now
 	MaxChars(0),   // since the layout is invalid now
 	m_sampleItem(false),
@@ -394,7 +394,7 @@
 		isInlineImage = false;
 		isTempFile = false;
 	}
-	Parent = NULL;
+	Parent = nullptr;
 	unWeld();
 }
 
@@ -424,7 +424,7 @@
 	m_SizeVLocked(false),
 	textFlowModeVal(TextFlowDisabled)
 {
-	Parent = NULL;
+	Parent = nullptr;
 	m_Doc = pa;
 	QString tmp;
 	BackBox = 0;
@@ -930,12 +930,12 @@
 
 bool PageItem::isGroupChild() const
 {
-	return (dynamic_cast<PageItem_Group*>(Parent) != NULL);
+	return (dynamic_cast<PageItem_Group*>(Parent) != nullptr);
 }
 
 bool PageItem::isTableCell() const
 {
-	return (dynamic_cast<PageItem_Table*>(Parent) != NULL);
+	return (dynamic_cast<PageItem_Table*>(Parent) != nullptr);
 }
 
 void PageItem::setXPos(const double newXPos, bool drawingOnly)
@@ -1212,8 +1212,8 @@
 bool PageItem::frameOverflows() const
 {
 	// Fix #6991 : "Text overflow" warning when there is a text underflow in fact
-	/*return NextBox == NULL && itemText.length() > static_cast<int>(MaxChars);*/
-	return ( NextBox == NULL )
+	/*return NextBox == nullptr && itemText.length() > static_cast<int>(MaxChars);*/
+	return ( NextBox == nullptr )
 	       && ( static_cast<int> ( firstChar ) < itemText.length() )
 		   // Fix #7766 : scribus.textOverflows() returns 0 if there is no place for the overflow mark
 	       /*&& ( firstChar < MaxChars )*/
@@ -1244,7 +1244,7 @@
 /// returns true if text is ending before that frame
 bool PageItem::frameUnderflows() const
 {
-	if (BackBox == NULL)
+	if (BackBox == nullptr)
 		return false;
 	//FIX ME - I have found that condition if frame is empty
 	//and has been linked with previous frame
@@ -1320,7 +1320,7 @@
 	bool first = false;
 	bool createUndo = addPARSEP;
 
-	if (nxt->prevInChain() == NULL)
+	if (nxt->prevInChain() == nullptr)
 		first = true;
 	int textLen = itemText.length();
 	if (nxt->itemText.length() > 0)
@@ -1416,15 +1416,15 @@
 		}
 		// link following frames to new text
 		NextBox->firstChar = 0;
-		NextBox->BackBox = NULL;
+		NextBox->BackBox = nullptr;
 		while (NextBox) {
 			NextBox->itemText = follow;
 			NextBox->invalid = true;
 			NextBox->firstChar = 0;
 			NextBox = NextBox->NextBox;
 		}
-		// NextBox == NULL now
-		NextBox = NULL;
+		// NextBox == nullptr now
+		NextBox = nullptr;
 		if (UndoManager::undoEnabled() && createUndo)
 		{
 			ScItemState<QPair<PageItem*, PageItem*> > *is = new ScItemState<QPair<PageItem*, PageItem*> >(Um::UnlinkTextFrame);
@@ -1481,8 +1481,8 @@
 		undoManager->action(this, is);
 	}
 
-	// JG we should set BackBox and NextBox to NULL at a point
-	BackBox = NextBox = NULL;
+	// JG we should set BackBox and NextBox to nullptr at a point
+	BackBox = NextBox = nullptr;
 }
 
 bool PageItem::hasLinks() const
@@ -1502,7 +1502,7 @@
 		layout();
 
 	//unlink first frame in chain
-	if (Prev == NULL)
+	if (Prev == nullptr)
 	{
 		if (Next->invalid)
 			Next->layout();
@@ -2946,7 +2946,7 @@
 		VisionDefectColor defect;
 		MQColor = defect.convertDefect(MQColor, m_Doc->previewVisual);
 	}
-	MeshPoint *mp = NULL;
+	MeshPoint *mp = nullptr;
 	if (forPatch)
 	{
 		meshGradientPatch *patch = &meshGradientPatches[x];
@@ -4642,7 +4642,7 @@
 			break;
 		default:
 			toType = "";
-			setUPixmap(NULL);
+			setUPixmap(nullptr);
 			break;
 	}
 	/*
@@ -4680,7 +4680,7 @@
 
 void PageItem::checkChanges(bool force)
 {
-	if (m_Doc->view() == NULL)
+	if (m_Doc->view() == nullptr)
 		return;
 	bool spreadChanges(false);
 	// has the item been resized
@@ -6201,7 +6201,7 @@
 		qFatal("PageItem::restoreGradientMeshColor: dynamic cast failed");
 	int x = is->getInt("X");
 	int y = is->getInt("Y");
-	MeshPoint *mp=NULL;
+	MeshPoint *mp=nullptr;
 	if (is->getBool("PATCH"))
 	{
 		meshGradientPatch *patch = &meshGradientPatches[x];
@@ -6223,8 +6223,8 @@
 	}
 	else
 		mp = &meshGradientArray[x][y];
-	if (mp == NULL)
-		qFatal("PageItem::restoreGradientMeshColor: mp is NULL");
+	if (mp == nullptr)
+		qFatal("PageItem::restoreGradientMeshColor: mp is a nullptr");
 	if (isUndo)
 	{
 		mp->colorName = is->get("OLD_COLOR_NAME");
@@ -7324,13 +7324,13 @@
 		{
 			PageItem* prev = is->getItem().first;
 			PageItem* next  = is->getItem().second;
-			if (prev != NULL)
+			if (prev != nullptr)
 			{
 				if (!cutText)
 					itemText = StoryText(m_Doc);
 				prev->link(this, false);
 			}
-			else if (next != NULL)
+			else if (next != nullptr)
 			{
 				if (!cutText)
 					this->itemText = StoryText(m_Doc);
@@ -7963,7 +7963,7 @@
 	if (it != newNames.lineStyles().end())
 		setCustomLineStyle(*it);
 
-	if (prevInChain() == NULL)
+	if (prevInChain() == nullptr)
 		itemText.replaceNamedResources(newNames);
 }
 
@@ -8759,7 +8759,7 @@
 	lists.collectPattern(pattern());
 	lists.collectPattern(strokePattern());
 	lists.collectLineStyle(customLineStyle());
-	if (prevInChain() == NULL)
+	if (prevInChain() == nullptr)
 		itemText.getNamedResources(lists);
 }
 
@@ -9288,7 +9288,7 @@
 
 bool PageItem::loadImage(const QString& filename, const bool reload, const int gsResolution, bool showMsg)
 {
-	bool useImage = (asImageFrame() != NULL);
+	bool useImage = (asImageFrame() != nullptr);
 	useImage |= (isAnnotation() && annotation().UseIcons());
 	if (!useImage)
 		return false;
@@ -9834,18 +9834,18 @@
 
 PageItem* PageItem::firstInChain()
 {
-	Q_ASSERT(this != NULL);
+	//huh? Q_ASSERT(this != nullptr);
 	PageItem* first = this;
-	while (first->prevInChain() != NULL)
+	while (first->prevInChain() != nullptr)
 		first = first->prevInChain();
 	return first;
 }
 
 PageItem* PageItem::lastInChain()
 {
-	Q_ASSERT(this != NULL);
+	//huh? Q_ASSERT(this != nullptr);
 	PageItem* last = this;
-	while (last->nextInChain() != NULL)
+	while (last->nextInChain() != nullptr)
 		last = last->nextInChain();
 	return last;
 }
@@ -10694,7 +10694,7 @@
 	{
 		WeldingInfo wInf = weldList.at(i);
 		PageItem *item = wInf.weldItem;
-		if (item == NULL)
+		if (item == nullptr)
 		{
 			qDebug() << "unWeld - null pointer in weldList";
 			continue;

Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp	Wed May  2 19:59:47 2018
@@ -17,7 +17,7 @@
     : PageItem_TextFrame(doc, x, y, w, h, w2, fill, outline)
 {
 	m_nstyle = nStyle;
-	m_masterFrame = NULL;
+	m_masterFrame = nullptr;
 	itemText.clear();
 
 	AnName = generateUniqueCopyName(nStyle->isEndNotes() ? tr("Endnote frame ") + m_nstyle->name() : tr("Footnote frame ") + m_nstyle->name(), false);
@@ -64,8 +64,8 @@
 PageItem_NoteFrame::PageItem_NoteFrame(ScribusDoc *doc, double x, double y, double w, double h, double w2, QString fill, QString outline)
     : PageItem_TextFrame(doc, x, y, w, h, w2, fill, outline)
 {
-	m_nstyle = NULL;
-	m_masterFrame = NULL;
+	m_nstyle = nullptr;
+	m_masterFrame = nullptr;
 	textFlowModeVal = TextFlowUsesFrameShape;
 	deleteIt = false;
 }
@@ -110,7 +110,7 @@
 	textFlowModeVal = TextFlowUsesFrameShape;
 	setColumns(1);
 
-	if (m_nstyle->isAutoWeldNotesFrames() && (m_masterFrame != NULL))
+	if (m_nstyle->isAutoWeldNotesFrames() && (m_masterFrame != nullptr))
 	{
 		addWelded(m_masterFrame);
 		m_masterFrame->addWelded(this);
@@ -135,7 +135,7 @@
 void PageItem_NoteFrame::setNS(NotesStyle *nStyle, PageItem_TextFrame* master)
 {
 	m_nstyle = nStyle;
-	if (master != NULL)
+	if (master != nullptr)
 		m_masterFrame = master;
 	itemText.clear();
 
@@ -146,12 +146,12 @@
 	ParagraphStyle newStyle;
 	if (nStyle->notesParStyle().isEmpty() || (nStyle->notesParStyle() == tr("No Style")))
 	{
-		if (nStyle->isEndNotes() || (m_masterFrame == NULL))
+		if (nStyle->isEndNotes() || (m_masterFrame == nullptr))
 		{
 			//set default doc style
 			newStyle.setParent(m_Doc->paragraphStyles()[0].name());
 		}
-		else if (master != NULL)
+		else if (master != nullptr)
 		{
 			newStyle.setParent(m_masterFrame->itemText.defaultStyle().parent());
 			newStyle.applyStyle(m_masterFrame->currentStyle());
@@ -185,7 +185,7 @@
 		return;
 	if (itemText.length() == 0)
 		return;
-	if ((masterFrame() != NULL) && masterFrame()->invalid)
+	if ((masterFrame() != nullptr) && masterFrame()->invalid)
 		return;
 
 	//while layouting notes frames undo should be disabled
@@ -227,7 +227,7 @@
 	}
 	if (oldH != height())
 	{
-		if (masterFrame() != NULL)
+		if (masterFrame() != nullptr)
 		{
 			foreach(PageItem_NoteFrame* nF, masterFrame()->notesFramesList())
 				nF->invalid = true;
@@ -241,7 +241,7 @@
 void PageItem_NoteFrame::insertNote(TextNote *note)
 {
 	Mark* mrk = note->noteMark();
-	if (mrk == NULL)
+	if (mrk == nullptr)
 	{
 		mrk = m_Doc->newMark();
 		mrk->setType(MARKNoteFrameType);
@@ -321,8 +321,8 @@
 	int oldSelLen = itemText.lengthOfSelection();
 	int pos = 0;
 	int startPos = 0;
-	TextNote *note = NULL;
-	Mark* prevMrk = NULL;
+	TextNote *note = nullptr;
+	Mark* prevMrk = nullptr;
 	while (pos < itemText.length())
 	{
 		if (itemText.hasMark(pos))
@@ -330,10 +330,10 @@
 			Mark* mark = itemText.mark(pos);
 			if  (mark->isType(MARKNoteFrameType))
 			{
-				if (prevMrk != NULL)
+				if (prevMrk != nullptr)
 				{
 					note = prevMrk->getNotePtr();
-					if (note != NULL)
+					if (note != nullptr)
 					{
 						int offset = 0;
 						if (itemText.text(pos-1) == SpecialChars::PARSEP)
@@ -353,10 +353,10 @@
 		}
 		++pos;
 	}
-	if (prevMrk != NULL)
+	if (prevMrk != nullptr)
 	{
 		note = prevMrk->getNotePtr();
-		Q_ASSERT(note != NULL);
+		Q_ASSERT(note != nullptr);
 		if (startPos != pos)
 		{
 			note->setSaxedText(getItemTextSaxed(startPos, pos - startPos));

Modified: trunk/Scribus/scribus/pageitem_osgframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/pageitem_osgframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_osgframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_osgframe.cpp	Wed May  2 19:59:47 2018
@@ -62,7 +62,7 @@
 	defaultView.colorFC = QColor(Qt::white);
 	viewMap.insert( tr("Default"), defaultView);
 	currentView = tr("Default");
-	loadedModel = NULL;
+	loadedModel = nullptr;
 	distanceToObj = 0.0;
 	modelFile = "";
 }
@@ -139,7 +139,7 @@
 	defaultView.colorFC = QColor(Qt::white);
 	viewMap.insert( tr("Default"), defaultView);
 	currentView = tr("Default");
-	loadedModel = NULL;
+	loadedModel = nullptr;
 	distanceToObj = 0.0;
 	modelFile = "";
 	PageItem_ImageFrame::clearContents();

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Wed May  2 19:59:47 2018
@@ -1309,9 +1309,9 @@
 {
 //	qDebug()<<"==Layout==" << itemName() ;
 // 	printBacktrace(24);
-	if (BackBox != NULL) {
+	if (BackBox != nullptr) {
 //		qDebug("textframe: len=%d, going back", itemText.length());
-		PageItem_TextFrame* firstInvalid = NULL;
+		PageItem_TextFrame* firstInvalid = nullptr;
 		PageItem_TextFrame* prevInChain  = dynamic_cast<PageItem_TextFrame*>(BackBox);
 		while (prevInChain)
 		{
@@ -1333,7 +1333,7 @@
 //		qDebug() << QString("textframe: len=%1, invalid=%2 OnMasterPage=%3: no relayout").arg(itemText.length()).arg(invalid).arg(OnMasterPage);
 		return;
 	}
-	if (invalid && BackBox == NULL)
+	if (invalid && BackBox == nullptr)
 		firstChar = 0;
 
 //	qDebug() << QString("textframe(%1,%2): len=%3, start relayout at %4").arg(m_xPos).arg(m_yPos).arg(itemText.length()).arg(firstInFrame());
@@ -1396,7 +1396,7 @@
 	if (itLen == 0 || firstInFrame() == itLen)
 	{
 		PageItem_TextFrame * next = this;
-		while (next != NULL)
+		while (next != nullptr)
 		{
 			next->invalid = false;
 			next->firstChar = itLen;
@@ -3014,7 +3014,7 @@
 		}
 		UndoManager::instance()->setUndoEnabled(true);
 	}
-	if (NextBox != NULL)
+	if (NextBox != nullptr)
 	{
 		PageItem_TextFrame * nextFrame = dynamic_cast<PageItem_TextFrame*>(NextBox);
 		while (nextFrame)
@@ -3068,7 +3068,7 @@
 	}
 
 	PageItem_TextFrame * next = dynamic_cast<PageItem_TextFrame*>(NextBox);
-	if (next != NULL)
+	if (next != nullptr)
 	{
 		if (itemText.cursorPosition() > signed(MaxChars))
 		{
@@ -3135,11 +3135,11 @@
 {
 	if (invalid)
 		return false;
-	if (BackBox == NULL)
+	if (BackBox == nullptr)
 		return !invalid;
 
 	PageItem* prev = prevInChain();
-	while (prev != NULL)
+	while (prev != nullptr)
 	{
 		if (prev->invalid)
 			return false;
@@ -3857,7 +3857,7 @@
 
 void PageItem_TextFrame::truncateContents()
 {
-	if ((this->nextInChain() == NULL) && frameOverflows())
+	if ((this->nextInChain() == nullptr) && frameOverflows())
 	{
 		ParagraphStyle defaultStyle = this->itemText.defaultStyle();
 		int pos = itemText.cursorPosition();
@@ -4607,9 +4607,9 @@
 		int lastPos = start;
 		CharStyle lastParent = itemText.charStyle(start);
 		UndoState* state = undoManager->getLastUndo();
-		ScItemState<ParagraphStyle> *ip = NULL;
-		ScItemState<CharStyle> *is = NULL;
-		TransactionState *ts = NULL;
+		ScItemState<ParagraphStyle> *ip = nullptr;
+		ScItemState<CharStyle> *is = nullptr;
+		TransactionState *ts = nullptr;
 		bool added = false;
 		bool lastIsDelete = false;
 		while (state && state->isTransaction()) {
@@ -4644,7 +4644,7 @@
 		//delete text
 		for (int i=start; i <= stop; ++i)
 		{
-			Mark* mark = i < itemText.length() && itemText.hasMark(i) ? itemText.mark(i) : NULL;
+			Mark* mark = i < itemText.length() && itemText.hasMark(i) ? itemText.mark(i) : nullptr;
 			const CharStyle& curParent = itemText.charStyle(i);
 			bool needParaAction = ((i < stop) && (itemText.text(i) == SpecialChars::PARSEP));
 			if (i==stop || !curParent.equiv(lastParent) || (mark && mark->isType(MARKNoteFrameType)) || needParaAction)
@@ -4675,7 +4675,7 @@
 				if (!added)
 				{
 					UndoObject * undoTarget = this;
-					is = NULL;
+					is = nullptr;
 					if (i - lastPos > 0)
 					{
 						is = new ScItemState<CharStyle>(Um::DeleteText, "", Um::IDelete);
@@ -4695,7 +4695,7 @@
 						for (int ii = notes2DEL.count() -1; ii >= 0; --ii)
 						{
 							TextNote* note = notes2DEL.at(ii).first;
-							Q_ASSERT(note != NULL);
+							Q_ASSERT(note != nullptr);
 							if (note->textLen > 0)
 							{
 								itemText.deselectAll();
@@ -4707,7 +4707,7 @@
 						for (int ii = notes2DEL.count() -1; ii >= 0; --ii)
 						{
 							TextNote* note = notes2DEL.at(ii).first;
-							Q_ASSERT(note != NULL);
+							Q_ASSERT(note != nullptr);
 							m_Doc->setUndoDelNote(note);
 							if (note->isEndNote())
 								m_Doc->flag_updateEndNotes = true;
@@ -4717,7 +4717,7 @@
 						{
 							if (!ts || !lastIsDelete) {
 								undoManager->action(undoTarget, is);
-								ts = NULL;
+								ts = nullptr;
 							}
 							else
 								ts->pushBack(undoTarget, is);
@@ -4728,7 +4728,7 @@
 					{
 						if (!ts || !lastIsDelete) {
 							undoManager->action(undoTarget, is);
-							ts = NULL;
+							ts = nullptr;
 						}
 						else
 							ts->pushBack(undoTarget, is);
@@ -4751,15 +4751,15 @@
 				if (lastPos < itemText.length())
 					lastParent = itemText.charStyle(lastPos);
 				QString etea;
-				SimpleState* ss = ts ? dynamic_cast<SimpleState*>(ts->last()) : NULL;
+				SimpleState* ss = ts ? dynamic_cast<SimpleState*>(ts->last()) : nullptr;
 				if (ss)
 					etea = ss->get("ETEA");
 				if (ts && ((etea == "delete_frametext") || (etea == "delete_framepara")))
 					ts->pushBack(undoTarget, ip);
 				else
 					undoManager->action(undoTarget, ip);
-				is = NULL;
-				ts = NULL;
+				is = nullptr;
+				ts = nullptr;
 			}
 		}
 		if (trans)
@@ -4814,7 +4814,7 @@
 	for (int index = 0; index < itemText.length(); ++index)
 	{
 		Mark* mark = itemText.mark(index);
-		if ((mark != NULL) && (itemText.hasMark(index)))
+		if ((mark != nullptr) && (itemText.hasMark(index)))
 		{
 			mark->OwnPage = this->OwnPage;
 			//itemPtr and itemName set to this frame only if mark type is different than MARK2ItemType
@@ -4832,11 +4832,11 @@
 			if (mark->isNoteType())
 			{
 				TextNote* note = mark->getNotePtr();
-				if (note == NULL)
+				if (note == nullptr)
 					continue;
 				mark->setItemPtr(this);
 				NotesStyle* nStyle = note->notesStyle();
-				Q_ASSERT(nStyle != NULL);
+				Q_ASSERT(nStyle != nullptr);
 				QString chsName = nStyle->marksChStyle();
 				CharStyle currStyle(itemText.charStyle(index));
 				if (!chsName.isEmpty())
@@ -4880,7 +4880,7 @@
 			if (style.hasBullet() || style.hasNum())
 			{
 				bullet = true;
-				if (mark == NULL || !mark->isType(MARKBullNumType))
+				if (mark == nullptr || !mark->isType(MARKBullNumType))
 				{
 					itemText.insertMark(new BulNumMark(), index);
 					index--;
@@ -5166,7 +5166,7 @@
 	if (textLayout.lines() != 0)
 	{
 		actionList << "editClearContents";
-		if ((this->nextInChain() == NULL) && frameOverflows())
+		if ((this->nextInChain() == nullptr) && frameOverflows())
 			actionList << "editTruncateContents";
 		actionList << "itemAdjustFrameHeightToText";
 	}
@@ -5521,7 +5521,7 @@
 	if (isNoteFrame())
 		return (asNoteFrame()->notesStyle() == NS);
 
-	if (NS == NULL)
+	if (NS == nullptr)
 	{
 		//find any mark
 		if (!m_notesFramesMap.isEmpty())
@@ -5537,7 +5537,7 @@
 			if (itemText.hasMark(pos))
 			{
 				TextNote* note = itemText.mark(pos)->getNotePtr();
-				if (note != NULL && (note->notesStyle() == NS))
+				if (note != nullptr && (note->notesStyle() == NS))
 					return true;
 			}
 		}
@@ -5551,7 +5551,7 @@
 		return false;
 	if (m_notesFramesMap.isEmpty())
 		return false;
-	if (NS == NULL)
+	if (NS == nullptr)
 	{ //check if any notes are in frame or whole chain
 		if (!inChain)
 			return !m_notesFramesMap.isEmpty();
@@ -5559,9 +5559,9 @@
 		{
 			PageItem* item = this;
 			item = firstInChain();
-			while (item != NULL)
-			{
-				if (item->asTextFrame()->hasNoteFrame(NULL, false))
+			while (item != nullptr)
+			{
+				if (item->asTextFrame()->hasNoteFrame(nullptr, false))
 					return true;
 				item = item->nextInChain();
 			}
@@ -5571,7 +5571,7 @@
 	PageItem* item = this;
 	if (inChain)
 		item = firstInChain();
-	while (item != NULL)
+	while (item != nullptr)
 	{
 		NotesInFrameMap::iterator it = m_notesFramesMap.begin();
 		NotesInFrameMap::iterator end = m_notesFramesMap.end();
@@ -5635,7 +5635,7 @@
 				start = itemText.cursorPosition();
 				stop = start + 1;
 				if (stop > itemText.length())
-					return NULL;
+					return nullptr;
 			}
 			else
 			{
@@ -5643,7 +5643,7 @@
 				start = firstInFrame();
 				stop = lastInFrame();
 				if (start == stop)
-					return NULL;
+					return nullptr;
 			}
 		}
 
@@ -5663,7 +5663,7 @@
 			return mark;
 		}
 	}
-	return NULL;
+	return nullptr;
 }
 
 TextNote* PageItem_TextFrame::selectedNoteMark(int &foundPos, bool onlySelection)
@@ -5679,7 +5679,7 @@
 			stop = start + itemText.lengthOfSelection();
 		}
 		else
-			return NULL;
+			return nullptr;
 	}
 	MarkType typ = isNoteFrame()? MARKNoteFrameType : MARKNoteMasterType;
 	for (int pos = start; pos < stop; ++pos)
@@ -5690,7 +5690,7 @@
 			return itemText.mark(pos)->getNotePtr();
 		}
 	}
-	return NULL;
+	return nullptr;
 }
 
 TextNote* PageItem_TextFrame::selectedNoteMark(bool onlySelection)
@@ -5714,8 +5714,8 @@
 			mark->setItemName(itemName());
 
 			TextNote* note = mark->getNotePtr();
-			Q_ASSERT(note != NULL);
-			if (note == NULL)
+			Q_ASSERT(note != nullptr);
+			if (note == nullptr)
 			{
 				qWarning() << "note mark without valid note pointer";
 				note = m_Doc->newNote(m_Doc->m_docNotesStylesList.at(0));
@@ -5723,12 +5723,12 @@
 				mark->setNotePtr(note);
 			}
 			NotesStyle* NS = note->notesStyle();
-			PageItem_NoteFrame* nF = NULL;
+			PageItem_NoteFrame* nF = nullptr;
 			if (NS->isEndNotes())
 				nF = m_Doc->endNoteFrame(NS, this);
 			else
 				nF = itemNoteFrame(NS);
-			if (nF == NULL)
+			if (nF == nullptr)
 			{
 				//creating new noteframe
 				if (NS->isEndNotes())
@@ -5744,7 +5744,7 @@
 					switch (NS->range())
 					{ //insert pointer to endnoteframe into m_Doc->m_endNotesFramesMap
 						case NSRdocument:
-							m_Doc->setEndNoteFrame(nF, (void*) NULL);
+							m_Doc->setEndNoteFrame(nF, (void*) nullptr);
 							break;
 						case NSRsection:
 							m_Doc->setEndNoteFrame(nF, m_Doc->getSectionKeyForPageIndex(OwnPage));
@@ -5885,7 +5885,7 @@
 {
 	for (PageItem_NoteFrame* nF : m_notesFramesMap.keys())
 	{
-		if (nF == NULL)
+		if (nF == nullptr)
 			continue;
 		if (nF->deleteIt)
 			continue;
@@ -5902,7 +5902,7 @@
 	if (!isNoteFrame())
 	{
 		TextNote* note = selectedNoteMark(true);
-		while (note != NULL)
+		while (note != nullptr)
 		{
 			if (doUndo && UndoManager::undoEnabled())
 				m_Doc->setUndoDelNote(note);
@@ -5915,7 +5915,7 @@
 	}
 
 	Mark* mrk = selectedMark(true);
-	while (mrk != NULL)
+	while (mrk != nullptr)
 	{
 		if (!mrk->isType(MARKBullNumType))
 		{
@@ -5940,7 +5940,7 @@
 	for (PageItem_NoteFrame* nF : m_notesFramesMap.keys())
 		if (nF->notesStyle() == nStyle)
 			return nF;
-	return NULL;
+	return nullptr;
 }
 
 void PageItem_TextFrame::setNoteFrame(PageItem_NoteFrame *nF)

Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	Wed May  2 19:59:47 2018
@@ -182,7 +182,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() : "";
@@ -215,7 +215,7 @@
 	if( fileName.isEmpty() )
 		return QImage();
 	UndoManager::instance()->setUndoEnabled(false);
-	m_Doc = NULL;
+	m_Doc = nullptr;
 	OODPlug *dia = new OODPlug(m_Doc);
 	Q_CHECK_PTR(dia);
 	QImage ret = dia->readThumbnail(fileName);
@@ -295,17 +295,17 @@
 	m_styleStack.setMode( mode );
 	QDomElement dp = drawPage.toElement();
 	QDomElement *master = m_styles[dp.attribute( "draw:master-page-name" )];
-	QDomElement *style = NULL;
+	QDomElement *style = nullptr;
 	QDomElement properties;
 	if (isOODraw2)
 	{
-		style = m_styles.value(master->attribute( "style:page-layout-name" ), NULL);
+		style = m_styles.value(master->attribute( "style:page-layout-name" ), nullptr);
 		if (style)
 			properties = style->namedItem("style:page-layout-properties" ).toElement();
 	}
 	else
 	{
-		style = m_styles.value(master->attribute( "style:page-master-name" ), NULL);
+		style = m_styles.value(master->attribute( "style:page-master-name" ), nullptr);
 		if (style)
 			properties = style->namedItem( "style:properties" ).toElement();
 	}
@@ -430,17 +430,17 @@
 	m_styleStack.setMode( mode );
 	QDomElement dp = drawPage.toElement();
 	QDomElement *master = m_styles[dp.attribute( "draw:master-page-name" )];
-	QDomElement *style = NULL;
+	QDomElement *style = nullptr;
 	QDomElement properties;
 	if (isOODraw2)
 	{
-		style = m_styles.value(master->attribute( "style:page-layout-name" ), NULL);
+		style = m_styles.value(master->attribute( "style:page-layout-name" ), nullptr);
 		if (style)
 			properties = style->namedItem("style:page-layout-properties" ).toElement();
 	}
 	else
 	{
-		style = m_styles.value(master->attribute( "style:page-master-name" ), NULL);
+		style = m_styles.value(master->attribute( "style:page-master-name" ), nullptr);
 		if (style)
 			properties = style->namedItem( "style:properties" ).toElement();
 	}
@@ -1309,13 +1309,13 @@
 void OODPlug::fillStyleStack( const QDomElement& object )
 {
 	if( object.hasAttribute( "presentation:style-name" ) )
-		addStyles( m_styles.value(object.attribute( "presentation:style-name" ), NULL) );
+		addStyles( m_styles.value(object.attribute( "presentation:style-name" ), nullptr) );
 	if( object.hasAttribute( "draw:style-name" ) )
-		addStyles( m_styles.value(object.attribute( "draw:style-name" ), NULL) );
+		addStyles( m_styles.value(object.attribute( "draw:style-name" ), nullptr) );
 	if( object.hasAttribute( "draw:text-style-name" ) )
-		addStyles( m_styles.value(object.attribute( "draw:text-style-name" ), NULL) );
+		addStyles( m_styles.value(object.attribute( "draw:text-style-name" ), nullptr) );
 	if( object.hasAttribute( "text:style-name" ) )
-		addStyles( m_styles.value(object.attribute( "text:style-name" ), NULL) );
+		addStyles( m_styles.value(object.attribute( "text:style-name" ), nullptr) );
 }
 
 void OODPlug::addStyles( const QDomElement* style )
@@ -1323,7 +1323,7 @@
 	if (style)
 	{
 		if( style->hasAttribute( "style:parent-style-name" ) )
-			addStyles( m_styles.value(style->attribute( "style:parent-style-name" ), NULL) );
+			addStyles( m_styles.value(style->attribute( "style:parent-style-name" ), nullptr) );
 		m_styleStack.push( *style );
 	}
 }

Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.h	(original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.h	Wed May  2 19:59:47 2018
@@ -244,7 +244,7 @@
 	PageItem* finishNode( const QDomNode &e, PageItem* item);
 	bool isIgnorableNode( const QDomElement &e );
 	bool isIgnorableNodeName( const QString &n );
-	FPoint parseTextPosition(const QDomElement &e, const FPoint* pos = NULL);
+	FPoint parseTextPosition(const QDomElement &e, const FPoint* pos = nullptr);
 	QSizeF  parseWidthHeight(const QDomElement &e);
 	QRectF  parseViewBox(const QDomElement &e);
 	void parseDefs(const QDomElement &e);

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp	Wed May  2 19:59:47 2018
@@ -151,7 +151,7 @@
 	m_IsPlaceable  = false;
 	m_IsEnhanced   = false;
 	m_Valid        = false;
-	m_ObjHandleTab = NULL;
+	m_ObjHandleTab = nullptr;
 	m_Dpi          = 1440;
 }
 
@@ -199,7 +199,7 @@
 
 QTextCodec* WMFImport::codecFromCharset( int charset )
 {
-	QTextCodec* codec = NULL;
+	QTextCodec* codec = nullptr;
 	if (charset == DEFAULT_CHARSET || charset == OEM_CHARSET)
 		codec = QTextCodec::codecForLocale();
 	else if (charset == ANSI_CHARSET)
@@ -600,11 +600,11 @@
 			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();
 	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));
@@ -653,7 +653,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);
 			}
 			importCanceled = false;
@@ -691,7 +691,7 @@
 		m_Doc->setLoading(false);
 		m_Doc->changed();
 		m_Doc->reformPages();
-		if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+		if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
 			m_Doc->view()->updatesOn(true);
 		m_Doc->setLoading(loadF);
 	}
@@ -711,7 +711,7 @@
 	if ( m_ObjHandleTab ) delete[] m_ObjHandleTab;
 	m_ObjHandleTab = new WmfObjHandle* [ MAX_OBJHANDLE ];
 	for ( i = MAX_OBJHANDLE-1; i >= 0; i-- )
-		m_ObjHandleTab[ i ] = NULL;
+		m_ObjHandleTab[ i ] = nullptr;
 
 	if ( WMFIMPORT_DEBUG )  {
 		cerr << "Bounding box : " << m_BBox.left() << " " << m_BBox.top() << " " << m_BBox.right() << " " << m_BBox.bottom() << endl;
@@ -731,7 +731,7 @@
 
 		if ( WMFIMPORT_DEBUG )  {
 			QString str = "", param;
-			if ( metaFuncTab[ idx ].name == NULL ) {
+			if ( metaFuncTab[ idx ].name == nullptr ) {
 				str += "UNKNOWN ";
 			}
 			if ( metaFuncTab[ idx ].method == &WMFImport::noop ) {
@@ -1410,7 +1410,7 @@
 	int idx;
 
 	for ( idx =0; idx < MAX_OBJHANDLE ; idx++ )
-		if ( m_ObjHandleTab[ idx ] == NULL )  break;
+		if ( m_ObjHandleTab[ idx ] == nullptr )  break;
 
 	if ( idx < MAX_OBJHANDLE )
 		m_ObjHandleTab[ idx ] = handle;
@@ -1423,7 +1423,7 @@
 	if ( idx >= 0 && idx < MAX_OBJHANDLE && m_ObjHandleTab[ idx ] )
 	{
 		delete m_ObjHandleTab[ idx ];
-		m_ObjHandleTab[ idx ] = NULL;
+		m_ObjHandleTab[ idx ] = nullptr;
 	}
 }
 

Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp	(original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp	Wed May  2 19:59:47 2018
@@ -225,7 +225,7 @@
 			//<<#9046
 			FPointArray oldPOLine=currItem->PoLine;
 			FPointArray oldContourLine=currItem->ContourLine;
-			ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >* state = NULL;
+			ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >* state = nullptr;
 			if (UndoManager::undoEnabled())
 			{
 				state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
@@ -276,7 +276,7 @@
 				//<<#9046
 				FPointArray oldPOLine=Item1->PoLine;
 				FPointArray oldContourLine=Item1->ContourLine;
-				ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >* state = NULL;
+				ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >* state = nullptr;
 				if (UndoManager::undoEnabled())
 				{
 					state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);
@@ -317,7 +317,7 @@
 				//<<#9046
 				FPointArray oldPOLine=Item2->PoLine;
 				FPointArray oldContourLine=Item2->ContourLine;
-				ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >* state = NULL;
+				ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >* state = nullptr;
 				if (UndoManager::undoEnabled())
 				{
 					state = new ScItemState<QPair<QPair<FPointArray, FPointArray>, QPair<FPointArray, FPointArray> > >(Um::PathOperation);

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Wed May  2 19:59:47 2018
@@ -337,7 +337,7 @@
 	m_doc->setPage(100, 100, 0, 0, 0, 0, 0, 0, false, false);
 	m_doc->addPage(0);
 	m_doc->setGUI(false, this, 0);
-	CurrStED = NULL;
+	CurrStED = nullptr;
 	QString scribusTitle(tr("Scribus") + " " + QString(VERSION));
 #if defined(HAVE_SVNVERSION) && defined(SVNVERSION)
 	if (QString(VERSION).contains("svn", Qt::CaseInsensitive))
@@ -536,8 +536,8 @@
 void ScribusMainWindow::initDefaultValues()
 {
 	HaveDoc = false;
-	view = NULL;
-	doc = NULL;
+	view = nullptr;
+	doc = nullptr;
 	m_DocNr = 1;
 	m_PrinterUsed = false;
 	PDef.Pname = "";
@@ -588,7 +588,7 @@
 {
 	for( QMap<QString, QPointer<ScrAction> >::Iterator it = scrActions.begin(); it!=scrActions.end(); ++it )
 	{
-		if ((ScrAction*)(it.value())!=NULL)
+		if ((ScrAction*)(it.value())!=nullptr)
 		{
 			QString accelerator = it.value()->shortcut().toString();
 			m_prefsManager->setKeyEntry(it.key(), it.value()->cleanMenuText(), accelerator,0);
@@ -1498,7 +1498,7 @@
 		{
 			Mark* mark = item->itemText.mark(item->itemText.cursorPosition());
 			scrActions["editMark"]->setEnabled(true);
-			if ((mark->isType(MARKNoteMasterType) || mark->isType(MARKNoteFrameType)) && (mark->getNotePtr() != NULL))
+			if ((mark->isType(MARKNoteMasterType) || mark->isType(MARKNoteFrameType)) && (mark->getNotePtr() != nullptr))
 				nsEditor->setNotesStyle(mark->getNotePtr()->notesStyle());
 		}
 		else
@@ -1522,7 +1522,7 @@
 			currItem = selItem->asTable()->activeCell().textFrame();
 		else
 			currItem = selItem->asTextFrame();
-		if (currItem!=NULL)
+		if (currItem!=nullptr)
 		{
 			if (unicodevalue!=-1)
 			{
@@ -1653,7 +1653,7 @@
 void ScribusMainWindow::keyPressEvent(QKeyEvent *k)
 {
 	QList<QMdiSubWindow *> windows;
-	QMdiSubWindow* w = NULL;
+	QMdiSubWindow* w = nullptr;
 	int kk = k->key();
 	if (HaveDoc)
 	{
@@ -1727,7 +1727,7 @@
 		doc->leaveDrag = false;
 		view->stopAllDrags();
 		doc->SubMode = -1;
-		doc->ElemToLink = NULL;
+		doc->ElemToLink = nullptr;
 		slotSelect();
 		if (doc->m_Selection->isEmpty())
 			HaveNewSel();
@@ -1742,7 +1742,7 @@
 		//Show our context menu
 		if (actionManager->compareKeySeqToShortcut(kk, buttonModifiers, "viewShowContextMenu"))
 		{
-			ContextMenu* cmen=NULL;
+			ContextMenu* cmen=nullptr;
 			if (doc->m_Selection->isEmpty())
 			{
 				//CB We should be able to get this calculated by the canvas.... it is already in m_canvas->globalToCanvas(m->globalPos());
@@ -1935,7 +1935,7 @@
 	//Do not quit if Preferences or new doc window is open
 	PreferencesDialog *prefsDialog = findChild<PreferencesDialog *>(QString::fromLocal8Bit("PreferencesDialog"));
 	NewDoc *newDocWin = findChild<NewDoc *>(QString::fromLocal8Bit("NewDocumentWindow"));
-	if (prefsDialog!=NULL || newDocWin!=NULL)
+	if (prefsDialog!=nullptr || newDocWin!=nullptr)
 	{
 		ce->ignore();
 		return;
@@ -1981,7 +1981,7 @@
 		{
 			currentTab.activeTab = bar->currentIndex();
 			QObject *obj = (QObject*)bar->tabData(ii).toULongLong();
-			if (obj != NULL)
+			if (obj != nullptr)
 				currentTab.palettes.append(obj->objectName());
 		}
 		if (!currentTab.palettes.isEmpty())
@@ -2321,7 +2321,7 @@
 		qwsp = mdiArea;
 	ScribusWin* w = new ScribusWin(qwsp, tempDoc);
 	w->setMainWindow(this);
-	if (requiresGUI && view!=NULL)
+	if (requiresGUI && view!=nullptr)
 	{
 		actionManager->disconnectNewViewActions();
 		disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
@@ -2370,7 +2370,7 @@
 			w->show();
 		tempView->show();
 		// Seems to fix crash on loading
-		ActWin = NULL;
+		ActWin = nullptr;
 		newActWin(w->getSubWin());
 	}
 	if (requiresGUI)
@@ -2496,13 +2496,13 @@
 
 void ScribusMainWindow::newActWin(QMdiSubWindow *w)
 {
-	if (w == NULL)
+	if (w == nullptr)
 	{
 		if (mdiArea->subWindowList().count() == 0)
-			ActWin = NULL;
-		return;
-	}
-	if (w->widget() == NULL)
+			ActWin = nullptr;
+		return;
+	}
+	if (w->widget() == nullptr)
 		return;
 	ScribusWin* scw = dynamic_cast<ScribusWin *>(w->widget());
 	if (!scw)
@@ -2515,9 +2515,9 @@
 	if (scw == ActWin)
 		return;
 	ActWin = scw;
-	if (ActWin->doc() == NULL)
-		return;
-	if (doc != NULL)
+	if (ActWin->doc() == nullptr)
+		return;
+	if (doc != nullptr)
 	{
 		if (doc->appMode == modeEditClip)
 			view->requestMode(submodeEndNodeEdit);
@@ -2525,7 +2525,7 @@
 			outlinePalette->buildReopenVals();
 	}
 	docCheckerPalette->clearErrorList();
-	if (HaveDoc && (doc != NULL) && doc->hasGUI())
+	if (HaveDoc && (doc != nullptr) && doc->hasGUI())
 	{
 		disconnect(m_undoManager, SIGNAL(undoRedoBegin()), doc, SLOT(undoRedoBegin()));
 		disconnect(m_undoManager, SIGNAL(undoRedoDone()) , doc, SLOT(undoRedoDone()));
@@ -2545,7 +2545,7 @@
 	}
 	doc = ActWin->doc();
 	m_undoManager->switchStack(doc->DocName);
-	if ((doc != NULL) && doc->hasGUI())
+	if ((doc != nullptr) && doc->hasGUI())
 	{
 		connect(m_undoManager, SIGNAL(undoRedoBegin()), doc, SLOT(undoRedoBegin()));
 		connect(m_undoManager, SIGNAL(undoRedoDone()) , doc, SLOT(undoRedoDone()));
@@ -2576,7 +2576,7 @@
 		connect(pageSelector, SIGNAL(GotoPage(int)), this, SLOT(setCurrentPage(int)));
 		pageSelector->setEnabled(true);
 	}
-	if (view!=NULL)
+	if (view!=nullptr)
 	{
 		actionManager->disconnectNewViewActions();
 		disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
@@ -2768,17 +2768,17 @@
 
 void ScribusMainWindow::HaveNewSel()
 {
-	if (doc == NULL)
+	if (doc == nullptr)
 		return;
 	int SelectedType = -1;
-	PageItem *currItem = NULL;
+	PageItem *currItem = nullptr;
 	const int docSelectionCount = doc->m_Selection->count();
 	if (docSelectionCount > 0)
 	{
 		currItem = doc->m_Selection->itemAt(0);
 		SelectedType = currItem->itemType();
 	}
-	assert (docSelectionCount == 0 || currItem != NULL); // help coverity analysis
+	assert (docSelectionCount == 0 || currItem != nullptr); // help coverity analysis
 
 	setStatusBarTextSelectedItemInfo();
 
@@ -2793,7 +2793,7 @@
 	switch (SelectedType)
 	{
 	case -1: // None
-		outlinePalette->slotShowSelect(doc->currentPageNumber(), NULL);
+		outlinePalette->slotShowSelect(doc->currentPageNumber(), nullptr);
 		propertiesPalette->setGradientEditMode(false);
 		break;
 	case PageItem::TextFrame: //Text Frame
@@ -3469,7 +3469,7 @@
 		outlinePalette->buildReopenVals();
 	bool ret = false;
 	QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
-	ScribusWin* ActWinOld = NULL;
+	ScribusWin* ActWinOld = nullptr;
 	if (windows.count() != 0)
 	{
 		ActWinOld = ActWin;
@@ -3540,7 +3540,7 @@
 		if (docFontDir3.exists())
 			m_prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Document fonts", FName);
 		m_prefsManager->appPrefs.fontPrefs.AvailFonts.updateFontMap();
-		if (view != NULL)
+		if (view != nullptr)
 		{
 			actionManager->disconnectNewViewActions();
 			disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
@@ -3579,16 +3579,16 @@
 			view->close();
 			delete fileLoader;
 			delete doc;
-			doc=NULL;
+			doc=nullptr;
 			mdiArea->removeSubWindow(w->getSubWin());
 			delete w;
-			view=NULL;
-			doc=NULL;
+			view=nullptr;
+			doc=nullptr;
 			setScriptRunning(false);
 			qApp->restoreOverrideCursor();
 			m_mainWindowStatusLabel->setText("");
 			mainWindowProgressBar->reset();
-			ActWin = NULL;
+			ActWin = nullptr;
 			if (windows.count() != 0)
 			{
 				newActWin(ActWinOld->getSubWin());
@@ -3799,7 +3799,7 @@
 		for (auto iti = doc->Items->begin(); iti != doc->Items->end(); ++iti)
 		{
 			PageItem* ite = *iti;
-			if((ite->nextInChain() == NULL) && !ite->isNoteFrame())  //do not layout notes frames
+			if((ite->nextInChain() == nullptr) && !ite->isNoteFrame())  //do not layout notes frames
 				ite->layout();
 		}
 		if (!doc->marksList().isEmpty())
@@ -3812,7 +3812,7 @@
 		{
 			PageItem *ite = itf.value();
 //			qDebug() << QString("load F: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType());
-			if(ite->nextInChain() == NULL)
+			if(ite->nextInChain() == nullptr)
 				ite->layout();
 		}
 		/*qDebug("Time elapsed: %d ms", t.elapsed());*/
@@ -3839,7 +3839,7 @@
 			w->show();
 		view->show();
 		// Seems to fix crash on loading
-		ActWin = NULL;
+		ActWin = nullptr;
 		newActWin(w->getSubWin());
 		doc->updateNumbers(true);
 		emit UpdateRequest(reqNumUpdate);
@@ -4323,7 +4323,7 @@
 	bookmarkPalette->BView->First = 1;
 	bookmarkPalette->BView->Last = 0;
 	outlinePalette->unsetDoc();
-	alignDistributePalette->setDoc(NULL);
+	alignDistributePalette->setDoc(nullptr);
 	//>>
 
 	if ((mdiArea->subWindowList().isEmpty()) || (mdiArea->subWindowList().count() == 1))
@@ -4347,9 +4347,9 @@
 		plugin->unsetDoc();
 	}
 	view->close();
-	//CB Yes, we are setting it to NULL without deleting it. ActWin(ScribusWin) owns the view
+	//CB Yes, we are setting it to nullptr without deleting it. ActWin(ScribusWin) owns the view
 	//due to it being the central widget and will delete it at the correct moment from its own pointer.
-	view = NULL;
+	view = nullptr;
 	doc->setLoading(true);
 	guidePalette->setDoc(0);
 	charPalette->setDoc(0);
@@ -4361,8 +4361,8 @@
 	docCheckerPalette->buildErrorList(0);
 	HaveDoc--;
 	delete doc;
-	doc = NULL;
-	ActWin = NULL;
+	doc = nullptr;
+	ActWin = nullptr;
 	if ( HaveDoc == 0 )
 	{
 		QString prefsDocDir( PrefsManager::instance()->documentDir() );
@@ -4517,7 +4517,7 @@
 	}
 	ScCore->fileWatcher->forceScan();
 	ScCore->fileWatcher->stop();
-	ScPrintEngine* prnEngine = NULL;
+	ScPrintEngine* prnEngine = nullptr;
 #if defined(_WIN32)
 	SHORT shiftState = GetKeyState( VK_SHIFT );
 	bool  forceGDI = ( shiftState & 0x8000 ) ? true : false;
@@ -4631,7 +4631,7 @@
 		for (int i=0; i < doc->m_Selection->count(); ++i)
 		{
 			PageItem* frame = doc->m_Selection->itemAt(i);
-			if (frame->asTextFrame() && frame->prevInChain() == NULL)
+			if (frame->asTextFrame() && frame->prevInChain() == nullptr)
 				frame->clearContents();
 		}
 		doc->itemSelection_DeleteItem();
@@ -4736,7 +4736,7 @@
 			currItem = selItem->asTable()->activeCell().textFrame();
 		else
 			currItem = selItem->asTextFrame();
-		assert(currItem != NULL);
+		assert(currItem != nullptr);
 		if (currItem->HasSel)
 		{
 			//removing marks and notes from selected text
@@ -4872,7 +4872,7 @@
 			double x0 = (view->contentsX() / view->scale()) + ((view->visibleWidth() / 2.0) / view->scale());
 			double y0 = (view->contentsY() / view->scale()) + ((view->visibleHeight() / 2.0) / view->scale());
 			PageItem *retObj = getVectorFileFromData(doc, bitsBits, ext, x0, y0);
-			if (retObj != NULL)
+			if (retObj != nullptr)
 			{
 				double x = (view->contentsX() / view->scale()) + ((view->visibleWidth() / 2.0) / view->scale()) - (retObj->width() / 2.0);
 				double y = (view->contentsY() / view->scale()) + ((view->visibleHeight() / 2.0) / view->scale()) - (retObj->height() / 2.0);
@@ -5003,7 +5003,7 @@
 			double x0 = (view->contentsX() / view->scale()) + ((view->visibleWidth() / 2.0) / view->scale());
 			double y0 = (view->contentsY() / view->scale()) + ((view->visibleHeight() / 2.0) / view->scale());
 			PageItem *retObj = getVectorFileFromData(doc, bitsBits, ext, x0, y0);
-			if (retObj != NULL)
+			if (retObj != nullptr)
 			{
 				double x = (view->contentsX() / view->scale()) + ((view->visibleWidth() / 2.0) / view->scale()) - (retObj->width() / 2.0);
 				double y = (view->contentsY() / view->scale()) + ((view->visibleHeight() / 2.0) / view->scale()) - (retObj->height() / 2.0);
@@ -5162,7 +5162,7 @@
 			doc->view()->requestMode(modeNormal);
 		}
 	}
-	else if (view != NULL)
+	else if (view != nullptr)
 		view->Deselect(true);
 }
 
@@ -5174,7 +5174,7 @@
 	bool hasExternalData = ScMimeData::clipboardHasKnownData();
 	if (HaveDoc && !doc->m_Selection->isEmpty())
 	{
-		PageItem *currItem = NULL;
+		PageItem *currItem = nullptr;
 		currItem = doc->m_Selection->itemAt(0);
 		textFrameEditMode  = ((doc->appMode == modeEdit) && (currItem->asTextFrame()));
 		tableEditMode = ((doc->appMode == modeEditTable) && (currItem->asTable()));
@@ -5253,7 +5253,7 @@
 		resourceManager=new ResourceManager(this);
 		resourceManager->exec();
 		resourceManager->deleteLater();
-		resourceManager=NULL;
+		resourceManager=nullptr;
 	}
 }
 
@@ -5350,7 +5350,7 @@
 		ss->set("WHERE", where);
 		ss->set("COUNT", numPages);
 		ss->set("MASTER_PAGE_MODE",  doc->masterPageMode());
-		if (basedOn != NULL)
+		if (basedOn != nullptr)
 			ss->set("BASED", basedOn->join("|"));
 		else
 		{
@@ -5374,7 +5374,7 @@
 	m_undoManager->setUndoEnabled(false);
 
 	QStringList base;
-	if (basedOn != NULL)
+	if (basedOn != nullptr)
 	{
 		base = *basedOn;
 		// #10211 case when restoring page deletion, basedOn contains only masterpage name
@@ -5871,7 +5871,7 @@
 	if (doc->m_Selection->count()==1)
 	{
 		PageItem* currItem=doc->m_Selection->itemAt(0);
-		if (currItem!=NULL)
+		if (currItem!=nullptr)
 			currItem->emitAllToGUI();
 	}
 	//TODO emit from selection, handle group widths
@@ -6152,7 +6152,7 @@
 	assert( from <= to );
 	assert( to <= static_cast<int>(doc->Pages->count()) );
 	int oldPg = doc->currentPageNumber();
-	guidePalette->setDoc(NULL);
+	guidePalette->setDoc(nullptr);
 	if (UndoManager::undoEnabled())
 		activeTransaction = m_undoManager->beginTransaction(doc->DocName, Um::IDocument,
 														  (from - to == 0) ? Um::DeletePage : Um::DeletePages, "",
@@ -6840,7 +6840,7 @@
 				for (int ii = 0; ii < bar->count(); ii++)
 				{
 					QObject *obj = (QObject*)bar->tabData(ii).toULongLong();
-					if (obj != NULL)
+					if (obj != nullptr)
 					{
 						if (obj->objectName() == container->objectName())
 						{
@@ -6873,7 +6873,7 @@
 				for (int ii = 0; ii < bar->count(); ii++)
 				{
 					QObject *obj = (QObject*)bar->tabData(ii).toULongLong();
-					if (obj != NULL)
+					if (obj != nullptr)
 					{
 						if (obj->objectName() == container->objectName())
 						{
@@ -7029,7 +7029,7 @@
 	options.markOffset = 0.0;
 	options.bleeds.set(0, 0, 0, 0);
 	PSLib *pslib = new PSLib(options, false, m_prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
-	if (pslib != NULL)
+	if (pslib != nullptr)
 	{
 		qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
 		if (pslib->PS_set_file(fn))
@@ -7357,8 +7357,8 @@
 	if (doc->BookMarks.count() == 0)
 		return;
 	BookMItem* ip;
-	BookMItem* ip2 = NULL;
-	BookMItem* ip3 = NULL;
+	BookMItem* ip2 = nullptr;
+	BookMItem* ip3 = nullptr;
 	BookMItem *ite = new BookMItem(bookmarkPalette->BView, &(*it2));
 	bookmarkPalette->BView->NrItems++;
 	++it2;
@@ -7418,7 +7418,7 @@
 {
 	bool b = layerMenu->blockSignals(true);
 	layerMenu->clear();
-	if (doc==NULL)
+	if (doc==nullptr)
 	{
 		layerMenu->blockSignals(b);
 		return;
@@ -7637,7 +7637,7 @@
 	if (doc->m_Selection->count() == 1)
 		doc->currentEditedTextframe = doc->m_Selection->itemAt(0);
 	else
-		doc->currentEditedTextframe = NULL;
+		doc->currentEditedTextframe = nullptr;
 	view->Deselect(true);
 	m_storedPageNum = doc->currentPageNumber();
 	m_storedViewXCoor = view->contentsX();
@@ -7678,9 +7678,9 @@
 	doc->setCurrentPage(doc->DocPages.at(m_storedPageNum));
 	view->setContentsPos(static_cast<int>(m_storedViewXCoor * m_storedViewScale), static_cast<int>(m_storedViewYCoor * m_storedViewScale));
 	doc->invalidateAll();
-//	if (doc->currentEditedTextframe != NULL)
+//	if (doc->currentEditedTextframe != nullptr)
 //		doc->currentEditedTextframe->invalidateLayout();
-	doc->currentEditedTextframe = NULL;
+	doc->currentEditedTextframe = nullptr;
 	view->DrawNew();
 	pagePalette->Rebuild();
 	propertiesPalette->unsetItem();
@@ -8097,16 +8097,16 @@
 		dia->setExtension(f.suffix());
 		dia->setZipExtension(f.suffix() + ".gz");
 		dia->setSelection(defaultFilename);
-		if (useCompression != NULL && dia->SaveZip != NULL)
+		if (useCompression != nullptr && dia->SaveZip != nullptr)
 			dia->SaveZip->setChecked(*useCompression);
 	}
 	if (optionFlags & fdDirectoriesOnly)
 	{
-		if (useCompression != NULL && dia->SaveZip != NULL)
+		if (useCompression != nullptr && dia->SaveZip != nullptr)
 			dia->SaveZip->setChecked(*useCompression);
-		if (useFonts != NULL)
+		if (useFonts != nullptr)
 			dia->WithFonts->setChecked(*useFonts);
-		if (useProfiles != NULL)
+		if (useProfiles != nullptr)
 			dia->WithProfiles->setChecked(*useProfiles);
 	}
 	QString retval("");
@@ -8124,11 +8124,11 @@
 		}
 		else
 		{
-			if (useCompression != NULL && dia->SaveZip != NULL)
+			if (useCompression != nullptr && dia->SaveZip != nullptr)
 				*useCompression = dia->SaveZip->isChecked();
-			if (useFonts != NULL)
+			if (useFonts != nullptr)
 				*useFonts = dia->WithFonts->isChecked();
-			if (useProfiles != NULL)
+			if (useProfiles != nullptr)
 				*useProfiles = dia->WithProfiles->isChecked();
 		}
 		this->repaint();
@@ -8601,7 +8601,7 @@
 		return;
 
 	PageItem *pageItem = doc->m_Selection->itemAt(0);
-	if (pageItem == NULL)
+	if (pageItem == nullptr)
 		return;
 	if (pageItem->itemType() == PageItem::ImageFrame)
 	{
@@ -8617,7 +8617,7 @@
 		return;
 
 	PageItem *pageItem = doc->m_Selection->itemAt(0);
-	if (pageItem == NULL)
+	if (pageItem == nullptr)
 		return;
 	PageItemAttributes *pageItemAttrs = new PageItemAttributes( this );
 	pageItemAttrs->setup(pageItem->getObjectAttributes(), &doc->itemAttributes());
@@ -8670,16 +8670,16 @@
 	LanguageManager::instance()->languageChange();
 	qApp->setLayoutDirection(QLocale(ScCore->getGuiLanguage()).textDirection());
 	//Update actions
-	if (actionManager!=NULL)
+	if (actionManager!=nullptr)
 	{
 		actionManager->languageChange();
 		ScCore->pluginManager->languageChange();
 		initKeyboardShortcuts();
 	}
 	//Update menu texts
-	if (scrMenuMgr!=NULL && !scrMenuMgr->empty())
+	if (scrMenuMgr!=nullptr && !scrMenuMgr->empty())
 		scrMenuMgr->languageChange();
-	if (m_undoManager!=NULL)
+	if (m_undoManager!=nullptr)
 		m_undoManager->languageChange();
 	statusBarLanguageChange();
 	viewToolBar->languageChange();
@@ -8860,8 +8860,8 @@
 
 void ScribusMainWindow::slotEditCopyContents()
 {
-	PageItem *currItem = NULL;
-	if (!HaveDoc || (currItem = doc->m_Selection->itemAt(0)) == NULL)
+	PageItem *currItem = nullptr;
+	if (!HaveDoc || (currItem = doc->m_Selection->itemAt(0)) == nullptr)
 		return;
 	if (currItem->itemType() != PageItem::ImageFrame)
 		return;
@@ -8889,8 +8889,8 @@
 {
 	if (!HaveDoc || contentsBuffer.contentsFileName.isEmpty())
 		return;
-	PageItem *currItem = NULL;
-	if ((currItem = doc->m_Selection->itemAt(0)) == NULL)
+	PageItem *currItem = nullptr;
+	if ((currItem = doc->m_Selection->itemAt(0)) == nullptr)
 		return;
 	if (contentsBuffer.sourceType != PageItem::ImageFrame || currItem->itemType() != PageItem::ImageFrame)
 		return;
@@ -9366,11 +9366,11 @@
 				delete s_doc;
 			}
 			m_prefsManager->setColorSetName(dia->getColorSetName());
-			doc = NULL;
+			doc = nullptr;
 		}
 	}
 	if (!HaveDoc)
-		doc = NULL;
+		doc = nullptr;
 	delete dia;
 	m_undoManager->setUndoEnabled(true);
 }
@@ -9433,7 +9433,7 @@
 		//inserting mark replace some selected text
 		currItem->asTextFrame()->deleteSelectedTextFromFrame();
 	}
-	ScItemsState* is = NULL;
+	ScItemsState* is = nullptr;
 	if (insertMarkDialog(currItem->asTextFrame(), mType, is))
 	{
 		Mark* mrk = currItem->itemText.mark(currItem->itemText.cursorPosition() -1);
@@ -9449,7 +9449,7 @@
 			nsEditor->setNotesStyle(mrk->getNotePtr()->notesStyle());
 		}
 		doc->changed();
-		if (is != NULL)
+		if (is != nullptr)
 			is->set("label", mrk->label);
 		view->updatesOn(true);
 		view->DrawNew();
@@ -9528,7 +9528,7 @@
 			label += " in " + currItem->firstInChain()->itemName();
 		else if (nStyle->range() == NSRframe)
 			label += " in frame" + currItem->itemName();
-		if (doc->getMark(label + "_1", MARKNoteMasterType) != NULL)
+		if (doc->getMark(label + "_1", MARKNoteMasterType) != nullptr)
 			getUniqueName(label,doc->marksLabelsList(MARKNoteMasterType), "_"); //FIX ME here user should be warned that inserted mark`s label was changed
 		else
 			label = label + "_1";
@@ -9573,7 +9573,7 @@
 		//avoid inserting in master pages other marks than Variable Text
 		return false;
 	
-	MarkInsert* insertMDialog = NULL;
+	MarkInsert* insertMDialog = nullptr;
 	switch (mrkType)
 	{
 	case MARKAnchorType:
@@ -9586,7 +9586,7 @@
 		insertMDialog = (MarkInsert*) new Mark2Item(this);
 		break;
 	case MARK2MarkType:
-		insertMDialog = (MarkInsert*) new Mark2Mark(doc->marksList(), NULL, this);
+		insertMDialog = (MarkInsert*) new Mark2Mark(doc->marksList(), nullptr, this);
 		break;
 	case MARKNoteMasterType:
 		insertMDialog = (MarkInsert*) new MarkNote(doc->m_docNotesStylesList, this);
@@ -9596,7 +9596,7 @@
 	default:
 		break;
 	}
-	if (insertMDialog == NULL)
+	if (insertMDialog == nullptr)
 	{
 		qDebug() << "Dialog not implemented for such marks type " << mrkType;
 		return false;
@@ -9606,13 +9606,13 @@
 	insertMDialog->setWindowTitle(tr("Insert new ") + insertMDialog->windowTitle());
 	if (insertMDialog->exec())
 	{
-		Mark* mrk = NULL;
+		Mark* mrk = nullptr;
 		Mark oldMark;
 		MarkData markdata;
-		if (currItem != NULL)
+		if (currItem != nullptr)
 			markdata.itemName = currItem->itemName();
 		QString label = "", text = "";
-		NotesStyle* NStyle = NULL;
+		NotesStyle* NStyle = nullptr;
 		bool insertExistedMark = false;
 		switch (mrkType)
 		{
@@ -9625,7 +9625,7 @@
 			break;
 		case MARKVariableTextType:
 			mrk = insertMDialog->values(label, text);
-			if ((mrk == NULL) && (text.isEmpty()))
+			if ((mrk == nullptr) && (text.isEmpty()))
 				return false; //FIX ME here user should be warned that inserting of mark fails and why
 			if (label.isEmpty())
 				label = tr("Mark with <%1> variable text").arg(text);
@@ -9633,7 +9633,7 @@
 			break;
 		case MARK2ItemType:
 			insertMDialog->values(label, markdata.itemPtr);
-			if (markdata.itemPtr == NULL)
+			if (markdata.itemPtr == nullptr)
 				return false; //FIX ME here user should be warned that inserting of mark fails and why
 			if (label.isEmpty())
 				label = tr("Mark to %1 item").arg(markdata.itemPtr->itemName());
@@ -9643,7 +9643,7 @@
 			//gets pointer to referenced mark
 			Mark* mrkPtr;
 			insertMDialog->values(label, mrkPtr);
-			if (mrkPtr == NULL)
+			if (mrkPtr == nullptr)
 				return false; //FIX ME here user should be warned that inserting of mark fails and why
 			if (label.isEmpty())
 				label = tr("Mark to %1 mark").arg(mrkPtr->label);
@@ -9654,7 +9654,7 @@
 		case MARKNoteMasterType:
 			//gets pointer to chosen notes style
 			NStyle = insertMDialog->values();
-			if (NStyle == NULL)
+			if (NStyle == nullptr)
 				return false;
 
 			markdata.notePtr = doc->newNote(NStyle);
@@ -9675,12 +9675,12 @@
 				return false;
 			break;
 		}
-		if (mrk == NULL)
+		if (mrk == nullptr)
 		{
 			//check if label for new mark can be used as is
 			if (mrkType == MARKNoteMasterType)
 			{
-				if (doc->getMark(label + "_1", mrkType) != NULL)
+				if (doc->getMark(label + "_1", mrkType) != nullptr)
 					getUniqueName(label,doc->marksLabelsList(mrkType), "_"); //FIX ME here user should be warned that inserted mark`s label was changed
 				else
 					label = label + "_1";
@@ -9767,7 +9767,7 @@
 
 bool ScribusMainWindow::editMarkDlg(Mark *mrk, PageItem_TextFrame* currItem)
 {
-	MarkInsert* editMDialog = NULL;
+	MarkInsert* editMDialog = nullptr;
 	switch (mrk->getType())
 	{
 		case MARKAnchorType:
@@ -9775,7 +9775,7 @@
 			editMDialog->setValues(mrk->label);
 			break;
 		case MARKVariableTextType:
-			if (currItem == NULL)
+			if (currItem == nullptr)
 				//invoked from Marks Manager
 				editMDialog = dynamic_cast<MarkInsert*>(new MarkVariableText(mrk, this));
 			else
@@ -9802,7 +9802,7 @@
 				//invoking editing note mark from master text
 				//so we go to edit note
 				TextNote* note = mrk->getNotePtr();
-				if (note == NULL)
+				if (note == nullptr)
 				{
 					qFatal("ScribusMainWindow::editMarkDlg - found note master mark with null pointer to note");
 					return false;
@@ -9816,7 +9816,7 @@
 				//invoking editing mark from note frame
 				//so we go to master text
 				TextNote* note = mrk->getNotePtr();
-				if (note == NULL)
+				if (note == nullptr)
 				{
 					qFatal("ScribusMainWindow::editMarkDlg - found note frame mark with null pointer to note");
 					return false;
@@ -9831,7 +9831,8 @@
 		default:
 			break;
 	}
-	if (editMDialog == NULL) return false;
+	if (editMDialog == nullptr)
+		return false;
 
 	bool docWasChanged = false;
 
@@ -9839,9 +9840,9 @@
 	if (editMDialog->exec())
 	{
 		Mark oldMark = *mrk;
-		Mark* Mrk = NULL;
+		Mark* Mrk = nullptr;
 		MarkData markdata;
-		if (currItem != NULL)
+		if (currItem != nullptr)
 			markdata.itemName = currItem->itemName();
 		QString label, text;
 		QString oldStr = mrk->getString();
@@ -9867,7 +9868,7 @@
 					return false; //FIX ME here user should be warned that editing of mark fails and why
 				if (label.isEmpty())
 					label = tr("Mark with <%1> variable text").arg(text);
-				if (Mrk != NULL)
+				if (Mrk != nullptr)
 				{
 					if (Mrk != mrk)
 					{
@@ -9901,7 +9902,7 @@
 				break;
 			case MARK2ItemType:
 				editMDialog->values(label, markdata.itemPtr);
-				if (markdata.itemPtr == NULL)
+				if (markdata.itemPtr == nullptr)
 					return false; //FIX ME here user should be warned that inserting of mark fails and why
 				if (label.isEmpty())
 					label = tr("Mark to %1 item").arg(markdata.itemPtr->itemName());
@@ -9920,9 +9921,9 @@
 			case MARK2MarkType:
 				{
 					//gets pointer to referenced mark
-					Mark* mrkPtr = NULL;
+					Mark* mrkPtr = nullptr;
 					editMDialog->values(label, mrkPtr);
-					if (mrkPtr == NULL)
+					if (mrkPtr == nullptr)
 						return false; //FIX ME here user should be warned that inserting of mark fails and why
 					if (label.isEmpty())
 						label = tr("Mark to %1 mark").arg(mrkPtr->label);
@@ -9950,13 +9951,13 @@
 		}
 		if (UndoManager::undoEnabled())
 		{
-			ScItemsState* is = NULL;
+			ScItemsState* is = nullptr;
 			if (newMark || replaceMark)
 				is = new ScItemsState(UndoManager::InsertMark);
 			else
 				is = new ScItemsState(UndoManager::EditMark);
 			is->set("ETEA", mrk->label);
-			if (currItem != NULL)
+			if (currItem != nullptr)
 			{
 				is->set("at", currItem->itemText.cursorPosition()-1);
 				if (currItem->isNoteFrame())

Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp	(original)
+++ trunk/Scribus/scribus/scribusapp.cpp	Wed May  2 19:59:47 2018
@@ -107,9 +107,9 @@
 	m_GUILang("en_GB")
 {
 	ScQApp = this;
-	ScCore = 0;
-	m_scDLMgr = 0;
-	m_ScCore = NULL;
+	ScCore = nullptr;
+	m_scDLMgr = nullptr;
+	m_ScCore = nullptr;
 	initDLMgr();
 	setAttribute(Qt::AA_UseHighDpiPixmaps, true);
 }
@@ -143,7 +143,7 @@
 void ScribusQApp::parseCommandLine()
 {
 	m_showSplash=!neverSplashExists();
-	QString arg("");
+	QString arg;
 	bool usage=false;
 	bool header=false;
 	bool availlangs=false;
@@ -155,7 +155,7 @@
 	int testargsc;
 #endif
 	m_showFontInfo=false;
-	m_showProfileInfo=false;	
+	m_showProfileInfo=false;
 	bool neversplash = false;
 
 	//Parse for command line options

Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp	(original)
+++ trunk/Scribus/scribus/scribuscore.cpp	Wed May  2 19:59:47 2018
@@ -218,43 +218,43 @@
 
 void ScribusCore::initSplash(bool showSplash)
 {
-	m_SplashScreen = NULL;
+	m_SplashScreen = nullptr;
 	if (!showSplash)
 		return;
 	QPixmap pix = IconManager::instance()->loadPixmap("scribus_splash.png", true);
 	m_SplashScreen = new ScSplashScreen(pix, Qt::WindowStaysOnTopHint);
-	if (m_SplashScreen != NULL)
+	if (m_SplashScreen != nullptr)
 		m_SplashScreen->show();
-	if (m_SplashScreen != NULL && m_SplashScreen->isVisible())
+	if (m_SplashScreen != nullptr && m_SplashScreen->isVisible())
 		setSplashStatus(QObject::tr("Initializing..."));
 }
 
 void ScribusCore::setSplashStatus(const QString& newText)
 {
-	if (m_SplashScreen != NULL)
+	if (m_SplashScreen != nullptr)
 		m_SplashScreen->setStatus( newText );
 }
 
 void ScribusCore::showSplash(bool shown)
 {
-	if (m_SplashScreen!=NULL && shown!=m_SplashScreen->isVisible())
+	if (m_SplashScreen!=nullptr && shown!=m_SplashScreen->isVisible())
 		m_SplashScreen->setVisible(shown);
 }
 
 bool ScribusCore::splashShowing() const
 {
-	if (m_SplashScreen == NULL)
+	if (m_SplashScreen == nullptr)
 		return false;
 	return m_SplashScreen->isVisible();
 }
 
 void ScribusCore::closeSplash()
 {
-	if (m_SplashScreen==NULL)
+	if (m_SplashScreen==nullptr)
 		return;
 	m_SplashScreen->close();
 	delete m_SplashScreen;
-	m_SplashScreen = NULL;
+	m_SplashScreen = nullptr;
 }
 
 bool ScribusCore::usingGUI() const
@@ -563,7 +563,7 @@
 
 bool ScribusCore::fileWatcherActive() const
 {
-	if (fileWatcher!=NULL)
+	if (fileWatcher!=nullptr)
 		return fileWatcher->isActive();
 	return false;
 }

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h	(original)
+++ trunk/Scribus/scribus/scribusstructs.h	Wed May  2 19:59:47 2018
@@ -173,8 +173,8 @@
 	double firstLineIndent;
 	double tabPosition;
 	CharStyle* style;
-	Bullet() : indent(0.0), firstLineIndent(0.0), tabPosition(0.0), style(NULL) {}
-	Bullet(QString n, QString ch) : name(n), charStr(ch), indent(0.0), firstLineIndent(0.0), tabPosition(0.0), style(NULL) {}
+	Bullet() : indent(0.0), firstLineIndent(0.0), tabPosition(0.0), style(nullptr) {}
+	Bullet(QString n, QString ch) : name(n), charStr(ch), indent(0.0), firstLineIndent(0.0), tabPosition(0.0), style(nullptr) {}
 	Bullet(QString n, QString ch, double first, double ind, double tab, CharStyle* chStyle)
 	    { name = n; charStr = ch, firstLineIndent = first; indent = ind; tabPosition = tab; style = chStyle; }
 };

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Wed May  2 19:59:47 2018
@@ -1197,7 +1197,7 @@
 					}
 					re = pmen->actions().indexOf(pmen->exec(QCursor::pos()));
 					delete pmen;
-					pmen=NULL;
+					pmen=nullptr;
 				}
 				else
 					re = 1;
@@ -1877,7 +1877,7 @@
 		return;
 
 	const double scale = m_canvas->scale();
-	PageItem* currItem = NULL;
+	PageItem* currItem = nullptr;
 	for (int a = 0; a < Doc->m_Selection->count(); ++a)
 	{
 		currItem = Doc->m_Selection->itemAt(a);
@@ -1894,13 +1894,13 @@
 	else
 	{
 		currItem = Doc->m_Selection->itemAt(0);
-		if (currItem != NULL)
+		if (currItem != nullptr)
 		{
 			currItem->itemText.deselectAll();
 			currItem->HasSel = false;
 		}
 		Doc->m_Selection->clear();
-		if (currItem != NULL)
+		if (currItem != nullptr)
 			updateContents(currItem->getRedrawBounding(scale));
 	}
 }
@@ -2723,7 +2723,7 @@
 		else
 			im = pm.scaled(static_cast<int>(pm.width() / sy), static_cast<int>(pm.height() / sy), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
 		delete painter;
-		painter=NULL;
+		painter=nullptr;
 		m_canvas->setPreviewMode(false);
 		m_canvas->setForcedRedraw(false);
 		Doc->guidesPrefs().framesShown = frs;
@@ -2877,7 +2877,7 @@
 	painter->endLayer();
 	painter->end();
 	delete painter;
-	painter=NULL;
+	painter=nullptr;
 
 	if (changedList.count() != 0)
 	{
@@ -3527,7 +3527,7 @@
 			if (secondFrame && firstFrame)
 			{
 				firstFrame->link(secondFrame);
-				firstFrame = NULL;
+				firstFrame = nullptr;
 				secondFrame->emitAllToGUI();
 			}
 			linkAfterDraw = false;
@@ -3541,7 +3541,7 @@
 			{
 				CanvasMode_ImageImport* cm = dynamic_cast<CanvasMode_ImageImport*>(canvasMode());
 				if (!cm)
-					qFatal("ScribusView::eventFilter cm NULL");
+					qFatal("ScribusView::eventFilter cm nullptr");
 				cm->setImage(frame);
 				cm->updateList();
 			}
@@ -3556,7 +3556,7 @@
 		firstFrame = Doc->m_Selection->itemAt(0);
 		m_canvasMode->mousePressEvent(m);
 		//if user don't click any frame he want to draw new frame and link it
-		bool requestDrawMode = (Doc->ElemToLink == NULL);
+		bool requestDrawMode = (Doc->ElemToLink == nullptr);
 		requestDrawMode &= (firstFrame && !firstFrame->nextInChain());
 		if (linkmode && requestDrawMode)
 		{
@@ -3566,7 +3566,7 @@
 			m_canvasMode->mousePressEvent(m);
 		}
 		else
-			firstFrame = NULL;
+			firstFrame = nullptr;
 		if(Doc->appMode == modeImportImage && ImageAfterDraw)
 		{
 			//switch to drawing new text frame

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h	(original)
+++ trunk/Scribus/scribus/scribusview.h	Wed May  2 19:59:47 2018
@@ -311,7 +311,7 @@
 	inline void resetDragTimer();
 	inline bool dragTimerElapsed();
 
-	bool handleObjectImport(QMimeData* mimeData, TransactionSettings* trSettings = NULL);
+	bool handleObjectImport(QMimeData* mimeData, TransactionSettings* trSettings = nullptr);
 
 protected: // Protected methods
 	virtual void enterEvent(QEvent *);

Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp	(original)
+++ trunk/Scribus/scribus/text/storytext.cpp	Wed May  2 19:59:47 2018
@@ -50,7 +50,7 @@
 		m_doc->charStyles().connect(this, SLOT(invalidateAll()));
 	}
 	else
-		d = new ScText_Shared(NULL);
+		d = new ScText_Shared(nullptr);
 
 	m_selFirst = 0;
 	m_selLast = -1;
@@ -61,13 +61,13 @@
 	invalidateAll();
 }
 
-StoryText::StoryText() : m_doc(NULL)
-{
-	d = new ScText_Shared(NULL);
+StoryText::StoryText() : m_doc(nullptr)
+{
+	d = new ScText_Shared(nullptr);
 
 	m_selFirst = 0;
 	m_selLast = -1;
-	m_shapedTextCache = NULL;
+	m_shapedTextCache = nullptr;
 }
 
 StoryText::StoryText(const StoryText & other) : QObject(), SaxIO(), m_doc(other.m_doc)
@@ -83,7 +83,7 @@
 	
 	m_selFirst = 0;
 	m_selLast = -1;
-	m_shapedTextCache = NULL;
+	m_shapedTextCache = nullptr;
 
 	invalidateLayout();
 }
@@ -810,7 +810,7 @@
 
 void StoryText::insertMark(Mark* Mark, int pos)
 {
-	if (Mark == NULL)
+	if (Mark == nullptr)
 		return;
 	if (pos < 0)
 		pos = d->cursorPosition;
@@ -1032,11 +1032,11 @@
 void StoryText::applyMarkCharstyle(Mark* mrk, CharStyle& currStyle) const
 {
 	TextNote* note = mrk->getNotePtr();
-	if (note == NULL)
+	if (note == nullptr)
 		return;
 	
 	NotesStyle* nStyle = note->notesStyle();
-	Q_ASSERT(nStyle != NULL);
+	Q_ASSERT(nStyle != nullptr);
 	
 	QString chsName = nStyle->marksChStyle();
 	if (!chsName.isEmpty())
@@ -1262,12 +1262,12 @@
 	{
 		itText = d->at(i);
 		// #6165 : applying style on last character applies style on whole text on next open 
-		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL)
+		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != nullptr)
 			itText->parstyle->charStyle().applyCharStyle(style);*/
 		
 		// Does not work well, do not reenable before checking #9337, #9376 and #9428
 		// #9173 et. al.: move charstyle to parstyle if whole paragraph is affected
-		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL && lastParStart >= 0)
+		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != nullptr && lastParStart >= 0)
 		{
 			eraseCharStyle(lastParStart, i - lastParStart, style);
 			itText->parstyle->charStyle().applyCharStyle(style);
@@ -1302,7 +1302,7 @@
 	for (uint i=pos; i < pos+len; ++i) {
 		itText = d->at(i);
 		// FIXME?? see #6165 : should we really erase charstyle of paragraph style??
-		if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL)
+		if (itText->ch == SpecialChars::PARSEP && itText->parstyle != nullptr)
 			itText->parstyle->charStyle().eraseCharStyle(style);
 		itText->eraseCharStyle(style);
 	}
@@ -1415,7 +1415,7 @@
 	{
 		itText = d->at(i);
 		// #6165 : applying style on last character applies style on whole text on next open 
-		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL)
+		/*if (itText->ch == SpecialChars::PARSEP && itText->parstyle != nullptr)
 			itText->parstyle->charStyle() = style;*/
 		itText->setStyle(style);
 	}
@@ -1868,68 +1868,68 @@
 		m_selLast += 1;
 }
 
-BreakIterator* StoryText::m_graphemeIterator = NULL;
+BreakIterator* StoryText::m_graphemeIterator = nullptr;
 
 BreakIterator* StoryText::getGraphemeIterator()
 {
 	UErrorCode status = U_ZERO_ERROR;
-	if (m_graphemeIterator == NULL)
+	if (m_graphemeIterator == nullptr)
 		m_graphemeIterator = BreakIterator::createCharacterInstance(Locale(), status);
 
 	if (U_FAILURE(status))
 	{
 		delete m_graphemeIterator;
-		m_graphemeIterator = NULL;
+		m_graphemeIterator = nullptr;
 	}
 
 	return m_graphemeIterator;
 }
 
-BreakIterator* StoryText::m_wordIterator = NULL;
+BreakIterator* StoryText::m_wordIterator = nullptr;
 
 BreakIterator* StoryText::getWordIterator()
 {
 	UErrorCode status = U_ZERO_ERROR;
-	if (m_wordIterator == NULL)
+	if (m_wordIterator == nullptr)
 		m_wordIterator = BreakIterator::createWordInstance(Locale(), status);
 
 	if (U_FAILURE(status))
 	{
 		delete m_wordIterator;
-		m_wordIterator = NULL;
+		m_wordIterator = nullptr;
 	}
 	return m_wordIterator;
 }
 
-BreakIterator* StoryText::m_sentenceIterator = NULL;
+BreakIterator* StoryText::m_sentenceIterator = nullptr;
 
 BreakIterator* StoryText::getSentenceIterator()
 {
 	UErrorCode status = U_ZERO_ERROR;
-	if (m_sentenceIterator == NULL)
+	if (m_sentenceIterator == nullptr)
 		m_sentenceIterator = BreakIterator::createSentenceInstance(Locale(), status);
 
 	if (U_FAILURE(status))
 	{
 		delete m_sentenceIterator;
-		m_sentenceIterator = NULL;
+		m_sentenceIterator = nullptr;
 	}
 
 	return m_sentenceIterator;
 }
 
-BreakIterator* StoryText::m_lineIterator = NULL;
+BreakIterator* StoryText::m_lineIterator = nullptr;
 
 BreakIterator* StoryText::getLineIterator()
 {
 	UErrorCode status = U_ZERO_ERROR;
-	if (m_lineIterator == NULL)
+	if (m_lineIterator == nullptr)
 		m_lineIterator = BreakIterator::createLineInstance(Locale(), status);
 
 	if (U_FAILURE(status))
 	{
 		delete m_lineIterator;
-		m_lineIterator = NULL;
+		m_lineIterator = nullptr;
 	}
 
 	return m_lineIterator;
@@ -2155,14 +2155,14 @@
 //				mark_attr.insert("style_numother", pstyle.numOther() ? "1" : "0");
 //				mark_attr.insert("style_numhigher", pstyle.numHigher() ? "1" : "0");
 //			}
-			if (mrk->isType(MARK2ItemType) && (mrk->getItemPtr() != NULL))
+			if (mrk->isType(MARK2ItemType) && (mrk->getItemPtr() != nullptr))
 				mark_attr.insert("item", mrk->getItemPtr()->itemName());
 			else if (mrk->isType(MARK2MarkType))
 			{
 				QString l;
 				MarkType t;
 				mrk->getMark(l, t);
-				if (m_doc->getMark(l,t) != NULL)
+				if (m_doc->getMark(l,t) != nullptr)
 				{
 					mark_attr.insert("mark_l", l);
 					mark_attr.insert("mark_t", QString::number((int) t));
@@ -2171,7 +2171,7 @@
 			else if (mrk->isType(MARKNoteMasterType))
 			{
 				TextNote * note = mrk->getNotePtr();
-				assert(note != NULL);
+				assert(note != nullptr);
 				mark_attr.insert("nStyle", note->notesStyle()->name());
 				mark_attr.insert("note",note->saxedText());
 				//store noteframe name for inserting into note if it is non-auto-removable
@@ -2349,7 +2349,7 @@
 		QString l = "";
 		MarkType t = MARKNoType;
 		
-		Mark* mrk = NULL;
+		Mark* mrk = nullptr;
 		
 		if (tag == "mark")
 		{
@@ -2363,7 +2363,7 @@
 			if (t != MARKBullNumType)
 			{
 				ScribusDoc* doc  = this->dig->lookup<ScribusDoc>("<scribusdoc>");
-				//				ParagraphStyle* pstyle = NULL;
+				//				ParagraphStyle* pstyle = nullptr;
 				if (t == MARKVariableTextType)
 					mrk = doc->getMark(l,t);
 				//			else if (t == MARKBullNumType)
@@ -2433,7 +2433,7 @@
 					{
 						PageItem* item = doc->getItemFromName(Xml_data(iIt));
 						mrk->setItemPtr(item);
-						if (item == NULL)
+						if (item == nullptr)
 							mrk->setString("0");
 						else
 							mrk->setString(doc->getSectionPageNumberForPageIndex(item->OwnPage));
@@ -2443,7 +2443,7 @@
 					{
 						Mark* targetMark = doc->getMark(Xml_data(m_lIt), (MarkType) parseInt(Xml_data(m_tIt)));
 						mrk->setMark(targetMark);
-						if (targetMark == NULL)
+						if (targetMark == nullptr)
 							mrk->setString("0");
 						else
 							mrk->setString(doc->getSectionPageNumberForPageIndex(targetMark->OwnPage));
@@ -2465,7 +2465,7 @@
 						//					if (!NS->isAutoRemoveEmptyNotesFrames() && (nf_It != attr.end()))
 						//					{
 						//						PageItem_NoteFrame* nF = (PageItem_NoteFrame*) doc->getItemFromName(Xml_data(nf_It));
-						//						if (nF != NULL)
+						//						if (nF != nullptr)
 						//							doc->m_Selection->itemAt(0)->asTextFrame()->setNoteFrame(nF);
 						//					}
 						mrk->setNotePtr(note);
@@ -2474,10 +2474,10 @@
 					doc->newMark(mrk);
 				}
 				story->insertMark(mrk);
-				//			if (pstyle != NULL)
+				//			if (pstyle != nullptr)
 				//			{
 				//				int i = story->cursorPosition() -1;
-				//				if (story->item(i)->parstyle == NULL) {
+				//				if (story->item(i)->parstyle == nullptr) {
 				//					story->item(i)->parstyle = new ParagraphStyle(*pstyle);
 				//					story->item(i)->parstyle->setContext( &doc->paragraphStyles());
 				//				}
@@ -2559,7 +2559,7 @@
 class Paragraph_body : public Action_body
 {
 public:
-	Paragraph_body() : lastPos(0), numPara(0), lastStyle(NULL)
+	Paragraph_body() : lastPos(0), numPara(0), lastStyle(nullptr)
 	{}
 	
 	~Paragraph_body() 
@@ -2582,7 +2582,7 @@
 		else if (tag == "p")
 		{
 			StoryText* story = this->dig->top<StoryText>();
-//			qDebug() << QString("startpar: %1->%2 %3->NULL").arg(lastPos).arg(story->length()).arg((ulong)lastStyle);
+//			qDebug() << QString("startpar: %1->%2 %3->nullptr").arg(lastPos).arg(story->length()).arg((ulong)lastStyle);
 			lastPos = story->length();
 			if (numPara > 0) {
 				story->insertChars(-1, SpecialChars::PARSEP);
@@ -2590,7 +2590,7 @@
 			}
 			if (lastStyle)
 				delete lastStyle;
-			lastStyle = NULL;
+			lastStyle = nullptr;
 		}
 	}
 	
@@ -2630,7 +2630,7 @@
 class SpanAction_body : public Action_body
 {
 public:
-	SpanAction_body() : lastPos(0), lastStyle(NULL)
+	SpanAction_body() : lastPos(0), lastStyle(nullptr)
 	{}
 	
 	~SpanAction_body() 
@@ -2648,7 +2648,7 @@
 			lastPos = story->length();
 			if (lastStyle)
 				delete lastStyle;
-			lastStyle = NULL;
+			lastStyle = nullptr;
 		}
 	}
 	

Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp	(original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp	Wed May  2 19:59:47 2018
@@ -473,7 +473,7 @@
 		{
 			hasError = false;
 			pageGraveError = false;
-			QTreeWidgetItem * page=NULL;
+			QTreeWidgetItem * page=nullptr;
 			if (showPagesWithoutErrors)
 			{
 				page = new QTreeWidgetItem( masterPageRootItem);
@@ -492,7 +492,7 @@
 					(!showNonPrintingLayerErrors && doc->layerPrintable(masterItemErrorsIt.key()->LayerID)))
 					)
 				{
-					if (!showPagesWithoutErrors && page==NULL)
+					if (!showPagesWithoutErrors && page==nullptr)
 					{
 						page = new QTreeWidgetItem( masterPageRootItem);
 						masterPageMap.insert(page, doc->MasterPages.at(mPage));
@@ -536,10 +536,10 @@
 			}
 			else
 			{
-				if (showPagesWithoutErrors && page!=NULL)
+				if (showPagesWithoutErrors && page!=nullptr)
 					page->setIcon(COLUMN_ITEM, noErrors );
 			}
-			if (page!=NULL)
+			if (page!=nullptr)
 				page->setText(COLUMN_ITEM, doc->MasterPages.at(mPage)->pageName());
 		}
 		masterPageRootItem->setExpanded(true);
@@ -553,7 +553,7 @@
 			QString tmp;
 			hasError = false;
 			pageGraveError = false;
-			QTreeWidgetItem * page=NULL;
+			QTreeWidgetItem * page=nullptr;
 			if (showPagesWithoutErrors)
 			{
 				page = new QTreeWidgetItem( reportDisplay);
@@ -567,7 +567,7 @@
 			{
 				if (pageErrorsIt.key() == aPage)
 				{
-					if (page==NULL)
+					if (page==nullptr)
 					{
 						page = new QTreeWidgetItem( reportDisplay);
 						pageMap.insert(page, doc->DocPages.at(aPage));
@@ -593,7 +593,7 @@
 					(!showNonPrintingLayerErrors && doc->layerPrintable(docItemErrorsIt.key()->LayerID)))
 					)
 				{
-					if (!showPagesWithoutErrors && page==NULL)
+					if (!showPagesWithoutErrors && page==nullptr)
 					{
 						page = new QTreeWidgetItem( reportDisplay);
 						pageMap.insert(page, doc->DocPages.at(aPage));
@@ -640,10 +640,10 @@
 			}
 			else
 			{
-				if (showPagesWithoutErrors && page!=NULL)
+				if (showPagesWithoutErrors && page!=nullptr)
 					page->setIcon( 0, noErrors );
 			}
-			if (page!=NULL)
+			if (page!=nullptr)
 				page->setText(COLUMN_ITEM, tr("Page ")+tmp.setNum(aPage+1));
 		}
 		// END of PAGES

Modified: trunk/Scribus/scribus/ui/effectsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/effectsdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/effectsdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/effectsdialog.cpp	Wed May  2 19:59:47 2018
@@ -249,7 +249,7 @@
 	shade1 = new ShadeButton(WStackPage_8);
 	shade1->setValue(100);
 	WStackPage8Layout->addWidget( shade1, 1, 1 );
-	CurveD1 = new CurveWidget( NULL );
+	CurveD1 = new CurveWidget( nullptr );
 	CurveD1Pop = new QMenu();
 	CurveD1Act = new QWidgetAction(this);
 	CurveD1Act->setDefaultWidget(CurveD1);
@@ -271,7 +271,7 @@
 	shade2 = new ShadeButton(WStackPage_8);
 	shade2->setValue(100);
 	WStackPage8Layout->addWidget( shade2, 3, 1 );
-	CurveD2 = new CurveWidget( NULL );
+	CurveD2 = new CurveWidget( nullptr );
 	CurveD2Pop = new QMenu();
 	CurveD2Act = new QWidgetAction(this);
 	CurveD2Act->setDefaultWidget(CurveD2);
@@ -301,7 +301,7 @@
 	shadet1 = new ShadeButton(WStackPage_9);
 	shadet1->setValue(100);
 	WStackPage9Layout->addWidget( shadet1, 1, 1 );
-	CurveT1 = new CurveWidget( NULL );
+	CurveT1 = new CurveWidget( nullptr );
 	CurveT1Pop = new QMenu();
 	CurveT1Act = new QWidgetAction(this);
 	CurveT1Act->setDefaultWidget(CurveT1);
@@ -322,7 +322,7 @@
 	shadet2 = new ShadeButton(WStackPage_9);
 	shadet2->setValue(100);
 	WStackPage9Layout->addWidget( shadet2, 3, 1 );
-	CurveT2 = new CurveWidget( NULL );
+	CurveT2 = new CurveWidget( nullptr );
 	CurveT2Pop = new QMenu();
 	CurveT2Act = new QWidgetAction(this);
 	CurveT2Act->setDefaultWidget(CurveT2);
@@ -343,7 +343,7 @@
 	shadet3 = new ShadeButton(WStackPage_9);
 	shadet3->setValue(100);
 	WStackPage9Layout->addWidget( shadet3, 5, 1 );
-	CurveT3 = new CurveWidget( NULL );
+	CurveT3 = new CurveWidget( nullptr );
 	CurveT3Act = new QWidgetAction(this);
 	CurveT3Pop = new QMenu();
 	CurveT3Act->setDefaultWidget(CurveT3);
@@ -370,7 +370,7 @@
 	shadeq1 = new ShadeButton(WStackPage_10);
 	shadeq1->setValue(100);
 	WStackPage10Layout->addWidget( shadeq1, 1, 1 );
-	CurveQ1 = new CurveWidget( NULL );
+	CurveQ1 = new CurveWidget( nullptr );
 	CurveQ1Pop = new QMenu();
 	CurveQ1Act = new QWidgetAction(this);
 	CurveQ1Act->setDefaultWidget(CurveQ1);
@@ -391,7 +391,7 @@
 	shadeq2 = new ShadeButton(WStackPage_10);
 	shadeq2->setValue(100);
 	WStackPage10Layout->addWidget( shadeq2, 3, 1 );
-	CurveQ2 = new CurveWidget( NULL );
+	CurveQ2 = new CurveWidget( nullptr );
 	CurveQ2Pop = new QMenu();
 	CurveQ2Act = new QWidgetAction(this);
 	CurveQ2Act->setDefaultWidget(CurveQ2);
@@ -412,7 +412,7 @@
 	shadeqc3 = new ShadeButton(WStackPage_10);
 	shadeqc3->setValue(100);
 	WStackPage10Layout->addWidget( shadeqc3, 5, 1 );
-	CurveQc3 = new CurveWidget( NULL );
+	CurveQc3 = new CurveWidget( nullptr );
 	CurveQc3Pop = new QMenu();
 	CurveQc3Act = new QWidgetAction(this);
 	CurveQc3Act->setDefaultWidget(CurveQc3);
@@ -433,7 +433,7 @@
 	shadeq4 = new ShadeButton(WStackPage_10);
 	shadeq4->setValue(100);
 	WStackPage10Layout->addWidget( shadeq4, 7, 1 );
-	CurveQ4 = new CurveWidget( NULL );
+	CurveQ4 = new CurveWidget( nullptr );
 	CurveQ4Pop = new QMenu();
 	CurveQ4Act = new QWidgetAction(this);
 	CurveQ4Act->setDefaultWidget(CurveQ4);

Modified: trunk/Scribus/scribus/ui/notesstyleseditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/notesstyleseditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/notesstyleseditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/notesstyleseditor.cpp	Wed May  2 19:59:47 2018
@@ -11,7 +11,7 @@
 #include "util.h"
 
 NotesStylesEditor::NotesStylesEditor(QWidget *parent, const char *name)
-	: ScrPaletteBase(parent, name), m_Doc(NULL)
+	: ScrPaletteBase(parent, name), m_Doc(nullptr)
 {
 	setupUi(this);
 	QString pname(name);
@@ -117,12 +117,12 @@
 {
 	bool wasSignalsBlocked = signalsBlocked();
 	setBlockSignals(true);
-	if (m_Doc != NULL)
+	if (m_Doc != nullptr)
 		disconnect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
 	m_Doc = doc;
 	paraStyleCombo->setDoc(m_Doc);
 	charStyleCombo->setDoc(m_Doc);
-	if (m_Doc != NULL)
+	if (m_Doc != nullptr)
 	{
 		updateNSList();
 		NSlistBox->setCurrentIndex(0);
@@ -156,7 +156,7 @@
 {
 	bool wasSignalsBlocked = signalsBlocked();
 	NSlistBox->blockSignals(true);
-	if (m_Doc == NULL)
+	if (m_Doc == nullptr)
 		NSlistBox->setEnabled(false);
 	else
 	{
@@ -191,7 +191,7 @@
 
 void NotesStylesEditor::setNotesStyle(NotesStyle * NS)
 {
-	if (NS == NULL)
+	if (NS == nullptr)
 		return;
 	bool wasSignalsBlocked = signalsBlocked();
 	setBlockSignals(true);
@@ -282,7 +282,7 @@
 	{
 		//remember current NStyle
 		QString currNS = NSlistBox->currentText();
-		NotesStyle* NS = NULL;
+		NotesStyle* NS = nullptr;
 		
 		foreach (const QString &nsName, changesMap.keys())
 		{
@@ -311,10 +311,10 @@
 			}
 			//change settings and update marks
 			NS = m_Doc->getNotesStyle(n.name());
-			Q_ASSERT(NS != NULL);
+			Q_ASSERT(NS != nullptr);
 			if (*NS != n)
 			{
-				SimpleState* ss = NULL;
+				SimpleState* ss = nullptr;
 				if (UndoManager::instance()->undoEnabled())
 				{
 					ss = new SimpleState(UndoManager::EditNotesStyle);

Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp	(original)
+++ trunk/Scribus/scribus/ui/preview.cpp	Wed May  2 19:59:47 2018
@@ -580,7 +580,7 @@
 		options.markOffset = 0.0;
 		options.bleeds.set(0, 0, 0, 0);
 		PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
-		if (dd != NULL)
+		if (dd != nullptr)
 		{
 			dd->PS_set_file( ScPaths::tempFileDir() + "/tmp.ps");
 			ret = dd->CreatePS(doc, options);
@@ -695,7 +695,7 @@
 		options.markOffset = 0.0;
 		options.bleeds.set(0, 0, 0, 0);
 		PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
-		if (dd != NULL)
+		if (dd != nullptr)
 		{
 			dd->PS_set_file(ScPaths::tempFileDir()+"/tmp.ps");
 			ret = dd->CreatePS(doc, options);
@@ -1023,7 +1023,7 @@
 				QMap<QString, int>::Iterator sepit;
 				for (sepit = sepsToFileNum.begin(); sepit != sepsToFileNum.end(); ++sepit)
 				{
-					const QCheckBox* checkBox = flagsVisible.value(sepit.key(), NULL);
+					const QCheckBox* checkBox = flagsVisible.value(sepit.key(), nullptr);
 					if (checkBox && checkBox->isChecked())
 					{
 						QString fnam;

Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.cpp	Wed May  2 19:59:47 2018
@@ -39,7 +39,7 @@
 	m_doc  = 0;
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	m_lineMode = false;
 	m_unitRatio = 1.0;
 	m_unitIndex = 0;
@@ -97,7 +97,7 @@
 
 PageItem* PropertiesPalette_Line::currentItemFromSelection()
 {
-	PageItem *currentItem = NULL;
+	PageItem *currentItem = nullptr;
 
 	if (m_doc)
 	{
@@ -133,7 +133,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 
@@ -161,8 +161,8 @@
 
 	m_haveDoc  = false;
 	m_haveItem = false;
-	m_doc   = NULL;
-	m_item  = NULL;
+	m_doc   = nullptr;
+	m_item  = nullptr;
 
 	updateLineStyles(0);
 
@@ -172,7 +172,7 @@
 void PropertiesPalette_Line::unsetItem()
 {
 	m_haveItem = false;
-	m_item     = NULL;
+	m_item     = nullptr;
 	dashEditor->hide();
 	handleSelectionChanged();
 }
@@ -201,7 +201,7 @@
 		case PageItem::ImageFrame:
 		case PageItem::LatexFrame:
 		case PageItem::OSGFrame:
-			setEnabled(currItem->asOSGFrame() == NULL);
+			setEnabled(currItem->asOSGFrame() == nullptr);
 			break;
 		case PageItem::Line:
 			setEnabled(true);
@@ -245,7 +245,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;
 
@@ -288,9 +288,9 @@
 	if (m_item->NamedLStyle.isEmpty())
 	{
 		setter = true;
-		QListWidgetItem *itemStl = NULL;
+		QListWidgetItem *itemStl = nullptr;
 		itemStl = lineStyles->item(0);
-		if (itemStl != NULL)
+		if (itemStl != nullptr)
 			itemStl->setSelected(true);
 	}
 	else
@@ -609,14 +609,14 @@
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_doc->itemSelection_ApplyArrowScale(static_cast<int>(sc), -1, NULL);
+	m_doc->itemSelection_ApplyArrowScale(static_cast<int>(sc), -1, nullptr);
 }
 
 void PropertiesPalette_Line::handleEndArrowScale(double sc)
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
-	m_doc->itemSelection_ApplyArrowScale(-1, static_cast<int>(sc), NULL);
+	m_doc->itemSelection_ApplyArrowScale(-1, static_cast<int>(sc), nullptr);
 }
 
 void PropertiesPalette_Line::handleDashChange()

Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp	(original)
+++ trunk/Scribus/scribus/ui/proptree.cpp	Wed May  2 19:59:47 2018
@@ -114,7 +114,7 @@
 
 QWidget *PropTreeItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex &index) const
 {
-	QWidget *edito = NULL;
+	QWidget *edito = nullptr;
 	PropTreeItem* item = (PropTreeItem*) m_parent->indexToItem(index);
 	if (!item)
 		return 0;
@@ -255,7 +255,7 @@
 
 void PropTreeItemDelegate::destroyEditor(QWidget * editor, const QModelIndex & index) const
 {
-	m_edit = NULL;
+	m_edit = nullptr;
 	PropTreeItem* item = (PropTreeItem*)m_parent->indexToItem(index);
 	if (item)
 		emit item->editFinished();
@@ -440,9 +440,9 @@
 
 void PropTreeWidget::handleMousePress(QTreeWidgetItem *item)
 {
-	if (item == NULL)
+	if (item == nullptr)
 		return;
-	if (item->parent() == NULL)
+	if (item->parent() == nullptr)
 	{
 		if (!(item->flags() & Qt::ItemIsEditable))
 			setItemExpanded(item, !isItemExpanded(item));

Modified: trunk/Scribus/scribus/ui/rulermover.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/rulermover.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/rulermover.cpp	(original)
+++ trunk/Scribus/scribus/ui/rulermover.cpp	Wed May  2 19:59:47 2018
@@ -84,7 +84,7 @@
 	else if (m->button() == Qt::RightButton)
 	{
 		QMenu *pmen = new QMenu();
-		QMenu *pmen2 = NULL;
+		QMenu *pmen2 = nullptr;
 		pmen->addAction( tr("Reset Rulers"), this, SLOT(resetRulers()));
 		pmen->addAction(currView->Doc->scMW()->scrActions["viewRulerMode"]);
 		if (currView->Doc->guidesPrefs().rulerMode)

Modified: trunk/Scribus/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.cpp	Wed May  2 19:59:47 2018
@@ -519,7 +519,7 @@
 		QDir d5(name, ext, QDir::Name, QDir::Files | QDir::Readable | QDir::NoSymLinks);
 		fileCount += d5.count();
 	}
-	QProgressDialog *pgDia = NULL;
+	QProgressDialog *pgDia = nullptr;
 	QStringList previewFiles;
 	previewFiles.clear();
 	if (ScCore->initialized())
@@ -1028,7 +1028,7 @@
 
 void Biblio::closeOnDel(QString libName)
 {
-	BibView* bv = NULL;
+	BibView* bv = nullptr;
 	int libIndex = 0;
 	for (int a = 0; a < Frame3->count(); a++)
 	{

Modified: trunk/Scribus/scribus/ui/swatchcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/ui/swatchcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/swatchcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/swatchcombo.cpp	Wed May  2 19:59:47 2018
@@ -29,7 +29,7 @@
 
 SwatchCombo::SwatchCombo( QWidget* parent ) : QToolButton(parent)
 {
-	dataTree = new QTreeWidget(NULL);
+	dataTree = new QTreeWidget(nullptr);
 	dataTree->setHeaderHidden(true);
 	dataTree->setMinimumSize(QSize(140, 200));
 	popUp = new QMenu();

Modified: trunk/Scribus/scribus/util_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22516&path=/trunk/Scribus/scribus/util_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/util_printer.cpp	(original)
+++ trunk/Scribus/scribus/util_printer.cpp	Wed May  2 19:59:47 2018
@@ -34,17 +34,17 @@
 	bool done;
 	uint size;
 	LONG result = IDOK+1;
-	Qt::HANDLE handle = NULL;
+	Qt::HANDLE handle = nullptr;
 	// Get the printer handle
-	done = OpenPrinterW((LPWSTR) printerName.utf16(), &handle, NULL);
+	done = OpenPrinterW((LPWSTR) printerName.utf16(), &handle, nullptr);
 	if (!done)
 		return false;
 	// Get size of DEVMODE structure (public + private data)
-	size = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), NULL, NULL, 0);
+	size = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), nullptr, nullptr, 0);
 	// Allocate the memory needed by the DEVMODE structure
 	devModeA.resize(size);
 	// Retrieve printer default settings
-	result = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), (DEVMODEW*) devModeA.data(), NULL, DM_OUT_BUFFER);
+	result = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), (DEVMODEW*) devModeA.data(), nullptr, DM_OUT_BUFFER);
 	// Free the printer handle
 	ClosePrinter(handle);
 	return (result == IDOK);
@@ -57,13 +57,13 @@
 	bool done;
 	uint size;
 	LONG result = IDOK+1;
-	Qt::HANDLE handle = NULL;
+	Qt::HANDLE handle = nullptr;
 	// Get the printer handle
-	done = OpenPrinterW((LPWSTR) printerName.utf16(), &handle, NULL);
+	done = OpenPrinterW((LPWSTR) printerName.utf16(), &handle, nullptr);
 	if (!done)
 		return false;
 	// Get size of DEVMODE structure (public + private data)
-	size = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), NULL, NULL, 0);
+	size = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), nullptr, nullptr, 0);
 	// Compare size with DevMode structure size
 	if (devModeA.size() == size)
 	{
@@ -74,7 +74,7 @@
 	{
 		// Retrieve default settings
 		devModeA.resize(size);
-		result = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), (DEVMODEW*) devModeA.data(), NULL, DM_OUT_BUFFER);
+		result = DocumentPropertiesW((HWND) ScCore->primaryMainWindow()->winId(), handle, (LPWSTR) printerName.utf16(), (DEVMODEW*) devModeA.data(), nullptr, DM_OUT_BUFFER);
 	}
 	done = (result == IDOK);
 	// Free the printer handle
@@ -159,7 +159,7 @@
 	char technology[MAX_PATH] = {0};
 	
 	// Create the default device context
-	dc = CreateDCW(NULL, (LPCWSTR) printerName.utf16(), NULL, NULL);
+	dc = CreateDCW(nullptr, (LPCWSTR) printerName.utf16(), nullptr, nullptr);
 	if (!dc)
 	{
 		qWarning("isPostscriptPrinter() failed to create device context for %s", printerName.toLatin1().data());
@@ -167,24 +167,24 @@
 	}
 	// test if printer support the POSTSCRIPT_PASSTHROUGH escape code
 	escapeCode = POSTSCRIPT_PASSTHROUGH;
-	if (ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR) &escapeCode, 0, NULL) > 0)
+	if (ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR) &escapeCode, 0, nullptr) > 0)
 	{
 		DeleteDC(dc);
 		return true;
 	}
 	// test if printer support the POSTSCRIPT_DATA escape code
 	escapeCode = POSTSCRIPT_DATA;
-	if (ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR) &escapeCode, 0, NULL) > 0)
+	if (ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR) &escapeCode, 0, nullptr) > 0)
 	{
 		DeleteDC(dc);
 		return true;
 	}
 	// try to get postscript support by testing the printer technology
 	escapeCode = GETTECHNOLOGY;
-	if (ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR) &escapeCode, 0, NULL) > 0)
+	if (ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR) &escapeCode, 0, nullptr) > 0)
 	{
 		// if GETTECHNOLOGY is supported, then ... get technology
-		if (ExtEscape(dc, GETTECHNOLOGY, 0, NULL, MAX_PATH, (LPSTR) technology) > 0)
+		if (ExtEscape(dc, GETTECHNOLOGY, 0, nullptr, MAX_PATH, (LPSTR) technology) > 0)
 		{
 			// check technology string for postscript word
 			strupr(technology);




More information about the scribus-commit mailing list