add processing of hyphen chars in Word-to-HTML and Word-to-FO converters
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1149020 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d7e5c4681e
commit
3f0760921f
@ -61,6 +61,10 @@ public abstract class AbstractWordConverter
|
|||||||
|
|
||||||
private static final byte SPECCHAR_AUTONUMBERED_FOOTNOTE_REFERENCE = 2;
|
private static final byte SPECCHAR_AUTONUMBERED_FOOTNOTE_REFERENCE = 2;
|
||||||
|
|
||||||
|
private static final char UNICODECHAR_NONBREAKING_HYPHEN = '\u2011';
|
||||||
|
|
||||||
|
private static final char UNICODECHAR_ZERO_WIDTH_SPACE = '\u200b';
|
||||||
|
|
||||||
private final Set<Bookmark> bookmarkStack = new LinkedHashSet<Bookmark>();
|
private final Set<Bookmark> bookmarkStack = new LinkedHashSet<Bookmark>();
|
||||||
|
|
||||||
private FontReplacer fontReplacer = new DefaultFontReplacer();
|
private FontReplacer fontReplacer = new DefaultFontReplacer();
|
||||||
@ -225,6 +229,16 @@ public abstract class AbstractWordConverter
|
|||||||
}
|
}
|
||||||
processLineBreak( block, characterRun );
|
processLineBreak( block, characterRun );
|
||||||
}
|
}
|
||||||
|
else if ( charChar == 30 )
|
||||||
|
{
|
||||||
|
// Non-breaking hyphens are stored as ASCII 30
|
||||||
|
stringBuilder.append( UNICODECHAR_NONBREAKING_HYPHEN );
|
||||||
|
}
|
||||||
|
else if ( charChar == 31 )
|
||||||
|
{
|
||||||
|
// Non-required hyphens to zero-width space
|
||||||
|
stringBuilder.append( UNICODECHAR_ZERO_WIDTH_SPACE );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stringBuilder.append( charChar );
|
stringBuilder.append( charChar );
|
||||||
|
Loading…
Reference in New Issue
Block a user