0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 16:16:29 +00:00

org-odt.el: Improve TOC entries

This commit is contained in:
Jambunathan K 2012-12-15 22:05:16 +05:30 committed by Bastien Guerry
parent 6e3e0176e3
commit fddc312c29

View file

@ -1110,18 +1110,33 @@ See `org-e-odt--build-date-styles' for implementation details."
(defun* org-e-odt-format-toc-headline (defun* org-e-odt-format-toc-headline
(todo todo-type priority text tags (todo todo-type priority text tags
&key level section-number headline-label &allow-other-keys) &key level section-number headline-label &allow-other-keys)
(setq text (concat (setq text
(and org-export-with-section-numbers (concat
(concat section-number ". ")) ;; Section number.
text (when section-number (concat section-number ". "))
(and tags ;; Todo.
(concat (when todo
"<text:tab/>" (let ((style (if (member todo org-done-keywords)
(format "<text:span text:style-name=\"%s\">%s</text:span>" "OrgDone" "OrgTodo")))
"OrgTag" tags))))) (format "<text:span text:style-name=\"%s\">%s</text:span> "
(when todo style todo)))
(setq text (format "<text:span text:style-name=\"%s\">%s</text:span>" (when priority
"OrgTodo" text))) (let* ((style (format "OrgPriority-%s" priority))
(priority (format "[#%c]" priority)))
(format "<text:span text:style-name=\"%s\">%s</text:span> "
style priority)))
;; Title.
text
;; Tags.
(when tags
(concat
(format " <text:span text:style-name=\"%s\">[%s]</text:span>"
"OrgTags"
(mapconcat
(lambda (tag)
(format
"<text:span text:style-name=\"%s\">%s</text:span>"
"OrgTag" tag)) tags " : "))))))
(format "<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>" (format "<text:a xlink:type=\"simple\" xlink:href=\"#%s\">%s</text:a>"
headline-label text)) headline-label text))
@ -1720,8 +1735,8 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(format "<text:span text:style-name=\"%s\">%s</text:span> " (format "<text:span text:style-name=\"%s\">%s</text:span> "
style todo))) style todo)))
(when priority (when priority
(let* ((priority (format "[#%c]" priority)) (let* ((style (format "OrgPriority-%s" priority))
(style (format "OrgPriority-%s" priority))) (priority (format "[#%c]" priority)))
(format "<text:span text:style-name=\"%s\">%s</text:span> " (format "<text:span text:style-name=\"%s\">%s</text:span> "
style priority))) style priority)))
;; Title. ;; Title.