From eb30f2e1c82404b574297472efd7c6a1b52c36df Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Mon, 22 Feb 2021 00:18:37 +0000 Subject: [PATCH] Use upcoming XmlBeans 5.0.0 (working version 4.0.1) Make batik optional as it doesn't work on the module-path Use sub-components of batik as batik-all references them all again resulting in duplicated entries (maven poms haven't been migrated yet ...) Remove SLF4j dependency git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886777 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 130 +++++++++++++++--- .../apache/poi/sl/draw/DrawPictureShape.java | 37 +++-- .../ooxml-lite/java9/module-info.class | Bin 1663 -> 1663 bytes src/multimodule/ooxml/java9/module-info.class | Bin 3083 -> 3523 bytes src/multimodule/ooxml/java9/module-info.java | 23 +++- src/multimodule/ooxml/test9/module-info.class | Bin 4542 -> 4982 bytes src/multimodule/ooxml/test9/module-info.java | 23 +++- src/multimodule/poi/java9/module-info.class | Bin 3314 -> 3329 bytes .../org/apache/poi/xslf/util/PPTX2PNG.java | 13 +- .../poifs/crypt/dsig/TestSignatureInfo.java | 2 + .../xslf/usermodel/TestXSLFPictureShape.java | 5 +- 11 files changed, 195 insertions(+), 38 deletions(-) diff --git a/build.xml b/build.xml index e8461f4df9..dddb2b15f5 100644 --- a/build.xml +++ b/build.xml @@ -288,7 +288,6 @@ under the License. - @@ -300,17 +299,36 @@ under the License. - - - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -433,7 +451,6 @@ under the License. - @@ -461,7 +478,25 @@ under the License. - + + + + + + + + + + + + + + + + + + + @@ -623,12 +658,14 @@ under the License. + + @@ -675,7 +712,6 @@ under the License. - @@ -722,7 +758,6 @@ under the License. - @@ -756,7 +791,25 @@ under the License. - + + + + + + + + + + + + + + + + + + + @@ -775,7 +828,25 @@ under the License. - + + + + + + + + + + + + + + + + + + + @@ -858,9 +929,13 @@ under the License. - + + + + + + + + @@ -1287,6 +1363,10 @@ under the License. + + + + @@ -2579,7 +2659,25 @@ under the License. - + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/apache/poi/sl/draw/DrawPictureShape.java b/src/java/org/apache/poi/sl/draw/DrawPictureShape.java index 71cb1bdd23..764f1f576a 100644 --- a/src/java/org/apache/poi/sl/draw/DrawPictureShape.java +++ b/src/java/org/apache/poi/sl/draw/DrawPictureShape.java @@ -23,9 +23,10 @@ import java.awt.Insets; import java.awt.Paint; import java.awt.geom.Rectangle2D; import java.io.IOException; +import java.util.Iterator; +import java.util.NoSuchElementException; +import java.util.ServiceConfigurationError; import java.util.ServiceLoader; -import java.util.function.Supplier; -import java.util.stream.StreamSupport; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -91,20 +92,26 @@ public class DrawPictureShape extends DrawSimpleShape { return fallback; } - // the fallback is the BitmapImageRenderer, at least it gracefully handles invalid images - final Supplier getFallback = () -> { - LOG.atWarn().log("No suitable image renderer found for content-type '{}' - include " + - "poi-scratchpad (for wmf/emf) or poi-ooxml (for svg) jars!", contentType); - return fallback; - }; - ClassLoader cl = DrawPictureShape.class.getClassLoader(); - return StreamSupport - .stream(ServiceLoader.load(ImageRenderer.class, cl).spliterator(), false) - .filter(ir -> ir.canRender(contentType)) - .findFirst() - .orElseGet(getFallback) - ; + Iterator iter = ServiceLoader.load(ImageRenderer.class, cl).iterator(); + for (;;) { + // Batik / SVGImageRenderer fails when executed on the module-path, hence we try/skip it in that case + try { + ImageRenderer ir = iter.next(); + if (ir.canRender(contentType)) { + return ir; + } + } catch (NoSuchElementException ignored) { + break; + } catch (Exception | ServiceConfigurationError ignored) { + } + } + + // the fallback is the BitmapImageRenderer, at least it gracefully handles invalid images + LOG.atWarn().log("No suitable image renderer found for content-type '{}' - include " + + "poi-scratchpad (for wmf/emf) or poi-ooxml (for svg) jars - " + + "svgs/batik doesn't work on the module-path!", contentType); + return fallback; } @Override diff --git a/src/multimodule/ooxml-lite/java9/module-info.class b/src/multimodule/ooxml-lite/java9/module-info.class index 2a720c718dbce28980eac8ad74ea97e6d1dfe7c0..5a1a8d9258b44306f29dce9dcd0d8a7b34bbf118 100644 GIT binary patch delta 620 zcmX|;OHUJF6o%h3ms02yu`>lqZHrt)F0BX@luJY0lely{)Tuy#8c?EfflIg3Z{u$u zF>z^J_ygR!WkJ|O_yyvbw}#DgzURE>oJ=ye-mN$F`|rhvePje_&S@(^ zRxlpl48|8(JHWm8YBCkzK6@pv-D>SNqX5338sC)6D;dxyIM45CvW!bwe>IkfP+!3Hd3Fp zAWiE_o+!X$?I#Dw92t;<kdMg6=-CZX!WY??pCQa}9ScnTA zfQLfNPSU7U>5Amy^Ex~Kcs%>tzyJLF1z;2VQ& zxx@>JHHnuJuOwbetV@(7lte|MDp8ZDOKeDNN^D8Ik$5YyEwLl9EAdWZPhd9U{OdMu zIDti%Hp@EELCcgAXUop@qITKSG}2yR=9}*7@}c%dpmZjbf)0(2DPo!&{ehmGQOT#2}f$^UD^w?Ervtot6H&&5Y|eqW(;xvl6JhIBog0D`XU{!ic%J^a7~mS~*7MXFgyqG9NM@F&{G- Fe*tug_i_LL diff --git a/src/multimodule/ooxml/java9/module-info.class b/src/multimodule/ooxml/java9/module-info.class index 9d0a03b62f7c8900ffa6b6a9e661cb76b0a4183c..9f991b0c367d3ff5e50a348158e276a3e0c6bf19 100644 GIT binary patch literal 3523 zcma);2Y1{=5XWZ&#H1G~y^@|_OC)h1^bm+cAR#6PiRtL1J)LYxD|U6~b7-OW-h1!8 zL*VfN_)t7Xqq9yYok{HXes|ja@67DXtoHu-_vGIIunYd`gJ}$A1;T0ge83B9g2D7d z^rXRA40It~!-_1s&W%WTh7hg5*PxHVj8Us;8C6Sh4Q4P{SP-IEgINr;+&C_+aw}9C z%we!HH<4L36gmnlRLo8ih%$ZylSaE%) z28$TXu0)npe6JT*c&x#aZWF$6T`zPE{2UzBU>WLZpY3rCR!ojKT#dyd(qI*Co-~Tv z4e7-b#;B`s2WuG2qjB7}Vatgq78;zxU_~xsWrcCWlAbV7gzGg}&tO?1sES5tPuP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)xog^gPolP~p_ue}X z!5=&TPr;M$VKmp2J;m|oF-JYj+G9N~Gw3xpR5FA-iQED~NJyh?bD@H*iQ!kdJ*2yYYKA-qd?kMKU> z1Hy-dj|d+VJ|TQc_>Ay5;S0i-gs%u+6TTsQOZblPJ>dt!k0tz6!p|lAQo^q#{8qy6 zCH!GwMN49z^nzMwVO<#4D=Jb>Lsz2E%YH3P%&Cs5%&J6N*qKvs!d5E`l8O`hzIIZN z|DUq3sZhh!j)hf&6)lxE4qI4RjZ~cIV_sU-Desf5O#Ir^9E)U6KdjfipgwqXb<#}3 z$ikXAw^?ZiNjr+dIMuF&)x6g3Ic|&7>(72+_qOf@kW=ixx7&%1ITPBqu)lESNW-p$ zL7Mb(mAB-&wO;i3mwG;pm6L|Cg|cC{5hc7}d%;^fx2jOy)xO^h!fsGtHOZ`QG_CSm z+tnQlJBlQ_ql2^`{+@FxQ4DB7=R8wiL+*hRtd< zGQ&Ngt?Kny*Hx;yT7?eu^&HOFu5)i2MnvjKD3Vy?%Gpv*zsJ=qkPa%J}ZJVT#wl>Y>w0?O?7{? zvt9MsX0;J^NBZV*Fc_MXS@)mT0sD}7VVWJeJfpl|==QXHDDVs)GTi7L$Ad2v`$V-m zJ@9?F#!Sn=75=ztspu?+76FUDetSO_F5t(1aiKg;VA*2!&qW!qTv!rbESwNtB3vO{ zDLjf*@^`gxjqp<8TH!ijSxCb5!VSWW!cD@>!Y#tB!fnFs!X3h$!d=4M!ac&h!hOR1 z!pnr03$GAfDLf#&N_bE>DXa)>;nl)J!fS+wg;T;K!fS=s39lF4AiPm{lkjHYEy7!c zw+W95Zx sha1 doesn't work in excel viewer ... si.confirmSignature(); + } catch (java.util.ServiceConfigurationError e) { + assumeFalse(true, "running on module-path / JPMS and batik is \"kaputt\" WRT JPMS"); } XmlDocumentPackageInit reinit = diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java index b4bd226083..0df21b2720 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java @@ -22,6 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeFalse; import java.awt.geom.Rectangle2D; import java.io.ByteArrayInputStream; @@ -46,7 +47,7 @@ import org.junit.jupiter.api.Test; import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture; class TestXSLFPictureShape { - private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); + private static final POIDataSamples _slTests = POIDataSamples.getSlideShowInstance(); @Test void testCreate() throws Exception { @@ -287,6 +288,8 @@ class TestXSLFPictureShape { } catch (IIOException ignore) { // Ignore all ImageIO related exceptions like "Can't create output stream!" // which fail often in maven builds because of missing/wrong temp directory + } catch (NoClassDefFoundError ignore) { + assumeFalse(true, "Batik doesn't work on th module-path"); } } } \ No newline at end of file -- 2.39.5