]> source.dussan.org Git - poi.git/commitdiff
optimized unused imports and removed deprecation warnings in poi-ooxml
authorYegor Kozlov <yegor@apache.org>
Mon, 5 Mar 2012 09:42:36 +0000 (09:42 +0000)
committerYegor Kozlov <yegor@apache.org>
Mon, 5 Mar 2012 09:42:36 +0000 (09:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1296977 13f79535-47bb-0310-9956-ffa450edef68

42 files changed:
src/ooxml/java/org/apache/poi/xslf/model/geom/CustomGeometry.java
src/ooxml/java/org/apache/poi/xslf/model/geom/Path.java
src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java
src/ooxml/java/org/apache/poi/xslf/usermodel/TextCap.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFBackground.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFConnectorShape.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBorderFormatting.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFontFormatting.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFChartAxis.java
src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFManualLayout.java
src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFValueAxis.java
src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
src/ooxml/testcases/org/apache/poi/TestEmbeded.java
src/ooxml/testcases/org/apache/poi/openxml4j/OpenXML4JTestDataSamples.java
src/ooxml/testcases/org/apache/poi/xslf/TestXSLFBugs.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShapeContainer.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlide.java
src/ooxml/testcases/org/apache/poi/xssf/io/TestLoadSaveXSSF.java
src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestSheetHiding.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDrawing.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFChartAxis.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFManualLayout.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/charts/TestXSSFValueAxis.java
src/ooxml/testcases/org/apache/poi/xwpf/XWPFTestDataSamples.java
src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFTable.java

index 6745ccd513dc5c2d8bb004806129fde39ead5fcb..5a81c307a5f269caab81a06357264a0a5c753960 100644 (file)
@@ -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
index 94ab37662c1ef913542381dba8eee936ccce152e..3f552a4cf96800854e72f0d0fdea9fc20cc4abd9 100644 (file)
 
 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;
 
index 1d3ed4e11e983f2f36fe84015bd8928c146850b0..462ce3ee29c21808d2e0be09b29e804ffed42147 100644 (file)
@@ -172,6 +172,7 @@ class RenderableShape {
             CTGradientFillProperties gradFill, Rectangle2D anchor,\r
             XSLFTheme theme, CTSchemeColor phClr) {\r
         double angle = gradFill.getLin().getAng() / 60000;\r
+        @SuppressWarnings("deprecation")\r
         CTGradientStop[] gs = gradFill.getGsLst().getGsArray();\r
 \r
         Arrays.sort(gs, new Comparator<CTGradientStop>() {\r
@@ -248,6 +249,7 @@ class RenderableShape {
             CTGradientFillProperties gradFill, Rectangle2D anchor,\r
             XSLFTheme theme, CTSchemeColor phClr) {\r
 \r
+        @SuppressWarnings("deprecation")\r
         CTGradientStop[] gs = gradFill.getGsLst().getGsArray();\r
         Arrays.sort(gs, new Comparator<CTGradientStop>() {\r
             public int compare(CTGradientStop o1, CTGradientStop o2) {\r
@@ -267,6 +269,7 @@ class RenderableShape {
     private static Paint createRadialGradientPaint(\r
             CTGradientFillProperties gradFill, Rectangle2D anchor,\r
             XSLFTheme theme, CTSchemeColor phClr) {\r
+        @SuppressWarnings("deprecation")\r
         CTGradientStop[] gs = gradFill.getGsLst().getGsArray();\r
 \r
         Point2D pCenter = new Point2D.Double(anchor.getX() + anchor.getWidth()/2,\r
@@ -326,7 +329,6 @@ class RenderableShape {
     }\r
 \r
 \r
-    @SuppressWarnings("deprecation") //  getXYZArray() array accessors are deprecated\r
     Paint getPaint(Graphics2D graphics, XmlObject spPr, CTSchemeColor phClr) {\r
 \r
         Paint paint = null;\r
index 2e998efcf0ad30e26e34f4914243bb37039a7842..c4ad6255d828afedcf6e0bb1344d6282b7aa88e3 100644 (file)
 package org.apache.poi.xslf.usermodel;\r
 \r
 /**\r
- * Created by IntelliJ IDEA.\r
- * User: yegor\r
- * Date: 11/3/11\r
- * Time: 5:07 PM\r
- * To change this template use File | Settings | File Templates.\r
+ * @author Yegor Kozlov\r
  */\r
 public enum TextCap {\r
     NONE,\r
index 0c60ec6046875d77705886d2aeb5fa302b0d0150..604c9dff3a63a2f5dc2a53b4d8d4c3e4e43090af 100644 (file)
@@ -20,7 +20,6 @@ package org.apache.poi.xslf.usermodel;
 import org.apache.xmlbeans.XmlObject;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTBackgroundFillStyleList;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor;\r
-import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D;\r
 import org.openxmlformats.schemas.presentationml.x2006.main.CTBackground;\r
index 4018d4d21425a71dab09c0469ecfe2b3952cc318..8cc1c927459eb59010a6222f80d5fdc98d96ddb9 100644 (file)
 package org.apache.poi.xslf.usermodel;\r
 \r
 import org.apache.poi.util.Beta;\r
-import org.apache.poi.xslf.model.geom.Outline;\r
-import org.apache.poi.xslf.model.geom.Path;\r
-import org.openxmlformats.schemas.drawingml.x2006.main.CTLineEndProperties;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;\r
-import org.openxmlformats.schemas.drawingml.x2006.main.STLineEndLength;\r
-import org.openxmlformats.schemas.drawingml.x2006.main.STLineEndType;\r
-import org.openxmlformats.schemas.drawingml.x2006.main.STLineEndWidth;\r
 import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType;\r
 import org.openxmlformats.schemas.presentationml.x2006.main.CTConnector;\r
 import org.openxmlformats.schemas.presentationml.x2006.main.CTConnectorNonVisual;\r
 \r
-import java.awt.Shape;\r
-import java.awt.Graphics2D;\r
-import java.awt.Color;\r
-import java.awt.geom.AffineTransform;\r
-import java.awt.geom.Ellipse2D;\r
-import java.awt.geom.GeneralPath;\r
-import java.awt.geom.Rectangle2D;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
 /**\r
  * Specifies a connection shape.\r
  *\r
index f180aba2073caa85e91c8bfa16a91631ce0d03e7..ca13615b5cfe90a77c18f17cc08c40f58373c6cb 100644 (file)
@@ -24,13 +24,10 @@ import org.apache.poi.util.Beta;
 \r
 import javax.imageio.ImageIO;\r
 import java.awt.Graphics2D;\r
-import java.awt.Image;\r
 import java.awt.geom.AffineTransform;\r
 import java.awt.geom.Rectangle2D;\r
 import java.awt.image.BufferedImage;\r
-import java.io.ByteArrayInputStream;\r
 import java.io.IOException;\r
-import java.io.InputStream;\r
 \r
 /**\r
  * For now this class renders only images supported by the javax.imageio.ImageIO\r
index 5e687b5d798c17668ac905db5e2898f6162f86a2..ba1de4a5478279301528c3d87660469f12208a3e 100644 (file)
@@ -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));
        }
index dde20d7588bd77a3a7cfa05ffd92ae1b3f4208e7..d91f5ca810e1e3f3b3f2e7b88737d5180b81d7bc 100644 (file)
@@ -17,7 +17,6 @@
 package org.apache.poi.xssf.usermodel;\r
 \r
 import org.apache.poi.ss.usermodel.BorderFormatting;\r
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorder;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STBorderStyle;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorderPr;\r
index d633300ae69f687334e7cd6f977d4e5351af56bd..6f97d994a086538306184f692d506114954d9899 100644 (file)
@@ -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;
index eddf983b28c6b93a415cc2d85a51bdf09c568e68..348d903f042e010e4a5711cab79f00e5237a1bb6 100644 (file)
@@ -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));
                }
        }
index e816a841f40bdc8098d852d7722ee8b048bdd4da..64e49f9472a90ea7ff4dc6807ea090b4d9a2ea5e 100644 (file)
@@ -25,10 +25,8 @@ import org.apache.poi.xssf.model.StylesTable;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCfRule;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCfType;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STConditionalFormattingOperator;\r
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;\r
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTStylesheet;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFill;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBorder;\r
 \r
index 72794b6eff9756ea0cac8ff1563de0aae8bff8f6..f682200d20fcefc643567be5c1bc19d5962e7aef 100644 (file)
@@ -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;
 
index 4c9cb54f95ea76e5376524598f823d1c03696883..a5d8bdd4044fcfb81a00b8519e0d146e23d112fa 100644 (file)
@@ -19,8 +19,6 @@
 package org.apache.poi.xssf.usermodel;\r
 \r
 import org.apache.poi.ss.usermodel.*;\r
-import org.apache.poi.hssf.util.HSSFColor;\r
-import org.apache.poi.POIXMLException;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTUnderlineProperty;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues;\r
@@ -29,10 +27,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTVerticalAlignFontProperty;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STVerticalAlignRun;\r
 \r
-import java.util.Map;\r
-import java.util.Iterator;\r
-import java.awt.*;\r
-import java.awt.Font;\r
 \r
 /**\r
  * @author Yegor Kozlov\r
index d22802ab2ab5a9cfa51ef158eb717b03063fb3b0..26327389187fd2be48525914ce36eca863b0d939 100644 (file)
@@ -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;
index 37bede4ca55521e355ad5b43cdcddf388175af95..ee8bbe7e493b955b3ae576f095db143b263bc7fd 100644 (file)
 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.
index 39911f393a8f6b37b4f858343df42b4fb3c814b8..515eb1010a866f53e57b9e9dd32b146e98d16b37 100644 (file)
@@ -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()) {
index 3a0e71de918d3d32af05e14f97de5049090644a3..be812c3dbf6a7e93f24da354c684b6b54a7e867b 100644 (file)
@@ -26,7 +26,6 @@ import org.apache.poi.ss.usermodel.ComparisonOperator;
 import org.apache.poi.ss.util.CellRangeAddress;\r
 import org.apache.poi.ss.SpreadsheetVersion;\r
 import org.apache.poi.hssf.record.cf.CellRangeUtil;\r
-import org.apache.xmlbeans.XmlObject;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCfRule;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCfType;\r
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTConditionalFormatting;\r
@@ -34,7 +33,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STConditionalFormatti
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet;\r
 \r
 import java.util.List;\r
-import java.util.Arrays;\r
 import java.util.ArrayList;\r
 \r
 /**\r
index f208177d9e4bcb186929d19dea6214c235d478e6..62ce224862a3f390ec8ef199b97d84e27b749b74 100644 (file)
@@ -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;
index d2162d05317131eeaccdf92fdf7dcc04c98db643..ca188a266ae99236f657f3ec37143c875dac5081 100644 (file)
@@ -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;
index 273e674ae8502e9510dcfba5ca0e797f29d9dbc2..b71d0c9c1a5d592b0f227bcb1245b24ffe0edddb 100644 (file)
@@ -30,7 +30,6 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea;
 import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayoutMode;\r
 import org.openxmlformats.schemas.drawingml.x2006.chart.CTLayoutTarget;\r
 import org.openxmlformats.schemas.drawingml.x2006.chart.STLayoutMode;\r
-import org.openxmlformats.schemas.drawingml.x2006.chart.STLayoutTarget;\r
 \r
 /**\r
  * Represents a SpreadsheetML manual layout.\r
index 3f701f04b93f2cd0a37ac155d095ac3271c344d1..f4dec487328112ae8fdc4cf60c893e776195b4f3 100644 (file)
@@ -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;
 
index 91a217068acd3a2bfb3c4c088aaf3174510fe4c5..3655affc44146a055c9816421d44bb97dd91b195 100644 (file)
 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;
index dd63f2799f42f7910a1d698fc0d27791065c1363..fee804a9aee5c19a487e68bf33da958d583cd2e1 100644 (file)
@@ -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;
index edf01790663de7593961cf1cdd2760418093c183..bf93681a4bb8993796f737647253779d59926c5e 100644 (file)
@@ -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;
 
 /**
index bc3ae8619b22699be339f797ea9290b9ec055eb3..e971aee47f09a3ce8fc556bb8cc714040b8d2577 100644 (file)
@@ -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");
        
index efdccb65a3d89baa1cf58d33e01cbcfc2d238a66..2cbaeed63e5cf0c8f844aad58ad3d701bb254bff 100644 (file)
@@ -20,7 +20,6 @@ import junit.framework.TestCase;
 import org.apache.poi.xslf.XSLFTestDataSamples;\r
 import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;\r
 \r
-import java.io.IOException;\r
 import java.util.Arrays;\r
 import java.util.HashMap;\r
 import java.util.List;\r
index 8de25d3a2e914871f07f2fc1db0701c26a493e2e..8f8e46d94411ceb3301fdd00460b9ece9787a08a 100644 (file)
 package org.apache.poi.xslf.usermodel;\r
 \r
 import junit.framework.TestCase;\r
-import org.apache.poi.xslf.XSLFTestDataSamples;\r
-\r
-import java.awt.*;\r
-import java.awt.geom.Rectangle2D;\r
 \r
 /**\r
- * test common operatrions on containers of shapes (sheets and groups of shapes)\r
+ * test common operations on containers of shapes (sheets and groups of shapes)\r
  *\r
  * @author Yegor Kozlov\r
  */\r
index 9bba6c269f811f2b051f343b314a6de69b92b103..3d73d41a25d9a9ead3fab957df3a2d2d75903e02 100644 (file)
@@ -20,7 +20,6 @@ import junit.framework.TestCase;
 import org.apache.poi.xslf.XSLFTestDataSamples;\r
 \r
 import java.awt.Color;\r
-import java.io.FileInputStream;\r
 import java.util.Arrays;\r
 \r
 /**\r
index f635eea850334292620f9c90e088cf026a8c8b44..366d853f73418712499abf289744cf36d2f9799d 100644 (file)
@@ -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;
 
 
index 57fcfb9b79ad0a4ab750d473623474af7643ea7a..293c4e893f909c23ae92c22fb2ef04bf25cc717f 100644 (file)
 
 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 {
index 83b952fc316be695f99944607ea2790d44def164..b20670645f04c2c5cee5cc0278b93530cb1f1260 100644 (file)
@@ -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;
 
index 1213256071145365b796e77a6a3e0442c850d531..cd5d52deb02d0de0cfb310598b01fada243686d8 100644 (file)
@@ -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
index a452e5f9cb1bd826c246431150f882543650aeaa..45aed24e477b2c7ade8bb88c47858b8465f1332b 100644 (file)
 
 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 {
index 481c56dd652a269cf203b5ac46044170917760d6..40f8b065ad98e5cbc37e00bea14b97fbf092e256 100644 (file)
 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;
index 305be5136fdc11ae7fc93846feeca0088fb097bb..98db9440ac4d40c84c0f7276c67b0f9f7baec5d1 100644 (file)
@@ -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 {
 
index cceceddff9aa71259fcf7e7f58bba85adc994714..8b5e8d92a70b9ade43273e83a2cf12155203b1cd 100644 (file)
@@ -21,7 +21,6 @@ import junit.framework.TestCase;
 \r
 import org.apache.poi.ss.usermodel.*;\r
 import org.apache.poi.ss.usermodel.charts.ChartLegend;\r
-import org.apache.poi.ss.usermodel.charts.LegendPosition;\r
 import org.apache.poi.ss.usermodel.charts.ManualLayout;\r
 import org.apache.poi.ss.usermodel.charts.LayoutMode;\r
 import org.apache.poi.ss.usermodel.charts.LayoutTarget;\r
index a6f39923ef32f1e7022255ab38d3f13ba18d1f3c..db8ded3707768fc943ce9765a69a69dd514fc700 100644 (file)
@@ -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 {
  
index a6028eb49a141f0d7bd09da4fd349505b1697f59..42707788878fe6afb7effe508f829fba19696109 100644 (file)
@@ -23,7 +23,6 @@ import java.io.InputStream;
 \r
 import org.apache.poi.POIDataSamples;\r
 import org.apache.poi.util.IOUtils;\r
-import org.apache.poi.util.PackageHelper;\r
 import org.apache.poi.xwpf.usermodel.XWPFDocument;\r
 \r
 /**\r
index 7c96a946602ca85ad3e3d009605f0952d2a91207..3df111bfab7ae2d0a692383af279fc170f094469 100644 (file)
@@ -40,6 +40,7 @@ public class TestXWPFDecorators extends TestCase {
         comments = XWPFTestDataSamples.openSampleDocument("WordWithAttachments.docx");
    }
 
+    @SuppressWarnings("deprecation")
    public void testHyperlink() {
       XWPFParagraph ps;
       XWPFParagraph ph;
index 250f710b3a005fc5296652c0fb61af4dfc5a3380..05e4afde8539e3d021dd26b7d6427a74a7a342b1 100644 (file)
 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;
 
index fd9db3b6b7dc5e6593480fc537070fbcad0d78cb..00496b299fd01109334504c50f4c8777e571ade9 100644 (file)
@@ -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;