]> source.dussan.org Git - poi.git/commitdiff
Add a couple of methods to help make debugging problems in hwpf easier
authorNick Burch <nick@apache.org>
Tue, 19 Oct 2010 16:05:16 +0000 (16:05 +0000)
committerNick Burch <nick@apache.org>
Tue, 19 Oct 2010 16:05:16 +0000 (16:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1024302 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/usermodel/CharacterRun.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java

index ccd5f81c2eae05b5fd0e6b0f025907661a44bbc3..3b3898e6fc486c0f7e9d4d85dec79cb60ff6fa20 100644 (file)
@@ -608,5 +608,8 @@ public final class CharacterRun
     return _props.getBrc();
   }
 
-
+  public String toString() {
+     String text = text();
+     return "CharacterRun of " + text.length() + " characters - " + text; 
+  }
 }
index 481bd556e113c8acecc44684f9ed80cf8f698021..230bc57919cb1900f325095513495fa05b677b30 100644 (file)
@@ -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