fixed
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353234 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b92e4d834b
commit
3852b11786
@ -6,6 +6,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
|||||||
import org.apache.poi.poifs.filesystem.DocumentEntry;
|
import org.apache.poi.poifs.filesystem.DocumentEntry;
|
||||||
|
|
||||||
import org.apache.poi.hwpf.model.hdftypes.*;
|
import org.apache.poi.hwpf.model.hdftypes.*;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
public class HWPFDocFixture
|
public class HWPFDocFixture
|
||||||
@ -23,14 +24,17 @@ public class HWPFDocFixture
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
String filename = System.getProperty("HWPF.testdata.path");
|
||||||
String filename = System.getProperty("HSSF.testdata.path");
|
if (filename == null)
|
||||||
|
{
|
||||||
|
filename = "c:";
|
||||||
|
}
|
||||||
|
|
||||||
filename = filename + "/test.doc";
|
filename = filename + "/test.doc";
|
||||||
|
|
||||||
|
|
||||||
POIFSFileSystem filesystem = new POIFSFileSystem(new FileInputStream(
|
POIFSFileSystem filesystem = new POIFSFileSystem(new FileInputStream(
|
||||||
"C:\\test.doc"));
|
new File(filename)));
|
||||||
|
|
||||||
DocumentEntry documentProps =
|
DocumentEntry documentProps =
|
||||||
(DocumentEntry) filesystem.getRoot().getEntry("WordDocument");
|
(DocumentEntry) filesystem.getRoot().getEntry("WordDocument");
|
||||||
|
Loading…
Reference in New Issue
Block a user