| 1 | package pro.verron.officestamper.preset.preprocessors.prooferror; | |
| 2 | ||
| 3 | import org.docx4j.utils.TraversalUtilVisitor; | |
| 4 | import org.docx4j.wml.ProofErr; | |
| 5 | ||
| 6 | import java.util.ArrayList; | |
| 7 | import java.util.List; | |
| 8 | ||
| 9 | /// A visitor implementation for traversing and collecting [ProofErr] elements in a DOCX document. This class extends | |
| 10 | /// [TraversalUtilVisitor] to visit all [ProofErr] elements (proofing errors) in the document structure and maintains a | |
| 11 | /// collection of encountered elements. | |
| 12 | public class ProofErrVisitor | |
| 13 | extends TraversalUtilVisitor<ProofErr> { | |
| 14 | private final List<ProofErr> proofErrs = new ArrayList<>(); | |
| 15 | ||
| 16 | @Override | |
| 17 | public void apply(ProofErr element, Object parent1, List<Object> siblings) { | |
| 18 | proofErrs.add(element); | |
| 19 | } | |
| 20 | ||
| 21 | ||
| 22 | /// Returns the list of collected [ProofErr] elements. | |
| 23 | /// | |
| 24 | /// @return a list of [ProofErr] objects that were encountered during traversal | |
| 25 | public List<ProofErr> getProofErrs() { | |
| 26 |
1
1. getProofErrs : replaced return value with Collections.emptyList for pro/verron/officestamper/preset/preprocessors/prooferror/ProofErrVisitor::getProofErrs → TIMED_OUT |
return proofErrs; |
| 27 | } | |
| 28 | } | |
Mutations | ||
| 26 |
1.1 |