diff options
author | Yegor Kozlov <yegor@apache.org> | 2012-03-05 09:42:36 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2012-03-05 09:42:36 +0000 |
commit | e3f83511dc4294002fa7d71e3d1eb2952eed41fb (patch) | |
tree | e864adcda0915843425d44256f20d01993ac095c | |
parent | 023ae1711ef2338b08801179d37d0e18e0bdfd1d (diff) | |
download | poi-e3f83511dc4294002fa7d71e3d1eb2952eed41fb.tar.gz poi-e3f83511dc4294002fa7d71e3d1eb2952eed41fb.zip |
optimized unused imports and removed deprecation warnings in poi-ooxml
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1296977 13f79535-47bb-0310-9956-ffa450edef68
42 files changed, 23 insertions, 131 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/model/geom/CustomGeometry.java b/src/ooxml/java/org/apache/poi/xslf/model/geom/CustomGeometry.java index 6745ccd513..5a81c307a5 100644 --- a/src/ooxml/java/org/apache/poi/xslf/model/geom/CustomGeometry.java +++ b/src/ooxml/java/org/apache/poi/xslf/model/geom/CustomGeometry.java @@ -24,7 +24,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.*; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.awt.geom.Rectangle2D; /** * Definition of a custom geometric shape diff --git a/src/ooxml/java/org/apache/poi/xslf/model/geom/Path.java b/src/ooxml/java/org/apache/poi/xslf/model/geom/Path.java index 94ab37662c..3f552a4cf9 100644 --- a/src/ooxml/java/org/apache/poi/xslf/model/geom/Path.java +++ b/src/ooxml/java/org/apache/poi/xslf/model/geom/Path.java @@ -19,14 +19,10 @@ package org.apache.poi.xslf.model.geom; -import org.apache.poi.util.Units; import org.apache.xmlbeans.XmlObject; import org.openxmlformats.schemas.drawingml.x2006.main.*; -import java.awt.Shape; -import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; -import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java index 1d3ed4e11e..462ce3ee29 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java @@ -172,6 +172,7 @@ class RenderableShape { CTGradientFillProperties gradFill, Rectangle2D anchor,
XSLFTheme theme, CTSchemeColor phClr) {
double angle = gradFill.getLin().getAng() / 60000;
+ @SuppressWarnings("deprecation")
CTGradientStop[] gs = gradFill.getGsLst().getGsArray();
Arrays.sort(gs, new Comparator<CTGradientStop>() {
@@ -248,6 +249,7 @@ class RenderableShape { CTGradientFillProperties gradFill, Rectangle2D anchor,
XSLFTheme theme, CTSchemeColor phClr) {
+ @SuppressWarnings("deprecation")
CTGradientStop[] gs = gradFill.getGsLst().getGsArray();
Arrays.sort(gs, new Comparator<CTGradientStop>() {
public int compare(CTGradientStop o1, CTGradientStop o2) {
@@ -267,6 +269,7 @@ class RenderableShape { private static Paint createRadialGradientPaint(
CTGradientFillProperties gradFill, Rectangle2D anchor,
XSLFTheme theme, CTSchemeColor phClr) {
+ @SuppressWarnings("deprecation")
CTGradientStop[] gs = gradFill.getGsLst().getGsArray();
Point2D pCenter = new Point2D.Double(anchor.getX() + anchor.getWidth()/2,
@@ -326,7 +329,6 @@ class RenderableShape { }
- @SuppressWarnings("deprecation") // getXYZArray() array accessors are deprecated
Paint getPaint(Graphics2D graphics, XmlObject spPr, CTSchemeColor phClr) {
Paint paint = null;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/TextCap.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/TextCap.java index 2e998efcf0..c4ad6255d8 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/TextCap.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/TextCap.java @@ -20,11 +20,7 @@ package org.apache.poi.xslf.usermodel;
/**
- * Created by IntelliJ IDEA.
- * User: yegor
- * Date: 11/3/11
- * Time: 5:07 PM
- * To change this template use File | Settings | File Templates.
+ * @author Yegor Kozlov
*/
public enum TextCap {
NONE,
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFBackground.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFBackground.java index 0c60ec6046..604c9dff3a 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFBackground.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFBackground.java @@ -20,7 +20,6 @@ package org.apache.poi.xslf.usermodel; import org.apache.xmlbeans.XmlObject;
import org.openxmlformats.schemas.drawingml.x2006.main.CTBackgroundFillStyleList;
import org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
import org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference;
import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D;
import org.openxmlformats.schemas.presentationml.x2006.main.CTBackground;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java index 4018d4d214..8cc1c92745 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java @@ -20,30 +20,14 @@ package org.apache.poi.xslf.usermodel;
import org.apache.poi.util.Beta;
-import org.apache.poi.xslf.model.geom.Outline;
-import org.apache.poi.xslf.model.geom.Path;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTLineEndProperties;
import org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties;
import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D;
import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
-import org.openxmlformats.schemas.drawingml.x2006.main.STLineEndLength;
-import org.openxmlformats.schemas.drawingml.x2006.main.STLineEndType;
-import org.openxmlformats.schemas.drawingml.x2006.main.STLineEndWidth;
import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType;
import org.openxmlformats.schemas.presentationml.x2006.main.CTConnector;
import org.openxmlformats.schemas.presentationml.x2006.main.CTConnectorNonVisual;
-import java.awt.Shape;
-import java.awt.Graphics2D;
-import java.awt.Color;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Ellipse2D;
-import java.awt.geom.GeneralPath;
-import java.awt.geom.Rectangle2D;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* Specifies a connection shape.
*
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java index f180aba207..ca13615b5c 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java @@ -24,13 +24,10 @@ import org.apache.poi.util.Beta; import javax.imageio.ImageIO;
import java.awt.Graphics2D;
-import java.awt.Image;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.io.InputStream;
/**
* For now this class renders only images supported by the javax.imageio.ImageIO
diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java index 5e687b5d79..ba1de4a547 100644 --- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java +++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java @@ -53,6 +53,9 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor implements org.apach private boolean includeCellComments = false; private boolean includeHeadersFooters = true; + /** + * @deprecated Use {@link #XSSFExcelExtractor(org.apache.poi.openxml4j.opc.OPCPackage)} instead. + */ public XSSFExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException { this(new XSSFWorkbook(path)); } diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java index dde20d7588..d91f5ca810 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java @@ -17,7 +17,6 @@ package org.apache.poi.xssf.usermodel;
import org.apache.poi.ss.usermodel.BorderFormatting;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorder;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STBorderStyle;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorderPr;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java index d633300ae6..6f97d994a0 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java @@ -33,12 +33,9 @@ import org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder; import org.apache.poi.xssf.usermodel.extensions.XSSFCellFill; import org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder.BorderSide; import org.apache.xmlbeans.XmlException; -import org.apache.xmlbeans.XmlToken; -import org.w3c.dom.Node; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorder; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorderPr; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellAlignment; -import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellProtection; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFill; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPatternFill; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java index eddf983b28..348d903f04 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java @@ -47,14 +47,10 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTChart; import org.openxmlformats.schemas.drawingml.x2006.chart.CTChartSpace; import org.openxmlformats.schemas.drawingml.x2006.chart.CTTitle; import org.openxmlformats.schemas.drawingml.x2006.chart.ChartSpaceDocument; -import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayout; -import org.openxmlformats.schemas.drawingml.x2006.chart.CTManualLayout; import org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea; import org.openxmlformats.schemas.drawingml.x2006.chart.CTValAx; import org.openxmlformats.schemas.drawingml.x2006.chart.CTPrintSettings; import org.openxmlformats.schemas.drawingml.x2006.chart.CTPageMargins; -import org.openxmlformats.schemas.drawingml.x2006.chart.STLayoutTarget; -import org.openxmlformats.schemas.drawingml.x2006.chart.STLayoutMode; import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId; import org.w3c.dom.NodeList; import org.w3c.dom.Text; @@ -295,7 +291,7 @@ public final class XSSFChart extends POIXMLDocumentPart implements Chart, ChartA } private void parseValueAxis() { - for (CTValAx valAx : chart.getPlotArea().getValAxArray()) { + for (CTValAx valAx : chart.getPlotArea().getValAxList()) { axis.add(new XSSFValueAxis(this, valAx)); } } diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java index e816a841f4..64e49f9472 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java @@ -25,10 +25,8 @@ import org.apache.poi.xssf.model.StylesTable; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCfRule;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCfType;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STConditionalFormattingOperator;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTStylesheet;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFill;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorder;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java index 72794b6eff..f682200d20 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java @@ -38,7 +38,6 @@ import org.apache.poi.xssf.model.CommentsTable; import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlObject; import org.apache.xmlbeans.XmlOptions; -import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.*; import org.openxmlformats.schemas.officeDocument.x2006.relationships.STRelationshipId; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java index 4c9cb54f95..a5d8bdd404 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java @@ -19,8 +19,6 @@ package org.apache.poi.xssf.usermodel;
import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.hssf.util.HSSFColor;
-import org.apache.poi.POIXMLException;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTUnderlineProperty;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues;
@@ -29,10 +27,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTVerticalAlignFontProperty;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STVerticalAlignRun;
-import java.util.Map;
-import java.util.Iterator;
-import java.awt.*;
-import java.awt.Font;
/**
* @author Yegor Kozlov
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java index d22802ab2a..2632738918 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java @@ -21,9 +21,7 @@ package org.apache.poi.xssf.usermodel; import javax.xml.namespace.QName; -import org.apache.poi.openxml4j.opc.PackageRelationship; import org.apache.poi.util.Internal; -import org.apache.xmlbeans.XmlObject; import org.apache.xmlbeans.XmlCursor; import org.openxmlformats.schemas.drawingml.x2006.main.*; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGraphicalObjectFrame; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java index 37bede4ca5..ee8bbe7e49 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java @@ -18,13 +18,7 @@ package org.apache.poi.xssf.usermodel; import java.awt.Dimension; -import java.awt.image.BufferedImage; import java.io.IOException; -import java.util.Iterator; - -import javax.imageio.ImageIO; -import javax.imageio.ImageReader; -import javax.imageio.stream.ImageInputStream; import org.apache.poi.POIXMLDocumentPart; import org.apache.poi.openxml4j.opc.PackagePart; @@ -47,8 +41,6 @@ import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPictureNonVisual; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCol; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; /** * Represents a picture shape in a SpreadsheetML drawing. diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java index 39911f393a..515eb1010a 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java @@ -496,7 +496,6 @@ public class XSSFRichTextString implements RichTextString { return buf.toString(); } - @SuppressWarnings("deprecation") void applyFont(TreeMap<Integer, CTRPrElt> formats, int startIndex, int endIndex, CTRPrElt fmt) { // delete format runs that fit between startIndex and endIndex // runs intersecting startIndex and endIndex remain @@ -527,18 +526,19 @@ public class XSSFRichTextString implements RichTextString { while(sub.size() > 1) sub.remove(sub.lastKey()); } - TreeMap<Integer, CTRPrElt> getFormatMap(CTRst entry){ - int length = 0; - TreeMap<Integer, CTRPrElt> formats = new TreeMap<Integer, CTRPrElt>(); - for (CTRElt r : entry.getRArray()) { - String txt = r.getT(); - CTRPrElt fmt = r.getRPr(); - - length += txt.length(); - formats.put(length, fmt); - } - return formats; + @SuppressWarnings("deprecation") + TreeMap<Integer, CTRPrElt> getFormatMap(CTRst entry){ + int length = 0; + TreeMap<Integer, CTRPrElt> formats = new TreeMap<Integer, CTRPrElt>(); + for (CTRElt r : entry.getRArray()) { + String txt = r.getT(); + CTRPrElt fmt = r.getRPr(); + + length += txt.length(); + formats.put(length, fmt); } + return formats; + } CTRst buildCTRst(String text, TreeMap<Integer, CTRPrElt> formats){ if(text.length() != formats.lastKey()) { diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java index 3a0e71de91..be812c3dbf 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java @@ -26,7 +26,6 @@ import org.apache.poi.ss.usermodel.ComparisonOperator; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.hssf.record.cf.CellRangeUtil;
-import org.apache.xmlbeans.XmlObject;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCfRule;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCfType;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTConditionalFormatting;
@@ -34,7 +33,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STConditionalFormatti import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet;
import java.util.List;
-import java.util.Arrays;
import java.util.ArrayList;
/**
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java index f208177d9e..62ce224862 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java @@ -18,7 +18,6 @@ package org.apache.poi.xssf.usermodel; import org.apache.poi.hssf.util.HSSFColor; -import org.apache.poi.ss.usermodel.IndexedColors; import org.openxmlformats.schemas.drawingml.x2006.main.*; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShapeNonVisual; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFChartAxis.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFChartAxis.java index d2162d0531..ca188a266a 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFChartAxis.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFChartAxis.java @@ -23,7 +23,6 @@ import org.apache.poi.ss.usermodel.charts.AxisOrientation; import org.apache.poi.ss.usermodel.charts.AxisCrosses; import org.apache.poi.util.Beta; import org.apache.poi.xssf.usermodel.XSSFChart; -import org.openxmlformats.schemas.drawingml.x2006.chart.CTChart; import org.openxmlformats.schemas.drawingml.x2006.chart.CTAxPos; import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumFmt; import org.openxmlformats.schemas.drawingml.x2006.chart.CTCrosses; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFManualLayout.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFManualLayout.java index 273e674ae8..b71d0c9c1a 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFManualLayout.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFManualLayout.java @@ -30,7 +30,6 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea; import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayoutMode;
import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayoutTarget;
import org.openxmlformats.schemas.drawingml.x2006.chart.STLayoutMode;
-import org.openxmlformats.schemas.drawingml.x2006.chart.STLayoutTarget;
/**
* Represents a SpreadsheetML manual layout.
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFValueAxis.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFValueAxis.java index 3f701f04b9..f4dec48732 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFValueAxis.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFValueAxis.java @@ -31,7 +31,6 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTAxPos; import org.openxmlformats.schemas.drawingml.x2006.chart.CTNumFmt; import org.openxmlformats.schemas.drawingml.x2006.chart.CTCrosses; import org.openxmlformats.schemas.drawingml.x2006.chart.CTScaling; -import org.openxmlformats.schemas.drawingml.x2006.chart.STAxPos; import org.openxmlformats.schemas.drawingml.x2006.chart.STCrossBetween; import org.openxmlformats.schemas.drawingml.x2006.chart.STTickLblPos; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java index 91a217068a..3655affc44 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java @@ -18,20 +18,10 @@ package org.apache.poi.xssf.usermodel.helpers; import java.util.Arrays; -import java.util.Iterator; -import java.text.AttributedString; -import java.text.NumberFormat; -import java.text.DecimalFormat; -import java.awt.font.TextLayout; -import java.awt.font.FontRenderContext; -import java.awt.font.TextAttribute; -import java.awt.geom.AffineTransform; import org.apache.poi.ss.usermodel.CellStyle; -import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.util.CTColComparator; import org.apache.poi.xssf.util.NumericRanges; -import org.apache.poi.xssf.usermodel.*; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCol; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCols; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet; diff --git a/src/ooxml/testcases/org/apache/poi/TestEmbeded.java b/src/ooxml/testcases/org/apache/poi/TestEmbeded.java index dd63f2799f..fee804a9ae 100644 --- a/src/ooxml/testcases/org/apache/poi/TestEmbeded.java +++ b/src/ooxml/testcases/org/apache/poi/TestEmbeded.java @@ -19,8 +19,6 @@ package org.apache.poi; -import java.io.File; - import org.apache.poi.util.IOUtils; import org.apache.poi.xslf.XSLFSlideShow; import org.apache.poi.xssf.usermodel.XSSFWorkbook; diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/OpenXML4JTestDataSamples.java b/src/ooxml/testcases/org/apache/poi/openxml4j/OpenXML4JTestDataSamples.java index edf0179066..bf93681a4b 100644 --- a/src/ooxml/testcases/org/apache/poi/openxml4j/OpenXML4JTestDataSamples.java +++ b/src/ooxml/testcases/org/apache/poi/openxml4j/OpenXML4JTestDataSamples.java @@ -21,8 +21,6 @@ import org.apache.poi.POIDataSamples; import org.apache.poi.util.TempFile; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.InputStream; /** diff --git a/src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java b/src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java index bc3ae8619b..e971aee47f 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java @@ -29,6 +29,7 @@ import java.util.List; public class TestXSLFBugs extends TestCase { + @SuppressWarnings("deprecation") public void test51187() throws Exception { XMLSlideShow ss = XSLFTestDataSamples.openSampleDocument("51187.pptx"); 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 efdccb65a3..2cbaeed63e 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java @@ -20,7 +20,6 @@ import junit.framework.TestCase; import org.apache.poi.xslf.XSLFTestDataSamples;
import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
-import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShapeContainer.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShapeContainer.java index 8de25d3a2e..8f8e46d944 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShapeContainer.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShapeContainer.java @@ -19,13 +19,9 @@ package org.apache.poi.xslf.usermodel;
import junit.framework.TestCase;
-import org.apache.poi.xslf.XSLFTestDataSamples;
-
-import java.awt.*;
-import java.awt.geom.Rectangle2D;
/**
- * test common operatrions on containers of shapes (sheets and groups of shapes)
+ * test common operations on containers of shapes (sheets and groups of shapes)
*
* @author Yegor Kozlov
*/
diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java index 9bba6c269f..3d73d41a25 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java @@ -20,7 +20,6 @@ import junit.framework.TestCase; import org.apache.poi.xslf.XSLFTestDataSamples;
import java.awt.Color;
-import java.io.FileInputStream;
import java.util.Arrays;
/**
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/io/TestLoadSaveXSSF.java b/src/ooxml/testcases/org/apache/poi/xssf/io/TestLoadSaveXSSF.java index f635eea850..366d853f73 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/io/TestLoadSaveXSSF.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/io/TestLoadSaveXSSF.java @@ -17,7 +17,6 @@ package org.apache.poi.xssf.io; -import java.io.File; import java.util.List; import junit.framework.TestCase; @@ -28,7 +27,6 @@ import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFPictureData; -import org.apache.poi.xssf.XSSFITestDataProvider; import org.apache.poi.POIDataSamples; diff --git a/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java b/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java index 57fcfb9b79..293c4e893f 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java @@ -17,14 +17,8 @@ package org.apache.poi.xssf.model; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.util.List; - -import junit.framework.AssertionFailedError; import junit.framework.TestCase; -import org.apache.poi.POIXMLDocumentPart; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.XSSFTestDataSamples; import org.apache.poi.xssf.usermodel.*; @@ -32,7 +26,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCommentList; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComments; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst; -import org.openxmlformats.schemas.spreadsheetml.x2006.main.CommentsDocument; public class TestCommentsTable extends TestCase { diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java index 83b952fc31..b20670645f 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java @@ -17,8 +17,6 @@ package org.apache.poi.xssf.usermodel; -import junit.framework.TestCase; -import org.apache.poi.xssf.XSSFTestDataSamples; import org.apache.poi.xssf.XSSFITestDataProvider; import org.apache.poi.ss.usermodel.BaseTestSheetHiding; diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java index 1213256071..cd5d52deb0 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java @@ -25,15 +25,11 @@ import junit.framework.TestCase; import org.apache.poi.POIXMLDocumentPart; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.ss.usermodel.FontUnderline; -import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.xssf.XSSFTestDataSamples; -import org.apache.poi.xssf.dev.XSSFDump; -import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph; import org.openxmlformats.schemas.drawingml.x2006.main.STTextUnderlineType; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTDrawing; -import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape; /** * @author Yegor Kozlov diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java index a452e5f9cb..45aed24e47 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java @@ -17,11 +17,8 @@ package org.apache.poi.xssf.usermodel; -import junit.framework.TestCase; - import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellReference; -import org.apache.poi.xssf.XSSFTestDataSamples; import org.apache.poi.xssf.XSSFITestDataProvider; public final class TestXSSFFormulaEvaluation extends BaseTestFormulaEvaluator { diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java index 481c56dd65..40f8b065ad 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java @@ -18,13 +18,10 @@ package org.apache.poi.xssf.usermodel; import java.io.IOException; -import java.io.StringWriter; import java.util.TreeMap; import junit.framework.TestCase; -import org.apache.poi.POIXMLDocumentPart; -import org.apache.xmlbeans.XmlOptions; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STXstring; diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFChartAxis.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFChartAxis.java index 305be5136f..98db9440ac 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFChartAxis.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFChartAxis.java @@ -21,7 +21,6 @@ import junit.framework.TestCase; import org.apache.poi.ss.usermodel.charts.*; import org.apache.poi.xssf.usermodel.*; -import org.apache.poi.xssf.usermodel.charts.*; public final class TestXSSFChartAxis extends TestCase { diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFManualLayout.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFManualLayout.java index cceceddff9..8b5e8d92a7 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFManualLayout.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFManualLayout.java @@ -21,7 +21,6 @@ import junit.framework.TestCase; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.charts.ChartLegend;
-import org.apache.poi.ss.usermodel.charts.LegendPosition;
import org.apache.poi.ss.usermodel.charts.ManualLayout;
import org.apache.poi.ss.usermodel.charts.LayoutMode;
import org.apache.poi.ss.usermodel.charts.LayoutTarget;
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFValueAxis.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFValueAxis.java index a6f39923ef..db8ded3707 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFValueAxis.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFValueAxis.java @@ -21,7 +21,6 @@ import junit.framework.TestCase; import org.apache.poi.ss.usermodel.charts.*; import org.apache.poi.xssf.usermodel.*; -import org.apache.poi.xssf.usermodel.charts.*; public final class TestXSSFValueAxis extends TestCase { diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/XWPFTestDataSamples.java b/src/ooxml/testcases/org/apache/poi/xwpf/XWPFTestDataSamples.java index a6028eb49a..4270778887 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/XWPFTestDataSamples.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/XWPFTestDataSamples.java @@ -23,7 +23,6 @@ import java.io.InputStream; import org.apache.poi.POIDataSamples;
import org.apache.poi.util.IOUtils;
-import org.apache.poi.util.PackageHelper;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
/**
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java index 7c96a94660..3df111bfab 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java @@ -40,6 +40,7 @@ public class TestXWPFDecorators extends TestCase { comments = XWPFTestDataSamples.openSampleDocument("WordWithAttachments.docx"); } + @SuppressWarnings("deprecation") public void testHyperlink() { XWPFParagraph ps; XWPFParagraph ph; diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java index 250f710b3a..05e4afde85 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java @@ -18,17 +18,12 @@ package org.apache.poi.xwpf.usermodel; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.lang.String; import java.math.BigInteger; import junit.framework.TestCase; import org.apache.poi.xwpf.XWPFTestDataSamples; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn; import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFtnEdn; diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java index fd9db3b6b7..00496b299f 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java @@ -23,15 +23,12 @@ import junit.framework.TestCase; import org.apache.poi.xwpf.XWPFTestDataSamples; import org.apache.poi.xwpf.usermodel.XWPFTable.XWPFBorderType; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar; -import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText; import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder; |