Fixed some "Warning: variable definition duplicates function parameter" issues that...
authorErik de Bruin <erik@ixsoftware.nl>
Fri, 13 Sep 2013 09:26:55 +0000 (11:26 +0200)
committerErik de Bruin <erik@ixsoftware.nl>
Fri, 13 Sep 2013 09:26:55 +0000 (11:26 +0200)
Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>
textLayout/src/flashx/textLayout/compose/TextFlowLine.as
textLayout/src/flashx/textLayout/edit/ParaEdit.as
textLayout/src/flashx/textLayout/elements/FlowGroupElement.as
textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as
textLayout/src/flashx/textLayout/property/ArrayProperty.as

index 0fe938c..11b8511 100644 (file)
@@ -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)
                        {
index e4972f1..974eba2 100644 (file)
@@ -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++;
                                }
                        }
                }
index 1682720..b02a22d 100644 (file)
@@ -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();
                }
        
                /**
index c8731a3..355e6c5 100644 (file)
@@ -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; 
index 090e892..b754074 100644 (file)
@@ -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;
                                        }
                                }