Messed up something. Resetting
This commit is contained in:
parent
2187954b56
commit
15dcb384c6
@ -412,7 +412,6 @@ abstract class AbstractContainer extends AbstractElement
|
|||||||
$docPart = $isCellTextrun ? $this->getDocPart() : $this->container;
|
$docPart = $isCellTextrun ? $this->getDocPart() : $this->container;
|
||||||
$docPartId = $isCellTextrun ? $this->getDocPartId() : $this->sectionId;
|
$docPartId = $isCellTextrun ? $this->getDocPartId() : $this->sectionId;
|
||||||
$inHeaderFooter = ($docPart == 'header' || $docPart == 'footer');
|
$inHeaderFooter = ($docPart == 'header' || $docPart == 'footer');
|
||||||
$docPartId = $inHeaderFooter ? $this->getDocPartId() : $docPartId;
|
|
||||||
return $inHeaderFooter ? $docPart . $docPartId : $docPart;
|
return $inHeaderFooter ? $docPart . $docPartId : $docPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPWord
|
* PHPWord
|
||||||
*
|
*
|
||||||
@ -6,7 +7,6 @@
|
|||||||
* @copyright 2014 PHPWord
|
* @copyright 2014 PHPWord
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Style;
|
namespace PhpOffice\PhpWord\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,35 +14,65 @@ namespace PhpOffice\PhpWord\Style;
|
|||||||
*/
|
*/
|
||||||
class Image extends AbstractStyle
|
class Image extends AbstractStyle
|
||||||
{
|
{
|
||||||
|
|
||||||
const WRAPPING_STYLE_INLINE = 'inline';
|
const WRAPPING_STYLE_INLINE = 'inline';
|
||||||
|
|
||||||
const WRAPPING_STYLE_SQUARE = 'square';
|
const WRAPPING_STYLE_SQUARE = 'square';
|
||||||
|
|
||||||
const WRAPPING_STYLE_TIGHT = 'tight';
|
const WRAPPING_STYLE_TIGHT = 'tight';
|
||||||
|
|
||||||
const WRAPPING_STYLE_BEHIND = 'behind';
|
const WRAPPING_STYLE_BEHIND = 'behind';
|
||||||
|
|
||||||
const WRAPPING_STYLE_INFRONT = 'infront';
|
const WRAPPING_STYLE_INFRONT = 'infront';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_LEFT = 'left';
|
const POSITION_HORIZONTAL_LEFT = 'left';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_CENTER = 'centered';
|
const POSITION_HORIZONTAL_CENTER = 'centered';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RIGHT = 'right';
|
const POSITION_HORIZONTAL_RIGHT = 'right';
|
||||||
|
|
||||||
const POSITION_VERTICAL_TOP = 'top';
|
const POSITION_VERTICAL_TOP = 'top';
|
||||||
|
|
||||||
const POSITION_VERTICAL_CENTER = 'center';
|
const POSITION_VERTICAL_CENTER = 'center';
|
||||||
|
|
||||||
const POSITION_VERTICAL_BOTTOM = 'bottom';
|
const POSITION_VERTICAL_BOTTOM = 'bottom';
|
||||||
|
|
||||||
const POSITION_VERTICAL_INSIDE = 'inside';
|
const POSITION_VERTICAL_INSIDE = 'inside';
|
||||||
|
|
||||||
const POSITION_VERTICAL_OUTSIDE = 'outside';
|
const POSITION_VERTICAL_OUTSIDE = 'outside';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_MARGIN = 'margin';
|
const POSITION_HORIZONTAL_RELATIVE_MARGIN = 'margin';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_PAGE = 'page';
|
const POSITION_HORIZONTAL_RELATIVE_PAGE = 'page';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_COLUMN = 'column';
|
const POSITION_HORIZONTAL_RELATIVE_COLUMN = 'column';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_CHAR = 'char';
|
const POSITION_HORIZONTAL_RELATIVE_CHAR = 'char';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_LMARGIN = 'left-margin-area';
|
const POSITION_HORIZONTAL_RELATIVE_LMARGIN = 'left-margin-area';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_RMARGIN = 'right-margin-area';
|
const POSITION_HORIZONTAL_RELATIVE_RMARGIN = 'right-margin-area';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_IMARGIN = 'inner-margin-area';
|
const POSITION_HORIZONTAL_RELATIVE_IMARGIN = 'inner-margin-area';
|
||||||
|
|
||||||
const POSITION_HORIZONTAL_RELATIVE_OMARGIN = 'outer-margin-area';
|
const POSITION_HORIZONTAL_RELATIVE_OMARGIN = 'outer-margin-area';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_MARGIN = 'margin';
|
const POSITION_VERTICAL_RELATIVE_MARGIN = 'margin';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_PAGE = 'page';
|
const POSITION_VERTICAL_RELATIVE_PAGE = 'page';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_LINE = 'line';
|
const POSITION_VERTICAL_RELATIVE_LINE = 'line';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_TMARGIN = 'top-margin-area';
|
const POSITION_VERTICAL_RELATIVE_TMARGIN = 'top-margin-area';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_BMARGIN = 'bottom-margin-area';
|
const POSITION_VERTICAL_RELATIVE_BMARGIN = 'bottom-margin-area';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_IMARGIN = 'inner-margin-area';
|
const POSITION_VERTICAL_RELATIVE_IMARGIN = 'inner-margin-area';
|
||||||
|
|
||||||
const POSITION_VERTICAL_RELATIVE_OMARGIN = 'outer-margin-area';
|
const POSITION_VERTICAL_RELATIVE_OMARGIN = 'outer-margin-area';
|
||||||
|
|
||||||
const POSITION_RELATIVE = 'relative';
|
const POSITION_RELATIVE = 'relative';
|
||||||
|
|
||||||
const POSITION_ABSOLUTE = 'absolute';
|
const POSITION_ABSOLUTE = 'absolute';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,7 +152,6 @@ class Image extends AbstractStyle
|
|||||||
*/
|
*/
|
||||||
private $positioning;
|
private $positioning;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new image style
|
* Create new image style
|
||||||
*/
|
*/
|
||||||
@ -279,7 +308,6 @@ class Image extends AbstractStyle
|
|||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function setPositioning($positioning)
|
public function setPositioning($positioning)
|
||||||
{
|
{
|
||||||
switch ($positioning) {
|
switch ($positioning) {
|
||||||
@ -343,7 +371,6 @@ class Image extends AbstractStyle
|
|||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function setPosVertical($alignment)
|
public function setPosVertical($alignment)
|
||||||
{
|
{
|
||||||
switch ($alignment) {
|
switch ($alignment) {
|
||||||
|
|||||||
@ -59,7 +59,8 @@ class Image extends Element
|
|||||||
if (null !== $marginLeft) {
|
if (null !== $marginLeft) {
|
||||||
$imgStyle .= 'margin-left:' . $marginLeft . 'px;';
|
$imgStyle .= 'margin-left:' . $marginLeft . 'px;';
|
||||||
}
|
}
|
||||||
$imgStyle.='position:absolute;mso-width-percent:0;mso-height-percent:0;mso-width-relative:margin;mso-height-relative:margin;';
|
$imgStyle.='position:absolute;mso-width-percent:0;mso-height-percent:0;';
|
||||||
|
$imgStyle.='mso-width-relative:margin;mso-height-relative:margin;';
|
||||||
switch ($positioning) {
|
switch ($positioning) {
|
||||||
case ImageStyle::POSITION_RELATIVE:
|
case ImageStyle::POSITION_RELATIVE:
|
||||||
$imgStyle.='mso-position-horizontal:'.$style->getPosHorizontal().';';
|
$imgStyle.='mso-position-horizontal:'.$style->getPosHorizontal().';';
|
||||||
@ -68,7 +69,6 @@ class Image extends Element
|
|||||||
$imgStyle.='mso-position-vertical-relative:'.$style->getPosVerticalRel().';';
|
$imgStyle.='mso-position-vertical-relative:'.$style->getPosVerticalRel().';';
|
||||||
$imgStyle.='margin-left:0;margin-top:0;';
|
$imgStyle.='margin-left:0;margin-top:0;';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ImageStyle::POSITION_ABSOLUTE:
|
case ImageStyle::POSITION_ABSOLUTE:
|
||||||
$imgStyle.='mso-position-horizontal-relative:page;';
|
$imgStyle.='mso-position-horizontal-relative:page;';
|
||||||
$imgStyle.='mso-position-vertical-relative:page;';
|
$imgStyle.='mso-position-vertical-relative:page;';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user