Bug 115815 - Comment position on deleted track change not preserved
Summary: Comment position on deleted track change not preserved
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Track-Changes Writer-Comments
  Show dependency treegraph
Reported: 2018-02-17 22:59 UTC by Yousuf Philips (jay) (retired)
Modified: 2021-03-12 13:07 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:

sample (8.94 KB, application/vnd.oasis.opendocument.text)
2018-02-17 22:59 UTC, Yousuf Philips (jay) (retired)
possible "proof of concept" ODT document to plan/to abandon future developments (10.61 KB, application/vnd.oasis.opendocument.text)
2021-02-25 09:47 UTC, László Németh

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2018-02-17 22:59:06 UTC
Created attachment 139963 [details]

1. open sample doc
2. add comment on 'name', 'Bilal' and 'Mike'
3. save
4. notice comment around 'Bilal' has lost it position and is at the end of the word

Build ID: acb43c0b8efbfb841e7b40603d75a8432eb21f21
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-01-09_01:20:44
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 1 Aron Budea 2018-02-18 01:13:46 UTC
Confirmed using LO & / Ubuntu 17.10.
No repro with
=> regression
Comment 2 Aron Budea 2018-02-18 01:26:18 UTC
Bibisected to the following commit using repo bibisect-43max, which is a commit from OpenOffice.

author		Oliver-Rainer Wittmann <orw@apache.org>	2013-12-19 18:50:58 +0000
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-01-08 15:58:35 +0100

123792: complete annotations on text ranges feature
Comment 3 László Németh 2021-02-25 07:42:50 UTC
tdf#115815 sw: fix lost annotation ranges of redlines

Annotations of tracked deletions lost their ranges
during ODF export, according to the limitation of
ODF or its recent implementation. As a workaround,
save and restore the start of the annotation ranges
using temporary bookmarks (which can be part of

Note: maybe it's possible to split redline ranges
regarding to the start of the annotation ranges,
mixing tracked deletions with normal text or
tracked insertions, but this would be a not backward
compatible solution, because the ODF import of this
file inserts extra (not tracked) spaces around the
annotation, losing the original text content.
Comment 4 Commit Notification 2021-02-25 07:43:05 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":


tdf#115815 sw: fix lost annotation ranges of redlines

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 5 László Németh 2021-02-25 09:47:27 UTC
Created attachment 170051 [details]
possible "proof of concept" ODT document to plan/to abandon future developments

prepared by editing content.xml manually.

Imported with bad(?) text content: with extra spaces around the annotation.

Split tracked deletion "ipsum dolor" to put <office:annotation> between "ipsum " and "dolor":

      <text:tracked-changes text:track-changes="false">
        <text:changed-region xml:id="ct93958104658160" text:id="ct93958104658160">
              <dc:creator>Unknown Author</dc:creator>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1">ipsum </text:span>
        <text:changed-region xml:id="ct93958104658161" text:id="ct93958104658161">
              <dc:creator>Unknown Author</dc:creator>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1">dolor</text:span>
        <text:changed-region xml:id="ct93958131227472" text:id="ct93958131227472">
              <dc:creator>Unknown Author</dc:creator>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1"><text:s/>sit</text:span>
        <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
        <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
        <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
        <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
        <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
      <text:p text:style-name="P1">
        <text:span text:style-name="T1">Lorem </text:span>
        <text:change text:change-id="ct93958104658160"/>
        <text:span text:style-name="T1">
          <office:annotation office:name="__Annotation__25_1874338634" loext:resolved="false">
            <dc:creator>Unknown Author</dc:creator>
            <text:p text:style-name="P3">
              <text:span text:style-name="T2">foo</text:span>
        <text:change text:change-id="ct93958104658161"/>
        <office:annotation-end office:name="__Annotation__25_1874338634"/>
        <text:change text:change-id="ct93958131227472"/>
        <text:span text:style-name="T1"><text:s/>amet...</text:span>