r23901 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 24 23:12:36 UTC 2020


Author: jghali
Date: Wed Jun 24 23:12:36 2020
New Revision: 23901

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

Modified:
    trunk/Scribus/scribus/ui/hruler.cpp
    trunk/Scribus/scribus/ui/vruler.cpp

Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23901&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/hruler.cpp	Wed Jun 24 23:12:36 2020
@@ -115,24 +115,24 @@
 	
 	int result = rc_none;
 	
-	int Pos = textPosToLocal(0);
-	if (Pos-1 < (mx + grabRadius) && Pos-1 > (mx - grabRadius))
+	int pos = textPosToLocal(0);
+	if (pos - 1 < (mx + grabRadius) && pos - 1 > (mx - grabRadius))
 		result = rc_leftFrameDist;
 	
-	Pos = textPosToLocal(textWidth());
-	if (Pos+1 < (mx + grabRadius) && Pos+1 > (mx - grabRadius))
+	pos = textPosToLocal(textWidth());
+	if (pos + 1 < (mx + grabRadius) && pos + 1 > (mx - grabRadius))
 		result = rc_rightFrameDist;
 	
-	double ColWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
+	double colWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
 	
 	m_currCol = 0;
-	for (int CurrCol = 0; CurrCol < m_cols; ++CurrCol)
-	{
-		Pos = textPosToLocal((ColWidth+m_colGap)*CurrCol);
-		fpo = QRect(Pos, topline, static_cast<int>(ColWidth * m_scaling), rulerheight);
+	for (int currCol = 0; currCol < m_cols; ++currCol)
+	{
+		pos = textPosToLocal((colWidth + m_colGap) * currCol);
+		fpo = QRect(pos, topline, static_cast<int>(colWidth * m_scaling), rulerheight);
 		if (fpo.contains(mp))
 		{
-			m_currCol = CurrCol+1;
+			m_currCol = currCol + 1;
 			break;
 		}
 	}
@@ -142,20 +142,20 @@
 		return result;
 	}
 	
-	Pos = textPosToLocal(m_firstIndent + m_leftMargin + (ColWidth + m_colGap) * (m_currCol - 1));
-	fpo = QRect(Pos-1, topline, grabRadius+1, rulerheight/2);
+	pos = textPosToLocal(m_firstIndent + m_leftMargin + (colWidth + m_colGap) * (m_currCol - 1));
+	fpo = QRect(pos - 1, topline, grabRadius + 1, rulerheight/2);
 	if (fpo.contains(mp))
 	{
 		return rc_indentFirst;
 	}
-	Pos = textPosToLocal(m_leftMargin + (ColWidth + m_colGap) * (m_currCol - 1));
-	fpo = QRect(Pos-1, midline, grabRadius+1, rulerheight/2);
+	pos = textPosToLocal(m_leftMargin + (colWidth + m_colGap) * (m_currCol - 1));
+	fpo = QRect(pos - 1, midline, grabRadius + 1, rulerheight/2);
 	if (fpo.contains(mp))
 	{
 		return rc_leftMargin;
 	}
-	Pos = textPosToLocal(m_rightMargin + (ColWidth + m_colGap) * (m_currCol-1));
-	fpo = QRect(Pos-grabRadius, midline, grabRadius, rulerheight/2);
+	pos = textPosToLocal(m_rightMargin + (colWidth + m_colGap) * (m_currCol- 1));
+	fpo = QRect(pos - grabRadius, midline, grabRadius, rulerheight / 2);
 	if (fpo.contains(mp))
 	{
 		return rc_rightMargin;
@@ -164,8 +164,8 @@
 	{
 		for (int yg = 0; yg < m_tabValues.count(); yg++)
 		{
-			Pos = textPosToLocal(m_tabValues[yg].tabPosition+(ColWidth+m_colGap)*(m_currCol-1));
-			fpo = QRect(Pos-grabRadius, tabline, 2*grabRadius, rulerheight/2 + 2);
+			pos = textPosToLocal(m_tabValues[yg].tabPosition + (colWidth + m_colGap) * (m_currCol - 1));
+			fpo = QRect(pos - grabRadius, tabline, 2 * grabRadius, rulerheight / 2 + 2);
 			if (fpo.contains(mp))
 			{
 				result = rc_tab;
@@ -226,7 +226,7 @@
 		{
 			bool mustApplyStyle = false;
 			ParagraphStyle paraStyle;
-			double ColWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
+			double colWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
 			switch (m_rulerCode)
 			{
 				case rc_leftFrameDist:
@@ -249,7 +249,7 @@
 					emit DocChanged(false);
 					break;
 				case rc_rightMargin:
-					paraStyle.setRightMargin(ColWidth - m_rightMargin);
+					paraStyle.setRightMargin(colWidth - m_rightMargin);
 					mustApplyStyle = true;
 					emit DocChanged(false);
 					break;
@@ -321,7 +321,7 @@
 		return;
 	if (m_textEditMode)
 	{
-		double ColWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
+		double colWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
 		int ColEnd, ColStart;
 		double oldInd;
 		if (m_rulerCode == rc_leftFrameDist || m_rulerCode == rc_rightFrameDist)
@@ -331,14 +331,14 @@
 		}
 		else
 		{
-			ColStart = textPosToLocal((ColWidth + m_colGap) * (m_currCol-1));
-			ColEnd   = textPosToLocal((ColWidth + m_colGap) * (m_currCol-1) + ColWidth);
+			ColStart = textPosToLocal((colWidth + m_colGap) * (m_currCol- 1));
+			ColEnd   = textPosToLocal((colWidth + m_colGap) * (m_currCol- 1) + colWidth);
 		}
 		if ((m_mousePressed) && (m->y() < height()) && (m->y() > 0) && (m->x() > ColStart - m_doc->guidesPrefs().grabRadius) && (m->x() < ColEnd + m_doc->guidesPrefs().grabRadius))
 		{
 			qApp->changeOverrideCursor(QCursor(Qt::SizeHorCursor));
-			double toplimit = textWidth() + m_distRight - (m_colGap * (m_cols - 1))-1;
-			double toplimit2 = textWidth() + m_distLeft - (m_colGap * (m_cols - 1))-1;
+			double toplimit = textWidth() + m_distRight - (m_colGap * (m_cols - 1)) - 1;
+			double toplimit2 = textWidth() + m_distLeft - (m_colGap * (m_cols - 1)) - 1;
 			switch (m_rulerCode)
 			{
 				case rc_leftFrameDist:
@@ -363,8 +363,8 @@
 					m_firstIndent -= (m_mouseX - m->x()) / m_scaling;
 					if (m_firstIndent + m_leftMargin < 0)
 						m_firstIndent = -m_leftMargin;
-					if (m_firstIndent + m_leftMargin > ColWidth)
-						m_firstIndent  = ColWidth - m_leftMargin;
+					if (m_firstIndent + m_leftMargin > colWidth)
+						m_firstIndent  = colWidth - m_leftMargin;
 					emit MarkerMoved(textBase(), m_firstIndent + m_leftMargin);
 					repaint();
 					break;
@@ -373,8 +373,8 @@
 					m_leftMargin -= (m_mouseX - m->x()) / m_scaling;
 					if (m_leftMargin < 0)
 						m_leftMargin = 0;
-					if (m_leftMargin > ColWidth-1)
-						m_leftMargin  = ColWidth-1;
+					if (m_leftMargin > colWidth - 1)
+						m_leftMargin  = colWidth - 1;
 					m_firstIndent = oldInd - m_leftMargin;
 					emit MarkerMoved(textBase(), m_leftMargin);
 					repaint();
@@ -383,8 +383,8 @@
 					m_rightMargin -= (m_mouseX - m->x()) / m_scaling;
 					if (m_rightMargin < 0)
 						m_rightMargin = 0;
-					if (m_rightMargin > ColWidth-1)
-						m_rightMargin  = ColWidth-1;
+					if (m_rightMargin > colWidth - 1)
+						m_rightMargin  = colWidth - 1;
 					emit MarkerMoved(textBase(), m_rightMargin);
 					repaint();
 					break;
@@ -392,8 +392,8 @@
 					m_tabValues[m_currTab].tabPosition -= (m_mouseX - m->x()) / m_scaling;
 					if (m_tabValues[m_currTab].tabPosition < 0)
 						m_tabValues[m_currTab].tabPosition = 0;
-					if (m_tabValues[m_currTab].tabPosition > ColWidth-1)
-						m_tabValues[m_currTab].tabPosition  = ColWidth-1;
+					if (m_tabValues[m_currTab].tabPosition > colWidth - 1)
+						m_tabValues[m_currTab].tabPosition  = colWidth - 1;
 					emit MarkerMoved(textBase(), m_tabValues[m_currTab].tabPosition);
 					updateTabList();
 					repaint();
@@ -480,37 +480,37 @@
 			p.translate( textPosToLocal(m_distLeft) - textPosToLocal(m_itemEndPos - m_itemPos - m_distRight), 0);
 			p.translate(-textPosToLocal(0), 0);
 		}
-		for (int CurrCol = 0; CurrCol < m_cols; ++CurrCol)
-		{
-			double ColWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
-			double Pos = (ColWidth + m_colGap) * CurrCol;
-			double EndPos = Pos + ColWidth;
-			drawTextMarks(Pos, EndPos, p);
+		for (int currCol = 0; currCol < m_cols; ++currCol)
+		{
+			double colWidth = (textWidth() - m_colGap * (m_cols - 1)) / m_cols;
+			double pos = (colWidth + m_colGap) * currCol;
+			double endPos = pos + colWidth;
+			drawTextMarks(pos, endPos, p);
 			
 			p.setPen(QPen(Qt::blue, 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-			int xPos = textPosToLocal(Pos);
+			int xPos = textPosToLocal(pos);
 			p.drawLine(xPos, topline, xPos, bottomline);
-			if (CurrCol == 0)
-			{
-				p.drawLine(xPos, 15, (xPos+4), 15);
-				p.drawLine(xPos, topline, (xPos+4), topline);
+			if (currCol == 0)
+			{
+				p.drawLine(xPos, 15, (xPos + 4), 15);
+				p.drawLine(xPos, topline, (xPos + 4), topline);
 			}
 			
 			p.setPen(QPen(Qt::blue, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
 			
-			xPos = textPosToLocal(Pos + m_firstIndent + m_leftMargin);
+			xPos = textPosToLocal(pos + m_firstIndent + m_leftMargin);
 			QPolygon cr;
-			cr.setPoints(3, xPos, midline, xPos+3, topline, xPos-3, topline);
+			cr.setPoints(3, xPos, midline, xPos + 3, topline, xPos - 3, topline);
 			p.drawPolygon(cr);
 
-			xPos = textPosToLocal(Pos + m_leftMargin);
+			xPos = textPosToLocal(pos + m_leftMargin);
 			QPolygon cr2;
-			cr2.setPoints(3, xPos, midline, xPos+3, bottomline, xPos-3, bottomline);
+			cr2.setPoints(3, xPos, midline, xPos + 3, bottomline, xPos - 3, bottomline);
 			p.drawPolygon(cr2);
 			
-			xPos = textPosToLocal(Pos + m_rightMargin);
+			xPos = textPosToLocal(pos + m_rightMargin);
 			QPolygon cr3;
-			cr3.setPoints(3, xPos, topline, xPos, bottomline, xPos-3, midline);
+			cr3.setPoints(3, xPos, topline, xPos, bottomline, xPos - 3, midline);
 			p.drawPolygon(cr3);
 
 			if (m_tabValues.count() != 0)
@@ -518,8 +518,8 @@
 				p.setPen(QPen(Qt::black, 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
 				for (int yg = 0; yg < signed(m_tabValues.count()); yg++)
 				{
-					xPos = textPosToLocal(Pos+m_tabValues[yg].tabPosition);
-					if (Pos+m_tabValues[yg].tabPosition < EndPos)
+					xPos = textPosToLocal(pos + m_tabValues[yg].tabPosition);
+					if (pos + m_tabValues[yg].tabPosition < endPos)
 					{
 						switch (static_cast<int>(m_tabValues[yg].tabType))
 						{
@@ -527,8 +527,8 @@
 								if (m_reverse)
 								{
 									p.save();
-									p.translate(Pos + m_tabValues[yg].tabPosition,0);
-									p.scale(-1,1);
+									p.translate(pos + m_tabValues[yg].tabPosition, 0);
+									p.scale(-1, 1);
 									p.drawLine(0, tabline, 0, bottomline);
 									p.drawLine(0, bottomline, 8, bottomline);
 									p.restore();
@@ -543,8 +543,8 @@
 								if (m_reverse)
 								{
 									p.save();
-									p.translate(Pos+m_tabValues[yg].tabPosition,0);
-									p.scale(-1,1);
+									p.translate(pos + m_tabValues[yg].tabPosition, 0);
+									p.scale(-1, 1);
 									p.drawLine(0, tabline, 0, bottomline);
 									p.drawLine(0, bottomline, -8, bottomline);
 									p.restore();
@@ -558,12 +558,12 @@
 							case 2:
 							case 3:
 								p.drawLine(xPos, tabline, xPos, bottomline);
-								p.drawLine(xPos-4, bottomline, xPos+4, bottomline);
-								p.drawLine(xPos+3, bottomline-3, xPos+2, bottomline-3);
+								p.drawLine(xPos - 4, bottomline, xPos + 4, bottomline);
+								p.drawLine(xPos + 3, bottomline - 3, xPos + 2, bottomline - 3);
 								break;
 							case 4:
 								p.drawLine(xPos, tabline, xPos, bottomline);
-								p.drawLine(xPos-4, bottomline, xPos+4, bottomline);
+								p.drawLine(xPos - 4, bottomline, xPos + 4, bottomline);
 								break;
 							default:
 								break;
@@ -573,12 +573,12 @@
 			}
 			
 			p.setPen(QPen(Qt::blue, 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
-			xPos = textPosToLocal(EndPos);
+			xPos = textPosToLocal(endPos);
 			p.drawLine(xPos, topline, xPos, bottomline);
-			if (CurrCol == m_cols-1)
-			{
-				p.drawLine(xPos, bottomline, xPos-4 , bottomline);
-				p.drawLine(xPos, topline, xPos-4, topline);
+			if (currCol == m_cols - 1)
+			{
+				p.drawLine(xPos, bottomline, xPos - 4 , bottomline);
+				p.drawLine(xPos, topline, xPos - 4, topline);
 			}
 		}
 		p.restore();
@@ -635,7 +635,7 @@
 	p.translate(-m_view->contentsX(), 0);
 	p.setPen(Qt::red);
 	p.setBrush(Qt::red);
-	cr.setPoints(5,  m_whereToDraw, 5, m_whereToDraw, 16, m_whereToDraw, 5, m_whereToDraw+2, 0, m_whereToDraw-2, 0);
+	cr.setPoints(5,  m_whereToDraw, 5, m_whereToDraw, 16, m_whereToDraw, 5, m_whereToDraw + 2, 0, m_whereToDraw-2, 0);
 	p.drawPolygon(cr);
 #endif
 }
@@ -692,24 +692,24 @@
 				break;
 		}
 		drawNumber(tx, qRound(firstMark * sc) + 2, 9, p);
-		//p.drawText(qRound(firstMark * sc)+2, 9, tx);
+		//p.drawText(qRound(firstMark * sc) + 2, 9, tx);
 		firstMark += m_iter2;
 		markC++;
 	}
 }	
 
-void Hruler::drawTextMarks(double Pos, double EndPos, QPainter& p)
+void Hruler::drawTextMarks(double pos, double endPos, QPainter& p)
 {
 	double xl;
 	
 	p.setPen(QPen(Qt::blue, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
 	p.setBrush(Qt::blue);
-	for (xl = Pos; xl < EndPos; xl += m_iter)
+	for (xl = pos; xl < endPos; xl += m_iter)
 	{
 		int xli = textPosToLocal(xl);
 		p.drawLine(xli, 10, xli, 16);
 	}
-	for (xl = Pos; xl < EndPos; xl += m_iter2)
+	for (xl = pos; xl < endPos; xl += m_iter2)
 	{
 		int xli = textPosToLocal(xl);
 		p.drawLine(xli, topline, xli, 16);
@@ -718,7 +718,7 @@
 			case SC_IN:
 				{
 					QString tx = "";
-					int num1 = static_cast<int>((xl-Pos) / m_iter2 / m_cor);
+					int num1 = static_cast<int>((xl - pos) / m_iter2 / m_cor);
 					if (num1 != 0)
 						tx = QString::number(num1);
 					double frac = (xl / m_iter2 / m_cor) - num1;
@@ -731,72 +731,72 @@
 					if (m_reverse)
 					{
 						p.save();
-						p.translate(xli-2, 0);
-						p.scale(-1,1);
+						p.translate(xli - 2, 0);
+						p.scale(-1, 1);
 						drawNumber(tx, 0, 17, p);
 						//p.drawText(0, 17, tx);
 						p.restore();
 					}
 					else
-						drawNumber(tx, xli+2, 9, p);
-					//p.drawText(qRound((xl+2/sc) * sc), 9, tx);
+						drawNumber(tx, xli + 2, 9, p);
+					//p.drawText(qRound((xl + 2 / sc) * sc), 9, tx);
 					break;
 				}
 			case SC_P:
 				if (m_reverse)
 				{
 					p.save();
-					p.translate(xli-2,0);
-					p.scale(-1,1);
-					drawNumber(QString::number((xl-Pos) / m_iter / m_cor), 0, 17, p);
-					//p.drawText(0, 17, QString::number((xl-Pos) / m_iter / m_cor));
+					p.translate(xli - 2, 0);
+					p.scale(-1, 1);
+					drawNumber(QString::number((xl - pos) / m_iter / m_cor), 0, 17, p);
+					//p.drawText(0, 17, QString::number((xl - pos) / m_iter / m_cor));
 					p.restore();
 				}
 				else
-					drawNumber(QString::number((xl-Pos) / m_iter / m_cor), xli+2, 9, p);
-				//p.drawText(qRound((xl+2/sc) * sc), 9, QString::number((xl-Pos) / m_iter / m_cor));
+					drawNumber(QString::number((xl - pos) / m_iter / m_cor), xli + 2, 9, p);
+				//p.drawText(qRound((xl + 2 / sc) * sc), 9, QString::number((xl - pos) / m_iter / m_cor));
 				break;
 			case SC_CM:
 				if (m_reverse)
 				{
 					p.save();
-					p.translate(xli-2,0);
-					p.scale(-1,1);
-					drawNumber(QString::number((xl-Pos) / m_iter / 10 / m_cor), 0, 9, p);
-					//p.drawText(0, 9, QString::number((xl-Pos) / m_iter / 10 / m_cor));
+					p.translate(xli - 2, 0);
+					p.scale(-1, 1);
+					drawNumber(QString::number((xl - pos) / m_iter / 10 / m_cor), 0, 9, p);
+					//p.drawText(0, 9, QString::number((xl - pos) / m_iter / 10 / m_cor));
 					p.restore();
 				}
 				else
-					drawNumber(QString::number((xl-Pos) / m_iter / 10 / m_cor), xli+2, 9, p);
-				//p.drawText(qRound((xl+2/sc) * sc), 9, QString::number((xl-Pos) / m_iter / 10 / m_cor));
+					drawNumber(QString::number((xl - pos) / m_iter / 10 / m_cor), xli + 2, 9, p);
+				//p.drawText(qRound((xl + 2 / sc) * sc), 9, QString::number((xl - pos) / m_iter / 10 / m_cor));
 				break;
 			case SC_C:
 				if (m_reverse)
 				{
 					p.save();
-					p.translate(xli-2,0);
-					p.scale(-1,1);
-					drawNumber(QString::number((xl-Pos) / m_iter  / m_cor), 0, 9, p);
-					//p.drawText(0, 9, QString::number((xl-Pos) / m_iter  / m_cor));
+					p.translate(xli - 2, 0);
+					p.scale(-1, 1);
+					drawNumber(QString::number((xl - pos) / m_iter  / m_cor), 0, 9, p);
+					//p.drawText(0, 9, QString::number((xl - pos) / m_iter  / m_cor));
 					p.restore();
 				}
 				else
-					drawNumber(QString::number((xl-Pos) / m_iter  / m_cor), xli+2, 9, p);
-				//p.drawText(qRound((xl+2/sc) * sc), 9, QString::number((xl-Pos) / m_iter  / m_cor));
+					drawNumber(QString::number((xl - pos) / m_iter  / m_cor), xli + 2, 9, p);
+				//p.drawText(qRound((xl + 2 / sc) * sc), 9, QString::number((xl - pos) / m_iter  / m_cor));
 				break;
 			default:
 				if (m_reverse)
 				{
 					p.save();
-					p.translate(xli-2,0);
-					p.scale(-1,1);
-					drawNumber(QString::number((xl-Pos) / m_iter * 10 / m_cor), 0, 9, p);
-					//p.drawText(0, 9, QString::number((xl-Pos) / m_iter * 10 / m_cor));
+					p.translate(xli - 2, 0);
+					p.scale(-1, 1);
+					drawNumber(QString::number((xl - pos) / m_iter * 10 / m_cor), 0, 9, p);
+					//p.drawText(0, 9, QString::number((xl - pos) / m_iter * 10 / m_cor));
 					p.restore();
 				}
 				else
-					drawNumber(QString::number((xl-Pos) / m_iter * 10 / m_cor), xli+2, 9, p);
-				//p.drawText(qRound((xl+2/sc) * sc), 9, QString::number((xl-Pos) / m_iter * 10 / m_cor));
+					drawNumber(QString::number((xl - pos) / m_iter * 10 / m_cor), xli + 2, 9, p);
+				//p.drawText(qRound((xl + 2 / sc) * sc), 9, QString::number((xl - pos) / m_iter * 10 / m_cor));
 				break;
 		}
 	}
@@ -819,7 +819,7 @@
 	int currentCoor = where - m_view->contentsX();
 	m_whereToDraw = where;
 	m_drawMark = true;
-	repaint(m_oldMark-3, 0, 7, 17);
+	repaint(m_oldMark - 3, 0, 7, 17);
 	//	m_drawMark = false;
 	m_oldMark = currentCoor;
 }
@@ -940,8 +940,8 @@
 			if (sc < 0.25)
 			{
 				m_cor = 0.5;
-				m_iter = 72.0*16.0;
-				m_iter2 = 72.0*2.0;
+				m_iter = 72.0 * 16.0;
+				m_iter2 = 72.0 * 2.0;
 			}
 			break;
 		case SC_P:
@@ -981,8 +981,8 @@
 			if (sc < 0.6)
 			{
 				m_cor=0.1;
-				m_iter = 720.0/25.4;
-				m_iter2 = 7200.0/25.4;
+				m_iter = 720.0 / 25.4;
+				m_iter2 = 7200.0 / 25.4;
 			}
 			else
 			{
@@ -1002,21 +1002,21 @@
 			if (sc > 4)
 			{
 				m_cor = 2;
-				m_iter = 72.0/25.4*4.512/2.0;
-				m_iter2 = 72.0/25.4*4.512;
+				m_iter = 72.0 / 25.4 * 4.512 / 2.0;
+				m_iter2 = 72.0 / 25.4 * 4.512;
 			}
 			if (sc < 0.3)
 			{
 				m_cor = 0.1;
-				m_iter = 72.0/25.4*4.512*10;
-				m_iter2 = 72.0/25.4*4.512*5.0*10;
+				m_iter = 72.0 / 25.4 * 4.512 * 10;
+				m_iter2 = 72.0 / 25.4 * 4.512 * 5.0 * 10;
 			}
 			else
 				if (sc < 1)
 				{
 					m_cor = 1;
-					m_iter = 72.0/25.4*4.512;
-					m_iter2 = 72.0/25.4*4.512*5.0;
+					m_iter = 72.0 / 25.4 * 4.512;
+					m_iter2 = 72.0 / 25.4 * 4.512 * 5.0;
 				}
 			break;
 		default:

Modified: trunk/Scribus/scribus/ui/vruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23901&path=/trunk/Scribus/scribus/ui/vruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/vruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/vruler.cpp	Wed Jun 24 23:12:36 2020
@@ -110,7 +110,7 @@
 	while (firstMark < cc)
 	{
 		p.drawLine(8, qRound(firstMark * sc), 16, qRound(firstMark * sc));
-		int textY = qRound(firstMark * sc)+10;
+		int textY = qRound(firstMark * sc) + 10;
 		switch (m_doc->unitIndex())
 		{
 			case SC_MM:
@@ -133,7 +133,7 @@
 				break;
 			case SC_P:
 			case SC_C:
-				tx = QString::number(markC * m_iter2 / (m_iter2 /5) / m_cor);
+				tx = QString::number(markC * m_iter2 / (m_iter2 / 5) / m_cor);
 				break;
 			case SC_CM:
 				tx = QString::number(markC * m_iter2 / m_iter2 / m_cor);
@@ -191,7 +191,7 @@
 		p.translate(0, -m_view->contentsY());
 		p.setPen(Qt::red);
 		p.setBrush(Qt::red);
-		cr.setPoints(5,  5, m_whereToDraw, 16, m_whereToDraw, 5, m_whereToDraw, 0, m_whereToDraw+2, 0, m_whereToDraw-2);
+		cr.setPoints(5,  5, m_whereToDraw, 16, m_whereToDraw, 5, m_whereToDraw, 0, m_whereToDraw + 2, 0, m_whereToDraw - 2);
 		p.drawPolygon(cr);
 #endif
 	}
@@ -219,7 +219,7 @@
 	int currentCoor = where - m_view->contentsY();
 	m_whereToDraw = where;
 	m_drawMark = true;
-	repaint(0, m_oldMark-3, 17, 6);
+	repaint(0, m_oldMark - 3, 17, 6);
 //	m_drawMark = false;
 	m_oldMark = currentCoor;
 }
@@ -298,8 +298,8 @@
 			if (sc < 0.3)
 			{
 				m_cor = 0.25;
-				m_iter = 12.0*4;
-				m_iter2 = 60.0*4;
+				m_iter = 12.0 * 4;
+				m_iter2 = 60.0 * 4;
 			}
 			else if (sc < 1)
 			{
@@ -316,8 +316,8 @@
 			if (sc < 0.6)
 			{
 				m_cor = 0.1;
-				m_iter = 720.0/25.4;
-				m_iter2 = 7200.0/25.4;
+				m_iter = 720.0 / 25.4;
+				m_iter2 = 7200.0 / 25.4;
 			}
 			else
 			{
@@ -331,27 +331,27 @@
 			if (sc >= 1 && sc <= 4)
 			{
 				m_cor = 1;
-				m_iter = 72.0/25.4*4.512;
-				m_iter2 = 72.0/25.4*4.512*5.0;
-			}
-			if (sc > 4)
-			{
-				m_cor = 2;
-				m_iter = 72.0/25.4*4.512/2.0;
-				m_iter2 = 72.0/25.4*4.512;
+				m_iter = 72.0 / 25.4 * 4.512;
+				m_iter2 = 72.0 / 25.4 * 4.512 * 5.0;
+			}
+			if (sc > 4)
+			{
+				m_cor = 2;
+				m_iter = 72.0 / 25.4 * 4.512 / 2.0;
+				m_iter2 = 72.0 / 25.4 * 4.512;
 			}
 			if (sc < 0.3)
 			{
 				m_cor = 0.1;
-				m_iter = 72.0/25.4*4.512*10;
-				m_iter2 = 72.0/25.4*4.512*5.0*10;
+				m_iter = 72.0 / 25.4 * 4.512 * 10;
+				m_iter2 = 72.0 / 25.4 * 4.512 * 5.0 * 10;
 			}
 			else
 				if (sc < 1)
 			{
 				m_cor = 1;
-				m_iter = 72.0/25.4*4.512;
-				m_iter2 = 72.0/25.4*4.512*5.0;
+				m_iter = 72.0 / 25.4 * 4.512;
+				m_iter2 = 72.0 / 25.4 * 4.512 * 5.0;
 			}
 			break;
 		default:




More information about the scribus-commit mailing list