r22291 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Dec 29 00:10:42 UTC 2017


Author: jghali
Date: Fri Dec 29 00:10:42 2017
New Revision: 22291

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

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22291&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Fri Dec 29 00:10:42 2017
@@ -1218,9 +1218,11 @@
 bool PageItem_TextFrame::moveLinesFromPreviousFrame ()
 {
 	PageItem_TextFrame* prev = dynamic_cast<PageItem_TextFrame*>(BackBox);
-	if (!prev) return false;
-	if (!prev->incompleteLines) return false;   // no incomplete lines - nothing to do
-	int pos = textLayout.endOfFrame()-1;
+	if (!prev)
+		return false;
+	if (!prev->incompleteLines)
+		return false;   // no incomplete lines - nothing to do
+	int pos = textLayout.endOfFrame() - 1;
 	QChar lastChar = itemText.text (pos);
 	// qDebug()<<"pos is"<<pos<<", length is"<<itemText.length()<<", incomplete is "<<prev->incompleteLines;
 	if ((pos != itemText.length()-1) && (!SpecialChars::isBreak (lastChar, true)))
@@ -1230,7 +1232,8 @@
 	ParagraphStyle style = itemText.paragraphStyle (pos);
 	int need = style.keepLinesEnd () + 1;
 	int prevneed = style.keepLinesStart () + 1;
-	if (lines >= need) {
+	if (lines >= need)
+	{
 		prev->incompleteLines = 0;   // so that further paragraphs don't pull anything
 		return false;   // we have enough lines
 	}
@@ -1282,7 +1285,8 @@
 		if (style.keepTogether())
 			need = incompleteLines;
 		int pull = 0;
-		if (style.keepTogether() || (incompleteLines < need)) pull = incompleteLines;
+		if (style.keepTogether() || (incompleteLines < need))
+			pull = incompleteLines;
 		// if we need to keep it with the next one, pull one line. Next frame layouting
 		// will pull more from us if it proves necessary.
 		if (keepWithNext && (!pull))




More information about the scribus-commit mailing list