diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-03-11 10:09:29 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-04-01 10:15:29 +0200 |
commit | 3af7be613526404276210a698f77e0187831b9b1 (patch) | |
tree | ce9c850bb6f77b9084e8d39c7d3d94859103cd3c /writerfilter/source/dmapper/SettingsTable.hxx | |
parent | 957092a29ff0626ead52ae776f004c08e93116b0 (diff) |
tdf#120852 writerfilter: support read-only docProtection
Setting the document to LoadReadonly nicely does not
prompt the user to "press this button to edit".
That is what we would generally want when
Read-Only is enforced, so lets use that.
The user can easily enter edit mode via the edit menu,
if they want to temporarily override the protection,
which seems natural and discoverable enough.
There is a File menu - Properties - Security option
that manages the LoadReadonly setting in LO. If the
user turns that off, then export will also cancel
enforcement of the readOnly grabbag item.
The situation where read-only was not enforced before,
but now is enforced by LO, is handled by _MarkAsFinal,
so that case is ignored. In other words, there was no point
in adding a WriterWantsToProtectReadOnly flag.
See tdf#107690 for _MarkAsFinal fix.
I had started going down the wrong patch of being
innovative with boolean &=, not realizing
that it now always evaluated the right side.
Remove that bad example for other cut-and-pasters.
In the end, this logic is much easier to understand
anyway.
Change-Id: Id26b283078a5fd62d662a26a96cfc461e0ba8459
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90323
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper/SettingsTable.hxx')
-rw-r--r-- | writerfilter/source/dmapper/SettingsTable.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx index 3489cf0ac34b..e8cbe8abaf6e 100644 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -75,6 +75,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable bool GetDoNotExpandShiftReturn() const; bool GetNoColumnBalance() const; bool GetProtectForm() const; + bool GetReadOnly() const; bool GetLongerSpaceSequence() const; bool GetNoHyphenateCaps() const; sal_Int16 GetHypenationZone() const; |