Hi Steve

I have it in my local machine under improvement because I hit a corner case I had no clue about: images, frames and OLE object must have unique names between them in a document (1). In other words, you cannot have a frame and an image both object name "ABC" in the same doc.

On importing documents, object are renamed according to an internal naming scheme. The technical details are in the ODF standard (<draw:frame>). The user interface prevents renaming these objects if the new name causes a dup. No warn messages though.

I'll let you know when I find a way to make the script handle this and other corner cases (e.g. images inside tables).

Olivier

(1) https://gerrit.libreoffice.org/c/help/+/121384


Em 01/09/2021 09:19, Steve Fanning escreveu:
Hi Olivier,

Where is the latest version of the script kept?

Regards,

Steve


On 27/08/2021 20:21, Olivier Hallot wrote:
Hi

While working on chapter formatting and cleanup, I found quite hard to access images from the Navigator, because the "name" displayed in the Navigator is random not connected to the image caption or caption sequence number.

I wrote a small BASIC script that fills the image properties fields "Name", "Title" and "Description" with the contents of the caption, in this order:

Name = "Figure nn", where nn is the caption number

Title =  the complete caption e.g. "Figure 12: the paragraph area dialog"

Description = the text of the caption, for example "the paragraph area dialog".

Note: "Title" is also known as image ALT text.

I have not seen any specific usage of these 3 properties in our chapters so I don't expect to break anything. Please correct me if I'm wrong.

The script can be run any time during edition. Previous image naming is overwritten. Caption sequence numbers are not affected, so the references in the text are maintained.

A side benefit of the script is to improve the accessibility of the guides, as explained in this wiki page

https://wiki.documentfoundation.org/Accessibility/Creating_Accessible_LibreOffice_Files#How_to_add_alternative_descriptions_to_images_in_a_document

Comments welcome.

Regards


--
Olivier Hallot
LibreOffice Documentation Coordinator
Rio de Janeiro - Brasil - Local Time: UTC-03:00
LibreOffice – free and open source office suite: https://www.libreoffice.org
Respects your privacy, and gives you back control over your data
http://tdf.io/joinus

--
To unsubscribe e-mail to: [email protected]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/documentation/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to