forked from python-openxml/python-docx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.py
More file actions
92 lines (56 loc) · 1.41 KB
/
table.py
File metadata and controls
92 lines (56 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# encoding: utf-8
"""
Test data builders for text XML elements
"""
from ...unitdata import BaseBuilder
from .shared import CT_StringBuilder
class CT_RowBuilder(BaseBuilder):
__tag__ = 'w:tr'
__nspfxs__ = ('w',)
__attrs__ = ('w:w',)
class CT_TblBuilder(BaseBuilder):
__tag__ = 'w:tbl'
__nspfxs__ = ('w',)
__attrs__ = ()
class CT_TblGridBuilder(BaseBuilder):
__tag__ = 'w:tblGrid'
__nspfxs__ = ('w',)
__attrs__ = ('w:w',)
class CT_TblGridColBuilder(BaseBuilder):
__tag__ = 'w:gridCol'
__nspfxs__ = ('w',)
__attrs__ = ('w:w',)
class CT_TblPrBuilder(BaseBuilder):
__tag__ = 'w:tblPr'
__nspfxs__ = ('w',)
__attrs__ = ()
class CT_TblWidthBuilder(BaseBuilder):
__tag__ = 'w:tblW'
__nspfxs__ = ('w',)
__attrs__ = ('w:w', 'w:type')
class CT_TcBuilder(BaseBuilder):
__tag__ = 'w:tc'
__nspfxs__ = ('w',)
__attrs__ = ('w:id',)
class CT_TcPrBuilder(BaseBuilder):
__tag__ = 'w:tcPr'
__nspfxs__ = ('w',)
__attrs__ = ()
def a_gridCol():
return CT_TblGridColBuilder()
def a_tbl():
return CT_TblBuilder()
def a_tblGrid():
return CT_TblGridBuilder()
def a_tblPr():
return CT_TblPrBuilder()
def a_tblStyle():
return CT_StringBuilder('w:tblStyle')
def a_tblW():
return CT_TblWidthBuilder()
def a_tc():
return CT_TcBuilder()
def a_tcPr():
return CT_TcPrBuilder()
def a_tr():
return CT_RowBuilder()