Reverted a commit from Alex that was lost with the last merge.
Fixed line start index for TextFlowLine initialization
diff --git a/textLayout/src/flashx/textLayout/compose/BaseCompose.as b/textLayout/src/flashx/textLayout/compose/BaseCompose.as
index d1b675f..3ed8352 100644
--- a/textLayout/src/flashx/textLayout/compose/BaseCompose.as
+++ b/textLayout/src/flashx/textLayout/compose/BaseCompose.as
@@ -1390,8 +1390,6 @@
_curLine.initialize(_curParaElement, targetWidth, lineOffset-_parcelList.insideListItemMargin, _curLineStart, textLine.rawTextLength, textLine);
CONFIG::debug { assert(_curLine.targetWidth == targetWidth,"Bad targetWidth"); }
-
- _curLineStart += _curLine.textLength;
return textLine;
}
@@ -1415,6 +1413,7 @@
/** Called when we are finished composing a line, and it is committed. Handler for derived classes to override default behavior. */
protected function endLine(textLine:TextLine):void // No PMD
{
+ _curLineStart += _curLine.textLength;
_contentCommittedExtent = Math.max(_contentCommittedExtent, _workingContentExtent);
_contentCommittedHeight = Math.max(_contentCommittedHeight, _workingContentHeight);
_contentLogicalExtent = Math.max(_contentLogicalExtent, _workingContentLogicalExtent);
diff --git a/textLayout/src/flashx/textLayout/compose/ComposeState.as b/textLayout/src/flashx/textLayout/compose/ComposeState.as
index e170bae..171e1b6 100644
--- a/textLayout/src/flashx/textLayout/compose/ComposeState.as
+++ b/textLayout/src/flashx/textLayout/compose/ComposeState.as
@@ -347,11 +347,14 @@
var startCompose:int = _curElementStart + _curElementOffset - _curParaStart;
var line:TextFlowLine = _curLineIndex < _flowComposer.numLines ? (_flowComposer as StandardFlowComposer).lines[_curLineIndex] : null;
var useExistingLine:Boolean = line && (!line.isDamaged() || line.validity == FlowDamageType.GEOMETRY);
- // if the line ends with a hyphen, don't use existing line because the player seems to mis-handle
- // starting the next line.
- if (useExistingLine && line.textLength > 0 &&
- line.paragraph.getCharCodeAtPosition(line.absoluteStart + line.textLength - 1) == 0xAD)
- useExistingLine = false;
+ if (ContainerController.tlf_internal::usesDiscretionaryHyphens)
+ {
+ // if the line ends with a hyphen, don't use existing line because the player seems to mis-handle
+ // starting the next line.
+ if (useExistingLine && line.textLength > 0 &&
+ line.paragraph.getCharCodeAtPosition(line.absoluteStart + line.textLength - 1) == 0xAD)
+ useExistingLine = false;
+ }
var numberLine:TextLine;
// create numberLine if in a listElement