summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2018-12-05 17:17:21 +0100
committerEike Rathke <erack@redhat.com>2018-12-13 19:49:37 +0100
commit97a0a7f403d9514b6dc9017e6c1ac603efa9576c (patch)
treeefb0da355be9fd2bb3625d415933f1f12b79feb8 /schema
parent6ca8d2c895d729510c8345db79db95016db5e3ba (diff)
address forward incompatibility of InputRequired default change
commit fec8c14e960fbcd639a04d6c3354caff2d0bd365 changed the default value of InputRequired as read from the file; that is the value InputRequired has when it is set to neither false nor true in the file This is to mitigate the fact that InputRequired was not property enforced and now suddenly is, but its default value was "true"! So lots of past forms have InputRequired==true everywhere, users did not pay attention to it because it was not enforced, and now it is enforced, which suddenly is a huge PITA for users because they have to update most controls in all forms. Since older versions of LibreOffice omitted the input-required attribute in the file (the XML stream) when it had its then-default value (namely "true"), we changed that to now mean "false". As a side-effect, newer LibreOffice omits the attribute in the XML stream when InputRequired has its new default value, namely "false". So the situation is that any file saved with an older LibreOffice will have all its form controls with InputRequired==false when opened with a newer LibreOffice, and any file saved with a newer LibreOffice will have all its form controls with InputRequired==true when opened with an older LibreOffice. This commit makes LibreOffice always write the XML attribute. So that any file saved with a newer LibreOffice will have the same InputRequired values when opened in an older LibreOffice. This enhances forward compatibility, because InputRequired was enforced in older versions when the underlying database field was marked NOT NULL. So the current situation leads to unwanted enforcement in older LibreOffice versions, with a file that is saved from newer LibreOffice with a control having InputRequired==false and bound to a database field marked NOT NULL. This commit fixes that, by ensuring that any form control with InputRequired==false in newer LibreOffice will also have InputRequired==false in older LibreOffice. Change-Id: I92ef48ad99c4e2ead43e95376282cc861c181ab3 Reviewed-on: https://gerrit.libreoffice.org/64642 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'schema')
-rw-r--r--schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng10
1 files changed, 10 insertions, 0 deletions
diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
index adae650eafc9..d59314e99771 100644
--- a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
+++ b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
@@ -2313,6 +2313,16 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:optional>
</rng:define>
+ <!-- TODO no proposal; see 7a5d79f2297a43d0a854e304b0792164272edfe0 -->
+ <!-- FIXME this is almost certainly incomplete: need to figure out which elements can have this and which named pattern can be extended with it to get exactly these elements -->
+ <rng:define name="form-checkbox-attlist" combine="interleave">
+ <rng:optional>
+ <rng:attribute name="form:input-required">
+ <rng:ref name="boolean"/>
+ </rng:attribute>
+ </rng:optional>
+ </rng:define>
+
<!-- just a test-case for user-defined attributes, move along, nothing to see here... -->
<rng:define name="style-table-cell-properties-attlist" combine="interleave">
<rng:optional>