diff --git a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncCell.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncCell.java index 8b8318bb1..eaf6ec573 100644 --- a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncCell.java +++ b/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; -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.HashMap; -import java.util.Map; import com.fr.third.v2.lowagie.text.Element; import com.fr.third.v2.lowagie.text.ElementListener; 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.Markup; import com.fr.third.v2.lowagie.text.pdf.PdfPCell; import com.fr.third.v2.lowagie.text.Phrase; diff --git a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncTable.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncTable.java index 0e99b6d65..3fca955a7 100644 --- a/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/simpleparser/IncTable.java +++ b/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; 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.Collections; import java.util.HashMap; diff --git a/fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/html/Utils/BackgroundUtil.java b/fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/utils/BackgroundUtil.java similarity index 94% rename from fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/html/Utils/BackgroundUtil.java rename to fine-itext/src/main/java/com/fr/third/v2/lowagie/text/html/utils/BackgroundUtil.java index 61c0ce452..23cc892df 100644 --- a/fine-itext-old/src/main/java/com/fr/third/com/lowagie/text/html/Utils/BackgroundUtil.java +++ b/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; - -import com.fr.third.v2.lowagie.text.html.CSSUtils; -import com.fr.third.v2.lowagie.text.html.simpleparser.ChainedProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * @author Hugh.C - * @version 1.0 - * Created by Hugh.C on 2020/2/26 - */ -public class BackgroundUtil { - - public static Map parse2RulesMap(ChainedProperties props) { - Map backgroundRules = new HashMap(); - String value = props.getProperty("bgcolor"); - if (value != null) { - backgroundRules.put("background-color", value); - } - value = props.getLastChainProperty("background-size"); - if (value != null) { - backgroundRules.put("background-size", value); - } - value = props.getLastChainProperty("background"); - if (value != null) { - Map backgroundStyles = CSSUtils.processBackground(value); - backgroundRules.putAll(backgroundStyles); - } - value = props.getLastChainProperty("background-color"); - if (value != null) { - backgroundRules.put("background-color", value); - } - value = props.getLastChainProperty("background-position"); - if (value != null) { - backgroundRules.put("background-position", value); - } - value = props.getLastChainProperty("background-repeat"); - if (value != null) { - backgroundRules.put("background-repeat", value); - } - value = props.getLastChainProperty("background-image"); - if (value != null) { - backgroundRules.put("background-image", value); - } - return backgroundRules; - } -} +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.simpleparser.ChainedProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * @author Hugh.C + * @version 1.0 + * Created by Hugh.C on 2020/2/26 + */ +public class BackgroundUtil { + + public static Map parse2RulesMap(ChainedProperties props) { + Map backgroundRules = new HashMap(); + String value = props.getProperty("bgcolor"); + if (value != null) { + backgroundRules.put("background-color", value); + } + value = props.getLastChainProperty("background-size"); + if (value != null) { + backgroundRules.put("background-size", value); + } + value = props.getLastChainProperty("background"); + if (value != null) { + Map backgroundStyles = CSSUtils.processBackground(value); + backgroundRules.putAll(backgroundStyles); + } + value = props.getLastChainProperty("background-color"); + if (value != null) { + backgroundRules.put("background-color", value); + } + value = props.getLastChainProperty("background-position"); + if (value != null) { + backgroundRules.put("background-position", value); + } + value = props.getLastChainProperty("background-repeat"); + if (value != null) { + backgroundRules.put("background-repeat", value); + } + value = props.getLastChainProperty("background-image"); + if (value != null) { + backgroundRules.put("background-image", value); + } + return backgroundRules; + } +}