[Libreoffice-bugs] [Bug 140485] New: Password does not get set to Protect Sheet when added through LibreOffice BASIC

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Feb 17 18:30:43 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140485

            Bug ID: 140485
           Summary: Password does not get set to Protect Sheet when added
                    through LibreOffice BASIC
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: anshukhare50 at gmail.com

In Libreoffice BASIC, if we type

Sub LockThisSheet
    LockSheet("Sheet1")
End Sub

Function LockSheet(passedSheetname) 
    Dim oDoc        As Object : oDoc    = ThisComponent
    Dim oSheet      As Object : oSheet  =
oDoc.Sheets.getByName(passedSheetname)
    Dim pPassword   As String
    If IsMissing(pPassword) Then pPassword = "SomePassword"
    oSheet.UnProtect(pPassword)
    oSheet.Protect(pPassword)
End Function

Sheet is protected without the password.


Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6b15a8658f369e4144251854bcdb736acb595f47
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: en-IN (en_IN); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210217/e6afeabf/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list