Bug 158399 - Insert multiple columns/rows at once with non-contiguous selection
Summary: Insert multiple columns/rows at once with non-contiguous selection
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 141315 145996 (view as bug list)
Depends on:
Blocks: Cell-Management
  Show dependency treegraph
 
Reported: 2023-11-27 12:17 UTC by J22Gim
Modified: 2023-12-15 13:00 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
case explained graphically (201.95 KB, application/pdf)
2023-11-27 12:19 UTC, J22Gim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J22Gim 2023-11-27 12:17:55 UTC
Description:
It would be good to be able to insert several non-contiguous columns at once.
It is currently not possible, what is the specific reason for this?

Steps to Reproduce:
1. Create a spreadsheet with columns A, B, C, D. Populate a few rows of each of those columns (see attachment).
2. Objective: insert blank columns in B and D, in one step.
3. Select columns B and C
4. Go to Sheet -> Insert Columns

Actual Results:
The options are greyed out; It is not possible to insert columns when more than one column is selected.

Expected Results:
Blank columns are inserted at B and C, therefore now I have columns A, B, C, D, E, F, where B and D are empty.

I am not sure why this option is not available... I guess it might be related to potential problems on how to approach this (i.e. if a column changes its location because another one was inserted before, then how to deal with the next insertion?). I suppose a sensible way would be to do it sequentially (eg. starting from left to right).


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 24; OS: Linux 6.2; UI render: default; VCL: qt5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.3~rc2-0ubuntu0.22.04.1~lo3
Calc: threaded
Comment 1 J22Gim 2023-11-27 12:19:21 UTC
Created attachment 191061 [details]
case explained graphically
Comment 2 J22Gim 2023-11-27 12:21:43 UTC
(In reply to J22Gim from comment #0)
> Description:
> It would be good to be able to insert several non-contiguous columns at once.
> It is currently not possible, what is the specific reason for this?
> 
> Steps to Reproduce:
> 1. Create a spreadsheet with columns A, B, C, D. Populate a few rows of each
> of those columns (see attachment).
> 2. Objective: insert blank columns in B and D, in one step.
> 3. Select columns B and C
> 4. Go to Sheet -> Insert Columns
> 
> Actual Results:
> The options are greyed out; It is not possible to insert columns when more
> than one column is selected.
> 
> Expected Results:
> Blank columns are inserted at B and C, therefore now I have columns A, B, C,
> D, E, F, where B and D are empty.
> 
> I am not sure why this option is not available... I guess it might be
> related to potential problems on how to approach this (i.e. if a column
> changes its location because another one was inserted before, then how to
> deal with the next insertion?). I suppose a sensible way would be to do it
> sequentially (eg. starting from left to right).
> 
> 
> Reproducible: Always
> 
> 
> User Profile Reset: No
> 
> Additional Info:
> Version: 7.6.3.2 (X86_64) / LibreOffice Community
> Build ID: 60(Build:2)
> CPU threads: 24; OS: Linux 6.2; UI render: default; VCL: qt5 (cairo+xcb)
> Locale: en-US (en_US.UTF-8); UI: en-US
> Ubuntu package version: 4:7.6.3~rc2-0ubuntu0.22.04.1~lo3
> Calc: threaded

I forgot one thing (although it is obvious, it helps make the case): the only current way of doing what I intended is to insert the columns one by one. When you have to insert several dozens this becomes cumbersome...
Comment 3 Stéphane Guillou (stragu) 2023-11-27 13:38:05 UTC
Makes sense to me.
Would help with column/row manipulation, along with bug 80390, bug 46930 and bug  39936.
Setting to "new" as a better solution than a greyed-out command, and an obvious effect of using such command, but UX/Design can confirm?

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

Same in OOo 3.3.
Comment 4 Heiko Tietze 2023-11-27 14:48:12 UTC
You can "insert multiple rows/columns" actually insert the number of selected, just not if the selection is non-contiguous. And good reason, Eike?

(Would have bet that this has been asked before multiple times)
Comment 5 Stéphane Guillou (stragu) 2023-11-27 15:19:08 UTC
(In reply to Heiko Tietze from comment #4)
> You can "insert multiple rows/columns" actually insert the number of
> selected, just not if the selection is non-contiguous.
Exactly, the ask is to do it at different positions at the same time. You can do that in MS Office.
> (Would have bet that this has been asked before multiple times)
Thought so too but could not find a ticket...
Comment 6 Eike Rathke 2023-11-28 13:13:21 UTC
(In reply to Heiko Tietze from comment #4)
> And good reason, Eike?
Well, it's not implemented. Inserting/deleting rows/columns needs references and a bunch of other things adjusted. Multiple non-contiguous selections would have to be treated as a list and each contiguous selection therein be processed individually.
Comment 7 Heiko Tietze 2023-11-28 13:15:44 UTC
Then let's do it. Nice topic for GSoC
Comment 8 Balázs Varga (allotropia) 2023-11-29 09:31:51 UTC
(In reply to Heiko Tietze from comment #7)
> Then let's do it. Nice topic for GSoC

Yeah, agree nice topic. :)

Btw already have a halfly done patch on my local branch related to this new feature: https://bugs.documentfoundation.org/show_bug.cgi?id=39936
Had no time to finish it, but also didn't want to push yet since it is not in that condition.

But as I see this topic is different and only related to inserting multiple columns/rows, before/after non-contiguous selections.
Comment 9 Stéphane Guillou (stragu) 2023-12-15 12:55:04 UTC
*** Bug 145996 has been marked as a duplicate of this bug. ***
Comment 10 Stéphane Guillou (stragu) 2023-12-15 13:00:49 UTC
*** Bug 141315 has been marked as a duplicate of this bug. ***