Skip to content

Commit

Permalink
Merge f51811b into b8346af
Browse files Browse the repository at this point in the history
  • Loading branch information
mdupont authored Dec 2, 2019
2 parents b8346af + f51811b commit 0794f1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/styles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ Available Paragraph style options:
- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012.
See ``\PhpOffice\PhpWord\SimpleType\Jc`` class constants for possible values.
- ``basedOn``. Parent style.
- ``hanging``. Hanging in *twip*.
- ``indent``. Indent in *twip*.
- ``hanging``. Hanging indentation in *half inches*.
- ``indent``. Indent (left indentation) in *half inches*.
- ``indentation``. An array of indentation key => value pairs in *twip*. Supports *left*, *right*, *firstLine* and *hanging* indentation.
See ``\PhpOffice\PhpWord\Style\Indentation`` for possible identation types.
- ``keepLines``. Keep all lines on one page, *true* or *false*.
- ``keepNext``. Keep paragraph with next paragraph, *true* or *false*.
- ``lineHeight``. Text line height, e.g. *1.0*, *1.5*, etc.
Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Style/Paragraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function setStyleValue($key, $value)
{
$key = Text::removeUnderscorePrefix($key);
if ('indent' == $key || 'hanging' == $key) {
$value = $value * 720;
$value = $value * 720; // 720 twips is 0.5 inch
}

return parent::setStyleValue($key, $value);
Expand Down

0 comments on commit 0794f1a

Please sign in to comment.