Ask Your Question

How to check what LibreOffice closed readonly file

asked 2016-08-11 12:39:10 +0200

PavelLeonov gravatar image

I write program what should opens files in external editor for editing or viewing (readonly). Sometimes editor can be MS Office program, sometimes - LibreOffice. All good for writable files. LibreOffice creates for it lock file. But if file has readonly flag, LibreOffice does not create lock file.

I can not turn off readonly flag for file. I can not use -view parameter for LibreOffice. I must move edited file or delete file after viewing, if it was opened in readonly mode.

P.S. Sorry for my English.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-08-22 05:44:15 +0200

mark_t gravatar image

If LibreOffice opens a file in read only it doesn't need a lock file to prevent writing back to the same file.

If you want to open a read only file and allow changes to be made then perhaps try opening the file as a template. From command line or your program this would be:-

"C:\Program Files\LibreOffice 5\program\soffice" -n "D:\UserData\Mark\Desktop\Calc\Test6.ods"
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-08-11 12:39:10 +0200

Seen: 25 times

Last updated: Aug 22 '16