r17939 by jghali - fix bad code indentation

scribus-commit scribus-commit at lists.scribus.net
Fri Dec 7 20:25:09 UTC 2012


Author: jghali
Date: Fri Dec  7 20:25:08 2012
New Revision: 17939

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17939
Log:
fix bad code indentation

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17939&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Fri Dec  7 20:25:08 2012
@@ -3832,9 +3832,9 @@
 	nextItem->asTextFrame()->deleteSelectedTextFromFrame();
 	if (!isNoteFrame())
 	{
-	if(UndoManager::undoEnabled())
-		undoManager->getLastUndo()->setName(Um::ClearText);
-	nextItem->itemText.setDefaultStyle(defaultStyle);
+		if(UndoManager::undoEnabled())
+			undoManager->getLastUndo()->setName(Um::ClearText);
+		nextItem->itemText.setDefaultStyle(defaultStyle);
 	}
 
 	while (nextItem != 0)
@@ -4549,25 +4549,25 @@
 {
 	if (itemText.lengthOfSelection() == 0)
 	{
-		itemText.select(itemText.cursorPosition(),1);
+		itemText.select(itemText.cursorPosition(), 1);
 		HasSel = true;
 	}
-			int start = itemText.startOfSelection();
-			int stop = itemText.endOfSelection();
+	int start = itemText.startOfSelection();
+	int stop = itemText.endOfSelection();
 	int marksNum = 0;
 	if(UndoManager::undoEnabled()) {
-			int lastPos = start;
-			CharStyle lastParent = itemText.charStyle(start);
-			UndoState* state = undoManager->getLastUndo();
-			ScItemState<CharStyle> *is = NULL;
-			TransactionState *ts = NULL;
-			bool added = false;
-			bool lastIsDelete = false;
-			while(state && state->isTransaction()){
-				ts = dynamic_cast<TransactionState*>(state);
-				is = dynamic_cast<ScItemState<CharStyle>*>(ts->at(ts->sizet()-1));
-				state = ts->at(0);
-			}
+		int lastPos = start;
+		CharStyle lastParent = itemText.charStyle(start);
+		UndoState* state = undoManager->getLastUndo();
+		ScItemState<CharStyle> *is = NULL;
+		TransactionState *ts = NULL;
+		bool added = false;
+		bool lastIsDelete = false;
+		while(state && state->isTransaction()){
+			ts = dynamic_cast<TransactionState*>(state);
+			is = dynamic_cast<ScItemState<CharStyle>*>(ts->at(ts->sizet()-1));
+			state = ts->at(0);
+		}
 		UndoTransaction* trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IDelete,Um::Delete,"",Um::IDelete));
 
 		//find and delete notes and marks in selected text
@@ -4592,8 +4592,8 @@
 			stop -= marksNum;
 		}
 		//delete text
-			for (int i=start; i <= stop; ++i)
-			{
+		for (int i=start; i <= stop; ++i)
+		{
 			ScText* hl = NULL;
 			if (i < itemText.length())
 				hl = itemText.item(i);
@@ -4626,12 +4626,12 @@
 					is = NULL;
 					if (i - lastPos > 0)
 					{
-					is = new ScItemState<CharStyle>(Um::DeleteText,"",Um::IDelete);
-					is->set("DELETE_FRAMETEXT", "delete_frametext");
-					is->set("ETEA", QString("delete_frametext"));
-					is->set("TEXT_STR",itemText.text(lastPos,i - lastPos));
-					is->set("START", start);
-					is->setItem(lastParent);
+						is = new ScItemState<CharStyle>(Um::DeleteText,"",Um::IDelete);
+						is->set("DELETE_FRAMETEXT", "delete_frametext");
+						is->set("ETEA", QString("delete_frametext"));
+						is->set("TEXT_STR",itemText.text(lastPos,i - lastPos));
+						is->set("START", start);
+						is->setItem(lastParent);
 					}
 					//delete selected notes from notes frame
 					if (isNoteFrame())
@@ -4674,11 +4674,11 @@
 					}
 					if (is)
 					{
-					if(!ts || !lastIsDelete){
+						if(!ts || !lastIsDelete){
 							undoManager->action(undoTarget, is);
-						ts = NULL;
-					}
-					else
+							ts = NULL;
+						}
+						else
 							ts->pushBack(undoTarget,is);
 					}
 				}
@@ -4698,8 +4698,8 @@
 	itemText.setCursorPosition( start );
 	//for sure text is still selected
 	itemText.select(start, stop - start - marksNum);
-		itemText.removeSelection();
-		HasSel = false;
+	itemText.removeSelection();
+	HasSel = false;
 //	m_Doc->updateFrameItems();
 	m_Doc->scMW()->DisableTxEdit();
 }




More information about the scribus-commit mailing list