Bug 127635 - TRACK CHANGES: Replacement problem - spaces separated from other characters when replacing a single word by several words
Summary: TRACK CHANGES: Replacement problem - spaces separated from other characters w...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.1 rc
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:6.4.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Track-Changes redlinehide-regressions
  Show dependency treegraph
 
Reported: 2019-09-19 07:12 UTC by Lars Jødal
Modified: 2023-02-23 08:49 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Description of change-tracking problem with screenshots (68.74 KB, application/pdf)
2019-09-19 07:20 UTC, Lars Jødal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Jødal 2019-09-19 07:12:13 UTC
Description:
When change tracking is turned on but NOT visible, replacement of a single word by more than one word separates none-space and space characters.


Steps to Reproduce:
1. Open Writer with some text written without change-tracking.
2. Turn on change-tracking but do not turn on visibility of changes.
3. Highlight one word in the text (no spaces).
4. Write several words (i.e. both spaces and other characters) to replace the highlighted word.

Actual Results:
The highlighted text is replaced by the written text, but not as written: spaces are added only at the end of the newly written text (e.g. "thisisnewtext   ").

Expected Results:
The highlighted text should be replaced by the text as it is written (e.g. "this is new text").


Reproducible: Always


User Profile Reset: No



Additional Info:
The bug only appears if the highlighted text does not contain any spaces, and only when change-tracking is not visible.

Version: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU tråde: 4; Styresystem: Windows 10.0; Gengiver af brugergrænseflade: GL; VCL: win; 
Lokalisering: da-DK (da_DK); Sprog for brugergrænseflade: da-DK
Calc: threaded
Comment 1 Lars Jødal 2019-09-19 07:20:43 UTC
Created attachment 154281 [details]
Description of change-tracking problem with screenshots
Comment 2 IM 2019-09-24 22:39:27 UTC
Thank you for reporting the bug. I can not reproduce the bug in:

Version: 6.4.0.0.alpha0+ (x86)
Build ID: 5c30c20101f72d973ff28c228f755e635cad14d5
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: pl-PL (pl_PL); UI-Language: en-US
Calc: threaded

Version: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: pl-PL (pl_PL); UI-Language: en-US
Calc: threaded
Comment 3 Xisco Faulí 2019-09-25 15:56:39 UTC
Thank you for reporting the bug. To be certain the reported issue is not
related to corruption in the user profile, could you please reset your
Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 4 Lars Jødal 2019-09-26 08:04:40 UTC
It appears that the problem is not as reproducible as it seemed to me, but it is still present.

I have tried resetting my user profile. At first, the problem was gone, then it re-appeared. I thought it might be some change I had made after all and did another reset. Again, I am able to reproduce the error - but only most of the time.

I have also tried with a developer version. 

Version: 6.4.0.0.alpha0+ (x64)
Build ID: e1b51d4588b4b39592bb94dd5bb90de5e04d061e
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-23_09:16:11
Locale: da-DK (da_DK); UI-Language: en-US
Calc: CL

Again, the problem is not always present, but often. I know this makes it much harder to pinpoint the problem. Ideas for further testing are welcome.
Comment 5 Dieter 2019-09-28 05:48:11 UTC
I confirm it with

Version: 6.3.2.2 (x64)
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

and also with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: f0c832acb53326ccc9a8c1a47401fbc9e1081feb
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-11_05:46:53
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

but not with

Version: 6.1.6.3 (x64)
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: de-DE (de_DE); Calc: group threaded

I only tried once in the different versions to reproduce the issue.
Comment 6 Xisco Faulí 2019-09-30 13:44:57 UTC
I can't reproduce it in

Versión: 6.3.1.2 (x86)
Id. de compilación: b79626edf0065ac373bd1df5c28bd630b4424273
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded

nor in

Version: 6.4.0.0.alpha0+
Build ID: 49a634425f0d433541f8309f2575c8bdfd67afbe
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Dieter Pass, could you please provide more details on how to reproduce it ?
Comment 7 Dieter 2019-09-30 19:28:33 UTC
(In reply to Xisco Faulí from comment #6)
> @Dieter Pass, could you please provide more details on how to reproduce it ?

I just followed the steps from bug description.
Comment 8 Lars Jødal 2019-10-01 08:40:37 UTC
I have done a mini-bibisection. I can reproduce the bug in the RC1 version of 6.2 (and later versions, including current and master):

Version: 6.2.0.1 (x64)
Build ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
CPU tråde: 4; Styresystem: Windows 10.0; Gengiver af brugergrænseflade: GL; VCL: win; 
Lokalisering: da-DK (da_DK); Sprog for brugergrænseflade: da-DK
Calc: threaded

But NOT in the beta release 6.2.0.0.beta1 (or earlier versions):

Version: 6.2.0.0.beta1 (x64)
Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18
CPU tråde: 4; Styresystem: Windows 10.0; Gengiver af brugergrænseflade: GL; VCL: win; 
Lokalisering: da-DK (da_DK); Sprog for brugergrænseflade: da-DK
Calc: threaded


If I understand things correctly, that should narrow it down to this list of 198 bug fixes, of which 7 contains the word "track" in their description:
https://wiki.documentfoundation.org/Releases/6.2.0/RC1

Regarding reproduction of the bug, here is a repetition of the main points:
- Text written without change-tracking.
- Record track changes ON, show track changes OFF (both the opposite of default).
- Mark one word without space and begin writing more than one word, i.e. something including a space.

Is it reproducible now?
Comment 9 NISZ LibreOffice Team 2020-04-20 16:10:50 UTC
I can reproduce this if the word is selected by keyboard and from the end of the word towards the beginning of it.

Bibisected with bibisect-win32-6.2 to:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=94c1af65367dcbc7272455cf6d4940252a289b62

author	Michael Stahl <Michael.Stahl@cib.de>	2018-11-30 17:54:41 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2018-12-18 22:30:17 +0100

sw_redlinehide: make layout based Show/Hide mode the default

Adding CC to: Michael Stahl
Comment 10 Michael Stahl (allotropia) 2020-06-19 17:51:05 UTC
probably AutoCorrect problem, "Tools->AutoCorrect->While Typing" needs to be enabled.

fixed on master
Comment 11 Commit Notification 2020-06-19 17:52:00 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/398ba26077f9029bdf6f7378bfc9ce8376b6f02d

tdf#127635 sw_redlinehide: put point at the end of deletion

It will be available in 7.1.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 12 Commit Notification 2020-06-19 18:51:51 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/92dbbf840c1da7628bcdd9e8f67375efc2a2fa14

tdf#127635 sw_redlinehide: put point at the end of deletion

It will be available in 7.0.0.1.

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 13 Commit Notification 2020-06-19 23:23:33 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#127635 sw_redlinehide: put point at the end of deletion

It will be available in 6.4.6.

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 14 Lars Jødal 2020-06-22 09:13:25 UTC
I have tested the development version 6.4.6, and can confirm that the bug is resolved.

Version: 6.4.6.0.0+ (x64)
Build ID: b72705d5391b849fc70a0a4cac33523c0ea5d054
CPU tråde: 4; Styresystem: Windows 10.0 Build 18362; Gengiver af brugergrænseflade: Standard; VCL: win; 
Lokalisering: da-DK (da_DK); Sprog for brugergrænseflade: da-DK
Calc: threaded

Regarding reproduction: As noted in comment 9, a condition for the bug to appear was that the cursor was positioned at the BEGINNING of the marked text. This happens if the text is highlighted right-to-left (with the mouse or the keyboard). 
This explains why several people found the bug hard to reproduce: If the highlighting is performed left-to-right or by double-clicking a word, then the cursor will be to the right of the highlighted text, and the bug does not appear.

My original bug description could now be made more precise, but given that it is resolved, there seems to be little reason do to so now (but I have have learned something about my habits when highlighting text...)
Comment 15 Dieter 2020-06-22 09:14:58 UTC
(In reply to Lars Jødal from comment #14)
> I have tested the development version 6.4.6, and can confirm that the bug is
> resolved.

=> VERIFIED FIXED
Comment 16 Lars Jødal 2020-10-07 07:19:50 UTC
Unfortunately, it seems that fix of this bug has caused a regression - see bug #135260.
Comment 17 Commit Notification 2020-10-16 19:49:03 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/254c26f1c69e2eb23f66a79349b0ea78a5d467d3

tdf#127635: sw_uiwriter: Add unittest

It will be available in 7.1.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.