Convert to use POIDocument
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@576507 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ed2d78b08b
commit
c733acf8b4
@ -19,6 +19,7 @@ package org.apache.poi.hdgf;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.apache.poi.POIDocument;
|
||||||
import org.apache.poi.hdgf.chunks.ChunkFactory;
|
import org.apache.poi.hdgf.chunks.ChunkFactory;
|
||||||
import org.apache.poi.hdgf.pointers.Pointer;
|
import org.apache.poi.hdgf.pointers.Pointer;
|
||||||
import org.apache.poi.hdgf.pointers.PointerFactory;
|
import org.apache.poi.hdgf.pointers.PointerFactory;
|
||||||
@ -37,10 +38,9 @@ import org.apache.poi.util.LittleEndian;
|
|||||||
* http://www.gnome.ru/projects/docs/slide1.png
|
* http://www.gnome.ru/projects/docs/slide1.png
|
||||||
* http://www.gnome.ru/projects/docs/slide2.png
|
* http://www.gnome.ru/projects/docs/slide2.png
|
||||||
*/
|
*/
|
||||||
public class HDGFDiagram {
|
public class HDGFDiagram extends POIDocument {
|
||||||
private static final String VISIO_HEADER = "Visio (TM) Drawing\r\n";
|
private static final String VISIO_HEADER = "Visio (TM) Drawing\r\n";
|
||||||
|
|
||||||
private POIFSFileSystem filesystem;
|
|
||||||
private byte[] _docstream;
|
private byte[] _docstream;
|
||||||
|
|
||||||
private short version;
|
private short version;
|
||||||
@ -62,6 +62,9 @@ public class HDGFDiagram {
|
|||||||
_docstream = new byte[docProps.getSize()];
|
_docstream = new byte[docProps.getSize()];
|
||||||
filesystem.createDocumentInputStream("VisioDocument").read(_docstream);
|
filesystem.createDocumentInputStream("VisioDocument").read(_docstream);
|
||||||
|
|
||||||
|
// Read in the common POI streams
|
||||||
|
readProperties();
|
||||||
|
|
||||||
// Check it's really visio
|
// Check it's really visio
|
||||||
String typeString = new String(_docstream, 0, 20);
|
String typeString = new String(_docstream, 0, 20);
|
||||||
if(! typeString.equals(VISIO_HEADER)) {
|
if(! typeString.equals(VISIO_HEADER)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user