From f64ff89c6c4468c0564d8aa92dbee148ae1d49a5 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 30 Nov 2018 16:23:25 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-13005=20sub=E6=A0=87=E7=AD=BE=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEcolor=E5=B1=9E=E6=80=A7=EF=BC=8C=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=B2=A1=E6=9C=89=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lowagie/text/html/simpleparser/HTMLWorker.java | 10 +++++++++- .../fr/third/com/lowagie/text/rtf/text/RtfChunk.java | 3 +-- .../v2/lowagie/text/html/simpleparser/HTMLWorker.java | 9 ++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/fine-itext-old/src/com/fr/third/com/lowagie/text/html/simpleparser/HTMLWorker.java b/fine-itext-old/src/com/fr/third/com/lowagie/text/html/simpleparser/HTMLWorker.java index dedace0b8..1399c6d20 100644 --- a/fine-itext-old/src/com/fr/third/com/lowagie/text/html/simpleparser/HTMLWorker.java +++ b/fine-itext-old/src/com/fr/third/com/lowagie/text/html/simpleparser/HTMLWorker.java @@ -197,6 +197,9 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { if (follow != null) { HashMap prop = new HashMap(); prop.put(follow, null); + FactoryProperties.insertStyle(h, this.cprops); + prop.putAll(h); + cprops.addToChain(follow, prop); return; } @@ -303,7 +306,12 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { String[] srcArray = src.split(","); String base64string = srcArray[srcArray.length -1]; byte[] bytes = decoder.decodeBuffer(base64string); - img = Image.getInstance(bytes); + try { + img = Image.getInstance(bytes); + }catch (Exception e){ + + } + } if (img == null) { if (!src.startsWith("http")) { diff --git a/fine-itext-old/src/com/fr/third/com/lowagie/text/rtf/text/RtfChunk.java b/fine-itext-old/src/com/fr/third/com/lowagie/text/rtf/text/RtfChunk.java index 09903083a..ccbbeb17c 100755 --- a/fine-itext-old/src/com/fr/third/com/lowagie/text/rtf/text/RtfChunk.java +++ b/fine-itext-old/src/com/fr/third/com/lowagie/text/rtf/text/RtfChunk.java @@ -49,7 +49,6 @@ package com.fr.third.com.lowagie.text.rtf.text; -import java.awt.Color; import java.io.IOException; import java.io.OutputStream; @@ -59,7 +58,7 @@ import com.fr.third.com.lowagie.text.rtf.RtfElement; import com.fr.third.com.lowagie.text.rtf.document.RtfDocument; import com.fr.third.com.lowagie.text.rtf.style.RtfColor; import com.fr.third.com.lowagie.text.rtf.style.RtfFont; -import com.fr.third.v2.lowagie.text.html.Markup; +import com.fr.third.com.lowagie.text.html.Markup; /** diff --git a/fine-itext/src/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java b/fine-itext/src/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java index 51f01d31b..ade85f5cf 100644 --- a/fine-itext/src/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java +++ b/fine-itext/src/com/fr/third/v2/lowagie/text/html/simpleparser/HTMLWorker.java @@ -200,6 +200,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { if (follow != null) { HashMap prop = new HashMap(); prop.put(follow, null); + FactoryProperties.insertStyle(h, this.cprops); + prop.putAll(h); cprops.addToChain(follow, prop); return; } @@ -306,7 +308,12 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener { String[] srcArray = src.split(","); String base64string = srcArray[srcArray.length -1]; byte[] bytes = decoder.decodeBuffer(base64string); - img = Image.getInstance(bytes); + try { + img = Image.getInstance(bytes); + }catch (Exception e){ + + } + } if (img == null) { if (!src.startsWith("http")) {