Bug 69199

Summary: Hidden paragraph styles should still be used as PDF bookmarks
Product: LibreOffice Reporter: David <eagleview7>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: jbfaure
Priority: medium    
Version: 4.1.2.1 rc   
Hardware: Other   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description David 2013-09-11 00:02:09 UTC
When a paragraph style is marked as hidden it is no longer used to create bookmarks when exporting to a PDF file.  

Create a blank document.  
Create some text with a Heading 1 style
Export to a PDF file and it shows as a bookmark
Modify the style by enabling the Hidden option under the Font Effects tab
Now export as a PDF file and the heading is no longer used to create bookmarks

I think it should have the ability to create a bookmark for the heading even if it isn't showing in the document.
Comment 1 Jean-Baptiste Faure 2013-11-16 16:27:30 UTC
I do not understand why something that is made hidden should be appearing somewhere in the pdf export. Hidden must means hidden not "sometimes hidden".

Perhaps what you want is the same as if you wrote in white on white.

Best regards. JBF
Comment 2 David 2013-11-17 02:58:36 UTC
"Hidden" means that it is hidden in the document.  But it would be VERY beneficial if a heading is not displayed in the document that it would still be used to create a bookmark.  As mentioned, right now the work around is to have the font color the same color as the background.  That way it won't print out in the document but you can still create a bookmark from it.  But it is my opinion that it would be handier to use if the option to hide the heading in the document still allowed it to show up as a bookmark.  Page backgrounds might change and it cannot always be assumed that it will be white on white. And in this instance also think about accessibility options that pdf readers have to override the background to make it easier for people with certain conditions to read.  Now you heading is suddenly no longer invisible just because it's assumed incorrectly that it would always be viewed with the same background used in the document.
Comment 3 Jean-Baptiste Faure 2013-11-17 06:32:20 UTC
Please describe a use case in which you need to hide a paragraph in the source dcoument (.odt) but _need_ to make it visible in pdf export.

Best regards. JBF
Comment 4 David 2013-11-17 09:13:15 UTC
From the way your question is worded I think you may be missing the point.  It is not a matter of having a paragraph hidden in an .odt file but having it visible in a .pdf file.  It is a matter of having a bookmark created from it even though it is not visible.

Now to give an example case... One scenario would be if a parallel column of a source text and its translation were wanted to be done.  The easiest way I know to do this would be to create a table with two columns.  In the first column each paragraph of the text from the first language would be put into a cell.  In the second column the cells would have the translated text of those paragraphs.  In the first row though you would want a title and you want the title from one of the languages to show up in the bookmark index.  You also want a new page to be started whenever that heading is used.  Now if you create such a document you will notice as I did that putting headings inside the cells creates very big problems for LibreOffice when it tries to format large documents with tables like this.  For example, it has problems creating a break to start a new page at the proper location.  The best way I know of to alleviate some of these issues is to put the text you wish to use for a bookmark outside of the table and format with a heading style that will be used to generate a bookmark.  Now that text is not wanted to be visible in the document since the actual title is in the first row for each of the respective languages.

I can also come up with some more scenarios if you wish, but that is merely one example of where it would be useful.
Comment 5 Jean-Baptiste Faure 2013-11-17 16:25:46 UTC
I think it is a bad methodology to modify the software by adding confusion (what is declared hidden must be hidden) instead of fixing the bugs.
So my suggestion is:
1/ report the bugs you are experiencing in the layout management; 
2/ ask for help on the users mailing-list (users@global.libreoffice.org) or on http://ask.libreoffice.org to find a workaround allowing you to obtain the desired effect.

In the case of comment #4 I tried to insert paragraphs with Heading 1 style in the first cell (A1) of a table and there is no problem to build the ToC. For the second cell (B1) I used a style derived from Heading 1 but excluded from the ToC.

Best regards. JBF
Comment 6 David 2013-11-17 17:42:25 UTC
Sure you might try a SIMPLE document and have a paragraph within a cell use a heading style and, yes, it shows up in the ToC.  But I had major problems trying to get it to work in a master document where I had large files with large tables.  The page breaks would not happen consistently even though the style was set to start a new page.

And yes, the work around is to create a heading that has the same font color as the page background.  But as mentioned previously, that scenario also has its difficulties.

As I also mentioned previously, there are other scenarios one might wish to have this function.  I have documents where I don't wish to use the whole heading as a bookmark in the PDF and I also don't wish to have a separate heading being visible.  Again I'm not understanding why this is bad methodology, since in my way of thinking the paragraph is still hidden, it's just that it's generating a bookmark also when creating a PDF.  If you don't want to have it generate a bookmark then don't use a style that will generate one.  The hide option shouldn't have any bearing on that part of it.
Comment 7 David 2013-11-18 15:15:58 UTC
I guess the question that needs to be answered here is if by hidden is it meant that a paragraph is merely not visible when the document is displayed, or does it mean to pretend that the paragraph is non-existent?
Comment 8 QA Administrators 2014-06-01 21:29:56 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 9 QA Administrators 2014-07-08 17:17:45 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID 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 FDO