Bug 149430 - Clone formatting de-merges cells rather than considering the merged cells as a single cell
Summary: Clone formatting de-merges cells rather than considering the merged cells as ...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL: https://help.libreoffice.org/7.4/en-U...
Keywords: needsUXEval
Depends on:
Blocks: Calc-Merge-Split Clone-Formatting
  Show dependency treegraph
Reported: 2022-06-02 12:23 UTC by manimal.tfu
Modified: 2022-06-08 06:51 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Calc Sheet Cell - Properties, where Merge isn't part of them (87.69 KB, image/jpeg)
2022-06-03 08:09 UTC, manimal.tfu
Calc Sheet Cell - Edit -> Paste -> Paste Special -> Paste Special (57.50 KB, image/jpeg)
2022-06-03 08:10 UTC, manimal.tfu

Note You need to log in before you can comment on or make changes to this bug.
Description manimal.tfu 2022-06-02 12:23:15 UTC
I wanted to clone the formatting of one cell on a new one that was previously merged.
I was expecting the clone formatting brush to consider the newly merged cells as a single cell and to apply the cloned formatting on it.

Instead of that, it de-merges the merged cells and apply the formatting on the first (from the left) de-merged cell.

This is either a bug or this could be another use of the clone formatting tool.

Steps to Reproduce:
1. Format a cell (type of data, background colour, data)
2. Create another cell by merging a few cells.
3. Select the cell of step 1 and click on Clone Formatting.
4. Click on the cell made from a merge (in step 2).
5. The cell is de-merged and only the 1st one is clone formatted.

Actual Results:
Merged cells turn to de-merged cells and only the 1st cell's formatting is cloned.

Expected Results:
Merged cells remain merged and formatting cloned on it.

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Version: (x64) / LibreOffice Community
Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (fr_FR); UI: fr-FR
Calc: CL
Comment 1 Rafael Lima 2022-06-02 13:40:00 UTC
Hi, thanks for your report.

Actually, cell merge information is considered as formatting.

So if your original cell is not merged and you clone its format, when you paste the format over a merged cell it will result in unmerging the destination cell (since the original cell wasn't merged as well). 

This is actually the intended behavior and it is what happens in other office suites, namely MS Excel and OnlyOffice.

Google Sheets is the only exception here: if the original cell is not merged, pasting the format over a merged range will not unmerge it. However, the opposite is not true. If the original range is merged, cloning the format over an unmerged range will merge the destination range. IMO Google Sheets is inconsistent in this regard.

My take is this is NAB.
Comment 2 manimal.tfu 2022-06-03 08:09:05 UTC
Created attachment 180548 [details]
Calc Sheet Cell - Properties, where Merge isn't part of them

This is contradicting the statement that Merge is one of the cell's properties.
Comment 3 manimal.tfu 2022-06-03 08:10:48 UTC
Created attachment 180549 [details]
Calc Sheet Cell - Edit -> Paste -> Paste Special -> Paste Special

An illustration that could inspire the implementation of my suggestion
Comment 4 manimal.tfu 2022-06-03 08:19:22 UTC
Thanks for your reply.

Talking of inconsistence : the cell's properties do NOT shows up Merge at all.

This is why I've suggested to improve slightly the Clone Formatting tool with :

- either a dialog pop-up that would look a bit like the one of my last screenshot, in attachment above.
( Calc Sheet Cell - Edit -> Paste -> Paste Special -> Paste Special )

- or a menu that would look like Edit -> Paste -> Paste Special where users could select borders, border color, background color, and so on.
Comment 5 Timur 2022-06-03 11:51:33 UTC
Clone Formatting is a fast tool and it cannot have dialog. 
"In Calc, the Clone Formatting tool only copies formatting applied using the Format - Cells dialog or other equivalent methods."
I think that merge is an equivalent to format. So that's NotABug, as Rafael noted.

I'm adding UX to consider Enhancement in Calc: hold down Ctrl+Shift when you click to not take merge info.
Comment 6 Heiko Tietze 2022-06-08 06:51:50 UTC
(In reply to Rafael Lima from comment #1)
> Actually, cell merge information is considered as formatting.

While I would expect the same as the OP this comment makes it clear. 

Using a single cell with formatting as source to clone at two merged cells makes those split (as reported), using two merged cells for two keeps the merged state intact, and using three extends the merged size. => NAB/WF (or it requires to completely change the merge behavior).