Browse Source

Pull request #449: 无jira任务,反向合代码引起的错误(堵塞打包)

Merge in CORE/base-third from ~HUGH.C/base-third:release/10.0 to release/10.0

* commit '4465d373639dad51dc11071cc7fb45fa314b4867':
  无jira任务,反向合代码引起的错误(堵塞打包)
release/10.0
Hugh.C 5 years ago
parent
commit
a0021f11ca
  1. 5
      fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncCell.java
  2. 2
      fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncTable.java
  3. 96
      fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/utils/BackgroundUtil.java

5
fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncCell.java

@ -47,16 +47,13 @@
package com.fr.third.v2.lowagie.text.html.simpleparser; package com.fr.third.v2.lowagie.text.html.simpleparser;
import com.fr.third.v2.lowagie.text.html.Utils.BackgroundUtil; import com.fr.third.v2.lowagie.text.html.utils.BackgroundUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import com.fr.third.v2.lowagie.text.Element; import com.fr.third.v2.lowagie.text.Element;
import com.fr.third.v2.lowagie.text.ElementListener; import com.fr.third.v2.lowagie.text.ElementListener;
import com.fr.third.v2.lowagie.text.TextElementArray; import com.fr.third.v2.lowagie.text.TextElementArray;
import com.fr.third.v2.lowagie.text.html.CSSUtils; import com.fr.third.v2.lowagie.text.html.CSSUtils;
import com.fr.third.v2.lowagie.text.html.Markup;
import com.fr.third.v2.lowagie.text.pdf.PdfPCell; import com.fr.third.v2.lowagie.text.pdf.PdfPCell;
import com.fr.third.v2.lowagie.text.Phrase; import com.fr.third.v2.lowagie.text.Phrase;

2
fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncTable.java

@ -48,7 +48,7 @@
package com.fr.third.v2.lowagie.text.html.simpleparser; package com.fr.third.v2.lowagie.text.html.simpleparser;
import com.fr.third.v2.lowagie.text.html.HtmlTags; import com.fr.third.v2.lowagie.text.html.HtmlTags;
import com.fr.third.v2.lowagie.text.html.Utils.BackgroundUtil; import com.fr.third.v2.lowagie.text.html.utils.BackgroundUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;

96
fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/html/Utils/BackgroundUtil.java → fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/utils/BackgroundUtil.java

@ -1,48 +1,48 @@
package com.fr.third.v2.lowagie.text.html.Utils; package com.fr.third.v2.lowagie.text.html.utils;
import com.fr.third.v2.lowagie.text.html.CSSUtils; import com.fr.third.v2.lowagie.text.html.CSSUtils;
import com.fr.third.v2.lowagie.text.html.simpleparser.ChainedProperties; import com.fr.third.v2.lowagie.text.html.simpleparser.ChainedProperties;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author Hugh.C * @author Hugh.C
* @version 1.0 * @version 1.0
* Created by Hugh.C on 2020/2/26 * Created by Hugh.C on 2020/2/26
*/ */
public class BackgroundUtil { public class BackgroundUtil {
public static Map<String, String> parse2RulesMap(ChainedProperties props) { public static Map<String, String> parse2RulesMap(ChainedProperties props) {
Map<String, String> backgroundRules = new HashMap<String, String>(); Map<String, String> backgroundRules = new HashMap<String, String>();
String value = props.getProperty("bgcolor"); String value = props.getProperty("bgcolor");
if (value != null) { if (value != null) {
backgroundRules.put("background-color", value); backgroundRules.put("background-color", value);
} }
value = props.getLastChainProperty("background-size"); value = props.getLastChainProperty("background-size");
if (value != null) { if (value != null) {
backgroundRules.put("background-size", value); backgroundRules.put("background-size", value);
} }
value = props.getLastChainProperty("background"); value = props.getLastChainProperty("background");
if (value != null) { if (value != null) {
Map<String, String> backgroundStyles = CSSUtils.processBackground(value); Map<String, String> backgroundStyles = CSSUtils.processBackground(value);
backgroundRules.putAll(backgroundStyles); backgroundRules.putAll(backgroundStyles);
} }
value = props.getLastChainProperty("background-color"); value = props.getLastChainProperty("background-color");
if (value != null) { if (value != null) {
backgroundRules.put("background-color", value); backgroundRules.put("background-color", value);
} }
value = props.getLastChainProperty("background-position"); value = props.getLastChainProperty("background-position");
if (value != null) { if (value != null) {
backgroundRules.put("background-position", value); backgroundRules.put("background-position", value);
} }
value = props.getLastChainProperty("background-repeat"); value = props.getLastChainProperty("background-repeat");
if (value != null) { if (value != null) {
backgroundRules.put("background-repeat", value); backgroundRules.put("background-repeat", value);
} }
value = props.getLastChainProperty("background-image"); value = props.getLastChainProperty("background-image");
if (value != null) { if (value != null) {
backgroundRules.put("background-image", value); backgroundRules.put("background-image", value);
} }
return backgroundRules; return backgroundRules;
} }
} }
Loading…
Cancel
Save