// See https://github.com/melix/japicmp-gradle-plugin
apply plugin: 'me.champeau.gradle.japicmp'
-- version = '4.0.2-SNAPSHOT'
++ version = '4.1.0-SNAPSHOT'
ext {
japicmpversion = '4.0.0'
}
<description>The Apache POI project Ant build.</description>
-- <property name="version.id" value="4.0.2"/>
++ <property name="version.id" value="4.1.0"/>
<property name="release.rc" value="RC1"/>
<property environment="env"/>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>poi-examples</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>poi-excelant</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>poi-main</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>poi-ooxml-schema-encryption</artifactId>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>poi-ooxml-schema-security</artifactId>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>poi-ooxml-schema</artifactId>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>poi-ooxml</artifactId>
<packaging>jar</packaging>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
<packaging>pom</packaging>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
<name>Apache POI - the Java API for Microsoft Documents</name>
<description>Maven build of Apache POI for Sonar checks</description>
<url>http://poi.apache.org/</url>
<parent>
<groupId>org.apache.poi</groupId>
<artifactId>poi-parent</artifactId>
-- <version>4.0.2-SNAPSHOT</version>
++ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>poi-scratchpad</artifactId>
<packaging>jar</packaging>
import java.awt.Insets;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
-import java.util.ServiceLoader;
import org.apache.poi.sl.usermodel.PictureData;
- import org.apache.poi.sl.usermodel.PictureData.PictureType;
- import org.apache.poi.util.POILogFactory;
- import org.apache.poi.util.POILogger;
import org.apache.poi.sl.usermodel.PictureShape;
import org.apache.poi.sl.usermodel.RectAlign;
+ import org.apache.poi.util.POILogFactory;
+ import org.apache.poi.util.POILogger;
public class DrawPictureShape extends DrawSimpleShape {
private static final POILogger LOG = POILogFactory.getLogger(DrawPictureShape.class);
- private static final String WMF_IMAGE_RENDERER = "org.apache.poi.hwmf.draw.HwmfSLImageRenderer";
-
+ private static final String[] KNOWN_RENDERER = {
+ "org.apache.poi.hwmf.draw.HwmfImageRenderer",
- "org.apache.poi.hemf.draw.HemfImageRenderer"
++ "org.apache.poi.hemf.draw.HemfImageRenderer",
++ "org.apache.poi.xslf.draw.SVGImageRenderer"
+ };
+
public DrawPictureShape(PictureShape<?,?> shape) {
super(shape);
}
--- /dev/null
+ /* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ==================================================================== */
+
+ package org.apache.poi.util;
+
+ import java.awt.geom.Dimension2D;
+
++/**
++ * @since 4.1.0
++ */
+ 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 + "]";
+ }
+ }
/**
* if true, the signature is added to the existing signatures
*
-- * @since POI 4.0.2
++ * @since POI 4.1.0
*/
private boolean allowMultipleSignatures = false;
/**
* @return true, if multiple signatures can be attached
*
-- * @since POI 4.0.2
++ * @since POI 4.1.0
*/
public boolean isAllowMultipleSignatures() {
return allowMultipleSignatures;
* @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;
--- /dev/null
- 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 + "]";
- }
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xdgf.geom;
+
++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 {
+}
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 {
return true;
}
++
++ @Override
++ public boolean canRender(String contentType) {
++ return PictureData.PictureType.SVG.contentType.equalsIgnoreCase(contentType);
++ }
}
/**
* 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);
* @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();
*
* @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();
* 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,
* 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);