diff options
author | Jambunathan K <kjambunathan@gmail.com> | 2012-02-26 00:43:59 +0530 |
---|---|---|
committer | Jambunathan K <kjambunathan@gmail.com> | 2012-02-26 00:43:59 +0530 |
commit | 580218709b32dbc647f3b41a96c84024a71bc4c9 (patch) | |
tree | 3eaa8ab912d99f32379c3fda75ac823ca605ecf8 | |
parent | 89949e69a3860fcb687c0f4ca0ccfd29283a5b74 (diff) | |
download | org-mode-580218709b32dbc647f3b41a96c84024a71bc4c9.tar.gz |
org-odt.el: Fix a regression in handling TOC
* lisp/org-odt.el (org-odt-insert-toc): Remove this stray,
dysfunctional routine. This possibly has crept in because of the
broken merges between "maint" and "origin" branches.
(org-odt-begin-table): Don't emit an empty paragraph when a table is
neither labelled or captioned.
(org-odt-init-outfile): Remove reference to an unused variable.
-rw-r--r-- | lisp/org-odt.el | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lisp/org-odt.el b/lisp/org-odt.el index d60b038..6cf5713 100644 --- a/lisp/org-odt.el +++ b/lisp/org-odt.el @@ -46,18 +46,6 @@ (goto-char org-lparse-dyn-first-heading-pos))) (insert (org-odt-format-toc))) -(defun org-odt-insert-toc () - (goto-char (point-min)) - (cond - ((re-search-forward - "\\(<text:p [^>]*>\\)?\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*\\(</text:p>\\)?" - nil t) - (goto-char (match-beginning 0)) - (replace-match "")) - (t - (goto-char org-lparse-dyn-first-heading-pos)) - (insert (org-odt-format-toc)))) - (defun org-odt-end-export () (org-odt-insert-toc) (org-odt-fixup-label-references) @@ -1014,9 +1002,10 @@ new entry in `org-odt-automatic-styles'. Return (OBJECT-NAME (setq org-odt-table-style (plist-get attributes :style)) (setq org-odt-table-style-spec (assoc org-odt-table-style org-export-odt-table-styles)) - (insert - (org-odt-format-stylized-paragraph - 'table (org-odt-format-entity-caption label caption "__Table__"))) + (when (or label caption) + (insert + (org-odt-format-stylized-paragraph + 'table (org-odt-format-entity-caption label caption "__Table__")))) (let ((name-and-style (org-odt-add-automatic-style "Table" attributes))) (org-lparse-insert-tag "<table:table table:name=\"%s\" table:style-name=\"%s\">" @@ -2181,7 +2170,6 @@ CATEGORY-HANDLE is used. See (setq org-odt-manifest-file-entries nil org-odt-embedded-images-count 0 org-odt-embedded-formulas-count 0 - org-odt-section-count 0 org-odt-entity-labels-alist nil org-odt-list-stack-stashed nil org-odt-automatic-styles nil |