         
     //--------------------------------------------------------------------------
     //
-    //  Class constants
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  An Array of the names of all text attributes, in no particular order.
-     */
-    private static var ALL_ATTRIBUTE_NAMES:Array = [];
-
-    /**
-     *  @private
-     *  Maps the name of a text attribute to what kind of attribute it is.
-     *  For example,
-     *  paddingLeft -> container
-     *  marginLeft -> paragraph
-     *  fontSize -> character
-     */
-    private static var ATTRIBUTE_MAP:Object = {};
-    
-    /**
-     *  @private
-     */
-    private static const CONTAINER:String = "container";
-    
-    /**
-     *  @private
-     */
-    private static const PARAGRAPH:String = "paragraph";
-
-    /**
-     *  @private
-     */
-    private static const CHARACTER:String = "character";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class initialization
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Initializes the ATTRIBUTE_MAP by using describeType()
-     *  to enumerate the properties of the IContainerAttribues,
-     *  IParagraphAttributes, and ICharacterAttributes interfaces.
-     */
-    private static function initClass():void
-    {
-        var type:XML;
-        var name:String;
-
-        type = describeType(IContainerAttributes);
-        for each (name in type.factory.accessor.@name)
-        {
-            ALL_ATTRIBUTE_NAMES.push(name);
-            ATTRIBUTE_MAP[name] = CONTAINER;
-        }
-        
-        type = describeType(IParagraphAttributes);
-        for each (name in type.factory.accessor.@name)
-        {
-            ALL_ATTRIBUTE_NAMES.push(name);
-            ATTRIBUTE_MAP[name] = PARAGRAPH;
-        }
-       
-        type = describeType(ICharacterAttributes);
-        for each (name in type.factory.accessor.@name)
-        {
-            ALL_ATTRIBUTE_NAMES.push(name);
-            ATTRIBUTE_MAP[name] = CHARACTER;
-        }
-    }
-
-    initClass();
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private static function extractText(textFlow:TextFlow):String
-    {
-        var text:String = "";
-        
-        var leaf:LeafElement = textFlow.getFirstLeaf();
-        while (leaf)
-        {
-            var p:Paragraph = leaf.getParagraph();
-            for (;;)
-            {
-                text += leaf.text;
-                leaf = leaf.getNextLeaf(p);
-                if (!leaf)
-                    break;
-            }
-            leaf = p.getLastLeaf().getNextLeaf(null);
-            if (leaf)
-                text += "\n";
-        }
-
-        return text;
-    }
-
-    //--------------------------------------------------------------------------
-    //
     //  Constructor
     //
     //--------------------------------------------------------------------------

    {
        if (textInvalid)
        {
            _text = extractText(textFlow);
            textInvalid = false;
        }



        if (!names)
        {
            names = TextUtil.ALL_ATTRIBUTE_NAMES;
            
            needContainerAttributes = true;
            needParagraphAttributes = true;
