1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.internal.macro.html; |
21 |
|
|
22 |
|
import java.util.Map; |
23 |
|
|
24 |
|
import org.xwiki.rendering.internal.renderer.xhtml.XHTMLChainingRenderer; |
25 |
|
import org.xwiki.rendering.internal.renderer.xhtml.image.XHTMLImageRenderer; |
26 |
|
import org.xwiki.rendering.internal.renderer.xhtml.link.XHTMLLinkRenderer; |
27 |
|
import org.xwiki.rendering.listener.chaining.ListenerChain; |
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
@version |
35 |
|
@since |
36 |
|
|
|
|
| 84.8% |
Uncovered Elements: 7 (46) |
Complexity: 19 |
Complexity Density: 0.95 |
|
37 |
|
public class HTMLMacroXHTMLChainingRenderer extends XHTMLChainingRenderer |
38 |
|
{ |
39 |
|
|
40 |
|
@param |
41 |
|
|
42 |
|
|
43 |
|
@param |
44 |
|
|
45 |
|
|
46 |
|
@param |
47 |
|
@since |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
165 |
public HTMLMacroXHTMLChainingRenderer(XHTMLLinkRenderer linkRenderer, XHTMLImageRenderer imageRenderer,... |
50 |
|
ListenerChain listenerChain) |
51 |
|
{ |
52 |
165 |
super(linkRenderer, imageRenderer, listenerChain); |
53 |
|
} |
54 |
|
|
55 |
|
|
56 |
|
@return |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
47453 |
private boolean isInGeneratedBlock()... |
59 |
|
{ |
60 |
47453 |
return getBlockState().isInMacro(); |
61 |
|
} |
62 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
63 |
23669 |
@Override... |
64 |
|
public void onSpecialSymbol(char symbol) |
65 |
|
{ |
66 |
23669 |
if (!isInGeneratedBlock()) { |
67 |
23600 |
getPrinter().print("" + symbol); |
68 |
|
} else { |
69 |
69 |
super.onSpecialSymbol(symbol); |
70 |
|
} |
71 |
|
} |
72 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
73 |
15166 |
@Override... |
74 |
|
public void onWord(String word) |
75 |
|
{ |
76 |
15166 |
if (!isInGeneratedBlock()) { |
77 |
14734 |
getPrinter().print(word); |
78 |
|
} else { |
79 |
432 |
super.onWord(word); |
80 |
|
} |
81 |
|
} |
82 |
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
83 |
3291 |
@Override... |
84 |
|
public void onNewLine() |
85 |
|
{ |
86 |
3291 |
if (!isInGeneratedBlock()) { |
87 |
3291 |
getPrinter().print("\n"); |
88 |
|
} else { |
89 |
0 |
super.onNewLine(); |
90 |
|
} |
91 |
|
} |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
93 |
4830 |
@Override... |
94 |
|
public void onSpace() |
95 |
|
{ |
96 |
4830 |
if (!isInGeneratedBlock()) { |
97 |
4432 |
getPrinter().print(" "); |
98 |
|
} else { |
99 |
398 |
super.onSpace(); |
100 |
|
} |
101 |
|
} |
102 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
103 |
3 |
@Override... |
104 |
|
public void onEmptyLines(int count) |
105 |
|
{ |
106 |
3 |
if (!isInGeneratedBlock()) { |
107 |
|
|
108 |
|
} else { |
109 |
1 |
super.onEmptyLines(count); |
110 |
|
} |
111 |
|
} |
112 |
|
|
|
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
113 |
247 |
@Override... |
114 |
|
public void beginParagraph(Map<String, String> parameters) |
115 |
|
{ |
116 |
247 |
if (!isInGeneratedBlock()) { |
117 |
|
|
118 |
|
} else { |
119 |
0 |
super.beginParagraph(parameters); |
120 |
|
} |
121 |
|
} |
122 |
|
|
|
|
| 50% |
Uncovered Elements: 2 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
123 |
247 |
@Override... |
124 |
|
public void endParagraph(Map<String, String> parameters) |
125 |
|
{ |
126 |
247 |
if (!isInGeneratedBlock()) { |
127 |
|
|
128 |
|
} else { |
129 |
0 |
super.endParagraph(parameters); |
130 |
|
} |
131 |
|
} |
132 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
133 |
0 |
@Override... |
134 |
|
public void onMacro(String id, Map<String, String> parameters, String content, boolean inline) |
135 |
|
{ |
136 |
|
|
137 |
|
} |
138 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
139 |
310 |
@Override... |
140 |
|
public void beginMacroMarker(String name, Map<String, String> parameters, String content, boolean isInline) |
141 |
|
{ |
142 |
|
|
143 |
|
} |
144 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
145 |
310 |
@Override... |
146 |
|
public void endMacroMarker(String name, Map<String, String> parameters, String content, boolean isInline) |
147 |
|
{ |
148 |
|
|
149 |
|
} |
150 |
|
} |