https://bugs.documentfoundation.org/show_bug.cgi?id=171087
Bug ID: 171087
Summary: LibreOffice Feature Proposal: libvisio-rs as
Alternative Visio Import Backend
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Impress
Assignee: [email protected]
Reporter: [email protected]
LibreOffice currently uses the C++ libvisio library for importing
Microsoft Visio files (.vsd/.vsdx). This library has been effectively
unmaintained for years — the last meaningful feature work was done
around 2018. As a result, LibreOffice's Visio import has significant
gaps in rendering fidelity.
### Proposal
I have developed **libvisio-rs** (published as `libvisio-rs` on
crates.io and `libvisio-ng` on PyPI), a from-scratch Visio parser
written in Rust that addresses the shortcomings of the C++ libvisio. I
propose integrating it as an alternative or replacement Visio import
backend in LibreOffice.
### What libvisio-rs supports that C++ libvisio does not
- **Theme support** — Visio documents using theme colors and styles
render correctly
- **Gradient fills** — linear and radial gradients
- **Shadows** — drop shadows and other shadow effects
- **Hatching/pattern fills**
- **VSD binary format improvements** — NURBS curves, splines, complex
geometries
- **Rich text** — formatted text with mixed styles within a single shape
- **Radial gradients**
- **Image embedding** — embedded images in documents are preserved
- **Modern .vsdx support** — comprehensive Open Packaging Convention handling
### Integration path: C ABI
libvisio-rs exposes a stable C ABI via cbindgen-generated headers,
making integration straightforward without requiring Rust in
LibreOffice's build system. The C API is minimal and clean:
```c
VisioDocument* visio_open(const uint8_t* data, size_t len);
int32_t visio_get_page_count(const VisioDocument* doc);
char* visio_convert_page_to_svg(const VisioDocument* doc, int32_t page_index);
char* visio_extract_text(const VisioDocument* doc, int32_t page_index);
void visio_free(VisioDocument* doc);
void visio_free_string(char* s);
```
LibreOffice already consumes external C libraries. libvisio-rs could
be built as a shared library (.so/.dylib/.dll) and linked via its C
headers, similar to how other external libraries are integrated.
### Quality and maturity
- 102 automated tests covering both .vsd and .vsdx formats
- CI pipeline on every commit
- Published on crates.io (v0.1.1) and PyPI
- Actively maintained
### Links
- Source: https://github.com/yeager/libvisio-rs
- crates.io: https://crates.io/crates/libvisio-rs
- PyPI: https://pypi.org/project/libvisio-ng/
### About me
I'm Daniel Nylander, a long-time open source contributor (Swedish
translations for GNOME, GNU, Debian, Ubuntu — 2000+ packages since the
early 2000s). I wrote libvisio-rs because the existing C++ libvisio
could not handle many real-world Visio documents I encountered.
I'm happy to help with integration work, provide test documents, or
discuss the architecture in more detail.
Contact: [email protected]
--
You are receiving this mail because:
You are the assignee for the bug.