]> source.dussan.org Git - poi.git/commitdiff
nicer HTML in Word-to-HTML converter for one-section document
authorSergey Vladimirov <sergey@apache.org>
Thu, 21 Jul 2011 04:06:12 +0000 (04:06 +0000)
committerSergey Vladimirov <sergey@apache.org>
Thu, 21 Jul 2011 04:06:12 +0000 (04:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1149033 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java

index 41533b00829123d38e686a28e90275c604d6f422..78198ce5966313c773a6823490ad651d30cbfb26 100644 (file)
@@ -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 );