Issue 124859 - Wrong number of columns/rows inserted into Table
Summary: Wrong number of columns/rows inserted into Table
Status: UNCONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows 7
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 05:58 UTC by Rainer Bielefeld
Modified: 2019-05-04 08:23 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample Document with instructions (25.90 KB, application/vnd.oasis.opendocument.text)
2014-05-09 05:58 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2014-05-09 05:58:21 UTC
Created attachment 83364 [details]
Sample Document with instructions

Reproducible with "AOO 4.1.0 Release – German UI / German locale [AOO410m18(Build:9764)  -   Rev. 1589052 2014-04-22 11:43:54]" on German WIN7 Home Premium (64bit)", “historic” 4. User Profile used for all predecessor versions

This one is a spin off from Issue 82815 - Insert column resizes all columns in the table instead of selected .

Step By Step
------------
Following tests will be for Columns, results for tests with Rows would show similar results (except row height). As preparation it might be necessary to add Icons 'Insert Row' and 'Insert olumn' to a toolbar
1. Test 1: Click B2 → Click 'Insert Column (icon)'
   > as expected a column will be inserted behind column B

   → 'Undo' for new test

   Test 1.1: Click B2 → Menu 'Table → Insert → Column' (leave 'Position = 
   after')
   > Number of columns due to value in Spin box will be inserted
   That all as expected

2. Test 2: Select columns A:B → Click 'Insert Column (icon)'
   > Unexpectedly only 1 column will be inserted. Unexpected because in 
     Calc the click on the Icon would insert number of columns as 
     number of columns what have been selected. 
     An indication that something has gone wrong here is that the 
     new column has the width of 2 old columns, looks as if the plan 
     might have been to insert 2 columns. 
     And indeed, until OOo 2 this action would have inserted 
     2 columns

     → 'Undo' for new test

   Test 2.1: select columns A:B → Menu 'Table → Insert → Column → 2 Coluns' 
   (leave 'Position = after')
    > Number of columns due to value in Spin box will be inserted, not  
      Number of columns due to value in Spin box multiplied with number of 
      selected columns.
      An indication that something has gone wrong here is that the 2 new 
      columns have the width of 4 old columns, looks as if the plan 
      might have been to insert 4 columns. 
      And indeed, until OOo 2 this action would have inserted 4 columns

Additional Info:
-----------------
(a) Still the same in LibO 4.1
(b) I will submit a separate issue for the rare and misleading Help
Comment 1 Rainer Bielefeld 2014-05-18 11:27:42 UTC
WONTFIX by infra team
Comment 2 Rainer Bielefeld 2014-05-18 14:20:01 UTC
oops, wrong issue
Comment 3 Rainer Bielefeld 2014-05-19 15:28:12 UTC
(c) Already broken in OOo 3.1.1
(d) Was still ok with OOo 2.0.2
Comment 4 Rainer Bielefeld 2014-05-19 15:38:42 UTC
I submitted "Issue 124933 - Incomplete Help for "Table - Insert Row/Column"" for Help amendment.
Comment 5 mkintsch 2016-09-29 17:47:09 UTC
Was able to successfully recreate the bug by following the steps in Test 2 and Test 2.1

After inserting an unexpected number of columns, the same number of columns that were originally selected are now selected, only the selected columns are now the left-most of the inserted columns.

Snapshot Build 4.2.1 Win x86 en-US, running on Windows 10 (Anniversary Update), Surface Pro 2.
Comment 6 Monika 2016-10-23 19:22:12 UTC
Windows  8 (No any SP). 
OpenOffice v4.1.3. 
AOO413m1(Build:9783)  -  Rev. 1761381
2016-09-29 02:39:19

Feedback based upon reproduction of previous tests in Writer (and Calc):
As a preconditions for tests:
Step 1. Install latest version of the OO. 
Step 2. Open Writer and Calc. In each - create a table (5 columns 3 rows) and insert values into the cells, as follow:
A1		C1	D1	E1
	B2			
				


Test 1. via Icon: Select cell B2 and Click 'Insert Column (icon)'
Result: added column as expected.

Test 1.1: via Menu:
 Select cell B2 → Select Menu 'Table \ Insert \ Column'. (leave default option: 'Position = after')
Result:
 Number of inserted columns is based upon Spin box. (Checked with 1-3 new columns variations). Result as expected.

Test 2: via Icon: Select 2 columns A:B and Click 'Insert Column (icon)'
Result: Writer adds 1 column (on the right side). Calc adds 2 columns (on the left side of the selected cell). 
Width of the columns in Calc was replecated for both selected columns (as in selected columns). 
In Writer - there is only one column added, but the width of it is equal to a cumulated width of A+B columns. 
(And I suspect that there might be an error in the code. Width is OK. Number of added columns – only 1 instead of number of selected columns ).

Test 2.1: via Menu: select columns A:B → Menu 'Table \ Insert \ Column \ 2 Columns' (leave default option 'Position = after')
Result: 
In the Writer: Number of inserted columns is based upon value in the "Spin box"; not based upon value in the "Spin box" multiplied with number of selected columns.  
Here I'm not sure if it's OK.
In the Calc: Number of inserted columns depends upon number of selected columns. Alike: 2 selected - 2 inserted. In writer – based upon number (If 2 then 2 inserted. And not 4.)


In summary:
Test 1 – OK. 
Test 1.1. - OK.
Test 2 - not OK. Writer seems to have an issue here. See details above.
Test 2.1 - not sure, if it's a desireable outcome.

Extra: Unexpected result for default place for the added column. Calc by default adds from left side of the selected column. Writer - from the right side.  Such an consistency.
Comment 7 Benjamin Wang 2019-05-04 08:23:30 UTC
I successfully replicated the issue with nightly build Apache_OpenOffice_4.5.0_Win_x86 _install_ en-US_1858512.exe.
  
When I ran test 2 in OpenOffice Writer, I got only one column inserted after selecting three columns and clicking the button “Insert Columns”, while the width of the inserted column is of the three selected columns. But when I ran test 2 in MicroSoft Office Word, I got exactly the same number of columns inserted as the number of columns selected.