From 40b9e5d3835617fcca34f37924ffb10f35c6726c Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Thu, 21 Jul 2011 04:06:12 +0000 Subject: [PATCH] nicer HTML in Word-to-HTML converter for one-section document git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1149033 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hwpf/converter/AbstractWordConverter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java index 41533b0082..78198ce596 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -308,6 +308,12 @@ public abstract class AbstractWordConverter protected void processDocumentPart( HWPFDocumentCore wordDocument, final Range range ) { + if ( range.numSections() == 1 ) + { + processSingleSection( wordDocument, range.getSection( 0 ) ); + return; + } + for ( int s = 0; s < range.numSections(); s++ ) { processSection( wordDocument, range.getSection( s ), s ); -- 2.39.5