Patch from bug #45003 - Support embeded HDGF visio documents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@658352 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e09c35f448
commit
15db21d326
@ -37,6 +37,7 @@
|
||||
|
||||
<!-- Don't forget to update status.xml too! -->
|
||||
<release version="3.1-final" date="2008-06-??">
|
||||
<action dev="POI-DEVELOPERS" type="add">45003 - Support embeded HDGF visio documents</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">45001 - Partial fix for HWPF Range.insertBefore() and Range.delete() with unicode characters</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">44977 - Support for AM/PM in excel date formats</action>
|
||||
<action dev="POI-DEVELOPERS" type="add">Support for specifying a policy to HSSF on missing / blank cells when fetching</action>
|
||||
|
@ -34,6 +34,7 @@
|
||||
<!-- Don't forget to update changes.xml too! -->
|
||||
<changes>
|
||||
<release version="3.1-final" date="2008-06-??">
|
||||
<action dev="POI-DEVELOPERS" type="add">45003 - Support embeded HDGF visio documents</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">45001 - Partial fix for HWPF Range.insertBefore() and Range.delete() with unicode characters</action>
|
||||
<action dev="POI-DEVELOPERS" type="fix">44977 - Support for AM/PM in excel date formats</action>
|
||||
<action dev="POI-DEVELOPERS" type="add">Support for specifying a policy to HSSF on missing / blank cells when fetching</action>
|
||||
|
@ -28,6 +28,7 @@ import org.apache.poi.hdgf.streams.PointerContainingStream;
|
||||
import org.apache.poi.hdgf.streams.Stream;
|
||||
import org.apache.poi.hdgf.streams.StringsStream;
|
||||
import org.apache.poi.hdgf.streams.TrailerStream;
|
||||
import org.apache.poi.poifs.filesystem.DirectoryNode;
|
||||
import org.apache.poi.poifs.filesystem.DocumentEntry;
|
||||
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
@ -54,14 +55,17 @@ public class HDGFDiagram extends POIDocument {
|
||||
private PointerFactory ptrFactory;
|
||||
|
||||
public HDGFDiagram(POIFSFileSystem fs) throws IOException {
|
||||
super(fs);
|
||||
this(fs.getRoot(), fs);
|
||||
}
|
||||
public HDGFDiagram(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
|
||||
super(dir, fs);
|
||||
|
||||
DocumentEntry docProps =
|
||||
(DocumentEntry)filesystem.getRoot().getEntry("VisioDocument");
|
||||
(DocumentEntry)dir.getEntry("VisioDocument");
|
||||
|
||||
// Grab the document stream
|
||||
_docstream = new byte[docProps.getSize()];
|
||||
filesystem.createDocumentInputStream("VisioDocument").read(_docstream);
|
||||
dir.createDocumentInputStream("VisioDocument").read(_docstream);
|
||||
|
||||
// Read in the common POI streams
|
||||
readProperties();
|
||||
|
Loading…
Reference in New Issue
Block a user