Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/odf/style.py: 56%
90 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1# -*- coding: utf-8 -*-
2# Copyright (C) 2006-2013 Søren Roug, European Environment Agency
3#
4# This library is free software; you can redistribute it and/or
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
8#
9# This library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public
15# License along with this library; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17#
18# Contributor(s):
19#
21from odf.namespaces import STYLENS
22from odf.element import Element
24def StyleElement(**args):
25 e = Element(**args)
26 if args.get('check_grammar', True) == True: 26 ↛ 29line 26 didn't jump to line 29, because the condition on line 26 was never false
27 if 'displayname' not in args: 27 ↛ 29line 27 didn't jump to line 29, because the condition on line 27 was never false
28 e.setAttrNS(STYLENS,'display-name', args.get('name'))
29 return e
31# Autogenerated
32def BackgroundImage(**args):
33 return Element(qname = (STYLENS,'background-image'), **args)
35def ChartProperties(**args):
36 return Element(qname = (STYLENS,'chart-properties'), **args)
38def Column(**args):
39 return Element(qname = (STYLENS,'column'), **args)
41def ColumnSep(**args):
42 return Element(qname = (STYLENS,'column-sep'), **args)
44def Columns(**args):
45 return Element(qname = (STYLENS,'columns'), **args)
47def DefaultPageLayout(**args):
48 return Element(qname = (STYLENS,'default-page-layout'), **args)
50def DefaultStyle(**args):
51 return Element(qname = (STYLENS,'default-style'), **args)
53def DrawingPageProperties(**args):
54 return Element(qname = (STYLENS,'drawing-page-properties'), **args)
56def DropCap(**args):
57 return Element(qname = (STYLENS,'drop-cap'), **args)
59def FontFace(**args):
60 return Element(qname = (STYLENS,'font-face'), **args)
62def Footer(**args):
63 return Element(qname = (STYLENS,'footer'), **args)
65def FooterLeft(**args):
66 return Element(qname = (STYLENS,'footer-left'), **args)
68def FooterStyle(**args):
69 return Element(qname = (STYLENS,'footer-style'), **args)
71def FootnoteSep(**args):
72 return Element(qname = (STYLENS,'footnote-sep'), **args)
74def GraphicProperties(**args):
75 return Element(qname = (STYLENS,'graphic-properties'), **args)
77def HandoutMaster(**args):
78 return Element(qname = (STYLENS,'handout-master'), **args)
80def Header(**args):
81 return Element(qname = (STYLENS,'header'), **args)
83def HeaderFooterProperties(**args):
84 return Element(qname = (STYLENS,'header-footer-properties'), **args)
86def HeaderLeft(**args):
87 return Element(qname = (STYLENS,'header-left'), **args)
89def HeaderStyle(**args):
90 return Element(qname = (STYLENS,'header-style'), **args)
92def ListLevelLabelAlignment(**args):
93 return Element(qname = (STYLENS,'list-level-label-alignment'), **args)
95def ListLevelProperties(**args):
96 return Element(qname = (STYLENS,'list-level-properties'), **args)
98def Map(**args):
99 return Element(qname = (STYLENS,'map'), **args)
101def MasterPage(**args):
102 return StyleElement(qname = (STYLENS,'master-page'), **args)
104def PageLayout(**args):
105 return Element(qname = (STYLENS,'page-layout'), **args)
107def PageLayoutProperties(**args):
108 return Element(qname = (STYLENS,'page-layout-properties'), **args)
110def ParagraphProperties(**args):
111 return Element(qname = (STYLENS,'paragraph-properties'), **args)
113def PresentationPageLayout(**args):
114 return StyleElement(qname = (STYLENS,'presentation-page-layout'), **args)
116def RegionCenter(**args):
117 return Element(qname = (STYLENS,'region-center'), **args)
119def RegionLeft(**args):
120 return Element(qname = (STYLENS,'region-left'), **args)
122def RegionRight(**args):
123 return Element(qname = (STYLENS,'region-right'), **args)
125def RubyProperties(**args):
126 return Element(qname = (STYLENS,'ruby-properties'), **args)
128def SectionProperties(**args):
129 return Element(qname = (STYLENS,'section-properties'), **args)
131def Style(**args):
132 return StyleElement(qname = (STYLENS,'style'), **args)
134def TabStop(**args):
135 return Element(qname = (STYLENS,'tab-stop'), **args)
137def TabStops(**args):
138 return Element(qname = (STYLENS,'tab-stops'), **args)
140def TableCellProperties(**args):
141 return Element(qname = (STYLENS,'table-cell-properties'), **args)
143def TableColumnProperties(**args):
144 return Element(qname = (STYLENS,'table-column-properties'), **args)
146def TableProperties(**args):
147 return Element(qname = (STYLENS,'table-properties'), **args)
149def TableRowProperties(**args):
150 return Element(qname = (STYLENS,'table-row-properties'), **args)
152def TextProperties(**args):
153 return Element(qname = (STYLENS,'text-properties'), **args)