Bug 125039 - Regression from bug 123259 when anchoring a graphic as character
Summary: Regression from bug 123259 when anchoring a graphic as character
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:6.3.0 target:6.2.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-04-30 09:40 UTC by Roland Baudin
Modified: 2019-05-08 07:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document to reproduce the regression (10.04 KB, application/vnd.oasis.opendocument.text)
2019-04-30 09:40 UTC, Roland Baudin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Baudin 2019-04-30 09:40:47 UTC
Created attachment 151088 [details]
Test document to reproduce the regression

Resolution of bug #123259 (LO release 6.2.3.1 and above) has introduced a regression that occurs when anchoring a graphic object *as character* in Writer.

Steps to reproduce:

1. Download the test document and open it in Writer 6.2.3.1 (or above)

2. Right click on the graphic and select menu item "Anchor / As Character"

3. As expected, the graphic is now anchored as character, but the graphic is *deselected*.

4. Press Escape. The text cursor is shown *after* the graphic.

This is an incorrect behaviour.

First, anchoring a graphic should not deselect it. Note that doing the test with anchoring to page, to paragraph and to character do not deselect the graphic.

Second, after Escape is pressed, the text cursor should be located before the graphic to be consistent with the behaviour of anchoring to page, to paragraph and to character.

This regression can lead to serious issues when developing macros for Writer. Indeed it breaks the TexMaths extension (http://roland65.free.fr/texmaths) that I develop. TexMaths worked fine in LO 6.2.2.2 and before.

System: Ubuntu Linux 18.04.2 64 bits
Libreoffice 6.2.3.2 downloaded from www.libreoffice.org

I did all the tests with a *fresh profile*.

I traced the regression back to bug #123259 by compiling and bisecting and I found the problematic commit is 214e6ed5286566e689a4ef13a9115e2ad38fff57.
Comment 1 raal 2019-04-30 17:20:58 UTC
(In reply to Roland Baudin from comment #0)
> 
> I traced the regression back to bug #123259 by compiling and bisecting and I
> found the problematic commit is 214e6ed5286566e689a4ef13a9115e2ad38fff57.

This seems to have begun at the below commit.
Adding Cc: to Michael Stahl ; Could you possibly take a look at this one?
Thanks

author	Michael Stahl <Michael.Stahl@cib.de>	2019-03-07 15:53:36 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-03-10 01:21:23 +0100
commit	214e6ed5286566e689a4ef13a9115e2ad38fff57 (patch)
tree	289fbf18c01ee0c9cbbc21a838f564198257d01b
parent	f8c00f23660e6816dd0a15708702c986c0cb4062 (diff)
tdf#123259 sw_redlinehide: fix reanchoring of drawing objects


Confirm with Version: 6.3.0.0.alpha0+
Build ID: 1ae5ca077119982ae83833871326c86d9930ae11
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11;
Comment 2 Commit Notification 2019-05-03 08:23:48 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/40df8019ff3a8b1fd87b3e20e154fc487ab4a7db%5E%21

tdf#125039 sw_redlinehide: keep shape selected when changing anchor type

It will be available in 6.3.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 3 Michael Stahl (CIB) 2019-05-03 08:28:09 UTC
fixed on master
Comment 4 Commit Notification 2019-05-03 13:28:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/45362d31ce0504ebcb7bbcf846d9dcc57d7210bd%5E%21

tdf#125039 sw_redlinehide: keep shape selected when changing anchor type

It will be available in 6.2.4.

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 Roland Baudin 2019-05-03 13:35:25 UTC
(In reply to Michael Stahl (CIB) from comment #3)
> fixed on master

I tested your patch in master and this fixed the bug for me. The TexMaths extension also works again.
Comment 6 Michael Stahl (CIB) 2019-05-03 13:36:41 UTC
great; setting to verified then
Comment 7 Roland Baudin 2019-05-08 07:53:23 UTC
I checked today the 6.2.4.1 pre-release and it's OK, the bug is gone and the TexMaths extension works again.

Thanks!