Skip to content

Incorrect behavior of OdfElement.getTextContent() #229

Open
@ttaomae

Description

@ttaomae

While investigating #220, I came across OdfTableCell.getOdfElement().getTextContent(), which is defined by org.w3c.dom.Node.getTextContent() and implemented in OdfElement. My interpretation of the Node.getTextContent() documentation is that it should recursively retrieve the text contents of all child nodes and concatenate them together. However, the OdfElement implementation only looks at the children, rather than all descendants.

I think it is also worth noting that OdfWhitespaceParser.getText(Node) appears to do what OdfElement.getTextContent() is supposed to do. Or at least something very similar.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions