ajout rotation et autofit
This commit is contained in:
parent
b721c16335
commit
909cd849cc
@ -91,6 +91,7 @@ class SpoutBuilder extends AbstractBuilder {
|
|||||||
if (($align = $cell["align"] ?? null) !== null) $style->setCellAlignment($align);
|
if (($align = $cell["align"] ?? null) !== null) $style->setCellAlignment($align);
|
||||||
if (($align = $cell["valign"] ?? null) !== null) $style->setCellVerticalAlignment($align);
|
if (($align = $cell["valign"] ?? null) !== null) $style->setCellVerticalAlignment($align);
|
||||||
if (($wrap = $cell["wrap"] ?? null) !== null) $style->setShouldWrapText($wrap);
|
if (($wrap = $cell["wrap"] ?? null) !== null) $style->setShouldWrapText($wrap);
|
||||||
|
if (($rotation = $cell["rotation"] ?? null) !== null) $style->setTextRotation($rotation);
|
||||||
if (($format = $cell["format"] ?? null) !== null) $style->setFormat($format);
|
if (($format = $cell["format"] ?? null) !== null) $style->setFormat($format);
|
||||||
if (($border = $cell["border"] ?? null) !== null) {
|
if (($border = $cell["border"] ?? null) !== null) {
|
||||||
if (is_string($border)) {
|
if (is_string($border)) {
|
||||||
@ -128,6 +129,7 @@ class SpoutBuilder extends AbstractBuilder {
|
|||||||
self::add_border_part($parts, "left", $border["left"] ?? null);
|
self::add_border_part($parts, "left", $border["left"] ?? null);
|
||||||
if ($parts !== null) $style->setBorder(new Border(...$parts));
|
if ($parts !== null) $style->setBorder(new Border(...$parts));
|
||||||
}
|
}
|
||||||
|
if (($autofit = $cell["autofit"] ?? null) !== null) $style->setShouldShrinkToFit($autofit);
|
||||||
return $style;
|
return $style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ class ref_builder {
|
|||||||
"align" => "string",
|
"align" => "string",
|
||||||
"valign" => "string",
|
"valign" => "string",
|
||||||
"wrap" => "bool",
|
"wrap" => "bool",
|
||||||
|
"rotation" => "int",
|
||||||
"format" => "string",
|
"format" => "string",
|
||||||
"border" => [
|
"border" => [
|
||||||
"top" => ["color" => "string", "width" => "string", "style" => "string"],
|
"top" => ["color" => "string", "width" => "string", "style" => "string"],
|
||||||
@ -89,5 +90,6 @@ class ref_builder {
|
|||||||
"bottom" => ["color" => "string", "width" => "string", "style" => "string"],
|
"bottom" => ["color" => "string", "width" => "string", "style" => "string"],
|
||||||
"left" => ["color" => "string", "width" => "string", "style" => "string"],
|
"left" => ["color" => "string", "width" => "string", "style" => "string"],
|
||||||
],
|
],
|
||||||
|
"autofit" => "bool",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user