Return the id of the style corresponding to `style_or_name`, or |None| if `style_or_name` is |None|. If `style_or_name` is not a style object, the style is looked up using `style_or_name` as a style name, raising |ValueError| if no style with that name is defined. Ra
(self, style_or_name, 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 |
| 87 | `style_or_name` is |None|. |
| 88 | |
| 89 | If `style_or_name` is not a style object, the style is looked up using |
| 90 | `style_or_name` as a style name, raising |ValueError| if no style with that name |
| 91 | is defined. Raises |ValueError| if the target style is not of `style_type`. |
| 92 | """ |
| 93 | if style_or_name is None: |
| 94 | return None |
| 95 | elif isinstance(style_or_name, BaseStyle): |
| 96 | return self._get_style_id_from_style(style_or_name, style_type) |
| 97 | else: |
| 98 | return self._get_style_id_from_name(style_or_name, style_type) |
| 99 | |
| 100 | @property |
| 101 | def latent_styles(self): |