r24257 by jghali - Add some parenthesis + some minor code improvements

scribus-commit scribus-commit at lists.scribus.net
Sun Nov 15 16:26:30 UTC 2020


Author: jghali
Date: Sun Nov 15 16:26:30 2020
New Revision: 24257

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24257
Log:
Add some parenthesis + some minor code improvements

Modified:
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
    trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
    trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
    trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
    trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
    trunk/Scribus/scribus/scimage.cpp

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp	Sun Nov 15 16:26:30 2020
@@ -138,7 +138,7 @@
 
 void ScrPainterIm::setFillRule(FillRule rule)
 {
-	fillrule = rule != libwpg::WPGPaintInterface::WindingFill;
+	fillrule = (rule != libwpg::WPGPaintInterface::WindingFill);
 //	qDebug() << "Fill Rule " << fillrule;
 }
 

Modified: trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&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	Sun Nov 15 16:26:30 2020
@@ -1102,7 +1102,7 @@
 	else if (elemID == 6)
 	{
 		ts >> data;
-		useClipRect = data != 0;
+		useClipRect = (data != 0);
 		// qDebug() << "CLIP INDICATOR" << useClipRect;
 	}
 	else if (elemID == 7)

Modified: trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&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	Sun Nov 15 16:26:30 2020
@@ -1587,7 +1587,7 @@
 			gElements.scaleY = scaleY;
 			gElements.rotationAngle = rotationAngle;
 			gElements.posPivot = posPivot;
-			gElements.filled = data8 == 17;
+			gElements.filled = (data8 == 17);
 			gElements.nrOfItems = nItems;
 			gElements.counter = 0;
 			gElements.patternIndex = patternIndex;

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&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	Sun Nov 15 16:26:30 2020
@@ -1577,7 +1577,7 @@
 		transferFunc->transform(&lum, &lum2);
 	else
 		lum2 = lum;
-	m_groupStack.top().inverted = lum != lum2;
+	m_groupStack.top().inverted = (lum != lum2);
 	m_groupStack.top().maskName = m_currentMask;
 	// Remember the mask's position as it might not align with the image to which the mask is later assigned.
 	m_groupStack.top().maskPos = m_currentMaskPosition;

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&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	Sun Nov 15 16:26:30 2020
@@ -766,7 +766,7 @@
 	}
 	if (propList["svg:fill-rule"])
 	{
-		m_fillRule = QString(propList["svg:fill-rule"]->getStr().cstr()) != "nonzero";
+		m_fillRule = (propList["svg:fill-rule"]->getStr() != "nonzero");
 	}
 	if (propList["svg:stroke-width"])
 		m_lineWidth = valueAsPoint(propList["svg:stroke-width"]);

Modified: trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&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	Sun Nov 15 16:26:30 2020
@@ -222,7 +222,7 @@
 
 void ScrPainter::setFillRule(FillRule rule)
 {
-	fillrule = rule != libwpg::WPGPaintInterface::WindingFill;
+	fillrule = (rule != libwpg::WPGPaintInterface::WindingFill);
 //	qDebug() << "Fill Rule " << fillrule;
 }
 

Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&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	Sun Nov 15 16:26:30 2020
@@ -1603,7 +1603,7 @@
 	quint8 val;
 	ts >> val;
 	XarStyle *gc = m_gc.top();
-	gc->fillRule = val != 0;
+	gc->fillRule = (val != 0);
 }
 
 void XarPlug::handleLineEnd(QDataStream &ts)

Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24257&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp	(original)
+++ trunk/Scribus/scribus/scimage.cpp	Sun Nov 15 16:26:30 2020
@@ -2730,7 +2730,7 @@
 //		setAlphaBuffer(false);
 	setDotsPerMeterX (qMax(2834, (int) (imgInfo.xres / 0.0254)));
 	setDotsPerMeterY (qMax(2834, (int) (imgInfo.yres / 0.0254)));
-	imgInfo.isEmbedded = imgInfo.isEmbedded && cmSettings.useEmbeddedProfile();
+	imgInfo.isEmbedded &= cmSettings.useEmbeddedProfile();
 	if	(ScCore->usingGUI() && pDataLoader->issuedWarningMsg() && showMsg)
 	{
 		ScMessageBox::warning(ScCore->primaryMainWindow(), CommonStrings::trWarning, pDataLoader->getMessage());




More information about the scribus-commit mailing list