[Libreoffice-bugs] [Bug 140485] 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
Thu Feb 18 16:44:22 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=140485
--- Comment #3 from Uwe Auer <uwe at franke-auer.de> ---
(In reply to An-Kh from comment #2)
I did understand your code, but probably you did not understand my answer. To
be precise and clear: Your code is wrong and I explained why.
> If IsMissing(pPassword) Then pPassword = "SomePassword"
is not doing what you understand / assume it is doing. It doesn *not* test
whether variable is set. Runtime function IsMissing() tests for *optional*
parameter in your function definition (i.e. it tests, whether *pPassword* has
been passed to function LockSheet(passedSheetname)) - but your function doesn't
have that optional parameter at all.
Therefore provided a solution (which you obviously did not check) to change:
- Function LockSheet(passedSheetname)
+ Function LockSheet(passedSheetname, optional pPassword )
In other words: The declaration of your function *LockSheet* is incorrect with
respect of using runtime function *IsMissing()*
Explanation
- means "remove" from your code
+ means "add" to your code
--
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/20210218/478b5563/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list