0 Replies Latest reply on Jun 1, 2009 11:15 PM by GordonSmith

    [svn:fx-trunk] 7480: When you set the 'text' property of RichText to a String that has line-ending sequences such as LF or CR+LF , a TextFlow with multiple paragraph is now produced as the 'content'.

    GordonSmith Level 4

      Revision: 7480

      Author:   gosmith@adobe.com

      Date:     2009-06-01 23:15:39 -0700 (Mon, 01 Jun 2009)

       

      Log Message:

      ***********

      When you set the 'text' property of RichText to a String that has line-ending sequences such as LF or CR+LF, a TextFlow with multiple paragraph is now produced as the 'content'. The splitting is done using TLF's importer for PLAIN_TEXT_FORMAT if the 'text' is found to contain \r or \n.

       

      Previously, all of the multi-line text got stuffed into one span in one paragraph. But when you have a large paragraph (i.e., a large TextBlock), FTE is slow to break the first TextLine because it analyzes all of the text first. And if the text has lots of CR+LF line endings, the current player is horribly slow because of excessive mem-copying as the two characters get replaced by one glyph.

       

      Furthermore, as Peter found, there is precedent for doing this: when you set the 'text' of TextField and get the 'htmlText', it splits the text into paragraphs.

       

      With this change, you can display a large line-oriented file like the 12000-line source for UIComponent (on Windows, which uses CR+LF) in a few seconds instead of many minutes.

       

      QE Notes: None

      Doc Notes: None

      Bugs: None

      Reviewer: Carol

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as