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

src/examples/src/org/apache/poi/hslf/examples/ApacheconEU08.java
src/examples/src/org/apache/poi/hslf/examples/CreateHyperlink.java
src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java
src/examples/src/org/apache/poi/hslf/examples/PPT2PNG.java
src/examples/src/org/apache/poi/hssf/usermodel/examples/EmeddedObjects.java
src/examples/src/org/apache/poi/ss/examples/formula/UserDefinedFunctionExample.java
src/examples/src/org/apache/poi/xslf/usermodel/Tutorial2.java
src/examples/src/org/apache/poi/xwpf/usermodel/SimpleImages.java

index 91621339b46ac7ea0bae78641048cef1d9c29068..25f1eab9c5e096fe5ce9ae3be6408e87a883ab2a 100644 (file)
@@ -23,7 +23,6 @@ import org.apache.poi.hslf.record.TextHeaderAtom;
 
 import java.io.IOException;
 import java.io.FileOutputStream;
-import java.io.File;
 import java.awt.*;
 
 /**
index c20a2f186f4cc68fd0cbd0524e21145bc1ddaec2..010bf6d6b8e6100b2b3828350a13833522ad8013 100644 (file)
 package org.apache.poi.hslf.examples;
 
 import org.apache.poi.hslf.usermodel.SlideShow;
-import org.apache.poi.hslf.usermodel.RichTextRun;
 import org.apache.poi.hslf.model.*;
 
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.awt.*;
 
index b3d85640e04c17934e8b0a422dc706ad3f563e1f..8d7921146afe48a5674537c5c6197ac83a5f6450 100644 (file)
@@ -22,7 +22,6 @@ import org.apache.poi.hslf.model.*;
 
 import java.awt.*;
 import java.io.FileOutputStream;
-import java.io.FileInputStream;
 
 /**
  * Demonstrates how to draw into a slide using the HSLF Graphics2D driver.
index 2371f0fbf6ae19a2bc0284beaae02225827678a0..99037d3264d95d16e4d0bf0995e32a707cd3cd5a 100644 (file)
@@ -19,16 +19,12 @@ package org.apache.poi.hslf.examples;
 
 import org.apache.poi.hslf.usermodel.*;
 import org.apache.poi.hslf.model.*;
-import org.apache.poi.hslf.record.TextHeaderAtom;
 
 import javax.imageio.ImageIO;
-import java.io.IOException;
 import java.io.FileOutputStream;
-import java.io.File;
 import java.io.FileInputStream;
 import java.awt.*;
 import java.awt.image.BufferedImage;
-import java.awt.geom.AffineTransform;
 import java.awt.geom.Rectangle2D;
 
 /**
index 11d2a3345e65f228a81570f478dde17896a1ead1..bb6f19d0a522682fdb853b1e1d98c979ab375211 100644 (file)
@@ -43,11 +43,11 @@ public class EmeddedObjects {
                 //System.out.println(entry.getName() + ": " + embeddedWorkbook.getNumberOfSheets());\r
             } else if (oleName.equals("Document")) {\r
                 DirectoryNode dn = (DirectoryNode) obj.getDirectory();\r
-                HWPFDocument embeddedWordDocument = new HWPFDocument(dn, fs);\r
+                HWPFDocument embeddedWordDocument = new HWPFDocument(dn);\r
                 //System.out.println(entry.getName() + ": " + embeddedWordDocument.getRange().text());\r
             }  else if (oleName.equals("Presentation")) {\r
                 DirectoryNode dn = (DirectoryNode) obj.getDirectory();\r
-                SlideShow embeddedPowerPointDocument = new SlideShow(new HSLFSlideShow(dn, fs));\r
+                SlideShow embeddedPowerPointDocument = new SlideShow(new HSLFSlideShow(dn));\r
                 //System.out.println(entry.getName() + ": " + embeddedPowerPointDocument.getSlides().length);\r
             } else {\r
                 if(obj.hasDirectoryEntry()){\r
index cd02b6433afa7b6d0ed7e1ed5d4e0ddf988289f8..74dca7d1b68dd26e2e7cee778a2c81a5fab9f50e 100644 (file)
@@ -23,7 +23,6 @@ import java.io.IOException ;
 
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException ;
 import org.apache.poi.ss.formula.functions.FreeRefFunction ;
-import org.apache.poi.ss.formula.udf.AggregatingUDFFinder ;
 import org.apache.poi.ss.formula.udf.DefaultUDFFinder ;
 import org.apache.poi.ss.formula.udf.UDFFinder ;
 import org.apache.poi.ss.usermodel.*;
index d3200755aeb942bcba5c1dcfbacbddde76c1aebb..373f01f33fb9953be24fa8225f7a22fed6e4dee0 100755 (executable)
@@ -20,7 +20,6 @@
 package org.apache.poi.xslf.usermodel;\r
 \r
 import java.awt.*;\r
-import java.awt.geom.Rectangle2D;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
 \r
index 01e7a8bd83703c5dc52e24e8a0315b48f940bcce..10e48d1aed9204f8292f36d26a35df275bd9d5c6 100755 (executable)
 package org.apache.poi.xwpf.usermodel;
 
 import org.apache.poi.util.Units;
-import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
 
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.math.BigInteger;
-import java.util.List;
 
 /**
  * Demonstrates how to add pictures in a .docx document