diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java index ccd5f81c2e..3b3898e6fc 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java @@ -608,5 +608,8 @@ public final class CharacterRun return _props.getBrc(); } - + public String toString() { + String text = text(); + return "CharacterRun of " + text.length() + " characters - " + text; + } } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java index 481bd556e1..230bc57919 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java @@ -154,6 +154,14 @@ public final class Picture out.write(_dataStream, pictureBytesStartOffset, size); } } + + /** + * @return The offset of this picture in the picture bytes, used + * when matching up with {@link CharacterRun#getPicOffset()} + */ + public int getStartOffset() { + return dataBlockStartOfsset; + } /** * @return picture's content as byte array