Browse Source

org-e-odt.el: Don't rely on buffer positions

They may not be available when element translation is in effect.
Jambunathan K 12 years ago
parent
commit
0e9ec97ed4
1 changed files with 4 additions and 5 deletions
  1. 4 5
      contrib/lisp/org-e-odt.el

+ 4 - 5
contrib/lisp/org-e-odt.el

@@ -3413,11 +3413,10 @@ the plist used as a communication channel."
     ;; item and the item has a checkbox, splice the checkbox and
     ;; paragraph contents together.
     (when (and (eq (org-element-type parent) 'item)
-	       (not (eq (org-element-property :type
-					      (org-export-get-parent parent))
-			'descriptive))
-	       (= (org-element-property :begin paragraph)
-		  (org-element-property :contents-begin parent)))
+    	       (not  (eq (org-element-property :type
+					       (org-export-get-parent parent))
+			 'descriptive))
+    	       (eq paragraph (car (org-element-contents parent))))
       (setq contents (concat (org-e-odt--checkbox parent) contents)))
     (org-e-odt-format-stylized-paragraph style contents)))