/** * Create the configuration object for conversions to html */ public static HTMLSettings createHTMLSettings() { return new HTMLSettings(); }
public HtmlExporterNonXSLT(WordprocessingMLPackage wordMLPackage, ConversionImageHandler conversionImageHandler) { htmlSettings = new HTMLSettings(); htmlSettings.setWmlPackage(wordMLPackage); htmlSettings.setImageHandler(conversionImageHandler); }
@Override public void output(javax.xml.transform.Result result) throws Docx4JException { if (wmlPackage==null) { throw new Docx4JException("Must setWmlPackage"); } if (htmlSettings==null) { log.debug("Using empty HtmlSettings"); htmlSettings = new HTMLSettings(); } try { html(wmlPackage, result, htmlSettings); } catch (Exception e) { throw new Docx4JException("Failed to create HTML output", e); } }
@Override protected void initializeSettings(AbstractConversionSettings settings, OpcPackage localOpcPackage) { HTMLSettings htmlSettings = null; if (settings == null) { settings = new HTMLSettings(); } else if (!(settings instanceof HTMLSettings)) { throw new IllegalArgumentException("The class of the settings isn't HtmlSettings, it is " + settings.getClass().getName()); } htmlSettings = (HTMLSettings)settings; super.initializeSettings(htmlSettings, localOpcPackage); fontMapper = htmlSettings.getFontMapper(); if (fontMapper == null) { fontMapper = getWmlPackage().getFontMapper(); } userCSS = htmlSettings.getUserCSS(); userScript = htmlSettings.getUserScript(); userBodyTop = htmlSettings.getUserBodyTop(); userBodyTail = htmlSettings.getUserBodyTail(); styleElementHandler = htmlSettings.getStyleElementHandler(); if (styleElementHandler == null) { styleElementHandler = DEFAULT_STYLE_ELEMENT_HANDLER; } scriptElementHandler = htmlSettings.getScriptElementHandler(); if (scriptElementHandler == null) { scriptElementHandler = DEFAULT_SCRIPT_ELEMENT_HANDLER; } }
/** * Create the configuration object for conversions to html */ public static HTMLSettings createHTMLSettings() { return new HTMLSettings(); }
public HtmlExporterNonXSLT(WordprocessingMLPackage wordMLPackage, ConversionImageHandler conversionImageHandler) { htmlSettings = new HTMLSettings(); htmlSettings.setWmlPackage(wordMLPackage); htmlSettings.setImageHandler(conversionImageHandler); }
@Override public void output(javax.xml.transform.Result result) throws Docx4JException { if (wmlPackage==null) { throw new Docx4JException("Must setWmlPackage"); } if (htmlSettings==null) { log.debug("Using empty HtmlSettings"); htmlSettings = new HTMLSettings(); } try { html(wmlPackage, result, htmlSettings); } catch (Exception e) { throw new Docx4JException("Failed to create HTML output", e); } }
@Override protected void initializeSettings(AbstractConversionSettings settings, OpcPackage localOpcPackage) { HTMLSettings htmlSettings = null; if (settings == null) { settings = new HTMLSettings(); } else if (!(settings instanceof HTMLSettings)) { throw new IllegalArgumentException("The class of the settings isn't HtmlSettings, it is " + settings.getClass().getName()); } htmlSettings = (HTMLSettings)settings; super.initializeSettings(htmlSettings, localOpcPackage); fontMapper = htmlSettings.getFontMapper(); if (fontMapper == null) { fontMapper = getWmlPackage().getFontMapper(); } userCSS = htmlSettings.getUserCSS(); userScript = htmlSettings.getUserScript(); userBodyTop = htmlSettings.getUserBodyTop(); userBodyTail = htmlSettings.getUserBodyTail(); styleElementHandler = htmlSettings.getStyleElementHandler(); if (styleElementHandler == null) { styleElementHandler = DEFAULT_STYLE_ELEMENT_HANDLER; } scriptElementHandler = htmlSettings.getScriptElementHandler(); if (scriptElementHandler == null) { scriptElementHandler = DEFAULT_SCRIPT_ELEMENT_HANDLER; } }