diff options
author | Jonathan Clark <jonathan@libreoffice.org> | 2024-10-21 11:31:46 -0600 |
---|---|---|
committer | Jonathan Clark <jonathan@libreoffice.org> | 2024-11-02 01:09:52 +0100 |
commit | 43cd683230bc05d294b1bd64f1e7932feccdd3fb (patch) | |
tree | 8490101ef265632d22d3594d926575abfac3c7a5 /schema | |
parent | db7cd5032068c5b9faa4c707db204b58c1dbf2b2 (diff) |
tdf#36709 Add loext:text-indent supporting font-relative units
This change adds an ODF font-relative first-line indent paragraph style
attribute as a LibreOffice extension. The corresponding ODF standard
change is tracked by OFFICE-4165.
This change only implements what is minimally necessary to serialize,
deserialize, and check for ODF files containing this attribute. Further
changes are necessary.
* Added cssLength to schema, which is equivalent to length but also
allows ic and em as units.
* Added loext:text-indent to schema as a paragraph style attribute. This
attribute is equivalent to fo:text-indent, but accepts cssLength
instead of length.
* Added XML_TYPE_UNIT_MEASURE to the ODF parser, which currently accepts
only the font-relative measures and forces fallback in other cases.
* Added loext:text-indent to the ODF parser. This attribute accepts
font-relative metrics, and will behave as an import-only alias for
fo:text-indent in other cases.
* Updated SvxFirstLineIndentItem to handle unit-denominated measures.
* Added proof-of-concept indentation handler to Writer. This
implementation is incomplete and temporary, and will be revised in
future changes.
Change-Id: I7eb5c7382093cb18a9b0afbf93dacb34ba1d35ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175941
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Diffstat (limited to 'schema')
-rw-r--r-- | schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng index a805123d7e24..5f53d50c8526 100644 --- a/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng +++ b/schema/libreoffice/OpenDocument-v1.4+libreoffice-schema.rng @@ -3098,6 +3098,25 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. </rng:optional> </rng:define> + <!-- https://issues.oasis-open.org/browse/OFFICE-4165 --> + <rng:define name="cssLength"> + <rng:data type="string"> + <rng:param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px)|(ic)|(em))</rng:param> + </rng:data> + </rng:define> + + <!-- https://issues.oasis-open.org/browse/OFFICE-4165 --> + <rng:define name="style-paragraph-properties-attlist" combine="interleave"> + <rng:optional> + <rng:attribute name="loext:text-indent"> + <rng:choice> + <rng:ref name="cssLength"/> + <rng:ref name="percent"/> + </rng:choice> + </rng:attribute> + </rng:optional> + </rng:define> + <!-- TODO no proposal --> <rng:define name="chart-data-point-attlist" combine="interleave"> <rng:optional> |