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 | /// A helper class that provides pre-processing functionality for WordprocessingMLPackage documents. | |
12 | public class Preprocessors { | |
13 | ||
14 | private Preprocessors() { | |
15 | throw new OfficeStamperException("Preprocessors cannot be instantiated"); | |
16 | } | |
17 | ||
18 | /// Returns a PreProcessor object that merges same style runs that are next to each other in a | |
19 | /// WordprocessingMLPackage document. | |
20 | /// | |
21 | /// @return a PreProcessor object that merges similar runs. | |
22 | public static PreProcessor mergeSimilarRuns() { | |
23 |
1
1. mergeSimilarRuns : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::mergeSimilarRuns → KILLED |
return new MergeSameStyleRuns(); |
24 | } | |
25 | ||
26 | /// Returns a PreProcessor object that removes all [ProofErr] elements from the WordprocessingMLPackage | |
27 | /// document. | |
28 | /// | |
29 | /// @return a PreProcessor object that removes ProofErr elements. | |
30 | public static PreProcessor removeLanguageProof() { | |
31 |
1
1. removeLanguageProof : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeLanguageProof → KILLED |
return new RemoveProofErrors(); |
32 | } | |
33 | ||
34 | /// Returns a PreProcessor object that removes all language informations such as grammatical and orthographics markers in a | |
35 | /// WordprocessingMLPackage document. | |
36 | /// | |
37 | /// @return a PreProcessor object that removes language markers. | |
38 | public static PreProcessor removeLanguageInfo() { | |
39 |
1
1. removeLanguageInfo : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeLanguageInfo → KILLED |
return new RemoveLang(); |
40 | } | |
41 | ||
42 | /// Returns a PreProcessor object that removes comments information that is not conforming to the expected patterns. | |
43 | /// | |
44 | /// @return a PreProcessor object that removes malformed comments markers. | |
45 | public static PreProcessor removeMalformedComments() { | |
46 |
1
1. removeMalformedComments : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeMalformedComments → KILLED |
return new RemoveMalformedComments(); |
47 | } | |
48 | } | |
Mutations | ||
23 |
1.1 |
|
31 |
1.1 |
|
39 |
1.1 |
|
46 |
1.1 |