r22505 by craig - First part of nullptr and other conversions

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 30 21:39:00 UTC 2018


Author: craig
Date: Mon Apr 30 21:39:00 2018
New Revision: 22505

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22505
Log:
First part of nullptr and other conversions

Modified:
    trunk/Scribus/CMakeLists.txt
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/colorsetmanager.cpp
    trunk/Scribus/scribus/colorsetmanager.h
    trunk/Scribus/scribus/fileloader.cpp
    trunk/Scribus/scribus/fileloader.h
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/pdflib_core.h
    trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp
    trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.h
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h
    trunk/Scribus/scribus/sccolor.h
    trunk/Scribus/scribus/scfonts.h
    trunk/Scribus/scribus/scpainter.h
    trunk/Scribus/scribus/scpaths.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribuscore.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/text/textsource.h
    trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
    trunk/Scribus/scribus/ui/scdockpalette.h
    trunk/Scribus/scribus/ui/scrpalettebase.h
    trunk/Scribus/scribus/util.cpp
    trunk/Scribus/scribus/util_color.h

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Mon Apr 30 21:39:00 2018
@@ -698,6 +698,13 @@
 	message(STATUS "Enabling C++11 compiler features")
 	set(CMAKE_CXX_STANDARD 11)
 #endif()
+if(WANT_CPP14)
+	message(STATUS "Enabling C++14 compiler features")
+	set(CMAKE_CXX_STANDARD 14)
+elseif(WANT_CPP17)
+	    message(STATUS "Enabling C++17 compiler features")
+		set(CMAKE_CXX_STANDARD 17)
+endif()
 
 #<< ZLIB, PNG
 if (WIN32)

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Mon Apr 30 21:39:00 2018
@@ -156,9 +156,9 @@
 				setModeCursor();
 				return;
 			}
-			for (int a = 0; a < m_doc->m_Selection->count(); ++a)
+			for (int i = 0; i < m_doc->m_Selection->count(); ++i)
 			{
-				currItem = m_doc->m_Selection->itemAt(a);
+				currItem = m_doc->m_Selection->itemAt(i);
 				if (currItem->locked())
 					break;
 				setModeCursor();

Modified: trunk/Scribus/scribus/colorsetmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/colorsetmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/colorsetmanager.cpp	(original)
+++ trunk/Scribus/scribus/colorsetmanager.cpp	Mon Apr 30 21:39:00 2018
@@ -175,7 +175,7 @@
 	}
 }
 
-void ColorSetManager::searchDir(QString path, QMap<QString, QString> &pList, QTreeWidgetItem* parent)
+void ColorSetManager::searchDir(const QString& path, QMap<QString, QString> &pList, QTreeWidgetItem* parent)
 {
 	QStringList exts;
 	exts << "acb" << "aco" << "ai" << "ase" << "eps" << "gpl" << "skp" << "sla" << "soc" << "xar" << "xml" << "sbz";
@@ -192,9 +192,9 @@
 			QDir sd(path + dirs[dc], "*", QDir::Name, QDir::Dirs | QDir::NoDotAndDotDot | QDir::Files | QDir::NoSymLinks);
 			if (sd.count() > 0)
 			{
-				QString setName = fi.baseName();
+				QString setName(fi.baseName());
 				setName.replace("_", " ");
-				if (parent != NULL)
+				if (parent != nullptr)
 				{
 					QTreeWidgetItem* item;
 					if (path + dirs[dc] == ScPaths::applicationDataDir()+"swatches/locked")
@@ -216,10 +216,10 @@
 		{
 			if (exts.contains(fi.suffix().toLower()))
 			{
-				QString setName = fi.baseName();
+				QString setName(fi.baseName());
 				setName.replace("_", " ");
 				pList.insert(fi.absolutePath() + "/" + setName, fi.absoluteFilePath());
-				if (parent != 0)
+				if (parent != nullptr)
 				{
 					QTreeWidgetItem* item = new QTreeWidgetItem(parent);
 					item->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);

Modified: trunk/Scribus/scribus/colorsetmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/colorsetmanager.h
==============================================================================
--- trunk/Scribus/scribus/colorsetmanager.h	(original)
+++ trunk/Scribus/scribus/colorsetmanager.h	Mon Apr 30 21:39:00 2018
@@ -32,9 +32,9 @@
 		
 		void initialiseDefaultPrefs(struct ApplicationPrefs& appPrefs);
 		void findPaletteLocations();
-		void searchDir(QString path, QMap<QString, QString> &pList, QTreeWidgetItem* parent = NULL);
-		void findPalettes(QTreeWidgetItem* parent = NULL);
-		void findUserPalettes(QTreeWidgetItem* parent = NULL);
+		void searchDir(const QString& path, QMap<QString, QString> &pList, QTreeWidgetItem* parent = nullptr);
+		void findPalettes(QTreeWidgetItem* parent = nullptr);
+		void findUserPalettes(QTreeWidgetItem* parent = nullptr);
 		QStringList paletteNames();
 		QStringList userPaletteNames();
 		

Modified: trunk/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/fileloader.cpp
==============================================================================
--- trunk/Scribus/scribus/fileloader.cpp	(original)
+++ trunk/Scribus/scribus/fileloader.cpp	Mon Apr 30 21:39:00 2018
@@ -288,7 +288,8 @@
 bool FileLoader::readStyles(ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles)
 {
 	QList<FileFormat>::const_iterator it;
-	if (findFormat(m_fileType, it)) {
+	if (findFormat(m_fileType, it))
+	{
 		it->plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
 		return it->readStyles(m_fileName, doc, docParagraphStyles);
 	}
@@ -298,7 +299,8 @@
 bool FileLoader::readCharStyles(ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles)
 {
 	QList<FileFormat>::const_iterator it;
-	if (findFormat(m_fileType, it)) {
+	if (findFormat(m_fileType, it))
+	{
 		it->plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(m_prefsManager->appPrefs.fontPrefs.AvailFonts));
 		return it->readCharStyles(m_fileName, doc, docCharStyles);
 	}
@@ -345,75 +347,75 @@
 	vg.setGapAfter(ScCLocale::toDoubleC(pg.attribute("NACH"), 0.0));
 	QString tmpf(pg.attribute("FONT", currDoc->itemToolPrefs().textFont));
 	currDoc->AllFonts->findFont(tmpf, currDoc);
-		vg.charStyle().setFont((*currDoc->AllFonts)[tmpf]);
-		vg.charStyle().setFontSize(qRound(ScCLocale::toDoubleC(pg.attribute("FONTSIZE"), 12.0) * 10.0));
-		vg.setHasDropCap(static_cast<bool>(pg.attribute("DROP", "0").toInt()));
-		vg.setPeCharStyleName(pg.attribute("DROPCHSTYLE", ""));
-		vg.setPeCharStyleName(pg.attribute("PECHSTYLE", ""));
-		vg.setDropCapLines(pg.attribute("DROPLIN", "2").toInt());
-		vg.setParEffectOffset(ScCLocale::toDoubleC(pg.attribute("DROPDIST"), 0.0));
-		vg.setParEffectOffset(ScCLocale::toDoubleC(pg.attribute("PEDIST"), 0.0));
-		vg.charStyle().setFeatures(static_cast<StyleFlag>(pg.attribute("EFFECT", "0").toInt()).featureList());
-		vg.charStyle().setFillColor(pg.attribute("FCOLOR", currDoc->itemToolPrefs().shapeFillColor));
-		vg.charStyle().setFillShade(pg.attribute("FSHADE", "100").toInt());
-		vg.charStyle().setStrokeColor(pg.attribute("SCOLOR", currDoc->itemToolPrefs().shapeLineColor));
-		vg.charStyle().setStrokeShade(pg.attribute("SSHADE", "100").toInt());
-		if (static_cast<bool>(pg.attribute("BASE", "0").toInt()))
-			vg.setLineSpacingMode(ParagraphStyle::BaselineGridLineSpacing);
-		vg.charStyle().setShadowXOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSHX"), 5.0)) * 10);
-		vg.charStyle().setShadowYOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSHY"), -5.0)) * 10);
-		vg.charStyle().setOutlineWidth(qRound(ScCLocale::toDoubleC(pg.attribute("TXTOUT"), 1.0)) * 10);
-		vg.charStyle().setUnderlineOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTULP"), -0.1)) * 10);
-		vg.charStyle().setUnderlineWidth(qRound(ScCLocale::toDoubleC(pg.attribute("TXTULW"), -0.1)) * 10);
-		vg.charStyle().setStrikethruOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSTP"), -0.1)) * 10);
-		vg.charStyle().setStrikethruWidth(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSTW"), -0.1)) * 10);
-		vg.charStyle().setScaleH(qRound(ScCLocale::toDoubleC(pg.attribute("SCALEH"), 100.0)) * 10);
-		vg.charStyle().setScaleV(qRound(ScCLocale::toDoubleC(pg.attribute("SCALEV"), 100.0)) * 10);
-		vg.charStyle().setBaselineOffset(qRound(ScCLocale::toDoubleC(pg.attribute("BASEO"), 0.0)) * 10);
-		vg.charStyle().setTracking(qRound(ScCLocale::toDoubleC(pg.attribute("KERN"), 0.0)) * 10);
-		if ((pg.hasAttribute("NUMTAB")) && (pg.attribute("NUMTAB", "0").toInt() != 0))
-		{
-			QList<ParagraphStyle::TabRecord> tbs;
-			ParagraphStyle::TabRecord tb;
-			QString tmp = pg.attribute("TABS");
-			QTextStream tgv(&tmp, QIODevice::ReadOnly);
-			QString xf, xf2;
-			for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
+	vg.charStyle().setFont((*currDoc->AllFonts)[tmpf]);
+	vg.charStyle().setFontSize(qRound(ScCLocale::toDoubleC(pg.attribute("FONTSIZE"), 12.0) * 10.0));
+	vg.setHasDropCap(static_cast<bool>(pg.attribute("DROP", "0").toInt()));
+	vg.setPeCharStyleName(pg.attribute("DROPCHSTYLE", ""));
+	vg.setPeCharStyleName(pg.attribute("PECHSTYLE", ""));
+	vg.setDropCapLines(pg.attribute("DROPLIN", "2").toInt());
+	vg.setParEffectOffset(ScCLocale::toDoubleC(pg.attribute("DROPDIST"), 0.0));
+	vg.setParEffectOffset(ScCLocale::toDoubleC(pg.attribute("PEDIST"), 0.0));
+	vg.charStyle().setFeatures(static_cast<StyleFlag>(pg.attribute("EFFECT", "0").toInt()).featureList());
+	vg.charStyle().setFillColor(pg.attribute("FCOLOR", currDoc->itemToolPrefs().shapeFillColor));
+	vg.charStyle().setFillShade(pg.attribute("FSHADE", "100").toInt());
+	vg.charStyle().setStrokeColor(pg.attribute("SCOLOR", currDoc->itemToolPrefs().shapeLineColor));
+	vg.charStyle().setStrokeShade(pg.attribute("SSHADE", "100").toInt());
+	if (static_cast<bool>(pg.attribute("BASE", "0").toInt()))
+		vg.setLineSpacingMode(ParagraphStyle::BaselineGridLineSpacing);
+	vg.charStyle().setShadowXOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSHX"), 5.0)) * 10);
+	vg.charStyle().setShadowYOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSHY"), -5.0)) * 10);
+	vg.charStyle().setOutlineWidth(qRound(ScCLocale::toDoubleC(pg.attribute("TXTOUT"), 1.0)) * 10);
+	vg.charStyle().setUnderlineOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTULP"), -0.1)) * 10);
+	vg.charStyle().setUnderlineWidth(qRound(ScCLocale::toDoubleC(pg.attribute("TXTULW"), -0.1)) * 10);
+	vg.charStyle().setStrikethruOffset(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSTP"), -0.1)) * 10);
+	vg.charStyle().setStrikethruWidth(qRound(ScCLocale::toDoubleC(pg.attribute("TXTSTW"), -0.1)) * 10);
+	vg.charStyle().setScaleH(qRound(ScCLocale::toDoubleC(pg.attribute("SCALEH"), 100.0)) * 10);
+	vg.charStyle().setScaleV(qRound(ScCLocale::toDoubleC(pg.attribute("SCALEV"), 100.0)) * 10);
+	vg.charStyle().setBaselineOffset(qRound(ScCLocale::toDoubleC(pg.attribute("BASEO"), 0.0)) * 10);
+	vg.charStyle().setTracking(qRound(ScCLocale::toDoubleC(pg.attribute("KERN"), 0.0)) * 10);
+	if ((pg.hasAttribute("NUMTAB")) && (pg.attribute("NUMTAB", "0").toInt() != 0))
+	{
+		QList<ParagraphStyle::TabRecord> tbs;
+		ParagraphStyle::TabRecord tb;
+		QString tmp = pg.attribute("TABS");
+		QTextStream tgv(&tmp, QIODevice::ReadOnly);
+		QString xf, xf2;
+		for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
+		{
+			tgv >> xf;
+			tgv >> xf2;
+			tb.tabPosition = ScCLocale::toDoubleC(xf2);
+			tb.tabType = static_cast<int>(ScCLocale::toDoubleC(xf));
+			tb.tabFillChar =  QChar();
+			tbs.append(tb);
+		}
+		vg.setTabValues(tbs);
+		tmp = "";
+	}
+	else
+	{
+		QList<ParagraphStyle::TabRecord> tbs;
+		QDomNode IT = pg.firstChild();
+		while(!IT.isNull())
+		{
+			QDomElement it = IT.toElement();
+			if (it.tagName()=="Tabs")
 			{
-				tgv >> xf;
-				tgv >> xf2;
-				tb.tabPosition = ScCLocale::toDoubleC(xf2);
-				tb.tabType = static_cast<int>(ScCLocale::toDoubleC(xf));
-				tb.tabFillChar =  QChar();
+				ParagraphStyle::TabRecord tb;
+				tb.tabPosition = ScCLocale::toDoubleC(it.attribute("Pos"));
+				tb.tabType = it.attribute("Type").toInt();
+				QString tbCh = "";
+				tbCh = it.attribute("Fill","");
+				if (tbCh.isEmpty())
+					tb.tabFillChar = QChar();
+				else
+					tb.tabFillChar = tbCh[0];
 				tbs.append(tb);
 			}
-			vg.setTabValues(tbs);
-			tmp = "";
-		}
-		else
-		{
-			QList<ParagraphStyle::TabRecord> tbs;
-			QDomNode IT = pg.firstChild();
-			while(!IT.isNull())
-			{
-				QDomElement it = IT.toElement();
-				if (it.tagName()=="Tabs")
-				{
-					ParagraphStyle::TabRecord tb;
-					tb.tabPosition = ScCLocale::toDoubleC(it.attribute("Pos"));
-					tb.tabType = it.attribute("Type").toInt();
-					QString tbCh = "";
-					tbCh = it.attribute("Fill","");
-					if (tbCh.isEmpty())
-						tb.tabFillChar = QChar();
-					else
-						tb.tabFillChar = tbCh[0];
-					tbs.append(tb);
-				}
-				IT=IT.nextSibling();
-			}
-			vg.setTabValues(tbs);
-		}
+			IT=IT.nextSibling();
+		}
+		vg.setTabValues(tbs);
+	}
 }
 
 QImage FileLoader::readThumbnail()
@@ -430,31 +432,25 @@
 	if (m_ReplacedFonts.isEmpty())
 		return true;
 
-	if ((m_prefsManager->appPrefs.fontPrefs.askBeforeSubstitute))
-	{
-		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-		FontReplaceDialog dia(0, &m_ReplacedFonts);
-		if (dia.exec())
-		{
-			QMap<QString,QString>::Iterator itfsu;
-			for (itfsu = m_ReplacedFonts.begin(); itfsu != m_ReplacedFonts.end(); ++itfsu)
-			{
-				if (dia.stickyReplacements->isChecked())
-					m_prefsManager->appPrefs.fontPrefs.GFontSub[itfsu.key()] = itfsu.value();
-			}
-			currDoc->AllFonts->setSubstitutions(m_ReplacedFonts, currDoc);
-			ResourceCollection repl;
-			repl.availableFonts = currDoc->AllFonts;
-			repl.mapFonts(m_ReplacedFonts);
-			currDoc->replaceNamedResources(repl);
-			return true;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
+	if (!(m_prefsManager->appPrefs.fontPrefs.askBeforeSubstitute))
+		return true;
+
+	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+	FontReplaceDialog dia(nullptr, &m_ReplacedFonts);
+	if (!dia.exec())
+		return false;
+
+	QMap<QString,QString>::Iterator itfsu;
+	for (itfsu = m_ReplacedFonts.begin(); itfsu != m_ReplacedFonts.end(); ++itfsu)
+	{
+		if (dia.stickyReplacements->isChecked())
+			m_prefsManager->appPrefs.fontPrefs.GFontSub[itfsu.key()] = itfsu.value();
+	}
+	currDoc->AllFonts->setSubstitutions(m_ReplacedFonts, currDoc);
+	ResourceCollection repl;
+	repl.availableFonts = currDoc->AllFonts;
+	repl.mapFonts(m_ReplacedFonts);
+	currDoc->replaceNamedResources(repl);
 	return true;
 }
 

Modified: trunk/Scribus/scribus/fileloader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/fileloader.h
==============================================================================
--- trunk/Scribus/scribus/fileloader.h	(original)
+++ trunk/Scribus/scribus/fileloader.h	Mon Apr 30 21:39:00 2018
@@ -32,14 +32,14 @@
 	Q_OBJECT
 public:
 	FileLoader(const QString & fileName);
-	~FileLoader() {};
+	~FileLoader() {}
 
 	int  fileType() const { return m_fileType; }
 	int  testFile();
 
 	bool loadPage(ScribusDoc* currDoc, int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
 	bool loadFile(ScribusDoc* currDoc);
-	bool saveFile(const QString& fileName, ScribusDoc *doc, QString *savedFile = NULL);
+	bool saveFile(const QString& fileName, ScribusDoc *doc, QString *savedFile = nullptr);
 	bool readStyles(ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles);
 	bool readCharStyles(ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles);
 	bool readPageCount(int *num1, int *num2, QStringList & masterPageNames);

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Mon Apr 30 21:39:00 2018
@@ -11489,7 +11489,7 @@
 		qDebug("%s", errorMsg.toLocal8Bit().data());
 }
 
-void PDFLibCore::PDF_Error_WriteFailure(void)
+void PDFLibCore::PDF_Error_WriteFailure()
 {
 	PDF_Error( tr("A write error occurred, please check available disk space") );
 }
@@ -11509,7 +11509,7 @@
 	PDF_Error( tr("Failed to load an image mask : %1").arg(fileName) );
 }
 
-void PDFLibCore::PDF_Error_InsufficientMemory(void)
+void PDFLibCore::PDF_Error_InsufficientMemory()
 {
 	PDF_Error( tr("Insufficient memory for processing an image"));
 }

Modified: trunk/Scribus/scribus/pdflib_core.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/pdflib_core.h
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.h	(original)
+++ trunk/Scribus/scribus/pdflib_core.h	Mon Apr 30 21:39:00 2018
@@ -66,8 +66,7 @@
 public:
 	explicit PDFLibCore(ScribusDoc & docu);
 	~PDFLibCore();
-	bool doExport(const QString& fn, const QString& nam, int Components,
-				  const std::vector<int> & pageNs, const QMap<int, QImage> & thumbs);
+	bool doExport(const QString& fn, const QString& nam, int Components, const std::vector<int> & pageNs, const QMap<int, QImage> & thumbs);
 
 	const QString& errorMessage(void) const;
 	bool  exportAborted(void) const;
@@ -140,11 +139,11 @@
 	bool closeAndCleanup();
 
 	void PDF_Error(const QString& errorMsg);
-	void PDF_Error_WriteFailure(void);
+	void PDF_Error_WriteFailure();
 	void PDF_Error_ImageLoadFailure(const QString& fileName);
 	void PDF_Error_ImageWriteFailure(const QString& fileName);
 	void PDF_Error_MaskLoadFailure(const QString& fileName);
-	void PDF_Error_InsufficientMemory(void);
+	void PDF_Error_InsufficientMemory();
 
 //	QByteArray EncodeUTF16(const QString &in);
 	QByteArray EncStream(const QByteArray & in, PdfId ObjNum);
@@ -223,7 +222,7 @@
 	bool    PDF_Annotation(PageItem *ite, uint PNr);
 	void    PDF_Form(const QByteArray& im);
 	void    PDF_xForm(uint objNr, double w, double h, QByteArray im);
-	bool    PDF_Image(PageItem* c, const QString& fn, double sx, double sy, double x, double y, bool fromAN = false, const QString& Profil = "", bool Embedded = false, eRenderIntent Intent = Intent_Relative_Colorimetric, QByteArray* output = NULL);
+	bool    PDF_Image(PageItem* c, const QString& fn, double sx, double sy, double x, double y, bool fromAN = false, const QString& Profil = "", bool Embedded = false, eRenderIntent Intent = Intent_Relative_Colorimetric, QByteArray* output = nullptr);
 	bool    PDF_EmbeddedPDF(PageItem* c, const QString& fn, double sx, double sy, double x, double y, bool fromAN, ShIm& imgInfo, bool &fatalError);
 #if HAVE_PODOFO
 	void copyPoDoFoObject(const PoDoFo::PdfObject* obj, uint scObjID, QMap<PoDoFo::PdfReference, uint>& importedObjects);

Modified: trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp	Mon Apr 30 21:39:00 2018
@@ -33,7 +33,7 @@
 #include <gtfont.h>
 #include <QByteArray>
  
-StyleReader* StyleReader::sreader = NULL;
+StyleReader* StyleReader::sreader = nullptr;
  
 extern xmlSAXHandlerPtr sSAXHandler;
  
@@ -47,9 +47,9 @@
 	importTextOnly = textOnly;
 	usePrefix    = prefix;
 	packStyles   = combineStyles;
-	currentStyle = 0;
-	currentListStyle = 0;
-	parentStyle  = 0;
+	currentStyle = nullptr;
+	currentListStyle = nullptr;
+	parentStyle  = nullptr;
 	inList       = false;
 	currentList  = "";
 	defaultStyleCreated = false;
@@ -104,7 +104,7 @@
 					plist = styles[QString(currentList + "_%1").arg(level)]; 
 				}
 				gtParagraphStyle *pstyle;
-				if (plist == NULL)
+				if (plist == nullptr)
 				{
 					if (styles.contains("default-style"))
 						plist = new gtStyle(*(styles["default-style"]));
@@ -119,7 +119,7 @@
 				if (plist->target() == "paragraph")
 				{
 					pstyle = dynamic_cast<gtParagraphStyle*>(plist);
-					assert(pstyle != NULL);
+					assert(pstyle != nullptr);
 					gtParagraphStyle* tmp = new gtParagraphStyle(*pstyle);
 					currentStyle = tmp;
 				}
@@ -169,7 +169,7 @@
 		readProperties = true;
 
 		gtParagraphStyle* s = dynamic_cast<gtParagraphStyle*>(currentStyle);
-		assert(s != NULL);
+		assert(s != nullptr);
 		if (bstyle == Bullet || bstyle == Graphic)
 		{
 			s->setBullet(true, bullet);
@@ -194,7 +194,7 @@
 					if (ok)
 					{
 						gtParagraphStyle* s = dynamic_cast<gtParagraphStyle*>(currentStyle);
-						assert(s != NULL);
+						assert(s != nullptr);
 						s->setDropCapHeight(dh);
 						s->setDropCap(true);
 					}
@@ -228,7 +228,7 @@
  
 void StyleReader::defaultStyle(const QXmlAttributes& attrs)
 {
-	currentStyle = NULL;
+	currentStyle = nullptr;
 	for (int i = 0; i < attrs.count(); ++i)
 		if (attrs.localName(i) == "style:family")
 			if (attrs.value(i) == "paragraph")
@@ -244,15 +244,15 @@
  
 void StyleReader::styleProperties(const QXmlAttributes& attrs)
 {
-	if ((currentStyle == NULL) || (!readProperties))
+	if ((currentStyle == nullptr) || (!readProperties))
 		return;
-	gtParagraphStyle* pstyle = NULL;
+	gtParagraphStyle* pstyle = nullptr;
 	if (currentStyle->target() == "paragraph")
 		pstyle = dynamic_cast<gtParagraphStyle*>(currentStyle);
 	else
-		pstyle = NULL;
-	QString align = NULL;
-	QString force = NULL;
+		pstyle = nullptr;
+	QString align;
+	QString force;
 	bool hasColorTag = false;
 	for (int i = 0; i < attrs.count(); ++i)
 	{
@@ -262,7 +262,7 @@
 		{
 			double size = 0;
 			double psize = 0;
-			if (parentStyle != NULL)
+			if (parentStyle != nullptr)
 				psize = static_cast<double>(parentStyle->getFont()->getSize());
 			else if (styles.contains("default-style"))
 				psize = static_cast<double>(styles["default-style"]->getFont()->getSize());
@@ -274,13 +274,13 @@
 			if (pstyle)
 				pstyle->setLineSpacing(writer->getPreferredLineSpacing(nsize));
 		}
-		else if ((attrs.localName(i) == "fo:line-height") && (parentStyle != NULL))
+		else if ((attrs.localName(i) == "fo:line-height") && (parentStyle != nullptr))
 		{
 			gtParagraphStyle* ppstyle;
 			if (parentStyle->target() == "paragraph")
 			{
 				ppstyle = dynamic_cast<gtParagraphStyle*>(parentStyle);
-				assert(ppstyle != NULL);
+				assert(ppstyle != nullptr);
 				ppstyle->setLineSpacing(getSize(attrs.value(i), writer->getPreferredLineSpacing(currentStyle->getFont()->getSize())));
 			}
 		}
@@ -322,32 +322,32 @@
 				(((attrs.value(i)).indexOf("super") != -1) || 
 				(((attrs.value(i)).left(1) != "-") && ((attrs.value(i)).left(1) != "0"))))
 			currentStyle->getFont()->toggleEffect(SUPERSCRIPT);
-		else if ((attrs.localName(i) == "fo:margin-top") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "fo:margin-top") && (pstyle != nullptr))
 			pstyle->setSpaceAbove(getSize(attrs.value(i)));
-		else if ((attrs.localName(i) == "fo:margin-bottom") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "fo:margin-bottom") && (pstyle != nullptr))
 			pstyle->setSpaceBelow(getSize(attrs.value(i)));
-		else if ((attrs.localName(i) == "fo:margin-left") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "fo:margin-left") && (pstyle != nullptr))
 		{
 			if (inList)
 				pstyle->setIndent(pstyle->getIndent() + getSize(attrs.value(i)));
 			else
 				pstyle->setIndent(getSize(attrs.value(i)));	
 		}
-		else if ((attrs.localName(i) == "text:space-before") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "text:space-before") && (pstyle != nullptr))
 		{
 			/*if (inList)
 				pstyle->setIndent(pstyle->getIndent() + getSize(attrs.value(i)));
 			else*/
 				pstyle->setIndent(getSize(attrs.value(i)));
 		}
-		else if ((attrs.localName(i) == "fo:text-indent") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "fo:text-indent") && (pstyle != nullptr))
 			pstyle->setFirstLineIndent(getSize(attrs.value(i)));
-		else if ((attrs.localName(i) == "fo:text-align") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "fo:text-align") && (pstyle != nullptr))
 			align = attrs.value(i);
-		else if ((attrs.localName(i) == "style:justify-single-word") && (pstyle != NULL))
+		else if ((attrs.localName(i) == "style:justify-single-word") && (pstyle != nullptr))
 			force = attrs.value(i);
 	}
-	// Qt4 NULL -> isNull()
+
 	if (!align.isNull())
 	{
 		if (align == "end")
@@ -368,8 +368,8 @@
  
 void StyleReader::styleStyle(const QXmlAttributes& attrs)
 {
-	QString name = "";
-	QString listName = NULL;
+	QString name;
+	QString listName;
 	bool setDefaultStyle = false;
 	bool isParaStyle = false;
 	bool create = true;
@@ -412,17 +412,17 @@
 			if (styles.contains(attrs.value(i)))
 				parentStyle = styles[attrs.value(i)];
 			else
-				parentStyle = NULL;
+				parentStyle = nullptr;
 		}
 		else if (attrs.localName(i) == "style:list-style-name")
 			listName = attrs.value(i);
 	}
-	if ((parentStyle == NULL) && (styles.contains("default-style")))
+	if ((parentStyle == nullptr) && (styles.contains("default-style")))
 		parentStyle = styles["default-style"];
 
 	if (create)
 	{
-		if (parentStyle == NULL)
+		if (parentStyle == nullptr)
 		{
 			parentStyle = new gtStyle("tmp-parent");
 		}
@@ -432,7 +432,7 @@
 			if (parentStyle->target() == "paragraph")
 			{
 				tmpP = dynamic_cast<gtParagraphStyle*>(parentStyle);
-				assert(tmpP != NULL);
+				assert(tmpP != nullptr);
 				gtParagraphStyle* tmp = new gtParagraphStyle(*tmpP);
 	// 				tmp->setAutoLineSpacing(true);
 				currentStyle = tmp;
@@ -460,7 +460,7 @@
 		}
 	}
 	else
-		currentStyle = NULL;
+		currentStyle = nullptr;
 }
  
 void StyleReader::tabStop(const QXmlAttributes& attrs)
@@ -468,9 +468,9 @@
 	if (currentStyle->target() == "paragraph")
 	{
 		gtParagraphStyle* pstyle = dynamic_cast<gtParagraphStyle*>(currentStyle);
-		assert(pstyle != NULL);
-		QString pos = NULL;
-		QString type = NULL;
+		assert(pstyle != nullptr);
+		QString pos;
+		QString type;
 		for (int i = 0; i < attrs.count(); ++i)
 		{
 			if (attrs.localName(i) == "style:position")
@@ -498,17 +498,17 @@
  
 bool StyleReader::endElement(const QString&, const QString&, const QString &name)
 {
-	if ((name == "style:default-style") && (currentStyle != NULL) && (readProperties))
+	if ((name == "style:default-style") && (currentStyle != nullptr) && (readProperties))
 	{
 		setStyle(currentStyle->getName(), currentStyle);
-		currentStyle = NULL;
-		parentStyle = NULL;
+		currentStyle = nullptr;
+		parentStyle = nullptr;
 		readProperties = false;
 	}
 	else if (((name == "style:style") || 
 			  (name == "text:list-level-style-bullet") || 
 			  (name == "text:list-level-style-number") ||
-			  (name == "text:list-level-style-image")) && (currentStyle != NULL))
+	          (name == "text:list-level-style-image")) && (currentStyle != nullptr))
 	{
 		if ((name == "text:list-level-style-bullet"))
 		{
@@ -523,8 +523,8 @@
 				s->setNum(true);
 		}
 		setStyle(currentStyle->getName(), currentStyle);
-		currentStyle = NULL;
-		parentStyle = NULL;
+		currentStyle = nullptr;
+		parentStyle = nullptr;
 		readProperties = false;
 	}
 	else if (name == "text:list-style")
@@ -539,7 +539,7 @@
 	return true;
 }
  
-void StyleReader::parse(QString fileName)
+void StyleReader::parse(const QString& fileName)
 {
 #if defined(_WIN32)
 	QString fname = QDir::toNativeSeparators(fileName);
@@ -550,7 +550,7 @@
 	xmlSAXParseFile(sSAXHandler, fn.data(), 1);
 }
 
-gtStyle* StyleReader::getDefaultStyle(void)
+gtStyle* StyleReader::getDefaultStyle()
 {
 	gtStyle* defStyle = writer->getDefaultStyle();
 	StyleMap::Iterator it, itEnd = styles.end();
@@ -588,7 +588,7 @@
 	if ((style->target() == "paragraph") && (packStyles))
 	{
 		s = dynamic_cast<gtParagraphStyle*>(style);
-		assert(s != NULL);
+		assert(s != nullptr);
 		QString nameByAttrs = QString("%1-").arg(s->getSpaceAbove());
 		nameByAttrs += QString("%1-").arg(s->getSpaceBelow());
 		nameByAttrs += QString("%1-").arg(s->getLineSpacing());
@@ -680,13 +680,13 @@
 
 bool StyleReader::updateStyle(gtStyle* style, gtStyle* parent2Style, const QString& key, const QString& value)
 {
-	gtParagraphStyle* pstyle = NULL;
+	gtParagraphStyle* pstyle = nullptr;
 	if (style->target() == "paragraph")
 		pstyle = dynamic_cast<gtParagraphStyle*>(style);
 	else
-		pstyle = NULL;
-	QString align = NULL;
-	QString force = NULL;
+		pstyle = nullptr;
+	QString align;
+	QString force;
 
 	if (key == "style:font-name")
 		style->getFont()->setName(getFont(value));
@@ -694,7 +694,7 @@
 	{
 		double size = 0;
 		double psize = 0;
-		if (parent2Style != NULL)
+		if (parent2Style != nullptr)
 			psize = static_cast<double>(parent2Style->getFont()->getSize());
 		else if (styles.contains("default-style"))
 			psize = static_cast<double>(styles["default-style"]->getFont()->getSize());
@@ -705,13 +705,13 @@
 		if (pstyle)
 			pstyle->setLineSpacing(writer->getPreferredLineSpacing(nsize));
 	}
-	else if ((key == "fo:line-height") && (parent2Style != NULL))
+	else if ((key == "fo:line-height") && (parent2Style != nullptr))
 	{
 		gtParagraphStyle* ppstyle;
 		if (parent2Style->target() == "paragraph")
 		{
 			ppstyle = dynamic_cast<gtParagraphStyle*>(parent2Style);
-			assert(ppstyle != NULL);
+			assert(ppstyle != nullptr);
 			ppstyle->setLineSpacing(getSize(value, writer->getPreferredLineSpacing(style->getFont()->getSize())));
 		}
 	}
@@ -747,29 +747,29 @@
 			(((value).indexOf("super") != -1) || 
 			(((value).left(1) != "-") && ((value).left(1) != "0"))))
 		style->getFont()->toggleEffect(SUPERSCRIPT);
-	else if ((key == "fo:margin-top") && (pstyle != NULL))
+	else if ((key == "fo:margin-top") && (pstyle != nullptr))
 		pstyle->setSpaceAbove(getSize(value));
-	else if ((key == "fo:margin-bottom") && (pstyle != NULL))
+	else if ((key == "fo:margin-bottom") && (pstyle != nullptr))
 		pstyle->setSpaceBelow(getSize(value));
-	else if ((key == "fo:margin-left") && (pstyle != NULL))
+	else if ((key == "fo:margin-left") && (pstyle != nullptr))
 	{
 		if (inList)
 			pstyle->setIndent(pstyle->getIndent() + getSize(value));
 		else
 			pstyle->setIndent(getSize(value));	
 	}
-	else if ((key == "text:space-before") && (pstyle != NULL))
+	else if ((key == "text:space-before") && (pstyle != nullptr))
 	{
 		if (inList)
 			pstyle->setIndent(pstyle->getIndent() + getSize(value));
 		else
 			pstyle->setIndent(getSize(value));	
 	}
-	else if ((key == "fo:text-indent") && (pstyle != NULL))
+	else if ((key == "fo:text-indent") && (pstyle != nullptr))
 		pstyle->setFirstLineIndent(getSize(value));
-	else if ((key == "fo:text-align") && (pstyle != NULL))
+	else if ((key == "fo:text-align") && (pstyle != nullptr))
 		align = value;
-	else if ((key == "style:justify-single-word") && (pstyle != NULL))
+	else if ((key == "style:justify-single-word") && (pstyle != nullptr))
 		force = value;
 
 	if (!align.isNull())
@@ -846,53 +846,53 @@
  
 StyleReader::~StyleReader()
 {
-	sreader = NULL;
+	sreader = nullptr;
 	StyleMap::Iterator it;
 	for (it = styles.begin(); it != styles.end(); ++it)
 	{
 		if (it.value())
 		{
 			delete it.value();
-			it.value() = NULL;
+			it.value() = nullptr;
 		}
 	}
 }
  
 xmlSAXHandler sSAXHandlerStruct = {
-	NULL, // internalSubset,
-	NULL, // isStandalone,
-	NULL, // hasInternalSubset,
-	NULL, // hasExternalSubset,
-	NULL, // resolveEntity,
-	NULL, // getEntity,
-	NULL, // entityDecl,
-	NULL, // notationDecl,
-	NULL, // attributeDecl,
-	NULL, // elementDecl,
-	NULL, // unparsedEntityDecl,
-	NULL, // setDocumentLocator,
-	NULL, // startDocument,
-	NULL, // endDocument,
+    nullptr, // internalSubset,
+    nullptr, // isStandalone,
+    nullptr, // hasInternalSubset,
+    nullptr, // hasExternalSubset,
+    nullptr, // resolveEntity,
+    nullptr, // getEntity,
+    nullptr, // entityDecl,
+    nullptr, // notationDecl,
+    nullptr, // attributeDecl,
+    nullptr, // elementDecl,
+    nullptr, // unparsedEntityDecl,
+    nullptr, // setDocumentLocator,
+    nullptr, // startDocument,
+    nullptr, // endDocument,
 	StyleReader::startElement,
 	StyleReader::endElement,
-	NULL, // reference,
-	NULL, // characters
-	NULL, // ignorableWhitespace,
-	NULL, // processingInstruction,
-	NULL, // comment,
-	NULL, // warning,
-	NULL, // error,
-	NULL, // fatalError,
-	NULL, // getParameterEntity,
-	NULL, // cdata,
-	NULL,
-	1
+    nullptr, // reference,
+    nullptr, // characters
+    nullptr, // ignorableWhitespace,
+    nullptr, // processingInstruction,
+    nullptr, // comment,
+    nullptr, // warning,
+    nullptr, // error,
+    nullptr, // fatalError,
+    nullptr, // getParameterEntity,
+    nullptr, // cdata,
+    nullptr,
+    1
 #ifdef HAVE_XML26
 	,
-	NULL,
-	NULL,
-	NULL,
-	NULL
+    nullptr,
+    nullptr,
+    nullptr,
+    nullptr
 #endif
 };
  
@@ -908,14 +908,14 @@
 		for(const xmlChar** cur = atts; cur && *cur; cur += 2)
 			attrs->append(QString((char*)*cur), NULL, QString((char*)*cur), QString((char*)*(cur + 1)));
 	}
-	sreader->startElement(NULL, NULL, *name, *attrs);
+	sreader->startElement(nullptr, NULL, *name, *attrs);
 }
  
 void StyleReader::endElement(void*, const xmlChar * name)
 {
 	QString *nname = new QString((const char*) name);
 	nname = new QString(nname->toLower());
-	sreader->endElement(NULL, NULL, *nname);
+	sreader->endElement(nullptr, nullptr, *nname);
 }
 
 /*** ListLevel *****************************************************************************************/

Modified: trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.h
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.h	(original)
+++ trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.h	Mon Apr 30 21:39:00 2018
@@ -152,7 +152,7 @@
 	static void endElement(void *user_data, const xmlChar * name);
 	bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
 	bool endElement(const QString&, const QString&, const QString &name);
-	void parse(QString fileName);
+	void parse(const QString& fileName);
 	gtStyle* getDefaultStyle(void);
 	gtStyle* getStyle(const QString& name);
 	void setStyle(const QString& name, gtStyle* style);

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	Mon Apr 30 21:39:00 2018
@@ -372,7 +372,7 @@
 		doc->AddFont(font);
 }
 
-QString XtgScanner::getFontName(QString name)
+QString XtgScanner::getFontName(const QString& name)
 {
 	QString fontName = name;
 	SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
@@ -1528,7 +1528,7 @@
 	while (lookAhead() != QChar('\0'))
 	{
 		token = getToken();
-		QHash<QString,void (XtgScanner::*)(void)> *temp = NULL;
+		QHash<QString,void (XtgScanner::*)(void)> *temp = nullptr;
 		if (Mode == tagMode)
 			temp = &tagModeHash;
 		else if (Mode == nameMode)

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.h	Mon Apr 30 21:39:00 2018
@@ -169,7 +169,7 @@
 	 */
 	bool styleStatus(QStringList &name,QString &sfcname);
 
-	QString getFontName(QString name);
+	QString getFontName(const QString& name);
 
 	/** Set Functions for setting the styles */
 	void setPlain();

Modified: trunk/Scribus/scribus/sccolor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/sccolor.h
==============================================================================
--- trunk/Scribus/scribus/sccolor.h	(original)
+++ trunk/Scribus/scribus/sccolor.h	Mon Apr 30 21:39:00 2018
@@ -127,10 +127,10 @@
 	QString name() const;
 	/** \brief Returns the ScColor as an Hex-String in the Form #RRGGBB
 	* If doc member is not specified, return meaningful result only for RGB colors. */
-	QString nameRGB(const ScribusDoc* doc = NULL) const;
+	QString nameRGB(const ScribusDoc* doc = nullptr) const;
 	/** \brief Returns the ScColor as an Hex-String in the Form #CCYYMMKK
 	* If doc member is not specified, return meaningful result only for CMYK colors. */
-	QString nameCMYK(const ScribusDoc* doc = NULL) const;
+	QString nameCMYK(const ScribusDoc* doc = nullptr) const;
 
 	/** \brief Sets the Values of a color from an Hex-String in the Form #CCMMYYKK or #RRGGBB */
 	void setNamedColor(QString nam);
@@ -179,12 +179,12 @@
 	void ensureRegistration(void);
 
 public:
-	ColorList(ScribusDoc* doc = NULL, bool retainDoc = false);
+	ColorList(ScribusDoc* doc = nullptr, bool retainDoc = false);
 
 	ColorList& operator= (const ColorList& list);
 
 	/** \brief Get the document the list is related , return in cpp due to scribusdoc class delcaration */
-	ScribusDoc* document(void) const;
+	ScribusDoc* document() const;
 
 	/** \brief Assign the doc to which the list belong to.*/
 	void setDocument(ScribusDoc* doc);
@@ -196,7 +196,7 @@
 	void copyColors(const ColorList& colorList, bool overwrite = true);
 
 	/** \brief Ensure availability of black and white colors. */
-	void ensureDefaultColors(void);
+	void ensureDefaultColors();
 
 	/** \brief Try to add ScColor col to the list, if col already exists either by name or by value the existing color name is returned. */
 	QString tryAddColor(QString name, ScColor col);

Modified: trunk/Scribus/scribus/scfonts.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scfonts.h
==============================================================================
--- trunk/Scribus/scribus/scfonts.h	(original)
+++ trunk/Scribus/scribus/scfonts.h	Mon Apr 30 21:39:00 2018
@@ -43,12 +43,12 @@
 		ScFace LoadScalableFont(const QString &filename);
 		void AddScalableFonts(const QString& path, QString DocName = "");
 		/// Returns a font with that name; creates a replacement font if not found
-		const ScFace& findFont(const QString& fontName, ScribusDoc* doc = NULL);
-		const ScFace& findFont(const QString& fontFamily, const QString& fontStyle, ScribusDoc* doc = NULL);
+		const ScFace& findFont(const QString& fontName, ScribusDoc* doc = nullptr);
+		const ScFace& findFont(const QString& fontFamily, const QString& fontStyle, ScribusDoc* doc = nullptr);
 		/// Returns a map of pairs (scName, replacementName). Using this map for replaceFonts() will make substitutions permanent
 		QMap<QString,QString> getSubstitutions(const QList<QString> skip = QList<QString>()) const;
 		/// Changes replacement fonts to point to new real fonts. For all keys 'nam' in 'substitutes', findFont(name).isReplacement() must be true
-		void setSubstitutions(const QMap<QString,QString>& substitutes, ScribusDoc* doc = NULL);
+		void setSubstitutions(const QMap<QString,QString>& substitutes, ScribusDoc* doc = nullptr);
 		void removeFont(QString name);
 		/// Write checked fonts file
 		void WriteCacheList();

Modified: trunk/Scribus/scribus/scpainter.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scpainter.h
==============================================================================
--- trunk/Scribus/scribus/scpainter.h	(original)
+++ trunk/Scribus/scribus/scpainter.h	Mon Apr 30 21:39:00 2018
@@ -37,7 +37,7 @@
 	ScPainter(QImage *target, int w, int h, double transparency = 1.0, int blendmode = 0 );
 	virtual ~ScPainter();
 	enum FillMode { None, Solid, Gradient, Pattern, Hatch };
-	virtual void beginLayer(double transparency, int blendmode, FPointArray *clipArray = 0);
+	virtual void beginLayer(double transparency, int blendmode, FPointArray *clipArray = nullptr);
 	virtual void endLayer();
 	virtual void setAntialiasing(bool enable);
 	virtual void begin();

Modified: trunk/Scribus/scribus/scpaths.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scpaths.h
==============================================================================
--- trunk/Scribus/scribus/scpaths.h	(original)
+++ trunk/Scribus/scribus/scpaths.h	Mon Apr 30 21:39:00 2018
@@ -62,11 +62,11 @@
 	QStringList hyphDirs() const;
 
 	/** @brief Return paths to system font directories*/
-	static QStringList systemFontDirs(void);
+	static QStringList systemFontDirs();
 	/** @brief Return paths to system icc profiles directories*/
-	static QStringList systemProfilesDirs(void);
+	static QStringList systemProfilesDirs();
 	/** @brief Return paths to system create project directories*/
-	static QStringList systemCreatePalettesDirs(void);
+	static QStringList systemCreatePalettesDirs();
 	/** @brief Return paths to directories held in an environment variable*/
 	static QStringList dirsFromEnvVar(const QString envVar, const QString dirToFind);
 	/** @brief Return path to application prefs dir*/
@@ -74,7 +74,7 @@
 	/** @brief Return path to application data dir*/
 	static QString applicationDataDir(bool createIfNotExists = false);
 	/** @brief Return path to pre XDG/QStandardPaths application data dir*/
-	static QString oldApplicationDataDir(void);
+	static QString oldApplicationDataDir();
 	/** @brief Return path to application data dir for downloaded hyph dictionaries*/
 	static QString userDictDir(ScPaths::DictType dictType, bool createIfNotExists);
 	/** @brief Return path to application data dir for downloaded fonts*/
@@ -86,19 +86,19 @@
 	/** @brief Return path to user template dir */
 	static QString userTemplateDir(bool createIfNotExists);
 	/** @brief Return path to image cache dir*/
-	static QString imageCacheDir(void);
+	static QString imageCacheDir();
 	/** @brief Return path to plugin data dir*/
 	static QString pluginDataDir(bool createIfNotExists);
 	/** @brief Return path to user documents*/
-	static QString userDocumentDir(void);
+	static QString userDocumentDir();
 	/** @brief Return path to scrapbook dir*/
 	static QString scrapbookDir(bool createIfNotExists);
 	/** @brief Return path to directory used for temporary files*/
-	static QString tempFileDir(void);
+	static QString tempFileDir();
 	/** @brief Return path to directory used for downloaded (permanent) files*/
-	static QString downloadDir(void);
+	static QString downloadDir();
 	/** @brief Return path to Contents OSX subdirectory*/
-	QString bundleDir(void) const;
+	QString bundleDir() const;
 
 
 	/** @brief Until we get enough of these, lets have this here for now, gs stuff is in util_ghostscript */

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Apr 30 21:39:00 2018
@@ -764,7 +764,6 @@
 	connect(ScCore->fileWatcher, SIGNAL(dirDeleted(QString )), scrapbookPalette, SLOT(closeOnDel(QString )));
 }
 
-
 bool ScribusMainWindow::warningVersion(QWidget *parent)
 {
 	bool retval = false;

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Mon Apr 30 21:39:00 2018
@@ -146,7 +146,7 @@
 
 	ScribusDoc *doFileNew(double width, double height, double topMargin, double leftMargin, double rightMargin, double bottomMargin, double columnDistance, double columnCount, bool autoTextFrames, int pageArrangement, int unitIndex, int firstPageLocation, int orientation, int firstPageNumber, const QString& defaultPageSize, bool requiresGUI, int pageCount=1, bool showView=true, int marginPreset=0);
 	ScribusDoc *newDoc(double width, double height, double topMargin, double leftMargin, double rightMargin, double bottomMargin, double columnDistance, double columnCount, bool autoTextFrames, int pageArrangement, int unitIndex, int firstPageLocation, int orientation, int firstPageNumber, const QString& defaultPageSize, bool requiresGUI, int pageCount=1, bool showView=true, int marginPreset=0);
-	bool DoFileSave(const QString& fileName, QString* savedFileName = NULL);
+	bool DoFileSave(const QString& fileName, QString* savedFileName = nullptr);
 	void changeEvent(QEvent *e);
 	void closeEvent(QCloseEvent *ce);
 	void keyPressEvent(QKeyEvent *k);
@@ -159,7 +159,7 @@
 	void applyNewMaster(QString name);
 	void updateRecent(QString fn);
 	void doPasteRecent(QString data);
-	bool getPDFDriver(const QString & filename, const QString & name, int components, const std::vector<int> & pageNumbers, const QMap<int, QImage> & thumbs, QString& error, bool* cancelled = NULL);
+	bool getPDFDriver(const QString & filename, const QString & name, int components, const std::vector<int> & pageNumbers, const QMap<int, QImage> & thumbs, QString& error, bool* cancelled = nullptr);
 	bool DoSaveAsEps(QString fn, QString& error);
 	QString CFileDialog(QString workingDirectory = ".", QString dialogCaption = "", QString fileFilter = "", QString defNa = "",
 						int optionFlags = fdExistingFiles, bool *useCompression = 0, bool *useFonts = 0, bool *useProfiles = 0);
@@ -565,7 +565,7 @@
 	void slotEditMark();
 	//connected to signal emitted by actions when "Update Marks" menu item is triggered
 	void slotUpdateMarks();
-	bool editMarkDlg(Mark *mrk, PageItem_TextFrame* currItem = NULL);
+	bool editMarkDlg(Mark *mrk, PageItem_TextFrame* currItem = nullptr);
 //	void testQT_slot1(QString);
 //	void testQT_slot2(double);
 //	void testQT_slot3(int);
@@ -607,7 +607,7 @@
 	void initPalettes();
 	void initScrapbook();
 
-	void updateColorMenu(QProgressBar* progressBar=NULL);
+	void updateColorMenu(QProgressBar* progressBar=nullptr);
 
 	int m_ScriptRunning;
 

Modified: trunk/Scribus/scribus/scribuscore.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scribuscore.h
==============================================================================
--- trunk/Scribus/scribus/scribuscore.h	(original)
+++ trunk/Scribus/scribus/scribuscore.h	Mon Apr 30 21:39:00 2018
@@ -144,9 +144,4 @@
 	bool m_HaveTiffSep;
 };
 
-/*
-
-
-*/
-
 #endif

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Mon Apr 30 21:39:00 2018
@@ -216,11 +216,11 @@
 	m_masterPageMode(false),
 	m_symbolEditMode(false),
 	m_inlineEditMode(false),
-	m_ScMW(0),
-	m_View(0),
+	m_ScMW(nullptr),
+	m_View(nullptr),
 	m_guardedObject(this),
-	m_serializer(NULL),
-	m_tserializer(NULL),
+	m_serializer(nullptr),
+	m_tserializer(nullptr),
 	is12doc(false),
 	NrItems(0),
 	First(1), Last(0),
@@ -230,7 +230,7 @@
 	SnapElement(false), GuideLock(false),
 	minCanvasCoordinate(FPoint(0, 0)),
 	rulerXoffset(0.0), rulerYoffset(0.0),
-	Pages(0), MasterPages(), DocPages(),
+	Pages(nullptr), MasterPages(), DocPages(),
 	MasterNames(),
 	Items(0), MasterItems(), DocItems(), FrameItems(),
 	m_Selection(new Selection(this, true)),
@@ -239,7 +239,7 @@
 	PageColors(this, true),
 	appMode(modeNormal),
 	SubMode(-1),
-	ShapeValues(0),
+	ShapeValues(nullptr),
 	ValCount(0),
 	DocName( tr("Document")+"-"),
 	UsedFonts(),
@@ -247,9 +247,9 @@
 	AObjects(),
 	CurrentSel(-1),
 	nodeEdit(),
-	LastAuto(0), FirstAuto(0),
-	DraggedElem(0),
-	ElemToLink(0),
+	LastAuto(nullptr), FirstAuto(nullptr),
+	DraggedElem(nullptr),
+	ElemToLink(nullptr),
 	DragElements(),
 	m_docParagraphStyles(),
 	m_docCharStyles(),
@@ -267,21 +267,21 @@
 	isConverted(false),
 	autoSaveTimer(new QTimer(this)),
 	MLineStyles(),
-	WinHan(0),
+	WinHan(nullptr),
 	DoDrawing(true),
 	OpenNodes(),
-	CurTimer(0),
+	CurTimer(nullptr),
 	pageErrors(),
 	docLayerErrors(),
 	docItemErrors(),
 	masterItemErrors(),
 	symReturn(), symNewLine(), symTab(), symNonBreak(), symNewCol(), symNewFrame(),
-	docHyphenator(0),
-	m_itemCreationTransaction(NULL),
-	m_alignTransaction(NULL),
-	m_currentPage(NULL),
+	docHyphenator(nullptr),
+	m_itemCreationTransaction(nullptr),
+	m_alignTransaction(nullptr),
+	m_currentPage(nullptr),
 	m_updateManager(),
-	m_docUpdater(NULL),
+	m_docUpdater(nullptr),
 	m_flag_notesChanged(false),
 	flag_restartMarksRenumbering(false),
 	flag_updateMarksLabels(false),
@@ -313,7 +313,7 @@
 	numS->m_lastlevel = -1;
 	numerations.insert("default", numS);
 
-	currentEditedTextframe = NULL;
+	currentEditedTextframe = nullptr;
 }
 
 
@@ -332,11 +332,11 @@
 	m_masterPageMode(false),
 	m_symbolEditMode(false),
 	m_inlineEditMode(false),
-	m_ScMW(0),
-	m_View(0),
+	m_ScMW(nullptr),
+	m_View(nullptr),
 	m_guardedObject(this),
-	m_serializer(NULL),
-	m_tserializer(NULL),
+	m_serializer(nullptr),
+	m_tserializer(nullptr),
 	is12doc(false),
 	NrItems(0),
 	First(1), Last(0),
@@ -349,14 +349,14 @@
 	rulerXoffset(0.0), rulerYoffset(0.0),
 	Pages(0), MasterPages(), DocPages(),
 	MasterNames(),
-	Items(0), MasterItems(), DocItems(), FrameItems(),
+	Items(nullptr), MasterItems(), DocItems(), FrameItems(),
 	m_Selection(new Selection(this, true)),
 	PageSp(pagesSetup.columnCount), PageSpa(pagesSetup.columnDistance),
 	FirstPnum(pagesSetup.firstPageNumber),
 	PageColors(this, true),
 	appMode(modeNormal),
 	SubMode(-1),
-	ShapeValues(0),
+	ShapeValues(nullptr),
 	ValCount(0),
 	DocName(docName),
 	UsedFonts(),
@@ -364,9 +364,9 @@
 	AObjects(),
 	CurrentSel(-1),
 	nodeEdit(),
-	LastAuto(0), FirstAuto(0),
-	DraggedElem(0),
-	ElemToLink(0),
+	LastAuto(nullptr), FirstAuto(nullptr),
+	DraggedElem(nullptr),
+	ElemToLink(nullptr),
 	DragElements(),
 	m_docParagraphStyles(),
 	m_docCharStyles(),
@@ -384,21 +384,21 @@
 	isConverted(false),
 	autoSaveTimer(new QTimer(this)),
 	MLineStyles(),
-	WinHan(0),
+	WinHan(nullptr),
 	DoDrawing(true),
 	OpenNodes(),
-	CurTimer(0),
+	CurTimer(nullptr),
 	pageErrors(),
 	docLayerErrors(),
 	docItemErrors(),
 	masterItemErrors(),
 	symReturn(), symNewLine(), symTab(), symNonBreak(), symNewCol(), symNewFrame(),
-	docHyphenator(0),
-	m_itemCreationTransaction(NULL),
-	m_alignTransaction(NULL),
-	m_currentPage(NULL),
+	docHyphenator(nullptr),
+	m_itemCreationTransaction(nullptr),
+	m_alignTransaction(nullptr),
+	m_currentPage(nullptr),
 	m_updateManager(),
-	m_docUpdater(NULL),
+	m_docUpdater(nullptr),
 	m_flag_notesChanged(false),
 	flag_restartMarksRenumbering(false),
 	flag_updateMarksLabels(false),
@@ -425,7 +425,7 @@
 	editOnPreview = false;
 	previewVisual = 0;
 	dontResize = false;
-	currentEditedTextframe = NULL;
+	currentEditedTextframe = nullptr;
 }
 
 
@@ -828,7 +828,7 @@
 
 QList<PageItem*> *ScribusDoc::parentGroup(PageItem* item, QList<PageItem*> *list)
 {
-	QList<PageItem*> *retList = NULL;
+	QList<PageItem*> *retList = nullptr;
 	if (list->contains(item))
 		retList = list;
 	else
@@ -839,7 +839,7 @@
 			if (embedded->isGroup())
 			{
 				retList = parentGroup(item, &embedded->asGroupFrame()->groupItemList);
-				if (retList != NULL)
+				if (retList != nullptr)
 					break;
 			}
 		}
@@ -922,7 +922,7 @@
 		Q_CHECK_PTR(docHyphenator);
 	}
 	else
-		docHyphenator = NULL;
+		docHyphenator = nullptr;
 }
 
 
@@ -1167,7 +1167,7 @@
 	lists.availableColors = const_cast<ColorList*>(& PageColors);
 
 	const QList<PageItem*> * itemlist = & MasterItems;
-	while (itemlist != NULL)
+	while (itemlist != nullptr)
 	{
 		for (int i=0; i < itemlist->count(); ++i)
 		{
@@ -1178,7 +1178,7 @@
 		if (itemlist == &MasterItems)
 			itemlist = &DocItems;
 		else
-			itemlist = NULL;
+			itemlist = nullptr;
 	}
 	for (QHash<int, PageItem*>::const_iterator itf = FrameItems.begin(); itf != FrameItems.end(); ++itf)
 	{
@@ -1364,7 +1364,7 @@
 {
 	// replace names in items
 	QList<PageItem*> * itemlist = & MasterItems;
-	while (itemlist != NULL)
+	while (itemlist != nullptr)
 	{
 		for (int i=0; i < itemlist->count(); ++i)
 		{
@@ -1375,11 +1375,11 @@
 		if (itemlist == &MasterItems)
 			itemlist = &DocItems;
 		else
-			itemlist = NULL;
+			itemlist = nullptr;
 	}
 	foreach (NotesStyle* nStyle, m_docNotesStylesList)
 	{ //update styles names in notes styles
-		if (nStyle == NULL)
+		if (nStyle == nullptr)
 			continue;
 		if (newNames.styles().contains(nStyle->notesParStyle()))
 			nStyle->setNotesParStyle(newNames.styles().value(nStyle->notesParStyle()));
@@ -1614,7 +1614,7 @@
  * - 2004-09-14 Craig Ringer
  */
 // don't like this here. could as well be a static method for reading this stuff into temp., then always use redefineXY() - av
-void ScribusDoc::loadStylesFromFile(QString fileName)
+void ScribusDoc::loadStylesFromFile(const QString& fileName)
 {
 	StyleSet<ParagraphStyle> *wrkStyles     = &m_docParagraphStyles;
 	StyleSet<CharStyle> *wrkCharStyles      = &m_docCharStyles;
@@ -1653,7 +1653,7 @@
 	}
 }
 
-void ScribusDoc::loadStylesFromFile(QString fileName, StyleSet<ParagraphStyle> *tempStyles,
+void ScribusDoc::loadStylesFromFile(const QString& fileName, StyleSet<ParagraphStyle> *tempStyles,
                                                       StyleSet<CharStyle> *tempCharStyles,
 													  QHash<QString, multiLine> *tempLineStyles)
 {
@@ -1883,30 +1883,30 @@
 	else if (ss->contains("DELETE_FRAMETEXT"))
 	{
 		PageItem * nF = getItemFromName(ss->get("noteframeName"));
-		Q_ASSERT(nF != NULL);
+		Q_ASSERT(nF != nullptr);
 		nF->asNoteFrame()->restoreDeleteNoteText(ss, isUndo);
 	}
 	else if (ss->contains("DELETE_FRAMEPARA"))
 	{
 		PageItem * nF = getItemFromName(ss->get("noteframeName"));
-		Q_ASSERT(nF != NULL);
+		Q_ASSERT(nF != nullptr);
 		nF->asNoteFrame()->restoreDeleteNoteParagraph(ss, isUndo);
 	}
 	else if (ss->contains("INSERT_FRAMETEXT"))
 	{
 		PageItem * nF = getItemFromName(ss->get("noteframeName"));
-		Q_ASSERT(nF != NULL);
+		Q_ASSERT(nF != nullptr);
 		nF->asNoteFrame()->restoreInsertNoteText(ss,isUndo);
 	}
 	else if (ss->contains("INSERT_FRAMEPARA"))
 	{
 		PageItem * nF = getItemFromName(ss->get("noteframeName"));
-		Q_ASSERT(nF != NULL);
+		Q_ASSERT(nF != nullptr);
 		nF->asNoteFrame()->restoreInsertNoteParagraph(ss,isUndo);
 	}
 	else if (ss->contains("NSTYLE"))
 	{
-		NotesStyle* NS = NULL;
+		NotesStyle* NS = nullptr;
 		if ((ss->get("NSTYLE") == "new" && isUndo) || (ss->get("NSTYLE") == "delete" && !isUndo))
 			deleteNotesStyle(ss->get("name"));
 		else if ((ss->get("NSTYLE") == "new" && !isUndo) || (ss->get("NSTYLE") == "delete" && isUndo))
@@ -1936,7 +1936,7 @@
 				NS = getNotesStyle(ss->get("NEWname"));
 			else
 				NS = getNotesStyle(ss->get("name"));
-			Q_ASSERT(NS != NULL);
+			Q_ASSERT(NS != nullptr);
 			//check if Notes Style change form footnotes to endnotes or range of numeration was changed
 			//if use delete all notes frames with current style
 			bool delNF = false;
@@ -2002,7 +2002,7 @@
 				regionsChanged()->update(QRectF());
 			}
 		}
-		if (NS != NULL)
+		if (NS != nullptr)
 			scMW()->nsEditor->setNotesStyle(NS);
 		else
 			scMW()->nsEditor->updateNSList();
@@ -2013,7 +2013,7 @@
 		if (is)
 		{
 			NotesStyle* nStyle = getNotesStyle(is->get("nStyle"));
-			PageItem* master = NULL;
+			PageItem* master = nullptr;
 			if (is->contains("noteframeName"))
 				master = getItemFromName(is->get("noteframeName"));
 			else
@@ -2031,7 +2031,7 @@
 				if (!nStyle->isAutoRemoveEmptyNotesFrames())
 				{
 					PageItem_NoteFrame* nF = (PageItem_NoteFrame*) is->getItem("noteframe");
-					Q_ASSERT(nF != NULL);
+					Q_ASSERT(nF != nullptr);
 					master->asTextFrame()->setNoteFrame(nF);
 				}
 				setNotesChanged(true);
@@ -2059,11 +2059,11 @@
 				mrk = getMark(is->get("labelOLD"), (MarkType) is->getInt("type"));
 			int pos = is->getInt("at");
 			bool isAutoNoteFrame = false;
-			PageItem* currItem = NULL;
+			PageItem* currItem = nullptr;
 			if (is->contains("noteframeName"))
 			{
 				currItem = getItemFromName(is->get("noteframeName"));
-				if (currItem != NULL)
+				if (currItem != nullptr)
 					isAutoNoteFrame = currItem->asNoteFrame()->isAutoFrame();
 			}
 			else
@@ -2072,7 +2072,7 @@
 			{
 				if (is->get("MARK") == "new")
 				{
-					Q_ASSERT(mrk != NULL);
+					Q_ASSERT(mrk != nullptr);
 					if (mrk->isNoteType())
 					{
 						TextNote* note = mrk->getNotePtr();
@@ -2088,8 +2088,8 @@
 				else if (is->get("MARK") == "replace")
 				{
 					Q_ASSERT(pos >= 0);
-					Q_ASSERT(currItem != NULL);
-					Q_ASSERT(mrk != NULL);
+					Q_ASSERT(currItem != nullptr);
+					Q_ASSERT(mrk != nullptr);
 					Mark* mrk = getMark(is->get("label"), (MarkType) is->getInt("type"));
 					currItem->itemText.replaceMark(pos, mrk);
 					if (is->contains("strtxtOLD"))
@@ -2118,8 +2118,8 @@
 				else if (is->get("MARK") == "insert_existing")
 				{
 					Q_ASSERT(pos >= 0);
-					Q_ASSERT(currItem != NULL);
-					Q_ASSERT(mrk != NULL);
+					Q_ASSERT(currItem != nullptr);
+					Q_ASSERT(mrk != nullptr);
 					currItem->itemText.removeChars(pos,1);
 					if (is->contains("strOLD"))
 					{
@@ -2135,7 +2135,7 @@
 					mrk->label = is->get("label");
 					mrk->setType((MarkType) is->getInt("type"));
 					Q_ASSERT(pos >= 0);
-					Q_ASSERT(currItem != NULL);
+					Q_ASSERT(currItem != nullptr);
 					currItem->itemText.insertMark(mrk, pos);
 					if (is->contains("strtxt"))
 					{
@@ -2144,14 +2144,14 @@
 					}
 					if (is->contains("dName"))
 						mrk->setMark(is->get("dName"), (MarkType) is->getInt("dType"));
-					if (is->getItem("itemPtr") != NULL)
+					if (is->getItem("itemPtr") != nullptr)
 						mrk->setItemPtr((PageItem*) is->getItem("itemPtrOLD"));
 				}
 				else if (is->get("MARK") == "eraseFromText") ////for non-unique marks
 				{
 					Q_ASSERT(pos >= 0);
-					Q_ASSERT(mrk != NULL);
-					Q_ASSERT(currItem != NULL);
+					Q_ASSERT(mrk != nullptr);
+					Q_ASSERT(currItem != nullptr);
 					currItem->itemText.insertMark(mrk, pos);
 					if (is->contains("strNew"))
 					{
@@ -2191,14 +2191,14 @@
 					mrk = newMark();
 					mrk->label = is->get("label");
 					mrk->setType((MarkType) is->getInt("type"));
-					Q_ASSERT(currItem != NULL);
+					Q_ASSERT(currItem != nullptr);
 					Q_ASSERT(pos >= 0);
 					currItem->itemText.insertMark(mrk, pos);
 					if (is->contains("strtxt"))
 						mrk->setString(is->get("strtxt"));
 					if (is->contains("dName"))
 						mrk->setMark(is->get("dName"), (MarkType) is->getInt("dType"));
-					if (is->getItem("itemPtr") != NULL)
+					if (is->getItem("itemPtr") != nullptr)
 						mrk->setItemPtr((PageItem*) is->getItem("itemPtrOLD"));
 					if (mrk->isType(MARKNoteMasterType))
 					{
@@ -2213,7 +2213,7 @@
 				}
 				else if (is->get("MARK") == "replace")
 				{
-					Q_ASSERT(currItem != NULL);
+					Q_ASSERT(currItem != nullptr);
 					Q_ASSERT(pos >= 0);
 					currItem->itemText.replaceMark(pos, getMark(is->get("label"), (MarkType) is->getInt("type")));
 					if (is->contains("strtxtNEW"))
@@ -2235,12 +2235,12 @@
 					}
 					if (is->contains("dNameNEW"))
 						mrk->setMark(is->get("dNameNEW"), (MarkType) is->getInt("dTypeNEW"));
-					if (is->getItem("itemPtrNEW") != NULL)
+					if (is->getItem("itemPtrNEW") != nullptr)
 						mrk->setItemPtr((PageItem*) is->getItem("itemPtrNEW"));
 				}
 				else if (is->get("MARK") == "insert_existing")
 				{
-					Q_ASSERT(currItem != NULL);
+					Q_ASSERT(currItem != nullptr);
 					Q_ASSERT(pos >= 0);
 					currItem->itemText.insertMark(mrk, pos);
 					if (is->contains("strNew"))
@@ -2253,7 +2253,7 @@
 				}
 				else if (is->get("MARK") == "eraseFromText") //for non-unique marks
 				{
-					Q_ASSERT(currItem != NULL);
+					Q_ASSERT(currItem != nullptr);
 					Q_ASSERT(pos >= 0);
 					currItem->itemText.removeChars(pos,1);
 				}
@@ -2261,7 +2261,7 @@
 				{
 					if (!mrk->isUnique())
 					{
-						Q_ASSERT(currItem != NULL);
+						Q_ASSERT(currItem != nullptr);
 						Q_ASSERT(pos >= 0);
 						currItem->itemText.removeChars(pos,1);
 					}
@@ -2647,7 +2647,7 @@
 ScPage* ScribusDoc::addMasterPage(const int pageNumber, const QString& pageName)
 {
 	ScPage* addedPage = new ScPage(m_docPrefsData.displayPrefs.scratch.left(), m_docPrefsData.displayPrefs.scratch.top(), m_docPrefsData.docSetupPrefs.pageWidth, m_docPrefsData.docSetupPrefs.pageHeight);
-	assert(addedPage!=NULL);
+	assert(addedPage!=nullptr);
 	addedPage->setDocument(this);
 	addedPage->Margins = m_docPrefsData.docSetupPrefs.margins;
 	addedPage->initialMargins = m_docPrefsData.docSetupPrefs.margins;
@@ -2662,7 +2662,7 @@
 	addedPage->setPageNr(pgN);
 	MasterNames.insert(pageName, pgN);
 	MasterPages.insert(pgN, addedPage);
-	assert(MasterPages.at(pgN)!=NULL);
+	assert(MasterPages.at(pgN)!=nullptr);
 	if (!isLoading())
 		changed();
 	if (UndoManager::undoEnabled())
@@ -2690,7 +2690,7 @@
 	Q_ASSERT(MasterPages.at(number)->pageName()==oldPageName);
 	MasterPages.at(number)->setPageName(newPageName);
 	//Update any pages that were linking to our old name
-	ScPage* docPage=NULL;
+	ScPage* docPage=nullptr;
 	for (int i=0; i < DocPages.count(); ++i )
 	{
 		docPage=DocPages[i];
@@ -2750,7 +2750,7 @@
 	uint pageIndex = 0;
 	QMap<QString,int>::Iterator it = MasterNames.begin();
 	QListIterator<ScPage *> dpIt(DocPages);
-	ScPage* docPage=NULL;
+	ScPage* docPage=nullptr;
 	while(dpIt.hasNext())
 	{
 		docPage=dpIt.next();
@@ -3047,7 +3047,7 @@
 	Q_ASSERT(ll);
 	if (ll)
 		m_ActiveLayer=layerToActivate;
-	return (ll != NULL);
+	return (ll != nullptr);
 }
 
 
@@ -3057,7 +3057,7 @@
 	Q_ASSERT(ll);
 	if (ll)
 		m_ActiveLayer=ll->ID;
-	return (ll != NULL);
+	return (ll != nullptr);
 }
 
 
@@ -3438,7 +3438,7 @@
 	return -1;
 }
 
-int ScribusDoc::layerIDFromName(QString name)
+int ScribusDoc::layerIDFromName(const QString& name)
 {
 	ScLayers::iterator itend=Layers.end();
 	ScLayers::iterator it;
@@ -3630,7 +3630,7 @@
 
 void ScribusDoc::orderedLayerList(QStringList* list)
 {
-	Q_ASSERT(list!=NULL);
+	Q_ASSERT(list!=nullptr);
 	int layerCount=Layers.count();
 	if (layerCount != 0)
 	{
@@ -3915,12 +3915,12 @@
 ScPattern* ScribusDoc::checkedPattern(const QString &name)
 {
 	if (name.isEmpty() || !docPatterns.contains(name))
-		return 0;
+		return nullptr;
 	ScPattern* pattern = &docPatterns[name];
 	if (pattern->width <= 0 || pattern->height <= 0)
-		return 0;
+		return nullptr;
 	if (pattern->getPattern()->isNull())
-		return 0;
+		return nullptr;
 	return pattern;
 }
 
@@ -4306,7 +4306,7 @@
 				allItems = DocItems;
 				break;
 		}
-		PageItem* it = NULL;
+		PageItem* it = nullptr;
 		while (allItems.count() > 0)
 		{
 			it = allItems.takeFirst();
@@ -4416,7 +4416,7 @@
 {
 	QList<PageItem*>  allItems;
 	QList<PageItem*>* itemLists[] = { &MasterItems, &DocItems };
-	PageItem* it = NULL;
+	PageItem* it = nullptr;
 
 	for (int i = 0; i < 2; ++i)
 	{
@@ -4652,7 +4652,7 @@
 
 void ScribusDoc::getUsedProfiles(ProfilesL& usedProfiles)
 {
-	PageItem* it = NULL;
+	PageItem* it = nullptr;
 	QStringList profileNames;
 	int counter = 0;
 	usedProfiles.clear();
@@ -4734,7 +4734,7 @@
 {
 	QList<PageItem*>  allItems;
 	const QList<PageItem*>* itemLists[] = { &MasterItems, &DocItems };
-	const PageItem* it = NULL;
+	const PageItem* it = nullptr;
 
 	for (int i = 0; i < 2; ++i)
 	{
@@ -4796,7 +4796,7 @@
 {
 	QList<PageItem*>  allItems;
 	const QList<PageItem*>* itemLists[] = { &MasterItems, &DocItems };
-	const PageItem* it = NULL;
+	const PageItem* it = nullptr;
 
 	for (int i = 0; i < 2; ++i)
 	{
@@ -5025,7 +5025,7 @@
 //TODO: Handle saving to versions of SLA, and other formats
 bool ScribusDoc::save(const QString& fileName, QString* savedFile)
 {
-	QProgressBar* mainWindowProgressBar=NULL;
+	QProgressBar* mainWindowProgressBar=nullptr;
 	if (ScCore->usingGUI())
 	{
 		mainWindowProgressBar=m_ScMW->mainWindowProgressBar;
@@ -5054,7 +5054,7 @@
 	}
 	else
 	{
-		if (currentPage()==NULL)
+		if (currentPage()==nullptr)
 			retVal=false;
 		else
 		{
@@ -5358,7 +5358,7 @@
 	ScPage* sourcePage = Pages->at(pageNumber);
 	int nr = MasterPages.count();
 	ScPage* targetPage=addMasterPage(nr, masterPageName);
-	assert(targetPage!=NULL);
+	assert(targetPage!=nullptr);
 	//Backup currentpage, and don't use sourcepage here as we might convert a non current page
 	ScPage* oldCurrentPage = currentPage();
 	//Must set current page for pasteitem to work properly
@@ -5386,14 +5386,14 @@
 	{
 		if (!sourcePage->MPageNam.isEmpty() && MasterNames.contains(sourcePage->MPageNam))
 		{
-			ScPage* pageMaster=NULL;
+			ScPage* pageMaster=nullptr;
 			for (int i=0; i < MasterPages.count(); ++i )
 			{
 				pageMaster=MasterPages[i];
 				if (pageMaster->pageName() == sourcePage->MPageNam)
 					break;
 			}
-			if (Layers.count()!= 0 && pageMaster!=NULL)
+			if (Layers.count()!= 0 && pageMaster!=nullptr)
 			{
 				int currActiveLayer = activeLayer();
 				for (ScLayers::iterator it = Layers.begin(); it != Layers.end(); ++it)
@@ -5465,7 +5465,7 @@
 
 PageItem* ScribusDoc::createPageItem(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& outline)
 {
-	PageItem* newItem=NULL;
+	PageItem* newItem=nullptr;
 	switch( itemType )
 	{
 		//Q_ASSERTs here will warn on creation issues when a coder specifies the frameType incorrectly
@@ -5537,7 +5537,7 @@
 //			qDebug() << "unknown item type";
 			assert (false);
 	}
-	if (newItem != NULL)
+	if (newItem != nullptr)
 	{
 		//Add in item default values based on itemType and frameType
 		itemAddDetails(itemType, frameType, newItem);
@@ -5563,7 +5563,7 @@
 		newItem = createPageItem(itemType, frameType, x, y, b, h, w, fill, outline); 
 	
 	Q_CHECK_PTR(newItem);
-	if (newItem==NULL)
+	if (newItem==nullptr)
 		return -1;
 
 	if (itemKind == PageItem::InlineItem || itemKind == PageItem::PatternItem)
@@ -5620,10 +5620,10 @@
 		parsePagesString(iafData.pageList, &pageNs, Pages->count());
 	ScPage* oldCurrentPage = currentPage();
 	int z=-2;
-	PageItem *prevItem=0; //Previous item for text frame linking
-	if (iafData.linkToExistingFrame && iafData.linkToExistingFramePtr!=NULL && 
-		   iafData.linkToExistingFramePtr->itemType()==PageItem::TextFrame &&
-		   DocItems.contains(iafData.linkToExistingFramePtr))
+	PageItem *prevItem=nullptr; //Previous item for text frame linking
+	if (iafData.linkToExistingFrame && iafData.linkToExistingFramePtr!=nullptr &&
+			iafData.linkToExistingFramePtr->itemType()==PageItem::TextFrame &&
+			DocItems.contains(iafData.linkToExistingFramePtr))
 		prevItem=iafData.linkToExistingFramePtr;
 	UndoTransaction transaction;
 	if (UndoManager::undoEnabled())
@@ -5717,15 +5717,15 @@
 			{
 				currItem->setColumns(iafData.columnCount);
 				currItem->setColumnGap(iafData.columnGap/m_docUnitRatio);
-				if (i==0 && iafData.linkToExistingFrame && prevItem != NULL)
+				if (i==0 && iafData.linkToExistingFrame && prevItem != nullptr)
 				{
 					prevItem->link(currItem);
 				}
-				if (i!=0 && iafData.linkTextFrames && prevItem != NULL)
+				if (i!=0 && iafData.linkTextFrames && prevItem != nullptr)
 				{
 					prevItem->link(currItem);
 				}
-				if (!iafData.source.isEmpty() && prevItem == NULL && QFile::exists(iafData.source))
+				if (!iafData.source.isEmpty() && prevItem == nullptr && QFile::exists(iafData.source))
 				{
 					gtGetText* gt = new gtGetText(this);
 					if (iafData.impsetup.runDialog)
@@ -5842,7 +5842,7 @@
 	//TODO use the parameter
 	if (m_itemCreationTransaction.isStarted() && appMode !=  modeDrawBezierLine)
 	{
-		if (item != NULL)
+		if (item != nullptr)
 		{
 			item->checkChanges(true);
 			QString targetName = Um::ScratchSpace;
@@ -5874,7 +5874,7 @@
 
 PageItem* ScribusDoc::getItemFromName(QString name)
 {
-	PageItem* ret = NULL;
+	PageItem* ret = nullptr;
 	for (int i = 0; i < Items->count(); ++i)
 	{
 		if (Items->at(i)->itemName() == name)
@@ -6433,14 +6433,14 @@
 
 double ScribusDoc::getXOffsetForPage(const int pageNumber)
 {
-	if (Pages->at(pageNumber)!=NULL)
+	if (Pages->at(pageNumber)!=nullptr)
 		return Pages->at(pageNumber)->xOffset();
 	return -1.0;
 }
 
 double ScribusDoc::getYOffsetForPage(const int pageNumber)
 {
-	if (Pages->at(pageNumber)!=NULL)
+	if (Pages->at(pageNumber)!=nullptr)
 		return Pages->at(pageNumber)->yOffset();
 	return -1.0;
 }
@@ -6500,13 +6500,13 @@
 
 PageItem* ScribusDoc::convertItemTo(PageItem *currItem, PageItem::ItemType newType, PageItem* secondaryItem)
 {
-	//Item to convert is null, return
-	Q_ASSERT(currItem!=NULL);
-	if (currItem == NULL)
-		return NULL;
+	//Item to convert is nullptr, return
+	Q_ASSERT(currItem!=nullptr);
+	if (currItem == nullptr)
+		return nullptr;
 	//Don't attempt a Line conversion
 	if (newType==PageItem::Line)
-		return NULL;
+		return nullptr;
 	PageItem *oldItem = currItem;
 	uint oldItemNr;
 	if (currItem->isGroupChild())
@@ -6539,27 +6539,27 @@
 			newItem = new PageItem_PolyLine(*oldItem);
 			break;
 		case PageItem::PathText:
-			if (secondaryItem==NULL)
-				return NULL;
+			if (secondaryItem==nullptr)
+				return nullptr;
 			if (UndoManager::undoEnabled())
 				transactionConversion = m_undoManager->beginTransaction(currentPage()->getUName(), 0, Um::PathText, "", Um::ITextFrame);
 			newItem = new PageItem_PathText(*oldItem);
 			break;
 		default:
-			newItem=NULL;
+			newItem=nullptr;
 			break;
 	}
-	Q_ASSERT(newItem!=NULL);
+	Q_ASSERT(newItem!=nullptr);
 	//If the new item is null, return. If converting Text to Path, start a transaction
 	//as the old bezier will be deleted
-	if (newItem==NULL)
+	if (newItem==nullptr)
 	{
 		if (transactionConversion)
 		{
 			transactionConversion.cancel();
 			transactionConversion.reset();
 		}
-		return NULL;
+		return nullptr;
 	}
 	//Do new item type specific adjustments to the new item. Some of this may move when new
 	//constructors are built into the item classes
@@ -6642,7 +6642,7 @@
 			}
 			break;
 		default:
-			newItem=NULL;
+			newItem=nullptr;
 			break;
 	}
 	newItem->uniqueNr = oldItem->uniqueNr;
@@ -7260,7 +7260,7 @@
 	bool autoText = usesAutomaticTextFrames();
 	setUsesAutomaticTextFrames(false);
 	ScPage* from = DocPages.at(pageNumberToCopy);
-	ScPage* lastDest = NULL;
+	ScPage* lastDest = nullptr;
 	setCurrentPage(from);
 
 	uint oldItems = Items->count();
@@ -7384,7 +7384,7 @@
 	}
 	setUsesAutomaticTextFrames(autoText);
 	addPageToSection(existingPage, whereToInsert, copyCount);
-	if (lastDest != NULL)
+	if (lastDest != nullptr)
 		setCurrentPage(lastDest);
 	else
 		setCurrentPage(from);
@@ -7454,7 +7454,7 @@
 		return;
 	bool usingGUI=ScCore->usingGUI();
 	int counter = 0;
-	if (usingGUI && dia != NULL)
+	if (usingGUI && dia != nullptr)
 		counter = dia->value();
 	for (QHash<int, PageItem*>::iterator itf = FrameItems.begin(); itf != FrameItems.end(); ++itf)
 	{
@@ -7485,7 +7485,7 @@
 		if (usingGUI)
 		{
 			++counter;
-			if (dia != NULL)
+			if (dia != nullptr)
 				dia->setValue(counter);
 		}
 	}
@@ -7498,7 +7498,7 @@
 	QList<PageItem*> allItems;
 	bool usingGUI=ScCore->usingGUI();
 	int counter = 0;
-	if (usingGUI && dia != NULL)
+	if (usingGUI && dia != nullptr)
 		counter = dia->value();
 	PageItem* it;
 	int docItemCount = items->count();
@@ -7531,7 +7531,7 @@
 		if (usingGUI)
 		{
 			++counter;
-			if (dia != NULL)
+			if (dia != nullptr)
 				dia->setValue(counter);
 		}
 	}
@@ -7595,7 +7595,7 @@
 		else if (Items->count() > 1)
 		{
 			d = Items->indexOf(currItem);
-			oHlp.parent = NULL;
+			oHlp.parent = nullptr;
 			objOrder.insert(d, oHlp);
 		}
 	}
@@ -7604,7 +7604,7 @@
 	{
 		objOrdHelper oHlp = objIndex[c];
 		PageItem* objItem = m_Selection->itemAt(oHlp.objNrSel);
-		if (oHlp.parent == NULL)
+		if (oHlp.parent == nullptr)
 		{
 			Items->removeOne(objItem);
 			Items->prepend(objItem);
@@ -7662,7 +7662,7 @@
 		else if (Items->count() > 1)
 		{
 			d = Items->indexOf(currItem);
-			oHlp.parent = NULL;
+			oHlp.parent = nullptr;
 			objOrder.insert(d, oHlp);
 		}
 	}
@@ -7671,7 +7671,7 @@
 	{
 		objOrdHelper oHlp = objIndex[c];
 		PageItem* objItem = m_Selection->itemAt(oHlp.objNrSel);
-		if (oHlp.parent == NULL)
+		if (oHlp.parent == nullptr)
 		{
 			Items->removeOne(objItem);
 			Items->append(objItem);
@@ -7721,7 +7721,7 @@
 	int high = 0;
 	int d;
 	QMap<int, int> ObjOrder;
-	PageItem *currItem=NULL;
+	PageItem *currItem=nullptr;
 	for (int c = 0; c < docSelectionCount; ++c)
 	{
 		currItem = m_Selection->itemAt(c);
@@ -7793,7 +7793,7 @@
 	int low = itemList->count();
 	int high = 0;
 	QMap<int, int> ObjOrder;
-	PageItem *currItem=NULL;
+	PageItem *currItem=nullptr;
 	for (int i = 0; i < docSelectionCount; ++i)
 	{
 		currItem = m_Selection->itemAt(i);
@@ -8040,7 +8040,7 @@
 
 void ScribusDoc::itemSelection_SetNamedLineStyle(const QString &name, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	uint docSelectionCount   = itemSelection->count();
 	if (docSelectionCount != 0)
 	{
@@ -8452,7 +8452,7 @@
 	changed();
 }
 
-void ScribusDoc::itemSelection_SetItemPatternFill(QString pattern)
+void ScribusDoc::itemSelection_SetItemPatternFill(const QString& pattern)
 {
 	int selectedItemCount = m_Selection->count();
 	if (selectedItemCount == 0)
@@ -8487,7 +8487,7 @@
 	changed();
 }
 
-void ScribusDoc::itemSelection_SetItemStrokePattern(QString pattern)
+void ScribusDoc::itemSelection_SetItemStrokePattern(const QString& pattern)
 {
 	int selectedItemCount = m_Selection->count();
 	if (selectedItemCount == 0)
@@ -8539,7 +8539,7 @@
 	changed();
 }
 
-void ScribusDoc::itemSelection_SetItemPatternMask(QString pattern)
+void ScribusDoc::itemSelection_SetItemPatternMask(const QString& pattern)
 {
 	int selectedItemCount = m_Selection->count();
 	if (selectedItemCount == 0)
@@ -9040,7 +9040,7 @@
 	PageItem *i2 = m_Selection->itemAt(0);
 	if (appMode == modeEditTable)
 		i2 = m_Selection->itemAt(0)->asTable()->activeCell().textFrame();
-	if (i2 != NULL)
+	if (i2 != nullptr)
 	{
 		Selection tempSelection(this, false);
 		tempSelection.addItem(i2, true);
@@ -9058,8 +9058,8 @@
 
 void ScribusDoc::itemSelection_ToggleBookMark(Selection *customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9102,8 +9102,8 @@
 
 void ScribusDoc::itemSelection_ToggleAnnotation(Selection *customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9146,8 +9146,8 @@
 
 void ScribusDoc::itemSelection_SetParagraphStyle(const ParagraphStyle & newStyle, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9199,8 +9199,8 @@
 
 void ScribusDoc::itemSelection_EraseParagraphStyle(Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9291,8 +9291,8 @@
 
 void ScribusDoc::itemSelection_ClearBulNumStrings(Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9360,8 +9360,8 @@
 
 void ScribusDoc::itemSelection_ApplyParagraphStyle(const ParagraphStyle & newStyle, Selection* customSelection, bool rmDirectFormatting)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9588,8 +9588,8 @@
 
 void ScribusDoc::itemSelection_SetCharStyle(const CharStyle & newStyle, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9668,8 +9668,8 @@
 
 void ScribusDoc::itemSelection_EraseCharStyle(Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	uint selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9863,7 +9863,7 @@
 	if (n == -1)
 		n=0;
 	*(currItem) = m_Selection->itemAt(n);
-	return (*(currItem)!=NULL);
+	return (*(currItem)!=nullptr);
 }
 
 void ScribusDoc::setFrameRect()
@@ -9917,7 +9917,7 @@
 }
 
 
-void ScribusDoc::adjustCanvas(FPoint minPos, FPoint maxPos, bool absolute)
+void ScribusDoc::adjustCanvas(const FPoint& minPos, const FPoint& maxPos, bool absolute)
 {
 	if (dontResize)
 		return;
@@ -10785,7 +10785,7 @@
 		for (int a = 0; a < m_Selection->count(); ++a)
 		{
 			PageItem_ImageFrame* imageItem=m_Selection->itemAt(a)->asImageFrame();
-			if (imageItem==NULL)
+			if (imageItem==nullptr)
 				continue;
 			imageItem->setImageVisible(!imageItem->imageVisible());
 			imageItem->update();
@@ -11260,8 +11260,8 @@
 
 void ScribusDoc::itemSelection_Rotate(double angle, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 
 	if (itemSelection->count() == 0) return;
 	
@@ -11311,7 +11311,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem!=NULL)
+			if (currItem!=nullptr)
 			{
 				if (currItem->asImageFrame())
 				{
@@ -11333,7 +11333,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem!=NULL)
+			if (currItem!=nullptr)
 			{
 				if (currItem->asImageFrame())
 				{
@@ -11355,7 +11355,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (currItem!=NULL)
+			if (currItem!=nullptr)
 			{
 				if (currItem->asImageFrame())
 				{
@@ -11508,21 +11508,21 @@
 			if (itemList->at(i)->isGroup())
 			{
 				QList<PageItem*>* ite = GroupOfItem(&itemList->at(i)->groupItemList, item);
-				if (ite != NULL)
+				if (ite != nullptr)
 					return ite;
 			}
 		}
-		return NULL;
-	}
-	return NULL;
+		return nullptr;
+	}
+	return nullptr;
 }
 
 void ScribusDoc::itemSelection_DeleteItem(Selection* customSelection, bool forceDeletion)
 {
 	if (appMode == modeEditClip)
 		return;
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -11553,7 +11553,7 @@
 		if ((currItem->asTextFrame() || currItem->asPathText()) && currItem==m_ScMW->storyEditor->currentItem() && this==m_ScMW->storyEditor->currentDocument())
 		{
 			if (forceDeletion)
-				m_ScMW->storyEditor->setCurrentDocumentAndItem(this, NULL);
+				m_ScMW->storyEditor->setCurrentDocumentAndItem(this, nullptr);
 			else
 			{
 				ScMessageBox::critical(m_ScMW, tr("Cannot Delete In-Use Item"), tr("The item %1 is currently being edited by Story Editor. The delete operation will be cancelled").arg(currItem->itemName()));
@@ -11595,7 +11595,7 @@
 	{
 		currItem = delItems.at(selectedItemCount - (de + 1));
 		itemList = GroupOfItem(Items, currItem);
-		if (itemList == NULL)
+		if (itemList == nullptr)
 			continue;
 		if ((currItem->asImageFrame()) && ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->imageIsAvailable)))
 			ScCore->fileWatcher->removeFile(currItem->Pfile);
@@ -11603,11 +11603,11 @@
 		for (int a=0; a < m_docMarksList.count(); a++)
 		{
 			Mark* m = m_docMarksList.at(a);
-			Q_ASSERT(m != NULL);
+			Q_ASSERT(m != nullptr);
 			if (m->isType(MARK2ItemType) && (m->getItemPtr() == currItem))
 			{
 				setUndoDelMark(m);
-				eraseMark(m, true, NULL, true);
+				eraseMark(m, true, nullptr, true);
 			}
 		}
 		if (currItem->isNoteFrame())
@@ -11661,7 +11661,7 @@
 	if (activeTransaction)
 		activeTransaction.commit();
 	// JG resetting ElemToLink fixes #5629
-	ElemToLink = NULL;
+	ElemToLink = nullptr;
 	
 	foreach(PageItem* tii, textInteractionItems)
 	{
@@ -11771,8 +11771,8 @@
 
 void ScribusDoc::itemSelection_SetLineGradient(VGradient& newGradient, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -11790,8 +11790,8 @@
 
 void ScribusDoc::itemSelection_SetFillGradient(VGradient& newGradient, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -11811,8 +11811,8 @@
 
 void ScribusDoc::itemSelection_SetMaskGradient(VGradient& newGradient, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -11831,8 +11831,8 @@
 
 void ScribusDoc::itemSelection_SetOverprint(bool overprint, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -11936,8 +11936,8 @@
 
 void ScribusDoc::itemSelection_SetImageOffset(double x, double y, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount <= 0)
 		return;
@@ -11980,8 +11980,8 @@
 
 void ScribusDoc::itemSelection_SetImageScale(double x, double y, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount <= 0)
 		return;
@@ -12024,7 +12024,7 @@
 
 void ScribusDoc::itemSelection_SetImageScaleAndOffset(double sx, double sy, double ox, double oy, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection !=0 );
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
@@ -12080,7 +12080,7 @@
 
 void ScribusDoc::itemSelection_SetImageRotation(double rot, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != 0);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
@@ -12113,9 +12113,9 @@
 {
 	Q_UNUSED(customSelection);
 	//CB TODO Handling custom selections
-	//Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	//Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	Selection* itemSelection = m_Selection;
-	assert(itemSelection!=0);
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	PageItem *currItem;
 	struct AlignObjs Object;
@@ -13532,7 +13532,7 @@
 
 void ScribusDoc::setCurrentPage(ScPage *newPage)
 {
-	if (newPage==NULL)
+	if (newPage==nullptr)
 		return;
 	m_currentPage = newPage;
 	if (m_ScMW)
@@ -13799,8 +13799,8 @@
 
 void ScribusDoc::itemSelection_ApplyImageEffects(ScImageEffectList& newEffectList, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=NULL);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -13824,7 +13824,7 @@
 
 void ScribusDoc::itemSelection_ApplyArrowHead(int startArrowID, int endArrowID, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != 0);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
@@ -13869,7 +13869,7 @@
 
 void ScribusDoc::itemSelection_ApplyArrowScale(int startArrowSc, int endArrowSc, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != 0);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
@@ -14050,11 +14050,11 @@
 {
 	*GxM = -1;
 	*GyM = -1;
-	ScPage* page = (refPage == NULL) ? currentPage() : refPage;
+	ScPage* page = (refPage == nullptr) ? currentPage() : refPage;
 	QMap<double, uint> tmpGuidesSel;
 	double viewScale=m_View->scale();
 	QList<PageItem*> item = getAllItems(*Items);
-	PageItem *parentI = NULL;
+	PageItem *parentI = nullptr;
 	if (m_Selection->count() > 0)
 		parentI = m_Selection->itemAt(0)->Parent;
 	for (int i=0;i<item.size();i++)
@@ -14601,8 +14601,8 @@
 void ScribusDoc::moveGroup(double x, double y, Selection* customSelection)
 {
 	double Scale = 1; //FIXME:av should all be in doc coordinates
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	Q_ASSERT(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	Q_ASSERT(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -14640,8 +14640,8 @@
 
 void ScribusDoc::rotateGroup(double angle, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	Q_ASSERT(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	Q_ASSERT(itemSelection != nullptr);
 	if (itemSelection->count()==0)
 		return;
 	double gx, gy, gh, gw;
@@ -14662,8 +14662,8 @@
 
 void ScribusDoc::rotateGroup(double angle, FPoint RCenter, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	Q_ASSERT(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	Q_ASSERT(itemSelection != nullptr);
 	if (itemSelection->count()==0)
 		return;
 	double gxS, gyS, ghS, gwS;
@@ -14693,8 +14693,8 @@
 
 void ScribusDoc::scaleGroup(double scx, double scy, bool scaleText, Selection* customSelection, bool scaleLine)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	Q_ASSERT(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	Q_ASSERT(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -14924,12 +14924,12 @@
 
 PageItem* ScribusDoc::groupObjectsSelection(Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	if (itemSelection->count() < 1)
-		return NULL;
+		return nullptr;
 	int objectsLayer = itemSelection->objectsLayer();
 	if (objectsLayer == -1)
-		return NULL;
+		return nullptr;
 	PageItem *currItem;
 	double x, y, w, h;
 	int selectedItemCount = itemSelection->count();
@@ -14990,7 +14990,7 @@
 PageItem* ScribusDoc::groupObjectsList(QList<PageItem*> &itemList)
 {
 	if (itemList.count() < 1)
-		return NULL;
+		return nullptr;
 	PageItem *currItem;
 	int selectedItemCount = itemList.count();
 	int lowestItem = 999999;
@@ -15093,12 +15093,12 @@
 
 PageItem * ScribusDoc::itemSelection_GroupObjects(bool changeLock, bool lock, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	if (itemSelection->count() < 1)
-		return NULL;
+		return nullptr;
 	int objectsLayer = itemSelection->objectsLayer();
 	if (objectsLayer == -1)
-		return NULL;
+		return nullptr;
 	PageItem *currItem;
 	double x, y, w, h;
 	UndoTransaction activeTransaction;
@@ -15195,7 +15195,7 @@
 
 void ScribusDoc::itemSelection_UnGroupObjects(Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	if (itemSelection->count() == 0)
 		return;
 
@@ -15343,7 +15343,7 @@
 	QTransform itemTrans = item->getTransform();
 	QTransform groupTrans = group->getTransform();
 	group->groupItemList.removeAll(item);
-	item->Parent = NULL;
+	item->Parent = nullptr;
 	double grScXi = 1.0;
 	double grScYi = 1.0;
 	getScaleFromMatrix(itemTrans, grScXi, grScYi);
@@ -15455,7 +15455,7 @@
 void ScribusDoc::resizeGroupToContents(PageItem* group)
 {
 	PageItem_Group* currItem = group->asGroupFrame();
-	if (currItem == NULL)
+	if (currItem == nullptr)
 		return;
 	QTransform groupTrans = group->getTransform();
 	QPainterPath input1 = currItem->PoLine.toQPainterPath(true);
@@ -15522,7 +15522,7 @@
 
 void ScribusDoc::itemSelection_resizeGroupToContents(Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	if (itemSelection->count() == 0)
 		return;
 	int docSelectionCount = itemSelection->count();
@@ -15676,8 +15676,8 @@
 
 void ScribusDoc::itemSelection_convertItemsTo(const PageItem::ItemType newType, Selection* restoredSelection, Selection* customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -15851,8 +15851,8 @@
 //CB TODO Use the selection loop properly
 void ScribusDoc::itemSelection_AdjustFrametoImageSize( Selection *customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -15865,7 +15865,7 @@
 	for (int i = 0; i < selectedItemCount; ++i)
 	{
 		PageItem *currItem = itemSelection->itemAt(i);
-		if (currItem!=NULL)
+		if (currItem!=nullptr)
 		{
 			if (currItem->asImageFrame() && currItem->imageIsAvailable)
 			{
@@ -15893,8 +15893,8 @@
 }
 void ScribusDoc::itemSelection_AdjustImagetoFrameSize( Selection *customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -15902,7 +15902,7 @@
 	for (int i = 0; i < selectedItemCount; ++i)
 	{
 		PageItem *currItem = itemSelection->itemAt(i);
-		if (currItem!=NULL)
+		if (currItem!=nullptr)
 		{
 			if (currItem->asImageFrame() && currItem->imageIsAvailable)
 				currItem->setImageScalingMode(false, true);
@@ -15915,8 +15915,8 @@
 
 void ScribusDoc::itemSelection_AdjustFrameHeightToText( Selection *customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -15927,7 +15927,7 @@
 	for (int i = 0; i < selectedItemCount; ++i)
 	{
 		PageItem *currItem = itemSelection->itemAt(i);
-		if (currItem!=NULL)
+		if (currItem!=nullptr)
 		{
 			if (currItem->asTextFrame() && (currItem->itemText.length() > 0) && !currItem->isTableItem)
 				currItem ->asTextFrame()->setTextFrameHeight();
@@ -15988,8 +15988,8 @@
 
 void ScribusDoc::itemSelection_SetColorProfile(const QString & profileName, Selection * customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -16012,8 +16012,8 @@
 
 void ScribusDoc::itemSelection_SetRenderIntent(int intentIndex, Selection * customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -16035,8 +16035,8 @@
  
 void ScribusDoc::itemSelection_SetCompressionMethod(int cmIndex, Selection * customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -16054,8 +16054,8 @@
 
 void ScribusDoc::itemSelection_SetCompressionQuality(int cqIndex, Selection * customSelection)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -16086,7 +16086,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			ite = allItems.at(ii);
-			if (ite->itemType() == itemType && ite->nextInChain()==NULL && !ite->isAutoFrame())
+			if (ite->itemType() == itemType && ite->nextInChain()==nullptr && !ite->isAutoFrame())
 				namesMap.insert(ite, ite->itemName());
 		}
 		allItems.clear();
@@ -16307,8 +16307,8 @@
 
 void ScribusDoc::itemSelection_UnlinkTextFrameAndKeepText( Selection *customSelection, bool cutText)
 {
-	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
-	assert(itemSelection!=0);
+	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
+	assert(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -16379,7 +16379,7 @@
 void ScribusDoc::removeInlineFrame(int fIndex)
 {
 	QList<PageItem*> allItems;
-	PageItem* it = NULL;
+	PageItem* it = nullptr;
 	int counter = 0;
 	for (int lc = 0; lc < 2; ++lc)
 	{
@@ -16591,7 +16591,7 @@
 		path = m_docPrefsData.docSetupPrefs.AutoSaveDir;
 	fileName = QDir::cleanPath(path + "/" + base + QString("_autosave_%1.sla").arg(dat.toString("dd_MM_yyyy_hh_mm")));
 	FileLoader fl(fileName);
-	if (fl.saveFile(fileName, this, 0))
+	if (fl.saveFile(fileName, this, nullptr))
 	{
 		scMW()->statusBar()->showMessage( tr("File %1 autosaved").arg(base), 5000);
 		if (autoSaveFiles.count() >= m_docPrefsData.docSetupPrefs.AutoSaveCount)
@@ -16614,7 +16614,7 @@
 	numerations.clear();
 	
 	Numeration num;
-	NumStruct * numS = NULL;
+	NumStruct * numS = nullptr;
 	for (int i=0; i < m_docParagraphStyles.count(); ++i)
 	{
 		ParagraphStyle &style = m_docParagraphStyles[i];
@@ -16725,7 +16725,7 @@
 		if (pos != 0 && itemText.text(pos-1) != SpecialChars::PARSEP)
 			continue;
 		Mark* mark = itemText.mark(pos);
-		if (mark != NULL && mark->isType(MARKBullNumType) && itemText.paragraphStyle(pos).hasNum())
+		if (mark != nullptr && mark->isType(MARKBullNumType) && itemText.paragraphStyle(pos).hasNum())
 		{
 			ParagraphStyle style = itemText.paragraphStyle(pos);
 			if (style.numName() == "<local block>")
@@ -16830,7 +16830,7 @@
 				//reset items and stories range counters
 				foreach (NumStruct * numS, numerations.values())
 					for (int l = 0; l < numS->m_nums.count(); ++l)
-						if ((numS->m_nums[l].range == NSRframe) || ((numS->m_nums[l].range == NSRstory) && (item->prevInChain() == NULL)))
+						if ((numS->m_nums[l].range == NSRframe) || ((numS->m_nums[l].range == NSRstory) && (item->prevInChain() == nullptr)))
 							numS->m_counters[l] = numS->m_nums[l].start -1;
 
 				int pos = item->firstInFrame();
@@ -16872,7 +16872,7 @@
 							
 							QString prefixStr = getNumberStr(style.numName(), style.numLevel(), resetNums, style);
 							numerations.value(style.numName())->m_lastlevel = style.numLevel();
-							if (mark == NULL)
+							if (mark == nullptr)
 							{
 								BulNumMark* bnMark = new BulNumMark;
 								item->itemText.insertMark(bnMark,pos);
@@ -16926,9 +16926,9 @@
 	for (int a=0; a < m_docMarksList.count(); ++a)
 	{
 		Mark* m = m_docMarksList.at(a);
-		if (m == NULL)
+		if (m == nullptr)
 			continue;
-		if ((m != NULL) && m->isType(type))
+		if ((m != nullptr) && m->isType(type))
 			nameList.append(m->label);
 	}
 	return nameList;
@@ -16938,16 +16938,16 @@
 {
 	foreach (Mark* mrk, m_docMarksList)
 	{
-		if ((mrk != NULL) && (mrk->label == l) && mrk->isType(t))
+		if ((mrk != nullptr) && (mrk->label == l) && mrk->isType(t))
 			return mrk;
 	}
-	return NULL;
+	return nullptr;
 }
 
 Mark *ScribusDoc::newMark(Mark* mrk)
 {
 	Mark* newMrk = new Mark();
-	if (mrk != NULL)
+	if (mrk != nullptr)
 		*newMrk = *mrk;
 	m_docMarksList.append(newMrk);
 	return newMrk;
@@ -16963,7 +16963,7 @@
 
 PageItem* ScribusDoc::findMarkItem(Mark* mrk, int &lastItem)
 {
-	PageItem* item = NULL;
+	PageItem* item = nullptr;
 	for (int a = lastItem +1; a < DocItems.count(); ++a)
 	{
 		item = DocItems.at(a);
@@ -16980,18 +16980,18 @@
 		}
 	}
 	lastItem = 0;
-	return NULL;
+	return nullptr;
 }
 
 int ScribusDoc::findMarkCPos(Mark* mrk, PageItem* &currItem, int Start)
 {
-	if (currItem == NULL)
+	if (currItem == nullptr)
 		currItem = findFirstMarkItem(mrk);
-	if (currItem == NULL)
+	if (currItem == nullptr)
 	{
 		foreach (PageItem* item, DocItems)
 		{
-			if (item->isTextFrame() && (item->prevInChain() == NULL))
+			if (item->isTextFrame() && (item->prevInChain() == nullptr))
 			{
 				for (int pos = 0; pos < item->itemText.length(); ++pos)
 				{
@@ -17024,7 +17024,7 @@
 	{
 		if (currItem->isTextFrame() && (currItem->itemText.length() > 0))
 		{
-			if (!visible && currItem->prevInChain() != NULL)
+			if (!visible && currItem->prevInChain() != nullptr)
 				//check in whole itemText only for first frames in chain
 				continue;
 			int i = 0;
@@ -17047,16 +17047,16 @@
 
 void ScribusDoc::setCursor2MarkPos(Mark *mark)
 {
-	if (mark == NULL)
+	if (mark == nullptr)
 		return;
-	PageItem* item = NULL;
+	PageItem* item = nullptr;
 	if (mark->isType(MARKNoteFrameType) || mark->isType(MARKNoteMasterType))
 		item = mark->getItemPtr();
-	if (item == NULL)
+	if (item == nullptr)
 		item = getItemFromName(mark->getItemName());
-	if (item == NULL)
+	if (item == nullptr)
 		item = findFirstMarkItem(mark);
-	if (item == NULL)
+	if (item == nullptr)
 		return;
 
 	int CPos = findMarkCPos(mark, item);
@@ -17072,7 +17072,7 @@
 	bool found = false;
 	if (fromText)
 	{
-		if (item != NULL)
+		if (item != nullptr)
 		{
 			int MPos = findMarkCPos(mrk, item);
 			while (MPos > -1)
@@ -17091,7 +17091,7 @@
 			int MPos = -1;
 			int itemIndex = -1;
 			item = findMarkItem(mrk, itemIndex);
-			while (item != NULL)
+			while (item != nullptr)
 			{
 				MPos = findMarkCPos(mrk, item);
 				while (MPos > -1)
@@ -17109,7 +17109,7 @@
 	for (int a=0; a < m_docMarksList.count(); ++a)
 	{
 		Mark* m = m_docMarksList.at(a);
-		if (m == NULL)
+		if (m == nullptr)
 			continue;
 		if (m->isType(MARK2MarkType))
 		{
@@ -17119,7 +17119,7 @@
 			if (mrk == getMark(l, t))
 			{
 				setUndoDelMark(m);
-				eraseMark(m, true, NULL, true);
+				eraseMark(m, true, nullptr, true);
 			}
 		}
 	}
@@ -17165,7 +17165,7 @@
 			int itemIndex = -1;
 			//find all mark insertions
 			PageItem* item = findMarkItem(mrk, itemIndex);
-			while (item != NULL)
+			while (item != nullptr)
 			{
 				int num = 0; //shift of insertion position for undo
 				MPos = findMarkCPos(mrk, item);
@@ -17193,7 +17193,7 @@
 	int itemNo = -1;
 	bool found = false;
 	PageItem* mItem = findMarkItem(mrk, itemNo);
-	while (mItem != NULL)
+	while (mItem != nullptr)
 	{
 		found = true;
 		mItem->asTextFrame()->invalidateLayout(false);
@@ -17214,7 +17214,7 @@
 		{
 			if (!item->isTextFrame() || item->isNoteFrame())
 				continue;
-			if (item->prevInChain() != NULL)
+			if (item->prevInChain() != nullptr)
 				continue;
 			item = item->lastInChain();
 			int pos = item->lastInFrame() + 1;
@@ -17225,7 +17225,7 @@
 				if (item->itemText.hasMark(i) && item->itemText.mark(i)->isNoteType())
 				{
 					TextNote * note = item->itemText.mark(i)->getNotePtr();
-					note->setNoteMark(NULL);
+					note->setNoteMark(nullptr);
 					note->masterMark()->setItemPtr(item);
 					note->masterMark()->setItemName(item->itemName());
 				}
@@ -17238,7 +17238,7 @@
 			return notesFramesUpdate();
 		return false;
 	}
-	Q_ASSERT(m_docMarksList.removeAll(NULL) == 0);
+	Q_ASSERT(m_docMarksList.removeAll(nullptr) == 0);
 
 	bool docWasChanged = false;
 
@@ -17255,8 +17255,8 @@
 			else if (mrk->isUnique())
 			{
 				PageItem* mItem = findFirstMarkItem(mrk);
-				mrk->OwnPage =(mItem != NULL) ? mItem->OwnPage : -1;
-				mrk->setItemName((mItem != NULL) ? mItem->itemName() : QString(""));
+				mrk->OwnPage =(mItem != nullptr) ? mItem->OwnPage : -1;
+				mrk->setItemName((mItem != nullptr) ? mItem->itemName() : QString(""));
 			}
 		}
 	}
@@ -17287,16 +17287,16 @@
 	{
 		//set mark page number
 		PageItem* mItem = findFirstMarkItem(mrk);
-		if (mItem != NULL)
+		if (mItem != nullptr)
 			mrk->OwnPage = mItem->OwnPage;
 		else
 			mrk->OwnPage = -1;
 		if (mrk->isType(MARK2ItemType))
 		{
-			if (mrk->getItemPtr() != NULL)
+			if (mrk->getItemPtr() != nullptr)
 			{
 				mrk->setString(getSectionPageNumberForPageIndex(mrk->getItemPtr()->OwnPage));
-				if (mItem != NULL)
+				if (mItem != nullptr)
 				{
 					mItem->asTextFrame()->invalidateLayout(false);
 					docWasChanged = true;
@@ -17311,10 +17311,10 @@
 			MarkType t;
 			mrk->getMark(l,t);
 			Mark* destMark = getMark(l,t);
-			if (destMark != NULL)
+			if (destMark != nullptr)
 			{
 				PageItem* dItem = findFirstMarkItem(destMark);
-				if (dItem == NULL)
+				if (dItem == nullptr)
 				{
 					destMark->OwnPage = -1;
 					mrk->setString("");
@@ -17324,7 +17324,7 @@
 				{
 					destMark->OwnPage = dItem->OwnPage;
 					mrk->setString(getSectionPageNumberForPageIndex(destMark->OwnPage));
-					if (mItem != NULL)
+					if (mItem != nullptr)
 					{
 						mItem->asTextFrame()->invalidateLayout(false);
 						docWasChanged = true;
@@ -17347,13 +17347,13 @@
 
 	//if doc is loading overwrite current set
 	NotesStyle* newNS = getNotesStyle(nsName);
-	if (isLoading() && (newNS != NULL))
+	if (isLoading() && (newNS != nullptr))
 		*newNS = NS;
 	else
 	{
 		//add new notes style
 		if (!validateNSet(NS))
-			return NULL;
+			return nullptr;
 		newNS = new NotesStyle();
 		*newNS = NS;
 		QStringList nsNames;
@@ -17383,7 +17383,7 @@
 void ScribusDoc::deleteNotesStyle(QString nsName)
 {
 	NotesStyle* NS = getNotesStyle(nsName);
-	assert(NS != NULL);
+	assert(NS != nullptr);
 	//do not delete default notes style
 	if (NS == m_docNotesStylesList.at(0))
 		return;
@@ -17456,23 +17456,23 @@
 		if (m_docNotesStylesList.at(i)->name() == nsName)
 			return m_docNotesStylesList.at(i);
 	}
-	return NULL;
+	return nullptr;
 }
 
 void ScribusDoc::deleteNote(TextNote* note)
 {
-	if (note == NULL)
+	if (note == nullptr)
 		return;
-	PageItem_NoteFrame* nF = NULL;
-	if (note->noteMark() != NULL)
-	{
-		if (note->noteMark()->getItemPtr() != NULL)
+	PageItem_NoteFrame* nF = nullptr;
+	if (note->noteMark() != nullptr)
+	{
+		if (note->noteMark()->getItemPtr() != nullptr)
 			nF = note->noteMark()->getItemPtr()->asNoteFrame();
-		if (nF == NULL)
+		if (nF == nullptr)
 			nF = findFirstMarkItem(note->noteMark())->asNoteFrame();
 	}
 	PageItem* master = note->masterMark()->getItemPtr();
-	if (nF != NULL)
+	if (nF != nullptr)
 	{
 		nF->removeNote(note);
 		nF->invalid = true;
@@ -17483,9 +17483,9 @@
 			master->asTextFrame()->removeNoteFrame(nF);
 		}
 	}
-	if (note->masterMark() != NULL)
+	if (note->masterMark() != nullptr)
 		eraseMark(note->masterMark(), true, master);
-	if (note->noteMark() != NULL)
+	if (note->noteMark() != nullptr)
 		eraseMark(note->noteMark(), true, nF);
 	m_docNotesList.removeOne(note);
 	setNotesChanged(true);
@@ -17527,7 +17527,7 @@
 		Mark* mark = frame->itemText.mark(pos);
 		if (frame->itemText.hasMark(pos) && mark->isType(MARKNoteMasterType))
 		{
-			if (mark->getNotePtr() == NULL)
+			if (mark->getNotePtr() == nullptr)
 				continue;
 			if (mark->getNotePtr()->notesStyle() == nStyle)
 			{
@@ -17556,7 +17556,7 @@
 				TextNote* note = mark->getNotePtr();
 				note->setNum(noteNum);
 				note->masterMark()->setItemPtr(frame);
-				if (note->noteMark() != NULL)
+				if (note->noteMark() != nullptr)
 				{
 					note->noteMark()->setString(numStr);
 					label = label.replace("NoteMark","NoteFrameMark");
@@ -17576,7 +17576,7 @@
 	if (doUpdate)
 	{
 		frame->invalidateLayout(false);
-		if ((nF != NULL) && !nF->deleteIt)
+		if ((nF != nullptr) && !nF->deleteIt)
 		{
 			if (nStyle->isEndNotes())
 				m_docEndNotesFramesChanged.append(nF);
@@ -17585,7 +17585,7 @@
 		}
 	}
 	num = noteNum;
-	if (!nStyle->isEndNotes() && (index == 0) && (nF != NULL) && nF->isAutoNoteFrame())
+	if (!nStyle->isEndNotes() && (index == 0) && (nF != nullptr) && nF->isAutoNoteFrame())
 		nF->deleteIt = true;
 }
 
@@ -17594,11 +17594,11 @@
 	bool docWasChanged = false;
 	flag_restartMarksRenumbering = false;
 	flag_updateEndNotes = false;
-	PageItem_NoteFrame* endNF = NULL;
+	PageItem_NoteFrame* endNF = nullptr;
 	if (nStyle->isEndNotes() && nStyle->range() == NSRdocument)
 	{
 		endNF = endNoteFrame(nStyle);
-		if (endNF != NULL)
+		if (endNF != nullptr)
 			clearNotesInFrameList(endNF);
 	}
 	flag_layoutNotesFrames = false;  //do not layout notes frames while counting notes
@@ -17621,7 +17621,7 @@
 						if (flag_restartMarksRenumbering)
 						{
 							//restart whole update as items was changed
-							if (endNF != NULL)
+							if (endNF != nullptr)
 								clearNotesInFrameList(endNF);
 							page = -1;
 							itemsCount = Items->count();
@@ -17646,7 +17646,7 @@
 		if ((num == nStyle->start()) && nStyle->isEndNotes())
 		{
 			PageItem_NoteFrame* nF = endNoteFrame(nStyle);
-			if (nF != NULL && nF->isAutoNoteFrame())
+			if (nF != nullptr && nF->isAutoNoteFrame())
 				nF->deleteIt = true;
 		}
 	}
@@ -17661,13 +17661,13 @@
 				if (nStyle->isEndNotes())
 				{
 					endNF = endNoteFrame(nStyle, getSectionKeyForPageIndex(page));
-					if (endNF != NULL)
+					if (endNF != nullptr)
 						clearNotesInFrameList(endNF);
 				}
 				for (i = 0; i < itemsCount; ++i)
 				{
 					PageItem* currItem = Items->at(i);
-					if (currItem == NULL)
+					if (currItem == nullptr)
 						continue;
 					if ((currItem->OwnPage == page) && currItem->isTextFrame() && !currItem->isNoteFrame() && (currItem->itemText.length() > 0))
 					{
@@ -17677,7 +17677,7 @@
 							if (flag_restartMarksRenumbering)
 							{
 								//restart whole update as items was changed
-								if (endNF != NULL)
+								if (endNF != nullptr)
 									clearNotesInFrameList(endNF);
 								page = section.fromindex -1;
 								i = -1;
@@ -17702,7 +17702,7 @@
 				if ((i != -1) && (num == nStyle->start()) && nStyle->isEndNotes())
 				{
 					PageItem_NoteFrame* nF = endNoteFrame(nStyle);
-					if (nF != NULL && nF->isAutoNoteFrame())
+					if (nF != nullptr && nF->isAutoNoteFrame())
 						nF->deleteIt = true;
 				}
 			}
@@ -17713,14 +17713,14 @@
 		for (i = 0; i < itemsCount; ++i)
 		{
 			PageItem* currItem = Items->at(i);
-			if (currItem == NULL)
+			if (currItem == nullptr)
 				continue;
 			if (currItem->isTextFrame() && !currItem->isNoteFrame() && (currItem->itemText.length() > 0))
 			{
 				if (nStyle->isEndNotes() && nStyle->range() == NSRstory)
 				{
 					endNF = endNoteFrame(nStyle, (void*) currItem);
-					if (endNF != NULL)
+					if (endNF != nullptr)
 						clearNotesInFrameList(endNF);
 				}
 				if (!currItem->asTextFrame()->isValidChainFromBegin())
@@ -17729,7 +17729,7 @@
 					if (flag_restartMarksRenumbering)
 					{
 						//restart whole update as items was changed
-						if (endNF != NULL)
+						if (endNF != nullptr)
 							clearNotesInFrameList(endNF);
 						i = -1;
 						itemsCount = Items->count();
@@ -17741,11 +17741,11 @@
 				if (nStyle->range() == NSRstory)
 				{
 					//restart numeration for all first frames of story chain
-					if (currItem->prevInChain() == NULL)
+					if (currItem->prevInChain() == nullptr)
 					{
 						num = nStyle->start();
 						PageItem* nextItem = currItem;
-						while (nextItem != NULL)
+						while (nextItem != nullptr)
 						{
 							if (nStyle->isEndNotes() || nextItem->asTextFrame()->hasNoteFrame(nStyle, false))
 								updateItemNotesNums(nextItem->asTextFrame(), nStyle, num);
@@ -17776,7 +17776,7 @@
 			if (nStyle->isEndNotes() && nStyle->range() == NSRpage)
 			{
 				endNF = endNoteFrame(nStyle, (void*) DocPages.at(page));
-				if (endNF != NULL)
+				if (endNF != nullptr)
 					clearNotesInFrameList(endNF);
 			}
 			//restart numeration for each page
@@ -17785,7 +17785,7 @@
 			for (i = 0; i < itemsCount; ++i)
 			{
 				PageItem* currItem = Items->at(i);
-				if (currItem == NULL)
+				if (currItem == nullptr)
 					continue;
 				if ((currItem->OwnPage == page) && currItem->isTextFrame() && !currItem->isNoteFrame() && (currItem->itemText.length() > 0))
 				{
@@ -17795,7 +17795,7 @@
 						if (flag_restartMarksRenumbering)
 						{
 							//restart whole update as items was changed
-							if (endNF != NULL)
+							if (endNF != nullptr)
 								clearNotesInFrameList(endNF);
 							page = -1;
 							i = -1;
@@ -17820,7 +17820,7 @@
 			if ((i != -1) && (num == nStyle->start()) && nStyle->isEndNotes())
 			{
 				PageItem_NoteFrame* nF = endNoteFrame(nStyle);
-				if (nF != NULL && nF->isAutoNoteFrame())
+				if (nF != nullptr && nF->isAutoNoteFrame())
 					nF->deleteIt = true;
 			}
 		}
@@ -17858,7 +17858,7 @@
 					newStyle.setParent(paragraphStyles()[0].name());
 				else
 				{
-					if (item->asNoteFrame()->masterFrame() != NULL)
+					if (item->asNoteFrame()->masterFrame() != nullptr)
 					{
 						//set back style from master frame
 						newStyle.setParent(item->asNoteFrame()->masterFrame()->itemText.defaultStyle().parent());
@@ -17882,7 +17882,7 @@
 	{
 		item = item->firstInChain();
 
-		while (item != NULL)
+		while (item != nullptr)
 		{
 			foreach (PageItem_NoteFrame* nF, item->asTextFrame()->notesFramesList())
 			{
@@ -17914,10 +17914,10 @@
 
 const ScPage *ScribusDoc::page4EndNotes(NotesStyle *NS, PageItem* item)
 {
-	ScPage* scP = NULL;
+	ScPage* scP = nullptr;
 	if ((NS->range() == NSRdocument) || ((NS->range() == NSRsection) && m_docPrefsData.docSectionMap.isEmpty()))
 		scP = DocPages.last();
-	else if (item != NULL)
+	else if (item != nullptr)
 	{
 		if (NS->range() == NSRpage)
 			scP = DocPages.at(item->OwnPage);
@@ -18029,7 +18029,7 @@
 {
 	if (m_docEndNotesFramesMap.isEmpty())
 		return;
-	if (nStyle == NULL)
+	if (nStyle == nullptr)
 	{
 		int NScount = m_docNotesStylesList.count();
 		for (int i=0; i < NScount; ++i)
@@ -18130,11 +18130,11 @@
 
 void ScribusDoc::delNoteFrame(PageItem_NoteFrame* nF, bool removeMarks, bool forceDeletion)
 {
-	Q_ASSERT(nF != NULL);
+	Q_ASSERT(nF != nullptr);
 
 	//for all notes in noteFrame set notes marks to null
 	foreach(TextNote* n, nF->notesList())
-		n->setNoteMark(NULL);
+		n->setNoteMark(nullptr);
 
 	if (nF->itemText.length() > 0 && removeMarks)
 		nF->removeMarksFromText(false);
@@ -18155,7 +18155,7 @@
 			note->masterMark()->getItemPtr()->invalid = true;
 		}
 	}
-	else if (nF->masterFrame() != NULL)
+	else if (nF->masterFrame() != nullptr)
 	{
 		nF->masterFrame()->removeNoteFrame(nF);
 		nF->masterFrame()->invalid = true;
@@ -18169,7 +18169,7 @@
 	for (int a=0; a < m_docMarksList.count(); ++a)
 	{
 		Mark* m = m_docMarksList.at(a);
-		Q_ASSERT(m != NULL);
+		Q_ASSERT(m != nullptr);
 		if (m->isType(MARK2ItemType) && (m->getItemPtr() == nF))
 		{
 			setUndoDelMark(m);
@@ -18260,15 +18260,15 @@
 		return endNoteFrame(nStyle, (void*) DocPages.at(master->OwnPage));
 	else if (nStyle->range() == NSRstory)
 		return endNoteFrame(nStyle, master->firstInChain());
-	return NULL;
+	return nullptr;
 }
 
 PageItem_NoteFrame* ScribusDoc::endNoteFrame(NotesStyle *nStyle, int sectIndex)
 {
 	if (nStyle->range() != NSRsection)
-		return NULL;
+		return nullptr;
 	if (m_docEndNotesFramesMap.isEmpty())
-		return NULL;
+		return nullptr;
 
 	QMap<PageItem_NoteFrame*, rangeItem>::Iterator it = m_docEndNotesFramesMap.begin();
 	QMap<PageItem_NoteFrame*, rangeItem>::Iterator end = m_docEndNotesFramesMap.end();
@@ -18283,15 +18283,15 @@
 		}
 		++it;
 	}
-	return NULL;
+	return nullptr;
 }
 
 PageItem_NoteFrame* ScribusDoc::endNoteFrame(NotesStyle *nStyle, void* item)
 {
 	if (m_docEndNotesFramesMap.isEmpty())
-		return NULL;
-	if ((nStyle->range() != NSRdocument) && (item == NULL))
-		return NULL;
+		return nullptr;
+	if ((nStyle->range() != NSRdocument) && (item == nullptr))
+		return nullptr;
 
 	QMap<PageItem_NoteFrame*, rangeItem>::Iterator it = m_docEndNotesFramesMap.begin();
 	QMap<PageItem_NoteFrame*, rangeItem>::Iterator end = m_docEndNotesFramesMap.end();
@@ -18308,7 +18308,7 @@
 		}
 		++it;
 	}
-	return NULL;
+	return nullptr;
 }
 
 /* Functions for PDF Form Actions */
@@ -18324,7 +18324,7 @@
 void ScribusDoc::ResetFormFields()
 {
 	QList<PageItem*> allItems;
-	PageItem* it = NULL;
+	PageItem* it = nullptr;
 	uint counter = 0;
 	for (uint lc = 0; lc < 2; ++lc)
 	{

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h	(original)
+++ trunk/Scribus/scribus/scribusdoc.h	Mon Apr 30 21:39:00 2018
@@ -107,7 +107,7 @@
 	bool isModified() const;
 /** Setzt die Seitenattribute */
 	void setPage(double w, double h, double t, double l, double r, double b, double sp, double ab, bool atf, int fp);
-	void resetPage(int fp, MarginStruct* newMargins=0);
+	void resetPage(int fp, MarginStruct* newMargins=nullptr);
 
 	/**
 	 * @brief Return the view associated with the document
@@ -177,11 +177,11 @@
 	void setArrowStyles(QList<ArrowDesc>& as) { m_docPrefsData.arrowStyles=as; }
 	QList<ArrowDesc>& arrowStyles() { return m_docPrefsData.arrowStyles; }
 	void appendToArrowStyles(const struct ArrowDesc& as) { m_docPrefsData.arrowStyles.append(as); }
-	const bool marginColored() const { return m_docPrefsData.displayPrefs.marginColored; }
+	bool marginColored() const { return m_docPrefsData.displayPrefs.marginColored; }
 	void setMarginColored(bool b) { m_docPrefsData.displayPrefs.marginColored=b; }
 	QMap<QString, CheckerPrefs>& checkerProfiles() { return m_docPrefsData.verifierPrefs.checkerPrefsList; }
 	void setCheckerProfiles(const QMap<QString, CheckerPrefs>& cl) { m_docPrefsData.verifierPrefs.checkerPrefsList=cl; }
-	void set1CheckerProfile(const QString profileName, const struct CheckerPrefs& cs) { m_docPrefsData.verifierPrefs.checkerPrefsList[profileName] = cs; }
+	void set1CheckerProfile(const QString& profileName, const struct CheckerPrefs& cs) { m_docPrefsData.verifierPrefs.checkerPrefsList[profileName] = cs; }
 	void clearCheckerProfiles() { m_docPrefsData.verifierPrefs.checkerPrefsList.clear(); }
 	const QString& curCheckProfile() const { return m_docPrefsData.verifierPrefs.curCheckProfile; }
 	void setCurCheckProfile(const QString& s) { m_docPrefsData.verifierPrefs.curCheckProfile=s; }
@@ -209,7 +209,7 @@
 	DocumentInformation& documentInfo() { return m_docPrefsData.docInfo; }
 	void setDocumentInfo(DocumentInformation di) { m_docPrefsData.docInfo=di; }
 	DocumentSectionMap& sections() { return m_docPrefsData.docSectionMap; }
-	void setSections(DocumentSectionMap dsm) { m_docPrefsData.docSectionMap=dsm; }
+	void setSections(DocumentSectionMap dsm) { m_docPrefsData.docSectionMap=std::move(dsm); }
 	const QMap<QString, int> & usedFonts() { return UsedFonts; }
 
 	const ApplicationPrefs& prefsData() { return m_docPrefsData; }
@@ -223,7 +223,7 @@
 	ScPage* addMasterPage(const int, const QString&);
 	void deleteMasterPage(const int);
 	//! @brief Rebuild master name list
-	void rebuildMasterNames(void);
+	void rebuildMasterNames();
 	//! @brief Replace a master page by default one
 	void replaceMasterPage(const QString& oldMasterPage);
 	//! @brief Rename a master page
@@ -445,7 +445,7 @@
 	 * @brief Return the layer count
 	 * @return Number of layers in doc
 	 */
-	int layerIDFromName(QString name);
+	int layerIDFromName(const QString& name);
 	int layerCount() const;
 	/**
 	 * @brief Lower a layer
@@ -608,7 +608,7 @@
 	 *        
 	 * @param fileName The path of the document we want to extract its styles
 	 */
-	void loadStylesFromFile(QString fileName);
+	void loadStylesFromFile(const QString& fileName);
 	/**
 	 * @brief Gather styles from another document.
 	 *        
@@ -617,7 +617,7 @@
 	 * @param tempCharStyles A pointer to a StyleSet which will be filled by character styles
 	 * @param tempLineStyles A map which will be filled by line styles
 	 */
-	void loadStylesFromFile(QString fileName, StyleSet<ParagraphStyle> *tempStyles,
+	void loadStylesFromFile(const QString& fileName, StyleSet<ParagraphStyle> *tempStyles,
 	                                          StyleSet<CharStyle> *tempCharStyles,
 											  QHash<QString, multiLine> *tempLineStyles);
 
@@ -755,7 +755,7 @@
 	/**
 	 * @brief Save function
 	 */
-	bool save(const QString& fileName, QString* savedFile = NULL);
+	bool save(const QString& fileName, QString* savedFile = nullptr);
 	/**
 	 * @brief Set the page margins. Current code uses current page only, also provide a (currently, TODO) option for this.
 	 */
@@ -861,7 +861,7 @@
 	 * @param PrCMYK cmyk profile
 	 * @param dia optional progress widget
 	 */
-	void RecalcPictures(QList<PageItem*>* items, ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia = 0);
+	void RecalcPictures(QList<PageItem*>* items, ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia = nullptr);
 	/**
 	 *
 	 * @brief Find the minX,MinY and maxX,maxY for the canvas required for the doc
@@ -899,7 +899,7 @@
 	/**
 	 * @brief Item type conversion functions
 	 */
-	PageItem* convertItemTo(PageItem *currItem, PageItem::ItemType newType, PageItem* secondaryItem=NULL);
+	PageItem* convertItemTo(PageItem *currItem, PageItem::ItemType newType, PageItem* secondaryItem=nullptr);
 	
 	/**
 	 * @brief The page number of the current page
@@ -999,7 +999,7 @@
 	//! @brief Some internal align tools
 	typedef enum {alignFirst, alignLast, alignPage, alignMargins, alignGuide, alignSelection } AlignTo;
 	typedef enum {alignByMoving, alignByResizing } AlignMethod;
-	void buildAlignItemList(Selection* customSelection=0);
+	void buildAlignItemList(Selection* customSelection = nullptr);
 	bool startAlign(uint minObjects = 1);
 	void endAlign();
 	/**
@@ -1029,28 +1029,28 @@
 
 
 	QList<PageItem*>* GroupOfItem(QList<PageItem*>* itemList, PageItem* item);
-	PageItem* groupObjectsSelection(Selection* customSelection=0);
+	PageItem* groupObjectsSelection(Selection* customSelection = nullptr);
 	PageItem* groupObjectsList(QList<PageItem*> &itemList);
 	void groupObjectsToItem(PageItem* groupItem, QList<PageItem*> &itemList);
-	PageItem * itemSelection_GroupObjects  (bool changeLock, bool lock, Selection* customSelection=0);
-	void itemSelection_UnGroupObjects(Selection* customSelection=0);
+	PageItem * itemSelection_GroupObjects  (bool changeLock, bool lock, Selection* customSelection = nullptr);
+	void itemSelection_UnGroupObjects(Selection* customSelection = nullptr);
 	void addToGroup(PageItem* group, PageItem* item);
 	void removeFromGroup(PageItem* item);
 	void rescaleGroup(PageItem* group, double scale);
 	void resizeGroupToContents(PageItem* group);
-	void itemSelection_resizeGroupToContents(Selection *customSelection=0);
-	void itemSelection_convertItemsTo(const PageItem::ItemType newType, Selection* restoredSelection=0, Selection* customSelection=0);
+	void itemSelection_resizeGroupToContents(Selection* customSelection = nullptr);
+	void itemSelection_convertItemsTo(const PageItem::ItemType newType, Selection* restoredSelection=0, Selection* customSelection = nullptr);
 	void itemSelection_convertItemsToSymbol(QString& patternName);
-	void itemSelection_ApplyParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection=0, bool rmDirectFormatting = false);
-	void itemSelection_SetParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection=0);
-	void itemSelection_ApplyCharStyle(const CharStyle & newstyle, Selection* customSelection=0, QString ETEA = "");
-	void itemSelection_SetCharStyle(const CharStyle & newstyle, Selection* customSelection=0);
-	void itemSelection_EraseParagraphStyle(Selection* customSelection=0);
-	void itemSelection_EraseCharStyle(Selection* customSelection=0);
-
-	void itemSelection_SetNamedParagraphStyle(const QString & name, Selection* customSelection=0);
-	void itemSelection_SetNamedCharStyle(const QString & name, Selection* customSelection=0);
-	void itemSelection_SetNamedLineStyle(const QString & name, Selection* customSelection=0);
+	void itemSelection_ApplyParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection = nullptr, bool rmDirectFormatting = false);
+	void itemSelection_SetParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection = nullptr);
+	void itemSelection_ApplyCharStyle(const CharStyle & newstyle, Selection* customSelection = nullptr, QString ETEA = "");
+	void itemSelection_SetCharStyle(const CharStyle & newstyle, Selection* customSelection = nullptr);
+	void itemSelection_EraseParagraphStyle(Selection* customSelection = nullptr);
+	void itemSelection_EraseCharStyle(Selection* customSelection = nullptr);
+
+	void itemSelection_SetNamedParagraphStyle(const QString & name, Selection* customSelection = nullptr);
+	void itemSelection_SetNamedCharStyle(const QString & name, Selection* customSelection = nullptr);
+	void itemSelection_SetNamedLineStyle(const QString & name, Selection* customSelection = nullptr);
 
 	void itemSelection_SetSoftShadow(bool has, QString color, double dx, double dy, double radius, int shade, double opac, int blend, bool erase, bool objopa);
 
@@ -1058,37 +1058,37 @@
 	void itemSelection_SetLineArt(Qt::PenStyle w);
 	void itemSelection_SetLineJoin(Qt::PenJoinStyle w);
 	void itemSelection_SetLineEnd(Qt::PenCapStyle w);
-	void itemSelection_SetAlignment(int w, Selection* customSelection=0);
-	void itemSelection_SetDirection(int w, Selection* customSelection=0);
-	void itemSelection_SetLineSpacing(double w, Selection* customSelection=0);
-	void itemSelection_SetLineSpacingMode(int w, Selection* customSelection=0);
-	void itemSelection_SetLanguage(QString w, Selection* customSelection=0);
+	void itemSelection_SetAlignment(int w, Selection* customSelection = nullptr);
+	void itemSelection_SetDirection(int w, Selection* customSelection = nullptr);
+	void itemSelection_SetLineSpacing(double w, Selection* customSelection = nullptr);
+	void itemSelection_SetLineSpacingMode(int w, Selection* customSelection = nullptr);
+	void itemSelection_SetLanguage(QString w, Selection* customSelection = nullptr);
 	void itemSetFont(const QString& newFont);
-	void itemSelection_SetFont(QString fon, Selection* customSelection=0);
-	void itemSelection_SetParBackgroundColor(QString farbe, Selection* customSelection=0);
-	void itemSelection_SetParBackgroundShade(int sha, Selection* customSelection=0);
-	void itemSelection_SetBackgroundColor(QString farbe, Selection* customSelection=0);
-	void itemSelection_SetBackgroundShade(int sha, Selection* customSelection=0);
-	void itemSelection_SetFillColor(QString farbe, Selection* customSelection=0);
-	void itemSelection_SetFillShade(int sha, Selection* customSelection=0);
-	void itemSelection_SetStrokeColor(QString farbe, Selection* customSelection=0);
-	void itemSelection_SetStrokeShade(int sha, Selection* customSelection=0);
-	void itemSelection_SetScaleV(int, Selection* customSelection=0);
-	void itemSelection_SetScaleH(int, Selection* customSelection=0);
-	void itemSelection_SetBaselineOffset(int, Selection* customSelection=0);
-	void itemSelection_SetOutlineWidth(int, Selection* customSelection=0);
-	void itemSelection_SetShadowOffsets(int shx, int shy, Selection* customSelection=0);
-	void itemSelection_SetUnderline(int pos, int wid, Selection* customSelection=0);
-	void itemSelection_SetStrikethru(int pos, int wid, Selection* customSelection=0);
-	void itemSelection_SetEffects(int s, Selection* customSelection=0);
-	void itemSelection_SetOpticalMargins(int i, Selection* customSelection=0);
-	void itemSelection_resetOpticalMargins(Selection* customSelection=0);
-	void itemSelection_SetColorProfile(const QString& profileName, Selection* customSelection=0);
-	void itemSelection_SetRenderIntent(int intentIndex, Selection* customSelection=0);
-	void itemSelection_SetCompressionMethod(int cmIndex, Selection* customSelection=0);
-	void itemSelection_SetCompressionQuality(int cqIndex, Selection* customSelection=0);
-	void itemSelection_SetTracking(int us, Selection* customSelection=0);
-	void itemSelection_SetFontSize(int size, Selection* customSelection=0);
+	void itemSelection_SetFont(QString fon, Selection* customSelection = nullptr);
+	void itemSelection_SetParBackgroundColor(QString farbe, Selection* customSelection = nullptr);
+	void itemSelection_SetParBackgroundShade(int sha, Selection* customSelection = nullptr);
+	void itemSelection_SetBackgroundColor(QString farbe, Selection* customSelection = nullptr);
+	void itemSelection_SetBackgroundShade(int sha, Selection* customSelection = nullptr);
+	void itemSelection_SetFillColor(QString farbe, Selection* customSelection = nullptr);
+	void itemSelection_SetFillShade(int sha, Selection* customSelection = nullptr);
+	void itemSelection_SetStrokeColor(QString farbe, Selection* customSelection = nullptr);
+	void itemSelection_SetStrokeShade(int sha, Selection* customSelection = nullptr);
+	void itemSelection_SetScaleV(int, Selection* customSelection = nullptr);
+	void itemSelection_SetScaleH(int, Selection* customSelection = nullptr);
+	void itemSelection_SetBaselineOffset(int, Selection* customSelection = nullptr);
+	void itemSelection_SetOutlineWidth(int, Selection* customSelection = nullptr);
+	void itemSelection_SetShadowOffsets(int shx, int shy, Selection* customSelection = nullptr);
+	void itemSelection_SetUnderline(int pos, int wid, Selection* customSelection = nullptr);
+	void itemSelection_SetStrikethru(int pos, int wid, Selection* customSelection = nullptr);
+	void itemSelection_SetEffects(int s, Selection* customSelection = nullptr);
+	void itemSelection_SetOpticalMargins(int i, Selection* customSelection = nullptr);
+	void itemSelection_resetOpticalMargins(Selection* customSelection = nullptr);
+	void itemSelection_SetColorProfile(const QString& profileName, Selection* customSelection = nullptr);
+	void itemSelection_SetRenderIntent(int intentIndex, Selection* customSelection = nullptr);
+	void itemSelection_SetCompressionMethod(int cmIndex, Selection* customSelection = nullptr);
+	void itemSelection_SetCompressionQuality(int cqIndex, Selection* customSelection = nullptr);
+	void itemSelection_SetTracking(int us, Selection* customSelection = nullptr);
+	void itemSelection_SetFontSize(int size, Selection* customSelection = nullptr);
 	void MirrorPolyH(PageItem *currItem);
 	void MirrorPolyV(PageItem *currItem);
 	bool getItem(PageItem **currItem, int nr = -1);
@@ -1097,7 +1097,7 @@
 	void setFrameOval();
 
 	void setRedrawBounding(PageItem *currItem);
-	void adjustCanvas(FPoint minPos, FPoint maxPos, bool absolute = false);
+	void adjustCanvas(const FPoint& minPos, const FPoint& maxPos, bool absolute = false);
 	struct PicResMapped
 	{
 		PicResMapped(bool applyNewRes, int lowResType) { m_applyNewRes = applyNewRes; m_lowResType = lowResType;}
@@ -1172,10 +1172,10 @@
 	bool sizeItem(double newX, double newY, PageItem *pi, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
 	bool moveSizeItem(FPoint newX, FPoint newY, PageItem* currItem, bool fromMP = false, bool constrainRotation = false);
 	void adjustItemSize(PageItem *currItem, bool includeGroup = false, bool moveInGroup = true);
-	void moveGroup(double x, double y, Selection* customSelection = 0);
-	void rotateGroup(double angle, Selection* customSelection = 0);
-	void rotateGroup(double angle, FPoint RCenter, Selection* customSelection = 0);
-	void scaleGroup(double scx, double scy, bool scaleText=true, Selection* customSelection = 0, bool scaleLine = false);
+	void moveGroup(double x, double y, Selection* customSelection = nullptr);
+	void rotateGroup(double angle, Selection* customSelection = nullptr);
+	void rotateGroup(double angle, FPoint RCenter, Selection* customSelection = nullptr);
+	void scaleGroup(double scx, double scy, bool scaleText=true, Selection* customSelection = nullptr, bool scaleLine = false);
 	//! \brief Get a list of frames of certain type
 	QHash<PageItem*, QString> getDocItemNames(PageItem::ItemType itemType);
 	//! \brief Returns a serializer for this document
@@ -1438,8 +1438,8 @@
 	void itemSelection_ToggleSizeLock();
 	void itemSelection_ToggleImageShown();
 	void itemSelection_TogglePrintEnabled();
-	void itemSelection_ToggleBookMark(Selection* customSelection=0);
-	void itemSelection_ToggleAnnotation(Selection* customSelection=0);
+	void itemSelection_ToggleBookMark(Selection* customSelection = nullptr);
+	void itemSelection_ToggleAnnotation(Selection* customSelection = nullptr);
 	void itemSelection_Transform(int nrOfCopies, QTransform matrix, int basepoint);
 	void itemSelection_ChangePreviewResolution(int id);
 
@@ -1451,35 +1451,35 @@
 	//FIXME : change to process a selection
 	void item_setFrameShape(PageItem* item, int frameType, int count, double* points); 
 
-	void itemSelection_ClearItem(Selection* customSelection=0, bool useWarning=false);
-	void itemSelection_TruncateItem(Selection* customSelection=0);
+	void itemSelection_ClearItem(Selection* customSelection = nullptr, bool useWarning=false);
+	void itemSelection_TruncateItem(Selection* customSelection = nullptr);
 	//! Delete the items in the current selection. When force is true, we do not warn the user and make SE happy too. Force is used from @sa Page::restorePageItemCreation
-	void itemSelection_DeleteItem(Selection* customSelection=0, bool forceDeletion=false);
+	void itemSelection_DeleteItem(Selection* customSelection = nullptr, bool forceDeletion=false);
 	void itemSelection_SetItemFillTransparency(double t);
-	void itemSelection_SetFontFeatures(QString fontfeature, Selection* customSelection=0);
-	void itemSelection_SetHyphenWordMin(int wordMin, Selection* customSelection=NULL);
-	void itemSelection_SetHyphenConsecutiveLines(int consecutiveLines, Selection* customSelection=NULL);
-	void itemSelection_SetHyphenChar(uint hyphenChar, Selection* customSelection=NULL);
+	void itemSelection_SetFontFeatures(QString fontfeature, Selection* customSelection = nullptr);
+	void itemSelection_SetHyphenWordMin(int wordMin, Selection* customSelection = nullptr);
+	void itemSelection_SetHyphenConsecutiveLines(int consecutiveLines, Selection* customSelection = nullptr);
+	void itemSelection_SetHyphenChar(uint hyphenChar, Selection* customSelection = nullptr);
 	void itemSelection_SetItemLineTransparency(double t);
 	void itemSelection_SetItemFillBlend(int t);
 	void itemSelection_SetItemLineBlend(int t);
-	void itemSelection_SetLineGradient(VGradient& newGradient, Selection* customSelection=0);
-	void itemSelection_SetFillGradient(VGradient& newGradient, Selection* customSelection=0);
-	void itemSelection_SetMaskGradient(VGradient& newGradient, Selection* customSelection=0);
-	void itemSelection_SetOverprint(bool overprint, Selection* customSelection=0);
-	void itemSelection_ApplyImageEffects(ScImageEffectList& newEffectList, Selection* customSelection=0);
+	void itemSelection_SetLineGradient(VGradient& newGradient, Selection* customSelection = nullptr);
+	void itemSelection_SetFillGradient(VGradient& newGradient, Selection* customSelection = nullptr);
+	void itemSelection_SetMaskGradient(VGradient& newGradient, Selection* customSelection = nullptr);
+	void itemSelection_SetOverprint(bool overprint, Selection* customSelection = nullptr);
+	void itemSelection_ApplyImageEffects(ScImageEffectList& newEffectList, Selection* customSelection = nullptr);
 	void itemSelection_FlipH();
 	void itemSelection_FlipV();
-	void itemSelection_Rotate(double angle, Selection* customSelection = 0);
+	void itemSelection_Rotate(double angle, Selection* customSelection = nullptr);
 	void itemSelection_DoHyphenate();
 	void itemSelection_DoDeHyphenate();
-	void itemSelection_UnlinkTextFrameAndKeepText(Selection *customSelection=0, bool cutText=false);
-	void itemSelection_UnlinkTextFrameAndCutText(Selection *customSelection=0);
+	void itemSelection_UnlinkTextFrameAndKeepText(Selection* customSelection = nullptr, bool cutText=false);
+	void itemSelection_UnlinkTextFrameAndCutText(Selection* customSelection = nullptr);
 	void itemSelection_SendToLayer(int layerID);
-	void itemSelection_SetImageOffset(double x, double y, Selection* customSelection=0);
-	void itemSelection_SetImageScale(double x, double y, Selection* customSelection=0);
-	void itemSelection_SetImageScaleAndOffset(double ox, double oy, double sx, double sy, Selection* customSelection=0);
-	void itemSelection_SetImageRotation(double rot, Selection* customSelection=0);
+	void itemSelection_SetImageOffset(double x, double y, Selection* customSelection = nullptr);
+	void itemSelection_SetImageScale(double x, double y, Selection* customSelection = nullptr);
+	void itemSelection_SetImageScaleAndOffset(double ox, double oy, double sx, double sy, Selection* customSelection = nullptr);
+	void itemSelection_SetImageRotation(double rot, Selection* customSelection = nullptr);
 	void itemSelection_AlignItemLeft(int i, double newX, AlignMethod how);
 	void itemSelection_AlignItemRight(int i, double newX, AlignMethod how);
 	void itemSelection_AlignItemTop(int i, double newY, AlignMethod how);
@@ -1512,19 +1512,19 @@
 	void itemSelection_SwapLeft();
 	void itemSelection_SwapRight();
 	void itemSelection_MultipleDuplicate(ItemMultipleDuplicateData&);
-	void itemSelection_UniteItems(Selection* customSelection=0);
-	void itemSelection_SplitItems(Selection* customSelection=0);
+	void itemSelection_UniteItems(Selection* customSelection = nullptr);
+	void itemSelection_SplitItems(Selection* customSelection = nullptr);
 	/**
 	 * Adjust an image frame's size to fit the size of the image in it
 	 */
-	void itemSelection_AdjustFrametoImageSize(Selection* customSelection=0);
+	void itemSelection_AdjustFrametoImageSize(Selection* customSelection = nullptr);
 	/**
 	 * Adjust an image size to fit the size of the frame
 	 */
-	void itemSelection_AdjustImagetoFrameSize(Selection* customSelection=0);
-	void itemSelection_AdjustFrameHeightToText( Selection *customSelection=0);
+	void itemSelection_AdjustImagetoFrameSize(Selection* customSelection = nullptr);
+	void itemSelection_AdjustFrameHeightToText( Selection *customSelection = nullptr);
 	//! @brief startArrowID or endArrowID of -1 mean not applying a selection at this point.
-	void itemSelection_ApplyArrowHead(int startArrowID=-1, int endArrowID=-1, Selection* customSelection=0);
+	void itemSelection_ApplyArrowHead(int startArrowID=-1, int endArrowID=-1, Selection* customSelection = nullptr);
 	void itemSelection_ApplyArrowScale(int startArrowSc, int endArrowSc, Selection* customSelection);
 
 	void itemSelection_SetItemPen(QString farbe);
@@ -1534,12 +1534,12 @@
 	void itemSelection_SetItemBrushShade(int sha);
 	void itemSelection_SetItemGradMask(int typ);
 	void itemSelection_SetItemGradFill(int typ);
-	void itemSelection_SetItemPatternFill(QString pattern);
+	void itemSelection_SetItemPatternFill(const QString& pattern);
 	void itemSelection_SetItemPatternProps(double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
-	void itemSelection_SetItemStrokePattern(QString pattern);
+	void itemSelection_SetItemStrokePattern(const QString& pattern);
 	void itemSelection_SetItemStrokePatternProps(double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, double space, bool mirrorX, bool mirrorY);
 	void itemSelection_SetItemStrokePatternType(bool type);
-	void itemSelection_SetItemPatternMask(QString pattern);
+	void itemSelection_SetItemPatternMask(const QString& pattern);
 	void itemSelection_SetItemPatternMaskProps(double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
 
 	// Table related slots.
@@ -1722,7 +1722,7 @@
 	//set cursor in text where given mark will be found
 	void setCursor2MarkPos(Mark* mark);
 	//return false if mark was not found
-	bool eraseMark(Mark* mrk, bool fromText=false, PageItem* item=NULL, bool force = false); //force is used only for deleting non-unique marks by MarksManager
+	bool eraseMark(Mark* mrk, bool fromText=false, PageItem* item = nullptr, bool force = false); //force is used only for deleting non-unique marks by MarksManager
 	void setUndoDelMark(Mark* mrk);
 	//invalidate all text frames where given mark will found
 	//useful spacially for varaible text marks after changing its text definition
@@ -1761,7 +1761,7 @@
 	void setEndNoteFrame(PageItem_NoteFrame* nF, void* ptr)   { rangeItem rI={ptr}; m_docEndNotesFramesMap.insert(nF,rI); }
 	void setEndNoteFrame(PageItem_NoteFrame* nF, int section)   { rangeItem rI; rI.sectionIndex = section; m_docEndNotesFramesMap.insert(nF, rI); }
 	//update all endnotesframes content for given notes style
-	void updateEndnotesFrames(NotesStyle* nStyle = NULL, bool invalidate = false);
+	void updateEndnotesFrames(NotesStyle* nStyle = nullptr, bool invalidate = false);
 	//update endnotesframe content
 	void updateEndNotesFrameContent(PageItem_NoteFrame* nF, bool invalidate = false);
 	//insert noteframe into list of changed
@@ -1784,7 +1784,7 @@
 	PageItem* findFirstMarkItem(Mark* mrk) { int tmp = -1; return findMarkItem(mrk, tmp); }
 
 	//search for endnotesframe for given notes style and item holding master mark or section number
-	PageItem_NoteFrame* endNoteFrame(NotesStyle* nStyle, void* item = NULL);
+	PageItem_NoteFrame* endNoteFrame(NotesStyle* nStyle, void* item = nullptr);
 	PageItem_NoteFrame* endNoteFrame(NotesStyle* nStyle, int sectIndex);
 	//clear list of notes for given notesframe
 	void clearNotesInFrameList(PageItem_NoteFrame* nF) { m_docNotesInFrameMap.insert(nF, QList<TextNote*>()); }

Modified: trunk/Scribus/scribus/text/textsource.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/text/textsource.h
==============================================================================
--- trunk/Scribus/scribus/text/textsource.h	(original)
+++ trunk/Scribus/scribus/text/textsource.h	Mon Apr 30 21:39:00 2018
@@ -77,7 +77,7 @@
 	
 public:
 	
-	SimpleTextSource(QString text, const ParagraphStyle& style, ITextSource* par=NULL, int parentStart = 0) : m_text(text), m_style(style), m_parent(par), m_parentPos(parentStart) {}
+	SimpleTextSource(QString text, const ParagraphStyle& style, ITextSource* par=nullptr, int parentStart = 0) : m_text(text), m_style(style), m_parent(par), m_parentPos(parentStart) {}
 	
 	virtual int length() const;
 	virtual QChar text(int pos) const;

Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	Mon Apr 30 21:39:00 2018
@@ -161,7 +161,7 @@
 	}
 
 	m_doc  = d;
-	m_item = NULL;
+	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 	int precision = unitGetPrecisionFromIndex(m_unitIndex);
@@ -172,7 +172,7 @@
 	m_haveDoc = true;
 	m_haveItem = false;
 
-	QMap<QString, double>* docConstants = m_doc? &m_doc->constants()  : NULL;
+	QMap<QString, double>* docConstants = m_doc? &m_doc->constants()  : nullptr;
 	xposSpin->setValues( minXYVal, maxXYWHVal, precision, minXYVal);
 	xposSpin->setConstants(docConstants);
 	yposSpin->setValues( minXYVal, maxXYWHVal, precision, minXYVal);

Modified: trunk/Scribus/scribus/ui/scdockpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/ui/scdockpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.h	(original)
+++ trunk/Scribus/scribus/ui/scdockpalette.h	Mon Apr 30 21:39:00 2018
@@ -40,7 +40,7 @@
 	Q_OBJECT
 
 	public:
-		ScDockPalette( QWidget * parent = NULL, const QString& prefsContext = QString::null, Qt::WindowFlags f = 0 );
+		ScDockPalette( QWidget * parent = nullptr, const QString& prefsContext = QString::null, Qt::WindowFlags f = 0 );
 		~ScDockPalette() {}
 		/** @brief Sample way to grab keystrokes, simply calls superclass at this point */
 		//virtual void keyPressEvent(QKeyEvent *keyEvent);

Modified: trunk/Scribus/scribus/ui/scrpalettebase.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/ui/scrpalettebase.h
==============================================================================
--- trunk/Scribus/scribus/ui/scrpalettebase.h	(original)
+++ trunk/Scribus/scribus/ui/scrpalettebase.h	Mon Apr 30 21:39:00 2018
@@ -40,8 +40,8 @@
 	Q_OBJECT
 
 	public:
-		ScrPaletteBase( QWidget * parent = NULL, const QString& prefsContext = QString::null, bool modal = false, Qt::WindowFlags f = 0 );
-		~ScrPaletteBase() {};
+		ScrPaletteBase( QWidget * parent = nullptr, const QString& prefsContext = QString::null, bool modal = false, Qt::WindowFlags f = 0 );
+		~ScrPaletteBase() {}
 		/** @brief Sample way to grab keystrokes, simply calls superclass at this point */
 		//virtual void keyPressEvent(QKeyEvent *keyEvent);
 		virtual void hide();

Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp	(original)
+++ trunk/Scribus/scribus/util.cpp	Mon Apr 30 21:39:00 2018
@@ -1144,7 +1144,7 @@
 		m_Doc->FrameItems.remove(ind);
 		m_Doc->FrameItems.insert(ind, currItem);
 	}
-	if (groupStackT != NULL)
+	if (groupStackT != nullptr)
 	{
 		if (groupStackT->count() > 0)
 		{

Modified: trunk/Scribus/scribus/util_color.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22505&path=/trunk/Scribus/scribus/util_color.h
==============================================================================
--- trunk/Scribus/scribus/util_color.h	(original)
+++ trunk/Scribus/scribus/util_color.h	Mon Apr 30 21:39:00 2018
@@ -111,6 +111,6 @@
  * \param EditColors Color list to store the imported colors
  * \return true if any colors have been found
 */
-bool SCRIBUS_API importColorsFromFile(QString fileName, ColorList &EditColors, QHash<QString,VGradient> *dialogGradients = NULL, bool merge = false);
+bool SCRIBUS_API importColorsFromFile(QString fileName, ColorList &EditColors, QHash<QString,VGradient> *dialogGradients = nullptr, bool merge = false);
 
 #endif




More information about the scribus-commit mailing list