Bug 695878 - Add a component to fz_outline, that describes whether the outline item is open or closed.
Summary: Add a component to fz_outline, that describes whether the outline item is op...
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: master
Hardware: PC Linux
: P4 enhancement
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-20 03:45 UTC by Simon Reinhardt
Modified: 2015-03-25 11:32 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
git format-patch (2.01 KB, patch)
2015-03-20 03:45 UTC, Simon Reinhardt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Reinhardt 2015-03-20 03:45:18 UTC
Created attachment 11529 [details]
git format-patch

Patch in attachement.

Add a component to fz_outline, that describes whether the outline item is open or closed.

In PDF each outline item with descendants has a required key "Counts", that tells the viewer, whether the item should be viewed open or closed.
If Count is positive, it should be open.

This patch adds a component "int open" to struct fz_outline_s. A positive value indicates to the application, that the item should be viewed unfolded.
In pdf_load_outline_imp we check the value of Count and set node->open accordingly.

So far I had to define my own outline struct and my own load_outline function. It would simplify things for me, if you accept this patch!

All the best,
Simon
Comment 1 Robin Watts 2015-03-25 11:32:24 UTC
Fixed in:

commit 0bbafc586f1431d4a0059bb9c90981624d67e469
Author: Robin Watts <robin.watts@artifex.com>
Date:   Wed Mar 25 17:51:47 2015 +0000

    Bug 695878: Add entry to fz_outline to indicate if outline entry is open

    Adopt a (trivially modified) patch provided by Simon Reinhardt.

    When loading pdf outlines, if the 'Count' field is positive, the outline
    entry should be considered open.


Thanks for your bug report!