diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-07-16 15:59:28 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-07-16 15:59:28 +0000 |
commit | 800da8b29095a06283380f9adb2c1202a23ee57e (patch) | |
tree | 634d10a008d23a6f759529b15d21fd400540f972 /src/ooxml | |
parent | 05902bcd1186d24aeb9a8cdf43ee67bab517ed5f (diff) | |
download | poi-800da8b29095a06283380f9adb2c1202a23ee57e.tar.gz poi-800da8b29095a06283380f9adb2c1202a23ee57e.zip |
remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879965 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml')
3 files changed, 3 insertions, 58 deletions
diff --git a/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java b/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java deleted file mode 100644 index 11e6f3e98e..0000000000 --- a/src/ooxml/java/org/apache/poi/xdgf/geom/Dimension2dDouble.java +++ /dev/null @@ -1,35 +0,0 @@ -/* ==================================================================== - 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 = "6.0.0") -public class Dimension2dDouble extends org.apache.poi.util.Dimension2DDouble { - public Dimension2dDouble() { - super(); - } - - public Dimension2dDouble(double width, double height) { - super(width, height); - } -} diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java index f769dc474e..54d44af122 100644 --- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java +++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java @@ -24,8 +24,6 @@ import com.microsoft.schemas.office.visio.x2012.main.PageType; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.util.Dimension2DDouble; import org.apache.poi.util.Internal; -import org.apache.poi.util.Removal; -import org.apache.poi.xdgf.geom.Dimension2dDouble; /** * Provides the API to work with an underlying page @@ -75,26 +73,8 @@ public class XDGFPage { /** * @return width/height of page - * @deprecated use {@link #getPageDimensions()} */ - @Removal(version = "6.0.0") - @Deprecated - public Dimension2dDouble getPageSize() { - XDGFCell w = _pageSheet.getCell("PageWidth"); - XDGFCell h = _pageSheet.getCell("PageHeight"); - - if (w == null || h == null) - throw new POIXMLException("Cannot determine page size"); - - return new Dimension2dDouble(Double.parseDouble(w.getValue()), - Double.parseDouble(h.getValue())); - } - - /** - * @return width/height of page - * @since POI 5.0.0 - */ - public Dimension2DDouble getPageDimensions() { + public Dimension2DDouble getPageSize() { XDGFCell w = _pageSheet.getCell("PageWidth"); XDGFCell h = _pageSheet.getCell("PageHeight"); @@ -128,7 +108,7 @@ public class XDGFPage { * @return bounding box of page */ public Rectangle2D getBoundingBox() { - Dimension2DDouble sz = getPageDimensions(); + Dimension2DDouble sz = getPageSize(); Point2D.Double offset = getPageOffset(); return new Rectangle2D.Double(-offset.getX(), -offset.getY(), diff --git a/src/ooxml/java/org/apache/poi/xdgf/util/VsdxToPng.java b/src/ooxml/java/org/apache/poi/xdgf/util/VsdxToPng.java index bb4e1be577..e8c96c3355 100644 --- a/src/ooxml/java/org/apache/poi/xdgf/util/VsdxToPng.java +++ b/src/ooxml/java/org/apache/poi/xdgf/util/VsdxToPng.java @@ -61,7 +61,7 @@ public class VsdxToPng { public static void renderToPng(XDGFPage page, File outFile, double scale, ShapeRenderer renderer) throws IOException { - Dimension2DDouble sz = page.getPageDimensions(); + Dimension2DDouble sz = page.getPageSize(); int width = (int) (scale * sz.getWidth()); int height = (int) (scale * sz.getHeight()); |