Fixed broken paragraph alignment for OpenXml.
This commit is contained in:
parent
e0dea8e95c
commit
cb6ad0e9d3
@ -8,9 +8,9 @@ This is the changelog between releases of PHPWord. Releases are listed in revers
|
|||||||
|
|
||||||
Place announcement text here.
|
Place announcement text here.
|
||||||
|
|
||||||
### Bugfixes
|
### Changes
|
||||||
|
|
||||||
- Discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This is fixed now. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko
|
- Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,7 @@ Inline style examples:
|
|||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
$fontStyle = array('name' => 'Times New Roman', 'size' => 9);
|
$fontStyle = array('name' => 'Times New Roman', 'size' => 9);
|
||||||
$paragraphStyle = array('align' => 'both');
|
$paragraphStyle = array('alignment' => 'both');
|
||||||
$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
|
$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
|
||||||
|
|
||||||
$textrun = $section->addTextRun();
|
$textrun = $section->addTextRun();
|
||||||
@ -100,7 +100,7 @@ Defined style examples:
|
|||||||
$phpWord->addFontStyle('fStyle', $fontStyle);
|
$phpWord->addFontStyle('fStyle', $fontStyle);
|
||||||
$text = $section->addText('Hello world!', 'fStyle');
|
$text = $section->addText('Hello world!', 'fStyle');
|
||||||
|
|
||||||
$paragraphStyle = array('align' => 'center');
|
$paragraphStyle = array('alignment' => 'center');
|
||||||
$phpWord->addParagraphStyle('pStyle', $paragraphStyle);
|
$phpWord->addParagraphStyle('pStyle', $paragraphStyle);
|
||||||
$text = $section->addText('Hello world!', 'pStyle');
|
$text = $section->addText('Hello world!', 'pStyle');
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ Paragraph style
|
|||||||
|
|
||||||
Available paragraph styles:
|
Available paragraph styles:
|
||||||
|
|
||||||
- ``align`` Paragraph alignment, *left*, *right* or *center*
|
- ``alignment`` Paragraph alignment, *left*, *right* or *center*
|
||||||
- ``spaceBefore`` Space before paragraph
|
- ``spaceBefore`` Space before paragraph
|
||||||
- ``spaceAfter`` Space after paragraph
|
- ``spaceAfter`` Space after paragraph
|
||||||
- ``indent`` Indent by how much
|
- ``indent`` Indent by how much
|
||||||
|
|||||||
@ -517,7 +517,7 @@ Inline style examples:
|
|||||||
|
|
||||||
```php
|
```php
|
||||||
$fontStyle = array('name' => 'Times New Roman', 'size' => 9);
|
$fontStyle = array('name' => 'Times New Roman', 'size' => 9);
|
||||||
$paragraphStyle = array('align' => 'both');
|
$paragraphStyle = array('alignment' => 'both');
|
||||||
$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
|
$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
|
||||||
|
|
||||||
$textrun = $section->addTextRun();
|
$textrun = $section->addTextRun();
|
||||||
@ -533,7 +533,7 @@ $fontStyle = array('color' => '006699', 'size' => 18, 'bold' => true);
|
|||||||
$phpWord->addFontStyle('fStyle', $fontStyle);
|
$phpWord->addFontStyle('fStyle', $fontStyle);
|
||||||
$text = $section->addText('Hello world!', 'fStyle');
|
$text = $section->addText('Hello world!', 'fStyle');
|
||||||
|
|
||||||
$paragraphStyle = array('align' => 'center');
|
$paragraphStyle = array('alignment' => 'center');
|
||||||
$phpWord->addParagraphStyle('pStyle', $paragraphStyle);
|
$phpWord->addParagraphStyle('pStyle', $paragraphStyle);
|
||||||
$text = $section->addText('Hello world!', 'pStyle');
|
$text = $section->addText('Hello world!', 'pStyle');
|
||||||
```
|
```
|
||||||
@ -853,7 +853,7 @@ Available font styles:
|
|||||||
|
|
||||||
Available paragraph styles:
|
Available paragraph styles:
|
||||||
|
|
||||||
- `align` Paragraph alignment, *left*, *right* or *center*
|
- `alignment` Paragraph alignment, *left*, *right* or *center*
|
||||||
- `spaceBefore` Space before paragraph
|
- `spaceBefore` Space before paragraph
|
||||||
- `spaceAfter` Space after paragraph
|
- `spaceAfter` Space after paragraph
|
||||||
- `indent` Indent by how much
|
- `indent` Indent by how much
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user