mirror of https://github.com/apache/poi.git
v5 text extraction
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1766497 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a4988318ec
commit
1f259732c5
|
@ -29,10 +29,13 @@ public final class PointerV5 extends Pointer {
|
||||||
}
|
}
|
||||||
public boolean destinationHasPointers() {
|
public boolean destinationHasPointers() {
|
||||||
if(type == 20) return true;
|
if(type == 20) return true;
|
||||||
|
if(type == 22) return false;
|
||||||
if(format == 0x1d || format == 0x1e) return true;
|
if(format == 0x1d || format == 0x1e) return true;
|
||||||
return (0x50 <= format && format < 0x60);
|
return (0x50 <= format && format < 0x60);
|
||||||
}
|
}
|
||||||
public boolean destinationHasChunks() {
|
public boolean destinationHasChunks() {
|
||||||
|
if (type == 21) return true;
|
||||||
|
if (type == 24) return true;
|
||||||
return (0xd0 <= format && format < 0xdf);
|
return (0xd0 <= format && format < 0xdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,10 +92,7 @@ public final class TestHDGFCore extends TestCase {
|
||||||
assertNotNull(hdgf);
|
assertNotNull(hdgf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public void testV5() throws Exception {
|
||||||
* TODO: V5 support is incomplete
|
|
||||||
*/
|
|
||||||
public void TODOtestV5() throws Exception {
|
|
||||||
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v5_Connection_Types.vsd"));
|
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v5_Connection_Types.vsd"));
|
||||||
|
|
||||||
HDGFDiagram hdgf = new HDGFDiagram(fs);
|
HDGFDiagram hdgf = new HDGFDiagram(fs);
|
||||||
|
@ -104,7 +101,7 @@ public final class TestHDGFCore extends TestCase {
|
||||||
VisioTextExtractor textExtractor = new VisioTextExtractor(hdgf);
|
VisioTextExtractor textExtractor = new VisioTextExtractor(hdgf);
|
||||||
String text = textExtractor.getText().replace("\u0000", "").trim();
|
String text = textExtractor.getText().replace("\u0000", "").trim();
|
||||||
|
|
||||||
assertEquals("Static to Static\n\nDynamic to Dynamic\n\nDynamic to Static", text);
|
assertEquals("Static to Static\nDynamic to Static\nDynamic to Dynamic", text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testV6NonUtf16LE() throws Exception {
|
public void testV6NonUtf16LE() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue