Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-594

Changing text content of a flowPara result in NPE

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            cam Cameron McCormack
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: