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);
|
self::apply_params($row, $rowParams, ref_builder::ROW_PARAMS);
|
||||||
|
|
||||||
$mergeCells = $rowParams["merge_cells"] ?? null;
|
$mergeCells = $rowParams["merge_cells"] ?? null;
|
||||||
|
$mergeOffset = $rowParams["merge_offset"] ?? 0;
|
||||||
if ($mergeCells !== null) {
|
if ($mergeCells !== null) {
|
||||||
|
$currentRow = $this->currentRow;
|
||||||
foreach ($mergeCells as [$leftCol, $rightCol]) {
|
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->ssWriter->addRow($row);
|
||||||
|
$this->currentRow++;
|
||||||
if ($differentOddEven) $this->oddEvenIndex++;
|
if ($differentOddEven) $this->oddEvenIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ class ref_builder {
|
|||||||
const ROW_PARAMS = [
|
const ROW_PARAMS = [
|
||||||
"->setHeight" => ["float"],
|
"->setHeight" => ["float"],
|
||||||
"merge_cells" => "array",
|
"merge_cells" => "array",
|
||||||
|
"merge_offset" => "int",
|
||||||
];
|
];
|
||||||
|
|
||||||
const COLORS = [
|
const COLORS = [
|
||||||
|
Loading…
Reference in New Issue
Block a user