support merge_offset
This commit is contained in:
parent
1d2d8686c4
commit
967319ff0b
@ -415,14 +415,16 @@ class SpoutBuilder extends AbstractBuilder {
|
||||
self::apply_params($row, $rowParams, ref_builder::ROW_PARAMS);
|
||||
|
||||
$mergeCells = $rowParams["merge_cells"] ?? null;
|
||||
$mergeOffset = $rowParams["merge_offset"] ?? 0;
|
||||
if ($mergeCells !== null) {
|
||||
$currentRow = $this->currentRow;
|
||||
foreach ($mergeCells as [$leftCol, $rightCol]) {
|
||||
$this->mergeCells($leftCol, $this->currentRow, $rightCol, $this->currentRow);
|
||||
|
||||
$this->mergeCells($leftCol + $mergeOffset, $currentRow, $rightCol + $mergeOffset, $currentRow);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ssWriter->addRow($row);
|
||||
$this->currentRow++;
|
||||
if ($differentOddEven) $this->oddEvenIndex++;
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ class ref_builder {
|
||||
const ROW_PARAMS = [
|
||||
"->setHeight" => ["float"],
|
||||
"merge_cells" => "array",
|
||||
"merge_offset" => "int",
|
||||
];
|
||||
|
||||
const COLORS = [
|
||||
|
Loading…
Reference in New Issue
Block a user