From b721c163354bfc2f17d94162a1bcfb96e0b37fab Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 23 Jan 2025 11:08:51 +0400 Subject: [PATCH] support pageOrder --- src/ref/ext/spout/ref_builder_xlsx.php | 1 + .../src/Writer/XLSX/Helper/FileSystemHelper.php | 4 ++++ upstream-4.x/src/Writer/XLSX/Options/PageOrder.php | 11 +++++++++++ upstream-4.x/src/Writer/XLSX/Options/PageSetup.php | 1 + 4 files changed, 17 insertions(+) create mode 100644 upstream-4.x/src/Writer/XLSX/Options/PageOrder.php diff --git a/src/ref/ext/spout/ref_builder_xlsx.php b/src/ref/ext/spout/ref_builder_xlsx.php index a47311c..fe85dff 100644 --- a/src/ref/ext/spout/ref_builder_xlsx.php +++ b/src/ref/ext/spout/ref_builder_xlsx.php @@ -14,6 +14,7 @@ class ref_builder_xlsx extends ref_builder { "page_size" => "string", "fit_to_height" => "bool", "fit_to_width" => "bool", + "page_order" => "string", ], "->setPageMargin" => [ PageMargin::class, diff --git a/upstream-4.x/src/Writer/XLSX/Helper/FileSystemHelper.php b/upstream-4.x/src/Writer/XLSX/Helper/FileSystemHelper.php index c9803d1..5539b6a 100644 --- a/upstream-4.x/src/Writer/XLSX/Helper/FileSystemHelper.php +++ b/upstream-4.x/src/Writer/XLSX/Helper/FileSystemHelper.php @@ -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}\""; } diff --git a/upstream-4.x/src/Writer/XLSX/Options/PageOrder.php b/upstream-4.x/src/Writer/XLSX/Options/PageOrder.php new file mode 100644 index 0000000..ceb716b --- /dev/null +++ b/upstream-4.x/src/Writer/XLSX/Options/PageOrder.php @@ -0,0 +1,11 @@ +fitToPage = null !== $fitToHeight || null !== $fitToWidth; }