Bug 130362 - Insert in-line OLE formula with math, broken anchoring (work around comment 4)
Summary: Insert in-line OLE formula with math, broken anchoring (work around comment 4)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.0.0 target:6.4.2 target:6.4.1
Keywords: bibisected, bisected, regression
: 129126 129761 130416 130468 (view as bug list)
Depends on:
Blocks: Anchor-and-Text-Wrap OLE-Objects
  Show dependency treegraph
 
Reported: 2020-02-02 11:11 UTC by Paulo
Modified: 2020-07-07 11:29 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo 2020-02-02 11:11:46 UTC
Description:
When in Writer I try to insert a math formula in the middle of the text, it goes to the beginning of the line and cannot be placed in the middle of the text. In 6.3.4.2 it worked fine but now in 6.4.0 it doesn't work. I had to revert to 6.3.4.2 to be able to work with math.

Actual Results:
Insert a math formula in the middle of the text

Expected Results:
The formula is at the beginning of the line before the text


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 ian 2020-02-02 15:03:48 UTC
Thank you for reporting the bug. I can confirm that the bug is present in a recent master build in Windows.

Using:

Version: 7.0.0.0.alpha0+ (x64)
Build ID: e8ac78d3afdeb0302eaea34a50f1ca912d5fe897
CPU threads: 2; OS: Windows 10.0 Build 17763; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL

I have set the status to "NEW". In addition, I have noted that this may be a possible regression from 6.3.4.2, as Paulo has noted.
Comment 2 V Stuart Foote 2020-02-02 16:03:38 UTC
IIUC a frame holding OLE objects is not distinguished from the frame holding images. So changes [1] [2] to anchor images "to character" rather than "as character" unintended consequence also affects the OLE sm formula objects.

Also, the formula OLE is positioned to the start of the containing paragraph rather than near its anchor character.

A simple workaround for users to change anchor for each in-line formula to "as character", and reposition the OLE object, to restore prior behavior.

But, can we isolate handling of OLE from image frames?

=-refs-=
[1] https://gerrit.libreoffice.org/c/core/+/75091
[2] https://gerrit.libreoffice.org/c/core/+/84513
Comment 3 Aron Budea 2020-02-02 16:56:00 UTC
Confirmed the regression started with the following commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=a7528cd6f17ea5c5b29e7d607e54c62de0d9e7db
author		Miklos Vajna <vmiklos@collabora.com>	2019-11-18 13:50:32 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	2019-11-18 17:37:13 +0100

sw: insert image: set anchor to at-char by default
Comment 4 V Stuart Foote 2020-02-02 17:15:44 UTC
(In reply to V Stuart Foote from comment #2)
> 
> A simple workaround for users to change anchor for each in-line formula to
> "as character", and reposition the OLE object, to restore prior behavior.
> 

Simpler work flow is to change the anchor to 'as character'. Then cut the OLE formula object. Then position edit cursor to the location in text, and paste (default will be the OLE object, so no need for paste special).
Comment 5 Regina Henschel 2020-02-02 22:07:05 UTC
Duplicate to bug 129761. I'm not sure which one to keep.
Comment 6 V Stuart Foote 2020-02-02 23:24:07 UTC
*** Bug 129761 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2020-02-04 15:09:34 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#130362 sw: fix anchoring of inline math objects

It will be available in 7.0.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 8 Paulo 2020-02-04 19:31:40 UTC Comment hidden (no-value)
Comment 9 V Stuart Foote 2020-02-04 19:53:02 UTC Comment hidden (off-topic)
Comment 10 Paulo 2020-02-04 20:38:43 UTC Comment hidden (off-topic)
Comment 11 V Stuart Foote 2020-02-04 21:13:08 UTC Comment hidden (off-topic)
Comment 12 V Stuart Foote 2020-02-05 19:57:48 UTC
*** Bug 130468 has been marked as a duplicate of this bug. ***
Comment 13 Maxim Monastirsky 2020-02-07 09:59:21 UTC
*** Bug 130416 has been marked as a duplicate of this bug. ***
Comment 14 Xisco Faulí 2020-02-07 17:00:59 UTC
Verified in

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

@Miklos, thanks for fixing this issue!!
Comment 15 Commit Notification 2020-02-07 17:04:10 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/282cf1507d51573e5e9a4611b1e775b433168ca7

tdf#130362 sw: fix anchoring of inline math objects

It will be available in 6.4.2.

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 16 Commit Notification 2020-02-20 19:06:34 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-4-1":

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

tdf#130362 sw: fix anchoring of inline math objects

It will be available in 6.4.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 17 Aron Budea 2020-04-11 04:52:54 UTC
*** Bug 129126 has been marked as a duplicate of this bug. ***