application patch page_order

This commit is contained in:
Jephté Clain 2025-03-04 12:15:58 +04:00
parent 85e9740971
commit 519f341a44
3 changed files with 16 additions and 0 deletions

View File

@ -517,6 +517,10 @@ final class FileSystemHelper implements FileSystemWithRootFolderHelperInterface
$xml .= " paperSize=\"{$pageSetup->paperSize->value}\"";
}
if (null !== $pageSetup->pageOrder) {
$xml .= " pageOrder=\"{$pageSetup->pageOrder->value}\"";
}
if (null !== $pageSetup->fitToHeight) {
$xml .= " fitToHeight=\"{$pageSetup->fitToHeight}\"";
}

View File

@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace OpenSpout\Writer\XLSX\Options;
enum PageOrder: string
{
case DOWN_THEN_OVER = 'downThenOver';
case OVER_THEN_DOWN = 'overThenDown';
}

View File

@ -13,6 +13,7 @@ final readonly class PageSetup
public ?PaperSize $paperSize,
public ?int $fitToHeight = null,
public ?int $fitToWidth = null,
public ?PageOrder $pageOrder = null,
) {
$this->fitToPage = null !== $fitToHeight || null !== $fitToWidth;
}