The question comes to me from one of my correspondents who works on documents with a lot of images located in the same folder of each document.
He wants that when loading each document, the default loading folder (Insert/Image) is the document folder.
I manage (by macro) to modify the path of the images (Tools/Options/LibreOffice/Paths/Images)
Code: Select all
oPaths = CreateUnoService("com.sun.star.util.PathSettings")
oPaths.Graphic_user = "file:///I:/Projets/Images"
I ended up finding the setting in the expert configuration.
Preference name: org.openoffice.Office.Common->Misc>FilePickerLastDirectory->WriterInsertImage
There is a key here. : org.openoffice.Office.Common:LastDirectory['WriterInsertImage'] Property: LastPath then url of folder
It is therefore a property of the FilePicker, but I am not very comfortable with this concept, which I use with other UNO services.
THE question: can we access this property and can we modify it?
Cordially,