Bug 98083 - "Wrap text automatically" setting is forgotten when a file is saved in XLS or XLSX
Summary: "Wrap text automatically" setting is forgotten when a file is saved in XLS or...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: high normal
Assignee: Katarina Behrens (CIB)
URL:
Whiteboard: target:5.2.0 target:5.1.2 target:5.0.6
Keywords: bibisected, bisected, regression
: 99108 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-22 16:43 UTC by Lyuben Blagoev
Modified: 2016-10-25 19:07 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
example file showing the bug (5.50 KB, application/vnd.ms-excel)
2016-02-22 16:43 UTC, Lyuben Blagoev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lyuben Blagoev 2016-02-22 16:43:48 UTC
Created attachment 122872 [details]
example file showing the bug

The attached XLS file contains one cell with 3 lines. The 3th line is longer and I've set the "Wrap text automatically" property of the cell. But when I saved the file and opened it again, the property was not set, and the 3th line was not wrapped automatically.
Comment 1 raal 2016-02-22 17:57:45 UTC
I can confirm with Version: 5.2.0.0.alpha0+
Build ID: 91a7580e03d5b47c6e2513afce85ddee45e730b6
CPU Threads: 4; OS Version: Linux 4.2; UI Render: GL; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-02-04_00:17:43

regression from 5.0.5, high importance
Comment 2 Cor Nouws 2016-02-22 21:07:33 UTC
could this be related to bug 32950 ?
Comment 3 Lyuben Blagoev 2016-02-23 06:30:04 UTC
(In reply to Cor Nouws from comment #2)
> could this be related to bug 32950 ?

I don't think so. Also I noticed this bug for the first time after the update to 5.1.0. Before that automatic wrapping was working.
Comment 4 Katarina Behrens (CIB) 2016-02-23 09:48:44 UTC
@QA: I might have broken this by the following commit: 

commit dd971d008780186c88cc33df3610ed8cc9f0a2f4
Author: Katarina Behrens <Katarina.Behrens@cib.de>
Date:   Thu Nov 5 17:57:07 2015 +0100

    tdf#92296: Fix off-by-one formatting of text runs on OOXML export
    
    This essentially reverts commit 8865ed2efecd03722d10e522265f31c99b13b2bb
    and implements a different fix for tdf#90812:
    If the formatting of entire cell is uniform, remove formatting of the
    leading text run and create corresponding cell style. In all other cases,
    write out formattings for each individual run.

Can some1 please verify that text wrap was working before and ain't working after?
Comment 5 raal 2016-02-23 10:18:49 UTC
(In reply to Katarina Behrens (CIB) from comment #4)
> @QA: I might have broken this by the following commit: 
> 
> commit dd971d008780186c88cc33df3610ed8cc9f0a2f4
> Author: Katarina Behrens <Katarina.Behrens@cib.de>
> Date:   Thu Nov 5 17:57:07 2015 +0100
> 
>     tdf#92296: Fix off-by-one formatting of text runs on OOXML export
>     
>     This essentially reverts commit 8865ed2efecd03722d10e522265f31c99b13b2bb
>     and implements a different fix for tdf#90812:
>     If the formatting of entire cell is uniform, remove formatting of the
>     leading text run and create corresponding cell style. In all other cases,
>     write out formattings for each individual run.
> 
> Can some1 please verify that text wrap was working before and ain't working
> after?

I'll bisect this.
Comment 6 raal 2016-02-23 11:21:09 UTC

be35ffff05e02d97e9ff5af9c4e76edb1567d3aa is the first bad commit
commit be35ffff05e02d97e9ff5af9c4e76edb1567d3aa
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Thu Nov 5 16:29:41 2015 -0800

    source sha:dd971d008780186c88cc33df3610ed8cc9f0a2f4

    source sha:dd971d008780186c88cc33df3610ed8cc9f0a2f4

:040000 040000 950ddbcc49cee44e1e30918f1bd66be2b1edd27a b4e2c665a34edd6e10d1e6fb3c85a3d754e63524 M      instdir

author	Katarina Behrens <Katarina.Behrens@cib.de>	2015-11-05 16:57:07 (GMT)
committer	Eike Rathke <erack@redhat.com>	2015-11-05 18:10:52 (GMT)
commit	dd971d008780186c88cc33df3610ed8cc9f0a2f4 (patch)
tree	1d93e542e9c8fe05450a2763989c02fa50119d6d
parent	2dd20b4745a5876ca40106163799e89bf539b2cf (diff)
tdf#92296: Fix off-by-one formatting of text runs on OOXML export
Comment 7 Katarina Behrens (CIB) 2016-02-29 10:37:06 UTC
I'm going to use sample document from this bug in a unit test (it means it'll be placed in libreoffice git repo under version control), hope it's fine w/ everyone ...
Comment 8 Commit Notification 2016-03-04 11:19:26 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

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

tdf#98083: Always save cell format

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 Lyuben Blagoev 2016-03-05 06:44:39 UTC
As of the high importance level of this bug, I thought that maybe it will be available in 5.1.1 or any other 5.1.x bug fix release. Is using daily builds the only option to get that fixed sooner, as 5.2 is several months from now?
Comment 10 Katarina Behrens (CIB) 2016-03-05 10:33:56 UTC
Of course I'm going backport this to stable releases, 5.1 and likely also 5.0. 

But before I do, I'd like to know if my patch fixes also bug #97935 or if there's more to it and then backport multiple patches in one go.
Comment 11 Katarina Behrens (CIB) 2016-03-06 13:45:16 UTC
*** Bug 97935 has been marked as a duplicate of this bug. ***
Comment 12 Commit Notification 2016-03-14 15:17:48 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a2007d436e41db65374ced89039000a732a04dee&h=libreoffice-5-1

tdf#98083: Always save cell format

It will be available in 5.1.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 13 Commit Notification 2016-03-14 21:58:26 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5340dc6d735af1eca04b685f1be466a9ed979980&h=libreoffice-5-0

tdf#98083: Always save cell format

It will be available in 5.0.6.

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 14 Buovjaga 2016-04-19 10:35:07 UTC
*** Bug 99108 has been marked as a duplicate of this bug. ***