Bug 94345 - Navigator includes rogue outline section, leaking from header applied in page/style master-styles (in specific flat ODF)
Summary: Navigator includes rogue outline section, leaking from header applied in page...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-18 17:55 UTC by Iandol
Modified: 2017-08-30 19:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (29.76 KB, image/png)
2015-09-18 17:55 UTC, Iandol
Details
Test FODT document (40.30 KB, application/vnd.oasis.opendocument.text-flat-xml)
2015-09-18 17:56 UTC, Iandol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iandol 2015-09-18 17:55:22 UTC
Created attachment 118834 [details]
screenshot

Hi, in the attached FODT you'll find a very simple document with a single [Test] Heading 1, however if you open Navigator pane, or export to PDF, you'll see a rogue [Bibliography] heading which is not present in the document at all.

In fact it is a <text:h> element in the page styles for the endnote page, a heading in the header, see the following on line 404-408 of the FODT:

  <style:master-page style:name="Endnote" style:page-layout-name="pm2">
   <style:header>
    <text:h text:style-name="Heading_20_2" text:outline-level="2">Bibliography</text:h>
   </style:header>
  </style:master-page>

Navigator should not be scanning headings that are only present in page styles and should not show that heading as present. 

An additional bug is that if you do make an endnote in that document, [Bibliography] is always shown ABOVE [Test], even when it is BELOW it in the actual document.

Screenshot shows the document and rogue heading.
Comment 1 Iandol 2015-09-18 17:56:26 UTC
Created attachment 118835 [details]
Test FODT document

test document
Comment 2 Cor Nouws 2015-09-18 21:35:58 UTC
Thanks Iandol.

I can confirm the behaviour. Already in LibreOffice 3.3.0.

May I ask you why a heading could be needed in the header of a page?

Cheers  - Cor
Comment 3 QA Administrators 2016-09-20 10:32:38 UTC Comment hidden (obsolete)
Comment 4 Iandol 2017-01-05 02:40:47 UTC
Bug persists in 5.3beta1 on macOS.

Version: 5.3.0.1
Build ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9
CPU Threads: 4; OS Version: Mac OS X 10.12.2; UI Render: GL; Layout Engine: new; 
Locale: en-GB (en_GB.UTF-8); Calc: group

Cor, sorry for the very late reply! This style markup is used by Multimarkdown <http://fletcherpenney.net/multimarkdown/> output to generate a header when applying a style. Perhaps it isn't part of the ODT spec, not sure.
Comment 5 Cor Nouws 2017-01-06 15:41:29 UTC
(In reply to Iandol from comment #4)

> Cor, sorry for the very late reply! This style markup is used by
> Multimarkdown <http://fletcherpenney.net/multimarkdown/> output to generate
> a header when applying a style. Perhaps it isn't part of the ODT spec, not
> sure.

Create a new doc in Writer
Insert header and apply Bibliography heading to the paragraph
Look in Navigator.. > no header for this.

So it looks as a specific case, that is not really a LibreOffice bug?
Comment 6 Iandol 2017-01-07 07:49:00 UTC
Cor, my intuition is that LO shouldn't include elements that are outside of the main document in the navigation (they are *impossible* to navigate to!) The <text:h> element is not a child of the main document so why should it  be included in the document navigation? 

Now perhaps ODT doesn't officially allow <text> elements within a <style> block although it currently does work fine (when you apply this style the Heading gets made in the document). 

Just to be clear:

<document>
<style><text:h></style>

<body>
document text
</body>
</document>

The <body> is the content of a file, and the navigator should work on content within the <body> but not link to content in <settings> <scripts> <styles> etc. elements.
Comment 7 QA Administrators 2017-07-27 12:06:39 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2017-08-30 19:32:03 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20170830