From ee7fcbfffdb3cc9e1674e474fd993f2f107c4f14 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sun, 9 Aug 2026 11:49:46 +0200 Subject: [PATCH] test(html): keep page margins in the output tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `text_document_margin` was left at its default, so every text document in the reference output was rendered reflowed to the viewport. The Android viewer defaults the setting to on, which means the output the tests have been showing is the one most readers never see, and the paged path — page box, backdrop, fit-width viewport — was covered by nothing at all. Turn it on. Only text documents move; presentations and drawings are paged either way, and spreadsheets ignore the setting. 101 reference files gain the `.odr-pages` / `.odr-page-outer` / `.odr-page-inner` boxes and lose `initial-scale=1.0`; the pins follow. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_017ACZ1RcX9pxoMZWBaTdDRU --- test/data.cmake | 4 ++-- test/src/html_output_test.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/data.cmake b/test/data.cmake index 43b6b11d..7cde26c5 100644 --- a/test/data.cmake +++ b/test/data.cmake @@ -17,9 +17,9 @@ odr_test_data( odr_test_data( PATH "reference-output/odr-public" URL "https://github.com/opendocument-app/OpenDocument.test.output.git" - REVISION "5d817e661fd9b83aeadf9f9f1b829b658a10303b") + REVISION "e8413d37cfcd943f88bc05b325ee3bb91912212d") odr_test_data( PATH "reference-output/odr-private" URL "https://github.com/opendocument-app/OpenDocument.test-private.output.git" - REVISION "000a6b92c4498797edd0e47a875ff1124ba4eef8") + REVISION "bfe777c6e3236b892dc125d61997036224208fbc") diff --git a/test/src/html_output_test.cpp b/test/src/html_output_test.cpp index 55cdca3a..9cc58036 100644 --- a/test/src/html_output_test.cpp +++ b/test/src/html_output_test.cpp @@ -168,6 +168,11 @@ TEST_P(HtmlOutputTests, html_meta) { Path(output_path_prefix).parent().join(RelPath("resources")).string(); config.relative_resource_paths = true; config.editable = true; + // Keep a text document's page margins instead of reflowing it to the + // viewport. The Android viewer turns this on by default, so leaving it off + // here left the reference output showing a rendering path most readers never + // see — including the page box and the backdrop it brings with it. + config.text_document_margin = true; config.spreadsheet_limit = TableDimensions(4000, 500); config.page_range_end = 100; config.format_html = true;