diff --git a/src/scratchpad/src/org/apache/poi/hmef/MAPIAttribute.java b/src/scratchpad/src/org/apache/poi/hmef/MAPIAttribute.java index 81629e1db5..badf25ce71 100644 --- a/src/scratchpad/src/org/apache/poi/hmef/MAPIAttribute.java +++ b/src/scratchpad/src/org/apache/poi/hmef/MAPIAttribute.java @@ -104,7 +104,8 @@ public class MAPIAttribute { MAPIProperty prop = MAPIProperty.get(id); if(id >= 0x8000 && id <= 0xFFFF) { // TODO - throw new UnsupportedOperationException("Not yet implemented for id " + id); + System.err.println("Not yet implemented for id " + id); + break; } // Now read in the value(s) @@ -128,11 +129,10 @@ public class MAPIAttribute { // Data is always padded out to a 4 byte boundary if(len % 4 != 0) { - byte[] padding = new byte[len % 4]; + byte[] padding = new byte[4 - (len % 4)]; IOUtils.readFully(inp, padding); } } - break; } // All done diff --git a/src/scratchpad/src/org/apache/poi/hmef/dev/HMEFDumper.java b/src/scratchpad/src/org/apache/poi/hmef/dev/HMEFDumper.java index 133e9a6345..a64a558a17 100644 --- a/src/scratchpad/src/org/apache/poi/hmef/dev/HMEFDumper.java +++ b/src/scratchpad/src/org/apache/poi/hmef/dev/HMEFDumper.java @@ -37,15 +37,24 @@ public final class HMEFDumper { throw new IllegalArgumentException("Filename must be given"); } - for(String filename : args) { + boolean truncatePropData = true; + for(int i=0; i 0) { - int len = Math.min( attr.getData().length, 48 ); + int len = attr.getData().length; + if(truncatePropertyData) { + len = Math.min( attr.getData().length, 48 ); + } + int loops = len/16; if(loops == 0) loops = 1;