Apache OpenOffice (AOO) Bugzilla – Issue 71921
Delete Rows/Delete Columns should remember the content
Last modified: 2013-08-07 15:13:10 UTC
In some cases it is useful to move columns/rows around in the spreadsheet; unfortunately this is not easy with OOo. Excel has 'Insert Cut Cells', but the cut/paste behaves differently in OOo, so that is unusable. Instead, it is enough to copy the content of the to-be-deleted rows/columns to clipboard; then you can just paste it to the needed location. I'll attach a patch - please approve :-)
Target - 2.2.
Created attachment 40890 [details] The patch.
I'm not sure if this is a good idea. Clipboard content should be modified by clipboard functions, nothing else.
So - let's make Delete Rows/Delete Columns clipboard functions ;-) Seriously - the Excel functionality (Insert Cut Cells) is somewhere in between as well, and they do not list it among the clipboard functions either. Of course - ideally we should rename "Delete Rows" to "Delete Rows and Copy Content" but that's not too practical...
Another idea, what about to rename it to 'Cut Rows' and 'Cut Columns'? - this reminds the clipboard functions much better.
Matthias, what do you think of this: Rename "Delete Rows" to "Cut rows" and make it copy the rows to the clipboard before deleting them? Same for columns.
Oh, and we have to think of something for the case that multiple non-adjacent rows are selected (or wait until we can copy such a selection to the clipboard).
Created attachment 40898 [details] This version addresses the multiple selections case - shows a warning that he content was not copied to the clipboard.
mmp: What do you think, please?
change target to OOo 2.3. Hi gang, I am not quite sure I understand all aspects of the proposed solution. Let me try to capture the status quo: Competitive Analysis: MS Excel offers ways to copy or move a cell selection (CS) to a different location on the sheet using clipboard commands COPY or CUT and PASTE. Furthermore it is possible to free some cell space for CS by shifting the current content of the target row or column right or down. OOo 2.1 just offers CUT/COPY and PASTE to copy or move CS on a sheet. It is not possible to shift the content of the cells where CS is pasted. Content of Patch: ?? Kendy, can you please continue to describe the patch based on my decscription of MS Excel and OOo 2.1? Much appreciated, Matthias
mmp: Sorry, I should have been more verbose ;-) What is my concern with this issue is Excel's 'Insert Cut Cells' functionality. In Excel, if you choose 'Cut', nothing is removed until you choose 'Paste' or 'Insert Cut Cells'. 'Insert Cut Cells' is very handy when you want to take part of the table and move it to another location. OOo as it is now has no way to move part of the table simply at the moment. You have to: - Select the rows - 'Cut' - 'Delete Rows' - 'Insert Rows' on the final position (you have to remember how many rows) - 'Paste' Excel allows you: - Select the rows - 'Cut' - 'Insert Cut Cells' on the final position This patch improves the situation by remembering the content of the cells when you do 'Delete rows' - this way you can shrink the scenario to: - Select the rows - 'Delete Rows' (it remembers the content) - 'Insert Rows' on the final position (you have to remember how many rows) - 'Paste' Of course the ideal solution would be to change the current 'Delete rows' to 'Cut rows' (it would copy the content to the clipboard and delete the rows), and add a new 'Insert rows & Paste' that would insert exactly the right number of rows to paste the content. This way the OOo scenario would shrink to - Select the rows - 'Cut Rows' (it remembers the content) - 'Insert Rows & Paste' on the final position (inserts the right number of rows) The question is what to do when eg. rows 3,4,7,9 are selected. In my patch it issues a warning that the content was not copied to the clipboard. [NB. I'm talking about rows, but similarly it works for columns ;-) ] Would it be OK this way, please?
Reassigned to mmp for feedback.
I'll have a look... Please nudge me if am am dragged away for other projects.
Note: We're also looking for other suggestions about more direct way to move columns/rows (see http://sc.openoffice.org/servlets/ReadMsg?list=dev&msgNo=2115).
kendy: I sugges to remove these warnings: pTabViewShell->ErrorMessage( STR_DELETE_DID_NOT_COPY ); They are very annoying if you in non-interactive mode, e.g. running Basic macro which uses .uno:DeleteRows.
rail: Right, removed that in ooo-build.
We need two new menu commands: 'cut & delete row(s)' and 'insert row(s) &paste'. Try for 2.3 with DEV.
we'll consider the change for OOo 2.4.
thanks for taking over, Frank
No resources for OOo 2.4 -> retargeted to OOo 3.0.
Sorry to say: New try for 3.1.
New target.
Branch-date (feature- and code-freeze) for OOo 3.2 is nearly done. Therefore I change the target of this issue to OOo 3.x. If you think it is a stopper for OOo 3.2 please change the target back.
I'm adding this comment to all open issues with Issue Type == PATCH. We have 220 such issues, many of them quite old. I apologize for that. We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0. If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know. On the other hand, if the patch is no longer relevant, please let us know that as well. If you have any general questions or want to discuss this further, please send a note to our dev mailing list: dev@openoffice.apache.org Thanks! -Rob