[dots] Ignore changed-region elements in the odt conversion
- From: Fernando Herrera de las Heras <fherrera src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dots] Ignore changed-region elements in the odt conversion
- Date: Thu, 10 Jun 2010 15:30:46 +0000 (UTC)
commit 1cefb8090f2420f50be3275b146beb6e48ecc55d
Author: Fernando Herrera <fherrera onirica com>
Date: Wed Jun 2 17:39:00 2010 +0200
Ignore changed-region elements in the odt conversion
dots/document.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/dots/document.py b/dots/document.py
index 258ed35..70097bd 100644
--- a/dots/document.py
+++ b/dots/document.py
@@ -52,13 +52,17 @@ class Document():
r.x2 = w
r.y1 = 0
r.y2 = h
+ # Currently we are getting the layout from the pdf here
+ # we should collapse it
text = page.get_text(poppler.SELECTION_LINE,r)
print text
return
def translate_odt(self):
+ from odf.odf2xhtml import TEXTNS
from odf.odf2xhtml import ODF2XHTML
odhandler = ODF2XHTML (False, False)
+ odhandler.elements[(TEXTNS, u"changed-region")] = (odhandler.s_ignorexml,None)
result = odhandler.odf2xhtml(self.input_file).encode('UTF-8','xmlcharrefreplace')
self.braille_text = self.translator.translate_string (result)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]