diff options
Diffstat (limited to 'src/ooxml/java')
8 files changed, 22 insertions, 62 deletions
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java index 71a42ef9e1..0977a403a1 100644 --- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java +++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java @@ -177,7 +177,7 @@ public class SignatureConfig { /** * if true, the signature is added to the existing signatures * - * @since POI 4.0.2 + * @since POI 4.1.0 */ private boolean allowMultipleSignatures = false; @@ -1019,7 +1019,7 @@ public class SignatureConfig { /** * @return true, if multiple signatures can be attached * - * @since POI 4.0.2 + * @since POI 4.1.0 */ public boolean isAllowMultipleSignatures() { return allowMultipleSignatures; @@ -1031,7 +1031,7 @@ public class SignatureConfig { * @param allowMultipleSignatures if true, the signature will be added, * otherwise all existing signatures will be replaced by the current * - * @since POI 4.0.2 + * @since POI 4.1.0 */ public void setAllowMultipleSignatures(boolean allowMultipleSignatures) { this.allowMultipleSignatures = allowMultipleSignatures; diff --git a/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java b/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java index 94b887e04e..2363abb939 100644 --- a/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java +++ b/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java @@ -17,57 +17,12 @@ package org.apache.poi.xdgf.geom; -import java.awt.geom.Dimension2D; - -public class Dimension2dDouble extends Dimension2D { - - double width; - double height; - - public Dimension2dDouble() { - width = 0d; - height = 0d; - } - - public Dimension2dDouble(double width, double height) { - this.width = width; - this.height = height; - } - - @Override - public double getWidth() { - return width; - } - - @Override - public double getHeight() { - return height; - } - - @Override - public void setSize(double width, double height) { - this.width = width; - this.height = height; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof Dimension2dDouble) { - Dimension2dDouble other = (Dimension2dDouble) obj; - return width == other.width && height == other.height; - } - - return false; - } - - @Override - public int hashCode() { - double sum = width + height; - return (int) Math.ceil(sum * (sum + 1) / 2 + width); - } - - @Override - public String toString() { - return "Dimension2dDouble[" + width + ", " + height + "]"; - } +import org.apache.poi.util.Removal; + +/** + * @deprecated in 4.1.0 - use org.apache.poi.util.Dimension2DDouble + */ +@Deprecated +@Removal(version = "5.0.0") +public class Dimension2dDouble extends org.apache.poi.util.Dimension2DDouble { } diff --git a/src/ooxml/java/org/apache/poi/xslf/draw/SVGImageRenderer.java b/src/ooxml/java/org/apache/poi/xslf/draw/SVGImageRenderer.java index 2a03dda691..a40c169516 100644 --- a/src/ooxml/java/org/apache/poi/xslf/draw/SVGImageRenderer.java +++ b/src/ooxml/java/org/apache/poi/xslf/draw/SVGImageRenderer.java @@ -39,6 +39,7 @@ import org.apache.batik.ext.awt.image.renderable.ClipRable8Bit; import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.util.XMLResourceDescriptor; import org.apache.poi.sl.draw.ImageRenderer; +import org.apache.poi.sl.usermodel.PictureData; import org.w3c.dom.Document; public class SVGImageRenderer implements ImageRenderer { @@ -133,4 +134,9 @@ public class SVGImageRenderer implements ImageRenderer { return true; } + + @Override + public boolean canRender(String contentType) { + return PictureData.PictureType.SVG.contentType.equalsIgnoreCase(contentType); + } } diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java index b0cbc59dd1..c5e47415df 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java @@ -310,7 +310,7 @@ public class XMLSlideShow extends POIXMLDocument /** * This method is used to create template for chart XML. * @return Xslf chart object - * @since POI 4.0.2 + * @since POI 4.1.0 */ public XSLFChart createChart() { int chartIdx = findNextAvailableFileNameIndex(XSLFRelation.CHART, _charts.size() + 1); diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java index 5e8d73cd06..97f3ec23ee 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java @@ -112,7 +112,7 @@ public final class XSLFChart extends XDDFChart { * @param rID relation id * @param anchor size and location of chart * @return graphic frame object - * @since POI 4.0.2 + * @since POI 4.1.0 */ static CTGraphicalObjectFrame prototype(int shapeId, String rID, Rectangle2D anchor) { CTGraphicalObjectFrame frame = CTGraphicalObjectFrame.Factory.newInstance(); diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFDrawing.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFDrawing.java index ba93988d0b..dca6fed131 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFDrawing.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFDrawing.java @@ -112,7 +112,7 @@ public class XSLFDrawing { * * @param rID relation id of chart * @param rect2D Chart Bounding values - * @since POI 4.0.2 + * @since POI 4.1.0 */ public void addChart(String rID, Rectangle2D rect2D) { CTGraphicalObjectFrame sp = _spTree.addNewGraphicFrame(); diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java index 2bcf063990..d76142a4c4 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java @@ -724,7 +724,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { * this method will add chart into slide * with default height, width, x and y * @param chart xslf chart object - * @since POI 4.0.2 + * @since POI 4.1.0 */ public void addChart(XSLFChart chart) { Rectangle2D rect2D = new java.awt.Rectangle(XDDFChart.DEFAULT_X, XDDFChart.DEFAULT_Y, @@ -737,7 +737,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { * this method will add chart into slide * with given height, width, x and y * @param chart xslf chart object - * @since POI 4.0.2 + * @since POI 4.1.0 */ public void addChart(XSLFChart chart, Rectangle2D rect2D) { RelationPart rp = addRelation(null, XSLFRelation.CHART, chart); diff --git a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java index b3288d46f3..2ae1293113 100644 --- a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java +++ b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java @@ -139,7 +139,6 @@ public class PPTX2PNG { BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); Graphics2D graphics = img.createGraphics(); - DrawFactory.getInstance(graphics).fixFonts(graphics); // default rendering options graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |