Odfdo

Latest version: v3.7.10

Safety actively analyzes 628788 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

3.7.10

- Refactor to add property getter for some common methods. Original get\_\*
method is still available and permits detailed requests with parameters.

- Body.tables -> Body.get_tables()
- Element.tocs -> Element.get_tocs()
- Element.toc -> Element.get_toc()
- Element.text_changes -> Element.get_text_changes()
- Element.tracked_changes -> Element.get_tracked_changes()
- Element.user_defined_list -> Element.get_user_defined_list()
- Element.images -> Element.get_images()
- Element.frames -> Element.get_frames()
- Element.lists -> Element.get_lists()
- Element.headers -> Element.get_headers()
- Element.spans -> Element.get_spans()
- Element.paragraphs -> Element.get_paragraphs()
- Element.sections -> Element.get_sections()
- Table.rows -> Table.get_rows()
- Table.cells -> Table.get_cells()
- Table.columns -> Table.get_columns()
- Row.cells -> Row.get_cells()
- Document.parts -> Document.get_parts()
- Container.parts -> Container.get_parts()

- Refactor to add property getter/setter for some common methods. Original get\_\*
and set\_\* methods are still available and permit detailed requests with parameters.

- Column.default_cell_style -> Column.get/set_default_cell_style()

Added

- Added `Body.tables`
- Added `Element.tocs`
- Added `Element.toc`
- Added `Element.text_changes`
- Added `Element.tracked_changes`
- Added `Element.images`
- Added `Element.frames`
- Added `Element.lists`
- Added `Element.headers`
- Added `Element.spans`
- Added `Element.paragraphs`
- Added `Element.sections`
- Added `Column.default_cell_style`
- Added `Table.rows`
- Added `Table.cells`
- Added `Table.columns`
- Added `Row.cells`
- Added `Document.parts`
- Added `Container.parts`

3.7.9

- Refactor the Body access methods, creating relevant a Body class and related sub-classes. Moved some access method from the Element class to relevant Body sub-classes.

- Refactor metadata methods to permit access throuh property (the legacy get\_\* and set\_\* methods are still available).

- Added a few metadata elements from the ODF standard (hyperlink-behaviour, auto-reload, template, print-dateprinted-by)

Added

- Added `MetaAutoReload` class
- Added `MetaHyperlinkBehaviour` class
- Added `MetaTemplate` class
- Added `DcCreatorMixin` class
- Added `DcDateMixin` class
- Added `Body` class
- Added `Chart` class
- Added `Database` class
- Added `Drawing` class
- Added `Image` class
- Added `Presentation` class
- Added `Spreadsheet` class
- Added `Text` class (renaming the previous internal `Text` class to `EText`)

3.7.8

Fix embedded chart analysis in documents, see recipe `change_values_of_a_chart_inside_a_document.py`.

Added

- Added `change_values_of_a_chart_inside_a_document.py` recipe

Changed

- The "pretty" setting when saving the file always defaults to False. This setting should only be used for debugging purposes

- `meta.generator` can be used via a property accessor

- (Internal change) move body() definition to xmlpart

- (Internal change) refactoring for future XML feature

Fixed

- Fix parsing of Table when parent uses "table:table-rows" kind of wrapper

- Fix a bug when a Cell contains the valid 'NaN' Decimal number

3.7.7

Improvement of the `lxml` dependency support.

Added

- Added a `CHANGES.md` file

- Automatic tests for ubuntu-latest, macos-latest, windows-latest

Changed

- Now supports a wider range of `lxml` versions:

- python 3.9: lxml version 4.8.0 to 4.9.4

- python 3.10: lxml version 4.8.0 to 5.1.1

- python 3.11: lxml version 4.9.4 to 5.2.0 and beyond

- python 3.12: lxml version 4.9.4 to 5.2.0 and beyond

- autogenerated documentation now uses `mkdocs`

Fixed

- Use `sys.executable` to ensure all tests can pass in a github virtualenv on Windows.

- Remove import of `lxml` internal `\_ElementUnicodeResult` and `\_ElementUnicodeResult` classes.

3.7.6

Quick fix for the crash with new `lxml` version 5.1.1

Fixed

- Fix crash with `lxml` 5.1.1 by restricting version do 5.1.0

3.7.5

Add the method `get_cell_background_color` to retrieve the background color of a cell in a table.

Added

- Tables: some users need to easily access the background color of cells, including cells without "value" content. That was requiring a complex parsing of styles. So a new method: `Document.get_cell_background_color(sheet_id, cell_coords)`.

- See the corresponding recipe `recipes/get_cell_background_color.py` for an exemple of usage.

- Tables: (related to previous). It is often useful to reduce the table size before working on it, especially if styles apply to whole rows. A method called `Table.rstrip()` already permitted to remove empty bottom rows and empty right columns. However, a `Cell` mays have no value but a style (color background for example), and `rstrip()` was removing such cells. So an new clever method is provided: `Table.optimize_width()` that shrink the table size, still keeping styled empty cells.

- To test the actual result of this method, you can use the new script `odfdo-table-shrink` which is basically a wrapper upon this method. (Note: all this stuff aims to facilitate some feature for the related github project `odsparsator`).

- `repr()` method for `Cell`, `Row` and `Column`.

- Ancillary methods related to above features.

Fixed

- `Document(path)` now accepts a `str` path starting with `~` as the path relative to the user home.

Changed

- Tables: (related to previous), change the `Cell.is_empty()` test. A cell is now considered as not empty if part of a `span` (a cell spanned on several rows or columns). This may induce some changes for parsing scripts. Before that, only the first cell of the span (which actually contains the value) was considered as non empty. Now other cells of the span are not empty (but contain a null value).

- Minor refactor of code, version updates of dependencies.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.