Bug 403943 - Entries in table of contents should be normalized (whitespace stripped)
Summary: Entries in table of contents should be normalized (whitespace stripped)
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.6.1
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-04 23:17 UTC by Laura David Hurka
Modified: 2019-02-06 23:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Much whitespace in Contents panel (16.71 KB, image/png)
2019-02-04 23:17 UTC, Laura David Hurka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laura David Hurka 2019-02-04 23:17:21 UTC
Created attachment 117835 [details]
Much whitespace in Contents panel

SUMMARY
For many documents, the Contents panel is not useful, because too many whitespace is shown. It would be better to strip excess whitespace in every item. (QString::simplified())

STEPS TO REPRODUCE
1. Open e. g. http://www.vbg.de/SharedDocs/Medien-Center/DE/Broschuere/Themen/Bildschirm_und_Bueroarbeit/DGUV_Information_215-444_Sonnenschutz_im_Buero.pdf
2. Look at Contents panel
3. 

OBSERVED RESULT
Entries look like (' for wasted space)
1''''''''''''''Sonnens
2.1'''''''''''''Ausric
2.4''''''''''''''''''A
4.1.1'''''''''''''''''

EXPECTED RESULT
Entries look like (' not needed ;) )
1 Sonnenstrahlung
2.1 Ausrichtung des Gebäu...
2.4 Aufstellung eines Bi...
4.1.1 Außenjalousien

ADDITIONAL INFORMATION
Sorry, screenshot still without D18429.
Comment 1 Albert Astals Cid 2019-02-05 18:37:07 UTC
Personally, I don't see why we should mangle what the document has in it.
Comment 2 Laura David Hurka 2019-02-05 21:34:41 UTC
I see that this makes it easier to read a document (sometimes).

It makes sense to preserve the true contents of a document (e. g. to test some LaTeX output), but it would be nice to have this as option, similar to "Draw border arround Links".
Comment 3 Albert Astals Cid 2019-02-06 21:30:15 UTC
On the other hand Adobe Reader shows this without lots of space, so needs some investigation as to waht we could do
Comment 4 Laura David Hurka 2019-02-06 23:50:28 UTC
(In reply to Albert Astals Cid from comment #3)
> Adobe Reader [...]

Ah, that is why PDFs are deployed with such excessive whitespace in the TOC. Then Okular should probably not silently remove the whitespace, but place some ugly but short whitespace-stripped-characters.

The tooltip would explain this character, because it would show the original string.