Bug 135560 - Undo changing anchoring produces wrong results
Summary: Undo changing anchoring produces wrong results
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-08-08 14:41 UTC by Telesto
Modified: 2021-12-23 11:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (680.16 KB, application/vnd.oasis.opendocument.text)
2020-08-08 14:41 UTC, Telesto
Details
Bibisect log (2.89 KB, text/plain)
2020-08-09 14:48 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-08 14:41:37 UTC
Description:
Undo changing anchoring produces wrong results

Steps to Reproduce:
1. Open the attached file
2. Select frame 1 (not the image)
3. Change the anchor to 'as character' or 'to character'
4. Press Undo

Actual Results:
Not the same layout

Expected Results:
The layout as if nothing happened


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
7.1 

and in
6.5

not in
Version: 6.4.0.0.beta1+ (x64)
Build ID: 20be5cd0bdc57d812bf34a2debfe48caa51de881
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 1 Telesto 2020-08-08 14:41:53 UTC
Created attachment 164051 [details]
Example file
Comment 2 Telesto 2020-08-09 14:48:59 UTC
Created attachment 164070 [details]
Bibisect log

Bisected to
author	Vasily Melenchuk <vasily.melenchuk@cib.de>	2019-11-21 20:12:52 +0300
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-11-27 22:43:41 +0100
commit c2d689790c332ffd2f0d73de6aae53f26f0fbe53 (patch)
tree ca24314df7fae483a5b0914a20699fe6609a278b
parent e0b70b1491143adb47990b746fe0b2e52b1ee7cb (diff)
tdf#128782: sw: assign name to draw object
SwXDrawPage is inserting frame styles without name. This is confusing
undo/redo code which is operating styles by names.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c2d689790c332ffd2f0d73de6aae53f26f0fbe53
Comment 3 Xisco Faulí 2020-08-10 16:40:57 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: 6ad2f463784a24c566477cdd60ae729651bb8564
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Adding Cc: to Vasily Melenchuk
Comment 4 Xisco Faulí 2020-08-10 16:43:45 UTC
(In reply to Telesto from comment #2)
> Created attachment 164070 [details]
> Bibisect log
> 
> Bisected to
> author	Vasily Melenchuk <vasily.melenchuk@cib.de>	2019-11-21 20:12:52 +0300
> committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-11-27 22:43:41
> +0100
> commit c2d689790c332ffd2f0d73de6aae53f26f0fbe53 (patch)
> tree ca24314df7fae483a5b0914a20699fe6609a278b
> parent e0b70b1491143adb47990b746fe0b2e52b1ee7cb (diff)
> tdf#128782: sw: assign name to draw object
> SwXDrawPage is inserting frame styles without name. This is confusing
> undo/redo code which is operating styles by names.
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=c2d689790c332ffd2f0d73de6aae53f26f0fbe53

I do confirm the regression was introduced by the commit mentioned above
Comment 5 Xisco Faulí 2020-09-29 15:42:21 UTC
Still reproducible in

Version: 7.1.0.0.alpha0+
Build ID: cd85546a2fbdade42f80fd3b6bd650791db9f32d
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Vasily Melenchuk (CIB) 2021-12-23 08:44:11 UTC
Can't repro anymore with master:

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c38dbafe0f332c6c263d1412eb41572222120c5c
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (C); UI: en-US
Calc: CL
Comment 7 Telesto 2021-12-23 09:25:00 UTC
(In reply to Vasily Melenchuk (CIB) from comment #6)
> Can't repro anymore with master:

Same here
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6dbe55d34ad65627ef37f10dfdb548a717bb8c78
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 8 Xisco Faulí 2021-12-23 11:00:15 UTC
Issue fixed by

https://cgit.freedesktop.org/libreoffice/core/commit/?id=1feb59c3dd9e5f714ce894f8de31bbb6869c9f3b

author	Noel Grandin <noelgrandin@gmail.com>	2021-06-22 22:39:27 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2021-06-23 09:55:59 +0200
commit 1feb59c3dd9e5f714ce894f8de31bbb6869c9f3b (patch)
tree ce8f05e8457a1b60ed318b4147054ed030e0bf56
parent bc4cea4943c9189b92f51aacf097549023398b2e (diff)
optimised FindFormatByName for SwFrameFormats