Example #1
0
 def anchor_get_fixture(self, request):
     anchor, mso_anchor_idx = request.param
     tc_bldr = a_tc().with_nsdecls()
     if anchor is not None:
         tcPr_bldr = a_tcPr().with_anchor(anchor)
         tc_bldr.with_child(tcPr_bldr)
     tc = tc_bldr.element
     cell = _Cell(tc, None)
     return cell, mso_anchor_idx
Example #2
0
 def anchor_get_fixture(self, request):
     anchor, mso_anchor_idx = request.param
     tc_bldr = a_tc().with_nsdecls()
     if anchor is not None:
         tcPr_bldr = a_tcPr().with_anchor(anchor)
         tc_bldr.with_child(tcPr_bldr)
     tc = tc_bldr.element
     cell = _Cell(tc, None)
     return cell, mso_anchor_idx
Example #3
0
 def anchor_set_fixture(self, request):
     def tc_with_anchor_bldr(anchor):
         tc_bldr = a_tc().with_nsdecls()
         if anchor is not None:
             tcPr_bldr = a_tcPr()
             if anchor != '':
                 tcPr_bldr.with_anchor(anchor)
             tc_bldr.with_child(tcPr_bldr)
         return tc_bldr
     before_anchor, mso_anchor_idx, after_anchor = request.param
     tc = tc_with_anchor_bldr(before_anchor).element
     cell = _Cell(tc, None)
     tc_with_anchor_xml = tc_with_anchor_bldr(after_anchor).xml()
     return cell, mso_anchor_idx, tc_with_anchor_xml
Example #4
0
 def anchor_set_fixture(self, request):
     def tc_with_anchor_bldr(anchor):
         tc_bldr = a_tc().with_nsdecls()
         if anchor is not None:
             tcPr_bldr = a_tcPr()
             if anchor != '':
                 tcPr_bldr.with_anchor(anchor)
             tc_bldr.with_child(tcPr_bldr)
         return tc_bldr
     before_anchor, mso_anchor_idx, after_anchor = request.param
     tc = tc_with_anchor_bldr(before_anchor).element
     cell = _Cell(tc, None)
     tc_with_anchor_xml = tc_with_anchor_bldr(after_anchor).xml()
     return cell, mso_anchor_idx, tc_with_anchor_xml
Example #5
0
 def margin_get_fixture(self, request):
     mar_vals, expected_vals = request.param
     marL, marR, marT, marB = mar_vals
     margin_left, margin_right, margin_top, margin_bottom = expected_vals
     tcPr_bldr = a_tcPr()
     if marL is not None:
         tcPr_bldr.with_marL(marL)
     if marR is not None:
         tcPr_bldr.with_marR(marR)
     if marT is not None:
         tcPr_bldr.with_marT(marT)
     if marB is not None:
         tcPr_bldr.with_marB(marB)
     tc = a_tc().with_nsdecls().with_child(tcPr_bldr).element
     cell = _Cell(tc, None)
     return cell, margin_left, margin_right, margin_top, margin_bottom
Example #6
0
 def margin_get_fixture(self, request):
     mar_vals, expected_vals = request.param
     marL, marR, marT, marB = mar_vals
     margin_left, margin_right, margin_top, margin_bottom = expected_vals
     tcPr_bldr = a_tcPr()
     if marL is not None:
         tcPr_bldr.with_marL(marL)
     if marR is not None:
         tcPr_bldr.with_marR(marR)
     if marT is not None:
         tcPr_bldr.with_marT(marT)
     if marB is not None:
         tcPr_bldr.with_marB(marB)
     tc = a_tc().with_nsdecls().with_child(tcPr_bldr).element
     cell = _Cell(tc, None)
     return cell, margin_left, margin_right, margin_top, margin_bottom
Example #7
0
    def margin_set_fixture(self, request):

        def tc_bldr_with(marX):
            marL, marR, marT, marB = marX
            tcPr_bldr = a_tcPr()
            if marL is not None:
                tcPr_bldr.with_marL(marL)
            if marR is not None:
                tcPr_bldr.with_marR(marR)
            if marT is not None:
                tcPr_bldr.with_marT(marT)
            if marB is not None:
                tcPr_bldr.with_marB(marB)
            return a_tc().with_nsdecls().with_child(tcPr_bldr)

        before_vals, after_vals = request.param
        tc = tc_bldr_with(before_vals).element
        cell = _Cell(tc, None)

        marL, marR, marT, marB = after_vals

        tc_with_marX_xml = tc_bldr_with(after_vals).xml()

        return cell, marL, marR, marT, marB, tc_with_marX_xml
Example #8
0
    def margin_set_fixture(self, request):

        def tc_bldr_with(marX):
            marL, marR, marT, marB = marX
            tcPr_bldr = a_tcPr()
            if marL is not None:
                tcPr_bldr.with_marL(marL)
            if marR is not None:
                tcPr_bldr.with_marR(marR)
            if marT is not None:
                tcPr_bldr.with_marT(marT)
            if marB is not None:
                tcPr_bldr.with_marB(marB)
            return a_tc().with_nsdecls().with_child(tcPr_bldr)

        before_vals, after_vals = request.param
        tc = tc_bldr_with(before_vals).element
        cell = _Cell(tc, None)

        marL, marR, marT, marB = after_vals

        tc_with_marX_xml = tc_bldr_with(after_vals).xml()

        return cell, marL, marR, marT, marB, tc_with_marX_xml
Example #9
0
 def cell(self):
     return _Cell(element('a:tc'), None)
Example #10
0
 def text_set_fixture(self, request):
     tc_cxml, new_text, expected_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_cxml)
     return cell, new_text, expected_xml
Example #11
0
 def margin_raises_fixture(self, request):
     margin_prop_name = request.param
     cell = _Cell(element('a:tc'), None)
     val_of_invalid_type = 'foobar'
     return cell, margin_prop_name, val_of_invalid_type
Example #12
0
 def margin_set_fixture(self, request):
     tc_cxml, margin_prop_name, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, margin_prop_name, new_value, expected_xml
Example #13
0
 def margin_get_fixture(self, request):
     tc_cxml, margin_prop_name, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, margin_prop_name, expected_value
Example #14
0
 def anchor_set_fixture(self, request):
     tc_cxml, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, new_value, expected_xml
Example #15
0
 def cell(self):
     return _Cell(element('a:tc'), None)
Example #16
0
 def margin_get_fixture(self, request):
     tc_cxml, margin_prop_name, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, margin_prop_name, expected_value
Example #17
0
 def cell(self):
     tc = a_tc().with_nsdecls().element
     return _Cell(tc, None)
Example #18
0
 def cell(self):
     return _Cell(test_table_elements.cell, None)
Example #19
0
 def cell(self):
     tc = a_tc().with_nsdecls().element
     return _Cell(tc, None)
Example #20
0
 def margin_raises_fixture(self, request):
     margin_prop_name = request.param
     cell = _Cell(element('a:tc'), None)
     val_of_invalid_type = 'foobar'
     return cell, margin_prop_name, val_of_invalid_type
Example #21
0
 def anchor_set_fixture(self, request):
     tc_cxml, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, new_value, expected_xml
Example #22
0
 def text_set_fixture(self, request):
     tc_cxml, new_text, expected_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_cxml)
     return cell, new_text, expected_xml
Example #23
0
 def anchor_get_fixture(self, request):
     tc_cxml, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, expected_value
Example #24
0
 def margin_set_fixture(self, request):
     tc_cxml, margin_prop_name, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, margin_prop_name, new_value, expected_xml
Example #25
0
 def cell(self):
     return _Cell(test_table_elements.cell, None)
Example #26
0
 def anchor_get_fixture(self, request):
     tc_cxml, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, expected_value