Details
-
Bug
-
Status: Resolved
-
Resolution: Fixed
-
1.6
-
None
-
None
-
Description
Changing the text content of a flowPara causes an NPE when relaying out the text.
Steps to reproduce:
1. Open http://mcc.id.au/temp/2005/flowtext-change-bug.svg .
2. Click the black rect to change the flowPara's text content.
When the text is relaid out, the new ACI doesn't have the LINE_HEIGHT attribute
set, which causes the NPE. The attribute map returned by the getAttributeMap
call in SVGFlowRootBridge.fillAttributedStringBuffer does contain the attribute.
But by the end of the function, the AttributedStringBuffer does not contain the
attribute. I checked this with:
System.err.println("asb has LINE_HEIGHT " +
asb.toAttributedString().getIterator().getAttribute(org.apache.batik
.gvt.text.GVTAttributedCharacterIterator.TextAttribute.LINE_HEIGHT));
When the text is laid out the first time, on document load, this line does
report the expected line height.