]> source.dussan.org Git - poi.git/commitdiff
insert space instead of tab in lists
authorSergey Vladimirov <sergey@apache.org>
Wed, 21 Sep 2011 21:16:12 +0000 (21:16 +0000)
committerSergey Vladimirov <sergey@apache.org>
Wed, 21 Sep 2011 21:16:12 +0000 (21:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1173864 13f79535-47bb-0310-9956-ffa450edef68

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

index 3a0c978ba30927034b83eb8a6cb4b1b3d30b18dd..cf5ea422f47d2f73c747e5e28442d205583f8647 100644 (file)
@@ -105,6 +105,8 @@ public abstract class AbstractWordConverter
 
     private static final byte SPECCHAR_DRAWN_OBJECT = 8;
 
+    protected static final char UNICODECHAR_NO_BREAK_SPACE = '\u00a0';
+
     protected static final char UNICODECHAR_NONBREAKING_HYPHEN = '\u2011';
 
     protected static final char UNICODECHAR_ZERO_WIDTH_SPACE = '\u200b';
index cffcea56994191a28283fa5cf4cbbe03126e680a..50ec5c2081228dd89f9a217376c9f75b08ee7d9a 100644 (file)
@@ -579,7 +579,9 @@ public class WordToHtmlConverter extends AbstractWordConverter
                     pElement.appendChild( span );
 
                     Text textNode = htmlDocumentFacade.createText( bulletText
-                            .substring( 0, bulletText.length() - 1 ) );
+                            .substring( 0, bulletText.length() - 1 )
+                            + UNICODECHAR_ZERO_WIDTH_SPACE
+                            + UNICODECHAR_NO_BREAK_SPACE );
                     span.appendChild( textNode );
                 }
                 else
@@ -731,8 +733,9 @@ public class WordToHtmlConverter extends AbstractWordConverter
         tableElement
                 .setAttribute(
                         "class",
-                        htmlDocumentFacade.getOrCreateCssClass(
-                                "t", "table-layout:fixed;border-collapse:collapse;border-spacing:0;" ) );
+                        htmlDocumentFacade
+                                .getOrCreateCssClass( "t",
+                                        "table-layout:fixed;border-collapse:collapse;border-spacing:0;" ) );
         if ( tableHeader.hasChildNodes() )
         {
             tableElement.appendChild( tableHeader );