r20307 by jghali - #13287: Fix some spacing in Scribus code (Spacing/Tabs) <FirasH>

scribus-commit scribus-commit at lists.scribus.net
Mon Aug 10 21:51:17 UTC 2015


Author: jghali
Date: Mon Aug 10 21:51:17 2015
New Revision: 20307

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20307
Log:
#13287: Fix some spacing in Scribus code (Spacing/Tabs) <FirasH>

Modified:
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/pageitem_noteframe.cpp
    trunk/Scribus/scribus/pageitem_pathtext.cpp
    trunk/Scribus/scribus/ui/contextmenu.cpp

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20307&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Mon Aug 10 21:51:17 2015
@@ -359,7 +359,7 @@
 				currItem->itemText.extendSelection(start, stop);
 				currItem->itemText.setCursorPosition(stop);
 			}
-            else if ((currItem->itemText.cursorPosition() < currItem->itemText.length()) && (currItem->itemText.hasMark(currItem->itemText.cursorPosition())))
+			else if ((currItem->itemText.cursorPosition() < currItem->itemText.length()) && (currItem->itemText.hasMark(currItem->itemText.cursorPosition())))
 			{	//invoke edit marker dialog
 				m_ScMW->slotEditMark();
 				return;

Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20307&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp Mon Aug 10 21:51:17 2015
@@ -328,31 +328,31 @@
 	Mark* prevMrk = NULL;
 	while (pos < itemText.length())
 	{
-        if (itemText.hasMark(pos))
-		{
-            Mark* mark = itemText.mark(pos);
-            if  (mark->isType(MARKNoteFrameType))
-            {
-                if (prevMrk != NULL)
-                {
-                    note = prevMrk->getNotePtr();
-                    if (note != NULL)
-                    {
-                        int offset = 0;
-                        if (itemText.text(pos-1) == SpecialChars::PARSEP)
-                            ++offset;
-                        int len = pos - startPos -offset;
-                        if (len <= 0)
-                            note->setSaxedText("");
-                        else
-                            note->setSaxedText(getItemTextSaxed(startPos, len));
-                        note->textLen = len;
-                        itemText.deselectAll();
-                    }
-                }
-                prevMrk = mark;
-                startPos = pos +1;
-            }
+		if (itemText.hasMark(pos))
+		{
+			Mark* mark = itemText.mark(pos);
+			if  (mark->isType(MARKNoteFrameType))
+			{
+				if (prevMrk != NULL)
+				{
+					note = prevMrk->getNotePtr();
+					if (note != NULL)
+					{
+						int offset = 0;
+						if (itemText.text(pos-1) == SpecialChars::PARSEP)
+							++offset;
+						int len = pos - startPos -offset;
+						if (len <= 0)
+							note->setSaxedText("");
+						else
+							note->setSaxedText(getItemTextSaxed(startPos, len));
+						note->textLen = len;
+						itemText.deselectAll();
+					}
+				}
+				prevMrk = mark;
+				startPos = pos +1;
+			}
 		}
 		++pos;
 	}

Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20307&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp Mon Aug 10 21:51:17 2015
@@ -177,8 +177,8 @@
 	{
 		CharStyle nstyle = itemText.charStyle(a);
 		ParagraphStyle pstyle = itemText.paragraphStyle(a);
-        chstr = itemText.text(a, 1);
-        if ((chstr[0] == SpecialChars::OBJECT) && (itemText.hasObject(a)))
+		chstr = itemText.text(a, 1);
+		if ((chstr[0] == SpecialChars::OBJECT) && (itemText.hasObject(a)))
 		{
 			int pot = itemRenderText.length();
 			itemRenderText.insertObject(pot, itemText.object(a)->inlineCharID);
@@ -202,8 +202,8 @@
 	double wordExtra = 0;
 	for (a = firstChar; a < itemRenderText.length(); ++a)
 	{
-        GlyphLayout* glyphs = itemRenderText.getGlyphs(a);
-        chstr = itemRenderText.text(a, 1);
+		GlyphLayout* glyphs = itemRenderText.getGlyphs(a);
+		chstr = itemRenderText.text(a, 1);
 		if (chstr[0] == SpecialChars::PAGENUMBER || chstr[0] == SpecialChars::PARSEP || chstr[0] == SpecialChars::PAGECOUNT
 			|| chstr[0] == SpecialChars::TAB || chstr[0] == SpecialChars::LINEBREAK)
 			continue;
@@ -211,13 +211,13 @@
 			spaceCount++;
 		if (a < itemRenderText.length()-1)
 			chstr += itemRenderText.text(a+1, 1);
-        glyphs->yadvance = 0;
-        layoutGlyphs(itemRenderText.charStyle(a), chstr, itemRenderText.flags(a), *glyphs);
-        glyphs->shrink();
-        if (itemRenderText.hasObject(a))
-            totalTextLen += (itemRenderText.object(a)->width() + itemRenderText.object(a)->lineWidth()) * glyphs->scaleH;
+		glyphs->yadvance = 0;
+		layoutGlyphs(itemRenderText.charStyle(a), chstr, itemRenderText.flags(a), *glyphs);
+		glyphs->shrink();
+		if (itemRenderText.hasObject(a))
+			totalTextLen += (itemRenderText.object(a)->width() + itemRenderText.object(a)->lineWidth()) * glyphs->scaleH;
 		else
-            totalTextLen += glyphs->wide()+itemRenderText.charStyle(a).fontSize() * itemRenderText.charStyle(a).tracking() / 10000.0;
+			totalTextLen += glyphs->wide()+itemRenderText.charStyle(a).fontSize() * itemRenderText.charStyle(a).tracking() / 10000.0;
 	}
 	for (int segs = 0; segs < PoLine.size()-3; segs += 4)
 	{
@@ -257,7 +257,7 @@
 		CurY = 0;
 		GlyphLayout* glyphs = itemRenderText.getGlyphs(a);
 		PathData* pdata = & (textLayout.point(a));
-        chstr = itemRenderText.text(a,1);
+		chstr = itemRenderText.text(a,1);
 		if (chstr[0] == SpecialChars::PAGENUMBER || chstr[0] == SpecialChars::PARSEP || chstr[0] == SpecialChars::PAGECOUNT
 			|| chstr[0] == SpecialChars::TAB || chstr[0] == SpecialChars::LINEBREAK)
 			continue;
@@ -266,7 +266,7 @@
 		glyphs->yadvance = 0;
 		layoutGlyphs(itemRenderText.charStyle(a), chstr, itemRenderText.flags(a), *glyphs);
 		glyphs->shrink();                                                           // HACK
-        if (itemRenderText.hasObject(a))
+		if (itemRenderText.hasObject(a))
 			dx = (itemRenderText.object(a)->width() + itemRenderText.object(a)->lineWidth()) * glyphs->scaleH / 2.0;
 		else
 			dx = glyphs->wide() / 2.0;
@@ -356,8 +356,8 @@
 					p->setPen(cachedStrokeQ, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			}
 			p->translate(0.0, BaseOffs);
-            if (itemRenderText.hasObject(a))
-                DrawObj_Embedded(p, cullingArea, itemRenderText.charStyle(a), itemRenderText.object(a));
+			if (itemRenderText.hasObject(a))
+				DrawObj_Embedded(p, cullingArea, itemRenderText.charStyle(a), itemRenderText.object(a));
 			else
 				drawGlyphs(p, itemRenderText.charStyle(a), itemRenderText.flags(a), *glyphs);
 		}
@@ -365,9 +365,9 @@
 		p->restore();
 		MaxChars = a+1;
 		CurX -= dx;
-        if (itemRenderText.hasObject(a))
+		if (itemRenderText.hasObject(a))
 			CurX += (itemRenderText.object(a)->width() + itemRenderText.object(a)->lineWidth()) * glyphs->scaleH + extraOffset;
-        else if (chstr[0] == SpecialChars::BLANK)
+		else if (chstr[0] == SpecialChars::BLANK)
 			CurX += glyphs->wide()+itemRenderText.charStyle(a).fontSize() * itemRenderText.charStyle(a).tracking() / 10000.0 + wordExtra + extraOffset;
 		else
 			CurX += glyphs->wide()+itemRenderText.charStyle(a).fontSize() *itemRenderText.charStyle(a).tracking() / 10000.0 + extraOffset;

Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20307&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp Mon Aug 10 21:51:17 2015
@@ -237,7 +237,7 @@
 			}
 			if (currItem->itemText.cursorPosition() < currItem->itemText.length())
 			{
-                if (currItem->itemText.hasMark(currItem->itemText.cursorPosition()))
+				if (currItem->itemText.hasMark(currItem->itemText.cursorPosition()))
 					addAction(m_ScMW->scrActions["editMark"]);
 			}
 		}




More information about the scribus-commit mailing list