From bfb0f3c21583d45de478af0dacc80bb9a4664b63 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sun, 20 Sep 2026 13:27:02 +0200 Subject: [PATCH] Take core 7.2.0, which is what the free highlighter needs The edition gate leaves the highlighter working in every build, and in a text document that is a `format` call under editing scope `paragraph`. Core 7.1.0 refuses every one of those, so until now lite offered pro for the one tool it was meant to give away. 7.2.0 takes a format that starts and ends in one paragraph and refuses it over two, which is what the scope is about. The release carries the rest of what the rebuilt editing UI was written against: - a pdf mark covers the glyphs it marks rather than the selection layer's em box, and an underline and a squiggle hang below the text rather than running through it - `odr.editing.setSheetOptions({editOnClick})`, which the bridge states, because a WebView answers the pointer as a mouse on an emulator and the sheet's tap-to-edit never fired there - a selection in a pdf view no longer paints the invisible layer, and keeps its highlight background - fitting the width states a `minimum-scale` where the content is more than four screens wide, so an A0 page zooms out to fit Checked by building the app against this core's commits and running it on a Pixel 9 Pro and a Pixel 6 Pro emulator: the marks, the selection, the sheet's single tap and the wide page all behave, and the app's own suites pass - 97 instrumented tests on pro. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01FJJdfqpnVCKBNHXjAVxSou --- CLAUDE.md | 8 ++++++++ app/src/main/assets/editing-bridge.js | 5 +++-- gradle/libs.versions.toml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 19d3a8c3e79b..ba245a73f5aa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -301,11 +301,19 @@ already had one and both write the same preference; the other two never get one. `PageView` sets `useWideViewPort` and `loadWithOverviewMode`, so a page wider than the screen opens scaled down to fit and is scaled again every time the phone is turned. +How far it may scale down is the page's to say, not ours. A browser floors the page scale at +0.25, which cannot fit content more than four screens wide, so an A0 pdf page used to scroll +sideways and refuse to zoom out - measured in the WebView at 3232 css px on a 412 px screen, +pinned at 0.25. Since core 7.2.0 the meta states the floor such a page needs, and narrower +content carries none. + odrcore's `HtmlConfig.viewportWidth` writes the same fit into the page's css, for an embedder rendering into a frame where the viewport meta tag is inert. Do not set it here: it is decided while translating, so it freezes the fit at the width the document was opened at - measured, a deck opened in portrait keeps a portrait-sized slide in a landscape screen. `initialZoom` and `odr.setZoom` are for a host with a zoom control of its own; here the pinch is the WebView's. +`viewportContent` hands the whole question over, which would take the floor above with it and +give a spreadsheet a fit it does not want. ### Editability comes from the core, never from a mime type diff --git a/app/src/main/assets/editing-bridge.js b/app/src/main/assets/editing-bridge.js index 12a652611d0b..a6ce502c5aa9 100644 --- a/app/src/main/assets/editing-bridge.js +++ b/app/src/main/assets/editing-bridge.js @@ -27,9 +27,10 @@ bridge.marksChanged(event.count); }; + // only a sheet carries the sheet editor, so this is asked of the page rather than taken for + // granted. A phone has no double click to spare, and the pointer is not asked either: a + // WebView answers that one as a mouse on an emulator if (odr.editing && odr.editing.setSheetOptions) { - // a phone has no double click to spare, and the pointer is not asked: a - // WebView on an emulator answers that one as a mouse odr.editing.setSheetOptions({ editOnClick: true }); } })(); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bbf7a5f6838e..1478d1e0cc70 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ googleJavaFormat = "1.35.0" ktfmt = "0.64" # odrcore's JNI bindings, java and native in one AAR, published from OpenDocument.core -odrCore = "7.1.0" +odrCore = "7.2.0" androidxAnnotation = "1.10.0" androidxAppcompat = "1.8.0"