Repository: flex-tlf
Updated Branches:
  refs/heads/develop 7fe228452 -> 6d4fd303f


FLEX-35078 removing unused functions, local variables and inner classes while 
reading the code.


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

Branch: refs/heads/develop
Commit: 6d4fd303f4f2faa1b39f021f2603434bbe6aaf72
Parents: 7fe2284
Author: Mihai Chira <[email protected]>
Authored: Tue Dec 19 13:25:11 2017 +0100
Committer: Mihai Chira <[email protected]>
Committed: Tue Dec 19 13:25:11 2017 +0100

----------------------------------------------------------------------
 .../src/flashx/textLayout/edit/TextClipboard.as | 51 ++------------------
 1 file changed, 5 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/6d4fd303/textLayout/src/flashx/textLayout/edit/TextClipboard.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/edit/TextClipboard.as 
b/textLayout/src/flashx/textLayout/edit/TextClipboard.as
index 28b4acd..a5a5514 100644
--- a/textLayout/src/flashx/textLayout/edit/TextClipboard.as
+++ b/textLayout/src/flashx/textLayout/edit/TextClipboard.as
@@ -120,7 +120,7 @@ package flashx.textLayout.edit
                 * calling <code>setContents()</code>. In AIR, this restriction 
only applies to content outside of 
                 * the application security sandbox. </p>
                 * 
-                * @param scrap The TextScrap to paste into the clipboard.
+                * @param textScrap The TextScrap to paste into the clipboard.
                 * 
                 * @see flash.events.Event#COPY
                 * @see flash.events.Event#CUT
@@ -211,8 +211,7 @@ package flashx.textLayout.edit
                                var xmlTree:XML = new XML(textOnClipboard);
                                if (xmlTree.localName() == "TextScrap")
                                {               // read the old clipboard format
-                                       var beginArrayChild:XML = 
xmlTree..*::BeginMissingElements[0];
-                                       var endArrayChild:XML = 
xmlTree..*::EndMissingElements[0];
+                    var endArrayChild:XML = xmlTree..*::EndMissingElements[0];
                                        var textLayoutMarkup:XML = 
xmlTree..*::TextFlow[0];
                                        var textFlow:TextFlow = 
TextConverter.importToFlow(textLayoutMarkup, TextConverter.TEXT_LAYOUT_FORMAT);
                                        if (textFlow)
@@ -246,48 +245,10 @@ package flashx.textLayout.edit
                        }
                        return null;
                }
-               
-               private static function getBeginArray(beginArrayChild:XML, 
textFlow:TextFlow):Array
-               {
-                       var beginArray:Array = new Array();
-                       var curFlElement:FlowElement = textFlow;
-                       if (beginArrayChild != null)
-                       {
-                               var value:String = (beginArrayChild.@value != 
undefined) ? String(beginArrayChild.@value) : "";
-                               beginArray.push(textFlow);
-                               var posOfComma:int = value.indexOf(",");
-                               var startPos:int;
-                               var endPos:int;
-                               var curStr:String;
-                               var indexIntoFlowElement:int;
-                               while (posOfComma >= 0)
-                               {
-                                       startPos = posOfComma + 1;
-                                       posOfComma = value.indexOf(",", 
startPos);
-                                       if (posOfComma >= 0)
-                                       {
-                                               endPos = posOfComma;
-                                       } else {
-                                               endPos = value.length;
-                                       }
-                                       curStr = value.substring(startPos, 
endPos);
-                                       if (curStr.length > 0)
-                                       {
-                                               indexIntoFlowElement = 
parseInt(curStr);
-                                               if (curFlElement is 
FlowGroupElement)
-                                               {
-                                                       curFlElement = 
(curFlElement as FlowGroupElement).getChildAt(indexIntoFlowElement);
-                                                       
beginArray.push(curFlElement);
-                                               }
-                                       }
-                               }                               
-                       }
-                       return beginArray.reverse();
-               }
-               
+
                private static function getEndArray(endArrayChild:XML, 
textFlow:TextFlow):Array
                {
-                       var endArray:Array = new Array();
+                       var endArray:Array = [];
                        var curFlElement:FlowElement = textFlow;
                        if (endArrayChild != null)
                        {
@@ -325,6 +286,4 @@ package flashx.textLayout.edit
 
                
        } // end TextClipboard class
-}
-
-class TextClipboardSingletonEnforcer {}
+}
\ No newline at end of file

Reply via email to