Bug 78705 - EDITING: Option to merge data when copy/pasting
Summary: EDITING: Option to merge data when copy/pasting
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Depends on:
Reported: 2014-05-14 19:24 UTC by peter.morpheus
Modified: 2014-05-17 22:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Example to demonstrate the behavior (11.47 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-14 19:24 UTC, peter.morpheus

Note You need to log in before you can comment on or make changes to this bug.
Description peter.morpheus 2014-05-14 19:24:47 UTC
Created attachment 99042 [details]
Example to demonstrate the behavior

Problem description: 

Steps to reproduce (exemplary, please also find the example attached):
1. Fill in "A" into B4
2. Fill in "B" into C7
3. Fill in "C" into C8
4. Fill in "D" into B8
5. Select the 4 fields, top left B7 to bottom right C8
6. Cut the fields
7. Select field B4
8. Ctrl+V (Paste)

Current behavior: A prompt appears that warns you, that data will be overwritten and you can select Yes or No

Expected behavior: I think there should be a third option "merge" data (and then the options should be "Overwrite", "Merge" and "No"). In the original dataset the place for "A" was empty. In my opinion there is no need to "overwrite" field B4 in this case which a non-data field. I discovered this issue in a more complex context, but the principle stays the same.

I can imagine, that this can get pretty complex, especially when things like borders, (background) colors etc. come into play, but I think the described enhancement is better in any way, you could still use the old behaviour using the "Overwrite" option if you prefer that.

Thanks for your awesome product! :)

Operating System: Linux (Other)
Version: release
Comment 1 Tomaz Vajngerl 2014-05-14 19:58:17 UTC
You can do this with "paste special.." and enable "skip empty cells"
Comment 2 Joel Madero 2014-05-16 20:08:51 UTC
Yeah this is doable - but you wouldn't do it quite like you said. For help with this I suggest going to the ask site or the user list but you can skip empty cells so there is no overwrite. 

What you can't do is just merged multiple columns into the first column (ie. you can't take what's in B2 and C3 and merge into column A in one step).

What you can do is this:
1. Type 1 in A1
2. Type 2 in B2
3. Type 3 in C3

Select column B, copy

Special paste in Column A and make sure to tick the "skip empty cells"

Select column C, copy

Special paste in Column A (same as two steps above)

Now you'll have everything merged.

Comment 3 m.a.riosv 2014-05-16 20:17:57 UTC
Hi Tomaz, you are right that is the option to do it, but doing so, LibreOffice hangs.

Hi Peter, as there is an option to do it, I think better study a bit to change the status from normal to enhancement, and where to introduce such direct option, but maybe having already a way, perhaps won't be easy to get it done.
Comment 4 peter.morpheus 2014-05-17 15:31:12 UTC
Hi, thanks at first for taking care of this and trying to find a solution.

@Joel: Thanks for that hint. Actually I cannot merge the data with paste special and merge data. In my version, the data is not pasted at all ("2" in B2 is not pasted although I use paste special, skip empty cells and confirm "yes" in the overwrite dialog)

In general, my point is not about this "merging" data like it was described by Joel. This can help but in my use case not really helpful (you still need to click multiple times) and I would rather stick to copy/pasting normally then seeing if paste special can make it (my personal feeling).

I think I need to get a bit more familiar with the pase special feature, maybe it helps more than I can foresee now, but I would love to see a feature that would make this extra detour unnecessary.
Comment 5 m.a.riosv 2014-05-17 22:21:14 UTC
The issue for past-special skipping empty cells has been solved by Kohei in https://bugs.freedesktop.org/show_bug.cgi?id=77735,
verified it works in:
Version: Build ID: d758875cd0ea87f8c7bbe1bbb78e49d06254cbee
  TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-17_04:23:54

With Paste-Special [Ctrl+Shif+V], only is needed select the option "skip empty cells" the first time using P-S in the session, the next time you call P-S the last selected options remain, so [Ctrl+Shif+V]+[Enter] can do the job. Also it's possible add a button for P-S in a Tool-bar (Menu/Options/Customize/Toolbars) so only with a couple of clicks or click+[Enter] can do the job.