Return the style of `style_type` matching `style_id`. Returns the default for `style_type` if `style_id` is not found or is |None|, or if the style having `style_id` is not of `style_type`.
(self, style_id: str | None, style_type: WD_STYLE_TYPE)
| 73 | return StyleFactory(style) |
| 74 | |
| 75 | def get_by_id(self, style_id: str | None, style_type: WD_STYLE_TYPE): |
| 76 | """Return the style of `style_type` matching `style_id`. |
| 77 | |
| 78 | Returns the default for `style_type` if `style_id` is not found or is |None|, or |
| 79 | if the style having `style_id` is not of `style_type`. |
| 80 | """ |
| 81 | if style_id is None: |
| 82 | return self.default(style_type) |
| 83 | return self._get_by_id(style_id, style_type) |
| 84 | |
| 85 | def get_style_id(self, style_or_name, style_type): |
| 86 | """Return the id of the style corresponding to `style_or_name`, or |None| if |