Bug 89999 - Subscript and superscript have problems retaining FORMATTING
Summary: Subscript and superscript have problems retaining FORMATTING
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.7.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Katarina Behrens (Inactive)
URL:
Whiteboard: target:5.2.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2015-03-14 10:01 UTC by bradley.wilkinson
Modified: 2016-10-25 19:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple testcase (8.71 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-12-22 12:58 UTC, Katarina Behrens (Inactive)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bradley.wilkinson 2015-03-14 10:01:11 UTC
In LibreOffice Calc, when using subscript and superscript the formatting (raise/lower % and relative font %) is not being retained after being set.
When you have a cell with formatted characters in it, and you go back into the cell to add characters, it will set all of them back down to the normal position.
When I had a file with some subscripts set at 33%, 58% and some others set at 50%, 90%, after saving the document, closing Calc, reopening Calc and the file all the subscripts have been set to the same 33%, 58%.
Comment 1 raal 2015-03-14 20:13:49 UTC
I can confirm with Version: 4.4.3.0.0+
Build ID: 8106e522c4ea2ae4441ec571579a38eeb6d9af04
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-4, Time: 2015-03-13_12:39:32

Can not reproduce with LO LibreOffice 3.5.0 
Build ID: d6cde02  -> regression
Comment 2 Matthew Francis 2015-03-17 03:29:43 UTC
Bibisect results from 43all:
 1711ac6e2188f8fed8e027a2241fe878c898a604 is the first bad commit
commit 1711ac6e2188f8fed8e027a2241fe878c898a604
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Oct 18 02:26:52 2013 +0000

    source-hash-8a569f1c4decc7440e9dae1af35d7fa59c3b0121


That range is pretty sparse of relevant looking commits, and my money is on this one:

commit 21661ebfbec9ea162582bbc7ab46607eb9095f1a
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Wed Aug 21 19:16:23 2013 -0400

    fdo#60740: Populate auto styles from edit cells without using UNO API.
    
    Not using UNO API here alone made this code fly.
    
    Change-Id: Ib3eff168bbe49e49fb413909b7a14057f808cdf9
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:12:07 UTC Comment hidden (obsolete)
Comment 4 Katarina Behrens (Inactive) 2015-12-14 17:04:52 UTC
Anyone affected by this bug is encouraged to test this patch: https://gerrit.libreoffice.org/#/c/20702/

There's no test document attached here so I don't have a real comparison of "before" and "after" ... anyway I did what I thought was right. It'd be nice if someone could confirm that
Comment 5 Buovjaga 2015-12-15 10:06:12 UTC
Still repro.

1. Open calc
2. Input text to a cell
3. Double click in cell and select text
4. Right click text and select Character from context menu
5. Position tab, select Subscript and relative font size: 90%
6. Save and reload

90% has magically turned into 58%.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 014633f83e44ae8ba33087b6f38e8e253e281969
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-15_06:21:44
Locale: fi-FI (fi_FI)
Comment 6 Katarina Behrens (Inactive) 2015-12-22 12:58:29 UTC
Created attachment 121496 [details]
Simple testcase

Open attached document. Superscript in A1 cell should have 
Raise by: 32%
Relative font size: 64%

Change something trivial in the document and save. Superscript in A1 will now have: 
Raise by: 32%
Relative font size: 58% 

(i.e. as Beluga correctly points out, relative font size gets lost)
Comment 7 Commit Notification 2015-12-22 13:13:46 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

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

tdf#89999: Fix ODF export of sub|superscript text

It will be available in 5.2.0.

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 8 Commit Notification 2016-01-07 11:19:47 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

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

tdf#89999 bugfix test

It will be available in 5.2.0.

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 9 Katarina Behrens (Inactive) 2016-01-07 12:14:43 UTC
Let's set this to fixed then
Comment 10 Buovjaga 2016-01-13 09:50:32 UTC
Confirmed as fixed.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 813a319fe836d1ed1c967928bc044643d0b4c07d
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-12_07:46:53
Locale: fi-FI (fi_FI)