Bug 97154 - Partially wrong size for formulae in table cells
Summary: Partially wrong size for formulae in table cells
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-15 15:15 UTC by Uwe Dippel
Modified: 2017-06-28 13:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Document showing the different sizes, despite the same formula configuration. It also includes a screenshot in case this bug is not visible on the side of the reader. (86.41 KB, application/vnd.oasis.opendocument.text)
2016-01-15 15:15 UTC, Uwe Dippel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Dippel 2016-01-15 15:15:16 UTC
Created attachment 121957 [details]
Document showing the different sizes, despite the same formula configuration. It also includes a screenshot in case this bug is not visible on the side of the reader.

I have a long document .odt with many tables. When I add a formula in a cell, it looks okay, and all look identical, sizewise.

When I reopen the document, some - and always the same - cells display a different size. The control codes in the cells are all identical. 
When I click on the too small formula, they increase to the desired size. At reopening, the sizes are too small again. 

I include a demo document showing this behaviour. This demo document asks - after the resize-by-click action if I wanted to save the modifications. Then the document is okay at reopening.
However, this does *not* happen in my original document where I have to resize each and every time of opening it; including after a resize and 'Save'. The latter is just cumbersome: in order to get the size correct.
This includes printing, which makes it almost impossible to use LibreOffice in our case, as long as we no better workaround than clicking all formulae.
Comment 1 Jean-Baptiste Faure 2016-01-16 22:45:39 UTC
Not reproducible for me with LO 5.1.1.0.0+ built at home under Ubuntu 15.10 x86-64.
Your formulas are too high too fit in the cells, they are overlapping the cell border (they have an area color white). You should enlarge the cells and add a top and bottom space to text for each cell.
Any reason to add an area color white to your formulas?
You should reset the position of the formula in each cell: in the formatting dialog of the formula object, tab Type set the anchor to "To character" and back to "As character".

Does that make something better?

Best regards. JBF
Comment 2 Uwe Dippel 2016-01-20 13:05:31 UTC
Okay, thanks for the hints. 
My question: 'not reproducible for me' means what? When you open the said document, all formulas are of the same size?
Or do you mean, that things like this don't happen to you?

I am using the 5.0.4.2. downloaded pre-built binaries in .deb version.

I did not explicitly define any area colour to the formula, but started all from scratch, Insert->Objects->Formula. I had no reason, and if the area colour 'white' make them show up in the wrong size, I will gladly remove that colour.

I have also anchored them to "To character" and back to "As character" but the sizes remain distorted. 

The cell heights are set to 'fit the content', so I wonder why this should not work.
I checked the 'Styles and Formatting' and found all formulas to be formatted as the generic OLE.

My humble request would be for some more people to try to open the file submitted, and check if the sizes are different, as described and inserted as screen shot into that file, too.
Comment 3 Jean-Baptiste Faure 2016-01-21 05:28:39 UTC
Not reproducible for me means:
"When I reopen the document, some - and always the same - cells display a different size." --> Idem for me
"When I click on the too small formula, they increase to the desired size." --> Idem for me
"At reopening, the sizes are too small again." Not for me. Of course I assume you saved the file before you closed and reopened it.

Best regards. JBF
Comment 4 Uwe Dippel 2016-01-21 10:03:36 UTC
Thanks so much! - So we can agree that we observe exactly the same behaviour! 
I had - probably badly - written that also here, after a magnification, the sample file stays okay once saved.
But it doesn't do the same on my original document with close to 100 formulas, out of which I copied and pasted only one table. The formulas in this same table in the original document do not reappear correct after reopening when resized.

I think the bug comes in earlier:
1. The codes within the formulas are identical (size, etc.)
2. The table sizes are set to 'fit the content'
3. The formulas are anchored suitably.

Why would they appear at different sizes when someone else (e.g. JBF) opens this same document? 
I am confident that the problem is gone, once we can find out, why - also in the case of comment 3 - same formatting codes per different formula result in different sizes.

In case of further details, I am more than willing to help out!
Comment 5 Uwe Dippel 2016-01-22 13:37:07 UTC
One step further, one that you can't reproduce since in that short file any 'Save' will result in a clean display. My long file behaves still different, as described. 

But I have found out what actually makes the display sometimes larger and sometimes smaller: It is NOT the format (background colour ...).
As soon as I use a parenthesis '(' in a formula, it will always be displayed at (re-)opening in the large version. 

I hope someone with an insight into the code can point out why this is the case.
Comment 6 Buovjaga 2016-01-28 15:25:18 UTC
Uwe: can you test with 5.1?
http://www.libreoffice.org/download/pre-releases/
https://wiki.documentfoundation.org/Installing_in_parallel/Linux

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists with 5.1. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 7 Uwe Dippel 2016-01-28 16:21:44 UTC
Checked with 5.1.0.2:

A) When opening the demo file attached to this report, the sizes are still different.

[We all know that the matter is solved for this excerpt after a 'Save']

B) When I open the original and complete file, of course, the sizes are different, too.
When I enlarge the sizes by just clicking on the formula box of one or more, and 'Save' this file thereafter, and reopen that file, the sizes are still different.

In a nutshell: no change -> UNCONFIRMED
Comment 8 Cor Nouws 2016-09-25 14:32:14 UTC
Hi Uwe,

I tested your file in a recent daily.
When I activate the three formulas in the first row, the (font) size increases.
Then when I save, close and reopen, the size is still large, as corrected.\

In Version: 5.3.0.0.alpha0+
Build ID: 88c7f08c49642ed14e62e96f63cae00ef608cbbb
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-09-24_12:33:22
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Comment 9 Aron Budea 2016-12-18 06:43:12 UTC
Uwe, can you check with a current version? (5.2.3.3 or 5.3beta2)
Comment 10 QA Administrators 2017-06-28 12:36:23 UTC Comment hidden (obsolete)
Comment 11 Uwe Dippel 2017-06-28 12:59:49 UTC
I can also confirm, that in 5.3.3.2 this behaviour has been corrected.
That is, a line, once corrected in size by clicking, remains at that size after 'Save' and 'Open'.