| 1 | package pro.verron.officestamper.preset.preprocessors.rmlang; | |
| 2 | ||
| 3 | import org.docx4j.utils.TraversalUtilVisitor; | |
| 4 | import org.docx4j.wml.P; | |
| 5 | import org.docx4j.wml.ParaRPr; | |
| 6 | ||
| 7 | import java.util.ArrayList; | |
| 8 | import java.util.List; | |
| 9 | ||
| 10 | public class PprLangVisitor | |
| 11 | extends TraversalUtilVisitor<P> { | |
| 12 | private final List<ParaRPr> paraRPrs = new ArrayList<>(); | |
| 13 | ||
| 14 | @Override | |
| 15 | public void apply(P element, Object parent1, List<Object> siblings) { | |
| 16 | var elementPPr = element.getPPr(); | |
| 17 |
1
1. apply : negated conditional → KILLED |
if (elementPPr == null) return; |
| 18 | var elementRPr = elementPPr.getRPr(); | |
| 19 |
1
1. apply : negated conditional → TIMED_OUT |
if (elementRPr == null) return; |
| 20 | var elementLang = elementRPr.getLang(); | |
| 21 |
1
1. apply : negated conditional → KILLED |
if (elementLang == null) return; |
| 22 | paraRPrs.add(elementRPr); | |
| 23 | } | |
| 24 | ||
| 25 | public List<ParaRPr> getParaPrs() { | |
| 26 |
1
1. getParaPrs : replaced return value with Collections.emptyList for pro/verron/officestamper/preset/preprocessors/rmlang/PprLangVisitor::getParaPrs → TIMED_OUT |
return paraRPrs; |
| 27 | } | |
| 28 | } | |
Mutations | ||
| 17 |
1.1 |
|
| 19 |
1.1 |
|
| 21 |
1.1 |
|
| 26 |
1.1 |