2014-02-22 11:01:15 +07:00
|
|
|
<?php
|
|
|
|
|
/**
|
2014-05-05 13:06:53 +04:00
|
|
|
* This file is part of PHPWord - A pure PHP library for reading and writing
|
|
|
|
|
* word processing documents.
|
|
|
|
|
*
|
|
|
|
|
* PHPWord is free software distributed under the terms of the GNU Lesser
|
|
|
|
|
* General Public License version 3 as published by the Free Software Foundation.
|
|
|
|
|
*
|
|
|
|
|
* For the full copyright and license information, please read the LICENSE
|
|
|
|
|
* file that was distributed with this source code. For the full list of
|
|
|
|
|
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
|
2014-02-22 11:01:15 +07:00
|
|
|
*
|
2017-11-04 22:44:12 +01:00
|
|
|
* @see https://github.com/PHPOffice/PHPWord
|
2022-09-16 11:45:45 +02:00
|
|
|
*
|
2014-05-04 21:03:28 +04:00
|
|
|
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
|
2014-02-22 11:01:15 +07:00
|
|
|
*/
|
|
|
|
|
|
2014-03-22 10:06:08 +04:00
|
|
|
namespace PhpOffice\PhpWord\Style;
|
2014-02-22 11:01:15 +07:00
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Table row style.
|
2014-04-17 16:19:23 +07:00
|
|
|
*
|
|
|
|
|
* @since 0.8.0
|
2014-03-24 00:26:10 +07:00
|
|
|
*/
|
2014-04-08 03:03:14 +07:00
|
|
|
class Row extends AbstractStyle
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2014-02-22 11:01:15 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Repeat table row on every new page.
|
2014-02-22 11:01:15 +07:00
|
|
|
*
|
|
|
|
|
* @var bool
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $tblHeader = false;
|
2014-02-22 11:01:15 +07:00
|
|
|
|
|
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Table row cannot break across pages.
|
2014-02-22 11:01:15 +07:00
|
|
|
*
|
|
|
|
|
* @var bool
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $cantSplit = false;
|
2014-02-22 11:01:15 +07:00
|
|
|
|
2014-03-29 22:53:34 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Table row exact height.
|
2014-03-28 13:26:36 -04:00
|
|
|
*
|
2014-03-28 15:21:01 -04:00
|
|
|
* @var bool
|
2014-03-28 13:26:36 -04:00
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $exactHeight = false;
|
2014-03-28 13:26:36 -04:00
|
|
|
|
2014-02-22 11:01:15 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Create a new row style.
|
2014-02-22 11:01:15 +07:00
|
|
|
*/
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-17 07:26:25 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Is tblHeader.
|
2014-03-17 07:26:25 +07:00
|
|
|
*
|
2014-05-04 15:13:31 +07:00
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public function isTblHeader()
|
|
|
|
|
{
|
|
|
|
|
return $this->tblHeader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Is tblHeader.
|
2014-05-04 15:13:31 +07:00
|
|
|
*
|
|
|
|
|
* @param bool $value
|
2022-09-16 11:45:45 +02:00
|
|
|
*
|
2014-04-11 21:16:07 +07:00
|
|
|
* @return self
|
2014-03-17 07:26:25 +07:00
|
|
|
*/
|
2014-05-13 11:05:12 +07:00
|
|
|
public function setTblHeader($value = true)
|
2014-02-22 11:01:15 +07:00
|
|
|
{
|
2014-04-11 21:16:07 +07:00
|
|
|
$this->tblHeader = $this->setBoolVal($value, $this->tblHeader);
|
2014-05-08 19:25:29 +07:00
|
|
|
|
|
|
|
|
return $this;
|
2014-02-22 11:01:15 +07:00
|
|
|
}
|
|
|
|
|
|
2014-03-17 07:26:25 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Is cantSplit.
|
2014-03-17 07:26:25 +07:00
|
|
|
*
|
2014-05-04 15:13:31 +07:00
|
|
|
* @return bool
|
2014-03-17 07:26:25 +07:00
|
|
|
*/
|
2014-05-04 15:13:31 +07:00
|
|
|
public function isCantSplit()
|
2014-02-22 11:01:15 +07:00
|
|
|
{
|
2014-05-04 15:13:31 +07:00
|
|
|
return $this->cantSplit;
|
2014-02-22 11:01:15 +07:00
|
|
|
}
|
|
|
|
|
|
2014-03-17 07:26:25 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Is cantSplit.
|
2014-03-17 07:26:25 +07:00
|
|
|
*
|
2014-05-04 15:13:31 +07:00
|
|
|
* @param bool $value
|
2022-09-16 11:45:45 +02:00
|
|
|
*
|
2014-04-11 21:16:07 +07:00
|
|
|
* @return self
|
2014-03-17 07:26:25 +07:00
|
|
|
*/
|
2014-05-13 11:05:12 +07:00
|
|
|
public function setCantSplit($value = true)
|
2014-02-22 11:01:15 +07:00
|
|
|
{
|
2014-04-11 21:16:07 +07:00
|
|
|
$this->cantSplit = $this->setBoolVal($value, $this->cantSplit);
|
2014-05-08 19:25:29 +07:00
|
|
|
|
|
|
|
|
return $this;
|
2014-02-22 11:01:15 +07:00
|
|
|
}
|
|
|
|
|
|
2014-03-17 07:26:25 +07:00
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Is exactHeight.
|
2014-03-17 07:26:25 +07:00
|
|
|
*
|
2014-05-04 15:13:31 +07:00
|
|
|
* @return bool
|
2014-03-17 07:26:25 +07:00
|
|
|
*/
|
2014-05-04 15:13:31 +07:00
|
|
|
public function isExactHeight()
|
2014-02-22 11:01:15 +07:00
|
|
|
{
|
2014-05-04 15:13:31 +07:00
|
|
|
return $this->exactHeight;
|
2014-02-22 11:01:15 +07:00
|
|
|
}
|
2014-03-28 13:26:36 -04:00
|
|
|
|
|
|
|
|
/**
|
2022-09-16 11:45:45 +02:00
|
|
|
* Set exactHeight.
|
2014-03-28 13:26:36 -04:00
|
|
|
*
|
2014-04-11 21:16:07 +07:00
|
|
|
* @param bool $value
|
2022-09-16 11:45:45 +02:00
|
|
|
*
|
2014-04-11 21:16:07 +07:00
|
|
|
* @return self
|
2014-03-28 13:26:36 -04:00
|
|
|
*/
|
2014-05-13 11:05:12 +07:00
|
|
|
public function setExactHeight($value = true)
|
2014-03-28 13:26:36 -04:00
|
|
|
{
|
2014-04-11 21:16:07 +07:00
|
|
|
$this->exactHeight = $this->setBoolVal($value, $this->exactHeight);
|
2014-05-08 19:25:29 +07:00
|
|
|
|
2014-03-28 13:26:36 -04:00
|
|
|
return $this;
|
|
|
|
|
}
|
2014-03-11 19:26:56 +07:00
|
|
|
}
|