RemoveLang.java

1
package pro.verron.officestamper.preset.preprocessors.rmlang;
2
3
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
4
import org.docx4j.wml.ParaRPr;
5
import org.docx4j.wml.RPr;
6
import pro.verron.officestamper.api.PreProcessor;
7
8
import static pro.verron.officestamper.core.DocumentUtil.visitDocument;
9
10
public class RemoveLang
11
        implements PreProcessor {
12
13
    @Override
14
    public void process(WordprocessingMLPackage document) {
15
        var visitor = new RprLangVisitor();
16 1 1. process : removed call to pro/verron/officestamper/core/DocumentUtil::visitDocument → SURVIVED
        visitDocument(document, visitor);
17
        for (RPr rPr : visitor.getrPrs()) {
18 1 1. process : removed call to org/docx4j/wml/RPr::setLang → NO_COVERAGE
            rPr.setLang(null);
19
        }
20
        var visitor2 = new PprLangVisitor();
21 1 1. process : removed call to pro/verron/officestamper/core/DocumentUtil::visitDocument → KILLED
        visitDocument(document, visitor2);
22
        for (ParaRPr rPr : visitor2.getrPrs()) {
23 1 1. process : removed call to org/docx4j/wml/ParaRPr::setLang → KILLED
            rPr.setLang(null);
24
        }
25
    }
26
}

Mutations

16

1.1
Location : process
Killed by : none
removed call to pro/verron/officestamper/core/DocumentUtil::visitDocument → SURVIVED
Covering tests

18

1.1
Location : process
Killed by : none
removed call to org/docx4j/wml/RPr::setLang → NO_COVERAGE

21

1.1
Location : process
Killed by : pro.verron.officestamper.test.ConditionalDisplayTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ConditionalDisplayTest]/[test-template:conditionalDisplayOfEndnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
removed call to pro/verron/officestamper/core/DocumentUtil::visitDocument → KILLED

23

1.1
Location : process
Killed by : pro.verron.officestamper.test.ConditionalDisplayTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ConditionalDisplayTest]/[test-template:conditionalDisplayOfEndnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
removed call to org/docx4j/wml/ParaRPr::setLang → KILLED

Active mutators

Tests examined


Report generated by PIT 1.20.0