Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/openpyxl/chart/layout.py: 75%
36 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# Copyright (c) 2010-2022 openpyxl
3from openpyxl.descriptors.serialisable import Serialisable
4from openpyxl.descriptors import (
5 NoneSet,
6 Float,
7 Typed,
8 Alias,
9)
11from openpyxl.descriptors.excel import ExtensionList
12from openpyxl.descriptors.nested import (
13 NestedNoneSet,
14 NestedSet,
15 NestedMinMax,
16)
18class ManualLayout(Serialisable):
20 tagname = "manualLayout"
22 layoutTarget = NestedNoneSet(values=(['inner', 'outer']))
23 xMode = NestedNoneSet(values=(['edge', 'factor']))
24 yMode = NestedNoneSet(values=(['edge', 'factor']))
25 wMode = NestedSet(values=(['edge', 'factor']))
26 hMode = NestedSet(values=(['edge', 'factor']))
27 x = NestedMinMax(min=-1, max=1, allow_none=True)
28 y = NestedMinMax(min=-1, max=1, allow_none=True)
29 w = NestedMinMax(min=0, max=1, allow_none=True)
30 width = Alias('w')
31 h = NestedMinMax(min=0, max=1, allow_none=True)
32 height = Alias('h')
33 extLst = Typed(expected_type=ExtensionList, allow_none=True)
35 __elements__ = ('layoutTarget', 'xMode', 'yMode', 'wMode', 'hMode', 'x',
36 'y', 'w', 'h')
38 def __init__(self,
39 layoutTarget=None,
40 xMode=None,
41 yMode=None,
42 wMode="factor",
43 hMode="factor",
44 x=None,
45 y=None,
46 w=None,
47 h=None,
48 extLst=None,
49 ):
50 self.layoutTarget = layoutTarget
51 self.xMode = xMode
52 self.yMode = yMode
53 self.wMode = wMode
54 self.hMode = hMode
55 self.x = x
56 self.y = y
57 self.w = w
58 self.h = h
61class Layout(Serialisable):
63 tagname = "layout"
65 manualLayout = Typed(expected_type=ManualLayout, allow_none=True)
66 extLst = Typed(expected_type=ExtensionList, allow_none=True)
68 __elements__ = ('manualLayout',)
70 def __init__(self,
71 manualLayout=None,
72 extLst=None,
73 ):
74 self.manualLayout = manualLayout