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
Covered by tests:
- pro.verron.officestamper.test.SpelInstantiationTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.SpelInstantiationTest]/[test-template:testDateInstantiationAndResolution(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[method:test64()]
- pro.verron.officestamper.test.SpelInstantiationTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.SpelInstantiationTest]/[test-template:testDateInstantiationAndResolution(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#28]
- pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#10]
- pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#20]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#3]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#7]
- 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]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#5]
- 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:#2]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#6]
- pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#4]
- pro.verron.officestamper.test.ConditionalDisplayTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ConditionalDisplayTest]/[test-template:conditionalDisplayOfFootnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#2]
- pro.verron.officestamper.test.BasicWordTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.BasicWordTest]/[method:testStamper()]
- pro.verron.officestamper.test.ConditionalDisplayTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ConditionalDisplayTest]/[test-template:conditionalDisplayOfFootnotes(pro.verron.officestamper.test.ContextFactory)]/[test-template-invocation:#1]
- pro.verron.officestamper.test.RepeatDocPartTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RepeatDocPartTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#12]
- pro.verron.officestamper.test.RepeatDocPartTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RepeatDocPartTest]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#4]
|
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
|