Bug 145568 - DIRECT FORMATTING: Text format of DF remains after "Undo" if Text with DF was pasted at the end of a paragraph (steps in comment 7)
Summary: DIRECT FORMATTING: Text format of DF remains after "Undo" if Text with DF was...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo Clear-Formatting
  Show dependency treegraph
 
Reported: 2021-11-06 08:01 UTC by Tamo
Modified: 2023-12-10 11:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
steps to reproduce (11.06 KB, application/vnd.oasis.opendocument.text)
2021-11-06 08:03 UTC, Tamo
Details
simpler steps to reproduce (in AHK) (465 bytes, application/octet-stream)
2021-11-18 12:56 UTC, Tamo
Details
steps to reproduce (without comments in the way) (11.09 KB, application/vnd.oasis.opendocument.text)
2021-12-04 03:48 UTC, Tamo
Details
movie to show what happens (1.31 MB, video/mp4)
2021-12-04 04:26 UTC, Tamo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamo 2021-11-06 08:01:30 UTC
Description:
When I undo my pasting some formatted text at the end of a paragraph,
the previously pasted format will remain there.
Note that it doesn't happen in the middle of a paragraph or an empty paragraph.

Steps to Reproduce:
1.File -> New -> Text Document
2.Enter four paragraphs: "FIRST BOLD 20pt", "second", "", and "fourth"
3.Select the first paragraph
4.Format it (Ctrl+B and Ctrl+])
5.Copy it to your clipboard (Ctrl+C)
6.Place the cursor at the end of the second paragraph, just after the "d"
7.Paste the clipboard (Ctrl+V)
8.Place the cursor at the third (empty) paragraph
9.Paste the clipboard (Ctrl+V)
10.Place the cursor in the middle of the fourth paragraph (e.g. between "r" and "t")
11.Paste the clipboard (Ctrl+V)
12.Undo the fourth paragraph (Ctrl+Z)
13.Undo the third paragraph (Ctrl+Z)
14.Undo the second paragraph (Ctrl+Z)



Actual Results:
12.Format information at the cursor is default style
13.Format information at the cursor is default style
14.Format information at the cursor is BOLD and larger font

The end of the second line contains some format properties which should not be there.

Expected Results:
12.Format information at the cursor is default style
13.Format information at the cursor is default style
14.Format information at the cursor is default style


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

Version: 7.2.3.0.0+ (x64) / LibreOffice Community
Build ID: 28dcd1f17a73929c26e490cec929706d3a06b042
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 1 Tamo 2021-11-06 08:03:10 UTC
Created attachment 176133 [details]
steps to reproduce
Comment 2 Tamo 2021-11-18 12:56:15 UTC
Created attachment 176338 [details]
simpler steps to reproduce (in AHK)

In AutoHotKey, this reproduces the bug:

SendMode Input
Send bold{Enter}
Send normal{Enter}
Send {Up}{Up}
Send {Home}+{End} ; shift+End to select the line
Send ^b
Send ^c
Send {Down}{End}
Send ^v
Send ^z
Send {Space}should not be bold but...
Comment 3 Dieter 2021-12-03 08:19:16 UTC
(In reply to Tamo from comment #1)
> Created attachment 176133 [details]
> steps to reproduce

I can't confirm it with the provided document and

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ae36ee4f3aa544e53e2edad93d6d79160b27bc9d
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 4 Tamo 2021-12-04 03:48:41 UTC
Created attachment 176685 [details]
steps to reproduce (without comments in the way)

Fix comment #3
Comment 5 Tamo 2021-12-04 03:49:56 UTC
Oh you are right, Dieter. The file had comments which prevented the bug.
Could you try deleting the comments? Or try the new one?


I can confirm this bug with this version:

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 6 Tamo 2021-12-04 04:26:43 UTC
Created attachment 176686 [details]
movie to show what happens

See what happens
Comment 7 Dieter 2021-12-08 10:45:56 UTC
I confirm it with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2934472ab888ebfe64a153984af2902fac63a7a0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to reproduce
1. Open a new document and write two paragraphs with some words (both paragraphs default PS)
2. Change formatting of first paragraph (bold and font size 20pt.)
3. Copy the first paragraph and paste it and end of second paragraph
4. Undo

Actual result:
Cursor has still setting from direct formatting (as you can see in toolbar); Remove DF (Strg+M) solves the problem

Expected result
Cursor without settings from Direct Formatting

Additional observation:
Problem doesn't appear in the following situation
a) DF-Text is pasted at beginning of a paragraph
b) DF-Text is pasted within a paragraph
c) DF-Text is pasted in an empty paragraph

Same result in
Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.19; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: CL
Comment 8 QA Administrators 2023-12-09 03:14:43 UTC Comment hidden (obsolete)
Comment 9 Tamo 2023-12-10 11:56:10 UTC
Seems to have been fixed.
Thank you!

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded