You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2015/12/14 10:42:47 UTC
git commit: [flex-tlf] [refs/heads/develop] - Fixed getText() to be
more technically correct.
Repository: flex-tlf
Updated Branches:
refs/heads/develop d452c49ab -> 3c68f9128
Fixed getText() to be more technically correct.
Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/3c68f912
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/3c68f912
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/3c68f912
Branch: refs/heads/develop
Commit: 3c68f9128e4dc8a7bde26795e55a43f26b7e73a1
Parents: d452c49
Author: Harbs <ha...@in-tools.com>
Authored: Mon Dec 14 11:42:43 2015 +0200
Committer: Harbs <ha...@in-tools.com>
Committed: Mon Dec 14 11:42:43 2015 +0200
----------------------------------------------------------------------
.../src/flashx/textLayout/elements/InlineGraphicElement.as | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/3c68f912/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
----------------------------------------------------------------------
diff --git a/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as b/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
index 5454867..3df5646 100644
--- a/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
+++ b/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as
@@ -383,7 +383,12 @@ package flashx.textLayout.elements
*/
public override function getText(relativeStart:int=0, relativeEnd:int=-1, paragraphSeparator:String="\n"):String
{
- return String.fromCharCode(0xFDEF);
+ if(relativeEnd == -1)
+ relativeEnd = textLength;
+
+ // We could probably just return _text (U+FDEF), but this allows clients to change _text to some other value
+ // and getText() will still work. (Of course, I cannot think of a reason you'd want to do that...)
+ return _text ? _text.substring(relativeStart, relativeEnd) : "";
}
private function changeGraphicStatus(stat:Object):void