r23265 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Thu Oct 17 20:01:52 UTC 2019


Author: jghali
Date: Thu Oct 17 20:01:52 2019
New Revision: 23265

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

Modified:
    trunk/Scribus/scribus/pageitem_spiral.cpp

Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23265&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp	Thu Oct 17 20:01:52 2019
@@ -174,15 +174,15 @@
 	}
 	if (m_startArrowIndex != 0)
 	{
-		FPoint Start = PoLine.point(0);
+		FPoint start = PoLine.point(0);
 		for (int xx = 1; xx < PoLine.size(); xx += 2)
 		{
-			FPoint Vector = PoLine.point(xx);
-			if ((Start.x() != Vector.x()) || (Start.y() != Vector.y()))
-			{
-				double r = atan2(Start.y()-Vector.y(),Start.x()-Vector.x())*(180.0/M_PI);
+			const FPoint& point = PoLine.point(xx);
+			if ((start.x() != point.x()) || (start.y() != point.y()))
+			{
+				double r = atan2(start.y() - point.y(), start.x() - point.x()) * (180.0 / M_PI);
 				QTransform arrowTrans;
-				arrowTrans.translate(Start.x(), Start.y());
+				arrowTrans.translate(start.x(), start.y());
 				arrowTrans.rotate(r);
 				arrowTrans.scale(m_startArrowScale / 100.0, m_startArrowScale / 100.0);
 				drawArrow(p, arrowTrans, m_startArrowIndex);
@@ -192,15 +192,15 @@
 	}
 	if (m_endArrowIndex != 0)
 	{
-		FPoint End = PoLine.point(PoLine.size()-2);
+		FPoint end = PoLine.point(PoLine.size()-2);
 		for (uint xx = PoLine.size()-1; xx > 0; xx -= 2)
 		{
-			FPoint Vector = PoLine.point(xx);
-			if ((End.x() != Vector.x()) || (End.y() != Vector.y()))
-			{
-				double r = atan2(End.y()-Vector.y(),End.x()-Vector.x())*(180.0/M_PI);
+			const FPoint& point = PoLine.point(xx);
+			if ((end.x() != point.x()) || (end.y() != point.y()))
+			{
+				double r = atan2(end.y() - point.y(), end.x() - point.x()) * (180.0 / M_PI);
 				QTransform arrowTrans;
-				arrowTrans.translate(End.x(), End.y());
+				arrowTrans.translate(end.x(), end.y());
 				arrowTrans.rotate(r);
 				arrowTrans.scale(m_endArrowScale / 100.0, m_endArrowScale / 100.0);
 				drawArrow(p, arrowTrans, m_endArrowIndex);
@@ -355,35 +355,35 @@
 	PageItem::getBoundingRect(x1, y1, x2, y2);
 
 	QRectF totalRect = QRectF(QPointF(*x1, *y1), QPointF(*x2, *y2));
-	if (m_startArrowIndex != 0 && !PoLine.empty())
-	{
-		QRectF arrowRect = getStartArrowBoundingRect();
-		totalRect = totalRect.united(arrowRect);
-	}
-	if (m_endArrowIndex != 0 && PoLine.size() >= 2)
-	{
-		QRectF arrowRect = getEndArrowBoundingRect();
-		totalRect = totalRect.united(arrowRect);
+	if (m_startArrowIndex != 0 && !PoLine.empty())
+	{
+		QRectF arrowRect = getStartArrowBoundingRect();
+		totalRect = totalRect.united(arrowRect);
+	}
+	if (m_endArrowIndex != 0 && PoLine.size() >= 2)
+	{
+		QRectF arrowRect = getEndArrowBoundingRect();
+		totalRect = totalRect.united(arrowRect);
 	}
 	totalRect.getCoords(x1, y1, x2, y2);
 }
 
-void PageItem_Spiral::getOldBoundingRect(double *x1, double *y1, double *x2, double *y2) const
-{
-	PageItem::getOldBoundingRect(x1, y1, x2, y2);
-
-	QRectF totalRect = QRectF(QPointF(*x1, *y1), QPointF(*x2, *y2));
-	if (m_startArrowIndex != 0 && !PoLine.empty())
-	{
-		QRectF arrowRect = getStartArrowOldBoundingRect();
-		totalRect = totalRect.united(arrowRect);
-	}
-	if (m_endArrowIndex != 0 && PoLine.size() >= 2)
-	{
-		QRectF arrowRect = getEndArrowOldBoundingRect();
-		totalRect = totalRect.united(arrowRect);
-	}
-	totalRect.getCoords(x1, y1, x2, y2);
+void PageItem_Spiral::getOldBoundingRect(double *x1, double *y1, double *x2, double *y2) const
+{
+	PageItem::getOldBoundingRect(x1, y1, x2, y2);
+
+	QRectF totalRect = QRectF(QPointF(*x1, *y1), QPointF(*x2, *y2));
+	if (m_startArrowIndex != 0 && !PoLine.empty())
+	{
+		QRectF arrowRect = getStartArrowOldBoundingRect();
+		totalRect = totalRect.united(arrowRect);
+	}
+	if (m_endArrowIndex != 0 && PoLine.size() >= 2)
+	{
+		QRectF arrowRect = getEndArrowOldBoundingRect();
+		totalRect = totalRect.united(arrowRect);
+	}
+	totalRect.getCoords(x1, y1, x2, y2);
 }
 
 void PageItem_Spiral::getVisualBoundingRect(double * x1, double * y1, double * x2, double * y2) const
@@ -391,15 +391,15 @@
 	PageItem::getVisualBoundingRect(x1, y1, x2, y2);
 
 	QRectF totalRect(QPointF(*x1, *y1), QPointF(*x2, *y2));
-	if (m_startArrowIndex != 0 && !PoLine.empty())
-	{
-		QRectF arrowRect = getStartArrowBoundingRect();
-		totalRect = totalRect.united(arrowRect);
-	}
-	if (m_endArrowIndex != 0 && PoLine.size() >= 2)
-	{
-		QRectF arrowRect = getEndArrowBoundingRect();
-		totalRect = totalRect.united(arrowRect);
+	if (m_startArrowIndex != 0 && !PoLine.empty())
+	{
+		QRectF arrowRect = getStartArrowBoundingRect();
+		totalRect = totalRect.united(arrowRect);
+	}
+	if (m_endArrowIndex != 0 && PoLine.size() >= 2)
+	{
+		QRectF arrowRect = getEndArrowBoundingRect();
+		totalRect = totalRect.united(arrowRect);
 	}
 	totalRect.getCoords(x1, y1, x2, y2);
 }




More information about the scribus-commit mailing list