public class FormattingUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FormattingUtils.Tag |
Modifier and Type | Method and Description |
---|---|
static void |
closeStyleTags(XHTMLContentHandler xhtml,
Deque<FormattingUtils.Tag> formattingState)
Closes all formatting tags.
|
static void |
ensureFormattingState(XHTMLContentHandler xhtml,
EnumSet<FormattingUtils.Tag> desired,
Deque<FormattingUtils.Tag> currentState)
Closes all tags until
currentState contains only tags from desired set,
then open all required tags to reach desired state. |
static EnumSet<FormattingUtils.Tag> |
toTags(org.apache.poi.wp.usermodel.CharacterRun run) |
public static void ensureFormattingState(XHTMLContentHandler xhtml, EnumSet<FormattingUtils.Tag> desired, Deque<FormattingUtils.Tag> currentState) throws SAXException
currentState
contains only tags from desired
set,
then open all required tags to reach desired state.xhtml
- handlerdesired
- desired formatting statecurrentState
- current formatting state (stack of open formatting tags)SAXException
- pass underlying handler exceptionpublic static void closeStyleTags(XHTMLContentHandler xhtml, Deque<FormattingUtils.Tag> formattingState) throws SAXException
xhtml
- handlerformattingState
- current formatting state (stack of open formatting tags)SAXException
- pass underlying handler exceptionpublic static EnumSet<FormattingUtils.Tag> toTags(org.apache.poi.wp.usermodel.CharacterRun run)
Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.