From: Sergey Vladimirov Date: Wed, 21 Sep 2011 21:16:12 +0000 (+0000) Subject: insert space instead of tab in lists X-Git-Tag: REL_3_8_BETA5~132 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d215e164dca13a1a7d17cb7894537e9fbcfaabf;p=poi.git insert space instead of tab in lists git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1173864 13f79535-47bb-0310-9956-ffa450edef68 --- 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 3a0c978ba3..cf5ea422f4 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -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'; diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java index cffcea5699..50ec5c2081 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java @@ -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 );