Bug 155263

Summary: Need a increasing-by-appearance sequence field with an initial value property
Product: LibreOffice Reporter: Eyal Rozenberg <eyalroz1>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: enhancement CC: miguelangelrv
Priority: medium    
Version: 7.6.0.0 alpha1+   
Hardware: All   
OS: All   
URL: https://ask.libreoffice.org/t/lo-writer-equivalent-of-ms-word-seq-field/91411/
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 129294    
Attachments: An MS Word document exemplifying SEQ field behavior

Description Eyal Rozenberg 2023-05-12 14:37:52 UTC
A user should be able to insert a field with the following features:

* The first displayed value can be chose arbitrarily by the user when defining the field
* Additional copies of the field (i.e. which you would get by copy-pasting) cover consecutive elements of the sequence

You can't quite get that right now. 

* There is "Number Range" - where you can either have it auto-increment, or set the initial value, but for both to happen you need different field properties - and initial setter followed by non-setters.

* There is "Set Variable", which you could make auto-increment, i.e. my_var = my_var + 1 - but this has basically the same problem; if you want an initial value other than 1, you need to different fields.

Starting numbering in values other than 1 (or the first element of the sequence) is obviously necessary. we already offer that feature when numbering paragraphs. It should also be available directly and conveniently for fields.

As for _how_ to offer this feature - that's more of a bike-shed question. My personal suggestion would be offering a range-start property (as opposed to the value property) for Number Ranges; and perhaps even support this indirectly elsewhere.
Comment 1 m_a_riosv 2023-05-12 16:19:38 UTC
Please, can you attach a word sample file with that field.
Comment 2 Eyal Rozenberg 2023-10-02 20:05:10 UTC
Created attachment 189962 [details]
An MS Word document exemplifying SEQ field behavior

So, I can't show _exactly_ what I've asked for in MS-Word, but almost that.

In the attached document, the same field with the same identifier is used multiple times. But - the first time has a different switch to set the count to its initial value. So it's not literally copying the exact same field, but it's almost the same: SEQ foo \r 123 vs SEQ foo \n .
Comment 3 QA Administrators 2023-10-03 03:16:43 UTC Comment hidden (obsolete)