flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mih...@apache.org
Subject [2/2] git commit: [flex-tlf] [refs/heads/develop] - FLEX-34807 Renaming variable to clarify its role.
Date Tue, 22 Sep 2015 15:09:13 GMT
FLEX-34807
Renaming variable to clarify its role.


Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/0f33c43a
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/0f33c43a
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/0f33c43a

Branch: refs/heads/develop
Commit: 0f33c43a02d904482e2559524bf1cb81eafaedcc
Parents: 7b3f374
Author: Mihai Chira <mihaic@apache.org>
Authored: Tue Sep 22 17:08:45 2015 +0200
Committer: Mihai Chira <mihaic@apache.org>
Committed: Tue Sep 22 17:08:45 2015 +0200

----------------------------------------------------------------------
 textLayout/src/flashx/textLayout/edit/TextFlowEdit.as | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/0f33c43a/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as b/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
index 6a0a561..5908353 100644
--- a/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
+++ b/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
@@ -217,11 +217,11 @@ package flashx.textLayout.edit
 		 * <p>The new element will be inserted before the specified index.</p>
 		 * <p>To append the TextFlow, pass <code>theFlow.length</code> for <code>startPos</code>
and <code>endPos</code>.</p>
 		 * 
-		 * @param textFlow The TextFlow that is being inserted into.
+		 * @param destinationFlow The TextFlow that is being inserted into.
 		 * @param absoluteStart The index value of the first position of the replacement range
in the TextFlow.
 		 * @param textScrap The TextScrap to be pasted into theFlow.
 		 */				
-		public static function insertTextScrap(textFlow:TextFlow, absoluteStart:int, textScrap:TextScrap,
applyFormat:Boolean):int
+		public static function insertTextScrap(destinationFlow:TextFlow, absoluteStart:int, textScrap:TextScrap,
applyFormat:Boolean):int
 		{
 			if (!textScrap)
 				return absoluteStart;
@@ -229,7 +229,7 @@ package flashx.textLayout.edit
 			var scrapFlow:TextFlow = textScrap.textFlow.deepCopy() as TextFlow;
 			var scrapLeaf:FlowLeafElement = scrapFlow.getFirstLeaf();
 
-			var destinationLeaf:FlowLeafElement = textFlow.findLeaf(absoluteStart);		
+			var destinationLeaf:FlowLeafElement = destinationFlow.findLeaf(absoluteStart);
 			var insertPosition:int = absoluteStart;
 			
 			var firstParagraph:Boolean = true;
@@ -283,7 +283,7 @@ package flashx.textLayout.edit
 				{
 					// Split the paragraph, and merge the scrap paragraph to the end of the first paragraph
of the destination
 					CONFIG::debug { assert(destinationElement is ParagraphElement, "We should be splitting
a paragraph"); }
-					ModelEdit.splitElement(textFlow, destinationElement, insertPosition - destinationStart);
+					ModelEdit.splitElement(destinationFlow, destinationElement, insertPosition - destinationStart);
 					var scrapParent:FlowGroupElement = scrapElement.parent;
 					var scrapChildren:Array = scrapParent.mxmlChildren;
 					scrapParent.replaceChildren(0, scrapParent.numChildren);
@@ -309,7 +309,7 @@ package flashx.textLayout.edit
 						if (child is FlowLeafElement)
 							child.splitAtPosition(insertPosition - childStart);
 						else
-							ModelEdit.splitElement(textFlow, child as FlowGroupElement, insertPosition - childStart);
+							ModelEdit.splitElement(destinationFlow, child as FlowGroupElement, insertPosition
- childStart);
 						++childIndex;
 					}
 					if (applyFormat)
@@ -319,8 +319,8 @@ package flashx.textLayout.edit
 
 				
 				// Advance to the next destination leaf
-				destinationLeaf = (scrapElement is FlowLeafElement) ? FlowLeafElement(scrapElement).getNextLeaf()
: FlowGroupElement(scrapElement).getLastLeaf().getNextLeaf();
-				insertPosition = destinationLeaf ? destinationLeaf.getAbsoluteStart() : textFlow.textLength
- 1;
+				destinationLeaf = scrapElement is FlowLeafElement ? FlowLeafElement(scrapElement).getNextLeaf()
: FlowGroupElement(scrapElement).getLastLeaf().getNextLeaf();
+				insertPosition = destinationLeaf ? destinationLeaf.getAbsoluteStart() : destinationFlow.textLength
- 1;
 				
 				scrapLeaf = scrapFlow.getFirstLeaf();
 				// check to make sure we're inserting into the right paragraph


Mime
View raw message