r22527 by craig - More nullptr and other conversions, mostly import plugins related
scribus-commit
scribus-commit at lists.scribus.net
Mon May 7 21:13:03 UTC 2018
Author: craig
Date: Mon May 7 21:13:03 2018
New Revision: 22527
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22527
Log:
More nullptr and other conversions, mostly import plugins related
Modified:
trunk/Scribus/scribus/plugins/import/ai/importai.cpp
trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.cpp
trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
trunk/Scribus/scribus/plugins/import/ps/importps.cpp
trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp
trunk/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp
trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
trunk/Scribus/scribus/plugins/import/wmf/wmfcmd.h
trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp
trunk/Scribus/scribus/plugins/import/zmf/importzmfplugin.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp Mon May 7 21:13:03 2018
@@ -65,7 +65,7 @@
extern SCRIBUS_API ScribusQApp * ScQApp;
AIPlug::AIPlug(ScribusDoc* doc, int flags) :
- progressDialog(NULL),
+ progressDialog(nullptr),
meshMode(false),
meshXSize(0),
meshYSize(0),
@@ -172,7 +172,7 @@
if (tempBuf.startsWith("%AI12_CompressedData"))
decompressAIData(fName);
}
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -283,7 +283,7 @@
if (tempBuf.startsWith("%AI12_CompressedData"))
decompressAIData(fName);
}
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -400,7 +400,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -470,12 +470,12 @@
importedColors.append(it.key());
}
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -532,7 +532,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -635,33 +635,33 @@
PoDoFo::PdfError::EnableLogging( false );
PoDoFo::PdfMemDocument doc( infile.toLocal8Bit().data() );
PoDoFo::PdfPage *curPage = doc.GetPage(0);
- if (curPage != NULL)
+ if (curPage != nullptr)
{
PoDoFo::PdfObject *piece = curPage->GetObject()->GetIndirectKey("PieceInfo");
- if (piece != NULL)
+ if (piece != nullptr)
{
PoDoFo::PdfObject *illy = piece->GetIndirectKey("Illustrator");
- if (illy != NULL)
+ if (illy != nullptr)
{
PoDoFo::PdfObject *priv = illy->GetIndirectKey("Private");
- if (priv == NULL)
+ if (priv == nullptr)
priv = illy;
int num = 0;
PoDoFo::PdfObject *numBl = priv->GetIndirectKey("NumBlock");
- if (numBl != NULL)
+ if (numBl != nullptr)
num = numBl->GetNumber() + 1;
if (num == 0)
num = 99999;
QString name = "AIPrivateData%1";
QString Key = name.arg(1);
PoDoFo::PdfObject *data = priv->GetIndirectKey(PoDoFo::PdfName(Key.toUtf8().data()));
- if (data == NULL)
+ if (data == nullptr)
{
name = "AIPDFPrivateData%1";
Key = name.arg(1);
data = priv->GetIndirectKey(PoDoFo::PdfName(Key.toUtf8().data()));
}
- if (data != NULL)
+ if (data != nullptr)
{
if (num == 2)
{
@@ -682,7 +682,7 @@
{
Key = name.arg(a);
data = priv->GetIndirectKey(PoDoFo::PdfName(Key.toUtf8().data()));
- if (data == NULL)
+ if (data == nullptr)
break;
PoDoFo::PdfStream const *stream = data->GetStream();
PoDoFo::PdfMemoryOutputStream oStream(1);
Modified: trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importaiplugin.cpp Mon May 7 21:13:03 2018
@@ -138,7 +138,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -232,7 +232,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
AIPlug *dia = new AIPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
@@ -246,7 +246,7 @@
if( fileName.isEmpty() )
return false;
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
AIPlug *dia = new AIPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
bool ret = dia->readColors(fileName, colors);
Modified: trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp Mon May 7 21:13:03 2018
@@ -62,7 +62,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -74,7 +74,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -159,7 +159,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp Mon May 7 21:13:03 2018
@@ -134,7 +134,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -183,7 +183,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
CdrPlug *dia = new CdrPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp Mon May 7 21:13:03 2018
@@ -105,7 +105,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage CgmPlug::readThumbnail(QString fName)
@@ -117,7 +117,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -204,7 +204,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -253,12 +253,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -295,7 +295,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cgm/importcgmplugin.cpp Mon May 7 21:13:03 2018
@@ -137,7 +137,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -165,7 +165,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
CgmPlug *dia = new CgmPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp Mon May 7 21:13:03 2018
@@ -56,7 +56,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage CvgPlug::readThumbnail(QString fName)
@@ -71,7 +71,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -158,7 +158,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/cvg/importcvgplugin.cpp Mon May 7 21:13:03 2018
@@ -130,7 +130,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -158,7 +158,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
CvgPlug *dia = new CvgPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp Mon May 7 21:13:03 2018
@@ -65,7 +65,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage DrwPlug::readThumbnail(QString fName)
@@ -76,7 +76,7 @@
double h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -174,7 +174,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -225,12 +225,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -263,7 +263,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -367,7 +367,7 @@
recordCount = 0;
imageValid = false;
thumbRead = false;
- currentItem = NULL;
+ currentItem = nullptr;
if(progressDialog)
{
progressDialog->setOverallProgress(2);
@@ -535,7 +535,7 @@
path.lineTo(coor);
}
}
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
currentItem->PoLine.fromQPainterPath(path);
QRectF bBoxO = path.boundingRect();
@@ -544,14 +544,14 @@
if (bBoxO.y() < 0)
currentItem->PoLine.translate(0, -bBoxO.y());
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
handleLineStyle(currentItem, flags, lineColor);
handleGradient(currentItem, patternIndex, fillColor, backColor, bBox);
}
}
createObjCode = 0;
- currentItem = NULL;
+ currentItem = nullptr;
}
else if (createObjCode == 2)
{
@@ -575,7 +575,7 @@
a += 3;
path.cubicTo(p1, p2, p3);
}
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
currentItem->PoLine.fromQPainterPath(path);
QRectF bBoxO = path.boundingRect();
@@ -584,14 +584,14 @@
if (bBoxO.y() < 0)
currentItem->PoLine.translate(0, -bBoxO.y());
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
handleLineStyle(currentItem, flags, lineColor);
handleGradient(currentItem, patternIndex, fillColor, backColor, bBox);
}
}
createObjCode = 0;
- currentItem = NULL;
+ currentItem = nullptr;
}
else if (createObjCode == 4)
{
@@ -615,7 +615,7 @@
a++;
path.quadTo(p1, p2);
}
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
currentItem->PoLine.fromQPainterPath(path);
QRectF bBoxO = path.boundingRect();
@@ -624,14 +624,14 @@
if (bBoxO.y() < 0)
currentItem->PoLine.translate(0, -bBoxO.y());
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
handleLineStyle(currentItem, flags, lineColor);
handleGradient(currentItem, patternIndex, fillColor, backColor, bBox);
}
}
createObjCode = 0;
- currentItem = NULL;
+ currentItem = nullptr;
}
break;
case 7:
@@ -667,14 +667,14 @@
txS.translate(-bbox.x(), -bbox.y());
txS.translate(0, fm.leading() * scaleFactor);
path = txS.map(path);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
currentItem->PoLine.fromQPainterPath(path);
currentItem->setWidth(bbox.width());
finishItem(currentItem, false);
}
createObjCode = 0;
- currentItem = NULL;
+ currentItem = nullptr;
}
break;
case 9:
@@ -903,7 +903,7 @@
}
if (scanLinesRead >= imageHeight)
{
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
QTemporaryFile *tempFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_drw_XXXXXX.png");
tempFile->setAutoRemove(false);
@@ -931,7 +931,7 @@
ds.device()->seek(0x11);
if (createObjCode == 6)
{
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
DRWParagraph para = paragraphList.at(paragraphCounter);
paragraphCounter++;
@@ -965,7 +965,7 @@
break;
case 35:
cmdText += "DRW Colortable";
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
if (currentItem->asImageFrame())
{
@@ -1261,7 +1261,7 @@
QRectF bBoxO;
QString fillC = CommonStrings::None;
createObjCode = 0;
- currentItem = NULL;
+ currentItem = nullptr;
ds >> data8; // reading Symbol Type
// now reading common values
ds >> flags;
@@ -1389,7 +1389,7 @@
z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Ellipse, posX, posY, bBox.width(), bBox.height(), lineWidth, fillC, lineColor);
currentItem = m_Doc->Items->at(z);
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
handleLineStyle(currentItem, flags, lineColor);
handleGradient(currentItem, patternIndex, fillColor, backColor, bBox);
@@ -1469,7 +1469,7 @@
currentItem = m_Doc->Items->at(z);
handleLineStyle(currentItem, flags, lineColor);
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
if (data8 == 11)
currentItem->setCornerRadius(cornerRadius);
@@ -1494,7 +1494,7 @@
currentItem = m_Doc->Items->at(z);
handleLineStyle(currentItem, flags, lineColor);
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
handleGradient(currentItem, patternIndex, fillColor, backColor, bBox);
break;
case 14:
@@ -1554,7 +1554,7 @@
bBoxO = path.controlPointRect();
currentItem->PoLine.translate(-bBoxO.x(), -bBoxO.y());
finishItem(currentItem);
- if (currentItem != NULL)
+ if (currentItem != nullptr)
{
handleLineStyle(currentItem, flags, lineColor);
handleGradient(currentItem, patternIndex, fillColor, backColor, bBox);
@@ -1750,7 +1750,7 @@
//printMSG = false;
// if (printMSG)
// {
-// if (currentItem != NULL)
+// if (currentItem != nullptr)
// qDebug() << cmdText << " " << currentItem->itemName();
// else
// qDebug() << cmdText;
@@ -1971,7 +1971,7 @@
tmpSel->clear();
tmpSel->addItem(ite, true);
m_Doc->itemSelection_DeleteItem(tmpSel);
- currentItem = NULL;
+ currentItem = nullptr;
createObjCode = 0;
tmpSel->clear();
return;
Modified: trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrwplugin.cpp Mon May 7 21:13:03 2018
@@ -138,7 +138,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -166,7 +166,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
DrwPlug *dia = new DrwPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/emf/importemf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/emf/importemf.cpp Mon May 7 21:13:03 2018
@@ -428,7 +428,7 @@
extern SCRIBUS_API ScribusQApp * ScQApp;
EmfPlug::EmfPlug(ScribusDoc* doc, int flags)
- : clipGroup(NULL),
+ : clipGroup(nullptr),
docWidth(0.0),
docHeight(0.0),
baseX(0.0),
@@ -447,7 +447,7 @@
winPextendY(0),
winOrigX(0),
winOrigY(0),
- progressDialog(NULL),
+ progressDialog(nullptr),
cancel(false),
m_Doc(doc),
importerFlags(flags),
@@ -484,7 +484,7 @@
docY = y;
baseX = 0;
baseY = 0;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -599,7 +599,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -666,12 +666,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -731,7 +731,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -787,7 +787,7 @@
QDir::setCurrent(CurDirP);
m_Doc->DoDrawing = true;
m_Doc->scMW()->setScriptRunning(false);
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
}
@@ -1069,7 +1069,7 @@
sty.styType = U_OT_Pen;
emfStyleMap.insert(U_DC_PEN, sty);
emfStyleMapEMP.clear();
- clipGroup = NULL;
+ clipGroup = nullptr;
if(progressDialog)
{
progressDialog->setOverallProgress(2);
@@ -2347,7 +2347,7 @@
}
}
}
- if (clipGroup != NULL)
+ if (clipGroup != nullptr)
{
QList<PageItem*> itemList;
itemList.append(ite);
@@ -2359,7 +2359,7 @@
void EmfPlug::invalidateClipGroup()
{
- if (clipGroup != NULL)
+ if (clipGroup != nullptr)
{
if (clipGroup->asGroupFrame()->groupItemList.count() == 0)
{
@@ -2368,7 +2368,7 @@
delete clipGroup;
}
}
- clipGroup = NULL;
+ clipGroup = nullptr;
}
void EmfPlug::createClipGroup()
@@ -5693,7 +5693,7 @@
if (emfStyleMapEMP[flagsH].imageType < U_MDT_Emf)
ext = "wmf";
PageItem* ite = getVectorFileFromData(m_Doc, emfStyleMapEMP[flagsH].imageData, ext, baseX + p1.x(), baseY + p1.y(), QLineF(p1, p2).length(), QLineF(p1, p3).length());
- if (ite != NULL)
+ if (ite != nullptr)
{
if (QLineF(p1, p2).angle() != 0)
ite->setRotation(-QLineF(p1, p2).angle(), true);
Modified: trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/emf/importemfplugin.cpp Mon May 7 21:13:03 2018
@@ -135,8 +135,8 @@
}
if (m_Doc == 0)
m_Doc=ScCore->primaryMainWindow()->doc;
- UndoTransaction* activeTransaction = NULL;
- bool emptyDoc = (m_Doc == NULL);
+ UndoTransaction* activeTransaction = nullptr;
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -155,7 +155,7 @@
{
activeTransaction->commit();
delete activeTransaction;
- activeTransaction = NULL;
+ activeTransaction = nullptr;
}
if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
@@ -168,7 +168,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
EmfPlug *dia = new EmfPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/fh/importfh.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/fh/importfh.cpp Mon May 7 21:13:03 2018
@@ -62,7 +62,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -74,7 +74,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -159,7 +159,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/fh/importfhplugin.cpp Mon May 7 21:13:03 2018
@@ -131,8 +131,8 @@
return true;
}
m_Doc=ScCore->primaryMainWindow()->doc;
- UndoTransaction* activeTransaction = NULL;
- bool emptyDoc = (m_Doc == NULL);
+ UndoTransaction* activeTransaction = nullptr;
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -151,7 +151,7 @@
{
activeTransaction->commit();
delete activeTransaction;
- activeTransaction = NULL;
+ activeTransaction = nullptr;
}
if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
@@ -164,7 +164,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
FhPlug *dia = new FhPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidml.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidml.cpp Mon May 7 21:13:03 2018
@@ -70,8 +70,8 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
- fun = NULL;
+ progressDialog = nullptr;
+ fun = nullptr;
}
QString IdmlPlug::getNodeValue(QDomNode &baseNode, QString path)
@@ -155,7 +155,7 @@
}
if (!found)
{
- progressDialog = NULL;
+ progressDialog = nullptr;
QFileInfo fi = QFileInfo(fName);
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
@@ -313,7 +313,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
@@ -358,12 +358,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -396,7 +396,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -688,7 +688,7 @@
}
}
}
- if (fun != NULL)
+ if (fun != nullptr)
delete fun;
if (progressDialog)
progressDialog->close();
@@ -2747,7 +2747,7 @@
if (e.tagName() == "Story")
{
QString storyName = e.attribute("Self");
- PageItem *item = NULL;
+ PageItem *item = nullptr;
if (!storyMap.contains(storyName))
return;
item = storyMap[storyName];
Modified: trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidmlplugin.cpp Mon May 7 21:13:03 2018
@@ -155,7 +155,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -183,7 +183,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
IdmlPlug *dia = new IdmlPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
@@ -197,7 +197,7 @@
if( fileName.isEmpty() )
return false;
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
IdmlPlug *dia = new IdmlPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
bool ret = dia->readColors(fileName, colors);
Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodg.cpp Mon May 7 21:13:03 2018
@@ -78,8 +78,8 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
- uz = NULL;
+ progressDialog = nullptr;
+ uz = nullptr;
}
QImage OdgPlug::readThumbnail(QString fName)
@@ -87,7 +87,7 @@
QImage tmp;
if (!QFile::exists(fName))
return QImage();
- progressDialog = NULL;
+ progressDialog = nullptr;
uz = new ScZipHandler();
if (!uz->open(fName))
{
@@ -170,7 +170,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
@@ -216,11 +216,11 @@
m_Doc->setPageSize("Custom");
}
Elements.clear();
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -253,7 +253,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -487,7 +487,7 @@
for(QDomElement spm = spf.firstChildElement(); !spm.isNull(); spm = spm.nextSiblingElement() )
{
PageItem* retObj = parseObj(spm);
- if (retObj != NULL)
+ if (retObj != nullptr)
m_Doc->Items->append(retObj);
}
m_Doc->setCurrentPage(oldCur);
@@ -613,7 +613,7 @@
for(QDomElement spm = spf.firstChildElement(); !spm.isNull(); spm = spm.nextSiblingElement() )
{
PageItem* retObj = parseObj(spm);
- if (retObj != NULL)
+ if (retObj != nullptr)
m_Doc->Items->append(retObj);
}
m_Doc->setCurrentPage(oldCur);
@@ -713,7 +713,7 @@
for(QDomElement spe = spp.firstChildElement(); !spe.isNull(); spe = spe.nextSiblingElement() )
{
PageItem* retObj = parseObj(spe);
- if (retObj != NULL)
+ if (retObj != nullptr)
{
m_Doc->Items->append(retObj);
Elements.append(retObj);
@@ -733,7 +733,7 @@
StoryText itemText;
itemText.clear();
itemText.setDoc(m_Doc);
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
if (draw.tagName() == "draw:g")
{
QList<PageItem*> GElements;
@@ -741,7 +741,7 @@
for(QDomElement spd = draw.firstChildElement(); !spd.isNull(); spd = spd.nextSiblingElement() )
{
PageItem* ite = parseObj(spd);
- if (ite != NULL)
+ if (ite != nullptr)
{
GElements.append(ite);
gLayer = ite->LayerID;
@@ -807,7 +807,7 @@
retObj = parseForm(draw);
else
qDebug() << "Unhandled Tag" << draw.tagName();
- if (retObj != NULL)
+ if (retObj != nullptr)
{
if (draw.hasAttribute("draw:layer"))
{
@@ -820,7 +820,7 @@
PageItem* OdgPlug::parseForm(QDomElement &e)
{
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
if (e.hasChildNodes())
qDebug() << "Unhandled Tag" << e.tagName();
return retObj;
@@ -829,7 +829,7 @@
PageItem* OdgPlug::parseConnector(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
resovleStyle(tmpOStyle, "standard");
resovleStyle(tmpOStyle, getStyleName(e));
if ((tmpOStyle.fill_type == 0) && (tmpOStyle.stroke_type == 0))
@@ -856,10 +856,10 @@
QList<PageItem*> GElements;
GElements.append(retObj);
PageItem* startArrow = applyStartArrow(retObj, tmpOStyle);
- if (startArrow != NULL)
+ if (startArrow != nullptr)
GElements.append(startArrow);
PageItem* endArrow = applyEndArrow(retObj, tmpOStyle);
- if (endArrow != NULL)
+ if (endArrow != nullptr)
GElements.append(endArrow);
if (GElements.count() > 1)
retObj = groupObjects(GElements);
@@ -874,7 +874,7 @@
PageItem* OdgPlug::parseCustomShape(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
QList<PageItem*> GElements;
double x = parseUnit(e.attribute("svg:x"));
double y = parseUnit(e.attribute("svg:y")) ;
@@ -971,7 +971,7 @@
if(ret < 0)
{
QString formNam = itf.key();
- erg = fpa.Eval(NULL);
+ erg = fpa.Eval(nullptr);
func_Results.insert("?" + formNam + " ", QString("%1 ").arg(erg));
formNam.prepend("Func_");
fpa.AddConstant(formNam.toStdString(), erg);
@@ -1232,7 +1232,7 @@
PageItem* OdgPlug::parseMeasure(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
QList<PageItem*> GElements;
double x1 = e.attribute( "svg:x1" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "svg:x1" ) );
double y1 = e.attribute( "svg:y1" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "svg:y1" ) );
@@ -1248,7 +1248,7 @@
double dx = normRef.p2().x() - refLine.p1().x();
double dy = normRef.p2().y() - refLine.p1().y();
retObj = parseLine(e);
- if (retObj != NULL)
+ if (retObj != nullptr)
{
retObj->moveBy(dx, dy, true);
GElements.append(retObj);
@@ -1311,7 +1311,7 @@
PageItem* OdgPlug::parseLine( QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
double x1 = e.attribute( "svg:x1" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "svg:x1" ) );
double y1 = e.attribute( "svg:y1" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "svg:y1" ) );
double x2 = e.attribute( "svg:x2" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "svg:x2" ) );
@@ -1336,10 +1336,10 @@
QList<PageItem*> GElements;
GElements.append(retObj);
PageItem* startArrow = applyStartArrow(retObj, tmpOStyle);
- if (startArrow != NULL)
+ if (startArrow != nullptr)
GElements.append(startArrow);
PageItem* endArrow = applyEndArrow(retObj, tmpOStyle);
- if (endArrow != NULL)
+ if (endArrow != nullptr)
GElements.append(endArrow);
if (GElements.count() > 1)
retObj = groupObjects(GElements);
@@ -1350,7 +1350,7 @@
PageItem* OdgPlug::parseEllipse(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
double x = parseUnit(e.attribute("svg:x"));
double y = parseUnit(e.attribute("svg:y")) ;
double w = parseUnit(e.attribute("svg:width"));
@@ -1371,7 +1371,7 @@
PageItem* OdgPlug::parseRect(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
double x = parseUnit(e.attribute("svg:x"));
double y = parseUnit(e.attribute("svg:y")) ;
double w = parseUnit(e.attribute("svg:width"));
@@ -1399,7 +1399,7 @@
PageItem* OdgPlug::parsePolygon(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
resovleStyle(tmpOStyle, "standard");
resovleStyle(tmpOStyle, getStyleName(e));
if ((tmpOStyle.fill_type == 0) && (tmpOStyle.stroke_type == 0))
@@ -1418,7 +1418,7 @@
PageItem* OdgPlug::parsePolyline(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
resovleStyle(tmpOStyle, "standard");
resovleStyle(tmpOStyle, getStyleName(e));
if (tmpOStyle.stroke_type == 0)
@@ -1436,10 +1436,10 @@
QList<PageItem*> GElements;
GElements.append(retObj);
PageItem* startArrow = applyStartArrow(retObj, tmpOStyle);
- if (startArrow != NULL)
+ if (startArrow != nullptr)
GElements.append(startArrow);
PageItem* endArrow = applyEndArrow(retObj, tmpOStyle);
- if (endArrow != NULL)
+ if (endArrow != nullptr)
GElements.append(endArrow);
if (GElements.count() > 1)
retObj = groupObjects(GElements);
@@ -1450,7 +1450,7 @@
PageItem* OdgPlug::parsePath(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
resovleStyle(tmpOStyle, "standard");
resovleStyle(tmpOStyle, getStyleName(e));
if ((tmpOStyle.fill_type == 0) && (tmpOStyle.stroke_type == 0))
@@ -1492,10 +1492,10 @@
QList<PageItem*> GElements;
GElements.append(retObj);
PageItem* startArrow = applyStartArrow(retObj, tmpOStyle);
- if (startArrow != NULL)
+ if (startArrow != nullptr)
GElements.append(startArrow);
PageItem* endArrow = applyEndArrow(retObj, tmpOStyle);
- if (endArrow != NULL)
+ if (endArrow != nullptr)
GElements.append(endArrow);
if (GElements.count() > 1)
retObj = groupObjects(GElements);
@@ -1508,7 +1508,7 @@
PageItem* OdgPlug::parseFrame(QDomElement &e)
{
ObjStyle tmpOStyle;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
double x = parseUnit(e.attribute("svg:x"));
double y = parseUnit(e.attribute("svg:y")) ;
double w = parseUnit(e.attribute("svg:width"));
@@ -1593,7 +1593,7 @@
ext = "emf";
}
retObj = getVectorFileFromData(m_Doc, f, ext, baseX + x, baseY + y, w, h);
- if (retObj != NULL)
+ if (retObj != nullptr)
m_Doc->Items->removeLast();
}
}
@@ -1639,7 +1639,7 @@
if ((ext == "eps") || (ext == "wmf") || (ext == "emf") || (ext == "svg") || (ext == "svm"))
{
retObj = getVectorFileFromData(m_Doc, buf, ext, baseX + x, baseY + y, w, h);
- if (retObj != NULL)
+ if (retObj != nullptr)
m_Doc->Items->removeLast();
}
else
@@ -3373,7 +3373,7 @@
PageItem* OdgPlug::applyStartArrow(PageItem* ite, ObjStyle &obState)
{
- PageItem *iteS = NULL;
+ PageItem *iteS = nullptr;
if (!obState.startMarkerName.isEmpty())
{
ObjStyle mStyle;
@@ -3441,7 +3441,7 @@
PageItem* OdgPlug::applyEndArrow(PageItem* ite, ObjStyle &obState)
{
- PageItem *iteS = NULL;
+ PageItem *iteS = nullptr;
if (!obState.endMarkerName.isEmpty())
{
ObjStyle mStyle;
Modified: trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodgplugin.cpp Mon May 7 21:13:03 2018
@@ -154,7 +154,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -182,7 +182,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
OdgPlug *dia = new OdgPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pages/importpages.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pages/importpages.cpp Mon May 7 21:13:03 2018
@@ -82,7 +82,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage PagesPlug::readThumbnail(QString fName)
@@ -93,7 +93,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -178,7 +178,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -229,12 +229,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -267,7 +267,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -474,7 +474,7 @@
docHeight(0.0),
m_Doc(doc),
importerFlags(flags),
- progressDialog(NULL),
+ progressDialog(nullptr),
cancel(false),
firstPage(false),
pagecount(0),
@@ -485,7 +485,7 @@
bottomMargin(0.0),
pgCols(0.0),
pgGap(0.0),
- uz(NULL)
+ uz(nullptr)
{
tmpSel = new Selection(this, false);
interactive = (flags & LoadSavePlugin::lfInteractive);
@@ -496,7 +496,7 @@
QImage tmp;
if (!QFile::exists(fName))
return QImage();
- progressDialog = NULL;
+ progressDialog = nullptr;
uz = new ScZipHandler();
if (!uz->open(fName))
{
@@ -639,7 +639,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
@@ -684,12 +684,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -722,7 +722,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -845,7 +845,7 @@
if (compressed)
{
QTemporaryFile *tmpFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_zip_XXXXXX.dat");
- if (tmpFile == NULL)
+ if (tmpFile == nullptr)
return false;
tmpFile->open();
QString fname = getLongPathName(tmpFile->fileName());
@@ -1543,7 +1543,7 @@
for(QDomElement draw = drawPag.firstChildElement(); !draw.isNull(); draw = draw.nextSiblingElement() )
{
PageItem* retObj = parseObjReference(draw);
- if (retObj != NULL)
+ if (retObj != nullptr)
{
m_Doc->Items->append(retObj);
Elements.append(retObj);
@@ -1586,7 +1586,7 @@
itemText.clear();
itemText.setDoc(m_Doc);
int z = -1;
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
if (draw.tagName() == "sf:group")
{
QList<PageItem*> GElements;
@@ -1612,7 +1612,7 @@
else if ((spd.tagName() == "sf:media") || (spd.tagName() == "sf:drawable-shape") || (spd.tagName() == "sf:group"))
{
PageItem* ite = parseObjReference(spd);
- if (ite != NULL)
+ if (ite != nullptr)
GElements.append(ite);
}
}
Modified: trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pages/importpagesplugin.cpp Mon May 7 21:13:03 2018
@@ -138,7 +138,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -166,7 +166,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
PagesPlug *dia = new PagesPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpct.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpct.cpp Mon May 7 21:13:03 2018
@@ -59,7 +59,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage PctPlug::readThumbnail(QString fName)
@@ -74,7 +74,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -161,7 +161,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -230,12 +230,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -268,7 +268,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpctplugin.cpp Mon May 7 21:13:03 2018
@@ -131,7 +131,7 @@
if (m_Doc == 0)
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -159,7 +159,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
PctPlug *dia = new PctPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp Mon May 7 21:13:03 2018
@@ -72,8 +72,8 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
- m_pdfDoc = NULL;
+ progressDialog = nullptr;
+ m_pdfDoc = nullptr;
}
QImage PdfPlug::readThumbnail(QString fName)
@@ -88,7 +88,7 @@
GooString *fname = new GooString(QFile::encodeName(pdfFile).data());
#endif
globalParams->setErrQuiet(gTrue);
- PDFDoc *pdfDoc = new PDFDoc(fname, NULL, NULL, NULL);
+ PDFDoc *pdfDoc = new PDFDoc(fname, nullptr, nullptr, nullptr);
if (pdfDoc)
{
if (pdfDoc->getErrorCode() == errEncrypted)
@@ -217,7 +217,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -268,12 +268,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -315,7 +315,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -402,7 +402,7 @@
}
globalParams = new GlobalParams();
- GooString *userPW = NULL;
+ GooString *userPW = nullptr;
if (globalParams)
{
#if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0)
@@ -414,13 +414,13 @@
GBool hasOcg = gFalse;
QList<OptionalContentGroup*> ocgGroups;
// globalParams->setPrintCommands(gTrue);
- PDFDoc *pdfDoc = new PDFDoc(fname, NULL, NULL, NULL);
+ PDFDoc *pdfDoc = new PDFDoc(fname, nullptr, nullptr, nullptr);
if (pdfDoc)
{
if (pdfDoc->getErrorCode() == errEncrypted)
{
delete pdfDoc;
- pdfDoc = NULL;
+ pdfDoc = nullptr;
if (progressDialog)
progressDialog->hide();
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
@@ -435,7 +435,7 @@
fname = new GooString(QFile::encodeName(fn).data());
#endif
userPW = new GooString(text.toLocal8Bit().data());
- pdfDoc = new PDFDoc(fname, userPW, userPW, NULL);
+ pdfDoc = new PDFDoc(fname, userPW, userPW, nullptr);
qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
}
if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone))
@@ -775,9 +775,9 @@
{
// int numObj = m_Doc->Items->count();
// if (cropped)
- // pdfDoc->displayPageSlice(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, crBox.x(), crBox.y(), crBox.width(), crBox.height(), NULL, NULL, dev->annotations_callback, dev);
+ // pdfDoc->displayPageSlice(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, crBox.x(), crBox.y(), crBox.width(), crBox.height(), nullptr, nullptr, dev->annotations_callback, dev);
// else
- // pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, NULL, NULL, dev->annotations_callback, dev);
+ // pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, nullptr, nullptr, dev->annotations_callback, dev);
// int numObj2 = m_Doc->Items->count();
// int countObj = numObj2 - numObj;
for (int a = 0; a < ocgGroups.count(); a++)
@@ -787,9 +787,9 @@
// currentLayer = m_Doc->activeLayer();
oc->setState(OptionalContentGroup::On);
if (cropped)
- pdfDoc->displayPageSlice(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, crBox.x() - mdBox.x(), mdBox.bottom() - crBox.bottom(), crBox.width(), crBox.height(), NULL, NULL, dev->annotations_callback, dev);
+ pdfDoc->displayPageSlice(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, crBox.x() - mdBox.x(), mdBox.bottom() - crBox.bottom(), crBox.width(), crBox.height(), nullptr, nullptr, dev->annotations_callback, dev);
else
- pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, NULL, NULL, dev->annotations_callback, dev);
+ pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, nullptr, nullptr, dev->annotations_callback, dev);
oc->setState(OptionalContentGroup::Off);
// for (int dd = 0; dd < countObj; dd++)
// {
@@ -802,9 +802,9 @@
else
{
if (cropped)
- pdfDoc->displayPageSlice(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, crBox.x() - mdBox.x(), mdBox.bottom() - crBox.bottom(), crBox.width(), crBox.height(), NULL, NULL, dev->annotations_callback, dev);
+ pdfDoc->displayPageSlice(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, crBox.x() - mdBox.x(), mdBox.bottom() - crBox.bottom(), crBox.width(), crBox.height(), nullptr, nullptr, dev->annotations_callback, dev);
else
- pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, NULL, NULL, dev->annotations_callback, dev);
+ pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, nullptr, nullptr, dev->annotations_callback, dev);
}
PDFPresentationData ef;
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
@@ -906,7 +906,7 @@
#endif
if (names.isDict())
{
- LinkAction *linkAction = NULL;
+ LinkAction *linkAction = nullptr;
linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
if (linkAction)
{
@@ -974,7 +974,7 @@
ocgGroups[a]->setState(OptionalContentGroup::On);
}
}
- pdfDoc->displayPage(dev, firstPage, hDPI, vDPI, rotate, useMediaBox, crop, printing, NULL, NULL, dev->annotations_callback, dev);
+ pdfDoc->displayPage(dev, firstPage, hDPI, vDPI, rotate, useMediaBox, crop, printing, nullptr, nullptr, dev->annotations_callback, dev);
}
}
delete dev;
@@ -1066,7 +1066,7 @@
QRectF PdfPlug::getCBox(int box, int pgNum)
{
- PDFRectangle *cBox = NULL;
+ PDFRectangle *cBox = nullptr;
if (box == Media_Box)
cBox = m_pdfDoc->getPage(pgNum)->getMediaBox();
else if (box == Bleed_Box)
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp Mon May 7 21:13:03 2018
@@ -170,7 +170,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -239,7 +239,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
PdfPlug *dia = new PdfPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.cpp Mon May 7 21:13:03 2018
@@ -15,7 +15,7 @@
{
ui->setupUi(this);
ui->pageSelectButton->setIcon(IconManager::instance()->loadIcon("ellipsis.png"));
- m_plugin = NULL;
+ m_plugin = nullptr;
m_maxPage = 0;
m_resized = false;
}
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp Mon May 7 21:13:03 2018
@@ -23,7 +23,7 @@
LinkSubmitForm::LinkSubmitForm(Object *actionObj)
{
Object obj1, obj2, obj3;
- fileName = NULL;
+ fileName = nullptr;
m_flags = 0;
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
if (actionObj->isDict())
@@ -99,7 +99,7 @@
LinkImportData::LinkImportData(Object *actionObj)
{
Object obj1, obj3;
- fileName = NULL;
+ fileName = nullptr;
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
if (actionObj->isDict())
{
@@ -151,8 +151,8 @@
CurrColorFill = CommonStrings::None;
CurrColorText = "Black";
m_fontSize = 12.0;
- m_fontName = NULL;
- m_itemText = NULL;
+ m_fontName = nullptr;
+ m_itemText = nullptr;
}
void AnoOutputDev::eoFill(GfxState *state)
@@ -279,7 +279,7 @@
layerNum = 1;
importerFlags = flags;
currentLayer = m_doc->activeLayer();
- xref = NULL;
+ xref = nullptr;
m_fontEngine = 0;
m_font = 0;
m_formWidgets = 0;
@@ -301,7 +301,7 @@
/* get Actions not implemented by Poppler */
LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano)
{
- LinkAction *linkAction = NULL;
+ LinkAction *linkAction = nullptr;
Object obj;
Ref refa = ano->getRef();
Object additionalActions;
@@ -360,7 +360,7 @@
/* Replacement for the crippled Poppler function LinkAction* AnnotWidget::getAdditionalAction(AdditionalActionsType type) */
LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
{
- LinkAction *linkAction = NULL;
+ LinkAction *linkAction = nullptr;
Object obj;
Ref refa = ano->getRef();
Object additionalActions;
@@ -736,9 +736,9 @@
AnoOutputDev *Adev = new AnoOutputDev(m_doc, m_importedColors);
Gfx *gfx;
#ifdef POPPLER_VERSION
- gfx = new Gfx(pdfDoc, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), annota->getRect(), NULL);
+ gfx = new Gfx(pdfDoc, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), annota->getRect(), nullptr);
#else
- gfx = new Gfx(xref, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), catalog, annota->getRect(), NULL);
+ gfx = new Gfx(xref, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), catalog, annota->getRect(), nullptr);
#endif
ano->draw(gfx, false);
if (!bgFound)
@@ -1201,7 +1201,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("E", ano);
if (Aact)
@@ -1215,7 +1215,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("X", ano);
if (Aact)
@@ -1229,7 +1229,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("Fo", ano);
if (Aact)
@@ -1243,7 +1243,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("Bl", ano);
if (Aact)
@@ -1257,7 +1257,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("C", ano);
if (Aact)
@@ -1271,7 +1271,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("F", ano);
if (Aact)
@@ -1286,7 +1286,7 @@
ite->annotation().setFormat(5);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("K", ano);
if (Aact)
@@ -1301,7 +1301,7 @@
ite->annotation().setFormat(5);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
Aact = SC_getAdditionalAction("V", ano);
if (Aact)
@@ -1315,7 +1315,7 @@
ite->annotation().setAAact(true);
}
}
- Aact = NULL;
+ Aact = nullptr;
}
}
@@ -2339,9 +2339,9 @@
QTransform mmx = mm * m_ctm;
#ifdef POPPLER_VERSION
- gfx = new Gfx(pdfDoc, this, resDict, &box, NULL);
+ gfx = new Gfx(pdfDoc, this, resDict, &box, nullptr);
#else
- gfx = new Gfx(xref, this, resDict, catalog, &box, NULL);
+ gfx = new Gfx(xref, this, resDict, catalog, &box, nullptr);
#endif
inPattern++;
gfx->display(str);
@@ -2450,7 +2450,7 @@
#else
image = new QImage(width, height, QImage::Format_MonoLSB);
#endif
- if (image == NULL || image->isNull())
+ if (image == nullptr || image->isNull())
{
delete imgStr;
delete image;
@@ -2614,7 +2614,7 @@
colorMap->getRGBLine(pix, dest, width);
}
image = new QImage(buffer, width, height, QImage::Format_RGB32);
- if (image == NULL || image->isNull())
+ if (image == nullptr || image->isNull())
{
delete imgStr;
delete[] buffer;
@@ -2757,7 +2757,7 @@
colorMap->getRGBLine(pix, dest, width);
}
image = new QImage(buffer, width, height, QImage::Format_RGB32);
- if (image == NULL || image->isNull())
+ if (image == nullptr || image->isNull())
{
delete imgStr;
delete[] buffer;
@@ -2960,7 +2960,7 @@
}
}
}
- if (image == NULL || image->isNull())
+ if (image == nullptr || image->isNull())
{
delete imgStr;
delete image;
@@ -3320,7 +3320,7 @@
GfxFontType fontType;
SplashOutFontFileID *id;
SplashFontFile *fontFile;
- SplashFontSrc *fontsrc = NULL;
+ SplashFontSrc *fontsrc = nullptr;
FoFiTrueType *ff;
Object refObj, strObj;
GooString *fileName;
@@ -3334,10 +3334,10 @@
int faceIndex = 0;
SplashCoord matrix[6];
- m_font = NULL;
- fileName = NULL;
- tmpBuf = NULL;
- fontLoc = NULL;
+ m_font = nullptr;
+ fileName = nullptr;
+ tmpBuf = nullptr;
+ fontLoc = nullptr;
if (!(gfxFont = state->getFont())) {
goto err1;
@@ -3429,7 +3429,7 @@
n = 256;
delete ff;
} else {
- codeToGID = NULL;
+ codeToGID = nullptr;
n = 0;
}
if (!(fontFile = m_fontEngine->loadTrueTypeFont(
@@ -3462,7 +3462,7 @@
memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
n * sizeof(int));
} else {
- codeToGID = NULL;
+ codeToGID = nullptr;
n = 0;
}
if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(
@@ -3478,7 +3478,7 @@
break;
case fontCIDType2:
case fontCIDType2OT:
- codeToGID = NULL;
+ codeToGID = nullptr;
n = 0;
if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
@@ -3553,7 +3553,7 @@
GfxFontType fontType;
SplashOutFontFileID *id;
SplashFontFile *fontFile;
- SplashFontSrc *fontsrc = NULL;
+ SplashFontSrc *fontsrc = nullptr;
FoFiTrueType *ff;
Ref embRef;
Object refObj, strObj;
@@ -3569,9 +3569,9 @@
int faceIndex = 0;
SplashCoord matrix[6];
- m_font = NULL;
- fileName = NULL;
- tmpBuf = NULL;
+ m_font = nullptr;
+ fileName = nullptr;
+ tmpBuf = nullptr;
if (!(gfxFont = state->getFont()))
goto err1;
@@ -3598,7 +3598,7 @@
else if (!(fileName = gfxFont->getExtFontFile()))
{
// look for a display font mapping or a substitute font
- dfp = NULL;
+ dfp = nullptr;
if (gfxFont->getName())
{
dfp = globalParams->getDisplayFont(gfxFont);
@@ -3664,7 +3664,7 @@
}
else
{
- codeToGID = NULL;
+ codeToGID = nullptr;
n = 0;
}
if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n)))
@@ -3690,7 +3690,7 @@
break;
case fontCIDType2:
case fontCIDType2OT:
- codeToGID = NULL;
+ codeToGID = nullptr;
n = 0;
if (((GfxCIDFont *)gfxFont)->getCIDToGID())
{
Modified: trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pm/importpm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pm/importpm.cpp Mon May 7 21:13:03 2018
@@ -62,7 +62,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -74,7 +74,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -159,7 +159,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pm/importpmplugin.cpp Mon May 7 21:13:03 2018
@@ -130,8 +130,8 @@
return true;
}
m_Doc=ScCore->primaryMainWindow()->doc;
- UndoTransaction* activeTransaction = NULL;
- bool emptyDoc = (m_Doc == NULL);
+ UndoTransaction* activeTransaction = nullptr;
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -150,7 +150,7 @@
{
activeTransaction->commit();
delete activeTransaction;
- activeTransaction = NULL;
+ activeTransaction = nullptr;
}
if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
@@ -163,7 +163,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
PmPlug *dia = new PmPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/ps/importps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/ps/importps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/importps.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ps/importps.cpp Mon May 7 21:13:03 2018
@@ -58,7 +58,7 @@
{
tmpSel = new Selection(this, false);
m_Doc = doc;
- progressDialog = NULL;
+ progressDialog = nullptr;
interactive = (flags & LoadSavePlugin::lfInteractive);
}
@@ -101,7 +101,7 @@
qApp->processEvents();
}
else {
- progressDialog = NULL;
+ progressDialog = nullptr;
}
/* Set default Page to size defined in Preferences */
@@ -167,7 +167,7 @@
PoDoFo::PdfDocument doc( fName.toLocal8Bit().data() );
#endif
PoDoFo::PdfPage *curPage = doc.GetPage(0);
- if (curPage != NULL)
+ if (curPage != nullptr)
{
PoDoFo::PdfRect rect = curPage->GetMediaBox();
b = rect.GetWidth() - rect.GetLeft();
@@ -819,7 +819,7 @@
bool gs_error = false;
do {
len = diag.readLine(buf, 120);
- gs_error |= (strstr(buf,"Error")==NULL);
+ gs_error |= (strstr(buf,"Error")==nullptr);
if (gs_error)
qDebug("\t%s", buf);
}
@@ -838,7 +838,7 @@
len = dat.readLine(buf, 120);
qDebug("\t%s", buf);
}
- while ( len > 0 && !(strstr(buf, "image")==NULL) );
+ while ( len > 0 && !(strstr(buf, "image")==nullptr) );
dat.close();
}
else {
Modified: trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ps/importpsplugin.cpp Mon May 7 21:13:03 2018
@@ -163,7 +163,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
Modified: trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpub.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpub.cpp Mon May 7 21:13:03 2018
@@ -66,7 +66,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -78,7 +78,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -163,7 +163,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -214,12 +214,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -252,7 +252,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpubplugin.cpp Mon May 7 21:13:03 2018
@@ -132,7 +132,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -160,7 +160,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
PubPlug *dia = new PubPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp Mon May 7 21:13:03 2018
@@ -62,7 +62,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -74,7 +74,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -159,7 +159,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp Mon May 7 21:13:03 2018
@@ -130,8 +130,8 @@
return true;
}
m_Doc=ScCore->primaryMainWindow()->doc;
- UndoTransaction* activeTransaction = NULL;
- bool emptyDoc = (m_Doc == NULL);
+ UndoTransaction* activeTransaction = nullptr;
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -150,7 +150,7 @@
{
activeTransaction->commit();
delete activeTransaction;
- activeTransaction = NULL;
+ activeTransaction = nullptr;
}
if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
@@ -163,7 +163,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
QxpPlug *dia = new QxpPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp Mon May 7 21:13:03 2018
@@ -465,7 +465,7 @@
dashArray.clear();
firstPage = true;
actPage = 0;
- actTextItem = NULL;
+ actTextItem = nullptr;
fileType = fTyp;
}
@@ -942,7 +942,7 @@
setStyle(propList);
Coords.resize(0);
Coords.svgInit();
- PageItem *ite=NULL;
+ PageItem *ite=nullptr;
Coords.svgMoveTo(valueAsPoint(vertices[0]["svg:x"]), valueAsPoint(vertices[0]["svg:y"]));
for(unsigned i = 1; i < vertices.count(); i++)
{
@@ -1101,7 +1101,7 @@
Coords.resize(0);
Coords.svgInit();
Coords.parseSVG(svgString);
- PageItem *ite=NULL;
+ PageItem *ite=nullptr;
if (isClosed)
{
if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap" && m_style["style:repeat"] && m_style["style:repeat"]->getStr() == "stretch")
@@ -1243,7 +1243,7 @@
setStyle(propList);
if (propList["svg:x"] && propList["svg:y"] && propList["svg:width"] && propList["svg:height"])
{
- PageItem *ite=NULL;
+ PageItem *ite=nullptr;
double x = valueAsPoint(propList["svg:x"]);
double y = valueAsPoint(propList["svg:y"]);
double w = valueAsPoint(propList["svg:width"]);
@@ -1363,7 +1363,7 @@
{
if (!doProcessing)
return;
- actTextItem = NULL;
+ actTextItem = nullptr;
lineSpSet = false;
lineSpIsPT = false;
// if ((fileType == "pmd") || (fileType == "pm5") || (fileType == "p65"))
@@ -1451,7 +1451,7 @@
return;
if (actTextItem)
actTextItem->itemText.trim();
- actTextItem = NULL;
+ actTextItem = nullptr;
lineSpSet = false;
lineSpIsPT = false;
}
@@ -1617,7 +1617,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
int posT = actTextItem->itemText.length();
if (posT > 0)
@@ -1745,7 +1745,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
int posT = actTextItem->itemText.length();
actTextItem->itemText.insertChars(posT, SpecialChars::TAB);
@@ -1756,7 +1756,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
int posT = actTextItem->itemText.length();
actTextItem->itemText.insertChars(posT, SpecialChars::BLANK);
@@ -1767,7 +1767,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
if (lineSpSet)
{
@@ -1803,7 +1803,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
int posT = actTextItem->itemText.length();
actTextItem->itemText.insertChars(posT, SpecialChars::LINEBREAK);
@@ -2233,7 +2233,7 @@
dashArray.clear();
firstPage = true;
actPage = 0;
- actTextItem = NULL;
+ actTextItem = nullptr;
doProcessing = true;
fileType = fTyp;
}
@@ -2625,7 +2625,7 @@
Coords.svgClosePath();
if (Coords.size() <= 0)
return;
- PageItem *ite = NULL;
+ PageItem *ite = nullptr;
int z = 0;
if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap" && m_style["style:repeat"] && m_style["style:repeat"]->getStr() == "stretch")
{
@@ -2908,7 +2908,7 @@
WPXString base64 = binaryData.getBase64Data();
if (propList["svg:x"] && propList["svg:y"] && propList["svg:width"] && propList["svg:height"])
{
- PageItem *ite = NULL;
+ PageItem *ite = nullptr;
double x = valueAsPoint(propList["svg:x"]);
double y = valueAsPoint(propList["svg:y"]);
double w = valueAsPoint(propList["svg:width"]);
@@ -3026,7 +3026,7 @@
{
if (!doProcessing)
return;
- actTextItem = NULL;
+ actTextItem = nullptr;
lineSpSet = false;
lineSpIsPT = false;
if (propList["svg:x"] && propList["svg:y"] && propList["svg:width"] && propList["svg:height"])
@@ -3080,7 +3080,7 @@
return;
if (actTextItem)
actTextItem->itemText.trim();
- actTextItem = NULL;
+ actTextItem = nullptr;
lineSpSet = false;
lineSpIsPT = false;
}
@@ -3135,7 +3135,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
int posT = actTextItem->itemText.length();
if (posT > 0)
@@ -3190,7 +3190,7 @@
{
if (!doProcessing)
return;
- if (actTextItem == NULL)
+ if (actTextItem == nullptr)
return;
if (lineSpSet)
{
@@ -3625,7 +3625,7 @@
void RawPainter::applyShadow(PageItem* ite)
{
- if (ite == NULL)
+ if (ite == nullptr)
return;
if(m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible")
{
Modified: trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsml.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsml.cpp Mon May 7 21:13:03 2018
@@ -57,7 +57,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage SmlPlug::readThumbnail(QString fName)
@@ -72,7 +72,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -158,7 +158,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/sml/importsmlplugin.cpp Mon May 7 21:13:03 2018
@@ -131,7 +131,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -159,7 +159,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
SmlPlug *dia = new SmlPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp Mon May 7 21:13:03 2018
@@ -173,7 +173,7 @@
}
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -209,7 +209,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
SVGPlug *dia = new SVGPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
@@ -393,11 +393,11 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -493,7 +493,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
importCanceled = false;
@@ -596,8 +596,8 @@
PageItem *SVGPlug::finishNode(const QDomNode &e, PageItem* item)
{
- PageItem* startArrow = NULL;
- PageItem* endArrow = NULL;
+ PageItem* startArrow = nullptr;
+ PageItem* endArrow = nullptr;
SvgStyle *gc = m_gc.top();
QTransform gcm = gc->matrix;
double BaseX = m_Doc->currentPage()->xOffset();
@@ -916,13 +916,13 @@
}
}
}
- if ((endArrow != NULL) || (startArrow != NULL))
+ if ((endArrow != nullptr) || (startArrow != nullptr))
{
QList<PageItem*> aElements;
aElements.append(item);
- if (startArrow != NULL)
+ if (startArrow != nullptr)
aElements.append(startArrow);
- if (endArrow != NULL)
+ if (endArrow != nullptr)
aElements.append(endArrow);
return m_Doc->groupObjectsList(aElements);
}
Modified: trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp Mon May 7 21:13:03 2018
@@ -289,7 +289,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage SvmPlug::readThumbnail(QString fName)
@@ -311,7 +311,7 @@
docY = y;
baseX = 0;
baseY = 0;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -426,7 +426,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -493,12 +493,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -531,7 +531,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -587,7 +587,7 @@
QDir::setCurrent(CurDirP);
m_Doc->DoDrawing = true;
m_Doc->scMW()->setScriptRunning(false);
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
}
@@ -4563,7 +4563,7 @@
if (emfStyleMapEMP[flagsH].imageType < U_MDT_Emf)
ext = "wmf";
PageItem* ite = getVectorFileFromData(m_Doc, emfStyleMapEMP[flagsH].imageData, ext, baseX + p1.x(), baseY + p1.y(), QLineF(p1, p2).length(), QLineF(p1, p3).length());
- if (ite != NULL)
+ if (ite != nullptr)
{
if (QLineF(p1, p2).angle() != 0)
ite->setRotation(-QLineF(p1, p2).angle(), true);
Modified: trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvmplugin.cpp Mon May 7 21:13:03 2018
@@ -135,8 +135,8 @@
}
if (m_Doc == 0)
m_Doc=ScCore->primaryMainWindow()->doc;
- UndoTransaction* activeTransaction = NULL;
- bool emptyDoc = (m_Doc == NULL);
+ UndoTransaction* activeTransaction = nullptr;
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -155,7 +155,7 @@
{
activeTransaction->commit();
delete activeTransaction;
- activeTransaction = NULL;
+ activeTransaction = nullptr;
}
if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
@@ -168,7 +168,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
SvmPlug *dia = new SvmPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/viva/importviva.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/viva/importviva.cpp Mon May 7 21:13:03 2018
@@ -72,7 +72,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
double VivaPlug::parseUnit(const QString &unit)
@@ -112,7 +112,7 @@
QImage tmp;
if ( !QFile::exists(fName) )
return QImage();
- progressDialog = NULL;
+ progressDialog = nullptr;
QFileInfo fi = QFileInfo(fName);
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
docWidth = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
@@ -236,7 +236,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
@@ -756,7 +756,7 @@
if (eo.tagName() == "vo:object")
{
PageItem* ite = parseObjectXML(eo);
- if (ite != NULL)
+ if (ite != nullptr)
{
m_Doc->Items->append(ite);
Elements.append(ite);
@@ -807,7 +807,7 @@
if (eo.tagName() == "vo:object")
{
PageItem* ite = parseObjectXML(eo);
- if (ite != NULL)
+ if (ite != nullptr)
{
m_Doc->Items->append(ite);
Elements.append(ite);
@@ -890,7 +890,7 @@
PageItem* VivaPlug::parseObjectXML(const QDomElement& obNode)
{
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
QDomElement eo = obNode.toElement();
QString id = eo.attribute("vo:id");
for(QDomNode ob = eo.firstChild(); !ob.isNull(); ob = ob.nextSibling() )
@@ -907,7 +907,7 @@
if (eog.tagName() == "vo:object")
{
PageItem *gItem = parseObjectXML(eog);
- if (gItem != NULL)
+ if (gItem != nullptr)
GElements.append(gItem);
}
else if (eog.tagName() == "vo:transformation")
@@ -980,7 +980,7 @@
PageItem* VivaPlug::parseObjectDetailsXML(const QDomElement& obNode, int baseType)
{
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
QDomElement eo = obNode.toElement();
double ob_width = 0;
double ob_height = 0;
@@ -1825,7 +1825,7 @@
if (anco.tagName() == "vo:object")
{
PageItem* item = parseObjectXML(anco);
- if (item != NULL)
+ if (item != nullptr)
{
item->isEmbedded = true;
item->gXpos = 0;
Modified: trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/viva/importvivaplugin.cpp Mon May 7 21:13:03 2018
@@ -138,7 +138,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -166,7 +166,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
VivaPlug *dia = new VivaPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
@@ -180,7 +180,7 @@
if( fileName.isEmpty() )
return false;
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
VivaPlug *dia = new VivaPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
bool ret = dia->readColors(fileName, colors);
Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp Mon May 7 21:13:03 2018
@@ -66,7 +66,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -78,7 +78,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -163,7 +163,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -214,12 +214,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -252,7 +252,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsdplugin.cpp Mon May 7 21:13:03 2018
@@ -132,7 +132,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -160,7 +160,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
VsdPlug *dia = new VsdPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfcmd.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfcmd.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfcmd.h (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfcmd.h Mon May 7 21:13:03 2018
@@ -13,7 +13,7 @@
class WmfCmd
{
public:
- WmfCmd() { params = NULL; }
+ WmfCmd() { params = nullptr; }
~WmfCmd() { if (params) delete params; }
unsigned short funcIndex;
long numParam;
Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp Mon May 7 21:13:03 2018
@@ -159,7 +159,7 @@
trSettings.description = filename;
trSettings.actionPixmap = Um::IWMF;
UndoTransaction activeTransaction;
- if ((m_Doc == NULL) || !(flags & lfInteractive) || !(flags & lfScripted))
+ if ((m_Doc == nullptr) || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(false);
if (UndoManager::undoEnabled())
activeTransaction = UndoManager::instance()->beginTransaction(trSettings);
@@ -168,7 +168,7 @@
Q_CHECK_PTR(dia);
if (activeTransaction)
activeTransaction.commit();
- if ((m_Doc == NULL) || !(flags & lfInteractive) || !(flags & lfScripted))
+ if ((m_Doc == nullptr) || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
if (dia->importCanceled)
{
@@ -188,7 +188,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
WMFImport *dia = new WMFImport(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp Mon May 7 21:13:03 2018
@@ -431,7 +431,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -443,7 +443,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -528,7 +528,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -579,12 +579,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -617,7 +617,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wpg/importwpgplugin.cpp Mon May 7 21:13:03 2018
@@ -130,7 +130,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -158,7 +158,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
WpgPlug *dia = new WpgPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxar.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxar.cpp Mon May 7 21:13:03 2018
@@ -67,12 +67,12 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
bool XarPlug::readColors(const QString& fNameIn, ColorList &colors)
{
- progressDialog = NULL;
+ progressDialog = nullptr;
QString fName = fNameIn;
bool success = false;
importedColors.clear();
@@ -157,7 +157,7 @@
QImage XarPlug::readThumbnail(QString fName)
{
- progressDialog = NULL;
+ progressDialog = nullptr;
QImage image = QImage();
QFile f(fName);
if (f.open(QIODevice::ReadOnly))
@@ -263,7 +263,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -316,12 +316,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -354,7 +354,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxarplugin.cpp Mon May 7 21:13:03 2018
@@ -131,7 +131,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -173,7 +173,7 @@
if( fileName.isEmpty() )
return false;
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
XarPlug *dia = new XarPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
bool ret = dia->readColors(fileName, colors);
Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp Mon May 7 21:13:03 2018
@@ -58,7 +58,7 @@
m_Doc=doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
}
QImage XfigPlug::readThumbnail(QString fName)
@@ -75,7 +75,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = w - x;
docHeight = h - y;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -287,7 +287,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
@@ -348,12 +348,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -386,7 +386,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xfig/importxfigplugin.cpp Mon May 7 21:13:03 2018
@@ -130,7 +130,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -158,7 +158,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
XfigPlug *dia = new XfigPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxps.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxps.cpp Mon May 7 21:13:03 2018
@@ -73,8 +73,8 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
- uz = NULL;
+ progressDialog = nullptr;
+ uz = nullptr;
}
QImage XpsPlug::readThumbnail(QString fName)
@@ -82,7 +82,7 @@
QImage tmp;
if (!QFile::exists(fName))
return QImage();
- progressDialog = NULL;
+ progressDialog = nullptr;
uz = new ScZipHandler();
if (!uz->open(fName))
{
@@ -226,7 +226,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
@@ -271,12 +271,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -309,7 +309,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
@@ -634,7 +634,7 @@
if ((dpg.tagName() == "Path") || (dpg.tagName() == "Glyphs") || (dpg.tagName() == "Canvas"))
{
PageItem* item = parseObjectXML(dpg, path);
- if (item != NULL)
+ if (item != nullptr)
{
m_Doc->Items->append(item);
Elements.append(item);
@@ -701,7 +701,7 @@
PageItem* XpsPlug::parseObjectXML(QDomElement &dpg, QString path)
{
- PageItem *retObj = NULL;
+ PageItem *retObj = nullptr;
ObjState obState;
obState.currentPath = QPainterPath();
obState.clipPath = QPainterPath();
@@ -1136,7 +1136,7 @@
else if ((spe.tagName() == "Path") || (spe.tagName() == "Glyphs") || (spe.tagName() == "Canvas"))
{
PageItem* ite = parseObjectXML(spe, path);
- if (ite != NULL)
+ if (ite != nullptr)
GElements.append(ite);
}
else if (spe.tagName() == "Canvas.OpacityMask")
@@ -1263,7 +1263,7 @@
}
}
}
- if (retObj != NULL)
+ if (retObj != nullptr)
{
if (!itemName.isEmpty())
{
@@ -1469,7 +1469,7 @@
if ((eo.tagName() == "Path") || (eo.tagName() == "Glyphs") || (eo.tagName() == "Canvas"))
{
PageItem* item = parseObjectXML(eo, path);
- if (item != NULL)
+ if (item != nullptr)
{
m_Doc->sizeItem((item->width() / conversionFactor) * vw, (item->height() / conversionFactor) * vh, item, false, true, false);
ScPattern pat = ScPattern();
@@ -1633,7 +1633,7 @@
if (linkTargets.contains(target))
{
PageItem* linkT = linkTargets[target];
- if (linkT != NULL)
+ if (linkT != nullptr)
{
int op = linkT->OwnPage;
if (op > -1)
@@ -1683,7 +1683,7 @@
PageItem* XpsPlug::createItem(QDomElement &dpg, ObjState &obState)
{
int z = -1;
- PageItem* retObj = NULL;
+ PageItem* retObj = nullptr;
if (!obState.currentPath.isEmpty())
{
if (obState.itemType == 0)
@@ -1913,7 +1913,7 @@
if (!uz->read(fileName, fontData))
return t;
QTemporaryFile *tempImageFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_zip_XXXXXX.dat");
- if (tempImageFile == NULL)
+ if (tempImageFile == nullptr)
return t;
tempImageFile->setAutoRemove(false);
tempImageFile->open();
Modified: trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxpsplugin.cpp Mon May 7 21:13:03 2018
@@ -154,7 +154,7 @@
}
m_Doc=ScCore->primaryMainWindow()->doc;
UndoTransaction activeTransaction;
- bool emptyDoc = (m_Doc == NULL);
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -182,7 +182,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
XpsPlug *dia = new XpsPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp Mon May 7 21:13:03 2018
@@ -62,7 +62,7 @@
m_Doc = doc;
importerFlags = flags;
interactive = (flags & LoadSavePlugin::lfInteractive);
- progressDialog = NULL;
+ progressDialog = nullptr;
cancel = false;
}
@@ -74,7 +74,7 @@
h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
- progressDialog = NULL;
+ progressDialog = nullptr;
m_Doc = new ScribusDoc();
m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
@@ -159,7 +159,7 @@
qApp->processEvents();
}
else
- progressDialog = NULL;
+ progressDialog = nullptr;
/* Set default Page to size defined in Preferences */
b = 0.0;
h = 0.0;
@@ -210,12 +210,12 @@
m_Doc->setPageOrientation(0);
m_Doc->setPageSize("Custom");
}
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->Deselect();
Elements.clear();
m_Doc->setLoading(true);
m_Doc->DoDrawing = false;
- if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+ if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != nullptr))
m_Doc->view()->updatesOn(false);
m_Doc->scMW()->setScriptRunning(true);
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -248,7 +248,7 @@
}
m_Doc->m_Selection->delaySignalsOff();
m_Doc->m_Selection->setGroupRect();
- if (m_Doc->view() != NULL)
+ if (m_Doc->view() != nullptr)
m_Doc->view()->updatesOn(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/zmf/importzmfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/import/zmf/importzmfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/zmf/importzmfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/zmf/importzmfplugin.cpp Mon May 7 21:13:03 2018
@@ -130,8 +130,8 @@
return true;
}
m_Doc=ScCore->primaryMainWindow()->doc;
- UndoTransaction* activeTransaction = NULL;
- bool emptyDoc = (m_Doc == NULL);
+ UndoTransaction* activeTransaction = nullptr;
+ bool emptyDoc = (m_Doc == nullptr);
bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
TransactionSettings trSettings;
trSettings.targetName = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
@@ -150,7 +150,7 @@
{
activeTransaction->commit();
delete activeTransaction;
- activeTransaction = NULL;
+ activeTransaction = nullptr;
}
if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
UndoManager::instance()->setUndoEnabled(true);
@@ -163,7 +163,7 @@
if( fileName.isEmpty() )
return QImage();
UndoManager::instance()->setUndoEnabled(false);
- m_Doc = NULL;
+ m_Doc = nullptr;
ZmfPlug *dia = new ZmfPlug(m_Doc, lfCreateThumbnail);
Q_CHECK_PTR(dia);
QImage ret = dia->readThumbnail(fileName);
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp Mon May 7 21:13:03 2018
@@ -449,7 +449,7 @@
iafData.columnGap = 0;
iafData.linkTextFrames = false;
iafData.linkToExistingFrame = false;
- iafData.linkToExistingFramePtr=NULL;
+ iafData.linkToExistingFramePtr=nullptr;
tmpImage->insertIntoDocument(m_Doc, iafData);
}
@@ -998,7 +998,7 @@
iafData.columnGap = 0;
iafData.linkTextFrames = false;
iafData.linkToExistingFrame = false;
- iafData.linkToExistingFramePtr=NULL;
+ iafData.linkToExistingFramePtr=nullptr;
tmpImage->insertIntoDocument(m_Doc, iafData);
}
@@ -1701,7 +1701,7 @@
{
documentWidget->clear();
documentItems.clear();
- m_Doc = NULL;
+ m_Doc = nullptr;
pImages->clearPreviewImagesList();
updateBrowser(false, false, false);
actionsGoButton->setEnabled(false);
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22527&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp Mon May 7 21:13:03 2018
@@ -122,13 +122,13 @@
if (pictureBrowser->isVisible())
pictureBrowser->close();
delete pictureBrowser;
- pictureBrowser = NULL;
+ pictureBrowser = nullptr;
}
}
void PictureBrowserPlugin::pictureBrowserClosed()
{
- pictureBrowser = NULL;
+ pictureBrowser = nullptr;
}
// Low level plugin API
More information about the scribus-commit
mailing list