ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.91k stars 1.1k forks source link

Numbering sequence is ignored (not preserved) in numbered headings #2369

Open HectorB-2020 opened 2 years ago

HectorB-2020 commented 2 years ago

This issue is unique.

Operating System

Windows 10 / 8.1 / 7

Version information

7.2.1.36

Expected Behavior

The numbering is expected to be consequential: if the previous heading is 3, the next one will be inserted as 4, not as 1.

Actual Behavior

It takes the first number of the same style (list level) found somewhere above in the beginning of the document.

Reproduction Steps

Let's create a sample document with the following text. See its picture below. Pay attention we have nested numbering of headings, underlined by orange.

Sample Text ### 1. What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. #### 1.1. Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. #### 1.2. Where does it come from? Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. ### 2. Where can I get some? There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. #### 2.1. The standard Lorem Ipsum passage "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. #### 2.2. de Finibus Bonorum et Malorum Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. ### 3. translation by H. Rackham "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system." #### 3.1. de Finibus Bonorum et Malorum "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. #### 3.2. translation by H. Rackham "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment
OO-NumberedHeading1

Now I'm selecting item 2.1 and copying it to clipboard

OO-NumberedHeading2

I'm intending to place it right after item 3 but before item 3.1 like on the picture below.

OO-NumberedHeading3

Now please witness the numbering it got: 1.1. I'd rather expect to see 3.1. Instead it took 1.1 like the first numbering of the same style in the beginning of the document. If I had a document with numbers like 4.2.2.3, it would create a number 1.1.1.1 upon inserting a heading under similar circumstances.

OO-NumberedHeading4

Additional information

No response

Rita-Bubnova commented 1 year ago

@HectorB-2020 Sorry for the long wait. DesktopEditors v7.4.1 is released. Is this issue relevant?

TatianaKirillova commented 1 year ago

Hello, @HectorB-2020 Thanks for your request! I can confirm that the problem exists. I can confirm - this is know bug, issue #40714 with your issue

To avoid this error use Ctrl key to wrap text instead of copying Problem reproduces in Document Server

Rita-Bubnova commented 1 year ago

Moving this issue to DocumentServer, because it is our main repository.

HectorB-2020 commented 1 year ago

@Rita-Bubnova & @TatianaKirillova, I regret to inform that this issue is still observed in v7.5.0.127.

ebricca commented 11 months ago

hope it is proper here - issue seems similar / related to the same cause 0 index chapter numbering does neither work - it reverts to 1 based numbering .. ( one can just start at 1 and put the other as unnumbered with text but it is a workaround )

numbering-test-0-plain.docx numbering-test-1-reset.docx numbering-test-2-workaround.docx

(created new issue https://github.com/ONLYOFFICE/DocumentServer/issues/2508 from this)

TatianaKirillova commented 11 months ago

@ebricca Thanks for reaching out! This is still another problem. Please create a new issue with the problem of numbering recalculation!