also sprach Andreas Säger <[email protected]> [2015-04-16 13:05 +0200]: > Sub protectSheets_onSave(ev) > eSh = ev.Source.Sheets.createEnumeration() > while eSh.hasMoreElements() > sh = eSh.nextElement() > sh.protect("") > wend > End Sub
Also does not work. :( At some points, I get an error when trying to run it. At other times, the sheets are simply not protected after running it. Also, it seems impossible to assign a macro stored in a file to an event. I.e. when trying to assign a macro to "Save Document", the macros stored in the .ods file are not available. :( I assume that this is because the macro is assigned locally, not "in the document". In that case, I would have to make sure everyone configures the macro in their libreoffice instances, which is unrealistic (we can't even get everyone to install lint hooks for Git etc.). What I really just want is to tell the document that it should never save the state of sheet protection and always open with all sheets protected… -- @martinkrafft | http://madduck.net/ | http://two.sentenc.es/ "i think, therefore i'm single" -- lizz winstead spamtraps: [email protected] -- To unsubscribe e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
