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:
Nick Burch 2016-10-25 10:21:16 +00:00
parent a4988318ec
commit 1f259732c5
2 changed files with 5 additions and 5 deletions

View File

@ -29,10 +29,13 @@ public final class PointerV5 extends Pointer {
}
public boolean destinationHasPointers() {
if(type == 20) return true;
if(type == 22) return false;
if(format == 0x1d || format == 0x1e) return true;
return (0x50 <= format && format < 0x60);
}
public boolean destinationHasChunks() {
if (type == 21) return true;
if (type == 24) return true;
return (0xd0 <= format && format < 0xdf);
}

View File

@ -92,10 +92,7 @@ public final class TestHDGFCore extends TestCase {
assertNotNull(hdgf);
}
/**
* TODO: V5 support is incomplete
*/
public void TODOtestV5() throws Exception {
public void testV5() throws Exception {
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v5_Connection_Types.vsd"));
HDGFDiagram hdgf = new HDGFDiagram(fs);
@ -104,7 +101,7 @@ public final class TestHDGFCore extends TestCase {
VisioTextExtractor textExtractor = new VisioTextExtractor(hdgf);
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 {