Bug 77537 - FILESAVE: Font name is not preserved when exporting cell with mixed formatting to ODS
Summary: FILESAVE: Font name is not preserved when exporting cell with mixed formattin...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: Other All
: high major
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.2.5
Keywords: bibisected
: 78306 79960 80104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-16 18:35 UTC by Jim Wilson
Modified: 2015-12-17 07:56 UTC (History)
7 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 Jim Wilson 2014-04-16 18:35:00 UTC
Problem description: When a cell contains text with a character format applied to only a portion of the text, that formatting is not preserved when the file is saved, closed, and re-opened.

Minimal steps to reproduce the bug:

1. Open a new Calc document.
2. Enter two characters of text into a cell.
3. Edit the cell contents as follows:
3a. Select one of the two characters of the text in the cell.
3b. From the menu, choose Format > Character, change the Font Family of the selected character to something different, and click [OK].
4. Observe that the two characters are rendered in the correct, different fonts.
5. Save the file and close it.
6. Open the file in Calc.
7. Observe that both characters now have the same font.

Current behavior:
If some of the characters in a cell are formatted differently from other characters in the same, that formatting is not preserved when the file is saved, closed, and re-opened.

Expected behavior:
When a spreadsheet file is opened, the character formatting of the cell contents should match what was present when the file was last saved.

Operating System: other
Version: 4.2.2.1 release
Comment 1 Jorendc 2014-04-18 21:15:08 UTC
Reproducible, tested using Mac OSX 10.9 with LibreOffice Version: 4.3.0.0.alpha0+
Build ID: 619b4c40da9e85febbb08a3f7cf8aa8d10963fc1
TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2014-04-18_00:07:53

CAN'T reproduce using Version: 4.1.5.3
Build ID: 1c1366bba2ba2b554cd2ca4d87c06da81c05d24

So -> regression

Looks a serious one. Especially the fact it is reproducible using .ods, our "own" file format.

Marking as critical.
Comment 2 Terrence Enger 2014-04-19 03:10:55 UTC
Using the "42all" bibisect repo ...

git bisect
----------
 0f971c3ad02abe7ff2131778f0a00e489392f5a5 is the first bad commit
commit 0f971c3ad02abe7ff2131778f0a00e489392f5a5
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Oct 18 02:26:52 2013 +0000

    source-hash-8a569f1c4decc7440e9dae1af35d7fa59c3b0121
    
    commit 8a569f1c4decc7440e9dae1af35d7fa59c3b0121
    Author:     Miklos Vajna <vmiklos@suse.cz>
    AuthorDate: Thu Aug 22 11:04:15 2013 +0200
    Commit:     Miklos Vajna <vmiklos@suse.cz>
    CommitDate: Thu Aug 22 11:15:02 2013 +0200
    
        SwASCWriter: out of bounds substring access
    
        Regression from 6e0d836ff120ba292ba52f3623a3dd9be04aefc2, when simply
        copy-pasting some string to a terminal window, rFltNm is empty.
    
        Change-Id: I874e262ef1a3ebb38d90d9ef4f1b8d3457c5daff

:100644 100644 20e43d8047d2fe70d85da0b3dfee6f9eaf45b27c 88e39d653cae26ac7f42737ccaee97c91896117a M	ccache.log
:100644 100644 2c8c9638ebc10cb8e92893fb8ef280dcd71ac574 61c486cc1fd9e6a09680647050a894d235865a42 M	commitmsg
:100644 100644 d8e41b727f0e5b366c0ffaf9fc2c1c1d2b76cc9f ad72014e1c57ebb9fc391ac7f3440084f307f810 M	dev-install.log
:040000 040000 4d869feaa4f0a081e83c2d12c60c7fe66745fdce 7b7448b43aa552551977eb5fedc3939707459778 M	opt

git bisect log
--------------

# bad: [793dbf6f80f497dfe587d560d6257f42a24273f6] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [8092559c5013969ebda017d79200463b9b975038] source-hash-fd84daf696a368c2c7561b5253b32a63ecdeca4a
git bisect good 8092559c5013969ebda017d79200463b9b975038
# good: [0270ef1b76a6de423b30f7927362cc01c1a0fc38] source-hash-b1f7dd66b898b03cb4bd8d434b6370310ea95946
git bisect good 0270ef1b76a6de423b30f7927362cc01c1a0fc38
# skip: [ddb123cad22440994cd332d9985dd9558fd07e07] source-hash-647fb29f528b891a1c92846640f7865f5c1fbe7f
git bisect skip ddb123cad22440994cd332d9985dd9558fd07e07
# skip: [9d357dc6201f7cd91448595e0a3f89dfdae81946] source-hash-2304beaca33c63b94df99cb827716f00ce259f9a
git bisect skip 9d357dc6201f7cd91448595e0a3f89dfdae81946
# good: [ef72aa34cf4ee6399b192de28708d621c9680a50] source-hash-7e07a45500dcbb891a85f0bc9b7049cf4d50bba1
git bisect good ef72aa34cf4ee6399b192de28708d621c9680a50
# bad: [2472598a0b04eef3038d56137f27dc6dc1edf9e5] source-hash-5050dfc73f194d1d59222cac72e69a917655d816
git bisect bad 2472598a0b04eef3038d56137f27dc6dc1edf9e5
# bad: [f7c906a1908211e1da263a58e40cc8a3b227fcd9] source-hash-d3ff876f3c7f441fd72a037ed31fb973f223ca6d
git bisect bad f7c906a1908211e1da263a58e40cc8a3b227fcd9
# good: [a2051f95d4e218b2cf99db275d9def985e40a082] source-hash-4450b1b93f7f7b5f97c631fe767b1156350a9227
git bisect good a2051f95d4e218b2cf99db275d9def985e40a082
# bad: [ed14c343dbd60721ca417ee0ae2ace3a66746e89] source-hash-9ef052368842f9e5b56b9d47329a81da8e8e2da1
git bisect bad ed14c343dbd60721ca417ee0ae2ace3a66746e89
# bad: [0f971c3ad02abe7ff2131778f0a00e489392f5a5] source-hash-8a569f1c4decc7440e9dae1af35d7fa59c3b0121
git bisect bad 0f971c3ad02abe7ff2131778f0a00e489392f5a5
# good: [2acbdeb43901aa12d99919bb5d12aa3b4080372f] source-hash-46575e931479a4e967f2ad6a056b5f4d5490146c
git bisect good 2acbdeb43901aa12d99919bb5d12aa3b4080372f
# good: [abd467944f368b885e506612b9f2dd943612c500] source-hash-349c91c8ec6afc1f5c8499529d559af34d115a76
git bisect good abd467944f368b885e506612b9f2dd943612c500

other information
-----------------

(*) Whoops.  I now realize that I departed from Jim's step 3a by using
    the dropdown list of fonts.

(*) The fonts I used were "Courier 10 pitch" for initial entry and
    then I applied "Liberation Sans" to the leading characters.  In
    deference to my aging eyes, I had 6 characters in each font.

(*) With some versions of Calc, upon <Enter> after I applied
    "Liberation Sans" the program would display the entire contents of
    the cell in that font.  However <up-arrow> restored the display to
    the correct two fonts in the cell, and the correct display
    persisted after another <Enter>.

(*) I am setting platform All, as this bug has been sighted on OS's
    other, Mac OS X, and Linux.
Comment 3 Jorendc 2014-05-05 17:31:36 UTC
*** Bug 78306 has been marked as a duplicate of this bug. ***
Comment 4 Kevin Suo 2014-05-09 00:43:42 UTC
*** Bug 77896 has been marked as a duplicate of this bug. ***
Comment 5 Kevin Suo 2014-05-09 00:51:28 UTC
it's not font name, but all <span> attributes. See my comments and steps in bug 77896.
Comment 6 Kohei Yoshida 2014-05-09 21:30:35 UTC
(In reply to comment #5)
> it's not font name, but all <span> attributes. See my comments and steps in
> bug 77896.

The original bug report *is* about font name.  Yours is, although probably in the same area of the code, is a different use case.  The two should be handled separately.
Comment 7 Kohei Yoshida 2014-05-09 21:48:10 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > it's not font name, but all <span> attributes. See my comments and steps in
> > bug 77896.
> 
> The original bug report *is* about font name.  Yours is, although probably
> in the same area of the code, 

Actually yours is completely different, not even in the same area of the code.
Comment 8 Kohei Yoshida 2014-05-15 20:23:22 UTC
I'm on this.
Comment 9 Commit Notification 2014-05-16 00:34:13 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77537: Write export test for this.



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 10 Commit Notification 2014-05-16 00:34:27 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77537: Exporting font names in edit text needs special handling.



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 11 Kohei Yoshida 2014-05-16 00:35:43 UTC
4.2 backport: https://gerrit.libreoffice.org/9366
Comment 12 Commit Notification 2014-05-16 15:22:29 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#77537: Exporting font names in edit text needs special handling.


It will be available in LibreOffice 4.2.5.

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 13 Kohei Yoshida 2014-05-16 15:23:29 UTC
Fixed.
Comment 14 m_a_riosv 2014-06-13 02:22:19 UTC
*** Bug 79960 has been marked as a duplicate of this bug. ***
Comment 15 m_a_riosv 2014-06-13 02:23:07 UTC
*** Bug 79961 has been marked as a duplicate of this bug. ***
Comment 16 m_a_riosv 2014-06-16 21:57:10 UTC
*** Bug 80104 has been marked as a duplicate of this bug. ***
Comment 17 Robinson Tryon (qubit) 2015-12-17 07:56:58 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]