[Python-modules-commits] [python-odf] 61/118: Forgot the factory for TEXT:SoftPageBreak and SVG:Title
Wolfgang Borgert
debacle at moszumanska.debian.org
Fri Oct 3 21:27:23 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 ced3671fbbc9640a7d1c40c063137b487496983c
Author: Søren Roug <soren.roug at eea.europa.eu>
Date: Wed Aug 5 20:25:11 2009 +0000
Forgot the factory for TEXT:SoftPageBreak and SVG:Title
---
README | 2 ++
odf/svg.py | 2 ++
odf/text.py | 3 +++
tests/testtext.py | 37 +++++++++++++++++++++++++++++++++++++
4 files changed, 44 insertions(+)
diff --git a/README b/README
index c39c211..10cf6c4 100644
--- a/README
+++ b/README
@@ -18,6 +18,8 @@ $ python setup.py build
$ su
# python setup.py install
+The library is incompatible with PyXML.
+
-o- TODO / IDEAS -o-
* html2odf
diff --git a/odf/svg.py b/odf/svg.py
index e53d540..346c490 100644
--- a/odf/svg.py
+++ b/odf/svg.py
@@ -50,3 +50,5 @@ def Radialgradient(**args):
def Stop(**args):
return Element(qname = (SVGNS,'stop'), **args)
+def Title(**args):
+ return Element(qname = (SVGNS,'title'), **args)
diff --git a/odf/text.py b/odf/text.py
index 13a2c9c..b55a3a4 100644
--- a/odf/text.py
+++ b/odf/text.py
@@ -446,6 +446,9 @@ def SequenceRef(**args):
def SheetName(**args):
return Element(qname = (TEXTNS,'sheet-name'), **args)
+def SoftPageBreak(**args):
+ return Element(qname = (TEXTNS,'soft-page-break'), **args)
+
def SortKey(**args):
return Element(qname = (TEXTNS,'sort-key'), **args)
diff --git a/tests/testtext.py b/tests/testtext.py
new file mode 100644
index 0000000..ad319cb
--- /dev/null
+++ b/tests/testtext.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007 Søren Roug, European Environment Agency
+#
+# This is free software. You may redistribute it under the terms
+# of the Apache license and the GNU General Public License Version
+# 2 or at your option any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Contributor(s):
+#
+
+import unittest
+from odf.opendocument import OpenDocumentText
+from odf import text
+from odf.namespaces import TEXTNS
+
+class TestText(unittest.TestCase):
+
+ def test_softpagebreak(self):
+ """ Create a soft page break """
+ textdoc = OpenDocumentText()
+ spb = text.SoftPageBreak()
+ textdoc.text.addElement(spb)
+ self.assertEquals(1, 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
--
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