コード例 #1
0
 def end_y_set_fixture(self, request):
     xfrm_cxml, new_y, expected_cxml = request.param
     tmpl = "p:cxnSp/p:spPr/%s"
     cxnSp = element(tmpl % xfrm_cxml)
     expected_xml = xml(tmpl % expected_cxml)
     connector = Connector(cxnSp, None)
     return connector, new_y, expected_xml
コード例 #2
0
 def end_x_get_fixture(self, request):
     x, cx, flipH, expected_value = request.param
     cxnSp = element(
         "p:cxnSp/p:spPr/a:xfrm{flipH=%d}/(a:off{x=%d,y=6},a:ext{cx=%d,cy"
         "=60})" % (flipH, x, cx))
     connector = Connector(cxnSp, None)
     return connector, expected_value
コード例 #3
0
 def end_y_get_fixture(self, request):
     y, cy, flipV, expected_value = request.param
     cxnSp = element(
         "p:cxnSp/p:spPr/a:xfrm{flipV=%d}/(a:off{x=6,y=%d},a:ext{cx=32,cy"
         "=%d})" % (flipV, y, cy))
     connector = Connector(cxnSp, None)
     return connector, expected_value
コード例 #4
0
 def connect_end_fixture(self, request, shape_):
     cxnSp_cxml, expected_cxml = request.param
     cxnSp = element(cxnSp_cxml)
     connector = Connector(cxnSp, None)
     shape_.shape_id, cxn_idx = 24, 2
     expected_xml = xml(expected_cxml)
     return connector, shape_, cxn_idx, expected_xml
コード例 #5
0
 def begin_x_set_fixture(self, request):
     xfrm_cxml, new_x, expected_cxml = request.param
     tmpl = 'p:cxnSp/p:spPr/%s'
     cxnSp = element(tmpl % xfrm_cxml)
     expected_xml = xml(tmpl % expected_cxml)
     connector = Connector(cxnSp, None)
     return connector, new_x, expected_xml
コード例 #6
0
 def move_end_fixture(self, request, shape_):
     cxn_idx, expected_cxml = request.param
     cxnSp = element("p:cxnSp/p:spPr/a:xfrm/(a:off{x=10,y=15},a:ext{cx=10,cy=5})")
     connector = Connector(cxnSp, None)
     shape_.left, shape_.top, shape_.width, shape_.height = 50, 25, 20, 18
     expected_xml = xml(expected_cxml)
     return connector, shape_, cxn_idx, expected_xml
コード例 #7
0
 def move_begin_fixture(self, request, shape_):
     cxn_idx, expected_cxml = request.param
     cxnSp = element("p:cxnSp/p:spPr/a:xfrm/(a:off{x=66,y=99},a:ext{cx=33,cy=39})")
     connector = Connector(cxnSp, None)
     shape_.left, shape_.top, shape_.width, shape_.height = 10, 15, 30, 36
     expected_xml = xml(expected_cxml)
     return connector, shape_, cxn_idx, expected_xml
コード例 #8
0
    def it_provides_access_to_its_line_format(self):
        connector = Connector(element("p:cxnSp/p:spPr"), None)

        line = connector.line

        assert isinstance(line, LineFormat)
        # exercise line to test parent interface, .ln and .get_or_add_ln()
        line.width = 91440
        assert line.width == 91440
コード例 #9
0
 def end_conn_fixture(self, _connect_end_to_, _move_end_to_cxn_):
     connector = Connector(None, None)
     shape, cxn_idx = 42, 24
     return connector, shape, cxn_idx
コード例 #10
0
 def it_knows_its_shape_type(self):
     assert Connector(None, None).shape_type == MSO_SHAPE_TYPE.LINE