Bug 115815 - Comment position on deleted track change not preserved
Summary: Comment position on deleted track change not preserved
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
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:


Attachments
sample (8.94 KB, application/vnd.oasis.opendocument.text)
2018-02-17 22:59 UTC, Yousuf Philips (jay) (retired)
Details
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
Details

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]
sample

steps:
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

Version: 6.1.0.0.alpha0+
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 6.0.1.1 & 4.3.0.3 / Ubuntu 17.10.
No repro with 4.2.0.4.
=> 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.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=0761f81643a6890457e9ef7d913ab5c88c2593a4
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
text:deletion).

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":

https://git.libreoffice.org/core/commit/d325cd0c69b7c0cc4f47105749a98995de81cc9d

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

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":

  <office:body>
    <office:text>
      <text:tracked-changes text:track-changes="false">
        <text:changed-region xml:id="ct93958104658160" text:id="ct93958104658160">
          <text:deletion>
            <office:change-info>
              <dc:creator>Unknown Author</dc:creator>
              <dc:date>2021-02-19T15:53:17</dc:date>
            </office:change-info>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1">ipsum </text:span>
            </text:p>
          </text:deletion>
        </text:changed-region>
        <text:changed-region xml:id="ct93958104658161" text:id="ct93958104658161">
          <text:deletion>
            <office:change-info>
              <dc:creator>Unknown Author</dc:creator>
              <dc:date>2021-02-19T15:53:17</dc:date>
            </office:change-info>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1">dolor</text:span>
            </text:p>
          </text:deletion>
        </text:changed-region>
        <text:changed-region xml:id="ct93958131227472" text:id="ct93958131227472">
          <text:deletion>
            <office:change-info>
              <dc:creator>Unknown Author</dc:creator>
              <dc:date>2021-02-19T15:53:17</dc:date>
            </office:change-info>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1"><text:s/>sit</text:span>
            </text:p>
          </text:deletion>
        </text:changed-region>
      </text:tracked-changes>
      <text:sequence-decls>
        <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:sequence-decls>
      <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>
            <dc:date>2021-02-19T16:25:24.908266431</dc:date>
            <text:p text:style-name="P3">
              <text:span text:style-name="T2">foo</text:span>
            </text:p>
          </office:annotation>
        </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>
      </text:p>
    </office:text>
  </office:body>