Bug Hunting Session
Bug 108228 - Formatting lost for hidden "cells" of a merged cell when document is saved to disk (as .odt)
Summary: Formatting lost for hidden "cells" of a merged cell when document is saved to...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2017-05-29 16:29 UTC by minosi
Modified: 2018-06-05 02:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file at step 4 (8.41 KB, application/vnd.oasis.opendocument.text)
2017-06-04 18:02 UTC, Buovjaga
Details
Example file at step 8 (8.51 KB, application/vnd.oasis.opendocument.text)
2017-06-04 18:03 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description minosi 2017-05-29 16:29:02 UTC
Description:
At present it seems that the document state referring to the "hidden" cells of a merged cell is kept in memory but is not saved into ODT file. This results in inconsisted and also undesirable behavior.

Observed with "ODF1.2 Extended (Recommended)" format, both Linux and Windows x64 builds.

Steps to Reproduce:
1. Create a custom paragraph style
2. Create a new Table, apply the custom style to the whole document + all table cells
  Note: after this "Applied Styles" view will show only the custom style
3. Merge 2 cells with the custom style into one
4. Save the document
  Note: after this "Applied Styles" view will stil show only the custom style
5. Edit the merged cell formatting (style or manually)
6. Split the merged cell into 2 original cells
  Observe the expected behavior - the "upper" cell retains the formatting and content of the merged cell. "Lower" cell reverts its original formatting (before the merge).
7. Merge different 2 cells with the custom style

8. Save and close the document, open it again in Writer
9. Notice that "Applied Styles" view now shows also "Default Style" despite doing no modification since the save action.
10. Search for "Default Style" via Control-H finds the style as applied to the "hidden" cell
11. Split back the second merged cell
  Observe unexpected behavior - the "Upper cell retains the merged cell content and formatting. The "Lower cell(s) formatting is reset to "Default Style".

Actual Results:  
See steps to reproduce.

Expected Results:
Expected behavior:
A1) The save/open of the document does not silently(!) reset the formatting of the "hidden cells" and stores it in the file.
   => ODF format limitation possibly?

A2) To work around the (hypothetical) ODF limitation, set a policy that when a cell is split, the resultant cells that are "un-hidden" will inhering the style of the merged cell at the time of the split. This is the most desirable actually and is also the user expectation.
   => Should not present any cross-compatibility issues.

C) The in-memory representation is made consistent with the saving behaviour and the formatting is allways reset once a cell is merged.
   => Makes it bit less practical for user, but would make the "merge" action at least consistent across save/open ensuring the user "trusts" the application does not "corrupt" his files.


Reproducible: Always

User Profile Reset: Yes, no effect, tested also on fresh install on Linux x64.

Additional Info:
This is very hard to investigate can cause negative view of the user on LO.

It would be nice to have split cells inherit the formatting of the cell being split. That would also increase user productivity.

However, the real issue is inconsistency in how in-memory and on-disk data is handled when working with LO's native document format.

We discovered this bug due to a colleague complaining that someone "corrupted" his document while collaboratively editing it ...


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.97 Safari/537.36 Vivaldi/1.9.818.49
Comment 1 minosi 2017-05-29 16:53:38 UTC
Confirmed identical behavior in LO 3.3.0.4.
Comment 2 Buovjaga 2017-06-04 18:02:39 UTC
Created attachment 133848 [details]
Example file at step 4

Arch Linux 64-bit, KDE Plasma 5
Version: 5.5.0.0.alpha0+
Build ID: c855400e9686ddd8bcba5691393f839f6f52c966
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 2nd 2017
Comment 3 Buovjaga 2017-06-04 18:03:07 UTC
Created attachment 133849 [details]
Example file at step 8
Comment 4 Buovjaga 2017-06-04 18:05:38 UTC
I reproduce the effect in step 11.
Only styles used, not direct formatting.

Some notes:

- already after step 2 I see Default style in Applied styles filter in the styles list.

- at step 6 there was no reverting of the style, both cells retained the style that was applied to them at step 5
Comment 5 QA Administrators 2018-06-05 02:38:09 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug