https://bugs.documentfoundation.org/show_bug.cgi?id=96896
--- Comment #13 from castanhe...@uol.com.br --- Hi, In reply to akash96j from comment #11 ("Can you please confirm one thing for me? In case 2 after step 4 are you actually able to edit the doc or the read-only in not present in the title but the document is in read-only mode?"): I am actually able to edit the doc after step 4 in case 2. Surprisingly, I am also able to edit the doc before step 3! I haven't noticed that before. When a new doc is opened using loadComponentFromURL("private:factory/swriter","_blank",0,OpenOptions) and OpenOptions has a value "ReadOnly" = True, the expression "(read-only)" is appended to the window title, but document is not put in read-only mode. It is not possible to toggle edit mode using Ctrl+Shift+M (grayed out under Edit menu). This behaviour is the same whether window title is changed or not. However, when an existing document is opened using loadComponentFromURL("file:///C:/Users/Public/existing.odt","_blank",0,OpenOptions) and OpenOptions has a value "ReadOnly" = True, the expression "(read-only)" is appended to the window title and, as expected, document actually opens in read-only mode. Then, if window title is changed using API and print preview is selected, the expression "(read-only)" dissapears but document remains in read-only mode. From now on, no matter how many times you toggle edit mode using Ctrl+Shift+M, the expression "(read-only)" is never appended to window title. To further investigate the behaviour of loadComponentFromURL with the URL "private:factory/swriter", I've removed the value "ReadOnly" from OpenOptions. Document is opened in edit mode as expected, but Ctrl+Shift+M is grayed out under Edit menu until you save document. So, it seems that a document cannot be put in read-only mode before it is saved to disk. If so, loadComponentFromURL with URL "private:factory/swriter" and OpenOptions "ReadOnly"=True should be considered unsupported. Nevertheless, Libreoffice appends "(read-only)" to the window title... -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs