org-odt: Rename style `OrgSourceBlock' to `OrgFixedWidthBlock'

* contrib/odt/styles/OrgOdtStyles.xml: Rename the style
`OrgSourceBlock' to `OrgFixedWidthBlock'.
* contrib/lisp/org-odt.el
(org-export-odt-default-org-styles-alist): Map fixedwidth
paragraphs to the custom style `OrgFixedWidthBlock'.
(org-odt-format-line, org-odt-format-source-code-or-example):
Style both fixedwidth paragraphs and src/example blocks in
fixedwidth format.
This commit is contained in:
Jambunathan K 2011-08-17 01:14:04 +05:30
parent 1ab7fbeb46
commit ad9f393b61
2 changed files with 7 additions and 5 deletions

View File

@ -227,7 +227,7 @@ be linked only."
(defvar org-export-odt-default-org-styles-alist
'((paragraph . ((default . "Text_20_body")
(fixedwidth . "OrgSourceBlock")
(fixedwidth . "OrgFixedWidthBlock")
(verse . "OrgVerse")
(quote . "Quotations")
(blockquote . "Quotations")
@ -834,8 +834,8 @@ PUB-DIR is set, use this as the publishing directory."
(case org-lparse-dyn-current-environment
(fixedwidth (concat
(org-odt-format-stylized-paragraph
'src (org-odt-fill-tabs-and-spaces
(org-xml-encode-plain-text line))) "\n"))
'fixedwidth (org-odt-fill-tabs-and-spaces
(org-xml-encode-plain-text line))) "\n"))
(t (concat line "\n"))))
(defun org-odt-format-comment (fmt &rest args)
@ -859,7 +859,7 @@ PUB-DIR is set, use this as the publishing directory."
(mapconcat
(lambda (line)
(org-odt-format-stylized-paragraph
'src (org-odt-fill-tabs-and-spaces line)))
'fixedwidth (org-odt-fill-tabs-and-spaces line)))
(org-split-string lines "[\r\n]") "\n"))
(defun org-xml-encode-plain-text-lines (rtn)

View File

@ -244,11 +244,13 @@
<style:background-image/>
</style:paragraph-properties>
</style:style>
<style:style style:name="OrgSourceBlock" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">
<style:style style:name="OrgFixedWidthBlock" style:family="paragraph" style:parent-style-name="Preformatted_20_Text">
<style:paragraph-properties fo:background-color="#c0c0c0" fo:padding="0.049cm" fo:border="0.018cm solid #000000" style:shadow="none">
<style:background-image/>
</style:paragraph-properties>
</style:style>
<style:style style:name="OrgCenter" style:family="paragraph" style:parent-style-name="Text_20_body">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
</style:style>