[Python-modules-commits] [python-odf] 69/118: Some documents have a default page layout, that needs to be ignored.
Wolfgang Borgert
debacle at moszumanska.debian.org
Fri Oct 3 21:27:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to reference refs/remotes/upstream/master
in repository python-odf.
commit e55d60e99ac750811fefe0e63e9c250a13e31e26
Author: Søren Roug <soren.roug at eea.europa.eu>
Date: Fri Dec 18 10:07:43 2009 +0000
Some documents have a default page layout, that needs to be ignored.
---
odf/odf2xhtml.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/odf/odf2xhtml.py b/odf/odf2xhtml.py
index add4744..7ebd354 100644
--- a/odf/odf2xhtml.py
+++ b/odf/odf2xhtml.py
@@ -367,6 +367,8 @@ class ODF2XHTML(handler.ContentHandler):
(OFFICENS, "text"):(self.s_office_text, self.e_office_text),
(OFFICENS, "scripts"):(self.s_ignorexml, None),
(PRESENTATIONNS, "notes"):(self.s_ignorexml, None),
+# (STYLENS, "default-page-layout"):(self.s_style_default_page_layout, self.e_style_page_layout),
+ (STYLENS, "default-page-layout"):(self.s_ignorexml, None),
(STYLENS, "default-style"):(self.s_style_default_style, self.e_style_default_style),
(STYLENS, "drawing-page-properties"):(self.s_style_handle_properties, None),
(STYLENS, "font-face"):(self.s_style_font_face, None),
@@ -823,8 +825,17 @@ class ODF2XHTML(handler.ContentHandler):
self.stylestack.append(self.currentstyle)
self.styledict[self.currentstyle] = {}
+ def s_style_default_page_layout(self, tag, attrs):
+ """ Collect the formatting for the default page layout style.
+ """
+ self.currentstyle = "@page"
+ self.stylestack.append(self.currentstyle)
+ self.styledict[self.currentstyle] = {}
+
def s_style_page_layout(self, tag, attrs):
""" Collect the formatting for the page layout style.
+ This won't work in CSS 2.1, as page identifiers are not allowed.
+ It is legal in CSS3, but the rest of the application doesn't specify when to use what page layout
"""
name = attrs[(STYLENS,'name')]
name = name.replace(".","_")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-odf.git
More information about the Python-modules-commits
mailing list