File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
main/java/com/itextpdf/styledxmlparser/css
test/java/com/itextpdf/styledxmlparser/css Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,20 @@ public class CssFontFaceRule extends CssNestedAtRule {
55
55
*/
56
56
private List <CssDeclaration > properties ;
57
57
58
+ /**
59
+ * Instantiates a new CSS font face rule.
60
+ */
61
+ public CssFontFaceRule () {
62
+ this ("" );
63
+ }
64
+
58
65
/**
59
66
* Instantiates a new CSS font face rule.
60
67
*
61
68
* @param ruleParameters the rule parameters
69
+ * @deprecated Will be removed in 7.2. Use {@link #CssFontFaceRule()} instead
62
70
*/
71
+ @ Deprecated
63
72
public CssFontFaceRule (String ruleParameters ) {
64
73
super (CssRuleName .FONT_FACE , ruleParameters );
65
74
}
Original file line number Diff line number Diff line change @@ -90,9 +90,9 @@ public static CssNestedAtRule createNestedRule(String ruleDeclaration) {
90
90
case CssRuleName .BOTTOM_CENTER :
91
91
case CssRuleName .BOTTOM_RIGHT :
92
92
case CssRuleName .BOTTOM_RIGHT_CORNER :
93
- return new CssMarginRule (ruleName , ruleParameters );
93
+ return new CssMarginRule (ruleName );
94
94
case CssRuleName .FONT_FACE :
95
- return new CssFontFaceRule (ruleParameters );
95
+ return new CssFontFaceRule ();
96
96
default :
97
97
return new CssNestedAtRule (ruleName , ruleParameters );
98
98
}
Original file line number Diff line number Diff line change @@ -58,12 +58,23 @@ public class CssMarginRule extends CssNestedAtRule {
58
58
/** The page selectors. */
59
59
private List <ICssSelector > pageSelectors ;
60
60
61
+ /**
62
+ * Creates a new {@link CssMarginRule} instance.
63
+ *
64
+ * @param ruleName the rule name
65
+ */
66
+ public CssMarginRule (String ruleName ) {
67
+ this (ruleName , "" );
68
+ }
69
+
61
70
/**
62
71
* Creates a new {@link CssMarginRule} instance.
63
72
*
64
73
* @param ruleName the rule name
65
74
* @param ruleParameters the rule parameters
75
+ * @deprecated Will be removed in 7.2. Use {@link #CssMarginRule(String)} instead
66
76
*/
77
+ @ Deprecated
67
78
public CssMarginRule (String ruleName , String ruleParameters ) {
68
79
super (ruleName , ruleParameters );
69
80
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class CssFontFaceRuleTest extends ExtendedITextTest {
14
14
15
15
@ Test
16
16
public void verifyThatToStringProducesValidCss () {
17
- CssFontFaceRule fontFaceRule = new CssFontFaceRule ("" );
17
+ CssFontFaceRule fontFaceRule = new CssFontFaceRule ();
18
18
List <CssDeclaration > declarations = new ArrayList <>();
19
19
declarations .add (new CssDeclaration (CommonCssConstants .FONT_FAMILY , "test-font-family" ));
20
20
declarations .add (new CssDeclaration (CommonCssConstants .FONT_WEIGHT , CommonCssConstants .BOLD ));
You can’t perform that action at this time.
0 commit comments