How to add an document image into a ImageControl?

Hi
Simply put,

I want to add an image anchored in a spreadsheet, with name IMG01 to the control ImageControl1 of dialog oDialog1.

Note:

  1. The dialog property “Image” calls to load the image from the file system. The image cannot be called from file system since the spreadsheet will move between computers. It must be taken from an image inside the document.

  2. There seems to be a bug in the Images properties user interface of the dialog control of type image control, because the URLs selected does not persists between save and reload of the document. This is the reason I must make the image display rebuilt each time.

Version: 7.3.5.2 / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: pt-BR
Calc: threaded

Please look at the attached file and the dialog in it. What’s wrong?
ToAskForum.ods (28.1 KB)

I don’t get how do you insert the image in the ImageControl1.

On inspecting the properties of the control I see a blank in the image (Figuras…, which is “Graphics”). If I click on the Figuras textbox, the image vanishes from the dialog.

Normally the textbox contains the URL of the external image to display in the control. If there is an URL for the internal document image (attached in the spreadsheet) then I don’t know how to write it.

May be I am missing something or hit a nasty bug.

Let’s consider different cases.

  1. We create a document where the same image is on the sheet and in the dialog (your case). Just insert the same external graphic file. Calc will replace both external links with the same internal one (on save).
  2. We want to have an image only in the dialog. This case is best reduced to the previous one by creating an additional (hidden) sheet with the same image.
2 Likes

That clarifies my troubles. Thank you.

I am baffled by this user interface issue. The dropdown Graphics list should have the names of the images in the document. I see the list empty and the control box ends erasing the image URL.

For sure this is a bug.

https://bugs.documentfoundation.org/show_bug.cgi?id=147944#c3

1 Like