docx4j icon indicating copy to clipboard operation
docx4j copied to clipboard

Refactor field instruction handling

Open plutext opened this issue 3 months ago • 0 comments

org.docx4j.model.fields.FieldRef.getInstructions() returns a list of the content between the w:fldChar begin and separate elements; in the simplest case, this will be a single w:instrText object; in a more general case of nested fields it will be a mixture of w:instrText and FieldRef objects.

Calling classes then typically contain a method which extracts the instruction from this list.

Code should be refactored to do this once, possibly in FieldRef.

plutext avatar Sep 25 '25 01:09 plutext