I have a requirement to open office documents from one application at a time and provide this for the formats:
- Word document
- Excel spreadsheet
- PowerPoint presentation
- OpenOffice Writer document
- OpenOffice Calc spreadsheet
- OpenOffice Impress presentation
- LibreOffice Writer document
- LibreOffice Calc spreadsheet
- LibreOffice Impress presentation
After my application opens the file, the associated program determines its Process ID and monitors it. When the user wants to stop editing, my program sends a WM_CLOSE command to that Process ID, where the associated application then asks if it should save. This works fine with Microsoft Office, and a separate Process ID is assigned to each of the programs Word, Excel and PowerPoint.
With LibreOffice this looks completely different. Here there is only the soffice.exe Process and below it the soffice.bin Process. Both have a separate Process ID, but this state does not change even if I have 10 Writer, Calc and Impress files open. Therefore, my previous approach is obviously not suitable for LibreOffice, because I don’t want to close all documents, but only selected ones.
How can I still achieve my goal and close each of the edited documents? Is this only possible via the UNO API or would it also be possible via the Windows-based Process IDs?
Thanks for your answers…