Bug 123102 - WRITER EDITING Issue with inserting a new row in a table with numbering in a vertically merged cell
Summary: WRITER EDITING Issue with inserting a new row in a table with numbering in a ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:7.0.0
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2019-02-01 10:18 UTC by NISZ LibreOffice Team
Modified: 2020-03-04 14:50 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The document saved as ODT. (13.35 KB, application/binary)
2019-02-01 10:19 UTC, NISZ LibreOffice Team
Details
The same document saved as DOCX. (16.94 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-01 10:19 UTC, NISZ LibreOffice Team
Details
A screenshot showcasing the document in the editor before it was saved. (30.21 KB, image/png)
2019-02-01 10:20 UTC, NISZ LibreOffice Team
Details
Table after split merged cell back (3.95 KB, image/png)
2019-02-03 08:51 UTC, Roman Kuznetsov
Details
Test compared OO LO MSO (30.21 KB, image/png)
2019-10-08 09:53 UTC, Timur
Details
Test compared OO LO MSO (99.92 KB, image/png)
2019-10-08 09:59 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-02-01 10:18:48 UTC
Description:
Issue with tables, vertically merged cells and numbering in LibreOffice Writer: Inserting a new row in a table with numbering in a vertically merged cell while the text cursor is in the merged cell causes the number of the next (and all subsequent) numbered list item to go up by one. See the steps below for additional details:

Steps to Reproduce:
    1. Create a new document in LibreOffice Writer and insert a table with 2 columns and 9 rows.
    2. Merge vertically 3-3 rows in the first column like this: 1-2-3, 4-5-6, and 7-8-9.
    3. Insert numbering in the 3 merged cells (1,2, 3).
    4. Move the text cursor to the first cell with the numbering and insert a new row in the table by right clicking on Table > Insert > Rows below

Actual Results:
The number in the cell below changes from 2 to 3, and all subsequent numbers grow by one.

Expected Results:
The numbering in the table shouldn't be affected by table row insertion.


Reproducible: Always


User Profile Reset: No



Additional Info:
Saving the file as ODT and reloading it reverts the numbers to their original values (1, 2, 3). Saving the file as DOCX and reloading it keeps the values we saw on the screen while editing the document (1, 3, 4). If the said DOCX is saved as ODT and reloaded again, the numbers revert to the original values (1, 2, 3).
Comment 1 NISZ LibreOffice Team 2019-02-01 10:19:15 UTC
Created attachment 148824 [details]
The document saved as ODT.
Comment 2 NISZ LibreOffice Team 2019-02-01 10:19:40 UTC
Created attachment 148825 [details]
The same document saved as DOCX.
Comment 3 NISZ LibreOffice Team 2019-02-01 10:20:04 UTC
Created attachment 148826 [details]
A screenshot showcasing the document in the editor before it was saved.
Comment 4 Roman Kuznetsov 2019-02-03 08:46:42 UTC
After your steps, if you split first merged cell to 4 rows proportionally, then you'll see number 2 in second row, as it should be in normal mode.

I'm not sure it's a bug.

Miklos, please take a look on this
Comment 5 Roman Kuznetsov 2019-02-03 08:51:20 UTC
Created attachment 148866 [details]
Table after split merged cell back
Comment 6 Xisco Faulí 2019-07-08 15:59:40 UTC Comment hidden (obsolete)
Comment 7 NISZ LibreOffice Team 2019-09-30 08:34:27 UTC
(In reply to Xisco Faulí from comment #6)
> (In reply to Roman Kuznetsov from comment #4)
> > After your steps, if you split first merged cell to 4 rows proportionally,
> > then you'll see number 2 in second row, as it should be in normal mode.
> > 
> > I'm not sure it's a bug.
> 
> @NISZ LibreOffice Team, do you agree with Roman's answer or you still think
> it's an issue ? Could you please check with other Office suites ?

It's an issue. We did not mention, but this started internally as a user reporting "Writer does not work the same as Word".

So Word works like this:

'Expected Results:
The numbering in the table shouldn't be affected by table row insertion.'

We (i.e. our users) would love to see the same happening in Writer.
Comment 8 Timur 2019-10-08 09:53:10 UTC
Created attachment 154823 [details]
Test compared OO LO MSO

(In reply to NISZ LibreOffice Team from comment #0)
> Steps to Reproduce:
>     3. Insert numbering in the 3 merged cells (1,2, 3).
In left column I don't get 1, 2, 3 but 1. 4. 7. And new row changes that to 1. 5. 8. 
If we add numbering in right column than (before new row) it's 2. 4. 6. 8. 10. 12. 14. 15. 16. And left numbers are also changed. 

And that shows wrong logic. Separate adding of numbering in columns should separately number columns so that we get 1. 2. 3. in left and 1. 2. 3. ....in the right column.
Bug looks justified to me. Repro already with OO. Anyway, I'll add UX here.
Comment 9 Timur 2019-10-08 09:59:44 UTC
Created attachment 154824 [details]
Test compared OO LO MSO
Comment 10 Heiko Tietze 2019-10-08 10:28:12 UTC
Obviously the table numbering is not taking the merged rows into account. And it is quite unclear how it works as splitting on top behaves differently as below where the numbers go up.

1 -
  -
  -
2 -
  -
4 -

I would treat this as a bug when the round-trip is broken. And my user expectation is that merged cells are counted as merged.
Comment 11 Commit Notification 2020-02-26 15:54:46 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3a69e1a6b8eab79c55b6e8f3edd2ee2da45b39c0

tdf#123102 Writer: fix numbering at row insertion

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Roman Kuznetsov 2020-02-28 19:56:13 UTC
László's patch fixed problem from Description, but didn't add "Numbering should be separate for table columns" as wrote in Summary.

László will you plan realize a separate numbering for Writer table columns?
Comment 13 Timur 2020-03-03 15:47:18 UTC
Verified for original test attachment 148824 [details] with, I guess this is the step:
>     3. Insert numbering in the 3 merged cells (1, 2, 3) cell by cell.

As Roman noticed, not OK for additional test:
>     3. Insert numbering in the 3 merged cells (1, 2, 3) for all 3 cells at once.
Because we get 1., 4., 7. and new row changes that to 1., 5., 8. 
While those numbers don't make sense and it's another bug, numbering shouldn't change. 

Also NOK for reverse bug 100643, that's about horizontal split (I thought that was a duplicate). 

László, can you please check those 2 examples and comment.