Bug 127694

Summary: Making an edit then undo changes font size (set by direct formatting) of entire paragraph
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: 79045_79045, phil.krylov
Priority: medium Keywords: bibisected, bisected, regression
Version: 6.3.1.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 105948    
Attachments: Screencast

Description Mike Kaganski 2019-09-22 07:50:47 UTC
Created attachment 154362 [details]
Screencast

1. In a new text document, add a lorem ipsum text
2. Select all, and increase font size (e.g., to 18)
3. Save and reload (so it's impossible to use "undo")
4. Replace some character in the text with another character: select the character and type the other character to overwrite
5. Undo

Expected: the previous state is restored (the paragraph looks like when it was reloaded)

Actual: the paragraph now has smaller size (12 by default).

Tested with Version: 6.3.2.2 (x64)
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

Not reproducible with Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 12; OS: Windows 10.0; UI render: GL; 
Locale: en-US (ru_RU); Calc: group threaded
Comment 1 Roman Kuznetsov 2019-09-22 08:08:19 UTC
confirm in

Версия: 6.4.0.0.alpha0+
ID сборки: 8387a6db641b29e6ff3c2f4cdc4688f538cbe35f
Потоков ЦП: 4; ОС:Linux 5.2; Отрисовка ИП: по умолчанию; VCL: kf5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-08-09_06:28:42
Локаль: ru-RU (ru_RU.UTF-8); UI-Language: ru-RU
Calc: threaded
Comment 2 Mike Kaganski 2019-09-22 08:19:50 UTC Comment hidden (obsolete)
Comment 3 Phil Krylov 2019-09-23 17:58:43 UTC
(In reply to Mike Kaganski from comment #2)
> Regression after
> https://git.libreoffice.org/core/+/6abed0ea006f3616e40faf2ae782cf64f8ac2914
> 
> CCing Phil Krylov

Well... I may be doing something wrong, but after reverting this patch from HEAD I can still reproduce the bug.
Comment 4 Mike Kaganski 2019-09-23 18:53:46 UTC
(In reply to Phil Krylov from comment #3)

I have debugged this, and in fact, the code of your patch is actually correct. It only happened to use (indirectly) function SwDoc::ResetAttrs  affected by a long-standing bug (since 2011, version 3.5) - see tdf#127706.
Comment 5 Phil Krylov 2019-09-23 19:20:22 UTC
Oh how cool is that! For a long time I hoped that there is some primordial bug at the foundation of all Undo problems. Could it be that one? ;-)
Comment 6 Timur 2020-03-24 09:45:25 UTC
I don't know what this wasn't marked duplicate. If any reason, please explain and set New.

*** This bug has been marked as a duplicate of bug 127706 ***