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: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2017-05-29 16:29 UTC by minosi
Modified: 2021-06-17 03:50 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 Comment hidden (obsolete)
Comment 6 QA Administrators 2020-06-05 03:45:57 UTC Comment hidden (obsolete)
Comment 7 Timur 2020-11-17 07:52:29 UTC
Too long for me to test. I just mark Minor. 
Please add ODT showing the issue (can use existing, just add some text with style name), like insert screenshot in addition to table. So when someone opens, table should be different, if I understood any of this.
Comment 8 Buovjaga 2020-11-17 09:34:34 UTC
I tried reproducing from scratch, but did not see the unexpected behaviour after step 11.

minosi: you have to re-test this. Setting to needinfo (report will be closed in 7 months automatically, if you don't respond)

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: bd3aeaefff5e7bdef10c4702d1f388083557614e
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 15 November 2020
Comment 9 QA Administrators 2021-05-17 03:44:00 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-06-17 03:50:24 UTC
Dear minosi,

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-FollowUp