Bug 147943 - MASTER DOCUMENT: Allow to customize numbering formats of subdocuments when creating Master Document with File -> Send
Summary: MASTER DOCUMENT: Allow to customize numbering formats of subdocuments when cr...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks: Writer-Master-Doc
  Show dependency treegraph
 
Reported: 2022-03-12 18:28 UTC by L Duperval
Modified: 2022-04-14 12:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample output from a document (130.15 KB, application/x-zip-compressed)
2022-03-25 14:33 UTC, L Duperval
Details
Example file mybook.odt (22.37 KB, application/vnd.oasis.opendocument.text)
2022-04-01 10:34 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description L Duperval 2022-03-12 18:28:44 UTC
I would like the ability to specify the numbering format when using "Send Master Document." 

For example, I typically number my chapters like this:

00-something
01-something
02-something
.
.

Which makes it easier to sort in a file manager (especially when there are more than 10 documents generated). Not everyone wants this format, so the ability to configure the output (using printf-like options) would be nice.
Comment 1 Dieter 2022-03-25 06:20:25 UTC
Just for clarification:
You have a master document with some subdocuments (00-something | 01-something | 02-something) and you want to send it. If the recipient opens master document he should have subdocuments "Document A", "Document B", "Document C". Correct?

=> NEEDINFO
Comment 2 L Duperval 2022-03-25 14:32:50 UTC
No, not quite.

The "Send to Master Document" process works like this:

You have a document with 20 "Heading 1" paragraphs in it.

Choose "File > Send > Create Master Document"

A window opens, asking you to give a name to your master document. So, let's say I call it "mybook.odm"

Then Writer will create files called

mybook.odm
mybook1.odt
mybook2.odt
mybook3.odt
.
.
.
mybook10.odt
mybook11.odt
..
.


What I'm asking is for the ability to have some control over the naming of the files, without needing to do them by hand after the fact.

In my case, it would be:

mybook.odm
mybook-01.odt
mybook-02.odt
.
.
.
mybook-10.odt
mybook-11.odt
.
.
.

I'm attaching a file so you can test out the process.

P.S. this particular file also caused problems witht eh Master document creation process. Although all the ODT files were created, they did not appear in the structure. I had to add them by hand.
Comment 3 L Duperval 2022-03-25 14:33:29 UTC
Created attachment 179104 [details]
Sample output from a document
Comment 4 L Duperval 2022-03-25 14:36:02 UTC
In the attached zip file, there is:

mybook.odm with mybook<X>.odt. Those are the generated files.

mybook.odt (without a number) contains a single file that can be used to run the process again (it will create about 20 subdocuments and a master document).
Comment 5 QA Administrators 2022-03-26 03:36:04 UTC Comment hidden (obsolete)
Comment 6 Dieter 2022-04-01 10:34:34 UTC
Created attachment 179251 [details]
Example file mybook.odt

Thank you for clarification. Let's ask design-team for further input and decision.

Steps to reproduce
1. Open attachment
2. File -> Send -> Create Master Document

Actual result:
Impossible to customize numbering of subdocuments.

Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: zh-CN (de_DE); UI: en-GB
Calc: CL

cc: Design-Team
Comment 7 Heiko Tietze 2022-04-04 07:54:08 UTC
What might be easy to realize is a list of fix options like

Pick the naming schema: [filename1] + filename-01, 01-filename, 001-filename etc.

But I wonder if other format than <%d><spacing><%filename> would be useful. In other words what is the benefit for mybook1.odt over 01-mybook.odt? I'd rather discuss whether the spacing has to be a hyphen or an underscore and if a single number is sufficient (we could use digits depending on the number of chapters).
Comment 8 Heiko Tietze 2022-04-14 12:07:32 UTC
Topic was on the agenda for the design meeting but didn't receive further input. Let's change the default to have at least two digits at the beginning followed by an underscore.

Code pointer: sw/source/uibase/app/docsh2.cxx #1030 (SwDocShell::Execute() case FN_NEW_GLOBAL_DOC)