From 34436d6ec79c042ef85bd5b0818ec29ddabf7743 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Tue, 5 Jul 2011 11:58:24 +0000 Subject: [PATCH] add Section.toString() for debug purposes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143011 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hwpf/usermodel/Section.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java index 2e471d52f..3e314f1f1 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Section.java @@ -49,5 +49,21 @@ public final class Section return s; } + @Override + public String toString() + { + return toString( true ); + } + + public String toString( boolean withProperties ) + { + return "Section (" + + getStartOffset() + + "--" + + getEndOffset() + + ")" + + (withProperties ? "\n" + + _props.toString().replaceAll( "\n", "\n\t" ) : ""); + } }