Bug 108907 - conditional paragraph style does not work with outline level
Summary: conditional paragraph style does not work with outline level
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
Keywords: filter:fodt, filter:odt
Depends on:
Blocks: ODF-import
  Show dependency treegraph
Reported: 2017-07-02 18:38 UTC by Regina Henschel
Modified: 2018-09-16 22:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Conditional paragraph style (13.40 KB, application/vnd.oasis.opendocument.text)
2017-07-02 18:38 UTC, Regina Henschel
Screenshot of file rendered by WebODF (46.47 KB, image/png)
2017-07-02 18:42 UTC, Regina Henschel

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-07-02 18:38:48 UTC
Created attachment 134434 [details]
Conditional paragraph style

If a paragraph style is a conditional style and has "outline level" as condition, then the <text:h> element to which it is assigned, should get a text:cond-style-name attribute. LibreOffice does not write this attribute.

If LibreOffice opens a file, which uses conditional style, the condition is not evaluated. Worse, the <text:h> element contains the text:cond-style-name attribute for those applications, which can evaluate the condition, and the text:style-name attribute, which contains the style name of the last evaluation, for those applications, which cannot evaluate the condition. But LibreOffice takes the style name reference of the text:cond-style-name without evaluating the condition and therefore uses a wrong style for the headings.
Resaving such document looses the text:cond-style-name attribute.

The relevant part in the specification is section 19.776 text:cond-style-name.
Comment 1 Regina Henschel 2017-07-02 18:42:42 UTC
Created attachment 134435 [details]
Screenshot of file rendered by WebODF

The WebODF plugin renders the headings correctly.
Comment 2 Buovjaga 2017-07-06 11:38:21 UTC

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-

Arch Linux 64-bit, KDE Plasma 5
Build ID: 9eed346b0b745f0598eefc572c789d58353b5e31
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on July 5th 2017
Comment 3 QA Administrators 2018-09-16 02:49:09 UTC Comment hidden (obsolete)
Comment 4 Regina Henschel 2018-09-16 22:08:11 UTC
The error still exists in Version: (x64)
Build ID: efe119aaa50e9f532b3fac1ef153469c80f24b80
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-10_01:36:26
Locale: de-DE (en_US); Calc: CL