Return paragraph newly added to the end of the content in this container. The paragraph has `text` in a single run if present, and is given paragraph style `style`. If `style` is |None|, no paragraph style is applied, which has the same effect as applying the 'Norma
(self, text: str = "", style: str | ParagraphStyle | None = None)
| 43 | self._element = element |
| 44 | |
| 45 | def add_paragraph(self, text: str = "", style: str | ParagraphStyle | None = None) -> Paragraph: |
| 46 | """Return paragraph newly added to the end of the content in this container. |
| 47 | |
| 48 | The paragraph has `text` in a single run if present, and is given paragraph |
| 49 | style `style`. |
| 50 | |
| 51 | If `style` is |None|, no paragraph style is applied, which has the same effect |
| 52 | as applying the 'Normal' style. |
| 53 | """ |
| 54 | paragraph = self._add_paragraph() |
| 55 | if text: |
| 56 | paragraph.add_run(text) |
| 57 | if style is not None: |
| 58 | paragraph.style = style |
| 59 | return paragraph |
| 60 | |
| 61 | def add_table(self, rows: int, cols: int, width: Length) -> Table: |
| 62 | """Return table of `width` having `rows` rows and `cols` columns. |
nothing calls this directly
no test coverage detected