Bug 72632 - FORMATTING: Math baseline alignment option does not work anymore
Summary: FORMATTING: Math baseline alignment option does not work anymore
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta2
Hardware: Other All
: high major
Assignee: Arnaud Versini
URL:
Whiteboard: BSA target:4.3.0 target:4.2.0.2
Keywords: bibisected, regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2013-12-12 07:31 UTC by Ryan Duan
Modified: 2017-08-02 09:37 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
Wrong behavior in version 4.2.0 beta2 (7.84 KB, image/png)
2013-12-12 07:31 UTC, Ryan Duan
Details
Correct behavior in LO 4.1.2 (8.25 KB, image/png)
2013-12-12 07:39 UTC, Ryan Duan
Details
reproduce step 1 (4.66 KB, image/png)
2013-12-12 07:40 UTC, Ryan Duan
Details
reproduce step 2 (9.04 KB, image/png)
2013-12-12 07:41 UTC, Ryan Duan
Details
reproduce step 3 (7.78 KB, image/png)
2013-12-12 07:41 UTC, Ryan Duan
Details
reproduce step 4 (4.97 KB, image/png)
2013-12-12 07:42 UTC, Ryan Duan
Details
reproduce step 5 (6.69 KB, image/png)
2013-12-12 07:42 UTC, Ryan Duan
Details
Default anchor and position configuration when this bug occurs. (50.60 KB, image/png)
2013-12-14 03:17 UTC, Ryan Duan
Details
change to "To character" and its default config when this bug occurs (52.96 KB, image/png)
2013-12-14 03:19 UTC, Ryan Duan
Details
after changing to "To character" with its default config (5.16 KB, image/png)
2013-12-14 03:20 UTC, Ryan Duan
Details
Object windows on Windows 7 for formula (146.94 KB, image/png)
2013-12-15 19:40 UTC, Jacques Guilleron
Details
With LO 4.1.4 (19.99 KB, image/png)
2013-12-27 23:25 UTC, Dorange-Pattoret Didier
Details
With LO 4.1.4 (18.85 KB, image/png)
2013-12-27 23:28 UTC, Dorange-Pattoret Didier
Details
With LO 4.1.4 (18.82 KB, image/png)
2013-12-27 23:29 UTC, Dorange-Pattoret Didier
Details
With LO 4.2.0.1 (44.53 KB, image/png)
2013-12-27 23:29 UTC, Dorange-Pattoret Didier
Details
With LO 4.2.0.1 (51.03 KB, image/png)
2013-12-27 23:30 UTC, Dorange-Pattoret Didier
Details
LO 4.2.0.1 (22.76 KB, image/png)
2013-12-27 23:30 UTC, Dorange-Pattoret Didier
Details
File written with LO 4.1.4.2 (63.11 KB, image/png)
2013-12-31 13:30 UTC, Dorange-Pattoret Didier
Details
File opened with LO 4.2.0.1 (RC1) with "base math aligned" checked (59.81 KB, image/png)
2013-12-31 13:31 UTC, Dorange-Pattoret Didier
Details
bibisect log (2.74 KB, text/plain)
2014-01-01 19:23 UTC, Jean-Baptiste Faure
Details
bibisect log made by ddorange (149.86 KB, image/png)
2014-01-02 08:02 UTC, Dorange-Pattoret Didier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Duan 2013-12-12 07:31:04 UTC
Created attachment 90641 [details]
Wrong behavior in version 4.2.0 beta2

Problem description: 
The formula inserted in a line sinks.  Its position goes below the base of the line, which is incorrect.

Steps to reproduce:
--------
TEST 1 (insert formula after other text)
--------
1. Create a new file with Writer.
2. Type in a TAB, then insert a formula, you will notice the position of the formula incorrect.

--------
TEST 2 (insert formula first, then insert text before it)
--------
1. Create a new file with Writer.
2. Insert a formula.  ==> Its position is good now.
3. Insert a TAB before the formula.  ==> The formula sinks.

--------
TEST 3
--------
please refer to attachment 3 to 7.

Current behavior:
Please refer to the attachment 1.

Expected behavior:
Please refer to the attachment 2.
Operating System: All
Version: 4.2.0.0.beta2
Last worked in: 4.1.3.2 release
Comment 1 Ryan Duan 2013-12-12 07:39:54 UTC
Created attachment 90642 [details]
Correct behavior in LO 4.1.2
Comment 2 Ryan Duan 2013-12-12 07:40:30 UTC
Created attachment 90643 [details]
reproduce step 1
Comment 3 Ryan Duan 2013-12-12 07:41:16 UTC
Created attachment 90644 [details]
reproduce step 2
Comment 4 Ryan Duan 2013-12-12 07:41:47 UTC
Created attachment 90645 [details]
reproduce step 3
Comment 5 Ryan Duan 2013-12-12 07:42:16 UTC
Created attachment 90646 [details]
reproduce step 4
Comment 6 Ryan Duan 2013-12-12 07:42:45 UTC
Created attachment 90647 [details]
reproduce step 5
Comment 7 Ryan Duan 2013-12-12 07:46:45 UTC
Sorry.  Please ignore the errors about the attachment numbers in the bug description.  I am new to this bug tracking system.

Just check the attachments one by one, please.
Comment 8 Jacques Guilleron 2013-12-12 23:42:32 UTC
Hello Ryan,

In your document, mouse over the formula, right clic on it.
In the contextual menu, choose 'Object' and in 
Type > Position > Vertical, I think you have:
'from bottom' and, at the right side, 'Baseline'.
If this is the case:
Change 'from bottom' by 'Center',
       'Baseline' by 'Caracter'
Clic on Ok.
Does this work for you?

Kind regards,

Jacques
Comment 9 Ryan Duan 2013-12-14 03:17:29 UTC
Created attachment 90757 [details]
Default anchor and position configuration when this bug occurs.
Comment 10 Ryan Duan 2013-12-14 03:19:31 UTC
Created attachment 90758 [details]
change to "To character" and its default config when this bug occurs
Comment 11 Ryan Duan 2013-12-14 03:20:38 UTC
Created attachment 90759 [details]
after changing to "To character" with its default config
Comment 12 Ryan Duan 2013-12-14 03:27:36 UTC
(In reply to comment #8)
> Hello Ryan,
> 
> In your document, mouse over the formula, right clic on it.
> In the contextual menu, choose 'Object' and in 
> Type > Position > Vertical, I think you have:
> 'from bottom' and, at the right side, 'Baseline'.
> If this is the case:
> Change 'from bottom' by 'Center',
>        'Baseline' by 'Caracter'
> Clic on Ok.
> Does this work for you?
> 
> Kind regards,
> 
> Jacques

Hi Jacques,

Please refer to the three new attachments.

As you suggested, I checked 'Object > Type' tab, its default anchor was "As character", and 'Position' was not editable.

Then I changed anchor to "To character", 'Position' become editable, 'Vertical' was 'from bottom' '0.00"' by 'Character'.  After I clicked 'OK', the result was not I wanted.

Kind regards,

Ryan
Comment 13 Jacques Guilleron 2013-12-15 10:43:18 UTC
Hi Ryan,

...'Position' was not editable.
On Windows 7, that's it.
I tried to find another report with such a behavior but didn't. So the best I think is to reinstall this version with a clean user profile and see if that solve the problem.
See: https://wiki.documentfoundation.org/Faq/General
Please precise also your Linux distribution and version number. This can help too.

Kind regards,

Jacques
Comment 14 Ryan Duan 2013-12-15 13:41:28 UTC
(In reply to comment #13)
> Hi Ryan,
> 
> ...'Position' was not editable.
> On Windows 7, that's it.
> I tried to find another report with such a behavior but didn't. So the best
> I think is to reinstall this version with a clean user profile and see if
> that solve the problem.
> See: https://wiki.documentfoundation.org/Faq/General
> Please precise also your Linux distribution and version number. This can
> help too.
> 
> Kind regards,
> 
> Jacques

Hi Jacques,

Can't you reproduce this bug?

On my Windows XP machine, 4.2.0 has this bug, too.  It behaves excactly the same as that on my Linux.

On my Linux machine, other versions of LibreOffice behave well, only 4.2.0 beta2 has this bug.

I am sure my tests are performed with fresh installation, both on Linux and Windows.

On Linux, 4.1.2 was installed from Debian package source "wheezy backports", 4.0.6, 4.1.3, 4.1.4, 4.2.0 beta2 are installed according to this page:
https://wiki.documentfoundation.org/Installing_in_parallel

Following are my 4.2.0 test environment (Linux):

ryan@rd:~$ LibreOfficeDev_4.2.0.0.beta2_Linux_x86_deb/DEBS/install/opt/libreofficedev4.2/program/soffice --version
LibreOfficeDev 4.2.0.0.beta2 1a27be92e320f97c20d581a69ef1c8b99ea9885d

ryan@rd:~$ lsb_release --all
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.2 (wheezy)
Release:	7.2
Codename:	wheezy

ryan@rd:~$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 15
Stepping:              13
CPU MHz:               1861.848
BogoMIPS:              3723.94
L1d cache:             32K
L1i cache:             32K
L2 cache:              512K

ryan@rd:~$ locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

Best regards,
Ryan
Comment 15 Ryan Duan 2013-12-15 13:45:43 UTC
(In reply to comment #13)
> Hi Ryan,
> 
> ...'Position' was not editable.
> On Windows 7, that's it.
> I tried to find another report with such a behavior but didn't. So the best
> I think is to reinstall this version with a clean user profile and see if
> that solve the problem.
> See: https://wiki.documentfoundation.org/Faq/General
> Please precise also your Linux distribution and version number. This can
> help too.
> 
> Kind regards,
> 
> Jacques

I am sure that I cleaned the user profiles before the tests.
Comment 16 Ryan Duan 2013-12-15 15:13:19 UTC
(In reply to comment #13)
> Hi Ryan,
> 
> ...'Position' was not editable.
> On Windows 7, that's it.
> 
> Jacques

Hi Jacques,
It is a correct behavior that formula's anchor 'As character' -> 'Position' is not editable.  I tested on other versions of LO and OpenOffice.
Comment 17 Jacques Guilleron 2013-12-15 19:40:49 UTC
Created attachment 90807 [details]
Object windows on Windows 7 for formula
Comment 18 Jacques Guilleron 2013-12-15 19:51:53 UTC
Hi Ryan,

Yes. I don't reproduce with LO 4.2.0.0.beta2 & Windows 7 Home Premium. I join an image of my default settings to show you what I have. Those settings are the same on LO 4.1.3.2 and LO 3.6.6.2 portable.
You have provided required informations. I set Status to Unconfirmed. Others users will can test and answer to you.

Thank you,

Jacques
Comment 19 Jacques Guilleron 2013-12-16 17:35:19 UTC
Hello Ryan,

I have downloaded LO 4.3.0.0.alpha0+
Build ID: b1ac01de06262bda39be7f970fbceeda9b267fe4
TinderBox: Win-x86@42, Branch:master, Time: 2013-12-15_08:41:01

Always no problem.
I asked on French lists for verification. Two users answer they found your issue.
Are you using a 64 bits version ?

Jacques
Comment 20 Jacques Guilleron 2013-12-16 19:41:49 UTC
Nothing to see with my previous question.
I renamed my profile and this time, I see the problem.

I set status to NEW

Kind regards,

Jacques
Comment 21 Laurent Balland 2013-12-23 18:12:09 UTC
Confirmed with LibO 4.2.0.1
Comment 22 Laurent Balland 2013-12-23 22:37:03 UTC
Reproduce with LibO 4.2.0.0.beta1
Comment 23 Laurent Balland 2013-12-23 22:45:19 UTC
Confirmed with master Version: 4.3.0.0.alpha0+
Build ID: 65e6d651ceef55f569521a4f4e609f7e5e88847b
TinderBox: Win-x86@47-TDF, Branch:master, Time: 2013-12-18_23:26:17

Simpler procedure:
1. New Text document
2. View > Nonprinting Characters (easier to see the bug)
3. Insert > Object > Formula
=> The nonprinting character indicating the end of the paragraph appears over the top limit of the page area.
Comment 24 pierre-yves samyn 2013-12-24 09:08:34 UTC
Hello

(In reply to comment #23)
> Simpler procedure:
> 1. New Text document
> 2. View > Nonprinting Characters (easier to see the bug)
> 3. Insert > Object > Formula
> => The nonprinting character indicating the end of the paragraph appears
> over the top limit of the page area.

I reproduce on windows 7/64 & Version: 4.2.0.1
Build ID: 7bf567613a536ded11709b952950c9e8f7181a4a

But *only* if Tools> Options> Writer> Formatting Aids> Layout assistance> "Math baseline alignement" is checked.

I do not reproduce if unchecked.

Same on windows 7/64 & Version: 4.3.0.0.alpha0+
Build ID: f279acd3678d014d9d5dafe41971e0da4dec7b6c
TinderBox: Win-x86@47-TDF, Branch:master, Time: 2013-12-13_23:25:16

Regards
Pierre-Yves
Comment 25 Laurent Balland 2013-12-24 23:11:12 UTC
Confirmed with Version: 4.2.0.0.alpha1+
Build ID: d366c9b20ec86f3fe521812a0c22def3bfd1f05e
TinderBox: Win-x86@47-TDF, Branch:master, Time: 2013-11-14_07:51:04
Comment 26 Laurent Balland 2013-12-26 21:33:35 UTC
NOT reproduced with Version: 4.2.0.0.alpha0+
Build ID: 125769a4a15cf6f4b9ef9d0e757ac55bd9e26509
TinderBox: Win-x86@39, Branch:master, Time: 2013-09-18_08:18:05

Reproduce with Version: 4.2.0.0.alpha0+
Build ID: 4c809cd1c5141b3a0a531cc21d0fd5e03401dc19
TinderBox: Win-x86@39, Branch:master, Time: 2013-09-27_08:14:18

So the bug was committed between 18th and 27th of September
Comment 27 Dorange-Pattoret Didier 2013-12-27 23:25:47 UTC
Created attachment 91236 [details]
With LO 4.1.4
Comment 28 Dorange-Pattoret Didier 2013-12-27 23:27:37 UTC
(In reply to comment #24)

> 
> I reproduce on windows 7/64 & Version: 4.2.0.1
> Build ID: 7bf567613a536ded11709b952950c9e8f7181a4a
> 
> But *only* if Tools> Options> Writer> Formatting Aids> Layout assistance>
> "Math baseline alignement" is checked.
> 
> I do not reproduce if unchecked.
> 

I agree with Pierre Yves.
I reproduce on Windows 7/64 and OpenMandriva & Version : 4.2.0.1  
I do not reproduce the bug when "Math baseline alignement" is unchecked.
But in that case, formula are not correctly aligned.

If I edit the formula : Format -> Spacing -> Category -> Borders, I get something like 252,52 mm for each (left, right, top, bottom) instead of 0 or 1 mm.
Comment 29 Dorange-Pattoret Didier 2013-12-27 23:28:57 UTC
Created attachment 91237 [details]
With LO 4.1.4
Comment 30 Dorange-Pattoret Didier 2013-12-27 23:29:23 UTC
Created attachment 91238 [details]
With LO 4.1.4
Comment 31 Dorange-Pattoret Didier 2013-12-27 23:29:53 UTC
Created attachment 91239 [details]
With LO 4.2.0.1
Comment 32 Dorange-Pattoret Didier 2013-12-27 23:30:22 UTC
Created attachment 91240 [details]
With LO 4.2.0.1
Comment 33 Dorange-Pattoret Didier 2013-12-27 23:30:46 UTC
Created attachment 91241 [details]
LO 4.2.0.1
Comment 34 Dorange-Pattoret Didier 2013-12-27 23:39:39 UTC
Hello,

It seems that the wrong variable is "VertOrientPosition" always 0 with LO 4.2.0.1 and the nice value with LO 4.1.4.
Comment 35 Dorange-Pattoret Didier 2013-12-31 13:30:26 UTC
Created attachment 91364 [details]
File written with LO 4.1.4.2
Comment 36 Dorange-Pattoret Didier 2013-12-31 13:31:41 UTC
Created attachment 91365 [details]
File opened with LO 4.2.0.1 (RC1) with "base math aligned" checked
Comment 37 Dorange-Pattoret Didier 2013-12-31 13:36:31 UTC
Hello,
I opened a file (written with LO 4.1.4.2) with LO 4.2.0.1 and "Math baseline alignement" checked. 

All formulae are in a wrong position with VertOrientPosition = 0.

To my mind, it's not possible to release LO 4.2 with such a bug.

I hope somebody could find where is the problem and so fix the bug.

Happy new year to everybody who read this comment.
Comment 38 Jacques Guilleron 2013-12-31 14:41:32 UTC
A link to the core code repository on 27th of September:
http://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-4-2&ofs=4700

Kind regards,

Jacques
Comment 39 Jean-Baptiste Faure 2013-12-31 18:22:47 UTC
Made the summary more precise.
Comment #26 is a good starting point to bibisect the regression. Set whiteboard field accordingly.

Best regards. JBF
Comment 40 Jean-Baptiste Faure 2014-01-01 19:23:26 UTC
Created attachment 91398 [details]
bibisect log

Attached my bibisect log

Best regards. JBF
Comment 41 Dorange-Pattoret Didier 2014-01-02 08:02:26 UTC
Created attachment 91404 [details]
bibisect log made by ddorange
Comment 43 Arnaud Versini 2014-01-04 10:52:26 UTC
Andres, could you have a look please ?
Comment 44 Arnaud Versini 2014-01-04 11:03:38 UTC
Andres, I'm on it, break missing but need to check
Comment 45 Commit Notification 2014-01-04 11:56:08 UTC
Arnaud Versini committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bdc192739892114e8b159a8af185ff28b873e748

Resolve fdo#72632 by adding missing break



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 46 Commit Notification 2014-01-04 12:47:26 UTC
Arnaud Versini committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=710fa2954a67d4a5277cb16a3d9b513ca679cbd5&h=libreoffice-4-2

Resolve fdo#72632 by adding missing break


It will be available in LibreOffice 4.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 47 Jean-Baptiste Faure 2014-01-04 14:11:09 UTC
Verified on version 4.2.0.1+. Works as expected.

Thank you very much Arnaud for the fix.

Best regards. JBF
Comment 48 Ryan Duan 2014-01-05 14:55:15 UTC
Thank you all.  Best Regards!
Ryan
Comment 49 Andrés Gómez García 2014-01-08 13:37:19 UTC
(In reply to comment #44)
> Andres, I'm on it, break missing but need to check

Sorry, I was on holidays and couldn't check.

Thank you all for fixing this!
Comment 50 Robinson Tryon (qubit) 2015-12-17 07:34:50 UTC Comment hidden (obsolete)