Interdependent change tracking, ODF proposal

Miklos Vajna vmiklos at collabora.com
Wed May 21 12:38:01 UTC 2025


Hi Regina,

I recently looked at the state of change tracking in Writer when 2
tracked changes are on top of each other, see tdf#166319.

The ODF side of this is strange: e.g. delete on insert was implemented
in openoffice times, see
sw/source/filter/xml/XMLRedlineImportHelper.cxx:206 and core.git commit
52d244dee88b111631680d8cd4c8b922f9640c15 (- added: redline import,
2001-01-10), at the same time some other combinations didn't work
previously.

Having researched this a bit, it seems Word supports 3 combinations and
now I fixed the ODF filter to also handle these (see commits in the TDF
bug). The old code had no tests, but now that I added tests for the
newer combinations, I noticed that even the schema doesn't allow this
markup, for something that OOo wrote since 2001.

Anyhow, I attach my proposal to fix this, could you please file an OASIS
issue for this?

Thanks,

Miklos
-------------- next part --------------
= Summary =

Proposal owner: Miklos Vajna

Proposal short name: Hierarchical tracked changes

= Rationale =

Use cases:

ODF already supports tracked changes with insert, delete and format types. An
ODF document has exactly one type of change at the same time, i.e. these
tracked changes never overlap. The proposal is to allow multiple types inside
a single tracked change, e.g. format or delete on top of insert; or format on
top delete.

Alternatives considered:

- Overlapping tracked changes would be an option, so each tracked change would
  only have one type, but they could overlap. This would complicate existing
  tracked change implementations which can currently expect that there is
  exactly one or zero tracked change under the cursor.

- Don't allow multiple types at the same time. This has the downside that in
  case a document is imported from other formats, only one of the types can be
  stored on ODF save.

= Requested changes to the ODF Standard =

Text changes/additions (compared to ODF 1.4):

5.5.3 <text:changed-region> (existing section)

Each <text:changed-region> element contains one or two elements, of
<text:insertion>, <text:deletion>, or <text:format-change> that corresponds
to a change being tracked within the scope of the <text:tracked-changes> element that
contains the <text:changed-region> instance.

Schema changes/additions:

  <rng:element name="text:changed-region">
    <rng:ref name="text-changed-region-attr"/>
    <rng:ref name="text-changed-region-content"/>
    <rng:optional>
      <rng:ref name="text-changed-region-content"/>
    </rng:optional>
  </rng:element>

In other words, allow an optional second type "under" the existing type.

= Impacts =

Conformance:

This proposal will not add any mandatory features or behaviors.

Backwards compatibility:

This change will not impact existing ODF processors, the usage of the new
element is optional.

Accessibility impact:

This change will not impact accessibility.

Interoperability:

OOXML's wordprocessingML allows the following combinations when using multiple
tracked change types: delete on insert, format on insert, format on delete;
this proposal allows roundtripping that feature in ODF. LibreOffice 25.8
implements this feature.


More information about the LibreOffice mailing list