support hauteur de ligne
This commit is contained in:
parent
60dfb1e177
commit
fd68d0ecd5
@ -348,6 +348,14 @@ class SpoutBuilder extends AbstractBuilder {
|
||||
}
|
||||
|
||||
function _write(array $row, ?array $colStyles=null, ?array $rowStyle=null): void {
|
||||
$rowParams = null;
|
||||
if ($rowStyle !== null) {
|
||||
foreach (array_keys(ref_params::ROW) as $method) {
|
||||
$value = $rowStyle[$method] ?? null;
|
||||
unset($rowStyle[$method]);
|
||||
if ($value !== null) $rowParams[$method] = $value;
|
||||
}
|
||||
}
|
||||
$sheetParams = $this->sheetParams;
|
||||
$headerStyle = $sheetParams["header_style"] ?? null;
|
||||
$oddStyle = $sheetParams["odd_style"] ?? null;
|
||||
@ -379,7 +387,9 @@ class SpoutBuilder extends AbstractBuilder {
|
||||
}
|
||||
$rowStyle ??= $oddStyle;
|
||||
self::ensure_style($rowStyle);
|
||||
$this->writer->addRow(WriterEntityFactory::createRow($cells, $rowStyle));
|
||||
$row = WriterEntityFactory::createRow($cells, $rowStyle);
|
||||
self::apply_params($row, $rowParams, ref_params::ROW);
|
||||
$this->writer->addRow($row);
|
||||
if ($differentOddEven) $this->oddEvenIndex++;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,10 @@ class ref_params {
|
||||
"different_odd_even" => "bool",
|
||||
];
|
||||
|
||||
const ROW = [
|
||||
"->setHeight" => ["float"],
|
||||
];
|
||||
|
||||
const COLORS = [
|
||||
"black" => Color::BLACK,
|
||||
"white" => Color::WHITE,
|
||||
|
Loading…
Reference in New Issue
Block a user