[Libreoffice-bugs] [Bug 130719] Overwriting Writer styles does not overwrite changes to Marginalia paragraph style

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 9 06:14:06 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=130719

--- Comment #31 from Mike Kaganski <mikekaganski at hotmail.com> ---
(In reply to sdc.blanco from comment #30)
> @Mike, is it as simple as this:
> 
>    Only styles that were applied or modified are loaded.  
> 
>    This principle applies both to documents and templates, 
> 
> If this is correct, then please ignore previous message (comment 29).

This is formally correct, *if* you (a user reading the help article) realizes
what "modified" means - specifically, modified relative to what (and here those
built-in defaults come into play). Because otherwise what "modified" might mean
for a "standard" (= shipped with application) templates? They are "unmodified",
aren't they? they are considered the starting point, so what "modified" has to
do with those?...

The "global application default" concept is itself something not very
well-defined. There's nothing in *ODF* standard that tells about what, say,
"Heading 2" looks like by default in text documents. So LibreOffice has some
arbitrary defaults built-in, which may accidentally differ from the defaults in
OOo or other implementations...

The user-visible behaviour is like this:

Opening any document, LibreOffice loads all styles defined in the document.
They are listed in style manager. Every such style contains maybe hundreds of
simple properties, but ~no document ever includes all those simple property
defined in any single style.

So let's say, we have two paragraph styles defined in a document (for
simplicity), "Default" and "Heading 1". The "Default" is the root of the style
hierarchy; in this document, it has just two properties defined: font face and
font size. "Heading 1" in this document inherits from "Default", and has only
two properties defined: font size and paragraph alignment. But both styles have
many other properties, like line spacing, borders, etc. Every property not
defined in "Heading 1" is taken from "Default"; any property not defined in
"Default" it taken from some hard-coded global program default. Here we meet
the program defaults for the first time. This time, to complicate things, the
defaults are format-specific: e.g., for styles loaded from ODT, they will have
values different from defaults for a DOCX. And if it happens that a future
version of the program has different defaults, then the document may appear
different (which would be a regression, so for a changed default, we usually
introduce a compatibility option, but not always - e.g., László had not
introduced one for page backgrounds that fill the whole page opposed to older
behavior filling only area inside page margins).

But after loading all the styles from the document, LibreOffice does the next
step: it adds some pre-defined style names to the list. Those are styles like
"Text Body", "Heading 2", etc. which are *absent* in the loaded document, but
hard-coded in the program. They are listed in the style list, but they are
initially only there, not in the actual document. It would be nice if they be
marked somehow - say, "greyed out", as "possible to insert into this document",
to highlight that they are not yet there ... but ATM there's no such highlight.
Unless you do something with those "not yet existing" styles (and you don't
know which in list are those), they will also not get into the file on disk
when you press "save" ... so they are just something in the style list, neither
read from file nor written back. They have their respective settings - and
those settings are also taken from the built-in program defaults defined for
each of those styles separately. *If* you open such style and modify anything,
it will become modified *respective to those internal program defaults*, and
then it will become part of the document. Or yo may not modify it, and instead
just apply the style to anything in the document (e.g. to a paragraph). Then
the style also gets into the file on save.

I don't know how to describe this to a user in unambiguous and not too
technical way; and there's definitely a UX problem with absence of user-visible
indication which of the styles in the list are part of the document, and which
are just added by the program; which settings of a style are defined in the
file, and which are taken from the program defaults ...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201109/58d100cc/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list