org-odt.el: Export TOC max-level information.

The TOC max level which could be specified by user is lost during the
export operation. However, this information could be useful in particular
with the ODT exporter. So if another script work on the ODT afterward and
ask to re-compute the TOC, the new TOC will keep this max level.

TINYCHANGE.
This commit is contained in:
Jeremy Compostella 2011-11-19 13:43:39 +01:00 committed by Jambunathan K
parent 2ded8ccb85
commit bafffdc5f6
3 changed files with 5 additions and 6 deletions

View File

@ -1886,7 +1886,7 @@ See `org-xhtml-entity-format-callbacks-alist' for more information."
(with-temp-buffer
(org-lparse-bind-local-variables opt-plist)
(erase-buffer)
(org-lparse-begin 'TOC (nth 3 (plist-get opt-plist :lang-words)))
(org-lparse-begin 'TOC (nth 3 (plist-get opt-plist :lang-words)) umax-toc)
(setq
lines
(mapcar

View File

@ -908,14 +908,13 @@ styles congruent with the ODF-1.2 specification."
(defun org-odt-end-footnote-definition (n)
(org-lparse-end-paragraph))
(defun org-odt-begin-toc (lang-specific-heading)
(defun org-odt-begin-toc (lang-specific-heading max-level)
(insert
(format "
<text:table-of-content text:style-name=\"Sect2\" text:protected=\"true\" text:name=\"Table of Contents1\">
<text:table-of-content-source text:outline-level=\"10\">
<text:table-of-content-source text:outline-level=\"%d\">
<text:index-title-template text:style-name=\"Contents_20_Heading\">%s</text:index-title-template>
" lang-specific-heading))
" max-level lang-specific-heading))
(loop for level from 1 upto 10
do (insert (format
"

View File

@ -1067,7 +1067,7 @@ that uses these same face definitions."
(org-lparse-begin-list-item 'unordered)
(insert toc-entry))
(defun org-xhtml-begin-toc (lang-specific-heading)
(defun org-xhtml-begin-toc (lang-specific-heading max-level)
(org-lparse-insert-tag "<div id=\"table-of-contents\">")
(insert
(org-lparse-format 'HEADING lang-specific-heading