poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1766497 - in /poi/trunk/src/scratchpad: src/org/apache/poi/hdgf/pointers/PointerV5.java testcases/org/apache/poi/hdgf/TestHDGFCore.java
Date Tue, 25 Oct 2016 10:21:17 GMT
Author: nick
Date: Tue Oct 25 10:21:16 2016
New Revision: 1766497

URL: http://svn.apache.org/viewvc?rev=1766497&view=rev
Log:
v5 text extraction

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/pointers/PointerV5.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/pointers/PointerV5.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/pointers/PointerV5.java?rev=1766497&r1=1766496&r2=1766497&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/pointers/PointerV5.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/pointers/PointerV5.java Tue Oct 25 10:21:16
2016
@@ -29,10 +29,13 @@ public final class PointerV5 extends Poi
     }
     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);
     }
 

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java?rev=1766497&r1=1766496&r2=1766497&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFCore.java Tue Oct 25 10:21:16
2016
@@ -92,10 +92,7 @@ public final class TestHDGFCore extends
       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
         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 {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message