Commit Graph
15 Commits
Author SHA1 Message Date
Jan Tojnar 84e39ff36f Odt reader: Support Preformatted Text from pandoc writer
pandoc generates a separate style class like P123 for each paragraph,
inheriting the desired style using `parent-style-name`.

Previously, we did not support that but it is pretty easy to add.
Though for simplicity this fix does not extend to finding the parent
style recursively when deeper hierarchies are involved.
2026-02-16 13:54:34 +01:00
Jan Tojnar b4f71f7ef0 Odt reader: Support Preformatted Text style
LibreOffice uses `Preformatted_20_Text` as the default style for
code listings etc. Let’s detect if a paragraph has the `style-name`
and convert it to `CodeBlock` if it is the case.

Unfortunately, pandoc itself generates a separate style class like P123
for each paragraph so we will not yet support code listings from documents
generated by pandoc itself.

Closes #4841.
2026-02-16 13:54:34 +01:00
Jan Tojnar 4d7669666a Odt reader: Recognize Preformatted_20_Text style
This is used by LibreOffice, and we will switch to that as well.
2026-02-16 13:54:34 +01:00
Tuong Nguyen Manh 1e4fc7254b ODT Reader: Fix relative linked images (#11467)
Like with relative links ODT adds a `../` to relative linked images
which needs to be removed.

Fixes #11369.
2026-02-15 18:20:47 +01:00
Tuong Nguyen Manh 854b7332d9 ODT reader: Add table row and column spans (#11366)
Parse the number-rows-spanned and number-columns-spanned attributes to
create Cells for the Table.
2025-12-28 17:13:06 -07:00
Tuong Nguyen Manh 816ca8480d ODT Reader: Add table-header-rows 2025-08-10 08:20:49 +02:00
John MacFarlane fe3e7c948c ODT reader: create Figure elements for images that are figures.
Closes #10567.
2025-02-01 10:39:31 -08:00
John MacFarlane 42ea0fff1f ODT reader: avoid producing spurious blockquotes in list items.
Closes #9505.
2025-01-30 22:21:10 -08:00
Stephan Meijer 56f7f11473 ODT reader: Support attr text:continue-numbering (#8998)
Closes #8979.
2023-11-06 19:15:37 -08:00
Tuong Nguyen Manh 32297d5677 Odt: Add list-header
The list-header is a type of list-item.
Therefore, it will be treated exactly like one.
2022-01-02 15:05:09 -08:00
niszet 40da6c402b Treat tabs as spaces in ODT Reader. (#7185) 2021-03-31 16:44:34 -07:00
despresc d368536a4e Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
despresc 4e34d366df Adapt to the newest Table type, fix some previous adaptation issues
- Writers.Native is now adapted to the new Table type.

- Inline captions should now be conditionally wrapped in a Plain, not
  a Para block.

- The toLegacyTable function now lives in Writers.Shared.
2020-04-15 23:03:22 -04:00
despresc 7254a2ae0b Implement the new Table type 2020-04-15 23:03:22 -04:00
John MacFarlane 18ab864269 Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00