mirror of
https://github.com/Karaka-Management/Resources.git
synced 2026-01-11 13:28:40 +00:00
minor code improvements
This commit is contained in:
parent
df529141b7
commit
b222c9703f
|
|
@ -2719,17 +2719,17 @@ class TCPDF {
|
||||||
* @since 5.9.000 (2010-10-03)
|
* @since 5.9.000 (2010-10-03)
|
||||||
* @see getCellMargins()
|
* @see getCellMargins()
|
||||||
*/
|
*/
|
||||||
public function setCellMargins($left=null, $top=null, $right=null, $bottom=null) : void {
|
public function setCellMargins($left=-1.0, $top=-1.0, $right=-1.0, $bottom=-1.0) : void {
|
||||||
if (!TCPDF_STATIC::empty_string($left) && ($left >= 0)) {
|
if ($left >= 0) {
|
||||||
$this->cell_margin['L'] = $left;
|
$this->cell_margin['L'] = $left;
|
||||||
}
|
}
|
||||||
if (!TCPDF_STATIC::empty_string($top) && ($top >= 0)) {
|
if ($top >= 0) {
|
||||||
$this->cell_margin['T'] = $top;
|
$this->cell_margin['T'] = $top;
|
||||||
}
|
}
|
||||||
if (!TCPDF_STATIC::empty_string($right) && ($right >= 0)) {
|
if ($right >= 0) {
|
||||||
$this->cell_margin['R'] = $right;
|
$this->cell_margin['R'] = $right;
|
||||||
}
|
}
|
||||||
if (!TCPDF_STATIC::empty_string($bottom) && ($bottom >= 0)) {
|
if ($bottom >= 0) {
|
||||||
$this->cell_margin['B'] = $bottom;
|
$this->cell_margin['B'] = $bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4725,7 +4725,7 @@ class TCPDF {
|
||||||
if (empty($subs)) {
|
if (empty($subs)) {
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
if (TCPDF_STATIC::empty_string($font)) {
|
if ($font === '') {
|
||||||
$font = $this->FontFamily;
|
$font = $this->FontFamily;
|
||||||
}
|
}
|
||||||
$fontdata = $this->AddFont($font, $style);
|
$fontdata = $this->AddFont($font, $style);
|
||||||
|
|
@ -4788,7 +4788,7 @@ class TCPDF {
|
||||||
public function setLink($link, $y=0, $page=-1) : void {
|
public function setLink($link, $y=0, $page=-1) : void {
|
||||||
$fixed = false;
|
$fixed = false;
|
||||||
if (!empty($page) && (\substr($page, 0, 1) === '*')) {
|
if (!empty($page) && (\substr($page, 0, 1) === '*')) {
|
||||||
$page = (int) (\substr($page, 1));
|
$page = (int) \substr($page, 1);
|
||||||
// this page number will not be changed when moving/add/deleting pages
|
// this page number will not be changed when moving/add/deleting pages
|
||||||
$fixed = true;
|
$fixed = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user