You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/10/12 01:11:54 UTC
[3/3] git commit: [flex-tlf] [refs/heads/master] - Fixed some
"Warning: variable definition duplicates function parameter" issues that
popped up when compiling TLF with Falcon.
Fixed some "Warning: variable definition duplicates function parameter" issues that popped up when compiling TLF with Falcon.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/3b7adac4
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/3b7adac4
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/3b7adac4
Branch: refs/heads/master
Commit: 3b7adac460ba80e397f4edc8279678305a39ed8e
Parents: 258787a
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Sep 13 11:26:55 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Sep 13 11:26:55 2013 +0200
----------------------------------------------------------------------
.../flashx/textLayout/compose/TextFlowLine.as | 1 -
.../src/flashx/textLayout/edit/ParaEdit.as | 32 ++++++++++----------
.../textLayout/elements/FlowGroupElement.as | 8 ++---
.../textLayout/factory/StringTextLineFactory.as | 10 +++---
.../flashx/textLayout/property/ArrayProperty.as | 6 ++--
5 files changed, 28 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3b7adac4/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
index 0fe938c..11b8511 100644
--- a/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
+++ b/textLayout/src/flashx/textLayout/compose/TextFlowLine.as
@@ -1924,7 +1924,6 @@ package flashx.textLayout.compose
{
var blockRect:Rectangle = new Rectangle();
var globalStart:Point = new Point(0,0);
- var heightAndAdj:Array;
if(begAtomIndex > endAtomIndex)
{
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3b7adac4/textLayout/src/flashx/textLayout/edit/ParaEdit.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/edit/ParaEdit.as b/textLayout/src/flashx/textLayout/edit/ParaEdit.as
index e4972f1..974eba2 100644
--- a/textLayout/src/flashx/textLayout/edit/ParaEdit.as
+++ b/textLayout/src/flashx/textLayout/edit/ParaEdit.as
@@ -600,21 +600,21 @@ package flashx.textLayout.edit
CONFIG::debug { assert(begIdx <= endIdx,"bad indexeds passed to ParaEdit.cacheContainerStyleInformation"); }
if (flowRoot.flowComposer)
{
- var startIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(begIdx,false);
- if (startIdx == -1)
+ var ctrlrBegIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(begIdx,false);
+ if (ctrlrBegIdx == -1)
return;
- var endIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(endIdx,true);
- if (endIdx == -1)
- endIdx = flowRoot.flowComposer.numControllers-1;
- while (startIdx <= endIdx)
+ var ctrlrEndIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(endIdx,true);
+ if (ctrlrEndIdx == -1)
+ ctrlrEndIdx = flowRoot.flowComposer.numControllers-1;
+ while (ctrlrBegIdx <= ctrlrEndIdx)
{
- var controller:ContainerController = flowRoot.flowComposer.getControllerAt(startIdx);
+ var controller:ContainerController = flowRoot.flowComposer.getControllerAt(ctrlrBegIdx);
var obj:Object = new Object();
obj.container = controller;
// save just the styles
obj.attributes = new TextLayoutFormat(controller.format);
undoArray.push(obj);
- startIdx++;
+ ctrlrBegIdx++;
}
}
}
@@ -624,22 +624,22 @@ package flashx.textLayout.edit
CONFIG::debug { assert(begIdx <= endIdx,"bad indexes passed to ParaEdit.cacheContainerStyleInformation"); }
if (flowRoot.flowComposer)
{
- var startIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(begIdx,false);
- if (startIdx == -1)
+ var ctrlrBegIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(begIdx,false);
+ if (ctrlrBegIdx == -1)
return;
- var endIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(endIdx,true);
- if (endIdx == -1)
- endIdx = flowRoot.flowComposer.numControllers-1;
+ var ctrlrEndIdx:int = flowRoot.flowComposer.findControllerIndexAtPosition(endIdx,true);
+ if (ctrlrEndIdx == -1)
+ ctrlrEndIdx = flowRoot.flowComposer.numControllers-1;
var controllerIndex:int = flowRoot.flowComposer.findControllerIndexAtPosition(begIdx,false);
- while (startIdx <= endIdx)
+ while (ctrlrBegIdx <= ctrlrEndIdx)
{
- var controller:ContainerController = flowRoot.flowComposer.getControllerAt(startIdx);
+ var controller:ContainerController = flowRoot.flowComposer.getControllerAt(ctrlrBegIdx);
var newFormat:TextLayoutFormat = new TextLayoutFormat(controller.format);
if (applyFormat)
newFormat.apply(applyFormat);
undefineDefinedFormats(newFormat,undefineFormat);
controller.format = newFormat;
- startIdx++;
+ ctrlrBegIdx++;
}
}
}
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3b7adac4/textLayout/src/flashx/textLayout/elements/FlowGroupElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/FlowGroupElement.as b/textLayout/src/flashx/textLayout/elements/FlowGroupElement.as
index 1682720..b02a22d 100644
--- a/textLayout/src/flashx/textLayout/elements/FlowGroupElement.as
+++ b/textLayout/src/flashx/textLayout/elements/FlowGroupElement.as
@@ -355,8 +355,8 @@ package flashx.textLayout.elements
return parent.getNextLeafHelper(limitElement,this);
}
- var child:FlowElement = getChildAt(idx+1);
- return (child is FlowLeafElement) ? FlowLeafElement(child) : FlowGroupElement(child).getFirstLeaf();
+ var childFlowElement:FlowElement = getChildAt(idx+1);
+ return (childFlowElement is FlowLeafElement) ? FlowLeafElement(childFlowElement) : FlowGroupElement(childFlowElement).getFirstLeaf();
}
/** @private */
@@ -374,8 +374,8 @@ package flashx.textLayout.elements
return parent.getPreviousLeafHelper(limitElement,this);
}
- var child:FlowElement = getChildAt(idx-1);
- return (child is FlowLeafElement) ? FlowLeafElement(child) : FlowGroupElement(child).getLastLeaf();
+ var childFlowElement:FlowElement = getChildAt(idx-1);
+ return (childFlowElement is FlowLeafElement) ? FlowLeafElement(childFlowElement) : FlowGroupElement(childFlowElement).getLastLeaf();
}
/**
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3b7adac4/textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as b/textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as
index c8731a3..355e6c5 100644
--- a/textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as
+++ b/textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as
@@ -310,8 +310,8 @@ package flashx.textLayout.factory
/** @private */
tlf_internal function doTruncation(bp:String, measureWidth:Boolean, measureHeight:Boolean):void
{
- var bp:String = _tf.computedFormat.blockProgression;
- if (!doesComposedTextFit(truncationOptions.lineCountLimit, _tf.textLength, bp))
+ var bpString:String = _tf.computedFormat.blockProgression;
+ if (!doesComposedTextFit(truncationOptions.lineCountLimit, _tf.textLength, bpString))
{
_isTruncated = true;
var somethingFit:Boolean = false; // were we able to fit something?
@@ -331,7 +331,7 @@ package flashx.textLayout.factory
{
var truncateAtCharPosition:int;
- if (_tf.computedFormat.lineBreak == LineBreak.EXPLICIT || (bp == BlockProgression.TB ? measureWidth : measureHeight))
+ if (_tf.computedFormat.lineBreak == LineBreak.EXPLICIT || (bpString == BlockProgression.TB ? measureWidth : measureHeight))
{
// 3., 4. Initial truncation position: end of the last allowed line
var line:TextLine = _factoryComposer._lines[_truncationLineIndex] as TextLine;
@@ -340,7 +340,7 @@ package flashx.textLayout.factory
else
{
// 3. Calculate allowed width (width left over from the last line of the truncation indicator)
- var targetWidth:Number = (bp == BlockProgression.TB ? compositionBounds.width : compositionBounds.height);
+ var targetWidth:Number = (bpString == BlockProgression.TB ? compositionBounds.width : compositionBounds.height);
if (paragraphFormat)
{
targetWidth -= (Number(paragraphFormat.paragraphSpaceAfter) + Number(paragraphFormat.paragraphSpaceBefore));
@@ -375,7 +375,7 @@ package flashx.textLayout.factory
{
_tf.flowComposer.compose();
- if (doesComposedTextFit(truncationOptions.lineCountLimit, _tf.textLength, bp))
+ if (doesComposedTextFit(truncationOptions.lineCountLimit, _tf.textLength, bpString))
{
somethingFit = true;
break;
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3b7adac4/textLayout/src/flashx/textLayout/property/ArrayProperty.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/property/ArrayProperty.as b/textLayout/src/flashx/textLayout/property/ArrayProperty.as
index 090e892..b754074 100644
--- a/textLayout/src/flashx/textLayout/property/ArrayProperty.as
+++ b/textLayout/src/flashx/textLayout/property/ArrayProperty.as
@@ -145,12 +145,12 @@ package flashx.textLayout.property
var addComma:Boolean = false;
for each (var prop:Property in desc)
{
- var val:Object = member[prop.name];
- if (val != null)
+ var memberVal:Object = member[prop.name];
+ if (memberVal != null)
{
if (addComma)
rslt += ", ";
- rslt += prop.name + ":" + prop.toXMLString(val);
+ rslt += prop.name + ":" + prop.toXMLString(memberVal);
addComma = true;
}
}