summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2007-09-17 16:34:48 +0000
committerNick Burch <nick@apache.org>2007-09-17 16:34:48 +0000
commit10cf53ec200877d2b5850b7790870656775b8124 (patch)
treeecd1a97c65ba78393007812cef465a3ad35978bb
parent4da1dceb380c15da068046ee28619ef823be4fe5 (diff)
downloadpoi-10cf53ec200877d2b5850b7790870656775b8124.tar.gz
poi-10cf53ec200877d2b5850b7790870656775b8124.zip
Convert to use POIDocument
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@576507 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java b/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java
index 14c988ac80..955cbc5ab4 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java
@@ -19,6 +19,7 @@ package org.apache.poi.hdgf;
import java.io.FileInputStream;
import java.io.IOException;
+import org.apache.poi.POIDocument;
import org.apache.poi.hdgf.chunks.ChunkFactory;
import org.apache.poi.hdgf.pointers.Pointer;
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/slide2.png
*/
-public class HDGFDiagram {
+public class HDGFDiagram extends POIDocument {
private static final String VISIO_HEADER = "Visio (TM) Drawing\r\n";
- private POIFSFileSystem filesystem;
private byte[] _docstream;
private short version;
@@ -62,6 +62,9 @@ public class HDGFDiagram {
_docstream = new byte[docProps.getSize()];
filesystem.createDocumentInputStream("VisioDocument").read(_docstream);
+ // Read in the common POI streams
+ readProperties();
+
// Check it's really visio
String typeString = new String(_docstream, 0, 20);
if(! typeString.equals(VISIO_HEADER)) {