Search in sources :

Example 6 with Border

use of org.olat.core.util.openxml.OpenXMLDocument.Border in project openolat by klemens.

the class HTMLToOpenXMLHandler method appendParagraph.

protected Element appendParagraph(Spacing spacing) {
    // flush the text
    if (textBuffer != null) {
        flushText();
        addContent(currentParagraph);
    }
    Indent indent = getCurrentIndent();
    Border leftBorder = getCurrentLeftBorder();
    PredefinedStyle predefinedStyle = getCurrentPredefinedStyle();
    currentParagraph = factory.createParagraphEl(indent, leftBorder, spacing, predefinedStyle);
    return currentParagraph;
}
Also used : Indent(org.olat.core.util.openxml.OpenXMLDocument.Indent) PredefinedStyle(org.olat.core.util.openxml.OpenXMLDocument.PredefinedStyle) Border(org.olat.core.util.openxml.OpenXMLDocument.Border)

Example 7 with Border

use of org.olat.core.util.openxml.OpenXMLDocument.Border in project OpenOLAT by OpenOLAT.

the class HTMLToOpenXMLHandler method appendParagraph.

protected Element appendParagraph(Spacing spacing) {
    // flush the text
    if (textBuffer != null) {
        flushText();
        addContent(currentParagraph);
    }
    Indent indent = getCurrentIndent();
    Border leftBorder = getCurrentLeftBorder();
    PredefinedStyle predefinedStyle = getCurrentPredefinedStyle();
    currentParagraph = factory.createParagraphEl(indent, leftBorder, spacing, predefinedStyle);
    return currentParagraph;
}
Also used : Indent(org.olat.core.util.openxml.OpenXMLDocument.Indent) PredefinedStyle(org.olat.core.util.openxml.OpenXMLDocument.PredefinedStyle) Border(org.olat.core.util.openxml.OpenXMLDocument.Border)

Example 8 with Border

use of org.olat.core.util.openxml.OpenXMLDocument.Border in project openolat by klemens.

the class HTMLToOpenXMLHandler method getCurrentParagraph.

/**
 * Flush the text if a new paragraph is created. Trailing text is flushed
 * in the previous paragraph.
 * @param create
 * @return
 */
protected Element getCurrentParagraph(boolean create) {
    if (create || currentParagraph == null) {
        // flush the text
        if (textBuffer != null) {
            flushText();
            addContent(currentParagraph);
        }
        Indent indent = getCurrentIndent();
        Border leftBorder = getCurrentLeftBorder();
        PredefinedStyle predefinedStyle = getCurrentPredefinedStyle();
        currentParagraph = factory.createParagraphEl(indent, leftBorder, startSpacing, predefinedStyle);
        // consumed
        startSpacing = null;
    }
    return currentParagraph;
}
Also used : Indent(org.olat.core.util.openxml.OpenXMLDocument.Indent) PredefinedStyle(org.olat.core.util.openxml.OpenXMLDocument.PredefinedStyle) Border(org.olat.core.util.openxml.OpenXMLDocument.Border)

Aggregations

Border (org.olat.core.util.openxml.OpenXMLDocument.Border)8 Indent (org.olat.core.util.openxml.OpenXMLDocument.Indent)6 PredefinedStyle (org.olat.core.util.openxml.OpenXMLDocument.PredefinedStyle)6 Element (org.w3c.dom.Element)2 Node (org.w3c.dom.Node)2