Bug Hunting Session
Bug 41113 - EDITING: Using "Paste special" in merged cells loses cell content
Summary: EDITING: Using "Paste special" in merged cells loses cell content
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Merge-Split Paste-Special
  Show dependency treegraph
 
Reported: 2011-09-22 05:19 UTC by Stephan van den Akker
Modified: 2018-12-28 09:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan van den Akker 2011-09-22 05:19:57 UTC
How to reproduce:
Create new spreadsheet
Fill cells Sheet1.A1:C1 with unique numbers, e.g. 1 to 3
Merge cells Sheet2.A1:B1 and Sheet2.C1:D1
Select cells Sheet1.A1:C1 and select Edit | Copy 
Select cell Sheet2.A1 and select Edit | Paste Special...
In Dialog "Paste Special" unselect "Paste all" under Selection
In Dialog "Paste Special" unselect everything except "Numbers" under Selection
In Dialog "Paste Special" press OK

Expected behavior:
Merged cell Sheet2.A1:B1 contains 1
Merged cell Sheet2.C1:D1 contains 2
Cell Sheet2.E1 contains 3

Actual behaviour:
Merged cell Sheet2.A1:B1 contains 1
Merged cell Sheet2.C1:D1 contains 3
Cell Sheet2.E1 is empty
Comment 1 Björn Michaelsen 2011-12-23 12:39:10 UTC Comment hidden (obsolete)
Comment 2 Stephan van den Akker 2011-12-23 14:39:39 UTC
Bug is still there.

Tested in LOdev 3.5.0 
Build ID: 7362ca8-b5a8e65-af86909-d471f98-61464c4
on openSuSE 11.4 32-bit
Comment 3 Rainer Bielefeld Retired 2012-03-06 00:40:44 UTC
I see the effect with "LibreOffice 3.5.1.1 German UI/Locale [Build-ID: 45a2874-aa8c38d-dff3b9c-def3dbd-62463c8] on German WIN7 Home Premium (64bit), but I can't tell whether it's a bug, although the result is unexpected also for me.

@Stephan van den Akker
You did some chin-ups to get the undesired result, can you explain why you did exactly so? Can you cite Help, manuals or similar that let expect other behavior?
Comment 4 Stephan van den Akker 2012-03-06 05:21:15 UTC
@Rainer Bielefeld: Good questions.

Copying cell content without formatting is something I use a lot. It is an invaluable part of a workflow that re-uses heavily formatted sheets with new data.

Writer actually behaves in the way i would expect and prefer for Calc (see "Expected behavior" in my original post).

But, then Calc's help on merging cells says:

"You can select adjacent cells, then merge them into a single cell. Conversely, you can take a large cell that has been created by merging single cells, and divide it back into individual cells.

When you copy cells into a target range containing merged cells, THE TARGET RANGE GETS UNMERGED FIRST, then the copied cells are pasted in. If the copied cells are merged cells, they retain their merge state." (capitalization mine)

I guess the second paragraph is trying to tell me to expect the actual behavior, but it still doesn't make sense to me. It just seems to me that the user is exposed to the implementation details of merging.

I would prefer and expect merged cells to behave as a single cell, just as the first help paragraph says and just like in Writer. I like programs with little or no exceptions to their own base rules (just like a good Sci Fi movie...).

How do other speadsheets do it:

Excel 97, Excel 2007, Gnumeric: Error message, whining about the target range not being compatible with the copied content. No copying possible...

Calligra Tables: same as present behavior of Calc

So, to recap, my arguments to change Calc's behavior:
1: I expect merged cells to behave as 1 cell
2: Writer does it the way I prefer: Calc is behaving inconsistenly
3: Calc's behavior is unexpected for you too (that makes 2 out of 2). 

But basically, it comes down to taste and consistency. What do
other users expect?
Comment 5 Cor Nouws 2012-05-10 04:32:07 UTC
(In reply to comment #4)

> But, then Calc's help on merging cells says:
> [...] 
> When you copy cells into a target range containing merged cells, THE TARGET
> RANGE GETS UNMERGED FIRST, then the copied cells are pasted in. If the copied
> cells are merged cells, they retain their merge state." (capitalization mine)

I think this explains that just doing Paste (and not paste special) results in 
Sheet2.A1 = 1, B1 = 2 and C1 = 3


> So, to recap, my arguments to change Calc's behavior:
> 1: I expect merged cells to behave as 1 cell
> 2: Writer does it the way I prefer: Calc is behaving inconsistenly
> 3: Calc's behavior is unexpected for you too (that makes 2 out of 2). 
> 
> But basically, it comes down to taste and consistency. What do
> other users expect?

I think this is a useful idea.
Comment 6 Joel Madero 2016-07-04 06:29:39 UTC
Version: 5.3.0.0.alpha0+
Build ID: c89294233b6a9ffc1bd75e6e9226ad723b7d5538
CPU Threads: 2; OS Version: Linux 3.16; UI Render: default; 
Locale: en-US (en_US.UTF-8)


Same behavior. 

I'm not sure why this is an enhancement and not a bug. Having 1 value just missing entirely on a paste seems like a strange default behavior (wrong) but...I won't change it. If someone else thinks it should be changed I suspect:

Minor: Can slow down but won't prevent high quality work;
Lowe: Default for minor bugs seems appropriate
Comment 7 QA Administrators 2018-06-04 02:33:58 UTC Comment hidden (obsolete)
Comment 8 Timur 2018-12-28 09:14:35 UTC
Repro 6.3+.