remove more deprecated code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-07-16 15:59:28 +00:00
parent 05902bcd11
commit 800da8b290
3 changed files with 3 additions and 58 deletions

View File

@ -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);
}
}

View File

@ -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(),

View File

@ -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());