Writers refactoring fixes
This commit is contained in:
parent
0b13b22e07
commit
530f8ee357
@ -17,7 +17,6 @@
|
||||
|
||||
namespace PhpOffice\PhpWord\Writer;
|
||||
|
||||
use PhpOffice\PhpWord\Element\AbstractElement;
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\PhpWord;
|
||||
use PhpOffice\PhpWord\Style\Font;
|
||||
|
||||
@ -17,11 +17,6 @@
|
||||
|
||||
namespace PhpOffice\PhpWord\Writer\HTML\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Element\Footnote as FootnoteElement;
|
||||
use PhpOffice\PhpWord\Element\TextRun as TextRunElement;
|
||||
use PhpOffice\PhpWord\Style\Paragraph;
|
||||
use PhpOffice\PhpWord\Writer\HTML\Style\Paragraph as ParagraphStyleWriter;
|
||||
|
||||
/**
|
||||
* TextRun element HTML writer
|
||||
*
|
||||
|
||||
@ -31,11 +31,11 @@ class Generic extends AbstractStyle
|
||||
*/
|
||||
public function write()
|
||||
{
|
||||
$this->style = $this->getStyle();
|
||||
$style = $this->getStyle();
|
||||
$css = array();
|
||||
|
||||
if (is_array($this->style) && !empty($this->style)) {
|
||||
$css = $this->style;
|
||||
if (is_array($style) && !empty($style)) {
|
||||
$css = $style;
|
||||
}
|
||||
|
||||
return $this->assembleCss($css);
|
||||
|
||||
@ -31,11 +31,11 @@ class Image extends AbstractStyle
|
||||
*/
|
||||
public function write()
|
||||
{
|
||||
$this->style = $this->getStyle();
|
||||
$style = $this->getStyle();
|
||||
$css = array();
|
||||
|
||||
$css['width'] = $this->getValueIf($this->style->getWidth(), $this->style->getWidth() . 'px');
|
||||
$css['height'] = $this->getValueIf($this->style->getHeight(), $this->style->getHeight() . 'px');
|
||||
$css['width'] = $this->getValueIf($style->getWidth(), $style->getWidth() . 'px');
|
||||
$css['height'] = $this->getValueIf($style->getHeight(), $style->getHeight() . 'px');
|
||||
|
||||
return $this->assembleCss($css);
|
||||
}
|
||||
|
||||
@ -19,7 +19,6 @@ namespace PhpOffice\PhpWord\Writer\RTF\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Style;
|
||||
use PhpOffice\PhpWord\Style\Font as FontStyle;
|
||||
use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle;
|
||||
use PhpOffice\PhpWord\Writer\RTF\Style\Font as FontStyleWriter;
|
||||
use PhpOffice\PhpWord\Writer\RTF\Style\Paragraph as ParagraphStyleWriter;
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007\Style;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
namespace PhpOffice\PhpWord\Writer\Word2007\Style;
|
||||
|
||||
use PhpOffice\PhpWord\Shared\XMLWriter;
|
||||
use PhpOffice\PhpWord\Style\TextBox as TextBoxStyle;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user