You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2014/11/03 21:51:01 UTC
[19/44] git commit: [flex-tlf] [refs/heads/tables] - FLEX-34592:
Can't use optionnal importer for TLF plainTextFormat and TextLayoutFormat
FLEX-34592: Can't use optionnal importer for TLF plainTextFormat and TextLayoutFormat
Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/486ebe3a
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/486ebe3a
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/486ebe3a
Branch: refs/heads/tables
Commit: 486ebe3a7393991ce5fe68e633949e0d478cbe35
Parents: cb9abbb
Author: Frederic THOMAS <we...@gmail.com>
Authored: Sat Oct 18 13:41:03 2014 +0200
Committer: Frederic THOMAS <we...@gmail.com>
Committed: Sat Oct 18 13:41:03 2014 +0200
----------------------------------------------------------------------
.../src/flashx/textLayout/edit/TextClipboard.as | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/486ebe3a/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 a9f4f19..405de63 100644
--- a/textLayout/src/flashx/textLayout/edit/TextClipboard.as
+++ b/textLayout/src/flashx/textLayout/edit/TextClipboard.as
@@ -175,14 +175,15 @@ package flashx.textLayout.edit
{
importer.useClipboardAnnotations = true;
var textFlow:TextFlow = importer.importToFlow(textOnClipboard);
- if (textFlow)
+ if (textFlow) {
textScrap = new TextScrap(textFlow);
-
- /** Hint to the scrap about whether text is plain or formatted. If not set, scrap will inspect text for attributes. */
- if (format == TextConverter.PLAIN_TEXT_FORMAT && textScrap)
- textScrap.setPlainText(true);
- else if (format == TextConverter.TEXT_LAYOUT_FORMAT && textScrap)
- textScrap.setPlainText(false);
+
+ /** Hint to the scrap about whether text is plain or formatted. If not set, scrap will inspect text for attributes. */
+ if (format == TextConverter.PLAIN_TEXT_FORMAT)
+ textScrap.setPlainText(true);
+ else if (format == TextConverter.TEXT_LAYOUT_FORMAT)
+ textScrap.setPlainText(false);
+ }
// Backwards compatibility: check for older scrap format
if (!textScrap && format == TextConverter.TEXT_LAYOUT_FORMAT)