Bug 158728 - Feature Request: Add a facility to create a `ott’ template that includes ALL the “default” style definitions;
Summary: Feature Request: Add a facility to create a `ott’ template that includes ALL ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-16 06:45 UTC by Jambunathan K
Modified: 2023-12-17 16:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
vanilla-odt-styles.zip: Contains ODT, and PDF file of Vanilla styles and a LO Basic Script used to generate these files (360.95 KB, application/zip)
2023-12-16 06:45 UTC, Jambunathan K
Details
vanilla-odt-styles.pdf (1.01 MB, application/pdf)
2023-12-16 06:47 UTC, Jambunathan K
Details
vanilla-odt-styles.odt (60.46 KB, application/vnd.oasis.opendocument.text)
2023-12-16 06:49 UTC, Jambunathan K
Details
CreateODTFileWithAllFactoryStyles.bas (15.14 KB, text/plain)
2023-12-16 06:52 UTC, Jambunathan K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2023-12-16 06:45:20 UTC
Created attachment 191452 [details]
vanilla-odt-styles.zip:  Contains ODT, and PDF file of Vanilla styles and a LO Basic Script used to generate these files

Feature Request: Create a `ott’ template that includes ALL the “default” style definitions used by a LO installation; 

(By “default” styles, I mean ALL the “factory styles” that ship with a LibreOffice install)


This feature request  is based on  my original question [How do I create a `ott’ template that includes “default” style definitions; by “default” styles, I mean ALL the “factory styles” that ship with a LibreOffice install](https://ask.libreoffice.org/t/how-do-i-create-a-ott-template-that-includes-default-style-definitions-by-default-styles-i-mean-all-the-factory-styles-that-ship-with-a-libreoffice-install/96312), and the solution I came up with [CreateODTFileWithAllFactoryStyles](https://ask.libreoffice.org/t/how-do-i-create-a-ott-template-that-includes-default-style-definitions-by-default-styles-i-mean-all-the-factory-styles-that-ship-with-a-libreoffice-install/96312/18?u=mxnotts)

Mike Kaganski mentions that there is no built in way of creating a `OTT` template out of the `Vanilla` style definitions. See https://ask.libreoffice.org/t/how-do-i-create-a-ott-template-that-includes-default-style-definitions-by-default-styles-i-mean-all-the-factory-styles-that-ship-with-a-libreoffice-install/96312/2?u=mxnotts
Comment 1 Jambunathan K 2023-12-16 06:47:51 UTC
Created attachment 191453 [details]
vanilla-odt-styles.pdf

vanilla-odt-styles.pdf:  Verbatim copy of the file of same name in `vanilla-odt-styles.zip`.
Comment 2 Jambunathan K 2023-12-16 06:49:28 UTC
Created attachment 191454 [details]
vanilla-odt-styles.odt

vanilla-odt-styles.odt:  Verbatim copy of file of same name included in `vanilla-odt-styles.zip`
Comment 3 Jambunathan K 2023-12-16 06:52:23 UTC
Created attachment 191455 [details]
CreateODTFileWithAllFactoryStyles.bas

CreateODTFileWithAllFactoryStyles.bas:  Verbatim copy of file of same name included in `vanilla-odt-styles.zip`.  (The basic script *works* in *safe mode* ... If it fails on your end, then there may be very trivial tweaks you may have to do ... Btw, the inline comments may in `Basic` file may or may not match with what the code does.  So, take the inline comments seriously ...)
Comment 4 Jambunathan K 2023-12-16 07:13:32 UTC
 
> This feature request  is based on  my original question [How do I create a
> `ott’ template that includes “default” style definitions; by “default”
> styles, I mean ALL the “factory styles” that ship with a LibreOffice
> install](https://ask.libreoffice.org/t/how-do-i-create-a-ott-template-that-
> includes-default-style-definitions-by-default-styles-i-mean-all-the-factory-
> styles-that-ship-with-a-libreoffice-install/96312), and the solution I came
> up with
> [CreateODTFileWithAllFactoryStyles](https://ask.libreoffice.org/t/how-do-i-
> create-a-ott-template-that-includes-default-style-definitions-by-default-
> styles-i-mean-all-the-factory-styles-that-ship-with-a-libreoffice-install/
> 96312/18?u=mxnotts)

... Of course, LibreOffice should provide a means for creating this `odt` or `ott` file.

My `basic` script is an amateurish attempt at creating just this utility. The version of `CreateODTFileWithAllFactoryStyles.bas` is based on https://github.com/kjambunathan/org-mode-ox-odt/blob/eaef4ea87d671fbf601ba3f3aa6784931eccd59f/contrib/odt/LibreOffice/src/OrgModeUtilities.bas#L287.  If there are any future revisions, it may be accessed at my gitbub repo.
Comment 5 Mike Kaganski 2023-12-16 07:36:09 UTC
(In reply to Jambunathan K from comment #4)
> ... Of course, LibreOffice should provide a means for creating this `odt` or
> `ott` file.

Based on how much demand is this "of course"? WONTFIX IMO. No real use case, other than for a single person in the universe.
Comment 6 Jambunathan K 2023-12-16 08:57:41 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Jambunathan K from comment #4)
> > ... Of course, LibreOffice should provide a means for creating this `odt` or
> > `ott` file.
> 
> Based on how much demand is this "of course"? WONTFIX IMO. No real use case,
> other than for a single person in the universe


The comment makes an assumption that each style is unto its own and need not be harmonized with other styles. 

Here is a rhetorical question ...

    How would LO team (or a user such as me) ensure that the default styles are co-ordinated?

    If there is no means to inspect "default styles" of LO, why provide "default stlyes" at all?

----

For example, indentation level of 'Text Body' has to be co-ordinated with "Indentation level" of where the List Bullets occur. 

 Not only the indentation levels, but the trailing whitespace following a paragraph should also need to be co-ordinated.   The fact that list styles like `List 1`, `List 1 Cont`, `List 1 End` and `List Start` etc exists points to why the trailing whitespace needs to be "rhythmic".


Btw, the comment makes an implicit statement that 

- LO team has no QA utilities to verify that default styles "gel" with one another.  (If there is no utility to get   a "bird's eye view" of all styles in action--which is exactly what this bug proposes--how does LO team ensure that the default styles are satisfactory)

The comment also make an assumption that 

- the "Style  designer" has no role in LO ecosystem, and that he has NO RIGHT TO inspect, adopt, or critique the  default LO styles.

This bug is best reviewed not by a developer, but a product manager or someone who routinely creates / reviews document styles, and has responsibility to ensure that the styles go along together.
Comment 7 Jambunathan K 2023-12-16 09:12:42 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Jambunathan K from comment #4)
> > ... Of course, LibreOffice should provide a means for creating this `odt` or
> > `ott` file.
> 
> Based on how much demand is this "of course"? WONTFIX IMO. No real use case,
> other than for a single person in the universe.

This bug report has recipe for how such a template file may be created. 

I would rather like to see a critique of my basic script---it is possible that it doesn't work in non-English locales---rather than a "off the cuff" remark that gives an impression to the casual onlooker / reader that this bug has nothing to do with LO but everything to do with "me" and "my personal situation".

As I have mentioned in the  previous comment, there is nothing about this bug which is "PURELY a personal situation" that is NOT shared by anyone else ...

LO's "vanilla" style designers would find such a utility very helpful, and the LO product managers, I believe, would be happy to have the "vanilla styles" QA-ed and vetted in a easy way.
Comment 8 Mike Kaganski 2023-12-16 11:49:42 UTC
(In reply to Jambunathan K from comment #6)
> > Based on how much demand is this "of course"? WONTFIX IMO. No real use case,
> > other than for a single person in the universe
> 
> The comment makes an assumption that each style is unto its own and need not
> be harmonized with other styles. 

No. But your comment makes an assumption that your ptoposal is the only way to "harmonize" - whatever you put into this word.

>     How would LO team (or a user such as me) ensure that the default styles
> are co-ordinated?

"co-ordinated" is another word that you use without definition.

>     If there is no means to inspect "default styles" of LO, why provide
> "default stlyes" at all?

One way to inspect default styles is using UI to see the styles' definition.

> For example, indentation level of 'Text Body' has to be co-ordinated with
> "Indentation level" of where the List Bullets occur.
> 
>  Not only the indentation levels, but the trailing whitespace following a
> paragraph should also need to be co-ordinated.   The fact that list styles
> like `List 1`, `List 1 Cont`, `List 1 End` and `List Start` etc exists
> points to why the trailing whitespace needs to be "rhythmic".

Using UI is OK for this one-time job.
Comment 9 Jambunathan K 2023-12-16 12:02:27 UTC
> >  Not only the indentation levels, but the trailing whitespace following a
> > paragraph should also need to be co-ordinated.   The fact that list styles
> > like `List 1`, `List 1 Cont`, `List 1 End` and `List Start` etc exists
> > points to why the trailing whitespace needs to be "rhythmic".
> 
> Using UI is OK for this one-time job.

I beg to differ.

I want the bug reviewed / refereed by someone else.
Comment 10 m_a_riosv 2023-12-16 16:23:22 UTC
It's no easy to understand what you want.

From one default style, you can derive whatever styles you want, even in cascade.
Styles inherit, from their parent style, any attribute not modified in the style itself.
Comment 11 Jambunathan K 2023-12-17 01:23:10 UTC
(In reply to m.a.riosv from comment #10)
> It's no easy to understand what you want.

I have already provided what I want, and I have also provided how one may produce what I want.  See the `odt` and `pdf` files, and also the `.bas` script attached with the bug.

I want LO to provide a mechanism whereby one can see all the factory styles provided by LibreOffice (in `Safe Mode`) and its effects when applied to text. 

Just open ` vanilla-odt-styles.odt `  (https://bugs.documentfoundation.org/attachment.cgi?id=191454), and you will see what I mean.

I believe having such a template file, will help style/template designers and consumers to get a bird's eye of the various styles in play.
Comment 12 m_a_riosv 2023-12-17 16:12:42 UTC
Why not add your script as extension to the https://extensions.libreoffice.org/ so it serves to everyone to create it for their own designs on the styles.