Fixed build.
This commit is contained in:
parent
94c0d02330
commit
505cc76406
|
|
@ -8,8 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||
Place announcement text here.
|
||||
|
||||
### Added
|
||||
- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` simple type. - @RomanSyroeshko
|
||||
- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` simple type. - @RomanSyroeshko
|
||||
- Introduced the ``\PhpOffice\PhpWord\SimpleType\JcTable`` simple type. - @RomanSyroeshko
|
||||
- Introduced the ``\PhpOffice\PhpWord\SimpleType\Jc`` simple type. - @RomanSyroeshko
|
||||
|
||||
### Changed
|
||||
- Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Paragraph
|
|||
|
||||
Available Paragraph style options:
|
||||
|
||||
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details.
|
||||
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
|
||||
- ``basedOn``. Parent style.
|
||||
- ``hanging``. Hanging by how much.
|
||||
- ``indent``. Indent by how much.
|
||||
|
|
@ -84,7 +84,7 @@ Table
|
|||
|
||||
Available Table style options:
|
||||
|
||||
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` class for the details.
|
||||
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\JcTable`` class for the details.
|
||||
- ``bgColor``. Background color, e.g. '9966CC'.
|
||||
- ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'.
|
||||
- ``border(Top|Right|Bottom|Left)Size``. Border size in twips.
|
||||
|
|
@ -115,7 +115,7 @@ Image
|
|||
|
||||
Available Image style options:
|
||||
|
||||
- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details.
|
||||
- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
|
||||
- ``height``. Height in pixels.
|
||||
- ``marginLeft``. Left margin in inches, can be negative.
|
||||
- ``marginTop``. Top margin in inches, can be negative.
|
||||
|
|
@ -129,7 +129,7 @@ Numbering level
|
|||
|
||||
Available NumberingLevel style options:
|
||||
|
||||
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details.
|
||||
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
|
||||
- ``font``. Font name.
|
||||
- ``format``. Numbering format bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter.
|
||||
- ``hanging``. See paragraph style.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ include_once 'Sample_Header.php';
|
|||
echo date('H:i:s') , ' Create new PhpWord object' , EOL;
|
||||
$phpWord = new \PhpOffice\PhpWord\PhpWord();
|
||||
$phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true));
|
||||
$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER, 'spaceAfter' => 100));
|
||||
$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100));
|
||||
$phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240));
|
||||
|
||||
// New portrait section
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL;
|
|||
$phpWord = new \PhpOffice\PhpWord\PhpWord();
|
||||
$phpWord->setDefaultParagraphStyle(
|
||||
array(
|
||||
'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::BOTH,
|
||||
'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::BOTH,
|
||||
'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12),
|
||||
'spacing' => 120,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ for ($r = 1; $r <= 8; $r++) {
|
|||
$section->addTextBreak(1);
|
||||
$section->addText(htmlspecialchars('Fancy table', ENT_COMPAT, 'UTF-8'), $header);
|
||||
|
||||
$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER);
|
||||
$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER);
|
||||
$styleFirstRow = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF');
|
||||
$styleCell = array('valign' => 'center');
|
||||
$styleCellBTLR = array('valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR);
|
||||
|
|
@ -58,7 +58,7 @@ $styleTable = array('borderSize' => 6, 'borderColor' => '999999');
|
|||
$cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00');
|
||||
$cellRowContinue = array('vMerge' => 'continue');
|
||||
$cellColSpan = array('gridSpan' => 2, 'valign' => 'center');
|
||||
$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER);
|
||||
$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER);
|
||||
$cellVCentered = array('valign' => 'center');
|
||||
|
||||
$phpWord->addTableStyle('Colspan Rowspan', $styleTable);
|
||||
|
|
@ -89,10 +89,10 @@ $table->addCell(null, $cellRowContinue);
|
|||
$section->addTextBreak(2);
|
||||
$section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header);
|
||||
|
||||
$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER));
|
||||
$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER));
|
||||
$cell = $table->addRow()->addCell();
|
||||
$cell->addText(htmlspecialchars('This cell contains nested table.', ENT_COMPAT, 'UTF-8'));
|
||||
$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER))->addRow()->addCell();
|
||||
$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER))->addRow()->addCell();
|
||||
$innerCell->addText(htmlspecialchars('Inside nested table', ENT_COMPAT, 'UTF-8'));
|
||||
|
||||
// Save file
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ $cell = $table->addCell(4500);
|
|||
$textrun = $cell->addTextRun();
|
||||
$textrun->addText(htmlspecialchars('This is the header with ', ENT_COMPAT, 'UTF-8'));
|
||||
$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'));
|
||||
$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END));
|
||||
$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END));
|
||||
|
||||
// Add header for all other pages
|
||||
$subsequent = $section->addHeader();
|
||||
|
|
@ -26,7 +26,7 @@ $subsequent->addImage('resources/_mars.jpg', array('width' => 80, 'height' => 80
|
|||
|
||||
// Add footer
|
||||
$footer = $section->addFooter();
|
||||
$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
|
||||
$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
|
||||
$footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'));
|
||||
|
||||
// Write some text
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $section->addImage('resources/_mars.jpg');
|
|||
$section->addTextBreak(2);
|
||||
|
||||
$section->addText(htmlspecialchars('Local image with styles:', ENT_COMPAT, 'UTF-8'));
|
||||
$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
|
||||
$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
|
||||
$section->addTextBreak(2);
|
||||
|
||||
// Remote image
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $section->addText(
|
|||
$table1 = $section->addTable(array('cellMargin' => 0, 'cellMarginRight' => 0, 'cellMarginBottom' => 0, 'cellMarginLeft' => 0));
|
||||
$table1->addRow(3750);
|
||||
$cell1 = $table1->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => 'ff0000'));
|
||||
$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
|
||||
$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
|
||||
|
||||
$section->addTextBreak();
|
||||
$section->addText(
|
||||
|
|
@ -43,7 +43,7 @@ $table2 = $section->addTable(
|
|||
);
|
||||
$table2->addRow(3750, array('exactHeight' => true));
|
||||
$cell2 = $table2->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => '00ff00'));
|
||||
$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
|
||||
$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
|
||||
|
||||
$section->addTextBreak();
|
||||
$section->addText(
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ $section = $phpWord->addSection();
|
|||
// In section
|
||||
$textbox = $section->addTextBox(
|
||||
array(
|
||||
'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER,
|
||||
'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER,
|
||||
'width' => 400,
|
||||
'height' => 150,
|
||||
'borderSize' => 1,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ $section->addField('PAGE', array('format' => 'ArabicDash'));
|
|||
$section->addText(htmlspecialchars('Number of pages field:', ENT_COMPAT, 'UTF-8'));
|
||||
$section->addField('NUMPAGES', array('format' => 'Arabic', 'numformat' => '0,00'), array('PreserveFormat'));
|
||||
|
||||
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
|
||||
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
|
||||
$textrun->addText(htmlspecialchars('This is the date of lunar calendar ', ENT_COMPAT, 'UTF-8'));
|
||||
$textrun->addField('DATE', array('dateformat' => 'd-M-yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar'));
|
||||
$textrun->addText(htmlspecialchars(' written in a textrun.', ENT_COMPAT, 'UTF-8'));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ $section = $phpWord->addSection();
|
|||
$textrun = $section->addTextRun();
|
||||
$textrun->addText(htmlspecialchars('This is a Left to Right paragraph.', ENT_COMPAT, 'UTF-8'));
|
||||
|
||||
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END));
|
||||
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END));
|
||||
$textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true));
|
||||
|
||||
// Save file
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
namespace PhpOffice\PhpWord\Reader\RTF;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
|
||||
/**
|
||||
* RTF document reader
|
||||
|
|
@ -337,7 +337,7 @@ class Document
|
|||
'u' => array(self::STYL, 'font', 'underline', true),
|
||||
'strike' => array(self::STYL, 'font', 'strikethrough',true),
|
||||
'fs' => array(self::STYL, 'font', 'size', $parameter),
|
||||
'qc' => array(self::STYL, 'paragraph', 'alignment', ST_Jc::CENTER),
|
||||
'qc' => array(self::STYL, 'paragraph', 'alignment', Jc::CENTER),
|
||||
'sa' => array(self::STYL, 'paragraph', 'spaceAfter', $parameter),
|
||||
'fonttbl' => array(self::SKIP, 'fonttbl', null),
|
||||
'colortbl' => array(self::SKIP, 'colortbl', null),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace PhpOffice\PhpWord\SimpleType;
|
|||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
final class ST_Jc
|
||||
final class Jc
|
||||
{
|
||||
const START = 'start';
|
||||
const CENTER = 'center';
|
||||
|
|
@ -22,7 +22,7 @@ namespace PhpOffice\PhpWord\SimpleType;
|
|||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
final class ST_JcTable
|
||||
final class JcTable
|
||||
{
|
||||
const START = 'start';
|
||||
const CENTER = 'center';
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
|
||||
/**
|
||||
* Frame defines the size and position of an object
|
||||
|
|
@ -200,7 +200,7 @@ class Frame extends AbstractStyle
|
|||
*/
|
||||
public function setAlignment($value)
|
||||
{
|
||||
if (in_array($value, ST_Jc::getAllowedValues(), true)) {
|
||||
if (in_array($value, Jc::getAllowedValues(), true)) {
|
||||
$this->alignment = $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace PhpOffice\PhpWord\Style;
|
|||
|
||||
use PhpOffice\PhpWord\Exception\InvalidStyleException;
|
||||
use PhpOffice\PhpWord\Shared\String;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
|
||||
/**
|
||||
* Paragraph style
|
||||
|
|
@ -232,7 +232,7 @@ class Paragraph extends Border
|
|||
*/
|
||||
public function setAlignment($value)
|
||||
{
|
||||
if (in_array($value, ST_Jc::getAllowedValues(), true)) {
|
||||
if (in_array($value, Jc::getAllowedValues(), true)) {
|
||||
$this->alignment = $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_JcTable;
|
||||
use PhpOffice\PhpWord\SimpleType\JcTable;
|
||||
|
||||
class Table extends Border
|
||||
{
|
||||
|
|
@ -509,7 +509,7 @@ class Table extends Border
|
|||
*/
|
||||
public function setAlignment($value)
|
||||
{
|
||||
if (in_array($value, ST_JcTable::getAllowedValues(), true)) {
|
||||
if (in_array($value, JcTable::getAllowedValues(), true)) {
|
||||
$this->alignment = $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Writer\RTF\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
|
||||
/**
|
||||
* RTF paragraph style writer
|
||||
|
|
@ -48,10 +48,10 @@ class Paragraph extends AbstractStyle
|
|||
}
|
||||
|
||||
$alignments = array(
|
||||
ST_Jc::START => '\ql',
|
||||
ST_Jc::END => '\qr',
|
||||
ST_Jc::CENTER => '\qc',
|
||||
ST_Jc::BOTH => '\qj',
|
||||
Jc::START => '\ql',
|
||||
Jc::END => '\qr',
|
||||
Jc::CENTER => '\qc',
|
||||
Jc::BOTH => '\qj',
|
||||
);
|
||||
|
||||
$spaceAfter = $style->getSpaceAfter();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class ParagraphAlignment
|
|||
/**
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @param string $value Any value provided by ST_Jc simple type.
|
||||
* @param string $value Any value provided by Jc simple type.
|
||||
*
|
||||
* @see \PhpOffice\PhpWord\SimpleType\Jc For the allowed values of $value parameter.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class TableAlignment
|
|||
/**
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @param string $value Any value provided by ST_JcTable simple type.
|
||||
* @param string $value Any value provided by JcTable simple type.
|
||||
*
|
||||
* @see \PhpOffice\PhpWord\SimpleType\JcTable For the allowed values of $value parameter.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\CheckBox;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
||||
/**
|
||||
|
|
@ -82,7 +82,7 @@ class CheckBoxTest extends \PHPUnit_Framework_TestCase
|
|||
$oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle');
|
||||
$this->assertEquals('paragraphStyle', $oCheckBox->getParagraphStyle());
|
||||
|
||||
$oCheckBox->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100));
|
||||
$oCheckBox->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100));
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Image;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Element\Image
|
||||
|
|
@ -55,7 +55,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
array(
|
||||
'width' => 210,
|
||||
'height' => 210,
|
||||
'alignment' => ST_Jc::CENTER,
|
||||
'alignment' => Jc::CENTER,
|
||||
'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND,
|
||||
)
|
||||
);
|
||||
|
|
@ -98,7 +98,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$oImage = new Image(
|
||||
__DIR__ . '/../_files/images/earth.jpg',
|
||||
array('height' => 210, 'alignment' => ST_Jc::CENTER)
|
||||
array('height' => 210, 'alignment' => Jc::CENTER)
|
||||
);
|
||||
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle());
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\PreserveText;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
|
||||
/**
|
||||
* Test class for PhpOffice\PhpWord\Element\PreserveText
|
||||
|
|
@ -59,7 +59,7 @@ class PreserveTextTest extends \PHPUnit_Framework_TestCase
|
|||
$oPreserveText = new PreserveText(
|
||||
htmlspecialchars('text', ENT_COMPAT, 'UTF-8'),
|
||||
array('size' => 16, 'color' => '1B2232'),
|
||||
array('alignment' => ST_Jc::CENTER)
|
||||
array('alignment' => Jc::CENTER)
|
||||
);
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle());
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Text;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
||||
/**
|
||||
|
|
@ -81,7 +81,7 @@ class TextTest extends \PHPUnit_Framework_TestCase
|
|||
$oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle');
|
||||
$this->assertEquals('paragraphStyle', $oText->getParagraphStyle());
|
||||
|
||||
$oText->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100));
|
||||
$oText->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100));
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Style;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ class FontTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testInitiation()
|
||||
{
|
||||
$object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('alignment' => ST_Jc::BOTH));
|
||||
$object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('alignment' => Jc::BOTH));
|
||||
|
||||
$this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $object->getStyleType());
|
||||
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $object->getParagraphStyle());
|
||||
|
|
@ -158,7 +158,7 @@ class FontTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testLineHeightFloatval()
|
||||
{
|
||||
$object = new Font(null, array('alignment' => ST_Jc::CENTER));
|
||||
$object = new Font(null, array('alignment' => Jc::CENTER));
|
||||
$object->setLineHeight('1.5pt');
|
||||
$this->assertEquals(1.5, $object->getLineHeight());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Tests\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\Image;
|
||||
|
||||
/**
|
||||
|
|
@ -38,7 +38,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
$properties = array(
|
||||
'width' => 200,
|
||||
'height' => 200,
|
||||
'alignment' => ST_Jc::START,
|
||||
'alignment' => Jc::START,
|
||||
'marginTop' => 240,
|
||||
'marginLeft' => 240,
|
||||
'wrappingStyle' => 'inline',
|
||||
|
|
@ -61,7 +61,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
|
|||
$properties = array(
|
||||
'width' => 200,
|
||||
'height' => 200,
|
||||
'alignment' => ST_Jc::START,
|
||||
'alignment' => Jc::START,
|
||||
'marginTop' => 240,
|
||||
'marginLeft' => 240,
|
||||
'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Tests\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\NumberingLevel;
|
||||
|
||||
/**
|
||||
|
|
@ -42,7 +42,7 @@ class NumberingLevelTest extends \PHPUnit_Framework_TestCase
|
|||
'pStyle' => 'pStyle',
|
||||
'suffix' => 'space',
|
||||
'text' => '%1.',
|
||||
'alignment' => ST_Jc::START,
|
||||
'alignment' => Jc::START,
|
||||
'left' => 360,
|
||||
'hanging' => 360,
|
||||
'tabPos' => 360,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Tests\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_JcTable;
|
||||
use PhpOffice\PhpWord\SimpleType\JcTable;
|
||||
use PhpOffice\PhpWord\Style\Table;
|
||||
|
||||
/**
|
||||
|
|
@ -75,7 +75,7 @@ class TableTest extends \PHPUnit_Framework_TestCase
|
|||
'cellMarginLeft' => 240,
|
||||
'cellMarginRight' => 240,
|
||||
'cellMarginBottom' => 240,
|
||||
'alignment' => ST_JcTable::CENTER,
|
||||
'alignment' => JcTable::CENTER,
|
||||
'width' => 100,
|
||||
'unit' => 'pct',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Tests\Style;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\TextBox;
|
||||
|
||||
/**
|
||||
|
|
@ -38,7 +38,7 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase
|
|||
$properties = array(
|
||||
'width' => 200,
|
||||
'height' => 200,
|
||||
'alignment' => ST_Jc::START,
|
||||
'alignment' => Jc::START,
|
||||
'marginTop' => 240,
|
||||
'marginLeft' => 240,
|
||||
'wrappingStyle' => 'inline',
|
||||
|
|
@ -72,7 +72,7 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase
|
|||
$properties = array(
|
||||
'width' => 200,
|
||||
'height' => 200,
|
||||
'alignment' => ST_Jc::START,
|
||||
'alignment' => Jc::START,
|
||||
'marginTop' => 240,
|
||||
'marginLeft' => 240,
|
||||
'wrappingStyle' => 'inline',
|
||||
|
|
@ -135,7 +135,7 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$textBox = new TextBox();
|
||||
|
||||
$expectedAlignment = ST_Jc::START;
|
||||
$expectedAlignment = Jc::START;
|
||||
$textBox->setAlignment($expectedAlignment);
|
||||
$this->assertEquals($expectedAlignment, $textBox->getAlignment());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace PhpOffice\PhpWord\Tests;
|
||||
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style;
|
||||
|
||||
/**
|
||||
|
|
@ -45,7 +45,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testStyles()
|
||||
{
|
||||
$paragraph = array('alignment' => ST_Jc::CENTER);
|
||||
$paragraph = array('alignment' => Jc::CENTER);
|
||||
$font = array('italic' => true, '_bold' => true);
|
||||
$table = array('bgColor' => 'CCCCCC');
|
||||
$styles = array(
|
||||
|
|
@ -83,7 +83,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testDefaultParagraphStyle()
|
||||
{
|
||||
$paragraph = array('alignment' => ST_Jc::CENTER);
|
||||
$paragraph = array('alignment' => Jc::CENTER);
|
||||
|
||||
Style::setDefaultParagraphStyle($paragraph);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Writer\HTML;
|
||||
|
||||
/**
|
||||
|
|
@ -70,7 +70,7 @@ class HTMLTest extends \PHPUnit_Framework_TestCase
|
|||
'Font',
|
||||
array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => 'FF0000')
|
||||
);
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 20, 'spaceBefore' => 20));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER, 'spaceAfter' => 20, 'spaceBefore' => 20));
|
||||
$section = $phpWord->addSection();
|
||||
$section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph');
|
||||
$section->addTextBreak();
|
||||
|
|
@ -91,7 +91,7 @@ class HTMLTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$section = $phpWord->addSection();
|
||||
|
||||
$textrun = $section->addTextRun(array('alignment' => ST_Jc::CENTER));
|
||||
$textrun = $section->addTextRun(array('alignment' => Jc::CENTER));
|
||||
$textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8'));
|
||||
$textrun->addTextBreak();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer\ODText\Part;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
|
||||
/**
|
||||
|
|
@ -52,7 +52,7 @@ class ContentTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$phpWord->setDefaultFontName('Verdana');
|
||||
$phpWord->addFontStyle('Font', array('size' => 11));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER));
|
||||
$phpWord->addTableStyle('tblStyle', array('width' => 100));
|
||||
|
||||
$section = $phpWord->addSection(array('colsNum' => 2));
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Writer\ODText;
|
||||
|
||||
/**
|
||||
|
|
@ -72,7 +72,7 @@ class ODTextTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$phpWord = new PhpWord();
|
||||
$phpWord->addFontStyle('Font', array('size' => 11));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER));
|
||||
$section = $phpWord->addSection();
|
||||
$section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font');
|
||||
$section->addTextBreak();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Writer\RTF;
|
||||
|
||||
/**
|
||||
|
|
@ -63,7 +63,7 @@ class RTFTest extends \PHPUnit_Framework_TestCase
|
|||
'Font',
|
||||
array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => '00FF00')
|
||||
);
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER));
|
||||
$section = $phpWord->addSection();
|
||||
$section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph');
|
||||
$section->addTextBreak();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
'borderColor' => '#FF0',
|
||||
)
|
||||
);
|
||||
$section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'alignment' => ST_Jc::CENTER));
|
||||
$section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'alignment' => Jc::CENTER));
|
||||
$section->addListItemRun()->addText(htmlspecialchars('List item run 1', ENT_COMPAT, 'UTF-8'));
|
||||
$section->addField(
|
||||
'DATE',
|
||||
|
|
@ -158,7 +158,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
$phpWord->addParagraphStyle(
|
||||
'pStyle',
|
||||
array(
|
||||
'alignment' => ST_Jc::CENTER,
|
||||
'alignment' => Jc::CENTER,
|
||||
'tabs' => $tabs,
|
||||
'shading' => array('fill' => 'FFFF99'),
|
||||
'borderSize' => 4,
|
||||
|
|
@ -177,11 +177,11 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
); // Style #2
|
||||
$phpWord->addTitleStyle(1, array('color' => '333333', 'doubleStrikethrough' => true)); // Style #3
|
||||
$phpWord->addTableStyle('tStyle', array('borderSize' => 1));
|
||||
$fontStyle = new Font('text', array('alignment' => ST_Jc::CENTER));
|
||||
$fontStyle = new Font('text', array('alignment' => Jc::CENTER));
|
||||
|
||||
$section = $phpWord->addSection();
|
||||
$section->addListItem(htmlspecialchars('List Item', ENT_COMPAT, 'UTF-8'), 0, null, null, 'pStyle'); // Style #5
|
||||
$section->addObject($objectSrc, array('alignment' => ST_Jc::CENTER));
|
||||
$section->addObject($objectSrc, array('alignment' => Jc::CENTER));
|
||||
$section->addTOC($fontStyle);
|
||||
$section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1);
|
||||
$section->addTOC('fStyle');
|
||||
|
|
@ -231,7 +231,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
public function testWriteTextRun()
|
||||
{
|
||||
$pStyle = 'pStyle';
|
||||
$aStyle = array('alignment' => ST_Jc::BOTH, 'spaceBefore' => 120, 'spaceAfter' => 120);
|
||||
$aStyle = array('alignment' => Jc::BOTH, 'spaceBefore' => 120, 'spaceAfter' => 120);
|
||||
$imageSrc = __DIR__ . '/../../../_files/images/earth.jpg';
|
||||
|
||||
$phpWord = new PhpWord();
|
||||
|
|
@ -242,7 +242,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
$textrun->addTextBreak();
|
||||
$textrun = $section->addTextRun($aStyle);
|
||||
$textrun->addLink('https://github.com/PHPOffice/PHPWord');
|
||||
$textrun->addImage($imageSrc, array('alignment' => ST_Jc::CENTER));
|
||||
$textrun->addImage($imageSrc, array('alignment' => Jc::CENTER));
|
||||
$textrun->addFootnote();
|
||||
$doc = TestHelperDOCX::getDocument($phpWord);
|
||||
|
||||
|
|
@ -259,7 +259,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
$section = $phpWord->addSection();
|
||||
$fontStyleArray = array('bold' => true);
|
||||
$fontStyleName = 'Font Style';
|
||||
$paragraphStyleArray = array('alignment' => ST_Jc::CENTER);
|
||||
$paragraphStyleArray = array('alignment' => Jc::CENTER);
|
||||
$paragraphStyleName = 'Paragraph Style';
|
||||
|
||||
$expected = 'PHPWord on GitHub';
|
||||
|
|
@ -293,7 +293,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
$footer = $section->addFooter();
|
||||
$fontStyleArray = array('bold' => true);
|
||||
$fontStyleName = 'Font';
|
||||
$paragraphStyleArray = array('alignment' => ST_Jc::END);
|
||||
$paragraphStyleArray = array('alignment' => Jc::END);
|
||||
$paragraphStyleName = 'Paragraph';
|
||||
|
||||
$footer->addPreserveText(htmlspecialchars('Page {PAGE}', ENT_COMPAT, 'UTF-8'));
|
||||
|
|
@ -338,7 +338,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
public function testWriteImage()
|
||||
{
|
||||
$phpWord = new PhpWord();
|
||||
$styles = array('alignment' => ST_Jc::START, 'width' => 40, 'height' => 40, 'marginTop' => -1, 'marginLeft' => -1);
|
||||
$styles = array('alignment' => Jc::START, 'width' => 40, 'height' => 40, 'marginTop' => -1, 'marginLeft' => -1);
|
||||
$wraps = array('inline', 'behind', 'infront', 'square', 'tight');
|
||||
$section = $phpWord->addSection();
|
||||
foreach ($wraps as $wrap) {
|
||||
|
|
@ -422,7 +422,7 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
|||
$phpWord = new PhpWord();
|
||||
$section = $phpWord->addSection();
|
||||
$attributes = array(
|
||||
'alignment' => ST_Jc::END,
|
||||
'alignment' => Jc::END,
|
||||
'widowControl' => false,
|
||||
'keepNext' => true,
|
||||
'keepLines' => true,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
|
||||
/**
|
||||
|
|
@ -41,14 +41,14 @@ class FootnotesTest extends \PHPUnit_Framework_TestCase
|
|||
public function testWriteFootnotes()
|
||||
{
|
||||
$phpWord = new PhpWord();
|
||||
$phpWord->addParagraphStyle('pStyle', array('alignment' => ST_Jc::START));
|
||||
$phpWord->addParagraphStyle('pStyle', array('alignment' => Jc::START));
|
||||
$section = $phpWord->addSection();
|
||||
$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8'));
|
||||
$footnote1 = $section->addFootnote('pStyle');
|
||||
$footnote1->addText(htmlspecialchars('Footnote', ENT_COMPAT, 'UTF-8'));
|
||||
$footnote1->addTextBreak();
|
||||
$footnote1->addLink('https://github.com/PHPOffice/PHPWord');
|
||||
$footnote2 = $section->addEndnote(array('alignment' => ST_Jc::START));
|
||||
$footnote2 = $section->addEndnote(array('alignment' => Jc::START));
|
||||
$footnote2->addText(htmlspecialchars('Endnote', ENT_COMPAT, 'UTF-8'));
|
||||
$doc = TestHelperDOCX::getDocument($phpWord);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
|
||||
/**
|
||||
|
|
@ -56,7 +56,7 @@ class NumberingTest extends \PHPUnit_Framework_TestCase
|
|||
'restart' => 1,
|
||||
'suffix' => 'space',
|
||||
'text' => '%1.',
|
||||
'alignment' => ST_Jc::START,
|
||||
'alignment' => Jc::START,
|
||||
'left' => 360,
|
||||
'hanging' => 360,
|
||||
'tabPos' => 360,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +43,7 @@ class StylesTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$phpWord = new PhpWord();
|
||||
|
||||
$pStyle = array('alignment' => ST_Jc::BOTH);
|
||||
$pStyle = array('alignment' => Jc::BOTH);
|
||||
$pBase = array('basedOn' => 'Normal');
|
||||
$pNew = array('basedOn' => 'Base Style', 'next' => 'Normal');
|
||||
$rStyle = array('size' => 20);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
namespace PhpOffice\PhpWord\Tests\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\SimpleType\ST_Jc;
|
||||
use PhpOffice\PhpWord\SimpleType\Jc;
|
||||
use PhpOffice\PhpWord\Tests\TestHelperDOCX;
|
||||
use PhpOffice\PhpWord\Writer\Word2007;
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ class Word2007Test extends \PHPUnit_Framework_TestCase
|
|||
$remoteImage = 'http://php.net//images/logos/php-med-trans-light.gif';
|
||||
$phpWord = new PhpWord();
|
||||
$phpWord->addFontStyle('Font', array('size' => 11));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER));
|
||||
$phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER));
|
||||
$section = $phpWord->addSection();
|
||||
$section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph');
|
||||
$section->addTextBreak();
|
||||
|
|
|
|||
Loading…
Reference in New Issue