fletcher / fletcher/MultiMarkdown-5
Unnamed Frames in FODT output may break in future LibreOffice builds
- Dominant language
- C
- Stars
- 296
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
Multimarkdown -> FODT generates XML for images wrapped in draw:frame text frames. In the first release candidate of LibreOffice, all images subsequent to the first one on MMD --> FODT output were not shown. I posted this bug:
https://bugs.documentfoundation.org/show_bug.cgi?id=96245
Making a simplified test case it turns out LO made a change so that text frames needed a unique text:name property. You can see this comparing broken vs working XML here, see e.g. line 5:
https://gist.github.com/iandol/99469b06863faf0d84a3
The LO bug has been fixed, but with the following comment:
> you should set a unique name on each frame, that's the best course of action. I'll relax the current test to continue to allow empty frames for now though.
e.g.:
``` XML
```
should be (where XXX is a unique number or name):
``` XML
```
Therefore I suspect it would be good for MMD to generate unique names for all draw:frame elements. The draw:frame element insertion occurs on line 510 and 527 here:
https://github.com/fletcher/MultiMarkdown-5/blob/master/src/odf.c#L510
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect src/odf.c around lines 510 and 527, where draw:frame elements are inserted. Compare the generated FODT XML with the broken and working examples in the linked gist, then verify that multiple image frames receive unique draw:name values. Confirm the output remains valid for documents containing multiple images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100