Class OdfTextParagraph

    • Constructor Detail

      • OdfTextParagraph

        public OdfTextParagraph​(OdfFileDom ownerDoc)
        Creates a new instance of this class
      • OdfTextParagraph

        public OdfTextParagraph​(OdfFileDom ownerDoc,
                                String styleName)
        Creates a new instance of this class with the given style name. If the style name is null or the null string, no style is added.
      • OdfTextParagraph

        public OdfTextParagraph​(OdfFileDom ownerDoc,
                                String styleName,
                                String content)
        Creates an instance of this class with the given styleName and content. If the style name is null or the null string, no style is added. If the content is null or the null string, no content is added.
        Parameters:
        ownerDoc - the owner document DOM
        styleName - the style:style-name value
        content - the paragraph content
    • Method Detail

      • addContent

        public OdfTextParagraph addContent​(String content)
        Add the given content to the paragraph. If the content is null or the null string, no content is added.
        Parameters:
        content - the paragraph content
        Returns:
        the paragraph object
      • addContentWhitespace

        public OdfTextParagraph addContentWhitespace​(String content)
        Add the given content to the paragraph. If the content is null or the null string, no content is added. Embedded \n are converted to <text:line-break> elements, and multiple blanks to <text:s
        Parameters:
        content - the paragraph content
        Returns:
        the paragraph object
      • addStyledContent

        public OdfTextParagraph addStyledContent​(String styleName,
                                                 String content)
        Set a paragraph to have the given styleName and add the given content. If the style name is null or the null string, no style is added. If the content is null or the null string, no content is added.
        Parameters:
        styleName - the style:style-name value
        content - the paragraph content
        Returns:
        the paragraph object
      • addStyledContentWhitespace

        public OdfTextParagraph addStyledContentWhitespace​(String styleName,
                                                           String content)
        Set a paragraph to have the given styleName and add the given content. If the style name is null or the null string, no style is added. If the content is null or the null string, no content is added. Embedded \n are converted to <text:line-break> elements, and multiple blanks to <text:s
        Parameters:
        styleName - the style:style-name value
        content - the paragraph content
        Returns:
        the paragraph object
      • addStyledSpan

        public OdfTextParagraph addStyledSpan​(String styleName,
                                              String content)
        Add a span with the given styleName and content to this paragraph. If the style name is null or the null string, no span is added. If the content is null or the null string, no span is added. Embedded \n are converted to <text:line-break> elements, and multiple blanks to <text:s
        Parameters:
        styleName -
        content -
        Returns:
        the heading object
      • addStyledSpanWhitespace

        public OdfTextParagraph addStyledSpanWhitespace​(String styleName,
                                                        String content)
        Add a span with the given styleName and content to this paragraph. If the style name is null or the null string, no span is added. If the content is null or the null string, no span is added.
        Parameters:
        styleName -
        content -
        Returns:
        the heading object