Is it possible to detect with a listener when an image has been deleted from a spreadsheet with a macro listener?
I am using Python but any example is fine.
I have custom Calc Addon that generates an image an displays the result on the sheet (attached to a cell). The image is generated when a cell formula is calculated. The image is set to cover the cell that the formula in in.
When the user deletes the image I also want to remove the formula automatically.
I have intercepted the menu for right click that puts custom options on the menu. One of the options can be deleted, but this would not stop the user from deleting the image without using the menu.
Also with the formula still in the cell it will just regenerate an image as soon as the sheet recalculates.
Update:
I should also mention that the images are SVG images. When I tried other controls such as Image Control the images get pixilated. This will not work for my implementation so I have to stick with GraphicObjectShape.