Пример #1
0
 def it_can_construct_a_new_table_graphicFrame(
         self, new_table_graphicFrame_fixture):
     id_, name, rows, cols, x, y, cx, cy, expected_xml = (
         new_table_graphicFrame_fixture)
     graphicFrame = CT_GraphicalObjectFrame.new_table_graphicFrame(
         id_, name, rows, cols, x, y, cx, cy)
     assert graphicFrame.xml == expected_xml
Пример #2
0
 def new_table(self, rows, cols, left, top, width, height):
     _id = -1
     name = "Table %d" % (_id)
     graphicFrame = CT_GraphicalObjectFrame()
     gf_tbl = graphicFrame.new_table_graphicFrame(_id, name, rows, cols,
                                                  left, top, width, height)
     return self._shape_factory(gf_tbl)
Пример #3
0
 def it_can_construct_a_new_table_graphicFrame(self, new_table_graphicFrame_fixture):
     id_, name, rows, cols, x, y, cx, cy, expected_xml = (
         new_table_graphicFrame_fixture
     )
     graphicFrame = CT_GraphicalObjectFrame.new_table_graphicFrame(
         id_, name, rows, cols, x, y, cx, cy
     )
     assert graphicFrame.xml == expected_xml
Пример #4
0
 def add_table(self, id_, name, rows, cols, x, y, cx, cy):
     """
     Append a ``<p:graphicFrame>`` shape containing a table as specified
     in call.
     """
     graphicFrame = CT_GraphicalObjectFrame.new_table_graphicFrame(
         id_, name, rows, cols, x, y, cx, cy)
     self.insert_element_before(graphicFrame, 'p:extLst')
     return graphicFrame
Пример #5
0
 def add_table(self, id_, name, rows, cols, x, y, cx, cy):
     """
     Append a ``<p:graphicFrame>`` shape containing a table as specified
     in call.
     """
     graphicFrame = CT_GraphicalObjectFrame.new_table_graphicFrame(
         id_, name, rows, cols, x, y, cx, cy
     )
     self.insert_element_before(graphicFrame, "p:extLst")
     return graphicFrame
Пример #6
0
 def _new_placeholder_table(self, rows, cols):
     """
     Return a newly added `p:graphicFrame` element containing an empty
     table with *rows* rows and *cols* columns, positioned at the location
     of this placeholder and having its same width. The table's height is
     determined by the number of rows.
     """
     shape_id, name, height = self.shape_id, self.name, Emu(rows * 370840)
     return CT_GraphicalObjectFrame.new_table_graphicFrame(
         shape_id, name, rows, cols, self.left, self.top, self.width,
         height)
Пример #7
0
 def __init__(self, rows, cols, left, top, width, height):
     self.graphicFrame = CT_GraphicalObjectFrame.new_table_graphicFrame(
         -1, None, rows, cols, left, top, width, height)