aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/complex_fields.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-11-30 13:56:29 +0000
committerMichael Williamson <mike@zwobble.org>2024-11-30 13:56:29 +0000
commitfe6fb7ea7380280c8589548fd61b121a917a356a (patch)
tree810e648b0132ff4931e91d2cd986689d6600e450 /mammoth/docx/complex_fields.py
parentfe7708b65b7d479e795f379e11ab486d2d08af4e (diff)
Read complex field checkboxes, always unchecked
Diffstat (limited to 'mammoth/docx/complex_fields.py')
-rw-r--r--mammoth/docx/complex_fields.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/mammoth/docx/complex_fields.py b/mammoth/docx/complex_fields.py
index 75bc05a..4112cba 100644
--- a/mammoth/docx/complex_fields.py
+++ b/mammoth/docx/complex_fields.py
@@ -2,6 +2,15 @@ class unknown(object):
pass
+class Begin:
+ def __init__(self, *, fld_char):
+ self.fld_char = fld_char
+
+
+def begin(*, fld_char):
+ return Begin(fld_char=fld_char)
+
+
class Hyperlink(object):
def __init__(self, kwargs):
self.kwargs = kwargs
@@ -9,3 +18,12 @@ class Hyperlink(object):
def hyperlink(kwargs):
return Hyperlink(kwargs=kwargs)
+
+
+class Checkbox:
+ def __init__(self, *, checked):
+ self.checked = checked
+
+
+def checkbox(*, checked):
+ return Checkbox(checked=checked)