optimized unused imports and removed deprecation warnings in poi-examples
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1296976 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ede267e7a9
commit
d80e8cef5e
@ -23,7 +23,6 @@ import org.apache.poi.hslf.record.TextHeaderAtom;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.File;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,10 +18,8 @@
|
|||||||
package org.apache.poi.hslf.examples;
|
package org.apache.poi.hslf.examples;
|
||||||
|
|
||||||
import org.apache.poi.hslf.usermodel.SlideShow;
|
import org.apache.poi.hslf.usermodel.SlideShow;
|
||||||
import org.apache.poi.hslf.usermodel.RichTextRun;
|
|
||||||
import org.apache.poi.hslf.model.*;
|
import org.apache.poi.hslf.model.*;
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ import org.apache.poi.hslf.model.*;
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.FileInputStream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Demonstrates how to draw into a slide using the HSLF Graphics2D driver.
|
* Demonstrates how to draw into a slide using the HSLF Graphics2D driver.
|
||||||
|
@ -19,16 +19,12 @@ package org.apache.poi.hslf.examples;
|
|||||||
|
|
||||||
import org.apache.poi.hslf.usermodel.*;
|
import org.apache.poi.hslf.usermodel.*;
|
||||||
import org.apache.poi.hslf.model.*;
|
import org.apache.poi.hslf.model.*;
|
||||||
import org.apache.poi.hslf.record.TextHeaderAtom;
|
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.awt.geom.AffineTransform;
|
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,11 +43,11 @@ public class EmeddedObjects {
|
|||||||
//System.out.println(entry.getName() + ": " + embeddedWorkbook.getNumberOfSheets());
|
//System.out.println(entry.getName() + ": " + embeddedWorkbook.getNumberOfSheets());
|
||||||
} else if (oleName.equals("Document")) {
|
} else if (oleName.equals("Document")) {
|
||||||
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
|
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
|
||||||
HWPFDocument embeddedWordDocument = new HWPFDocument(dn, fs);
|
HWPFDocument embeddedWordDocument = new HWPFDocument(dn);
|
||||||
//System.out.println(entry.getName() + ": " + embeddedWordDocument.getRange().text());
|
//System.out.println(entry.getName() + ": " + embeddedWordDocument.getRange().text());
|
||||||
} else if (oleName.equals("Presentation")) {
|
} else if (oleName.equals("Presentation")) {
|
||||||
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
|
DirectoryNode dn = (DirectoryNode) obj.getDirectory();
|
||||||
SlideShow embeddedPowerPointDocument = new SlideShow(new HSLFSlideShow(dn, fs));
|
SlideShow embeddedPowerPointDocument = new SlideShow(new HSLFSlideShow(dn));
|
||||||
//System.out.println(entry.getName() + ": " + embeddedPowerPointDocument.getSlides().length);
|
//System.out.println(entry.getName() + ": " + embeddedPowerPointDocument.getSlides().length);
|
||||||
} else {
|
} else {
|
||||||
if(obj.hasDirectoryEntry()){
|
if(obj.hasDirectoryEntry()){
|
||||||
|
@ -23,7 +23,6 @@ import java.io.IOException ;
|
|||||||
|
|
||||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException ;
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException ;
|
||||||
import org.apache.poi.ss.formula.functions.FreeRefFunction ;
|
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.DefaultUDFFinder ;
|
||||||
import org.apache.poi.ss.formula.udf.UDFFinder ;
|
import org.apache.poi.ss.formula.udf.UDFFinder ;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
package org.apache.poi.xslf.usermodel;
|
package org.apache.poi.xslf.usermodel;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.geom.Rectangle2D;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -19,12 +19,9 @@
|
|||||||
package org.apache.poi.xwpf.usermodel;
|
package org.apache.poi.xwpf.usermodel;
|
||||||
|
|
||||||
import org.apache.poi.util.Units;
|
import org.apache.poi.util.Units;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
|
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Demonstrates how to add pictures in a .docx document
|
* Demonstrates how to add pictures in a .docx document
|
||||||
|
Loading…
Reference in New Issue
Block a user