Return the line spacing rule value calculated from the combination of `line` and `lineRule`. Returns special members of the :ref:`WdLineSpacing` enumeration when line spacing is single, double, or 1.5 lines.
(line, lineRule)
| 270 | |
| 271 | @staticmethod |
| 272 | def _line_spacing_rule(line, lineRule): |
| 273 | """Return the line spacing rule value calculated from the combination of `line` |
| 274 | and `lineRule`. |
| 275 | |
| 276 | Returns special members of the :ref:`WdLineSpacing` enumeration when line |
| 277 | spacing is single, double, or 1.5 lines. |
| 278 | """ |
| 279 | if lineRule == WD_LINE_SPACING.MULTIPLE: |
| 280 | if line == Twips(240): |
| 281 | return WD_LINE_SPACING.SINGLE |
| 282 | if line == Twips(360): |
| 283 | return WD_LINE_SPACING.ONE_POINT_FIVE |
| 284 | if line == Twips(480): |
| 285 | return WD_LINE_SPACING.DOUBLE |
| 286 | return lineRule |