DocxRenderer.java

1
package pro.verron.officestamper.utils.wml;
2
3
import jakarta.xml.bind.JAXBElement;
4
import org.docx4j.TextUtils;
5
import org.docx4j.dml.CTBlip;
6
import org.docx4j.dml.CTBlipFillProperties;
7
import org.docx4j.dml.Graphic;
8
import org.docx4j.dml.GraphicData;
9
import org.docx4j.dml.picture.Pic;
10
import org.docx4j.dml.wordprocessingDrawing.Inline;
11
import org.docx4j.mce.AlternateContent;
12
import org.docx4j.model.structure.HeaderFooterPolicy;
13
import org.docx4j.model.structure.SectionWrapper;
14
import org.docx4j.openpackaging.exceptions.Docx4JException;
15
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
16
import org.docx4j.openpackaging.parts.Part;
17
import org.docx4j.openpackaging.parts.WordprocessingML.*;
18
import org.docx4j.vml.CTShadow;
19
import org.docx4j.vml.CTShapetype;
20
import org.docx4j.vml.CTTextbox;
21
import org.docx4j.vml.VmlShapeElements;
22
import org.docx4j.wml.*;
23
import org.jspecify.annotations.NonNull;
24
import pro.verron.officestamper.utils.UtilsException;
25
26
import java.math.BigInteger;
27
import java.util.*;
28
import java.util.function.Function;
29
import java.util.stream.Stream;
30
31
import static java.util.Optional.*;
32
import static java.util.stream.Collectors.joining;
33
import static pro.verron.officestamper.utils.bit.ByteUtils.readableSize;
34
import static pro.verron.officestamper.utils.bit.ByteUtils.sha1b64;
35
36
/// A utility class for rendering DOCX documents into string representations. This class provides comprehensive
37
/// functionality to convert various DOCX elements including paragraphs, tables, images, headers, footers, and other
38
/// document components into human-readable string format for debugging, testing, or display purposes.
39
///
40
/// The renderer handles complex document structures and maintains relationships between different document elements
41
/// while providing meaningful string representations of the content.
42
///
43
/// @author Joseph Verron
44
/// @version ${version}
45
/// @since 1.6.5
46
public class DocxRenderer {
47
48
    private final StyleDefinitionsPart styleDefinitionsPart;
49
    private final WordprocessingMLPackage wmlPackage;
50
51
    private DocxRenderer(WordprocessingMLPackage wmlPackage) {
52
        this.wmlPackage = wmlPackage;
53
        var mainDocumentPart = wmlPackage.getMainDocumentPart();
54
        this.styleDefinitionsPart = mainDocumentPart.getStyleDefinitionsPart(true);
55
    }
56
57
    /// Converts a DOCX document represented by a [WordprocessingMLPackage] into its string representation. The method
58
    /// processes the main document content, headers, footers, footnotes, and endnotes (if present), and generates a
59
    /// unified string representation of the document.
60
    ///
61
    /// @param wordprocessingMLPackage the [WordprocessingMLPackage] instance representing the DOCX document to
62
    ///         be converted into a string; must not be null
63
    ///
64
    /// @return a string containing the text and structural elements of the provided DOCX document
65
    public static String docxToString(WordprocessingMLPackage wordprocessingMLPackage) {
66 1 1. docxToString : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::docxToString → NO_COVERAGE
        return new DocxRenderer(wordprocessingMLPackage).stringify(wordprocessingMLPackage);
67
    }
68
69
    private static String stringify(Map<String, String> map) {
70 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return map.entrySet()
71
                  .stream()
72 1 1. lambda$stringify$0 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$0 → NO_COVERAGE
                  .map(e -> "%s=%s".formatted(e.getKey(), e.getValue()))
73
                  .collect(joining(",", "{", "}"));
74
    }
75
76
    private static <T> Optional<String> stringify(List<T> list, Function<T, Optional<String>> stringify) {
77 1 1. stringify : negated conditional → NO_COVERAGE
        if (list == null) return empty();
78 1 1. stringify : negated conditional → NO_COVERAGE
        if (list.isEmpty()) return empty();
79 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return of(list.stream()
80
                      .map(stringify)
81
                      .flatMap(Optional::stream)
82
                      .collect(joining(",", "[", "]")));
83
    }
84
85
    private String stringify(WordprocessingMLPackage mlPackage) {
86
        var header = stringifyHeaders(getHeaderPart(mlPackage));
87
        var mainDocumentPart = mlPackage.getMainDocumentPart();
88
        var body = stringify(mainDocumentPart);
89
90
        var footer = stringifyFooters(getFooterPart(mlPackage));
91 1 1. lambda$stringify$1 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$1 → NO_COVERAGE
        var hStr = header.map("%s\n\n"::formatted)
92
                         .orElse("");
93 1 1. lambda$stringify$2 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$2 → NO_COVERAGE
        var fStr = footer.map("\n%s\n"::formatted)
94
                         .orElse("");
95
        var footnotesPart = mainDocumentPart.getFootnotesPart();
96
        var endnotesPart = mainDocumentPart.getEndNotesPart();
97 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return hStr + body + stringify(footnotesPart).orElse("") + stringify(endnotesPart).orElse("") + fStr;
98
    }
99
100
    private Optional<String> stringifyHeaders(Stream<HeaderPart> headerPart) {
101 1 1. stringifyHeaders : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringifyHeaders → NO_COVERAGE
        return headerPart.map(this::stringify)
102
                         .flatMap(Optional::stream)
103 1 1. lambda$stringifyHeaders$0 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringifyHeaders$0 → NO_COVERAGE
                         .reduce((a, b) -> a + "\n\n" + b);
104
    }
105
106
    private Stream<HeaderPart> getHeaderPart(WordprocessingMLPackage document) {
107
        var sections = document.getDocumentModel()
108
                               .getSections();
109
110
        var set = new LinkedHashSet<HeaderPart>();
111
        set.addAll(sections.stream()
112
                           .map(SectionWrapper::getHeaderFooterPolicy)
113
                           .map(HeaderFooterPolicy::getFirstHeader)
114
                           .filter(Objects::nonNull)
115
                           .toList());
116
        set.addAll(sections.stream()
117
                           .map(SectionWrapper::getHeaderFooterPolicy)
118
                           .map(HeaderFooterPolicy::getDefaultHeader)
119
                           .filter(Objects::nonNull)
120
                           .toList());
121
        set.addAll(sections.stream()
122
                           .map(SectionWrapper::getHeaderFooterPolicy)
123
                           .map(HeaderFooterPolicy::getEvenHeader)
124
                           .filter(Objects::nonNull)
125
                           .toList());
126
127 1 1. getHeaderPart : replaced return value with Stream.empty for pro/verron/officestamper/utils/wml/DocxRenderer::getHeaderPart → NO_COVERAGE
        return set.stream();
128
    }
129
130
    private Object stringify(MainDocumentPart mainDocumentPart) {
131 1 1. stringify : replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(mainDocumentPart.getContent(), mainDocumentPart);
132
    }
133
134
    private Optional<String> stringifyFooters(Stream<FooterPart> footerPart) {
135 1 1. stringifyFooters : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringifyFooters → NO_COVERAGE
        return footerPart.map(this::stringify)
136
                         .flatMap(Optional::stream)
137 1 1. lambda$stringifyFooters$0 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringifyFooters$0 → NO_COVERAGE
                         .reduce((a, b) -> a + "\n\n" + b);
138
    }
139
140
    private Stream<FooterPart> getFooterPart(WordprocessingMLPackage document) {
141
        var sections = document.getDocumentModel()
142
                               .getSections();
143
144
        var set = new LinkedHashSet<FooterPart>();
145
        set.addAll(sections.stream()
146
                           .map(SectionWrapper::getHeaderFooterPolicy)
147
                           .map(HeaderFooterPolicy::getFirstFooter)
148
                           .filter(Objects::nonNull)
149
                           .toList());
150
        set.addAll(sections.stream()
151
                           .map(SectionWrapper::getHeaderFooterPolicy)
152
                           .map(HeaderFooterPolicy::getDefaultFooter)
153
                           .filter(Objects::nonNull)
154
                           .toList());
155
        set.addAll(sections.stream()
156
                           .map(SectionWrapper::getHeaderFooterPolicy)
157
                           .map(HeaderFooterPolicy::getEvenFooter)
158
                           .filter(Objects::nonNull)
159
                           .toList());
160
161 1 1. getFooterPart : replaced return value with Stream.empty for pro/verron/officestamper/utils/wml/DocxRenderer::getFooterPart → NO_COVERAGE
        return set.stream();
162
    }
163
164
    private Optional<String> stringify(FootnotesPart footnotesPart) {
165 1 1. stringify : negated conditional → NO_COVERAGE
        if (footnotesPart == null) return Optional.empty();
166
        try {
167
            var list = footnotesPart.getContents()
168
                                    .getFootnote()
169
                                    .stream()
170 1 1. lambda$stringify$3 : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$3 → NO_COVERAGE
                                    .map(c -> stringify(c, footnotesPart))
171
                                    .flatMap(Optional::stream)
172
                                    .toList();
173 1 1. stringify : negated conditional → NO_COVERAGE
            if (list.isEmpty()) return Optional.empty();
174 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
            return Optional.of(list.stream()
175
                                   .collect(joining("\n", "[footnotes]\n---\n", "\n---\n")));
176
177
        } catch (Docx4JException e) {
178
            throw new UtilsException("Error processing footnotes", e);
179
        }
180
    }
181
182
    private Optional<String> stringify(EndnotesPart endnotesPart) {
183 1 1. stringify : negated conditional → NO_COVERAGE
        if (endnotesPart == null) return Optional.empty();
184
        try {
185
            var list = endnotesPart.getContents()
186
                                   .getEndnote()
187
                                   .stream()
188 1 1. lambda$stringify$4 : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$4 → NO_COVERAGE
                                   .map(c -> stringify(c, endnotesPart))
189
                                   .flatMap(Optional::stream)
190
                                   .toList();
191 1 1. stringify : negated conditional → NO_COVERAGE
            if (list.isEmpty()) return Optional.empty();
192 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
            return Optional.of(list.stream()
193
                                   .collect(joining("\n", "[endnotes]\n---\n", "\n---\n")));
194
        } catch (Docx4JException e) {
195
            throw new UtilsException("Error processing footnotes", e);
196
        }
197
    }
198
199
    private Optional<String> stringify(HeaderPart part) {
200
        var content = stringify(part.getContent(), part);
201 1 1. stringify : negated conditional → NO_COVERAGE
        if (content.isEmpty()) return empty();
202 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return of("""
203
                [header, name="%s"]
204
                ----
205
                %s
206
                ----""".formatted(part.getPartName(), content));
207
    }
208
209
    private String stringify(List<?> list, Part part) {
210 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return list.stream()
211 1 1. lambda$stringify$5 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$5 → NO_COVERAGE
                   .map(o -> stringify(o, part))
212
                   .collect(joining());
213
    }
214
215
    private Optional<String> stringify(FooterPart part) {
216
        var content = stringify(part.getContent(), part);
217 1 1. stringify : negated conditional → NO_COVERAGE
        if (content.isEmpty()) return empty();
218 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return of("""
219
                [footer, name="%s"]
220
                ----
221
                %s
222
                ----""".formatted(part.getPartName(), content));
223
    }
224
225
    private Optional<String> stringify(CTFtnEdn c, Part part) {
226
        var type = ofNullable(c.getType()).orElse(STFtnEdn.NORMAL);
227 1 1. stringify : negated conditional → NO_COVERAGE
        if (STFtnEdn.NORMAL != type) return Optional.empty();
228 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return Optional.of("[%s]%s".formatted(c.getId(), stringify(c.getContent(), part)));
229
    }
230
231
    /// Converts a [PPrBase.Spacing] object into an optional string representation. The method extracts and includes
232
    /// non-null spacing properties such as "after", "before", "beforeLines", "afterLines", "line", and "lineRule" in
233
    /// the resulting string. If all properties are null, the method returns an empty optional.
234
    ///
235
    /// @param spacing the [PPrBase.Spacing] object containing paragraph spacing properties; can be null
236
    ///
237
    /// @return an [Optional] containing the string representation of the spacing properties, or an empty optional if
238
    ///         the spacing object is null or contains no non-null properties
239
    private Optional<String> stringify(PPrBase.Spacing spacing) {
240 1 1. stringify : negated conditional → NO_COVERAGE
        if (spacing == null) return empty();
241
        var map = new TreeMap<String, String>();
242 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(spacing.getAfter()).ifPresent(value -> map.put("after", String.valueOf(value)));
243 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(spacing.getBefore()).ifPresent(value -> map.put("before", String.valueOf(value)));
244 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(spacing.getBeforeLines()).ifPresent(value -> map.put("beforeLines", String.valueOf(value)));
245 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(spacing.getAfterLines()).ifPresent(value -> map.put("afterLines", String.valueOf(value)));
246 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(spacing.getLine()).ifPresent(value -> map.put("line", String.valueOf(value)));
247 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(spacing.getLineRule()).ifPresent(value -> map.put("lineRule", value.value()));
248 2 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
249
    }
250
251
    private String stringify(Text text) {
252 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return TextUtils.getText(text);
253
    }
254
255
    private String styleID(String name) {
256 1 1. styleID : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::styleID → NO_COVERAGE
        return styleDefinitionsPart.getNameForStyleID(name);
257
    }
258
259
    private String stringify(Br br) {
260
        var type = br.getType();
261 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        if (type == STBrType.PAGE) return "\n[page-break]\n<<<\n";
262 2 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
        else if (type == STBrType.COLUMN) return "\n[col-break]\n<<<\n";
263 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        else if (type == STBrType.TEXT_WRAPPING) return "<br/>\n";
264 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        else if (type == null) return "<br/>\n";
265
        else throw new UtilsException("Unexpected type: " + type);
266
    }
267
268
    /// Converts the given [CTBlip] object into a formatted string representation. This method extracts image data
269
    /// associated with the blip, calculates its size, and generates a detailed string with metadata including the part
270
    /// name, embed identifier, content type, readable size, SHA-1 hash, and a custom value.
271
    ///
272
    /// @param blip the [CTBlip] object representing an embedded image for which the string representation is to
273
    ///         be generated.
274
    ///
275
    /// @return a formatted string containing metadata about the image extracted from the [CTBlip], including its size
276
    ///         and hash
277
    private String stringify(CTBlip blip, Part part) {
278
        var image = (BinaryPartAbstractImage) part.getRelationshipsPart()
279
                                                  .getPart(blip.getEmbed());
280
        byte[] imageBytes = image.getBytes();
281 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "%s:%s:%s:%s:sha1=%s:cy=$d".formatted(image.getPartName(),
282
                blip.getEmbed(),
283
                image.getContentType(),
284
                readableSize(imageBytes.length),
285
                sha1b64(imageBytes));
286
    }
287
288
    private String stringify(PPrBase.Ind ind) {
289 1 1. stringify : negated conditional → NO_COVERAGE
        if (ind == null) return "";
290
        var map = new TreeMap<String, String>();
291 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ind.getLeft()).ifPresent(value -> map.put("l", String.valueOf(value)));
292 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ind.getRight()).ifPresent(value -> map.put("r", String.valueOf(value)));
293 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ind.getFirstLine()).ifPresent(value -> map.put("fl", String.valueOf(value)));
294 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ind.getHanging()).ifPresent(value -> map.put("h", String.valueOf(value)));
295 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ind.getFirstLineChars()).ifPresent(value -> map.put("flc", String.valueOf(value)));
296
        // TODO: no getEnd() before version 11.5.6 of docx4j, add it to the Treemap stop supporting early versions
297
        // TODO: no getEndChars() before version 11.5.6 of docx4j, add it to the Treemap stop supporting early versions
298 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(map);
299
    }
300
301
    /// Converts the given object into its string representation based on its type. The method supports various object
302
    /// types and applies the appropriate logic to stringify the content. For unsupported object types, an exception is
303
    /// thrown.
304
    ///
305
    /// @param o the object to be converted into a string representation. It supports specific types including
306
    ///         JAXBElement, WordprocessingMLPackage, Tbl, Tr, Tc, MainDocumentPart, Body, List, Text, P, R, Drawing,
307
    ///         Inline, Graphic, and other types defined in the method. Passing null or unsupported types will result in
308
    ///         an exception.
309
    ///
310
    /// @return the string representation of the provided object. For some specific types like `R.LastRenderedPageBreak`
311
    ///         or `CTMarkupRange`, an empty string may be returned. For objects like `R.Tab` or `R.Cr`, specific
312
    ///         strings such as tab or carriage return characters may be returned. In case of unsupported types or null,
313
    ///         an exception is thrown.
314
    private String stringify(Object o, Part part) {
315 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return switch (o) {
316
            case JAXBElement<?> jaxb -> stringify(jaxb, part);
317
            case WordprocessingMLPackage mlPackage -> stringify(mlPackage);
318
            case Tbl tbl -> stringify(tbl, part);
319
            case Tr tr -> stringify(tr, part);
320
            case Tc tc -> stringify(tc, part);
321
            case MainDocumentPart mainDocumentPart -> stringify(mainDocumentPart.getContent(), mainDocumentPart);
322
            case Body body -> stringify(body.getContent(), part);
323
            case List<?> list -> stringify(list, part);
324
            case Text text -> stringify(text);
325
            case P p -> stringify(p, part);
326
            case R r -> stringify(r, part);
327
            case Drawing drawing -> stringify(drawing, part);
328
            case Inline inline -> stringify(inline, part);
329
            case Graphic graphic -> stringify(graphic, part);
330
            case GraphicData graphicData -> stringify(graphicData, part);
331
            case Pic pic -> stringify(pic, part);
332
            case CTBlipFillProperties bfp -> stringify(bfp, part);
333
            case CTBlip blip -> stringify(blip, part);
334
            case Br br -> stringify(br);
335
            case R.Tab _ -> "\t";
336
            case R.Cr _ -> "<carriage return>\n";
337
            case R.CommentReference cr -> stringify(cr);
338
            case CommentRangeStart crs -> stringify(crs);
339
            case CommentRangeEnd cre -> stringify(cre);
340
            case SdtBlock block -> stringify(block, part);
341
            case Pict pict -> stringify(pict.getAnyAndAny(), part);
342
            case CTShapetype _ -> "jsldkflksdhlkfhszdlkfnsdl";
343
            case VmlShapeElements vmlShapeElements -> stringify(vmlShapeElements, part);
344
            case CTTextbox ctTextbox -> stringify(ctTextbox.getTxbxContent(), part);
345
            case CTTxbxContent content -> stringify(content.getContent(), part);
346
            case SdtRun run -> stringify(run.getSdtContent(), part);
347
            case SdtContent content -> stringify(content, part);
348
            case CTFtnEdnRef ref -> "[%s]".formatted(ref.getId());
349
            case FootnotesPart footnotesPart -> stringify(footnotesPart).orElse("");
350
            case EndnotesPart endnotesPart -> stringify(endnotesPart).orElse("");
351
            case FldChar fldChar -> stringify(fldChar).orElse("");
352
            case P.Hyperlink hyperlink -> stringify(hyperlink, part).orElse("");
353
            case CTSmartTagRun smartTagRun -> stringify(smartTagRun, part);
354
            case CTAttr ctAttr -> stringify(ctAttr);
355 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
            case R.Separator _, R.ContinuationSeparator _ -> "\n";
356 8 1. stringify : negated conditional → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
3. stringify : negated conditional → NO_COVERAGE
4. stringify : negated conditional → NO_COVERAGE
5. stringify : negated conditional → NO_COVERAGE
6. stringify : negated conditional → NO_COVERAGE
7. stringify : negated conditional → NO_COVERAGE
8. stringify : negated conditional → NO_COVERAGE
            case AlternateContent _, R.LastRenderedPageBreak _, CTShadow _, CTMarkupRange _, ProofErr _,
357
                 R.AnnotationRef _, R.FootnoteRef _, R.EndnoteRef _ -> "";
358
            case null -> throw new RuntimeException("Unsupported content: NULL");
359
            default -> throw new RuntimeException("Unsupported content: " + o.getClass());
360
        };
361
    }
362
363
    private @NonNull String stringify(CTAttr ctAttr) {
364 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "%s:%s".formatted(ctAttr.getName(), ctAttr.getVal());
365
    }
366
367
    private @NonNull String stringify(CTSmartTagRun smartTagRun, Part part) {
368
        var smartTagPr = smartTagRun.getSmartTagPr();
369 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "<tag element=\"%s\" attr=\"%s\">%s<\\tag>".formatted(smartTagRun.getElement(),
370
                stringify(smartTagPr.getAttr(), part),
371
                stringify(smartTagRun.getContent(), part));
372
    }
373
374
    private String stringify(JAXBElement<?> element, Part part) {
375 1 1. stringify : negated conditional → NO_COVERAGE
        if (element == null) return "";
376
        var elementName = element.getName();
377
        var localPart = elementName.getLocalPart();
378 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        if (localPart.equals("instrText")) return "[instrText=" + stringify(element.getValue(), part) + "]";
379 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(element.getValue(), part);
380
    }
381
382
    private Optional<String> stringify(FldChar fldChar) {
383
        var fldData = fldChar.getFldData();
384 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return ofNullable(fldData).map(Text::getValue)
385 1 1. lambda$stringify$17 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$17 → NO_COVERAGE
                                  .map("[fldchar %s]"::formatted);
386
    }
387
388
    private Optional<String> stringify(P.Hyperlink hyperlink, Part part) {
389 1 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return of("[link data=%s]".formatted(stringify(hyperlink.getContent(), part)));
390
    }
391
392
    private String stringify(SdtBlock block, Part part) {
393 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(block.getSdtContent(), part) + "\n";
394
    }
395
396
    private String stringify(SdtContent content, Part part) {
397 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "[" + stringify(content.getContent(), part).trim() + "]";
398
    }
399
400
    private String stringify(VmlShapeElements vmlShapeElements, Part part) {
401 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "[" + stringify(vmlShapeElements.getEGShapeElements(), part).trim() + "]\n";
402
    }
403
404
    private String stringify(CommentRangeStart crs) {
405 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "<" + crs.getId() + "|";
406
    }
407
408
    private String stringify(CommentRangeEnd cre) {
409 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "|" + cre.getId() + ">";
410
    }
411
412
    private String stringify(Tc tc, Part part) {
413
        var content = stringify(tc.getContent(), part);
414 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "|%s\n".formatted(content.trim());
415
    }
416
417
    private String stringify(Tr tr, Part part) {
418
        var content = stringify(tr.getContent(), part);
419 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "%s\n".formatted(content);
420
    }
421
422
    private String stringify(Tbl tbl, Part part) {
423
        var content = stringify(tbl.getContent(), part);
424 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return ("|===\n%s\n|===\n").formatted(content);
425
    }
426
427
    private String stringify(Pic pic, Part part) {
428 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(pic.getBlipFill(), part);
429
    }
430
431
    private String stringify(CTBlipFillProperties blipFillProperties, Part part) {
432 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(blipFillProperties.getBlip(), part);
433
    }
434
435
    private String stringify(R.CommentReference commentReference) {
436
        var id = commentReference.getId();
437
        var stringifiedComment = stringifyComment(id);
438 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "<%s|%s>".formatted(id, stringifiedComment);
439
    }
440
441
    private String stringifyComment(BigInteger id) {
442 1 1. stringifyComment : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringifyComment → NO_COVERAGE
        return WmlUtils.findComment(wmlPackage, id)
443
                       .map(Comments.Comment::getContent)
444 1 1. lambda$stringifyComment$0 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringifyComment$0 → NO_COVERAGE
                       .map(l -> stringify(l, wmlPackage.getMainDocumentPart()))
445
                       .orElseThrow()
446
                       .strip();
447
    }
448
449
    private String stringify(GraphicData graphicData, Part part) {
450 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(graphicData.getPic(), part);
451
    }
452
453
    private String stringify(Graphic graphic, Part part) {
454 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(graphic.getGraphicData(), part);
455
    }
456
457
    private String stringify(Inline inline, Part part) {
458
        var graphic = inline.getGraphic();
459
        var extent = inline.getExtent();
460 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return "%s:%d".formatted(stringify(graphic, part), extent.getCx());
461
    }
462
463
    private String stringify(Drawing drawing, Part part) {
464 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return stringify(drawing.getAnchorOrInline(), part);
465
    }
466
467
    private Function<String, String> stringify(PPr pPr) {
468 2 1. stringify : replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
        if (pPr == null) return Function.identity();
469
        var set = new TreeMap<String, String>();
470 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getPStyle()).ifPresent(element -> set.put("pStyle", styleID(element.getVal())));
471 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getJc()).ifPresent(element -> set.put("jc",
472
                element.getVal()
473
                       .toString()));
474 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getInd()).ifPresent(element -> set.put("ind", stringify(element)));
475 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getKeepLines()).ifPresent(element -> set.put("keepLines", String.valueOf(element.isVal())));
476 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getKeepNext()).ifPresent(element -> set.put("keepNext", String.valueOf(element.isVal())));
477 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getOutlineLvl()).ifPresent(element -> set.put("outlineLvl",
478
                element.getVal()
479
                       .toString()));
480 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getPageBreakBefore()).ifPresent(element -> set.put("pageBreakBefore",
481
                String.valueOf(element.isVal())));
482 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getPBdr()).ifPresent(_ -> set.put("pBdr", "xxx"));
483 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getPPrChange()).ifPresent(_ -> set.put("pPrChange", "xxx"));
484 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(pPr.getRPr()).ifPresent(key -> set.put("rPr", key));
485 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(pPr.getSectPr()).ifPresent(key -> set.put("sectPr", key));
486 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getShd()).ifPresent(_ -> set.put("shd", "xxx"));
487 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(pPr.getSpacing()).ifPresent(spacing -> set.put("spacing", spacing));
488 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getSuppressAutoHyphens()).ifPresent(_ -> set.put("suppressAutoHyphens", "xxx"));
489 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getSuppressLineNumbers()).ifPresent(_ -> set.put("suppressLineNumbers", "xxx"));
490 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getSuppressOverlap()).ifPresent(_ -> set.put("suppressOverlap", "xxx"));
491 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getTabs()).ifPresent(_ -> set.put("tabs", "xxx"));
492 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getTextAlignment()).ifPresent(_ -> set.put("textAlignment", "xxx"));
493 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getTextDirection()).ifPresent(_ -> set.put("textDirection", "xxx"));
494 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getTopLinePunct()).ifPresent(_ -> set.put("topLinePunct", "xxx"));
495 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getWidowControl()).ifPresent(_ -> set.put("widowControl", "xxx"));
496 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getFramePr()).ifPresent(_ -> set.put("framePr", "xxx"));
497 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getWordWrap()).ifPresent(_ -> set.put("wordWrap", "xxx"));
498 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getDivId()).ifPresent(_ -> set.put("divId", "xxx"));
499 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pPr.getCnfStyle()).ifPresent(style -> set.put("cnfStyle", style.getVal()));
500 1 1. stringify : replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return set.entrySet()
501
                  .stream()
502 3 1. lambda$stringify$43 : negated conditional → NO_COVERAGE
2. lambda$stringify$43 : replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$43 → NO_COVERAGE
3. lambda$stringify$43 : negated conditional → NO_COVERAGE
                  .reduce(Function.identity(), (f, entry) -> switch (entry.getKey()) {
503
                      case "pStyle" -> f.compose(decorateWithStyle(entry.getValue()));
504 1 1. lambda$stringify$44 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$44 → NO_COVERAGE
                      case "sectPr" -> f.compose(str -> str + "\n[section-break, " + entry.getValue() + "]\n<<<");
505 1 1. lambda$stringify$45 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$45 → NO_COVERAGE
                      default -> f.andThen(s -> s + "<%s=%s>".formatted(entry.getKey(), entry.getValue()));
506
                  }, Function::andThen);
507
    }
508
509
    private String stringify(P p, Part part) {
510
        var runs = stringify(p.getContent(), part);
511
        var ppr = stringify(p.getPPr());
512 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return ppr.apply(runs) + "\n\n";
513
    }
514
515
    /// Converts the properties of the provided [RPrAbstract] object into a string representation. The method extracts
516
    /// various attributes of the [RPrAbstract] object, such as formatting, styling, and other properties, and maps them
517
    /// to a key-value representation. If no attributes are present or the provided object is null, an empty `Optional`
518
    /// is returned.
519
    ///
520
    /// @param rPr the [RPrAbstract] object containing formatting and style attributes; can be null
521
    ///
522
    /// @return an [Optional<String>] containing the string representation of the given attributes, or an empty
523
    ///         [Optional] if the input is null or no attributes are present
524
    private Optional<String> stringify(RPrAbstract rPr) {
525 1 1. stringify : negated conditional → NO_COVERAGE
        if (rPr == null) return empty();
526
        var map = new TreeMap<String, String>();
527 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getB()).ifPresent(value -> map.put("b", String.valueOf(value.isVal())));
528 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getBdr()).ifPresent(_ -> map.put("bdr", "xxx"));
529 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getCaps()).ifPresent(value -> map.put("caps", String.valueOf(value.isVal())));
530 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getColor()).ifPresent(value -> map.put("color", value.getVal()));
531 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getDstrike()).ifPresent(value -> map.put("dstrike", String.valueOf(value.isVal())));
532 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getI()).ifPresent(value -> map.put("i", String.valueOf(value.isVal())));
533 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getKern()).ifPresent(value -> map.put("kern", String.valueOf(value.getVal())));
534 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getLang()).ifPresent(value -> map.put("lang", value.getVal()));
535 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(rPr.getRFonts()).ifPresent(e -> map.put("rFont", e));
536 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getRStyle()).ifPresent(value -> map.put("rStyle", value.getVal()));
537 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getRtl()).ifPresent(value -> map.put("rtl", String.valueOf(value.isVal())));
538 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getShadow()).ifPresent(value -> map.put("shadow", String.valueOf(value.isVal())));
539 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getShd()).ifPresent(value -> map.put("shd", value.getColor()));
540 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getSmallCaps()).ifPresent(value -> map.put("smallCaps", String.valueOf(value.isVal())));
541 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getVertAlign()).ifPresent(value -> map.put("vertAlign",
542
                value.getVal()
543
                     .value()));
544 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getSpacing()).ifPresent(value -> map.put("spacing", String.valueOf(value.getVal())));
545 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getStrike()).ifPresent(value -> map.put("strike", String.valueOf(value.isVal())));
546 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getOutline()).ifPresent(value -> map.put("outline", String.valueOf(value.isVal())));
547 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getEmboss()).ifPresent(value -> map.put("emboss", String.valueOf(value.isVal())));
548 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getImprint()).ifPresent(value -> map.put("imprint", String.valueOf(value.isVal())));
549 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getNoProof()).ifPresent(value -> map.put("noProof", String.valueOf(value.isVal())));
550 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getSpecVanish()).ifPresent(value -> map.put("specVanish", String.valueOf(value.isVal())));
551 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getU()).ifPresent(value -> map.put("u",
552
                value.getVal()
553
                     .value()));
554 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getVanish()).ifPresent(value -> map.put("vanish", String.valueOf(value.isVal())));
555 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getW()).ifPresent(value -> map.put("w", String.valueOf(value.getVal())));
556 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getWebHidden()).ifPresent(value -> map.put("webHidden", String.valueOf(value.isVal())));
557 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getHighlight()).ifPresent(value -> map.put("highlight", value.getVal()));
558 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rPr.getEffect()).ifPresent(value -> map.put("effect",
559
                value.getVal()
560
                     .value()));
561 2 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
562
    }
563
564
    private Function<? super String, String> decorateWithStyle(String value) {
565 1 1. decorateWithStyle : replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::decorateWithStyle → NO_COVERAGE
        return switch (value) {
566 1 1. lambda$decorateWithStyle$0 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$0 → NO_COVERAGE
            case "Title" -> "= %s\n"::formatted;
567 1 1. lambda$decorateWithStyle$1 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$1 → NO_COVERAGE
            case "heading 1" -> "== %s\n"::formatted;
568 1 1. lambda$decorateWithStyle$2 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$2 → NO_COVERAGE
            case "heading 2" -> "=== %s\n"::formatted;
569 1 1. lambda$decorateWithStyle$3 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$3 → NO_COVERAGE
            case "heading 3" -> "==== %s\n"::formatted;
570 1 1. lambda$decorateWithStyle$4 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$4 → NO_COVERAGE
            case "heading 4" -> "===== %s\n"::formatted;
571 1 1. lambda$decorateWithStyle$5 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$5 → NO_COVERAGE
            case "heading 5" -> "====== %s\n"::formatted;
572 1 1. lambda$decorateWithStyle$6 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$6 → NO_COVERAGE
            case "heading 6" -> "======= %s\n"::formatted;
573 1 1. lambda$decorateWithStyle$7 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$7 → NO_COVERAGE
            case "caption" -> ".%s"::formatted;
574 1 1. lambda$decorateWithStyle$8 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$8 → NO_COVERAGE
            case "annotation text", "footnote text", "endnote text" -> string -> string;
575 1 1. lambda$decorateWithStyle$9 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$9 → NO_COVERAGE
            default -> "[%s] %%s".formatted(value)::formatted;
576
        };
577
    }
578
579
    private String stringify(R run, Part part) {
580
        String serialized = stringify(run.getContent(), part);
581 1 1. stringify : negated conditional → NO_COVERAGE
        if (serialized.isEmpty()) return "";
582 1 1. stringify : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return ofNullable(run.getRPr()).flatMap(this::stringify)
583 1 1. lambda$stringify$74 : replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$74 → NO_COVERAGE
                                       .map(rPr -> "❬%s❘%s❭".formatted(serialized, rPr))
584
                                       .orElse(serialized);
585
    }
586
587
    private Optional<String> stringify(RFonts rFonts) {
588 1 1. stringify : negated conditional → NO_COVERAGE
        if (rFonts == null) return empty();
589
        var map = new TreeMap<String, String>();
590 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getAscii()).ifPresent(value -> map.put("ascii", value));
591 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getHAnsi()).ifPresent(value -> map.put("hAnsi", value));
592 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getCs()).ifPresent(value -> map.put("cs", value));
593 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getEastAsia()).ifPresent(value -> map.put("eastAsia", value));
594 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getAsciiTheme()).ifPresent(value -> map.put("asciiTheme", value.value()));
595 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getHAnsiTheme()).ifPresent(value -> map.put("hAnsiTheme", value.value()));
596 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getCstheme()).ifPresent(value -> map.put("cstheme", value.value()));
597 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(rFonts.getEastAsiaTheme()).ifPresent(value -> map.put("eastAsiaTheme", value.value()));
598 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
599
    }
600
601
    private Optional<String> stringify(SectPr sectPr) {
602 1 1. stringify : negated conditional → NO_COVERAGE
        if (sectPr == null) return empty();
603
        var map = new TreeMap<String, String>();
604 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(sectPr.getEGHdrFtrReferences(), this::stringify).ifPresent(value -> map.put("eGHdrFtrReferences",
605
                value));
606 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(sectPr.getPgSz()).ifPresent(value -> map.put("pgSz", value));
607 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(sectPr.getPgMar()).ifPresent(value -> map.put("pgMar", value));
608 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getPaperSrc()).ifPresent(_ -> map.put("paperSrc", "xxx"));
609 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getBidi()).ifPresent(_ -> map.put("bidi", "xxx"));
610 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getRtlGutter()).ifPresent(_ -> map.put("rtlGutter", "xxx"));
611 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        stringify(sectPr.getDocGrid()).ifPresent(value -> map.put("docGrid", value));
612 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getFormProt()).ifPresent(_ -> map.put("formProt", "xxx"));
613 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getVAlign()).ifPresent(_ -> map.put("vAlign", "xxx"));
614 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getNoEndnote()).ifPresent(_ -> map.put("noEndnote", "xxx"));
615 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getTitlePg()).ifPresent(_ -> map.put("titlePg", "xxx"));
616 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getTextDirection()).ifPresent(_ -> map.put("textDirection", "xxx"));
617 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(sectPr.getRtlGutter()).ifPresent(_ -> map.put("rtlGutter", "xxx"));
618 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
619
    }
620
621
    private Optional<String> stringify(CTRel ctRel) {
622 1 1. stringify : negated conditional → NO_COVERAGE
        if (ctRel == null) return empty();
623
        var map = new TreeMap<String, String>();
624 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ctRel.getId()).ifPresent(value -> map.put("id", value));
625 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
626
    }
627
628
    private Optional<String> stringify(SectPr.PgSz pgSz) {
629 1 1. stringify : negated conditional → NO_COVERAGE
        if (pgSz == null) return empty();
630
        var map = new TreeMap<String, String>();
631 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgSz.getOrient()).ifPresent(value -> map.put("orient", String.valueOf(value)));
632 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgSz.getW()).ifPresent(value -> map.put("w", String.valueOf(value)));
633 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgSz.getH()).ifPresent(value -> map.put("h", String.valueOf(value)));
634 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgSz.getCode()).ifPresent(value -> map.put("code", String.valueOf(value)));
635 2 1. stringify : negated conditional → NO_COVERAGE
2. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
636
    }
637
638
    private Optional<String> stringify(SectPr.PgMar pgMar) {
639 1 1. stringify : negated conditional → NO_COVERAGE
        if (pgMar == null) return empty();
640
        var map = new TreeMap<String, String>();
641 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getHeader()).ifPresent(value -> map.put("header", String.valueOf(value)));
642 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getFooter()).ifPresent(value -> map.put("footer", String.valueOf(value)));
643 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getGutter()).ifPresent(value -> map.put("gutter", String.valueOf(value)));
644 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getTop()).ifPresent(value -> map.put("top", String.valueOf(value)));
645 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getLeft()).ifPresent(value -> map.put("left", String.valueOf(value)));
646 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getBottom()).ifPresent(value -> map.put("bottom", String.valueOf(value)));
647 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(pgMar.getRight()).ifPresent(value -> map.put("right", String.valueOf(value)));
648 2 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
649
    }
650
651
    private Optional<String> stringify(CTDocGrid ctDocGrid) {
652 1 1. stringify : negated conditional → NO_COVERAGE
        if (ctDocGrid == null) return empty();
653
        var map = new TreeMap<String, String>();
654 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ctDocGrid.getCharSpace()).ifPresent(value -> map.put("charSpace", String.valueOf(value)));
655 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ctDocGrid.getLinePitch()).ifPresent(value -> map.put("linePitch", String.valueOf(value)));
656 1 1. stringify : removed call to java/util/Optional::ifPresent → NO_COVERAGE
        ofNullable(ctDocGrid.getType()).ifPresent(value -> map.put("type", String.valueOf(value)));
657 2 1. stringify : replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE
2. stringify : negated conditional → NO_COVERAGE
        return map.isEmpty() ? empty() : of(stringify(map));
658
    }
659
}

Mutations

66

1.1
Location : docxToString
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::docxToString → NO_COVERAGE

70

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

72

1.1
Location : lambda$stringify$0
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$0 → NO_COVERAGE

77

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

78

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

79

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

91

1.1
Location : lambda$stringify$1
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$1 → NO_COVERAGE

93

1.1
Location : lambda$stringify$2
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$2 → NO_COVERAGE

97

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

101

1.1
Location : stringifyHeaders
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringifyHeaders → NO_COVERAGE

103

1.1
Location : lambda$stringifyHeaders$0
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringifyHeaders$0 → NO_COVERAGE

127

1.1
Location : getHeaderPart
Killed by : none
replaced return value with Stream.empty for pro/verron/officestamper/utils/wml/DocxRenderer::getHeaderPart → NO_COVERAGE

131

1.1
Location : stringify
Killed by : none
replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

135

1.1
Location : stringifyFooters
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringifyFooters → NO_COVERAGE

137

1.1
Location : lambda$stringifyFooters$0
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringifyFooters$0 → NO_COVERAGE

161

1.1
Location : getFooterPart
Killed by : none
replaced return value with Stream.empty for pro/verron/officestamper/utils/wml/DocxRenderer::getFooterPart → NO_COVERAGE

165

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

170

1.1
Location : lambda$stringify$3
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$3 → NO_COVERAGE

173

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

174

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

183

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

188

1.1
Location : lambda$stringify$4
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$4 → NO_COVERAGE

191

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

192

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

201

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

202

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

210

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

211

1.1
Location : lambda$stringify$5
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$5 → NO_COVERAGE

217

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

218

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

227

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

228

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

240

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

242

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

243

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

244

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

245

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

246

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

247

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

248

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

252

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

256

1.1
Location : styleID
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::styleID → NO_COVERAGE

261

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

262

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

263

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

264

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

281

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

289

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

291

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

292

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

293

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

294

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

295

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

298

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

315

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

355

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

356

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

7.7
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

8.8
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

364

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

369

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

375

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

378

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

379

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

384

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

385

1.1
Location : lambda$stringify$17
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$17 → NO_COVERAGE

389

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

393

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

397

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

401

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

405

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

409

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

414

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

419

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

424

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

428

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

432

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

438

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

442

1.1
Location : stringifyComment
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringifyComment → NO_COVERAGE

444

1.1
Location : lambda$stringifyComment$0
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringifyComment$0 → NO_COVERAGE

450

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

454

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

460

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

464

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

468

1.1
Location : stringify
Killed by : none
replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

470

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

471

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

474

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

475

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

476

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

477

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

480

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

482

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

483

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

484

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

485

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

486

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

487

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

488

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

489

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

490

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

491

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

492

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

493

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

494

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

495

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

496

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

497

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

498

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

499

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

500

1.1
Location : stringify
Killed by : none
replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

502

1.1
Location : lambda$stringify$43
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : lambda$stringify$43
Killed by : none
replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$43 → NO_COVERAGE

3.3
Location : lambda$stringify$43
Killed by : none
negated conditional → NO_COVERAGE

504

1.1
Location : lambda$stringify$44
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$44 → NO_COVERAGE

505

1.1
Location : lambda$stringify$45
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$45 → NO_COVERAGE

512

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

525

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

527

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

528

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

529

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

530

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

531

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

532

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

533

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

534

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

535

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

536

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

537

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

538

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

539

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

540

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

541

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

544

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

545

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

546

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

547

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

548

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

549

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

550

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

551

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

554

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

555

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

556

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

557

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

558

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

561

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

565

1.1
Location : decorateWithStyle
Killed by : none
replaced return value with null for pro/verron/officestamper/utils/wml/DocxRenderer::decorateWithStyle → NO_COVERAGE

566

1.1
Location : lambda$decorateWithStyle$0
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$0 → NO_COVERAGE

567

1.1
Location : lambda$decorateWithStyle$1
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$1 → NO_COVERAGE

568

1.1
Location : lambda$decorateWithStyle$2
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$2 → NO_COVERAGE

569

1.1
Location : lambda$decorateWithStyle$3
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$3 → NO_COVERAGE

570

1.1
Location : lambda$decorateWithStyle$4
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$4 → NO_COVERAGE

571

1.1
Location : lambda$decorateWithStyle$5
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$5 → NO_COVERAGE

572

1.1
Location : lambda$decorateWithStyle$6
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$6 → NO_COVERAGE

573

1.1
Location : lambda$decorateWithStyle$7
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$7 → NO_COVERAGE

574

1.1
Location : lambda$decorateWithStyle$8
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$8 → NO_COVERAGE

575

1.1
Location : lambda$decorateWithStyle$9
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$decorateWithStyle$9 → NO_COVERAGE

581

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

582

1.1
Location : stringify
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

583

1.1
Location : lambda$stringify$74
Killed by : none
replaced return value with "" for pro/verron/officestamper/utils/wml/DocxRenderer::lambda$stringify$74 → NO_COVERAGE

588

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

590

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

591

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

592

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

593

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

594

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

595

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

596

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

597

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

598

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

602

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

604

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

606

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

607

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

608

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

609

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

610

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

611

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

612

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

613

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

614

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

615

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

616

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

617

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

618

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

622

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

624

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

625

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

629

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

631

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

632

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

633

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

634

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

635

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

639

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

641

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

642

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

643

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

644

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

645

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

646

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

647

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

648

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

652

1.1
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

654

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

655

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

656

1.1
Location : stringify
Killed by : none
removed call to java/util/Optional::ifPresent → NO_COVERAGE

657

1.1
Location : stringify
Killed by : none
replaced return value with Optional.empty for pro/verron/officestamper/utils/wml/DocxRenderer::stringify → NO_COVERAGE

2.2
Location : stringify
Killed by : none
negated conditional → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.22.0