opening a document with "LockSave=True" should disable ".uno:SaveAll" too. at the mmoment this will only work in combination with "ReadOnly=True". REM ***** BASIC ***** OPTION EXPLICIT Sub TestLoad() Dim oDesktop as Object Dim oDocument as Object Dim sURL as String Dim mArgs(6) as new com.sun.star.beans.PropertyValue mArgs(0).Name = "LockEditDoc" mArgs(0).Value = True mArgs(1).Name = "LockSave" mArgs(1).Value = True mArgs(2).Name = "LockPrint" mArgs(2).Value = True mArgs(3).Name = "LockExport" mArgs(3).Value = True mArgs(4).Name = "LockContentExtraction" mArgs(4).Value = True mArgs(5).Name = "ReadOnly" mArgs(5).Value = False mArgs(6).Name = "PickListEntry" mArgs(6).Value = False sURL = ConvertToURL("D:\test_open.odt") oDesktop = createUnoService( "com.sun.star.frame.Desktop" ) oDocument = oDesktop.loadComponentFromURL(sURL, "_blank", 0, mArgs()) End Sub
In my opinion, the "Save All" command should ignore documents with the "LockExport" and "LockSave" properties equal to True. Reproduced. Version: 7.1.5.2 (x64) / LibreOffice Community Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5 CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: default; VCL: win Locale: ru-RU (ru_RU); UI: ru-RU Calc: threaded
Vasily Melenchuk committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/87fe449c4c1ed46003e9d5fdaf1919f11a53b959 tdf#140020: Disable also menu File->SaveAll for docs with LockSave It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Vasily Melenchuk committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/d8ad1d634db888026ef973442775775051066458 tdf#140020: Disable also menu File->SaveAll for docs with LockSave It will be available in 7.3.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.