Return the id of the style of `style_type` corresponding to `style_name`. Returns |None| if that style is the default style for `style_type`. Raises |ValueError| if the named style is not found in the document or does not match `style_type`.
(self, style_name: str, style_type: WD_STYLE_TYPE)
| 116 | return StyleFactory(style) |
| 117 | |
| 118 | def _get_style_id_from_name(self, style_name: str, style_type: WD_STYLE_TYPE) -> str | None: |
| 119 | """Return the id of the style of `style_type` corresponding to `style_name`. |
| 120 | |
| 121 | Returns |None| if that style is the default style for `style_type`. Raises |
| 122 | |ValueError| if the named style is not found in the document or does not match |
| 123 | `style_type`. |
| 124 | """ |
| 125 | return self._get_style_id_from_style(self[style_name], style_type) |
| 126 | |
| 127 | def _get_style_id_from_style(self, style: BaseStyle, style_type: WD_STYLE_TYPE) -> str | None: |
| 128 | """Id of `style`, or |None| if it is the default style of `style_type`. |