Skip to content

v7.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Oct 12:33
  • PdfFile::permissions reports the permission bits of an encrypted pdf, in
    every binding. HtmlConfig::pdf_enforce_permissions, off by default as
    pdf.js enablePermissions is, makes the page refuse a copy and a print that
    the file does not allow.

  • By default the page loads no image that a document names outside itself,
    and a relative link loses its href. Only a link with a navigable scheme
    leaves the view, in a new window. HtmlConfig::allow_external_content (in
    every binding) restores both. An image data: url always loads.

  • HtmlConfig::host_message_handler names a function, such as
    webkit.messageHandlers.odr.postMessage, that gets every odr.on* callback
    of the page as one JSON {type, detail} string. The host needs no injected
    script for this.

  • HtmlConfig::sheet_edit_on_click and pdf_annotation_mark_on_selection set
    the start values of setSheetOptions({editOnClick}) and
    odr.annotation.setOptions({markOnSelection}), in every binding.

  • A sheet cell is written with its spaces and tabs as they are, and
    spreadsheet.css preserves them. The sheet editor no longer saves a
    no-break space in place of a space, and it keeps a space at the start or
    the end of a value. Nothing is indented inside a cell any more.

  • A run of a document is written with its spaces and tabs as they are, in
    place of   and  , and document.css preserves them. An edit
    in the text editor no longer saves a no-break space or an em space in place
    of a space or a tab. A line can now break where two runs meet at a space,
    and a tab goes to the next 0.5in tab stop.

  • The text editor shows a typed space at the end of a run, and two typed
    spaces in a row. Before, the space was in the document but did not show,
    and the caret did not move.

  • A paragraph of an odt, odp, odg, docx or pptx file takes an alignment
    (Paragraph::set_style, setParagraphStyle, odr.editing.format({align}),
    and the bindings). The docx reader now reads w:jc="both" as justified.

  • The python, Java, Objective-C and npm bindings style a sheet cell
    (Sheet::set_cell_style). In Java and Objective-C, a TableCellStyle can
    now be built and written.

  • The sheet editor formats cells. A selection is a rectangle, spanned by a
    shift click, a shift arrow, a mouse drag or a header click, and
    odr.editing.format and toggle take fill and align beside the text
    keys. onSelectionChange reports what the selected cells agree on. One
    gesture is one undo step, and the log holds one setCellStyle op per cell.

  • A cell of an ods or xlsx file takes a style: Sheet::set_cell_style and
    the setCellStyle op write the fill, the horizontal alignment, and bold,
    italic, underline, strikethrough, colour and size.

  • Fix: in an ods file, a value written into a covered cell landed outside
    the merge, and one written into an empty cell right of a merge failed. The
    first now refuses, and the second lands in its cell.

  • Fix: an xlsx column in a gap between <col> ranges took the width and
    the style of the next range. It now has neither.

  • Fix: many xlsx fills showed a wrong colour. A cell now shows its fill,
    theme colours and tints, italic, underline, strikethrough and every
    alignment.

  • Fix: a cell fill disappeared in the dark color scheme. The cell now keeps
    its fill in a dark version with the same hue, and the text stays readable on
    it.


Features

  • Style a cell of an ods file (#936)
  • Style a cell of an xlsx file (#937)
  • The sheet editor formats a selection of cells (#938)
  • Sheet::set_cell_style in python, java, objective-c and npm (#939)
  • Align paragraphs in odf, docx and pptx, in the editor and the bindings (#942)
  • Set the sheet and annotation gesture options in HtmlConfig (#946)
  • Send the page callbacks to the host through HtmlConfig (#947)
  • Protect links and external images by default (#948)
  • Report the permissions of a pdf and enforce them on request (#949)

Fixes

  • A cell keeps its fill in the dark color scheme (#933)
  • An xlsx fill shows its colour, and a font its toggles (#935)
  • Show a typed space in the text editor (#943)
  • Write the text of a run as is (#944)
  • Write the text of a sheet cell as is (#945)

Refactoring

  • Move insert_in_sequence into xml_util (#941)

Documentation

  • Condense every markdown file and fix the stale claims (#932)
  • Plan cell formatting and cell ranges in the sheet editor (#934)

Tests

  • Advance the reference output to the sheet editor scripts
  • Advance the reference output to the start options of the sheet and annotation scripts
  • Advance the reference output to the protected links and images

Style

  • Format the ods fixture as black does

Publishing v7.4.0

  • ✅ conan — success · conan package (conan.yml)
  • ✅ maven — success · app.opendocument:odr-core-java — Maven Central + GitHub Packages
  • ✅ android — success · app.opendocument:odr-core-android — Maven Central + GitHub Packages
  • ✅ python — success · pyodr wheels — PyPI
  • ✅ apple — success · OdrCoreObjC.xcframework — the release asset and its manifest
  • ✅ wasm — success · @opendocument/odr-core — npm