1 | package pro.verron.officestamper.preset; | |
2 | ||
3 | import org.docx4j.wml.ProofErr; | |
4 | import pro.verron.officestamper.api.OfficeStamperException; | |
5 | import pro.verron.officestamper.api.PreProcessor; | |
6 | import pro.verron.officestamper.preset.preprocessors.malformedcomments.RemoveMalformedComments; | |
7 | import pro.verron.officestamper.preset.preprocessors.prooferror.RemoveProofErrors; | |
8 | import pro.verron.officestamper.preset.preprocessors.rmlang.RemoveLang; | |
9 | import pro.verron.officestamper.preset.preprocessors.similarrun.MergeSameStyleRuns; | |
10 | ||
11 | /** | |
12 | * A helper class that provides pre-processing functionality for WordprocessingMLPackage documents. | |
13 | */ | |
14 | public class Preprocessors { | |
15 | ||
16 | private Preprocessors() { | |
17 | throw new OfficeStamperException("Preprocessors cannot be instantiated"); | |
18 | } | |
19 | ||
20 | /** | |
21 | * Returns a PreProcessor object that merges same style runs that are next to each other in a | |
22 | * WordprocessingMLPackage document. | |
23 | * | |
24 | * @return a PreProcessor object that merges similar runs. | |
25 | */ | |
26 | public static PreProcessor mergeSimilarRuns() { | |
27 |
1
1. mergeSimilarRuns : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::mergeSimilarRuns → KILLED |
return new MergeSameStyleRuns(); |
28 | } | |
29 | ||
30 | /** | |
31 | * Returns a PreProcessor object that removes all {@link ProofErr} elements from the WordprocessingMLPackage | |
32 | * document. | |
33 | * | |
34 | * @return a PreProcessor object that removes ProofErr elements. | |
35 | */ | |
36 | public static PreProcessor removeLanguageProof() { | |
37 |
1
1. removeLanguageProof : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeLanguageProof → KILLED |
return new RemoveProofErrors(); |
38 | } | |
39 | ||
40 | public static PreProcessor removeLanguageInfo() { | |
41 |
1
1. removeLanguageInfo : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeLanguageInfo → KILLED |
return new RemoveLang(); |
42 | } | |
43 | ||
44 | public static PreProcessor removeMalformedComments() { | |
45 |
1
1. removeMalformedComments : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeMalformedComments → KILLED |
return new RemoveMalformedComments(); |
46 | } | |
47 | } | |
Mutations | ||
27 |
1.1 |
|
37 |
1.1 |
|
41 |
1.1 |
|
45 |
1.1 |