mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
This commit is contained in:
1 parent
0ad34ee2b1
commit
0ad2bda1f7
47 files changed
+2849
-522
No files matched your search
+6
-5
@@ -167,10 +167,11 @@ type OutlineElem struct {
|
||||
|
||||
// OutlineInfo 目录节点信息,Page从1开始,0表示没有有效的文档内目标页
|
||||
type OutlineInfo struct {
|
||||
Title string `json:"title"`
|
||||
Expanded bool `json:"expanded"`
|
||||
Page int `json:"page,omitempty"`
|
||||
Children []OutlineInfo `json:"children,omitempty"`
|
||||
Title string `json:"title"`
|
||||
Expanded bool `json:"expanded"`
|
||||
Page int `json:"page,omitempty"`
|
||||
ActionCount int `json:"actionCount,omitempty"`
|
||||
Children []OutlineInfo `json:"children,omitempty"`
|
||||
}
|
||||
|
||||
// Permissions 权限声明
|
||||
@@ -337,7 +338,7 @@ func (p *Permissions) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
|
||||
func outlineInfos(outlines []OutlineElem, bookmarks map[string]Dest, pages map[string]int) []OutlineInfo {
|
||||
infos := make([]OutlineInfo, 0, len(outlines))
|
||||
for _, outline := range outlines {
|
||||
info := OutlineInfo{Title: outline.Title, Expanded: outline.Expanded}
|
||||
info := OutlineInfo{Title: outline.Title, Expanded: outline.Expanded, ActionCount: len(outline.Actions)}
|
||||
for _, action := range outline.Actions {
|
||||
if action.Goto != nil {
|
||||
if dest := gotoDest(action.Goto, bookmarks); dest != nil {
|
||||
|
||||
Reference in new issue
Block a user