Bug 131347 - "Load styles" should not import content
Summary: "Load styles" should not import content
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Styles-Load
  Show dependency treegraph
 
Reported: 2020-03-15 07:48 UTC by Ulrich Gemkow
Modified: 2020-03-18 20:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Destination document (8.66 KB, application/vnd.oasis.opendocument.text)
2020-03-15 07:48 UTC, Ulrich Gemkow
Details
Source document (8.52 KB, application/vnd.oasis.opendocument.text)
2020-03-15 07:48 UTC, Ulrich Gemkow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Gemkow 2020-03-15 07:48:15 UTC
Created attachment 158687 [details]
Destination document

The (very useful) command Styles -> "Load styles" not only loads styles but also changes the text (at least) of the header in the destination document.

To reproduce

- Open the attached DestDoc

- Select Styles -> Load styles and there "From file"

- Select the attached SourceDoc

- Select in the dialog "Frame" and "Overwrite"

When executing this the header text (and not only the style) in the destination document changes to that in the source document.

This behavior makes using a "style master document" from which styles are imported in different other documents (to ensure a common look) impossible.

--

Version: 6.4.1.2
Build ID: 1:6.4.1~rc2-0ubuntu0.18.04.1
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: kf5; 
Locale: de-DE (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Ulrich Gemkow 2020-03-15 07:48:59 UTC
Created attachment 158688 [details]
Source document
Comment 2 Heiko Tietze 2020-03-17 08:46:27 UTC
I have to check some other options, which is unclear to me what exactly overrides the header content and not only the style (both are possible). Besides the unclear situation, isn't override obvious? 

More generally we have to answer how "Load Style" is related to "Load Template". See also bug 130719.
Comment 3 Mike Kaganski 2020-03-17 09:01:58 UTC
Headers/footers (including their text) is *not* document content; it's part of the definition of page style: it describes how a newly created page looks like. This is NOTABUG.
Comment 4 Heiko Tietze 2020-03-17 09:08:43 UTC
(In reply to Mike Kaganski from comment #3)
> Headers/footers (including their text) is *not* document content; it's part
> of the definition of page style: it describes how a newly created page looks
> like. This is NOTABUG.

"Load style" at Style/Formatting changes the document content. That's at least unexpected and I wouldn't come to the NAB verdict so quickly.
Comment 5 Mike Kaganski 2020-03-17 09:11:57 UTC
(In reply to Heiko Tietze from comment #4)
> "Load style" at Style/Formatting changes the document content. That's at
> least unexpected and I wouldn't come to the NAB verdict so quickly.

Which "document content" - except for styles (which includes headers and footers)?
Comment 6 Ulrich Gemkow 2020-03-18 20:07:34 UTC
My starting point for separating style and content would be the (my) goal behind styles and importing styles:

To allow central managed style templates which may be imported in different (maybe existing) documents to allow for an consistent look of all documents importing the style.

Then "style" is all what is common to all documents regarding their look and content is what is specific to each document.

Examples from my point of view

- When a header contains a page number field, this is style

- When a header contains "typed in text" (i.e. a documents title) this is content

Not importing "typed in text" from a header is also consistent with importing styles from the text part of a document - only the style and not text from a paragraph is imported.

So is see this as a bug and a barrier for the way toward style based document management.
Comment 7 Mike Kaganski 2020-03-18 20:21:17 UTC
(In reply to Ulrich Gemkow from comment #6)

No matter if you typed "text" or "field" into the header (or both, like text "page " followed by field PAGE NUMBER followed by text " of " followed by field PAGE COUNT). Headers'/footer's content is part of the style by definition.