Bug Hunting Session
Bug 93528 - FILESAVE Saving as XLS loses style hierarchy
Summary: FILESAVE Saving as XLS loses style hierarchy
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Michael Meeks
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-19 11:31 UTC by Matthew Francis
Modified: 2017-01-31 00:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
patch that reverts the identified change. (4.44 KB, text/plain)
2015-08-22 18:36 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Francis 2015-08-19 11:31:45 UTC
Saving attachment 117801 [details] (bug 93045) as .xls used to retain the hierarchy of styles, but when doing so in a recent LO the hierarchy is lost.

This appears to be a save issue rather than a load issue
Comment 1 Matthew Francis 2015-08-19 11:34:26 UTC
This appears to have begun at the below commit.
Adding Cc: to michael.meeks@collabora.com; Could you possibly take a look at this one? Thanks

    commit bfb978334cea775b8ae5c40ceea050ea0660d80a
    Author:     Michael Meeks <michael.meeks@collabora.com>
    AuthorDate: Sat Jun 28 20:10:33 2014 +0100
    Commit:     Michael Meeks <michael.meeks@collabora.com>
    CommitDate: Mon Jun 30 15:36:26 2014 +0100
    
        configmgr: faster / simpler compare for keys.
    
        A surprising amount of time is/was spent comparing keys in the
        std::map red/black tree traversing nodes. Since we don't need
        the data truly sorted, instead sort in length buckets. Kills
        90k rtl_ustring_compare_withLength calls on startup, around
        0.9% of headless start.
Comment 2 Michael Meeks 2015-08-19 12:24:50 UTC
Wow - that is interesting =) its a very far removed piece of code from style export: sc/source/filter/xestyle.cxx  concerning that (somehow) the sort order of config keys affects the export of styles to binary Excel. A few questions:

* does it impact XLSX too (if so easier to compare before & after and home in on the code more quickly perhaps - it's shared code so I would expect so.

* what of this data comes from the configuration ? (do we store default styles there, or user-defined styles or ? ...).

Thanks !
Comment 3 Matthew Francis 2015-08-19 13:14:09 UTC
The behaviour for XLSX doesn't seem to change across the commit in question, but then we never seem to have managed to retain the style hierarchy in XSLX since that became a (visible?) feature circa 4.2.0 - for this file at least, I haven't checked others.

As to what's going on specifically with the styles I'm afraid I can't tell.
As one specific example, before the commit in question, the cell style "Nr0" is a custom style which inherits from the style "Nr", and this survives being saved as .xls and reloaded.
After the commit, "Nr0" shows as inheriting from "Default" after saving and reloading from .xls


I couldn't see the connection either, so I scrubbed back and forth across the commit a few times to make sure, and also tried with a fresh user profile just in case there was anything funny there - if you'd like to reproduce simply, the commit and its immediate predecessor are both covered by the "44max" bibisect repo
Comment 4 Michael Meeks 2015-08-22 18:36:47 UTC
Created attachment 118094 [details]
patch that reverts the identified change.

Very odd; thanks for the report - I reverted on master - with the attach patch. I re-built officecfg/ and a new user profile. But still loose the hierarchical styles.

I alsoe appear to loose hierarchical styles in XLS saving in 4.3 which is before the change was made (it arrived in 4.4). Are you sure this feature used to work ? =)
Comment 5 Timur 2015-09-07 16:30:21 UTC
Hierarchy wasn't loaded until 4.0.5, and it was never saved in XLS.
So, doesn't look like a regression to me.
Comment 6 Michael Meeks 2015-09-07 16:34:19 UTC
Dropping 'bibisected' and 'regression' for now then; thanks =)
Comment 7 Timur 2016-05-21 12:04:57 UTC
OK, let go back to the basics.
Does XLS support style hierarchy at all? If not, this is NotOurBug.
I can't find a way to show style hierarchy in Excel, to verify that it's shown and saved. In Word, it's called Style Pane. 
If I take ODS from attachment 117801 [details] and save it in Excel 2013 as ODT, XLS, XLSX, and then reopen in LO, style hierarchy is not shown in any case, so probably not saved or some other issue. 
If I take the same attachment 117801 [details] and save it first in Calc as XLSX, custom styles are lost due to Bug 93045.
So, I'd close this one as NotOurBug, or someone should verify it's supported in XLS.
Comment 8 QA Administrators 2016-12-07 12:40:17 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2017-01-31 00:24:52 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20170131