r23466 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 18 22:08:26 UTC 2020


Author: jghali
Date: Tue Feb 18 22:08:26 2020
New Revision: 23466

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23466
Log:
Code style fixes

Modified:
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp
    trunk/Scribus/scribus/pageitem.cpp

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23466&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp	Tue Feb 18 22:08:26 2020
@@ -633,7 +633,7 @@
 				{
 					cli.resize(cli.size()+4);
 					cli.putPoints(cli.size() - 4, 4, npf2.x(), npf2.y(), npf2.x(), npf2.y(), npf2.x(), npf2.y(), npf2.x(), npf2.y());
-					cli.putPoints(cli.size(), Clip.size()-(m_doc->nodeEdit.clre2() + 2), Clip, m_doc->nodeEdit.clre2() + 2);
+					cli.putPoints(cli.size(), Clip.size() - (m_doc->nodeEdit.clre2() + 2), Clip, m_doc->nodeEdit.clre2() + 2);
 				}
 				else
 				{
@@ -685,7 +685,7 @@
 				{
 					if (currItem->Segments.count() == 0)
 					{
-						cli.putPoints(0, EndInd-(m_doc->nodeEdit.clre() + 2), Clip, m_doc->nodeEdit.clre() + 2);
+						cli.putPoints(0, EndInd - (m_doc->nodeEdit.clre() + 2), Clip, m_doc->nodeEdit.clre() + 2);
 						cli.putPoints(cli.size(), m_doc->nodeEdit.clre() + 2, Clip);
 					}
 					else
@@ -702,12 +702,12 @@
 							if (m_doc->nodeEdit.isContourLine())
 							{
 								bb->ContourLine.putPoints(0, StartInd - 4, Clip);
-								bb->ContourLine.putPoints(bb->ContourLine.size(), Clip.size()-EndInd, Clip, EndInd);
+								bb->ContourLine.putPoints(bb->ContourLine.size(), Clip.size() -EndInd, Clip, EndInd);
 							}
 							else
 							{
 								bb->PoLine.putPoints(0, StartInd - 4, Clip);
-								bb->PoLine.putPoints(bb->PoLine.size(), Clip.size()-EndInd, Clip, EndInd);
+								bb->PoLine.putPoints(bb->PoLine.size(), Clip.size() - EndInd, Clip, EndInd);
 							}
 						}
 						else

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23466&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Tue Feb 18 22:08:26 2020
@@ -2584,19 +2584,20 @@
 
 void PageItem::DrawPolyL(QPainter *p, const QPolygon& pts)
 {
-	if (Segments.count() != 0)
-	{
-		QList<uint>::Iterator it2end=Segments.end();
-		uint FirstVal = 0;
-		for (QList<uint>::Iterator it2 = Segments.begin(); it2 != it2end; ++it2)
-		{
-			p->drawPolygon(pts.constData() + FirstVal, (*it2)-FirstVal);
-			FirstVal = (*it2);
-		}
-		p->drawPolygon(pts.constData() + FirstVal, pts.size() - FirstVal);
-	}
-	else
+	if (Segments.count() == 0)
+	{
 		p->drawPolygon(pts);
+		return;
+	}
+
+	QList<uint>::Iterator it2end = Segments.end();
+	uint firstVal = 0;
+	for (QList<uint>::Iterator it2 = Segments.begin(); it2 != it2end; ++it2)
+	{
+		p->drawPolygon(pts.constData() + firstVal, (*it2) - firstVal);
+		firstVal = (*it2);
+	}
+	p->drawPolygon(pts.constData() + firstVal, pts.size() - firstVal);
 }
 
 void PageItem::setItemName(const QString& newName)
@@ -10439,8 +10440,8 @@
 				OldH2 = height();
 				ContourLine = PoLine.copy();
 			}
-			OldB2 = (OldB2==0)?1:OldB2;
-			OldH2 = (OldH2==0)?1:OldH2;
+			OldB2 = (OldB2 == 0) ? 1 : OldB2;
+			OldH2 = (OldH2 == 0) ? 1 : OldH2;
 			double scx = width() / OldB2;
 			double scy = height() / OldH2;
 			QTransform ma;




More information about the scribus-commit mailing list