HTMLWorker.java

1
/*
2
 * Copyright 2004 Paulo Soares
3
 *
4
 * The contents of this file are subject to the Mozilla Public License Version 1.1
5
 * (the "License"); you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7
 *
8
 * Software distributed under the License is distributed on an "AS IS" basis,
9
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10
 * for the specific language governing rights and limitations under the License.
11
 *
12
 * The Original Code is 'iText, a free JAVA-PDF library'.
13
 *
14
 * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15
 * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16
 * All Rights Reserved.
17
 * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18
 * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19
 *
20
 * Contributor(s): all the names of the contributors are added in the source code
21
 * where applicable.
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of the
24
 * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25
 * provisions of LGPL are applicable instead of those above.  If you wish to
26
 * allow use of your version of this file only under the terms of the LGPL
27
 * License and not to allow others to use your version of this file under
28
 * the MPL, indicate your decision by deleting the provisions above and
29
 * replace them with the notice and other provisions required by the LGPL.
30
 * If you do not delete the provisions above, a recipient may use your version
31
 * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32
 *
33
 * This library is free software; you can redistribute it and/or modify it
34
 * under the terms of the MPL as stated above or under the terms of the GNU
35
 * Library General Public License as published by the Free Software Foundation;
36
 * either version 2 of the License, or any later version.
37
 *
38
 * This library is distributed in the hope that it will be useful, but WITHOUT
39
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40
 * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41
 * details.
42
 *
43
 * Contributions by:
44
 * Lubos Strapko
45
 * 
46
 * If you didn't download this code from the following link, you should check if
47
 * you aren't using an obsolete version:
48
 * http://www.lowagie.com/iText/
49
 */
50
51
package com.lowagie.text.html.simpleparser;
52
53
import java.io.File;
54
import java.io.IOException;
55
import java.io.Reader;
56
import java.util.*;
57
58
import com.lowagie.text.ExceptionConverter;
59
import com.lowagie.text.html.HtmlTags;
60
import com.lowagie.text.html.Markup;
61
import com.lowagie.text.Chunk;
62
import com.lowagie.text.DocListener;
63
import com.lowagie.text.DocumentException;
64
import com.lowagie.text.Element;
65
import com.lowagie.text.ElementTags;
66
67
import com.lowagie.text.HeaderFooter;
68
import com.lowagie.text.Image;
69
import com.lowagie.text.ListItem;
70
import com.lowagie.text.Paragraph;
71
import com.lowagie.text.Phrase;
72
import com.lowagie.text.Rectangle;
73
import com.lowagie.text.TextElementArray;
74
import com.lowagie.text.pdf.PdfPTable;
75
import com.lowagie.text.pdf.draw.LineSeparator;
76
import com.lowagie.text.FontProvider;
77
import com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler;
78
import com.lowagie.text.xml.simpleparser.SimpleXMLParser;
79
80
public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
81
82
    protected ArrayList objectList;
83
84
    protected DocListener document;
85
86
    private Paragraph currentParagraph;
87
88
    private ChainedProperties cprops = new ChainedProperties();
89
90
    private Stack stack = new Stack();
91
92
    private boolean pendingTR = false;
93
94
    private boolean pendingTD = false;
95
96
    private boolean pendingLI = false;
97
98
    private StyleSheet style = new StyleSheet();
99
100
    private boolean isPRE = false;
101
102
    private Stack tableState = new Stack();
103
104
    private boolean skipText = false;
105
106
    private HashMap interfaceProps;
107
108
    private FactoryProperties factoryProperties = new FactoryProperties();
109
110
    /** Creates a new instance of HTMLWorker
111
     * @param document A class that implements <CODE>DocListener</CODE>
112
     * */
113
    public HTMLWorker(DocListener document) {
114
        this.document = document;
115
    }
116
117
    public void setStyleSheet(StyleSheet style) {
118
        this.style = style;
119
    }
120
121
    public StyleSheet getStyleSheet() {
122
        return style;
123
    }
124
125
    public void setInterfaceProps(HashMap interfaceProps) {
126
        this.interfaceProps = interfaceProps;
127
        FontProvider ff = null;
128 1 1. setInterfaceProps : negated conditional → NO_COVERAGE
        if (interfaceProps != null)
129
            ff = (FontProvider) interfaceProps.get("font_factory");
130 1 1. setInterfaceProps : negated conditional → NO_COVERAGE
        if (ff != null)
131 1 1. setInterfaceProps : removed call to com/lowagie/text/html/simpleparser/FactoryProperties::setFontImp → NO_COVERAGE
            factoryProperties.setFontImp(ff);
132
    }
133
134
    public HashMap getInterfaceProps() {
135
        return interfaceProps;
136
    }
137
138
    public void parse(Reader reader) throws IOException {
139 1 1. parse : removed call to com/lowagie/text/xml/simpleparser/SimpleXMLParser::parse → NO_COVERAGE
        SimpleXMLParser.parse(this, null, reader, true);
140
    }
141
142
    public static ArrayList parseToList(Reader reader, StyleSheet style)
143
            throws IOException {
144 1 1. parseToList : mutated return of Object value for com/lowagie/text/html/simpleparser/HTMLWorker::parseToList to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return parseToList(reader, style, null);
145
    }
146
147
    public static ArrayList parseToList(Reader reader, StyleSheet style,
148
            HashMap interfaceProps) throws IOException {
149
        HTMLWorker worker = new HTMLWorker(null);
150 1 1. parseToList : negated conditional → NO_COVERAGE
        if (style != null)
151
            worker.style = style;
152
        worker.document = worker;
153 1 1. parseToList : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::setInterfaceProps → NO_COVERAGE
        worker.setInterfaceProps(interfaceProps);
154
        worker.objectList = new ArrayList();
155 1 1. parseToList : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::parse → NO_COVERAGE
        worker.parse(reader);
156 1 1. parseToList : mutated return of Object value for com/lowagie/text/html/simpleparser/HTMLWorker::parseToList to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return worker.objectList;
157
    }
158
159
    public void endDocument() {
160
        try {
161 2 1. endDocument : changed conditional boundary → NO_COVERAGE
2. endDocument : negated conditional → NO_COVERAGE
            for (int k = 0; k < stack.size(); ++k)
162
                document.add((Element) stack.elementAt(k));
163 1 1. endDocument : negated conditional → NO_COVERAGE
            if (currentParagraph != null)
164
                document.add(currentParagraph);
165
            currentParagraph = null;
166
        } catch (Exception e) {
167
            throw new ExceptionConverter(e);
168
        }
169
    }
170
171
    public void startDocument() {
172
        Map<String, String> h = new HashMap<>();
173 1 1. startDocument : removed call to com/lowagie/text/html/simpleparser/StyleSheet::applyStyle → NO_COVERAGE
        style.applyStyle("body", h);
174 1 1. startDocument : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
        cprops.addToChain("body", h);
175
    }
176
177
    public void startElement(String tag, Map<String, String> h) {
178 1 1. startElement : negated conditional → NO_COVERAGE
        if (!tagsSupported.containsKey(tag))
179
            return;
180
        try {
181 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/StyleSheet::applyStyle → NO_COVERAGE
            style.applyStyle(tag, h);
182
            String follow = (String) FactoryProperties.followTags.get(tag);
183 1 1. startElement : negated conditional → NO_COVERAGE
            if (follow != null) {
184
                Map<String, String> prop = new HashMap<>();
185
                prop.put(follow, null);
186 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(follow, prop);
187
                return;
188
            }
189 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/FactoryProperties::insertStyle → NO_COVERAGE
            FactoryProperties.insertStyle(h, cprops);
190 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.ANCHOR)) {
191 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
192 1 1. startElement : negated conditional → NO_COVERAGE
                if (currentParagraph == null) {
193
                    currentParagraph = new Paragraph();
194
                }
195
                stack.push(currentParagraph);
196
                currentParagraph = new Paragraph();
197
                return;
198
            }
199 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.NEWLINE)) {
200 1 1. startElement : negated conditional → NO_COVERAGE
                if (currentParagraph == null) {
201
                    currentParagraph = new Paragraph();
202
                }
203
                currentParagraph.add(factoryProperties
204
                        .createChunk("\n", cprops));
205
                return;
206
            }
207 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.HORIZONTALRULE)) {
208
                // Attempting to duplicate the behavior seen on Firefox with
209
                // http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_hr_test
210
                // where an initial break is only inserted when the preceding element doesn't
211
                // end with a break, but a trailing break is always inserted.
212
                boolean addLeadingBreak = true;
213 1 1. startElement : negated conditional → NO_COVERAGE
                if (currentParagraph == null) {
214
                    currentParagraph = new Paragraph();
215
                    addLeadingBreak = false;
216
                }
217 1 1. startElement : negated conditional → NO_COVERAGE
                if (addLeadingBreak) { // Not a new paragraph
218
                    int numChunks = currentParagraph.getChunks().size();
219 1 1. startElement : negated conditional → NO_COVERAGE
                    if (numChunks == 0 ||
220 2 1. startElement : Replaced integer subtraction with addition → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
                            ((Chunk)(currentParagraph.getChunks().get(numChunks - 1))).getContent().endsWith("\n"))
221
                        addLeadingBreak = false;
222
                }
223
                String align = (String) h.get("align");
224
                int hrAlign = Element.ALIGN_CENTER;
225 1 1. startElement : negated conditional → NO_COVERAGE
                if (align != null) {
226 1 1. startElement : negated conditional → NO_COVERAGE
                    if (align.equalsIgnoreCase("left"))
227
                        hrAlign = Element.ALIGN_LEFT; 
228 1 1. startElement : negated conditional → NO_COVERAGE
                    if (align.equalsIgnoreCase("right"))
229
                        hrAlign = Element.ALIGN_RIGHT;
230
                }
231
                String width = (String) h.get("width");
232
                float hrWidth = 1;
233 1 1. startElement : negated conditional → NO_COVERAGE
                if (width != null) {
234
                    float tmpWidth = Markup.parseLength(width, Markup.DEFAULT_FONT_SIZE);
235 2 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
                    if (tmpWidth > 0) hrWidth = tmpWidth;
236 1 1. startElement : negated conditional → NO_COVERAGE
                    if (!width.endsWith("%"))
237
                        hrWidth = 100; // Treat a pixel width as 100% for now.
238
                }
239
                String size = (String) h.get("size");
240
                float hrSize = 1;
241 1 1. startElement : negated conditional → NO_COVERAGE
                if (size != null) {
242
                    float tmpSize = Markup.parseLength(size, Markup.DEFAULT_FONT_SIZE);
243 2 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
                    if (tmpSize > 0)
244
                        hrSize = tmpSize;
245
                }
246 1 1. startElement : negated conditional → NO_COVERAGE
                if (addLeadingBreak)
247
                    currentParagraph.add(Chunk.NEWLINE);
248 1 1. startElement : Replaced float division with multiplication → NO_COVERAGE
                currentParagraph.add(new LineSeparator(hrSize, hrWidth, null, hrAlign, currentParagraph.getLeading()/2));
249
                currentParagraph.add(Chunk.NEWLINE);
250
                return;
251
            }
252 2 1. startElement : negated conditional → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.CHUNK) || tag.equals(HtmlTags.SPAN)) {
253 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
254
                return;
255
            }
256 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.IMAGE)) {
257
                String src = h.get(ElementTags.SRC);
258 1 1. startElement : negated conditional → NO_COVERAGE
                if (src == null)
259
                    return;
260 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
261
                Image img = null;
262 1 1. startElement : negated conditional → NO_COVERAGE
                if (interfaceProps != null) {
263
                    ImageProvider ip = (ImageProvider) interfaceProps
264
                            .get("img_provider");
265 1 1. startElement : negated conditional → NO_COVERAGE
                    if (ip != null)
266
                        img = ip.getImage(src, h, cprops, document);
267 1 1. startElement : negated conditional → NO_COVERAGE
                    if (img == null) {
268
                        HashMap images = (HashMap) interfaceProps
269
                                .get("img_static");
270 1 1. startElement : negated conditional → NO_COVERAGE
                        if (images != null) {
271
                            Image tim = (Image) images.get(src);
272 1 1. startElement : negated conditional → NO_COVERAGE
                            if (tim != null)
273
                                img = Image.getInstance(tim);
274
                        } else {
275 1 1. startElement : negated conditional → NO_COVERAGE
                            if (!src.startsWith("http")) { // relative src references only
276
                                String baseurl = (String) interfaceProps
277
                                        .get("img_baseurl");
278 1 1. startElement : negated conditional → NO_COVERAGE
                                if (baseurl != null) {
279
                                    src = baseurl + src;
280
                                    img = Image.getInstance(src);
281
                                }
282
                            }
283
                        }
284
                    }
285
                }
286 1 1. startElement : negated conditional → NO_COVERAGE
                if (img == null) {
287 1 1. startElement : negated conditional → NO_COVERAGE
                    if (!src.startsWith("http")) {
288
                        String path = cprops.getProperty("image_path");
289 1 1. startElement : negated conditional → NO_COVERAGE
                        if (path == null)
290
                            path = "";
291
                        src = new File(path, src).getPath();
292
                    }
293
                    img = Image.getInstance(src);
294
                }
295
                String align = h.get("align");
296
                String width = h.get("width");
297
                String height = h.get("height");
298
                String before = cprops.getProperty("before");
299
                String after = cprops.getProperty("after");
300 1 1. startElement : negated conditional → NO_COVERAGE
                if (before != null)
301 1 1. startElement : removed call to com/lowagie/text/Image::setSpacingBefore → NO_COVERAGE
                    img.setSpacingBefore(Float.parseFloat(before));
302 1 1. startElement : negated conditional → NO_COVERAGE
                if (after != null)
303 1 1. startElement : removed call to com/lowagie/text/Image::setSpacingAfter → NO_COVERAGE
                    img.setSpacingAfter(Float.parseFloat(after));
304
                float actualFontSize = Markup.parseLength(cprops
305
                        .getProperty(ElementTags.SIZE),
306
                        Markup.DEFAULT_FONT_SIZE);
307 2 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
                if (actualFontSize <= 0f)
308
                    actualFontSize = Markup.DEFAULT_FONT_SIZE;
309
                float widthInPoints = Markup.parseLength(width, actualFontSize);
310
                float heightInPoints = Markup.parseLength(height,
311
                        actualFontSize);
312 4 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : changed conditional boundary → NO_COVERAGE
3. startElement : negated conditional → NO_COVERAGE
4. startElement : negated conditional → NO_COVERAGE
                if (widthInPoints > 0 && heightInPoints > 0) {
313 1 1. startElement : removed call to com/lowagie/text/Image::scaleAbsolute → NO_COVERAGE
                    img.scaleAbsolute(widthInPoints, heightInPoints);
314 2 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
                } else if (widthInPoints > 0) {
315 1 1. startElement : Replaced float multiplication with division → NO_COVERAGE
                    heightInPoints = img.getHeight() * widthInPoints
316 1 1. startElement : Replaced float division with multiplication → NO_COVERAGE
                            / img.getWidth();
317 1 1. startElement : removed call to com/lowagie/text/Image::scaleAbsolute → NO_COVERAGE
                    img.scaleAbsolute(widthInPoints, heightInPoints);
318 2 1. startElement : changed conditional boundary → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
                } else if (heightInPoints > 0) {
319 1 1. startElement : Replaced float multiplication with division → NO_COVERAGE
                    widthInPoints = img.getWidth() * heightInPoints
320 1 1. startElement : Replaced float division with multiplication → NO_COVERAGE
                            / img.getHeight();
321 1 1. startElement : removed call to com/lowagie/text/Image::scaleAbsolute → NO_COVERAGE
                    img.scaleAbsolute(widthInPoints, heightInPoints);
322
                }
323 1 1. startElement : removed call to com/lowagie/text/Image::setWidthPercentage → NO_COVERAGE
                img.setWidthPercentage(0);
324 1 1. startElement : negated conditional → NO_COVERAGE
                if (align != null) {
325 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement("p");
326
                    int ralign = Image.MIDDLE;
327 1 1. startElement : negated conditional → NO_COVERAGE
                    if (align.equalsIgnoreCase("left"))
328
                        ralign = Image.LEFT;
329 1 1. startElement : negated conditional → NO_COVERAGE
                    else if (align.equalsIgnoreCase("right"))
330
                        ralign = Image.RIGHT;
331 1 1. startElement : removed call to com/lowagie/text/Image::setAlignment → NO_COVERAGE
                    img.setAlignment(ralign);
332
                    Img i = null;
333
                    boolean skip = false;
334 1 1. startElement : negated conditional → NO_COVERAGE
                    if (interfaceProps != null) {
335
                        i = (Img) interfaceProps.get("img_interface");
336 1 1. startElement : negated conditional → NO_COVERAGE
                        if (i != null)
337
                            skip = i.process(img, h, cprops, document);
338
                    }
339 1 1. startElement : negated conditional → NO_COVERAGE
                    if (!skip)
340
                        document.add(img);
341 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                    cprops.removeChain(tag);
342
                } else {
343 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                    cprops.removeChain(tag);
344 1 1. startElement : negated conditional → NO_COVERAGE
                    if (currentParagraph == null) {
345
                        currentParagraph = FactoryProperties
346
                                .createParagraph(cprops);
347
                    }
348
                    currentParagraph.add(new Chunk(img, 0, 0));
349
                }
350
                return;
351
            }
352 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
            endElement("p");
353 3 1. startElement : negated conditional → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
3. startElement : negated conditional → NO_COVERAGE
            if (tag.equals("h1") || tag.equals("h2") || tag.equals("h3")
354 3 1. startElement : negated conditional → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
3. startElement : negated conditional → NO_COVERAGE
                    || tag.equals("h4") || tag.equals("h5") || tag.equals("h6")) {
355 1 1. startElement : negated conditional → NO_COVERAGE
                if (!h.containsKey(ElementTags.SIZE)) {
356 1 1. startElement : Replaced integer subtraction with addition → NO_COVERAGE
                    int v = 7 - Integer.parseInt(tag.substring(1));
357
                    h.put(ElementTags.SIZE, Integer.toString(v));
358
                }
359 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
360
                return;
361
            }
362 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.UNORDEREDLIST)) {
363 1 1. startElement : negated conditional → NO_COVERAGE
                if (pendingLI)
364 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement(HtmlTags.LISTITEM);
365
                skipText = true;
366 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
367
                com.lowagie.text.List list = new com.lowagie.text.List(false);
368
                try{
369 1 1. startElement : removed call to com/lowagie/text/List::setIndentationLeft → NO_COVERAGE
                    list.setIndentationLeft(Float.parseFloat(cprops.getProperty("indent")));
370
                }catch (Exception e) {
371 1 1. startElement : removed call to com/lowagie/text/List::setAutoindent → NO_COVERAGE
                    list.setAutoindent(true);
372
                }
373 1 1. startElement : removed call to com/lowagie/text/List::setListSymbol → NO_COVERAGE
                list.setListSymbol("\u2022");
374
                stack.push(list);
375
                return;
376
            }
377 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.ORDEREDLIST)) {
378 1 1. startElement : negated conditional → NO_COVERAGE
                if (pendingLI)
379 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement(HtmlTags.LISTITEM);
380
                skipText = true;
381 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
382
                com.lowagie.text.List list = new com.lowagie.text.List(true);
383
                try{
384 1 1. startElement : removed call to com/lowagie/text/List::setIndentationLeft → NO_COVERAGE
                    list.setIndentationLeft(Float.parseFloat(cprops.getProperty("indent")));
385
                }catch (Exception e) {
386 1 1. startElement : removed call to com/lowagie/text/List::setAutoindent → NO_COVERAGE
                    list.setAutoindent(true);
387
                }
388
                stack.push(list);
389
                return;
390
            }
391 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.LISTITEM)) {
392 1 1. startElement : negated conditional → NO_COVERAGE
                if (pendingLI)
393 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement(HtmlTags.LISTITEM);
394
                skipText = false;
395
                pendingLI = true;
396 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
397
                ListItem item = FactoryProperties.createListItem(cprops);
398
                stack.push(item);
399
                return;
400
            }
401 3 1. startElement : negated conditional → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
3. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.DIV) || tag.equals(HtmlTags.BODY) || tag.equals("p")) {
402 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
403
                return;
404
            }
405 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.PRE)) {
406 1 1. startElement : negated conditional → NO_COVERAGE
                if (!h.containsKey(ElementTags.FACE)) {
407
                    h.put(ElementTags.FACE, "Courier");
408
                }
409 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain(tag, h);
410
                isPRE = true;
411
                return;
412
            }
413 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals("tr")) {
414 1 1. startElement : negated conditional → NO_COVERAGE
                if (pendingTR)
415 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement("tr");
416
                skipText = true;
417
                pendingTR = true;
418 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain("tr", h);
419
                return;
420
            }
421 2 1. startElement : negated conditional → NO_COVERAGE
2. startElement : negated conditional → NO_COVERAGE
            if (tag.equals("td") || tag.equals("th")) {
422 1 1. startElement : negated conditional → NO_COVERAGE
                if (pendingTD)
423 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement(tag);
424
                skipText = false;
425
                pendingTD = true;
426 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain("td", h);
427
                stack.push(new IncCell(tag, cprops));
428
                return;
429
            }
430 1 1. startElement : negated conditional → NO_COVERAGE
            if (tag.equals("table")) {
431 1 1. startElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE
                cprops.addToChain("table", h);
432
                IncTable table = new IncTable(h);
433
                stack.push(table);
434
                tableState.push(new boolean[] { pendingTR, pendingTD });
435
                pendingTR = pendingTD = false;
436
                skipText = true;
437
                return;
438
            }
439
        } catch (Exception e) {
440
            throw new ExceptionConverter(e);
441
        }
442
    }
443
444
    public void endElement(String tag) {
445 1 1. endElement : negated conditional → NO_COVERAGE
        if (!tagsSupported.containsKey(tag))
446
            return;
447
        try {
448
            String follow = (String) FactoryProperties.followTags.get(tag);
449 1 1. endElement : negated conditional → NO_COVERAGE
            if (follow != null) {
450 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(follow);
451
                return;
452
            }
453 2 1. endElement : negated conditional → NO_COVERAGE
2. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("font") || tag.equals("span")) {
454 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
455
                return;
456
            }
457 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("a")) {
458 1 1. endElement : negated conditional → NO_COVERAGE
                if (currentParagraph == null) {
459
                    currentParagraph = new Paragraph();
460
                }
461
                boolean skip = false;
462 1 1. endElement : negated conditional → NO_COVERAGE
                if (interfaceProps != null) {
463
                    ALink i = (ALink) interfaceProps.get("alink_interface");
464 1 1. endElement : negated conditional → NO_COVERAGE
                    if (i != null)
465
                        skip = i.process(currentParagraph, cprops);
466
                }
467 1 1. endElement : negated conditional → NO_COVERAGE
                if (!skip) {
468
                    String href = cprops.getProperty("href");
469 1 1. endElement : negated conditional → NO_COVERAGE
                    if (href != null) {
470
                        ArrayList chunks = currentParagraph.getChunks();
471
                        int size = chunks.size();
472
                        for (Object chunk : chunks) {
473
                            Chunk ck = (Chunk) chunk;
474
                            ck.setAnchor(href);
475
                        }
476
                    }
477
                }
478
                Paragraph tmp = (Paragraph) stack.pop();
479
                Phrase tmp2 = new Phrase();
480
                tmp2.add(currentParagraph);
481
                tmp.add(tmp2);
482
                currentParagraph = tmp;
483 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain("a");
484
                return;
485
            }
486 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("br")) {
487
                return;
488
            }
489 1 1. endElement : negated conditional → NO_COVERAGE
            if (currentParagraph != null) {
490 1 1. endElement : negated conditional → NO_COVERAGE
                if (stack.empty())
491
                    document.add(currentParagraph);
492
                else {
493
                    Object obj = stack.pop();
494 1 1. endElement : negated conditional → NO_COVERAGE
                    if (obj instanceof TextElementArray) {
495
                        TextElementArray current = (TextElementArray) obj;
496
                        current.add(currentParagraph);
497
                    }
498
                    stack.push(obj);
499
                }
500
            }
501
            currentParagraph = null;
502 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.UNORDEREDLIST)
503 1 1. endElement : negated conditional → NO_COVERAGE
                    || tag.equals(HtmlTags.ORDEREDLIST)) {
504 1 1. endElement : negated conditional → NO_COVERAGE
                if (pendingLI)
505 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement(HtmlTags.LISTITEM);
506
                skipText = false;
507 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
508 1 1. endElement : negated conditional → NO_COVERAGE
                if (stack.empty())
509
                    return;
510
                Object obj = stack.pop();
511 1 1. endElement : negated conditional → NO_COVERAGE
                if (!(obj instanceof com.lowagie.text.List)) {
512
                    stack.push(obj);
513
                    return;
514
                }
515 1 1. endElement : negated conditional → NO_COVERAGE
                if (stack.empty())
516
                    document.add((Element) obj);
517
                else
518
                    ((TextElementArray) stack.peek()).add(obj);
519
                return;
520
            }
521 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.LISTITEM)) {
522
                pendingLI = false;
523
                skipText = true;
524 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
525 1 1. endElement : negated conditional → NO_COVERAGE
                if (stack.empty())
526
                    return;
527
                Object obj = stack.pop();
528 1 1. endElement : negated conditional → NO_COVERAGE
                if (!(obj instanceof ListItem)) {
529
                    stack.push(obj);
530
                    return;
531
                }
532 1 1. endElement : negated conditional → NO_COVERAGE
                if (stack.empty()) {
533
                    document.add((Element) obj);
534
                    return;
535
                }
536
                Object list = stack.pop();
537 1 1. endElement : negated conditional → NO_COVERAGE
                if (!(list instanceof com.lowagie.text.List)) {
538
                    stack.push(list);
539
                    return;
540
                }
541
                ListItem item = (ListItem) obj;
542
                ((com.lowagie.text.List) list).add(item);
543
                ArrayList cks = item.getChunks();
544 1 1. endElement : negated conditional → NO_COVERAGE
                if (!cks.isEmpty())
545
                    item.getListSymbol()
546 1 1. endElement : removed call to com/lowagie/text/Chunk::setFont → NO_COVERAGE
                            .setFont(((Chunk) cks.get(0)).getFont());
547
                stack.push(list);
548
                return;
549
            }
550 2 1. endElement : negated conditional → NO_COVERAGE
2. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("div") || tag.equals("body")) {
551 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
552
                return;
553
            }
554 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals(HtmlTags.PRE)) {
555 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
556
                isPRE = false;
557
                return;
558
            }
559 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("p")) {
560 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
561
                return;
562
            }
563 3 1. endElement : negated conditional → NO_COVERAGE
2. endElement : negated conditional → NO_COVERAGE
3. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("h1") || tag.equals("h2") || tag.equals("h3")
564 3 1. endElement : negated conditional → NO_COVERAGE
2. endElement : negated conditional → NO_COVERAGE
3. endElement : negated conditional → NO_COVERAGE
                    || tag.equals("h4") || tag.equals("h5") || tag.equals("h6")) {
565 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain(tag);
566
                return;
567
            }
568 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("table")) {
569 1 1. endElement : negated conditional → NO_COVERAGE
                if (pendingTR)
570 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement("tr");
571 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain("table");
572
                IncTable table = (IncTable) stack.pop();
573
                PdfPTable tb = table.buildTable();
574 1 1. endElement : removed call to com/lowagie/text/pdf/PdfPTable::setSplitRows → NO_COVERAGE
                tb.setSplitRows(true);
575 1 1. endElement : negated conditional → NO_COVERAGE
                if (stack.empty())
576
                    document.add(tb);
577
                else
578
                    ((TextElementArray) stack.peek()).add(tb);
579
                boolean[] state = (boolean[]) tableState.pop();
580
                pendingTR = state[0];
581
                pendingTD = state[1];
582
                skipText = false;
583
                return;
584
            }
585 1 1. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("tr")) {
586 1 1. endElement : negated conditional → NO_COVERAGE
                if (pendingTD)
587 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE
                    endElement("td");
588
                pendingTR = false;
589 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain("tr");
590
                ArrayList cells = new ArrayList();
591
                IncTable table = null;
592
                while (true) {
593
                    Object obj = stack.pop();
594 1 1. endElement : negated conditional → NO_COVERAGE
                    if (obj instanceof IncCell) {
595
                        cells.add(((IncCell) obj).getCell());
596
                    }
597 1 1. endElement : negated conditional → NO_COVERAGE
                    if (obj instanceof IncTable) {
598
                        table = (IncTable) obj;
599
                        break;
600
                    }
601
                }
602 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/IncTable::addCols → NO_COVERAGE
                table.addCols(cells);
603 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/IncTable::endRow → NO_COVERAGE
                table.endRow();
604
                stack.push(table);
605
                skipText = true;
606
                return;
607
            }
608 2 1. endElement : negated conditional → NO_COVERAGE
2. endElement : negated conditional → NO_COVERAGE
            if (tag.equals("td") || tag.equals("th")) {
609
                pendingTD = false;
610 1 1. endElement : removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE
                cprops.removeChain("td");
611
                skipText = true;
612
                return;
613
            }
614
        } catch (Exception e) {
615
            throw new ExceptionConverter(e);
616
        }
617
    }
618
619
    public void text(String str) {
620 1 1. text : negated conditional → NO_COVERAGE
        if (skipText)
621
            return;
622
        String content = str;
623 1 1. text : negated conditional → NO_COVERAGE
        if (isPRE) {
624 1 1. text : negated conditional → NO_COVERAGE
            if (currentParagraph == null) {
625
                currentParagraph = FactoryProperties.createParagraph(cprops);
626
            }
627
            Chunk chunk = factoryProperties.createChunk(content, cprops);
628
            currentParagraph.add(chunk);
629
            return;
630
        }
631 3 1. text : changed conditional boundary → NO_COVERAGE
2. text : negated conditional → NO_COVERAGE
3. text : negated conditional → NO_COVERAGE
        if (content.trim().length() == 0 && content.indexOf(' ') < 0) {
632
            return;
633
        }
634
635
        StringBuilder buf = new StringBuilder();
636
        int len = content.length();
637
        char character;
638
        boolean newline = false;
639 3 1. text : changed conditional boundary → NO_COVERAGE
2. text : Changed increment from 1 to -1 → NO_COVERAGE
3. text : negated conditional → NO_COVERAGE
        for (int i = 0; i < len; i++) {
640
            switch (character = content.charAt(i)) {
641
            case ' ':
642 1 1. text : negated conditional → NO_COVERAGE
                if (!newline) {
643
                    buf.append(character);
644
                }
645
                break;
646
            case '\n':
647 2 1. text : changed conditional boundary → NO_COVERAGE
2. text : negated conditional → NO_COVERAGE
                if (i > 0) {
648
                    newline = true;
649
                    buf.append(' ');
650
                }
651
                break;
652
            case '\r':
653
                break;
654
            case '\t':
655
                break;
656
            default:
657
                newline = false;
658
                buf.append(character);
659
            }
660
        }
661 1 1. text : negated conditional → NO_COVERAGE
        if (currentParagraph == null) {
662
            currentParagraph = FactoryProperties.createParagraph(cprops);
663
        }
664
        Chunk chunk = factoryProperties.createChunk(buf.toString(), cprops);
665
        currentParagraph.add(chunk);
666
    }
667
668
    public boolean add(Element element) throws DocumentException {
669
        objectList.add(element);
670 1 1. add : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return true;
671
    }
672
673
    public void clearTextWrap() throws DocumentException {
674
    }
675
676
    public void close() {
677
    }
678
679
    public boolean newPage() {
680
        return true;
681
    }
682
683
    public void open() {
684
    }
685
686
    public void resetFooter() {
687
    }
688
689
    public void resetHeader() {
690
    }
691
692
    public void resetPageCount() {
693
    }
694
695
    public void setFooter(HeaderFooter footer) {
696
    }
697
698
    public void setHeader(HeaderFooter header) {
699
    }
700
701
    public boolean setMarginMirroring(boolean marginMirroring) {
702
        return false;
703
    }
704
705
    /**
706
     * @see com.lowagie.text.DocListener#setMarginMirroring(boolean)
707
     * @since    2.1.6
708
     */
709
    public boolean setMarginMirroringTopBottom(boolean marginMirroring) {
710
        return false;
711
    }
712
713
    public boolean setMargins(float marginLeft, float marginRight,
714
            float marginTop, float marginBottom) {
715
        return true;
716
    }
717
718
    public void setPageCount(int pageN) {
719
    }
720
721
    public boolean setPageSize(Rectangle pageSize) {
722
        return true;
723
    }
724
725
    public static final String tagsSupportedString = "ol ul li a pre font span br p div body table td th tr i b u sub sup em strong s strike"
726
            + " h1 h2 h3 h4 h5 h6 img hr";
727
728
    public static final HashMap tagsSupported = new HashMap();
729
730
    static {
731
        StringTokenizer tok = new StringTokenizer(tagsSupportedString);
732
        while (tok.hasMoreTokens())
733
            tagsSupported.put(tok.nextToken(), null);
734
    }
735
736
}

Mutations

128

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

130

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

131

1.1
Location : setInterfaceProps
Killed by : none
removed call to com/lowagie/text/html/simpleparser/FactoryProperties::setFontImp → NO_COVERAGE

139

1.1
Location : parse
Killed by : none
removed call to com/lowagie/text/xml/simpleparser/SimpleXMLParser::parse → NO_COVERAGE

144

1.1
Location : parseToList
Killed by : none
mutated return of Object value for com/lowagie/text/html/simpleparser/HTMLWorker::parseToList to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

150

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

153

1.1
Location : parseToList
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::setInterfaceProps → NO_COVERAGE

155

1.1
Location : parseToList
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::parse → NO_COVERAGE

156

1.1
Location : parseToList
Killed by : none
mutated return of Object value for com/lowagie/text/html/simpleparser/HTMLWorker::parseToList to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

161

1.1
Location : endDocument
Killed by : none
changed conditional boundary → NO_COVERAGE

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

163

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

173

1.1
Location : startDocument
Killed by : none
removed call to com/lowagie/text/html/simpleparser/StyleSheet::applyStyle → NO_COVERAGE

174

1.1
Location : startDocument
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

178

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

181

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/StyleSheet::applyStyle → NO_COVERAGE

183

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

186

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

189

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/FactoryProperties::insertStyle → NO_COVERAGE

190

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

191

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

192

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

199

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

200

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

207

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

213

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

217

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

219

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

220

1.1
Location : startElement
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

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

225

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

226

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

228

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

233

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

235

1.1
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

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

236

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

241

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

243

1.1
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

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

246

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

248

1.1
Location : startElement
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

252

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

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

253

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

256

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

258

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

260

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

262

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

265

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

267

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

270

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

272

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

275

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

278

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

286

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

287

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

289

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

300

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

301

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::setSpacingBefore → NO_COVERAGE

302

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

303

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::setSpacingAfter → NO_COVERAGE

307

1.1
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

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

312

1.1
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

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

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

313

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::scaleAbsolute → NO_COVERAGE

314

1.1
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

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

315

1.1
Location : startElement
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

316

1.1
Location : startElement
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

317

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::scaleAbsolute → NO_COVERAGE

318

1.1
Location : startElement
Killed by : none
changed conditional boundary → NO_COVERAGE

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

319

1.1
Location : startElement
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

320

1.1
Location : startElement
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

321

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::scaleAbsolute → NO_COVERAGE

323

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::setWidthPercentage → NO_COVERAGE

324

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

325

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

327

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

329

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

331

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/Image::setAlignment → NO_COVERAGE

334

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

336

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

339

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

341

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

343

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

344

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

352

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

353

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

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

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

354

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

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

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

355

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

356

1.1
Location : startElement
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

359

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

362

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

363

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

364

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

366

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

369

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/List::setIndentationLeft → NO_COVERAGE

371

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/List::setAutoindent → NO_COVERAGE

373

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/List::setListSymbol → NO_COVERAGE

377

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

378

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

379

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

381

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

384

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/List::setIndentationLeft → NO_COVERAGE

386

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/List::setAutoindent → NO_COVERAGE

391

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

392

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

393

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

396

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

401

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

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

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

402

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

405

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

406

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

409

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

413

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

414

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

415

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

418

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

421

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

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

422

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

423

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

426

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

430

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

431

1.1
Location : startElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::addToChain → NO_COVERAGE

445

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

449

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

450

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

453

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

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

454

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

457

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

458

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

462

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

464

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

467

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

469

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

483

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

486

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

489

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

490

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

494

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

502

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

503

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

504

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

505

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

507

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

508

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

511

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

515

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

521

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

524

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

525

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

528

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

532

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

537

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

544

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

546

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/Chunk::setFont → NO_COVERAGE

550

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

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

551

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

554

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

555

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

559

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

560

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

563

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

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

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

564

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

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

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

565

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

568

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

569

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

570

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

571

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

574

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/pdf/PdfPTable::setSplitRows → NO_COVERAGE

575

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

585

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

586

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

587

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/HTMLWorker::endElement → NO_COVERAGE

589

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

594

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

597

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

602

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/IncTable::addCols → NO_COVERAGE

603

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/IncTable::endRow → NO_COVERAGE

608

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

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

610

1.1
Location : endElement
Killed by : none
removed call to com/lowagie/text/html/simpleparser/ChainedProperties::removeChain → NO_COVERAGE

620

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

623

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

624

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

631

1.1
Location : text
Killed by : none
changed conditional boundary → NO_COVERAGE

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

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

639

1.1
Location : text
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : text
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

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

642

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

647

1.1
Location : text
Killed by : none
changed conditional boundary → NO_COVERAGE

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

661

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

670

1.1
Location : add
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.4.2