Fixed broken paragraph alignment for OpenXml.

This commit is contained in:
Roman Syroeshko 2015-02-21 20:11:57 +04:00
parent e0dea8e95c
commit cb6ad0e9d3
3 changed files with 8 additions and 8 deletions

View File

@ -8,9 +8,9 @@ This is the changelog between releases of PHPWord. Releases are listed in revers
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

View File

@ -84,7 +84,7 @@ Inline style examples:
.. code-block:: php
$fontStyle = array('name' => 'Times New Roman', 'size' => 9);
$paragraphStyle = array('align' => 'both');
$paragraphStyle = array('alignment' => 'both');
$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
$textrun = $section->addTextRun();
@ -100,7 +100,7 @@ Defined style examples:
$phpWord->addFontStyle('fStyle', $fontStyle);
$text = $section->addText('Hello world!', 'fStyle');
$paragraphStyle = array('align' => 'center');
$paragraphStyle = array('alignment' => 'center');
$phpWord->addParagraphStyle('pStyle', $paragraphStyle);
$text = $section->addText('Hello world!', 'pStyle');
@ -130,7 +130,7 @@ Paragraph style
Available paragraph styles:
- ``align`` Paragraph alignment, *left*, *right* or *center*
- ``alignment`` Paragraph alignment, *left*, *right* or *center*
- ``spaceBefore`` Space before paragraph
- ``spaceAfter`` Space after paragraph
- ``indent`` Indent by how much

View File

@ -517,7 +517,7 @@ Inline style examples:
```php
$fontStyle = array('name' => 'Times New Roman', 'size' => 9);
$paragraphStyle = array('align' => 'both');
$paragraphStyle = array('alignment' => 'both');
$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
$textrun = $section->addTextRun();
@ -533,7 +533,7 @@ $fontStyle = array('color' => '006699', 'size' => 18, 'bold' => true);
$phpWord->addFontStyle('fStyle', $fontStyle);
$text = $section->addText('Hello world!', 'fStyle');
$paragraphStyle = array('align' => 'center');
$paragraphStyle = array('alignment' => 'center');
$phpWord->addParagraphStyle('pStyle', $paragraphStyle);
$text = $section->addText('Hello world!', 'pStyle');
```
@ -853,7 +853,7 @@ Available font styles:
Available paragraph styles:
- `align` Paragraph alignment, *left*, *right* or *center*
- `alignment` Paragraph alignment, *left*, *right* or *center*
- `spaceBefore` Space before paragraph
- `spaceAfter` Space after paragraph
- `indent` Indent by how much