Function: org-odt--format-paragraph

org-odt--format-paragraph is a byte-compiled function defined in ox-odt.el.gz.

Signature

(org-odt--format-paragraph PARAGRAPH CONTENTS INFO DEFAULT CENTER QUOTE)

Documentation

Format paragraph according to given styles.

PARAGRAPH is a paragraph type element. CONTENTS is the transcoded contents of that paragraph, as a string. INFO is a plist used as a communication channel. DEFAULT, CENTER and QUOTE are, respectively, style to use when paragraph belongs to no special environment, a center block, or a quote block.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-odt.el.gz
(defun org-odt--format-paragraph (paragraph contents info default center quote)
  "Format paragraph according to given styles.
PARAGRAPH is a paragraph type element.  CONTENTS is the
transcoded contents of that paragraph, as a string.  INFO is
a plist used as a communication channel.  DEFAULT, CENTER and
QUOTE are, respectively, style to use when paragraph belongs to
no special environment, a center block, or a quote block."
  (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
	  (cl-case (org-odt--paragraph-style paragraph)
	    (quoted quote)
	    (centered center)
	    (otherwise default))
	  ;; If PARAGRAPH is a leading paragraph in an item that has
	  ;; a checkbox, splice checkbox and paragraph contents
	  ;; together.
	  (concat (let ((parent (org-element-property :parent paragraph)))
		    (and (eq (org-element-type parent) 'item)
			 (not (org-export-get-previous-element paragraph info))
			 (org-odt--checkbox parent)))
		  contents)))