Author: craig
Date: Tue May  8 21:47:48 2018
New Revision: 22528

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

Modified:
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_editgradient.cpp
    trunk/Scribus/scribus/canvasmode_editspiral.cpp
    trunk/Scribus/scribus/pageitem_noteframe.h
    trunk/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp
    trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
    trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
    trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
    trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
    trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp
    trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp
    trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
    trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
    trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
    trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
    trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
    trunk/Scribus/scribus/plugins/imposition/imposition.cpp
    trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp
    trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftrcreader.cpp
    trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftsettings.cpp
    trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
    trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
    trunk/Scribus/scribus/scpainterex_cairo.cpp
    trunk/Scribus/scribus/scpainterex_ps2.cpp
    trunk/Scribus/scribus/scplugin.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/style.h
    trunk/Scribus/scribus/util.cpp
    trunk/Scribus/scribus/util_file.cpp
    trunk/Scribus/scribus/util_ghostscript.cpp

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp     (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp     Tue May  8 21:47:48 2018
@@ -79,7 +79,7 @@
 inline bool BezierMode::GetItem(PageItem** pi)
 { 
        *pi = m_doc->m_Selection->itemAt(0); 
-       return (*pi) != NULL; 
+       return (*pi) != nullptr;
 }
 
 void BezierMode::finalizeItem(PageItem* currItem)
@@ -183,7 +183,7 @@
        m_canvas->resetRenderMode();
        mousePressEvent(m);
        mouseReleaseEvent(m);
-       PageItem *currItem = NULL;
+       PageItem *currItem = nullptr;
        if (m_doc->appMode == modeDrawBezierLine)
        {
                m_view->stopGesture();
@@ -481,7 +481,7 @@
 //???          m_doc->m_Selection->itemAt(i)->checkChanges(true);
 
 //     //Commit drag created items to undo manager.
-//     if (m_doc->m_Selection->itemAt(0)!=NULL)
+//     if (m_doc->m_Selection->itemAt(0)!=nullptr)
 //     {
 //             m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0)->ItemNr);
 //     }

Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp        (original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp        Tue May  8 21:47:48 2018
@@ -73,7 +73,7 @@
 inline bool CanvasMode_EditArc::GetItem(PageItem** pi)
 { 
        *pi = m_doc->m_Selection->itemAt(0);
-       return (*pi) != NULL;
+       return (*pi) != nullptr;
 }
 
 void CanvasMode_EditArc::drawControls(QPainter* p)

Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp   (original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp   Tue May  8 21:47:48 2018
@@ -63,7 +63,7 @@
 inline bool CanvasMode_EditGradient::GetItem(PageItem** pi)
 { 
        *pi = m_doc->m_Selection->itemAt(0); 
-       return (*pi) != NULL; 
+       return (*pi) != nullptr;
 }
 
 void CanvasMode_EditGradient::drawControls(QPainter* p)

Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp     (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp     Tue May  8 21:47:48 2018
@@ -53,13 +53,13 @@
        m_blockUpdateFromItem = 0;
        m_startAngle = m_endAngle = 0.0;
        m_arcPoint = noPointDefined;
-       m_VectorDialog = NULL;
+       m_VectorDialog = nullptr;
 }
 
 inline bool CanvasMode_EditSpiral::GetItem(PageItem** pi)
 { 
        *pi = m_doc->m_Selection->itemAt(0);
-       return (*pi) != NULL;
+       return (*pi) != nullptr;
 }
 
 void CanvasMode_EditSpiral::drawControls(QPainter* p)

Modified: trunk/Scribus/scribus/pageitem_noteframe.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/pageitem_noteframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.h  (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.h  Tue May  8 21:47:48 2018
@@ -28,7 +28,7 @@
        bool deleteIt;
 
        //used while reading SLA file
-       void setNS(NotesStyle* nStyle, PageItem_TextFrame* master = NULL);
+       void setNS(NotesStyle* nStyle, PageItem_TextFrame* master = nullptr);
        //returns Notes Style
        NotesStyle* notesStyle() { return m_nstyle; }
 

Modified: trunk/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp       
(original)
+++ trunk/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp       Tue May 
 8 21:47:48 2018
@@ -21,7 +21,7 @@
 {
        setObjectName(name);
        pointList.clear();
-       currentDoc = NULL;
+       currentDoc = nullptr;
        currentColorSpace = colorModelRGB;
        baseAngle = 0;
        angleShift = 270;

Modified: trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp     
(original)
+++ trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp     Tue May 
 8 21:47:48 2018
@@ -90,7 +90,7 @@
 
 bool FontPreviewPlugin::run(QWidget* parent, ScribusDoc* doc, QString target)
 {
-       if (doc==NULL)
+       if (doc==nullptr)
                return false;
        // I don't know how many fonts user has...
        qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));

Modified: trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp       (original)
+++ trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp       Tue May  8 
21:47:48 2018
@@ -71,7 +71,7 @@
                pstyleHeader->getFont()->setWeight(BOLD);
        }
        else
-               pstyleHeader = NULL;
+               pstyleHeader = nullptr;
 }
 
 void CsvIm::setFieldDelimiter(const QString& fdelim)

Modified: trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp Tue May  8 
21:47:48 2018
@@ -31,7 +31,7 @@
 #include "scribusstructs.h"
 #include "gtmeasure.h"
 
-HTMLReader* HTMLReader::hreader = NULL;
+HTMLReader* HTMLReader::hreader = nullptr;
 bool HTMLReader::elemJustStarted = false;
 bool HTMLReader::elemJustFinished = false;
 
@@ -137,9 +137,9 @@
        if (atts)
        {
                for(const xmlChar** cur = atts; cur && *cur; cur += 2)
-                       attrs.append(QString((char*)*cur), NULL, 
QString((char*)*cur), QString((char*)*(cur + 1)));
-       }
-       hreader->startElement(NULL, NULL, name, attrs);
+                       attrs.append(QString((char*)*cur), nullptr, 
QString((char*)*cur), QString((char*)*(cur + 1)));
+       }
+       hreader->startElement(nullptr, nullptr, name, attrs);
 }
 
 bool HTMLReader::startElement(const QString&, const QString&, const QString 
&name, const QXmlAttributes &attrs) 
@@ -338,7 +338,7 @@
        elemJustStarted = false;
        elemJustFinished = true;
        QString nname(QString((const char*) name).toLower());
-       hreader->endElement(NULL, NULL, nname);
+       hreader->endElement(nullptr, nullptr, nname);
 }
 
 bool HTMLReader::endElement(const QString&, const QString&, const QString 
&name)
@@ -625,7 +625,7 @@
        QByteArray fn(filename.toLocal8Bit());
 #endif
        elemJustStarted = elemJustFinished = false;
-       htmlSAXParseFile(fn.data(), NULL, mySAXHandler, NULL);
+       htmlSAXParseFile(fn.data(), nullptr, mySAXHandler, nullptr);
 }
 
 void HTMLReader::createListStyle()
@@ -640,40 +640,40 @@
 }
 
 htmlSAXHandler mySAXHandlerStruct = {
-       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,
        HTMLReader::startElement,
        HTMLReader::endElement,
-       NULL, // reference,
+       nullptr, // reference,
        HTMLReader::characters,
-       NULL, // ignorableWhitespace,
-       NULL, // processingInstruction,
-       NULL, // comment,
-       NULL, // warning,
-       NULL, // error,
-       NULL, // fatalError,
-       NULL, // getParameterEntity,
-       NULL, // cdata,
-       NULL,
+       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
 };
 
@@ -698,6 +698,6 @@
        delete pstylecode;
        delete pstylep;
        delete pstylepre;
-       hreader = NULL;
-}
-
+       hreader = nullptr;
+}
+

Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp  (original)
+++ trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp  Tue May  8 
21:47:48 2018
@@ -49,7 +49,7 @@
 
 ODTIm::ODTIm(QString fileName, PageItem *textItem, bool textOnly, bool prefix, 
bool append)
 {
-       uz=NULL;
+       uz=nullptr;
        m_Doc = textItem->doc();
        m_item = textItem;
        m_prefixName = prefix;

Modified: trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp       
(original)
+++ trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp       Tue May 
 8 21:47:48 2018
@@ -33,7 +33,7 @@
 #include "gtparagraphstyle.h"
 #include "stylereader.h"
 
-ContentReader* ContentReader::creader = NULL;
+ContentReader* ContentReader::creader = nullptr;
 
 extern xmlSAXHandlerPtr cSAXHandler;
 
@@ -44,8 +44,8 @@
        sreader = s;
        writer  = w;
        importTextOnly = textOnly;
-       defaultStyle = NULL;
-       currentStyle = NULL;
+       defaultStyle = nullptr;
+       currentStyle = nullptr;
        inList = false;
        inAnnotation = false;
        inSpan = false;
@@ -306,40 +306,40 @@
 }
 
 xmlSAXHandler cSAXHandlerStruct = {
-       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,
        ContentReader::startElement,
        ContentReader::endElement,
-       NULL, // reference,
+    nullptr, // reference,
        ContentReader::characters,
-       NULL, // ignorableWhitespace,
-       NULL, // processingInstruction,
-       NULL, // comment,
-       NULL, // warning,
-       NULL, // error,
-       NULL, // fatalError,
-       NULL, // getParameterEntity,
-       NULL, // cdata,
-       NULL,
+    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
 };
 
@@ -352,9 +352,9 @@
        if (atts)
        {
                for(const xmlChar** cur = atts; cur && *cur; cur += 2)
-                       attrs.append(QString((char*)*cur), NULL, 
QString((char*)*cur), QString((char*)*(cur + 1)));
-       }
-       creader->startElement(NULL, NULL, name, attrs);
+                       attrs.append(QString((char*)*cur), nullptr, 
QString((char*)*cur), QString((char*)*(cur + 1)));
+       }
+       creader->startElement(nullptr, nullptr, name, attrs);
 }
 
 void ContentReader::characters(void*, const xmlChar *ch, int len)
@@ -366,7 +366,7 @@
 void ContentReader::endElement(void*, const xmlChar *name)
 {
        QString nname(QString((const char*) name).toLower());
-       creader->endElement(NULL, NULL, nname);
+       creader->endElement(nullptr, nullptr, nname);
 }
 
 QString ContentReader::getName()
@@ -379,12 +379,12 @@
 
 void ContentReader::getStyle()
 {
-       gtStyle *style = NULL, *tmp = NULL;
+       gtStyle *style = nullptr, *tmp = nullptr;
        if (styleNames.size() == 0)
                style = sreader->getStyle("default-style");
        else
                style = sreader->getStyle(styleNames[0]);
-       assert (style != NULL);
+       assert (style != nullptr);
        gtParagraphStyle* par = dynamic_cast<gtParagraphStyle*>(style);
        if (par)
                tmp = new gtParagraphStyle(*par);
@@ -402,6 +402,6 @@
 
 ContentReader::~ContentReader()
 {
-       creader = NULL;
+       creader = nullptr;
        delete defaultStyle;
 }

Modified: trunk/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&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 Tue May  8 
21:47:48 2018
@@ -906,9 +906,9 @@
        if (atts)
        {
                for(const xmlChar** cur = atts; cur && *cur; cur += 2)
-                       attrs->append(QString((char*)*cur), NULL, 
QString((char*)*cur), QString((char*)*(cur + 1)));
-       }
-       sreader->startElement(nullptr, NULL, *name, *attrs);
+                       attrs->append(QString((char*)*cur), nullptr, 
QString((char*)*cur), QString((char*)*(cur + 1)));
+       }
+       sreader->startElement(nullptr, nullptr, *name, *attrs);
 }
  
 void StyleReader::endElement(void*, const xmlChar * name)

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp       
(original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp       Tue May 
 8 21:47:48 2018
@@ -32,7 +32,7 @@
 #include "scribusstructs.h"
 #include <QByteArray>
 
-ContentReader* ContentReader::creader = NULL;
+ContentReader* ContentReader::creader = nullptr;
 
 extern xmlSAXHandlerPtr cSAXHandler;
 
@@ -43,8 +43,8 @@
        sreader = s;
        writer  = w;
        importTextOnly = textOnly;
-       defaultStyle = NULL;
-       currentStyle = NULL;
+       defaultStyle = nullptr;
+       currentStyle = nullptr;
        inList = false;
        inNote = false;
        inNoteBody = false;
@@ -283,40 +283,40 @@
 }
 
 xmlSAXHandler cSAXHandlerStruct = {
-       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,
        ContentReader::startElement,
        ContentReader::endElement,
-       NULL, // reference,
+       nullptr, // reference,
        ContentReader::characters,
-       NULL, // ignorableWhitespace,
-       NULL, // processingInstruction,
-       NULL, // comment,
-       NULL, // warning,
-       NULL, // error,
-       NULL, // fatalError,
-       NULL, // getParameterEntity,
-       NULL, // cdata,
-       NULL,
+       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
 };
 
@@ -329,9 +329,9 @@
        if (atts)
        {
                for(const xmlChar** cur = atts; cur && *cur; cur += 2)
-                       attrs.append(QString((char*)*cur), NULL, 
QString((char*)*cur), QString((char*)*(cur + 1)));
-       }
-       creader->startElement(NULL, NULL, name, attrs);
+                       attrs.append(QString((char*)*cur), nullptr, 
QString((char*)*cur), QString((char*)*(cur + 1)));
+       }
+       creader->startElement(nullptr, nullptr, name, attrs);
 }
 
 void ContentReader::characters(void*, const xmlChar *ch, int len)
@@ -343,7 +343,7 @@
 void ContentReader::endElement(void*, const xmlChar *name)
 {
        QString nname(QString((const char*) name).toLower());
-       creader->endElement(NULL, NULL, nname);
+       creader->endElement(nullptr, nullptr, nname);
 }
 
 QString ContentReader::getName()
@@ -356,12 +356,12 @@
 
 void ContentReader::getStyle()
 {
-       gtStyle *style = NULL, *tmp = NULL;
+       gtStyle *style = nullptr, *tmp = nullptr;
        if (styleNames.size() == 0)
                style = sreader->getStyle("default-style");
        else
                style = sreader->getStyle(styleNames[0]);
-       assert (style != NULL);
+       assert (style != nullptr);
        gtParagraphStyle* par = dynamic_cast<gtParagraphStyle*>(style);
        if (par)
                tmp = new gtParagraphStyle(*par);
@@ -379,7 +379,7 @@
 
 ContentReader::~ContentReader()
 {
-       creader = NULL;
+       creader = nullptr;
        delete defaultStyle;
 }
 

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp Tue May  8 
21:47:48 2018
@@ -33,7 +33,7 @@
  #include <gtfont.h>
 #include <QByteArray>
  
- StyleReader* StyleReader::sreader = NULL;
+ StyleReader* StyleReader::sreader = nullptr;
  
  extern xmlSAXHandlerPtr sSAXHandler;
  
@@ -47,8 +47,8 @@
        importTextOnly = textOnly;
        usePrefix    = prefix;
        packStyles   = combineStyles;
-       currentStyle = NULL;
-       parentStyle  = NULL;
+       currentStyle = nullptr;
+       parentStyle  = nullptr;
        inList       = false;
        currentList  = "";
        defaultStyleCreated = false;
@@ -101,13 +101,13 @@
                                        plist = styles[QString(currentList + 
"_%1").arg(level)]; 
                                }
                                gtParagraphStyle *pstyle;
-                               if (plist == NULL)
+                               if (plist == nullptr)
                                        plist = new 
gtStyle(*(styles["default-style"]));
  
                                if (plist->target() == "paragraph")
                                {
                                        pstyle = 
dynamic_cast<gtParagraphStyle*>(plist);
-                                       assert(pstyle != NULL);
+                                       assert(pstyle != nullptr);
                                        gtParagraphStyle* tmp = new 
gtParagraphStyle(*pstyle);
                                        currentStyle = tmp;
                                }
@@ -135,7 +135,7 @@
                                        if (ok)
                                        {
                                                gtParagraphStyle* s = 
dynamic_cast<gtParagraphStyle*>(currentStyle);
-                                               assert(s != NULL);
+                                               assert(s != nullptr);
                                                s->setDropCapHeight(dh);
                                                s->setDropCap(true);
                                        }
@@ -169,7 +169,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")
@@ -185,13 +185,13 @@
  
  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;
+               pstyle = nullptr;
        QString align;
        QString force;
        bool hasColorTag = false;
@@ -203,7 +203,7 @@
                {
                        double size = 0.0;
                        double psize = 0.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());
@@ -215,13 +215,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())));
                        }
                }
@@ -263,32 +263,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);
        }
-       if (!align.isEmpty() && (pstyle != NULL))
+       if (!align.isEmpty() && (pstyle != nullptr))
        {
                if (align == "end")
                        pstyle->setAlignment(RIGHT);
@@ -352,17 +352,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");
                }
@@ -372,7 +372,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;
@@ -400,7 +400,7 @@
                }
        }
        else
-               currentStyle = NULL;
+               currentStyle = nullptr;
  }
  
  void StyleReader::tabStop(const QXmlAttributes& attrs)
@@ -408,7 +408,7 @@
        if (currentStyle->target() == "paragraph")
        {
                gtParagraphStyle* pstyle = 
dynamic_cast<gtParagraphStyle*>(currentStyle);
-               assert(pstyle != NULL);
+               assert(pstyle != nullptr);
                QString pos;
                QString type;
                for (int i = 0; i < attrs.count(); ++i)
@@ -438,21 +438,21 @@
  
  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))
        {
                setStyle(currentStyle->getName(), currentStyle);
-               currentStyle = NULL;
-               parentStyle = NULL;
+               currentStyle = nullptr;
+               parentStyle = nullptr;
                readProperties = false;
        }
        else if (name == "text:list-style")
@@ -512,7 +512,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());
@@ -588,11 +588,11 @@
  
  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;
+               pstyle = nullptr;
        QString align;
        QString force;
  
@@ -602,7 +602,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());
@@ -613,13 +613,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())));
                }
        }
@@ -655,32 +655,32 @@
                (((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.isEmpty() && (pstyle != NULL))
+       if (!align.isEmpty() && (pstyle != nullptr))
        {
                if (align == "end")
                        pstyle->setAlignment(RIGHT);
@@ -753,53 +753,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,
+       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
  };
  
@@ -810,13 +810,13 @@
        QString name = QString((const char*) fullname).toLower();
        QXmlAttributes attrs;
        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);
+               attrs.append(QString((char*)*cur), nullptr, 
QString((char*)*cur), QString((char*)*(cur + 1)));
+       sreader->startElement(nullptr, nullptr, name, attrs);
  }
  
  void StyleReader::endElement(void*, const xmlChar * name)
  {
        QString nname = QString((const char*) name).toLower();
-       sreader->endElement(NULL, NULL, nname);
- }
- 
+       sreader->endElement(nullptr, nullptr, nname);
+ }
+ 

Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp     
(original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/textfilter.cpp     Tue May 
 8 21:47:48 2018
@@ -127,7 +127,7 @@
        else
        {
                QStringList list = text.split("\n", QString::KeepEmptyParts);
-               gtParagraphStyle *useStyle = NULL;
+               gtParagraphStyle *useStyle = nullptr;
                for (int i = 0; i < static_cast<int>(list.size()); ++i)
                {
                        QString tmpText(list[i]);
@@ -135,7 +135,7 @@
                        tmpText2=tmpText2.simplified();
                        int numberOfWords = tmpText2.count(" ");
                        ++numberOfWords;
-                       useStyle = NULL;
+                       useStyle = nullptr;
                        for (int j = 0; j < static_cast<int>(filters->size()); 
++j)
                        {
                                if ((*filters)[j]->isEnabled())

Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp  (original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/tfdia.cpp  Tue May  8 
21:47:48 2018
@@ -161,7 +161,7 @@
 void tfDia::createFilterRow(tfFilter* after)
 {
        tfFilter* tmp = new tfFilter(vbox, "tfFilter");
-       if (after == NULL)
+       if (after == nullptr)
        {
                filters.push_back(tmp);
                alayout->addWidget(tmp);
@@ -197,7 +197,7 @@
 void tfDia::createFilter(PrefsTable* table)
 {
        if (table->width() != 10)
-               createFilterRow(NULL);
+               createFilterRow(nullptr);
        else
        {
                for (uint i = 0; i < static_cast<uint>(table->height()); ++i)
@@ -260,7 +260,7 @@
 void tfDia::clearClicked()
 {
        clear();
-       createFilterRow(NULL);
+       createFilterRow(nullptr);
 }
 
 void tfDia::clear()

Modified: trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp       
(original)
+++ trunk/Scribus/scribus/plugins/gettext/textfilter/tffilter.cpp       Tue May 
 8 21:47:48 2018
@@ -84,20 +84,20 @@
 
 void tfFilter::createWidget()
 {
-       firstCombo = NULL;
-       firstLabel = NULL;
-       secondCombo = NULL;
-       secondLabel = NULL;
-       thirdCombo = NULL;
-       thirdLabel = NULL;
-       fourthCombo = NULL;
-       fourthLabel = NULL;
-       fifthCombo = NULL;
-       fifthLabel = NULL;
-       sixthCombo = NULL;
-       secondRegexpCheck = NULL;
-//     thirdRegexpCheck = NULL;
-       fifthRegexpCheck = NULL;
+       firstCombo = nullptr;
+       firstLabel = nullptr;
+       secondCombo = nullptr;
+       secondLabel = nullptr;
+       thirdCombo = nullptr;
+       thirdLabel = nullptr;
+       fourthCombo = nullptr;
+       fourthLabel = nullptr;
+       fifthCombo = nullptr;
+       fifthLabel = nullptr;
+       sixthCombo = nullptr;
+       secondRegexpCheck = nullptr;
+//     thirdRegexpCheck = nullptr;
+       fifthRegexpCheck = nullptr;
 
        prefs = 
PrefsManager::instance()->prefsFile->getPluginContext("TextFilter");
        history = prefs->getTable("history");

Modified: trunk/Scribus/scribus/plugins/imposition/imposition.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/imposition/imposition.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/imposition/imposition.cpp     (original)
+++ trunk/Scribus/scribus/plugins/imposition/imposition.cpp     Tue May  8 
21:47:48 2018
@@ -527,7 +527,7 @@
                                        //get group control
                                        signed int groupid = 
gs->itemAt(0)->Groups.at(0);
                                        
-                                       PageItem* groupcontrol = NULL;
+                                       PageItem* groupcontrol = nullptr;
                                        for (int k = 0; k < 
targetDoc->Items->count(); k++)
                                        {
                                                if (
@@ -715,7 +715,7 @@
                                        //get group control
                                        signed int groupid = 
gs->itemAt(0)->Groups.at(0);
                                        
-                                       PageItem* groupcontrol = NULL;
+                                       PageItem* groupcontrol = nullptr;
                                        for (int k = 0; k < 
targetDoc->Items->count(); k++)
                                        {
                                                if (
@@ -878,7 +878,7 @@
                                        //get group control
                                        signed int groupid = 
gs->itemAt(0)->Groups.at(0);
                                        
-                                       PageItem* groupcontrol = NULL;
+                                       PageItem* groupcontrol = nullptr;
                                        for (int k = 0; k < 
targetDoc->Items->count(); k++)
                                        {
                                                if (
@@ -1032,7 +1032,7 @@
                                        //get group control
                                        signed int groupid = 
gs->itemAt(0)->Groups.at(0);
                                        
-                                       PageItem* groupcontrol = NULL;
+                                       PageItem* groupcontrol = nullptr;
                                        for (int k = 0; k < 
targetDoc->Items->count(); k++)
                                        {
                                                if (

Modified: trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp   
(original)
+++ trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp   Tue May 
 8 21:47:48 2018
@@ -77,7 +77,7 @@
        {
                if (!settings->templates[i]->isDeleted)
                {
-                       ListItem* tmp = new ListItem(settings->templates[i], 
NULL);
+                       ListItem* tmp = new ListItem(settings->templates[i], 
nullptr);
                        iconItems.push_back(tmp);
                }
        }
@@ -131,7 +131,7 @@
                                iconItems[i]->second = tmpQIVI;
                        } 
                        else
-                               iconItems[i]->second = NULL;
+                               iconItems[i]->second = nullptr;
                }
                tnailGrid->sortItems();
        }
@@ -214,7 +214,7 @@
        currentDocumentTemplate->isDeleted = true;
        textBrowser->clear();
        imageView->clear();
-       currentDocumentTemplate = NULL;
+       currentDocumentTemplate = nullptr;
        buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
        setupListItems();
        setupCategories();
@@ -239,7 +239,7 @@
        delete settings;
        for (uint i = 0; i < iconItems.size(); i++)
        {
-               if (iconItems[i] != NULL)
+               if (iconItems[i] != nullptr)
                        delete iconItems[i];
        }
 }

Modified: trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftrcreader.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftrcreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftrcreader.cpp 
(original)
+++ trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftrcreader.cpp Tue May 
 8 21:47:48 2018
@@ -135,7 +135,7 @@
        if (name == "template")
        { // new template starts here
                inTemplate = false;
-               if (tmpTemplate != NULL) // If we have a template already 
created
+               if (tmpTemplate != nullptr) // If we have a template already 
created
                        if (tmpTemplate->isValid()) // and the template really 
exists push
                                templates->push_back(tmpTemplate); // it to the 
templates vector and start a new one
        }

Modified: trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftsettings.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftsettings.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftsettings.cpp 
(original)
+++ trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftsettings.cpp Tue May 
 8 21:47:48 2018
@@ -91,7 +91,7 @@
        delete handler;
        for (uint i = 0; i < templates.size(); ++i)
        {
-               if (templates[i] != NULL)
+               if (templates[i] != nullptr)
                        delete templates[i];
        }
 }

Modified: trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp       (original)
+++ trunk/Scribus/scribus/plugins/shapes/shapepalette.cpp       Tue May  8 
21:47:48 2018
@@ -47,7 +47,7 @@
 ShapeView::ShapeView(QWidget* parent) : QListWidget(parent)
 {
        shapes.clear();
-       scMW = NULL;
+       scMW = nullptr;
 
        setDragEnabled(true);
        setViewMode(QListView::IconMode);
@@ -74,7 +74,7 @@
        if (this->count() != 0)
        {
                QListWidgetItem* it = currentItem();
-               if (it != NULL)
+               if (it != nullptr)
                {
                        QAction* delAct = pmenu->addAction( tr("Delete selected 
Shape"));
                        connect(delAct, SIGNAL(triggered()), this, 
SLOT(delOne()));
@@ -106,7 +106,7 @@
 void ShapeView::delOne()
 {
        QListWidgetItem* it = currentItem();
-       if (it != NULL)
+       if (it != nullptr)
        {
                QString key = it->data(Qt::UserRole).toString();
                shapes.remove(key);
@@ -123,13 +123,13 @@
 
 bool ShapeView::viewportEvent(QEvent *event)
 {
-       if (event != NULL)
+       if (event != nullptr)
        {
                if (event->type() == QEvent::ToolTip)
                {
                        QHelpEvent *helpEvent = static_cast<QHelpEvent 
*>(event);
                        QListWidgetItem* it = itemAt(helpEvent->pos());
-                       if (it != NULL)
+                       if (it != nullptr)
                        {
                                event->accept();
                                QString tipText = it->text();
@@ -158,7 +158,7 @@
                case Qt::Key_Delete:
                        {
                                QListWidgetItem* it = currentItem();
-                               if (it != NULL)
+                               if (it != nullptr)
                                {
                                        QString key = 
it->data(Qt::UserRole).toString();
                                        if (shapes.contains(key))
@@ -307,7 +307,7 @@
        setWidget(containerWidget);
 
        unsetDoc();
-       m_scMW  = NULL;
+       m_scMW  = nullptr;
        languageChange();
        connect(importButton, SIGNAL(clicked()), this, SLOT(Import()));
        connect(closeButton, SIGNAL(clicked()), this, SLOT(closeTab()));
@@ -561,11 +561,11 @@
 
 void ShapePalette::setDoc(ScribusDoc *newDoc)
 {
-       if (m_scMW == NULL)
-               m_doc = NULL;
+       if (m_scMW == nullptr)
+               m_doc = nullptr;
        else
                m_doc = newDoc;
-       if (m_doc == NULL)
+       if (m_doc == nullptr)
                setEnabled(true);
        else
                setEnabled(!m_doc->drawAsPreview);
@@ -573,7 +573,7 @@
 
 void ShapePalette::unsetDoc()
 {
-       m_doc = NULL;
+       m_doc = nullptr;
        setEnabled(true);
 }
 

Modified: trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/shortwords.cpp    (original)
+++ trunk/Scribus/scribus/plugins/short-words/shortwords.cpp    Tue May  8 
21:47:48 2018
@@ -115,7 +115,7 @@
 
 bool ShortWordsPlugin::run(ScribusDoc* doc, QString target)
 {
-       if (doc==NULL)
+       if (doc==nullptr)
                return false;
        Q_ASSERT(target.isEmpty());
 

Modified: trunk/Scribus/scribus/scpainterex_cairo.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/scpainterex_cairo.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainterex_cairo.cpp (original)
+++ trunk/Scribus/scribus/scpainterex_cairo.cpp Tue May  8 21:47:48 2018
@@ -498,7 +498,7 @@
        if( m_array.count() > 0 )
                cairo_set_dash( m_cr, m_array.data(), m_array.count(), 
m_offset);
        else
-               cairo_set_dash( m_cr, NULL, 0, 0 );
+               cairo_set_dash( m_cr, nullptr, 0, 0 );
        cairo_set_operator(m_cr, CAIRO_OPERATOR_OVER);
        if( m_lineEnd == Qt::RoundCap )
                cairo_set_line_cap (m_cr, CAIRO_LINE_CAP_ROUND);
@@ -658,7 +658,7 @@
        int index = 0;
        double r, g, b;
        QList<VColorStopEx*> colorStops = gradient.colorStops();
-       VColorStopEx* stop = NULL;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        if ( gradient.Stops() < 2 )
@@ -708,7 +708,7 @@
        int offset = 0;
        double r, g, b;
        QList<VColorStopEx*> colorStops = gradient.colorStops();
-       VColorStopEx* stop = NULL;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        double x1  = gradient.origin().x();
@@ -756,10 +756,10 @@
 
 void ScPainterEx_Cairo::drawFourColorGradient( const QRect& rect )
 {
-       cairo_pattern_t *pat = NULL;
-       cairo_surface_t *img = NULL;
-       cairo_t *cr = NULL;
-       cairo_pattern_t *mpat = NULL;
+       cairo_pattern_t *pat = nullptr;
+       cairo_surface_t *img = nullptr;
+       cairo_t *cr = nullptr;
+       cairo_pattern_t *mpat = nullptr;
        QColor color;
 
        double p1x = m_gradPatchP1.x();
@@ -833,11 +833,11 @@
 
 void ScPainterEx_Cairo::drawDiamondGradient( VGradientEx& gradient, const 
QRect& rect )
 {
-       cairo_pattern_t *pat = NULL;
-       cairo_surface_t *img = NULL;
-       cairo_t *cr = NULL;
-       cairo_pattern_t *mpat = NULL;
-       VColorStopEx* stop = NULL;
+       cairo_pattern_t *pat = nullptr;
+       cairo_surface_t *img = nullptr;
+       cairo_t *cr = nullptr;
+       cairo_pattern_t *mpat = nullptr;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        double p1x = m_gradControlP1.x();
@@ -1057,11 +1057,11 @@
 
 void ScPainterEx_Cairo::drawMeshGradient( const QRect& rect )
 {
-       cairo_pattern_t *pat = NULL;
-       cairo_surface_t *img = NULL;
-       cairo_t *cr = NULL;
-       cairo_pattern_t *mpat = NULL;
-       VColorStopEx* stop = NULL;
+       cairo_pattern_t *pat = nullptr;
+       cairo_surface_t *img = nullptr;
+       cairo_t *cr = nullptr;
+       cairo_pattern_t *mpat = nullptr;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        double p3x = m_gradPatchP3.x();
@@ -1135,11 +1135,11 @@
 
 void ScPainterEx_Cairo::drawFreeMeshGradient( const QRect& rect )
 {
-       cairo_pattern_t *pat = NULL;
-       cairo_surface_t *img = NULL;
-       cairo_t *cr = NULL;
-       cairo_pattern_t *mpat = NULL;
-       VColorStopEx* stop = NULL;
+       cairo_pattern_t *pat = nullptr;
+       cairo_surface_t *img = nullptr;
+       cairo_t *cr = nullptr;
+       cairo_pattern_t *mpat = nullptr;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        double p3x = m_gradPatchP3.x();
@@ -1221,7 +1221,7 @@
 
 void ScPainterEx_Cairo::strokeLinearGradient(VGradientEx& gradient)
 {
-       cairo_pattern_t *pat = NULL;
+       cairo_pattern_t *pat = nullptr;
        double r, g, b, lastPoint = 0.0;
        double x1 = gradient.origin().x();
        double y1 = gradient.origin().y();
@@ -1230,7 +1230,7 @@
        double fx = gradient.focalPoint().x();
        double fy = gradient.focalPoint().y();
        QList<VColorStopEx*> colorStops = gradient.colorStops();
-       VColorStopEx* stop = NULL;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        cairo_push_group(m_cr);
@@ -1273,7 +1273,7 @@
 
 void ScPainterEx_Cairo::strokeCircularGradient(VGradientEx& gradient)
 {
-       cairo_pattern_t *pat = NULL;
+       cairo_pattern_t *pat = nullptr;
        double r, g, b, lastPoint = 0.0;
        double x1 = gradient.origin().x();
        double y1 = gradient.origin().y();
@@ -1282,7 +1282,7 @@
        double fx = gradient.focalPoint().x();
        double fy = gradient.focalPoint().y();
        QList<VColorStopEx*> colorStops = gradient.colorStops();
-       VColorStopEx* stop = NULL;
+       VColorStopEx* stop = nullptr;
        QColor color;
 
        cairo_push_group(m_cr);

Modified: trunk/Scribus/scribus/scpainterex_ps2.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/scpainterex_ps2.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainterex_ps2.cpp   (original)
+++ trunk/Scribus/scribus/scpainterex_ps2.cpp   Tue May  8 21:47:48 2018
@@ -52,11 +52,11 @@
        toGray = false;
        mirrorH = false;
        mirrorV = false;
-       hProfile = NULL;
-       rgbToOutputColorTransform = NULL;
-       rgbToOutputImageTransform = NULL;
-       cmykToOutputColorTransform = NULL;
-       cmykToOutputImageTransform = NULL;
+       hProfile = nullptr;
+       rgbToOutputColorTransform = nullptr;
+       rgbToOutputImageTransform = nullptr;
+       cmykToOutputColorTransform = nullptr;
+       cmykToOutputImageTransform = nullptr;
 }
 
 ScPainterEx_Ps2::ScPainterEx_Ps2(QIODevice* iodev, QRect& rect, 
ScPs2OutputParams& options ) : ScPainterExBase()
@@ -473,7 +473,7 @@
        {
                unsigned long colorIn[4];
                unsigned long colorOut[4];
-               ScColorTransform cmsTranform = NULL;
+               ScColorTransform cmsTranform = nullptr;
                if( colorShade.color.getColorModel() == colorModelRGB )
                {
                        RGBColorF rgb;

Modified: trunk/Scribus/scribus/scplugin.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/scplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/scplugin.cpp  (original)
+++ trunk/Scribus/scribus/scplugin.cpp  Tue May  8 21:47:48 2018
@@ -93,7 +93,7 @@
 
 ScActionPlugin::ScActionPlugin() : ScPlugin()
 {
-       m_Doc = NULL;
+       m_Doc = nullptr;
 
        m_actionInfo.name = "";
        m_actionInfo.text = "";

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h  (original)
+++ trunk/Scribus/scribus/scribusdoc.h  Tue May  8 21:47:48 2018
@@ -1160,9 +1160,9 @@
        /*! \brief Does this doc have any TOC setups and potentially a TOC to 
generate */
        bool hasTOCSetup() { return 
!m_docPrefsData.tocPrefs.defaultToCSetups.empty(); }
        //! \brief Get the closest guide to the given point
-       void getClosestGuides(double xin, double yin, double *xout, double 
*yout, int *GxM, int *GyM, ScPage* refPage = NULL);
+       void getClosestGuides(double xin, double yin, double *xout, double 
*yout, int *GxM, int *GyM, ScPage* refPage = nullptr);
        //! \brief Get the closest border of another element to the given point
-       void getClosestElementBorder(double xin, double yin, double *xout, 
double *yout, int *GxM, int *GyM, ScPage* refPage = NULL);
+       void getClosestElementBorder(double xin, double yin, double *xout, 
double *yout, int *GxM, int *GyM, ScPage* refPage = nullptr);
        //! \brief Snap an item to the guides
        void SnapToGuides(PageItem *currItem);
        bool ApplyGuides(double *x, double *y, bool elementSnap = false);
@@ -1716,7 +1716,7 @@
 
        //return mark with given label and given type
        Mark* getMark(QString label, MarkType type); //returns mark with label 
and type (labels are unique only for same type marks)
-       Mark* newMark(Mark* mrk = NULL);
+       Mark* newMark(Mark* mrk = nullptr);
        TextNote* newNote(NotesStyle* NS);
        
        bool isMarkUsed(Mark* mrk, bool visible = false);
@@ -1771,7 +1771,7 @@
        void updateChangedEndNotesFrames();
        //finds mark position in text
        //return true if mark was found, CPos is set for mark`s position
-       //if item==NULL then search in all items and if mark is found than item 
is set
+       //if item==nullptr then search in all items and if mark is found than 
item is set
        int findMarkCPos(Mark* mrk, PageItem* &item, int Start = 0);
        QList<PageItem_NoteFrame*> m_docEndNotesFramesChanged;
 

Modified: trunk/Scribus/scribus/style.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/style.h
==============================================================================
--- trunk/Scribus/scribus/style.h       (original)
+++ trunk/Scribus/scribus/style.h       Tue May  8 21:47:48 2018
@@ -45,7 +45,7 @@
 public:
 //     static const short NOVALUE = -16000;
 
-       BaseStyle(): m_isDefaultStyle(false), m_name(""), m_context(NULL), 
m_contextversion(-1), m_parent(""), m_shortcut() {}
+       BaseStyle(): m_isDefaultStyle(false), m_name(""), m_context(nullptr), 
m_contextversion(-1), m_parent(""), m_shortcut() {}
 
        BaseStyle(StyleContext* b, QString n): m_isDefaultStyle(false), 
m_name(n), m_context(b), m_contextversion(-1), m_parent(""), m_shortcut() {}
        
@@ -104,10 +104,10 @@
        const StyleContext* context() const        { return m_context; }
        
        /**
-               sets a new StyleContext if b is not NULL and then uses the 
StyleContext
+               sets a new StyleContext if b is not nullptr and then uses the 
StyleContext
                to set all inherited attributes to their valid value.
         */
-       virtual void update(const StyleContext* b = NULL);
+       virtual void update(const StyleContext* b = nullptr);
        
        /**
                Checks if this BaseStyle needs an update

Modified: trunk/Scribus/scribus/util.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp      (original)
+++ trunk/Scribus/scribus/util.cpp      Tue May  8 21:47:48 2018
@@ -1036,21 +1036,21 @@
        if (!hasTableLinks || hasTextLinks)
                return false;
 
-       PageItem *topLeft = NULL;
+       PageItem *topLeft = nullptr;
        for (int i = 0; i < gpL.count(); i++)
        {
                PageItem* it = gpL[i];
-               if ((it->TopLink == NULL) && (it->LeftLink == NULL))    // we 
got the topleft item
+               if ((it->TopLink == nullptr) && (it->LeftLink == nullptr))      
// we got the topleft item
                {
                        topLeft = it;
                        PageItem *tl = it;
-                       while (tl->RightLink != NULL)
+                       while (tl->RightLink != nullptr)
                        {
                                colWidths.append(tl->width());
                                tl = tl->RightLink;
                        }
                        colWidths.append(tl->width());
-                       while (tl->BottomLink != NULL)
+                       while (tl->BottomLink != nullptr)
                        {
                                rowHeights.append(tl->height());
                                tl = tl->BottomLink;
@@ -1133,7 +1133,7 @@
        currItem->setLayer(gItem->LayerID);
        currItem->setMasterPage(gItem->OwnPage, gItem->OnMasterPage);
        currItem->adjustFrameToTable();
-       if (target != NULL)
+       if (target != nullptr)
        {
                int ind = target->indexOf(gItem);
                target->replace(ind, currItem);

Modified: trunk/Scribus/scribus/util_file.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/util_file.cpp
==============================================================================
--- trunk/Scribus/scribus/util_file.cpp (original)
+++ trunk/Scribus/scribus/util_file.cpp Tue May  8 21:47:48 2018
@@ -110,7 +110,7 @@
                        // QTemporaryFile::close() do not really close file
                        tempFile->setAutoRemove(false);
                        delete tempFile; 
-                       tempFile = NULL;
+                       tempFile = nullptr;
                        success = QFile::rename(tempFileName, target);
                }
        }
@@ -189,10 +189,10 @@
 bool touchFile(const QString& file)
 {
 #if defined(_WIN32) && defined(HAVE_UNICODE)
-       return _wutime((const wchar_t*) file.utf16(), NULL) == 0;
+       return _wutime((const wchar_t*) file.utf16(), nullptr) == 0;
 #else
        QByteArray fname = file.toLocal8Bit();
-       return utime(fname.data(), NULL) == 0;
+       return utime(fname.data(), nullptr) == 0;
 #endif
 }
 
@@ -243,7 +243,7 @@
 
 PageItem*  getVectorFileFromData(ScribusDoc *doc, QByteArray &data, QString 
ext, double x, double y, double w, double h)
 {
-       PageItem* retObj = NULL;
+       PageItem* retObj = nullptr;
        QTemporaryFile *tempFile = new QTemporaryFile(QDir::tempPath() + 
"/scribus_temp_XXXXXX." + ext);
        if (tempFile->open())
        {

Modified: trunk/Scribus/scribus/util_ghostscript.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22528&path=/trunk/Scribus/scribus/util_ghostscript.cpp
==============================================================================
--- trunk/Scribus/scribus/util_ghostscript.cpp  (original)
+++ trunk/Scribus/scribus/util_ghostscript.cpp  Tue May  8 21:47:48 2018
@@ -364,7 +364,7 @@
        {
                size = sizeof(regVersion)/sizeof(WCHAR) - 1;
                DWORD keyIndex = 0;
-               while (RegEnumKeyExW(hKey1, keyIndex, regVersion, &size, NULL, 
NULL, NULL, NULL) == ERROR_SUCCESS)
+               while (RegEnumKeyExW(hKey1, keyIndex, regVersion, &size, 
nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS)
                {
                        int gsNumericVer, gsMajor, gsMinor;
                        wcscpy(regPath, (const wchar_t*) regKey.utf16());


_______________________________________________
scribus-commit mailing list
scribus-commit@lists.scribus.net
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to