Bug 89951 - EDITING: format removed when merging formatted with non-formatted cells
Summary: EDITING: format removed when merging formatted with non-formatted cells
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Tibor Nagy
URL: https://help.libreoffice.org/7.1/en-U...
: 134757 136505 138082 (view as bug list)
Depends on:
Blocks: Calc-Merge-Split Cell-Direct-Formatting-Parts
  Show dependency treegraph
Reported: 2015-03-11 09:30 UTC by harm.deweirdt
Modified: 2023-07-18 09:11 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description harm.deweirdt 2015-03-11 09:30:52 UTC
When merging a cell containing marked up text (underline, bold, italics) with an empty cell, the result shows the text but without the earlier markup.

How to reproduce:
1. Enter some text in a cell, and then use one or more markup options.
2. Select that cell and one next to it and merge them.
3. In the dialog that asks to move the contents of the hidden cells to the first cell, select Yes.

Actual result: the markup of the text is now gone.
Expected result: the markup of the text stays as it was before

Tried 11th of March 2015 on LibreOffice Calc
Comment 1 A (Andy) 2015-03-11 21:10:57 UTC
Reproducible with LO, Win 8.1

Note to Step 2:
It is not reproducible when merging the cell with a cell right to or below that cell.  It is only reproducible when merging the cell with a cell above or left to that cell.
Comment 2 harm.deweirdt 2015-03-11 21:21:48 UTC Comment hidden (obsolete)
Comment 3 tommy27 2016-04-16 07:26:35 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2017-05-22 13:22:39 UTC Comment hidden (obsolete)
Comment 5 Zineta 2018-09-26 10:51:41 UTC
Still reproducible in :
Version: (x64)
Build ID: 8b1501d80dc9d3f42c351c6e026fa737e116cae5
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-22_23:19:22
Locale: bs-BA (bs_BA); Calc: threaded

Tried also in LO 3.3.0 and OOo 3.3.0, it inhereted from OOo.
Comment 6 QA Administrators 2019-09-27 03:05:09 UTC Comment hidden (obsolete)
Comment 7 Thomas Lendo 2020-03-01 07:41:08 UTC
Still reproducible with
Version: (x64)
Build-ID: dd0751754f11728f69b42ee2af66670068624673
Comment 8 NISZ LibreOffice Team 2020-09-16 13:10:09 UTC
*** Bug 134757 has been marked as a duplicate of this bug. ***
Comment 9 Timur 2020-11-09 08:30:55 UTC
*** Bug 138082 has been marked as a duplicate of this bug. ***
Comment 10 Timur 2020-11-09 08:31:35 UTC
*** Bug 136505 has been marked as a duplicate of this bug. ***
Comment 11 Timur 2020-11-09 08:38:05 UTC
Example is given in duplicate 138082 with file attachment 167112 [details] compared in MSO and LO before as attachment 167110 [details] and after as attachment 167111 [details].

There are 2 issues here: 

IMO requests shouldn't be accepted unconditionally as requested: "look for the 1st cell with contents and keep that format" but instead to add check mark on Merge Cells dialog to say: "keep the format of 1st non-empty cell" and remember last status.
But it may complicate .. let's call UX to decide. 

Other issue is Help which doesn't explain that Merged Cells adopt the format of the first cell and it should. With this bug it should also explain that it adopts the format of the first cell with format. 
This is a note to ask for Documentation change after this bug is decided.
Comment 12 Colin 2020-11-09 08:40:57 UTC Comment hidden (obsolete)
Comment 13 Colin 2020-11-09 08:42:49 UTC Comment hidden (obsolete)
Comment 14 Colin 2020-11-09 09:08:40 UTC Comment hidden (no-value)
Comment 15 Timur 2020-11-09 09:47:24 UTC
*** Bug 93202 has been marked as a duplicate of this bug. ***
Comment 16 Timur 2020-11-09 09:55:49 UTC
*** Bug 136405 has been marked as a duplicate of this bug. ***
Comment 17 Timur 2020-11-09 09:57:56 UTC
Now that we have 5 duplicates, this is High priority. (But it doesn't mean it will be resolved sooner, it still needs a volunteer).
Bug 93202 shows a consequence: in addition to format also formula is lost. So this is not a minor issue. 
I still think we should have a check box for this.
Comment 18 Heiko Tietze 2020-11-09 10:20:02 UTC
Excel takes the format of the first non-empty cell into the merged cell. No question or confirmation what to pick. For sake of familiarity we could do the same. But we have to store the cell formattings in case the user un-merges later, which Excel cannot.

<green><yellow><red> => <green>
<><yellow><red> => <> (no format)
<green><yellow>123<red>456 => <yellow>123
<green><>123<red>456 => <>123 (no format)

(IMHO not highly important)
Comment 19 Timur 2020-11-12 12:09:04 UTC
I don't see this as an enhancement (yes for format) but as a bug (because of lost formula, of which user is not aware immediately).
Comment 20 Heiko Tietze 2023-03-13 11:53:54 UTC
*** Bug 153899 has been marked as a duplicate of this bug. ***
Comment 21 Stéphane Guillou (stragu) 2023-03-16 17:47:05 UTC
I have split again the issue with a formula being replaced by its static result, as I think they need to be tracked separately and are of different importance.

Formatting issue is still reproducible in:

Version: (X86_64) / LibreOffice Community
Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

One cell *has* to be the main one when merging, as some formatting can't be mixed (for example, the cell background). However, text values can have a mix of formatting, and that should not be lost in the process.