Bug 140020 - MediaDescriptor: Property "LockSave=True" should disable .uno:SaveAll"
Summary: MediaDescriptor: Property "LockSave=True" should disable .uno:SaveAll"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:7.4.0 target:7.3.1
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-30 13:35 UTC by Oliver Brinzing
Modified: 2022-01-21 13:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2021-01-30 13:35:07 UTC
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
Comment 1 Vladimir Sokolinskiy 2021-08-04 16:34:48 UTC
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
Comment 2 Commit Notification 2022-01-21 08:11:49 UTC
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.
Comment 3 Commit Notification 2022-01-21 13:10:18 UTC
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.