From 3daaffa183269898f2096d2924d5e00655939276 Mon Sep 17 00:00:00 2001 From: jhfangying Date: Wed, 12 Mar 2014 16:17:37 +0800 Subject: [PATCH 1/6] support for eastAsia fontstyle --- Classes/PHPWord/Writer/Word2007/Base.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php index fcbf71d8..3a3da985 100755 --- a/Classes/PHPWord/Writer/Word2007/Base.php +++ b/Classes/PHPWord/Writer/Word2007/Base.php @@ -388,6 +388,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->startElement('w:rFonts'); $objWriter->writeAttribute('w:ascii', $font); $objWriter->writeAttribute('w:hAnsi', $font); + $objWriter->writeAttribute('w:eastAsia', $font); $objWriter->writeAttribute('w:cs', $font); $objWriter->endElement(); } From af1a59127130df6b4f0329229551a270f7e94033 Mon Sep 17 00:00:00 2001 From: jhfangying Date: Thu, 13 Mar 2014 08:48:18 +0800 Subject: [PATCH 2/6] support for eastAsia fontstyle support for eastAsia fontstyle add sample 10 --- Classes/PHPWord/Writer/Word2007/Base.php | 1 + samples/Sample_10_EastAsianFontStyle.php | 30 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 samples/Sample_10_EastAsianFontStyle.php diff --git a/Classes/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php index 3a3da985..7fcbfb97 100755 --- a/Classes/PHPWord/Writer/Word2007/Base.php +++ b/Classes/PHPWord/Writer/Word2007/Base.php @@ -380,6 +380,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $underline = $style->getUnderline(); $superscript = $style->getSuperScript(); $subscript = $style->getSubScript(); + $hint=''; $objWriter->startElement('w:rPr'); diff --git a/samples/Sample_10_EastAsianFontStyle.php b/samples/Sample_10_EastAsianFontStyle.php new file mode 100644 index 00000000..cc0a7ef6 --- /dev/null +++ b/samples/Sample_10_EastAsianFontStyle.php @@ -0,0 +1,30 @@ +'); +} + +require_once '../Classes/PHPWord.php'; + +// New Word Document +echo date('H:i:s') , ' Create new PHPWord object' , EOL; +$PHPWord = new PHPWord(); +$section = $PHPWord->createSection(); +$header = array('size' => 16, 'bold' => true); +//1.Use EastAisa FontStyle +$section->addText('中文楷体样式测试',array('name' => '楷体', 'size' => 16, 'color' => '1B2232')); + +// Save File +echo date('H:i:s') , ' Write to Word2007 format' , EOL; +$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007'); +$objWriter->save(str_replace('.php', '.docx', __FILE__)); + +// Echo memory peak usage +echo date('H:i:s') , ' Peak memory usage: ' , (memory_get_peak_usage(true) / 1024 / 1024) , ' MB' , EOL; + +// Echo done +echo date('H:i:s') , ' Done writing file' , EOL; From bb38d6c13586b8d3daadbc0d15a9d23de471d1a5 Mon Sep 17 00:00:00 2001 From: jhfangying Date: Thu, 13 Mar 2014 08:59:46 +0800 Subject: [PATCH 3/6] delete one line --- Classes/PHPWord/Writer/Word2007/Base.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php index 7fcbfb97..3a3da985 100755 --- a/Classes/PHPWord/Writer/Word2007/Base.php +++ b/Classes/PHPWord/Writer/Word2007/Base.php @@ -380,7 +380,6 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $underline = $style->getUnderline(); $superscript = $style->getSuperScript(); $subscript = $style->getSubScript(); - $hint=''; $objWriter->startElement('w:rPr'); From a7663476f647af7ca8c2ec0fcf07da75d2dc406e Mon Sep 17 00:00:00 2001 From: jhfangying Date: Thu, 13 Mar 2014 13:09:44 +0800 Subject: [PATCH 4/6] add Font Content Type w:hint attribute added --- Classes/PHPWord.php | 6 +- Classes/PHPWord/Style/Font.php | 118 +++++++++++------------ Classes/PHPWord/Writer/Word2007/Base.php | 84 ++++++++-------- 3 files changed, 102 insertions(+), 106 deletions(-) diff --git a/Classes/PHPWord.php b/Classes/PHPWord.php index 64f9d9a2..d66fdb33 100755 --- a/Classes/PHPWord.php +++ b/Classes/PHPWord.php @@ -43,7 +43,11 @@ class PHPWord * Default font name (Arial) */ const DEFAULT_FONT_NAME = 'Arial'; - + /** + * Default Font Content Type(default) + * default|eastAsia|cs + */ + const DEFAULT_FONT_CONTENT_TYPE='default'; /** * Default font size in points (10pt) * diff --git a/Classes/PHPWord/Style/Font.php b/Classes/PHPWord/Style/Font.php index bb22a61b..62d9943b 100755 --- a/Classes/PHPWord/Style/Font.php +++ b/Classes/PHPWord/Style/Font.php @@ -1,4 +1,5 @@ _type = $type; if ($paragraphStyle instanceof PHPWord_Style_Paragraph) { @@ -184,8 +189,7 @@ class PHPWord_Style_Font * @param array $style * @return $this */ - public function setArrayStyle(array $style = array()) - { + public function setArrayStyle(array $style = array()) { foreach ($style as $key => $value) { if ($key === 'line-height') { $this->setLineHeight($value); @@ -205,8 +209,7 @@ class PHPWord_Style_Font * @param string $key * @param mixed $value */ - public function setStyleValue($key, $value) - { + public function setStyleValue($key, $value) { $method = 'set' . substr($key, 1); if (method_exists($this, $method)) { $this->$method($value); @@ -218,8 +221,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getName() - { + public function getName() { return $this->_name; } @@ -229,22 +231,21 @@ class PHPWord_Style_Font * @param string $pValue * @return PHPWord_Style_Font */ - public function setName($pValue = PHPWord::DEFAULT_FONT_NAME) - { + public function setName($pValue = PHPWord::DEFAULT_FONT_NAME) { if (is_null($pValue) || $pValue == '') { $pValue = PHPWord::DEFAULT_FONT_NAME; } $this->_name = $pValue; return $this; } + /** * Get font size * * @return int|float */ - public function getSize() - { + public function getSize() { return $this->_size; } @@ -254,8 +255,7 @@ class PHPWord_Style_Font * @param int|float $pValue * @return PHPWord_Style_Font */ - public function setSize($pValue = PHPWord::DEFAULT_FONT_SIZE) - { + public function setSize($pValue = PHPWord::DEFAULT_FONT_SIZE) { if (!is_numeric($pValue)) { $pValue = PHPWord::DEFAULT_FONT_SIZE; } @@ -268,8 +268,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getBold() - { + public function getBold() { return $this->_bold; } @@ -279,8 +278,7 @@ class PHPWord_Style_Font * @param bool $pValue * @return PHPWord_Style_Font */ - public function setBold($pValue = false) - { + public function setBold($pValue = false) { if (!is_bool($pValue)) { $pValue = false; } @@ -293,8 +291,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getItalic() - { + public function getItalic() { return $this->_italic; } @@ -304,8 +301,7 @@ class PHPWord_Style_Font * @param bool $pValue * @return PHPWord_Style_Font */ - public function setItalic($pValue = false) - { + public function setItalic($pValue = false) { if (!is_bool($pValue)) { $pValue = false; } @@ -318,8 +314,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getSuperScript() - { + public function getSuperScript() { return $this->_superScript; } @@ -329,8 +324,7 @@ class PHPWord_Style_Font * @param bool $pValue * @return PHPWord_Style_Font */ - public function setSuperScript($pValue = false) - { + public function setSuperScript($pValue = false) { if (!is_bool($pValue)) { $pValue = false; } @@ -344,8 +338,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getSubScript() - { + public function getSubScript() { return $this->_subScript; } @@ -355,8 +348,7 @@ class PHPWord_Style_Font * @param bool $pValue * @return PHPWord_Style_Font */ - public function setSubScript($pValue = false) - { + public function setSubScript($pValue = false) { if (!is_bool($pValue)) { $pValue = false; } @@ -370,8 +362,7 @@ class PHPWord_Style_Font * * @return string */ - public function getUnderline() - { + public function getUnderline() { return $this->_underline; } @@ -381,8 +372,7 @@ class PHPWord_Style_Font * @param string $pValue * @return PHPWord_Style_Font */ - public function setUnderline($pValue = PHPWord_Style_Font::UNDERLINE_NONE) - { + public function setUnderline($pValue = PHPWord_Style_Font::UNDERLINE_NONE) { if ($pValue == '') { $pValue = PHPWord_Style_Font::UNDERLINE_NONE; } @@ -395,8 +385,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getStrikethrough() - { + public function getStrikethrough() { return $this->_strikethrough; } @@ -406,8 +395,7 @@ class PHPWord_Style_Font * @param bool $pValue * @return PHPWord_Style_Font */ - public function setStrikethrough($pValue = false) - { + public function setStrikethrough($pValue = false) { if (!is_bool($pValue)) { $pValue = false; } @@ -420,8 +408,7 @@ class PHPWord_Style_Font * * @return string */ - public function getColor() - { + public function getColor() { return $this->_color; } @@ -431,8 +418,7 @@ class PHPWord_Style_Font * @param string $pValue * @return PHPWord_Style_Font */ - public function setColor($pValue = PHPWord::DEFAULT_FONT_COLOR) - { + public function setColor($pValue = PHPWord::DEFAULT_FONT_COLOR) { if (is_null($pValue) || $pValue == '') { $pValue = PHPWord::DEFAULT_FONT_COLOR; } @@ -445,8 +431,7 @@ class PHPWord_Style_Font * * @return bool */ - public function getFgColor() - { + public function getFgColor() { return $this->_fgColor; } @@ -456,8 +441,7 @@ class PHPWord_Style_Font * @param string $pValue * @return PHPWord_Style_Font */ - public function setFgColor($pValue = null) - { + public function setFgColor($pValue = null) { $this->_fgColor = $pValue; return $this; } @@ -467,8 +451,7 @@ class PHPWord_Style_Font * * @return string */ - public function getStyleType() - { + public function getStyleType() { return $this->_type; } @@ -477,12 +460,10 @@ class PHPWord_Style_Font * * @return PHPWord_Style_Paragraph */ - public function getParagraphStyle() - { + public function getParagraphStyle() { return $this->_paragraphStyle; } - /** * Set the line height * @@ -490,8 +471,7 @@ class PHPWord_Style_Font * @return $this * @throws InvalidStyleException */ - public function setLineHeight($lineHeight) - { + public function setLineHeight($lineHeight) { if (is_string($lineHeight)) { $lineHeight = floatval(preg_replace('/[^0-9\.\,]/', '', $lineHeight)); } @@ -508,8 +488,28 @@ class PHPWord_Style_Font /** * @return int|float */ - public function getLineHeight() - { + public function getLineHeight() { return $this->lineHeight; } + /** + * Get Font Content Type + * + * @return bool + */ + public function getHint() { + return $this->_hint; + } + /** + * Set Font Content Type + * + * @param string $pValue + * @return PHPWord_Style_Font + */ + public function setHint($pValue = PHPWord::DEFAULT_FONT_CONTENT_TYPE) { + if (is_null($pValue) || $pValue == '') { + $pValue = PHPWord::DEFAULT_FONT_CONTENT_TYPE; + } + $this->_hint = $pValue; + return $this; + } } diff --git a/Classes/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php index 3a3da985..64b5c3cf 100755 --- a/Classes/PHPWord/Writer/Word2007/Base.php +++ b/Classes/PHPWord/Writer/Word2007/Base.php @@ -1,4 +1,5 @@ getFontStyle(); $SfIsObject = ($styleFont instanceof PHPWord_Style_Font) ? true : false; @@ -81,8 +80,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } } - protected function _writeTextRun(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_TextRun $textrun) - { + protected function _writeTextRun(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_TextRun $textrun) { $elements = $textrun->getElements(); $styleParagraph = $textrun->getParagraphStyle(); @@ -108,7 +106,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $this->_writeLink($objWriter, $element, true); } elseif ($element instanceof PHPWord_Section_Image) { $this->_writeImage($objWriter, $element, true); - } elseif($element instanceof PHPWord_Section_Footnote) { + } elseif ($element instanceof PHPWord_Section_Footnote) { $this->_writeFootnoteReference($objWriter, $element, true); } } @@ -126,10 +124,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart * @return void */ protected function _writeParagraphStyle( - PHPWord_Shared_XMLWriter $objWriter = null, - PHPWord_Style_Paragraph $style, - $withoutPPR = false) - { + PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Paragraph $style, $withoutPPR = false) { $align = $style->getAlign(); $spacing = $style->getSpacing(); $spaceBefore = $style->getSpaceBefore(); @@ -143,9 +138,9 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $pageBreakBefore = $style->getPageBreakBefore(); if (!is_null($align) || !is_null($spacing) || !is_null($spaceBefore) || - !is_null($spaceAfter) || !is_null($indent) || !is_null($hanging) || - !is_null($tabs) || !is_null($widowControl) || !is_null($keepNext) || - !is_null($keepLines) || !is_null($pageBreakBefore)) { + !is_null($spaceAfter) || !is_null($indent) || !is_null($hanging) || + !is_null($tabs) || !is_null($widowControl) || !is_null($keepNext) || + !is_null($keepLines) || !is_null($pageBreakBefore)) { if (!$withoutPPR) { $objWriter->startElement('w:pPr'); } @@ -172,7 +167,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart // Spacing if (!is_null($spaceBefore) || !is_null($spaceAfter) || - !is_null($spacing)) { + !is_null($spacing)) { $objWriter->startElement('w:spacing'); if (!is_null($spaceBefore)) { $objWriter->writeAttribute('w:before', $spaceBefore); @@ -220,8 +215,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } } - protected function _writeLink(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Link $link, $withoutP = false) - { + protected function _writeLink(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Link $link, $withoutP = false) { $rID = $link->getRelationId(); $linkName = $link->getLinkName(); if (is_null($linkName)) { @@ -276,8 +270,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } } - protected function _writePreserveText(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Footer_PreserveText $textrun) - { + protected function _writePreserveText(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Footer_PreserveText $textrun) { $styleFont = $textrun->getFontStyle(); $styleParagraph = $textrun->getParagraphStyle(); @@ -368,8 +361,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->endElement(); // p } - protected function _writeTextStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Font $style) - { + protected function _writeTextStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Font $style) { $font = $style->getName(); $bold = $style->getBold(); $italic = $style->getItalic(); @@ -380,6 +372,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $underline = $style->getUnderline(); $superscript = $style->getSuperScript(); $subscript = $style->getSubScript(); + $hint = $style->getHint(); $objWriter->startElement('w:rPr'); @@ -390,9 +383,14 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->writeAttribute('w:hAnsi', $font); $objWriter->writeAttribute('w:eastAsia', $font); $objWriter->writeAttribute('w:cs', $font); + //Font Content Type + if ($hint != PHPWord::DEFAULT_FONT_CONTENT_TYPE) { + $objWriter->writeAttribute('w:hint', $hint); + } $objWriter->endElement(); } + // Color if ($color != PHPWord::DEFAULT_FONT_COLOR) { $objWriter->startElement('w:color'); @@ -450,13 +448,11 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->endElement(); } - protected function _writeTextBreak(PHPWord_Shared_XMLWriter $objWriter = null) - { + protected function _writeTextBreak(PHPWord_Shared_XMLWriter $objWriter = null) { $objWriter->writeElement('w:p', null); } - protected function _writeTable(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Table $table) - { + protected function _writeTable(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Table $table) { $_rows = $table->getRows(); $_cRows = count($_rows); @@ -543,7 +539,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } elseif ($element instanceof PHPWord_Section_ListItem) { $this->_writeListItem($objWriter, $element); } elseif ($element instanceof PHPWord_Section_Image || - $element instanceof PHPWord_Section_MemoryImage + $element instanceof PHPWord_Section_MemoryImage ) { $this->_writeImage($objWriter, $element); } elseif ($element instanceof PHPWord_Section_Object) { @@ -564,8 +560,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } } - protected function _writeTableStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Table $style = null) - { + protected function _writeTableStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Table $style = null) { $margins = $style->getCellMargin(); $mTop = (!is_null($margins[0])) ? true : false; $mLeft = (!is_null($margins[1])) ? true : false; @@ -609,8 +604,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } } - protected function _writeCellStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Cell $style = null) - { + protected function _writeCellStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Cell $style = null) { $bgColor = $style->getBgColor(); $valign = $style->getVAlign(); $textDir = $style->getTextDirection(); @@ -716,8 +710,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart * @param \PHPWord_Shared_XMLWriter $objWriter * @param \PHPWord_Section_Image $image */ - protected function _writeImage(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Image $image, $withoutP = false) - { + protected function _writeImage(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Image $image, $withoutP = false) { $rId = $image->getRelationId(); $style = $image->getStyle(); @@ -793,8 +786,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart } } - protected function _writeWatermark(PHPWord_Shared_XMLWriter $objWriter = null, $image) - { + protected function _writeWatermark(PHPWord_Shared_XMLWriter $objWriter = null, $image) { $rId = $image->getRelationId(); $style = $image->getStyle(); @@ -837,8 +829,7 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->endElement(); } - protected function _writeTitle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Title $title) - { + protected function _writeTitle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Title $title) { $text = htmlspecialchars($title->getText()); $text = PHPWord_Shared_String::ControlCharacterPHP2OOXML($text); $anchor = $title->getAnchor(); @@ -888,22 +879,22 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->startElement('w:p'); - if($SpIsObject) { + if ($SpIsObject) { $this->_writeParagraphStyle($objWriter, $styleParagraph); - } elseif(!$SpIsObject && !is_null($styleParagraph)) { + } elseif (!$SpIsObject && !is_null($styleParagraph)) { $objWriter->startElement('w:pPr'); - $objWriter->startElement('w:pStyle'); - $objWriter->writeAttribute('w:val', $styleParagraph); - $objWriter->endElement(); + $objWriter->startElement('w:pStyle'); + $objWriter->writeAttribute('w:val', $styleParagraph); + $objWriter->endElement(); $objWriter->endElement(); } $elements = $footnote->getElements(); - if(count($elements) > 0) { - foreach($elements as $element) { - if($element instanceof PHPWord_Section_Text) { + if (count($elements) > 0) { + foreach ($elements as $element) { + if ($element instanceof PHPWord_Section_Text) { $this->_writeText($objWriter, $element, true); - } elseif($element instanceof PHPWord_Section_Link) { + } elseif ($element instanceof PHPWord_Section_Link) { $this->_writeLink($objWriter, $element, true); } } @@ -930,4 +921,5 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $objWriter->endElement(); // w:p } } -} \ No newline at end of file + +} From 0779581fe7b7d95413dadfc595a01a9501ee5464 Mon Sep 17 00:00:00 2001 From: jhfangying Date: Thu, 13 Mar 2014 13:33:24 +0800 Subject: [PATCH 5/6] ignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 81767f6b..6b4358aa 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ vendor *.docx *.rtf *.txt -*.xml \ No newline at end of file +*.xml +nbproject From a6e91ef195fa9556b78d3054146f63ec96863cd9 Mon Sep 17 00:00:00 2001 From: jhfangying Date: Thu, 13 Mar 2014 16:01:48 +0800 Subject: [PATCH 6/6] merge --- Classes/PHPWord/Writer/Word2007/Base.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Classes/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php index 77cc83fa..04800dfb 100644 --- a/Classes/PHPWord/Writer/Word2007/Base.php +++ b/Classes/PHPWord/Writer/Word2007/Base.php @@ -126,14 +126,11 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart { * @return void */ protected function _writeParagraphStyle( -<<<<<<< HEAD - PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Paragraph $style, $withoutPPR = false) { -======= PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_Paragraph $style, $withoutPPR = false ) { ->>>>>>> 5e0fc7a2d815c96de6f6cdd081404df61e8ed886 + $align = $style->getAlign(); $spacing = $style->getSpacing(); $spaceBefore = $style->getSpaceBefore(); @@ -932,8 +929,4 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart { $objWriter->endElement(); // w:p } } -<<<<<<< HEAD - -======= ->>>>>>> 5e0fc7a2d815c96de6f6cdd081404df61e8ed886 }