r23412 by jghali - Code style fixes
scribus-commit
scribus-commit at lists.scribus.net
Tue Dec 10 07:28:22 UTC 2019
Author: jghali
Date: Tue Dec 10 07:28:22 2019
New Revision: 23412
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23412
Log:
Code style fixes
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23412&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue Dec 10 07:28:22 2019
@@ -10032,40 +10032,40 @@
Segments.clear();
QPainterPath pa = PoLine.toQPainterPath(false);
QList<QPolygonF> polist = pa.toSubpathPolygons();
- for (int a = 0; a < polist.count(); a++)
- {
- QPolygon cli = polist[a].toPolygon();
+ for (int i = 0; i < polist.count(); i++)
+ {
+ QPolygon cli = polist[i].toPolygon();
cl += cli;
Segments.append(cl.size());
}
if (cl.size() > 1)
{
Clip.resize(0);
- for (int a = 0; a < cl.size()-1; ++a)
- {
- rot = xy2Deg(cl.point(a+1).x()-cl.point(a).x(),cl.point(a+1).y()-cl.point(a).y());
+ for (int i = 0; i < cl.size() - 1; ++i)
+ {
+ rot = xy2Deg(cl.point(i + 1).x() - cl.point(i).x(), cl.point(i + 1).y() - cl.point(i).y());
QTransform ma;
ma.rotate(rot);
np = QPoint(0, -upval) * ma;
np2 = QPoint(0, -downval) * ma;
- cl1.resize(cl1.size()+1);
- cl1.setPoint(cl1.size()-1, np+cl.point(a));
- cl1.resize(cl1.size()+1);
- cl1.setPoint(cl1.size()-1, np+cl.point(a+1));
- cl2.resize(cl2.size()+1);
- cl2.setPoint(cl2.size()-1, np2+cl.point(a));
- cl2.resize(cl2.size()+1);
- cl2.setPoint(cl2.size()-1, np2+cl.point(a+1));
- }
- cl1.resize(cl1.size()+1);
- cl1.setPoint(cl1.size()-1, np+cl.point(cl.size()-1));
+ cl1.resize(cl1.size() + 1);
+ cl1.setPoint(cl1.size() - 1, np+cl.point(i));
+ cl1.resize(cl1.size() + 1);
+ cl1.setPoint(cl1.size() - 1, np + cl.point(i + 1));
+ cl2.resize(cl2.size() + 1);
+ cl2.setPoint(cl2.size() - 1, np2 + cl.point(i));
+ cl2.resize(cl2.size() + 1);
+ cl2.setPoint(cl2.size() - 1, np2 + cl.point(i + 1));
+ }
+ cl1.resize(cl1.size() + 1);
+ cl1.setPoint(cl1.size() - 1, np + cl.point(cl.size() - 1));
cl2.resize(cl2.size()+1);
- cl2.setPoint(cl2.size()-1, np2+cl.point(cl.size()-1));
+ cl2.setPoint(cl2.size() - 1, np2 + cl.point(cl.size() - 1));
Clip.putPoints(Clip.size(), cl1.size(), cl1);
- for (int a2 = cl2.size()-1; a2 > -1; a2--)
- {
- Clip.resize(Clip.size()+1);
- Clip.setPoint(Clip.size()-1, cl2.point(a2));
+ for (int i2 = cl2.size() - 1; i2 > -1; i2--)
+ {
+ Clip.resize(Clip.size() + 1);
+ Clip.setPoint(Clip.size() - 1, cl2.point(i2));
}
}
}
@@ -10074,7 +10074,7 @@
{
int asce = 1;
int desc = 1;
- int itemTextCount=itemText.length();
+ int itemTextCount = itemText.length();
for (int i = 0; i < itemTextCount; ++i)
{
const CharStyle& hl (itemText.charStyle(i));
@@ -10083,7 +10083,7 @@
asce = qMax(asce, asc);
desc = qMax(desc, des);
}
- setPolyClip(static_cast<int>(asce-BaseOffs), static_cast<int>(desc-BaseOffs));
+ setPolyClip(static_cast<int>(asce - BaseOffs), static_cast<int>(desc - BaseOffs));
}
void PageItem::handleModeEditKey(QKeyEvent * /* k */, bool & /* keyRepeat */)
@@ -10271,9 +10271,9 @@
switch (itemType())
{
case PageItem::Line:
- Clip.setPoints(4, -ph,-ph, static_cast<int>(width()+ph),-ph,
- static_cast<int>(width()+ph),static_cast<int>(height()+ph),
- -ph,static_cast<int>(height()+ph));
+ Clip.setPoints(4, -ph,-ph, static_cast<int>(width() + ph),-ph,
+ static_cast<int>(width() + ph), static_cast<int>(height() + ph),
+ -ph, static_cast<int>(height() + ph));
break;
default:
if (((!ClipEdited) || (FrameType < 3)) && !(asPathText()))
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23412&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Tue Dec 10 07:28:22 2019
@@ -7718,9 +7718,9 @@
if (currItem->asLine())
{
int ph = static_cast<int>(qMax(1.0, w / 2.0));
- currItem->Clip.setPoints(4, -ph,-ph, static_cast<int>(currItem->width()+ph),-ph,
- static_cast<int>(currItem->width()+ph),static_cast<int>(currItem->height()+ph),
- -ph,static_cast<int>(currItem->height()+ph));
+ currItem->Clip.setPoints(4, -ph,-ph, static_cast<int>(currItem->width() + ph),-ph,
+ static_cast<int>(currItem->width() + ph),static_cast<int>(currItem->height() + ph),
+ -ph, static_cast<int>(currItem->height() + ph));
}
QRectF newRect = currItem->getVisualBoundingRect();
//currItem->update();
More information about the scribus-commit
mailing list