[Libreoffice-bugs] [Bug 123272] FILESAVE Unchecked Protect form compatibility settings returns after save+reload

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Apr 2 01:51:03 UTC 2019


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

Aron Budea <baron at caesar.elte.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jluth at mail.com

--- Comment #2 from Aron Budea <baron at caesar.elte.hu> ---
The problem is that the grabbag form protection, if exists, always takes
precedence over the Protect form compatibility settings, see the following
line, and where hasProtectionProperties is set:

if (! hasProtectionProperties)
https://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/docxexport.cxx?r=8b5e23ea#1128

I don't know enough on the topic to propose a fix, but what I'd try is:
- if the grabbag contains form protection set, then:
  - if enforcement in the grabbag is off (was imported as such, compatibility
option is off at start):
    - if the compatibility option is off => rely on grabbag,
    - if the compatibility option is on => mostly rely on grabbag, but set
enforcement,
  - if enforcement in the grabbag is on (was imported as such, compatibility
option is on at start):
    - if the compatibility option is off => discard grabbag, don't use form
protection,
    - if the compatibility option is on => rely on grabbag,
- if the grabbag contains a different kind of protection (compatibility option
is off at start), then:
  - if the compatibility option is off => rely on grabbag,
  - if the compatibility option is on => discard grabbag, use compatibility
setting,
- if the grabbag doesn't contain any document protection, then:
  - use compatibility setting.

Justin, does the idea outlined above sound reasonable to you?

-- 
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/20190402/3b69f5b8/attachment-0001.html>


More information about the Libreoffice-bugs mailing list